@agent-relay/factory 0.0.0 → 0.1.2

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 (235) hide show
  1. package/README.md +182 -23
  2. package/bin/factory.mjs +7 -0
  3. package/dist/cli/fleet.d.ts +81 -0
  4. package/dist/cli/fleet.d.ts.map +1 -0
  5. package/dist/cli/fleet.js +571 -0
  6. package/dist/cli/fleet.js.map +1 -0
  7. package/dist/config/schema.d.ts +1313 -0
  8. package/dist/config/schema.d.ts.map +1 -0
  9. package/dist/config/schema.js +320 -0
  10. package/dist/config/schema.js.map +1 -0
  11. package/dist/constants/linear.d.ts +6 -0
  12. package/dist/constants/linear.d.ts.map +1 -0
  13. package/dist/constants/linear.js +21 -0
  14. package/dist/constants/linear.js.map +1 -0
  15. package/dist/constants/slack.d.ts +3 -0
  16. package/dist/constants/slack.d.ts.map +1 -0
  17. package/dist/constants/slack.js +3 -0
  18. package/dist/constants/slack.js.map +1 -0
  19. package/dist/dispatch/templates.d.ts +52 -0
  20. package/dist/dispatch/templates.d.ts.map +1 -0
  21. package/dist/dispatch/templates.js +118 -0
  22. package/dist/dispatch/templates.js.map +1 -0
  23. package/dist/fleet/create-fleet.d.ts +14 -0
  24. package/dist/fleet/create-fleet.d.ts.map +1 -0
  25. package/dist/fleet/create-fleet.js +15 -0
  26. package/dist/fleet/create-fleet.js.map +1 -0
  27. package/dist/fleet/ensure-relay-broker.d.ts +24 -0
  28. package/dist/fleet/ensure-relay-broker.d.ts.map +1 -0
  29. package/dist/fleet/ensure-relay-broker.js +56 -0
  30. package/dist/fleet/ensure-relay-broker.js.map +1 -0
  31. package/dist/fleet/internal-fleet-client.d.ts +90 -0
  32. package/dist/fleet/internal-fleet-client.d.ts.map +1 -0
  33. package/dist/fleet/internal-fleet-client.js +602 -0
  34. package/dist/fleet/internal-fleet-client.js.map +1 -0
  35. package/dist/fleet/relay-fleet-client.d.ts +105 -0
  36. package/dist/fleet/relay-fleet-client.d.ts.map +1 -0
  37. package/dist/fleet/relay-fleet-client.js +509 -0
  38. package/dist/fleet/relay-fleet-client.js.map +1 -0
  39. package/dist/github/index.d.ts +5 -0
  40. package/dist/github/index.d.ts.map +1 -0
  41. package/dist/github/index.js +3 -0
  42. package/dist/github/index.js.map +1 -0
  43. package/dist/github/merge-gate.d.ts +47 -0
  44. package/dist/github/merge-gate.d.ts.map +1 -0
  45. package/dist/github/merge-gate.js +147 -0
  46. package/dist/github/merge-gate.js.map +1 -0
  47. package/dist/github/probe-closer.d.ts +15 -0
  48. package/dist/github/probe-closer.d.ts.map +1 -0
  49. package/dist/github/probe-closer.js +67 -0
  50. package/dist/github/probe-closer.js.map +1 -0
  51. package/dist/index.d.ts +36 -0
  52. package/dist/index.d.ts.map +1 -0
  53. package/dist/index.js +20 -0
  54. package/dist/index.js.map +1 -0
  55. package/dist/issue-key-match.d.ts +3 -0
  56. package/dist/issue-key-match.d.ts.map +1 -0
  57. package/dist/issue-key-match.js +22 -0
  58. package/dist/issue-key-match.js.map +1 -0
  59. package/dist/linear/state-resolver.d.ts +26 -0
  60. package/dist/linear/state-resolver.d.ts.map +1 -0
  61. package/dist/linear/state-resolver.js +285 -0
  62. package/dist/linear/state-resolver.js.map +1 -0
  63. package/dist/mount/local-mount-preflight.d.ts +9 -0
  64. package/dist/mount/local-mount-preflight.d.ts.map +1 -0
  65. package/dist/mount/local-mount-preflight.js +149 -0
  66. package/dist/mount/local-mount-preflight.js.map +1 -0
  67. package/dist/mount/relayfile-binary.d.ts +9 -0
  68. package/dist/mount/relayfile-binary.d.ts.map +1 -0
  69. package/dist/mount/relayfile-binary.js +177 -0
  70. package/dist/mount/relayfile-binary.js.map +1 -0
  71. package/dist/mount/relayfile-cloud-mount-client.d.ts +123 -0
  72. package/dist/mount/relayfile-cloud-mount-client.d.ts.map +1 -0
  73. package/dist/mount/relayfile-cloud-mount-client.js +427 -0
  74. package/dist/mount/relayfile-cloud-mount-client.js.map +1 -0
  75. package/dist/node/factory-node.d.ts +59 -0
  76. package/dist/node/factory-node.d.ts.map +1 -0
  77. package/dist/node/factory-node.js +351 -0
  78. package/dist/node/factory-node.js.map +1 -0
  79. package/dist/node/factory.node.d.ts +3 -0
  80. package/dist/node/factory.node.d.ts.map +1 -0
  81. package/dist/node/factory.node.js +5 -0
  82. package/dist/node/factory.node.js.map +1 -0
  83. package/dist/orchestrator/batch-tracker.d.ts +42 -0
  84. package/dist/orchestrator/batch-tracker.d.ts.map +1 -0
  85. package/dist/orchestrator/batch-tracker.js +125 -0
  86. package/dist/orchestrator/batch-tracker.js.map +1 -0
  87. package/dist/orchestrator/factory.d.ts +58 -0
  88. package/dist/orchestrator/factory.d.ts.map +1 -0
  89. package/dist/orchestrator/factory.js +4372 -0
  90. package/dist/orchestrator/factory.js.map +1 -0
  91. package/dist/orchestrator/index.d.ts +5 -0
  92. package/dist/orchestrator/index.d.ts.map +1 -0
  93. package/dist/orchestrator/index.js +4 -0
  94. package/dist/orchestrator/index.js.map +1 -0
  95. package/dist/orchestrator/process-identity.d.ts +23 -0
  96. package/dist/orchestrator/process-identity.d.ts.map +1 -0
  97. package/dist/orchestrator/process-identity.js +122 -0
  98. package/dist/orchestrator/process-identity.js.map +1 -0
  99. package/dist/orchestrator/reaper.d.ts +60 -0
  100. package/dist/orchestrator/reaper.d.ts.map +1 -0
  101. package/dist/orchestrator/reaper.js +293 -0
  102. package/dist/orchestrator/reaper.js.map +1 -0
  103. package/dist/ports/fleet.d.ts +101 -0
  104. package/dist/ports/fleet.d.ts.map +1 -0
  105. package/dist/ports/fleet.js +2 -0
  106. package/dist/ports/fleet.js.map +1 -0
  107. package/dist/ports/index.d.ts +5 -0
  108. package/dist/ports/index.d.ts.map +1 -0
  109. package/dist/ports/index.js +2 -0
  110. package/dist/ports/index.js.map +1 -0
  111. package/dist/ports/mount.d.ts +56 -0
  112. package/dist/ports/mount.d.ts.map +1 -0
  113. package/dist/ports/mount.js +2 -0
  114. package/dist/ports/mount.js.map +1 -0
  115. package/dist/ports/state.d.ts +61 -0
  116. package/dist/ports/state.d.ts.map +1 -0
  117. package/dist/ports/state.js +2 -0
  118. package/dist/ports/state.js.map +1 -0
  119. package/dist/ports/system.d.ts +15 -0
  120. package/dist/ports/system.d.ts.map +1 -0
  121. package/dist/ports/system.js +2 -0
  122. package/dist/ports/system.js.map +1 -0
  123. package/dist/ports/writeback.d.ts +25 -0
  124. package/dist/ports/writeback.d.ts.map +1 -0
  125. package/dist/ports/writeback.js +2 -0
  126. package/dist/ports/writeback.js.map +1 -0
  127. package/dist/safety/factory-scope.d.ts +16 -0
  128. package/dist/safety/factory-scope.d.ts.map +1 -0
  129. package/dist/safety/factory-scope.js +107 -0
  130. package/dist/safety/factory-scope.js.map +1 -0
  131. package/dist/state/in-memory-state-store.d.ts +31 -0
  132. package/dist/state/in-memory-state-store.d.ts.map +1 -0
  133. package/dist/state/in-memory-state-store.js +115 -0
  134. package/dist/state/in-memory-state-store.js.map +1 -0
  135. package/dist/state/index.d.ts +3 -0
  136. package/dist/state/index.d.ts.map +1 -0
  137. package/dist/state/index.js +2 -0
  138. package/dist/state/index.js.map +1 -0
  139. package/dist/state/store.d.ts +29 -0
  140. package/dist/state/store.d.ts.map +1 -0
  141. package/dist/state/store.js +26 -0
  142. package/dist/state/store.js.map +1 -0
  143. package/dist/subscriptions/common.d.ts +7 -0
  144. package/dist/subscriptions/common.d.ts.map +1 -0
  145. package/dist/subscriptions/common.js +59 -0
  146. package/dist/subscriptions/common.js.map +1 -0
  147. package/dist/subscriptions/event-client.d.ts +40 -0
  148. package/dist/subscriptions/event-client.d.ts.map +1 -0
  149. package/dist/subscriptions/event-client.js +234 -0
  150. package/dist/subscriptions/event-client.js.map +1 -0
  151. package/dist/subscriptions/globs.d.ts +5 -0
  152. package/dist/subscriptions/globs.d.ts.map +1 -0
  153. package/dist/subscriptions/globs.js +50 -0
  154. package/dist/subscriptions/globs.js.map +1 -0
  155. package/dist/subscriptions/index.d.ts +8 -0
  156. package/dist/subscriptions/index.d.ts.map +1 -0
  157. package/dist/subscriptions/index.js +5 -0
  158. package/dist/subscriptions/index.js.map +1 -0
  159. package/dist/subscriptions/linear-filter.d.ts +26 -0
  160. package/dist/subscriptions/linear-filter.d.ts.map +1 -0
  161. package/dist/subscriptions/linear-filter.js +143 -0
  162. package/dist/subscriptions/linear-filter.js.map +1 -0
  163. package/dist/subscriptions/specs.d.ts +44 -0
  164. package/dist/subscriptions/specs.d.ts.map +1 -0
  165. package/dist/subscriptions/specs.js +195 -0
  166. package/dist/subscriptions/specs.js.map +1 -0
  167. package/dist/testing/fakes.d.ts +114 -0
  168. package/dist/testing/fakes.d.ts.map +1 -0
  169. package/dist/testing/fakes.js +219 -0
  170. package/dist/testing/fakes.js.map +1 -0
  171. package/dist/testing/index.d.ts +2 -0
  172. package/dist/testing/index.d.ts.map +1 -0
  173. package/dist/testing/index.js +2 -0
  174. package/dist/testing/index.js.map +1 -0
  175. package/dist/triage/heuristic.d.ts +42 -0
  176. package/dist/triage/heuristic.d.ts.map +1 -0
  177. package/dist/triage/heuristic.js +326 -0
  178. package/dist/triage/heuristic.js.map +1 -0
  179. package/dist/triage/index.d.ts +7 -0
  180. package/dist/triage/index.d.ts.map +1 -0
  181. package/dist/triage/index.js +5 -0
  182. package/dist/triage/index.js.map +1 -0
  183. package/dist/triage/llm.d.ts +11 -0
  184. package/dist/triage/llm.d.ts.map +1 -0
  185. package/dist/triage/llm.js +48 -0
  186. package/dist/triage/llm.js.map +1 -0
  187. package/dist/triage/schema.d.ts +344 -0
  188. package/dist/triage/schema.d.ts.map +1 -0
  189. package/dist/triage/schema.js +37 -0
  190. package/dist/triage/schema.js.map +1 -0
  191. package/dist/triage/tiered.d.ts +8 -0
  192. package/dist/triage/tiered.d.ts.map +1 -0
  193. package/dist/triage/tiered.js +47 -0
  194. package/dist/triage/tiered.js.map +1 -0
  195. package/dist/types.d.ts +212 -0
  196. package/dist/types.d.ts.map +1 -0
  197. package/dist/types.js +2 -0
  198. package/dist/types.js.map +1 -0
  199. package/dist/webhook/handler.d.ts +22 -0
  200. package/dist/webhook/handler.d.ts.map +1 -0
  201. package/dist/webhook/handler.js +57 -0
  202. package/dist/webhook/handler.js.map +1 -0
  203. package/dist/webhook/index.d.ts +5 -0
  204. package/dist/webhook/index.d.ts.map +1 -0
  205. package/dist/webhook/index.js +3 -0
  206. package/dist/webhook/index.js.map +1 -0
  207. package/dist/webhook/registrar.d.ts +16 -0
  208. package/dist/webhook/registrar.d.ts.map +1 -0
  209. package/dist/webhook/registrar.js +50 -0
  210. package/dist/webhook/registrar.js.map +1 -0
  211. package/dist/writeback/github.d.ts +6 -0
  212. package/dist/writeback/github.d.ts.map +1 -0
  213. package/dist/writeback/github.js +48 -0
  214. package/dist/writeback/github.js.map +1 -0
  215. package/dist/writeback/index.d.ts +6 -0
  216. package/dist/writeback/index.d.ts.map +1 -0
  217. package/dist/writeback/index.js +4 -0
  218. package/dist/writeback/index.js.map +1 -0
  219. package/dist/writeback/linear.d.ts +41 -0
  220. package/dist/writeback/linear.d.ts.map +1 -0
  221. package/dist/writeback/linear.js +286 -0
  222. package/dist/writeback/linear.js.map +1 -0
  223. package/dist/writeback/shared.d.ts +7 -0
  224. package/dist/writeback/shared.d.ts.map +1 -0
  225. package/dist/writeback/shared.js +29 -0
  226. package/dist/writeback/shared.js.map +1 -0
  227. package/dist/writeback/slack.d.ts +16 -0
  228. package/dist/writeback/slack.d.ts.map +1 -0
  229. package/dist/writeback/slack.js +104 -0
  230. package/dist/writeback/slack.js.map +1 -0
  231. package/package.json +54 -9
  232. package/scripts/com.agentrelay.factory-canary.plist.example +53 -0
  233. package/scripts/factory-canary.sh +89 -0
  234. package/index.d.ts +0 -2
  235. package/index.js +0 -7
@@ -0,0 +1,1313 @@
1
+ import { z } from 'zod';
2
+ export declare const FACTORY_STATE_ROLES: readonly ["readyForAgent", "agentImplementing", "inPlanning", "done", "humanReview"];
3
+ export type FactoryStateRole = (typeof FACTORY_STATE_ROLES)[number];
4
+ export declare const WorkspaceConfigSchema: z.ZodEffects<z.ZodObject<{
5
+ workspaceId: z.ZodOptional<z.ZodString>;
6
+ subscription: z.ZodDefault<z.ZodObject<{
7
+ teams: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
8
+ projects: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
9
+ labels: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
10
+ assignees: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
11
+ }, "strip", z.ZodTypeAny, {
12
+ teams: string[];
13
+ projects: string[];
14
+ labels: string[];
15
+ assignees: string[];
16
+ }, {
17
+ teams?: string[] | undefined;
18
+ projects?: string[] | undefined;
19
+ labels?: string[] | undefined;
20
+ assignees?: string[] | undefined;
21
+ }>>;
22
+ liveSubscription: z.ZodDefault<z.ZodObject<{
23
+ transport: z.ZodDefault<z.ZodEnum<["subscribe-and-poll", "subscribe", "poll"]>>;
24
+ pollIntervalMs: z.ZodDefault<z.ZodNumber>;
25
+ eventLimit: z.ZodDefault<z.ZodNumber>;
26
+ replaySkewMarginMs: z.ZodDefault<z.ZodNumber>;
27
+ }, "strip", z.ZodTypeAny, {
28
+ transport: "subscribe-and-poll" | "subscribe" | "poll";
29
+ pollIntervalMs: number;
30
+ eventLimit: number;
31
+ replaySkewMarginMs: number;
32
+ }, {
33
+ transport?: "subscribe-and-poll" | "subscribe" | "poll" | undefined;
34
+ pollIntervalMs?: number | undefined;
35
+ eventLimit?: number | undefined;
36
+ replaySkewMarginMs?: number | undefined;
37
+ }>>;
38
+ dispatch: z.ZodDefault<z.ZodObject<{
39
+ errorCooldownMs: z.ZodDefault<z.ZodNumber>;
40
+ maxAttempts: z.ZodDefault<z.ZodNumber>;
41
+ }, "strip", z.ZodTypeAny, {
42
+ errorCooldownMs: number;
43
+ maxAttempts: number;
44
+ }, {
45
+ errorCooldownMs?: number | undefined;
46
+ maxAttempts?: number | undefined;
47
+ }>>;
48
+ loop: z.ZodDefault<z.ZodObject<{
49
+ maxIterations: z.ZodDefault<z.ZodNumber>;
50
+ maxConsecutiveFailures: z.ZodDefault<z.ZodNumber>;
51
+ heartbeatPath: z.ZodDefault<z.ZodString>;
52
+ registryPath: z.ZodDefault<z.ZodString>;
53
+ heartbeatStaleMs: z.ZodDefault<z.ZodNumber>;
54
+ }, "strip", z.ZodTypeAny, {
55
+ maxIterations: number;
56
+ maxConsecutiveFailures: number;
57
+ heartbeatPath: string;
58
+ registryPath: string;
59
+ heartbeatStaleMs: number;
60
+ }, {
61
+ maxIterations?: number | undefined;
62
+ maxConsecutiveFailures?: number | undefined;
63
+ heartbeatPath?: string | undefined;
64
+ registryPath?: string | undefined;
65
+ heartbeatStaleMs?: number | undefined;
66
+ }>>;
67
+ triage: z.ZodDefault<z.ZodObject<{
68
+ maxImplementers: z.ZodDefault<z.ZodNumber>;
69
+ }, "strip", z.ZodTypeAny, {
70
+ maxImplementers: number;
71
+ }, {
72
+ maxImplementers?: number | undefined;
73
+ }>>;
74
+ repos: z.ZodObject<{
75
+ org: z.ZodOptional<z.ZodString>;
76
+ names: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
77
+ overrides: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
78
+ byLabel: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
79
+ byProject: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
80
+ keywordRules: z.ZodDefault<z.ZodArray<z.ZodObject<{
81
+ pattern: z.ZodString;
82
+ repo: z.ZodString;
83
+ }, "strip", z.ZodTypeAny, {
84
+ pattern: string;
85
+ repo: string;
86
+ }, {
87
+ pattern: string;
88
+ repo: string;
89
+ }>, "many">>;
90
+ default: z.ZodOptional<z.ZodString>;
91
+ cloneRoot: z.ZodOptional<z.ZodString>;
92
+ clonePaths: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
93
+ }, "strip", z.ZodTypeAny, {
94
+ overrides: Record<string, string>;
95
+ byLabel: Record<string, string>;
96
+ byProject: Record<string, string>;
97
+ keywordRules: {
98
+ pattern: string;
99
+ repo: string;
100
+ }[];
101
+ clonePaths: Record<string, string>;
102
+ org?: string | undefined;
103
+ names?: string[] | undefined;
104
+ default?: string | undefined;
105
+ cloneRoot?: string | undefined;
106
+ }, {
107
+ org?: string | undefined;
108
+ names?: string[] | undefined;
109
+ overrides?: Record<string, string> | undefined;
110
+ byLabel?: Record<string, string> | undefined;
111
+ byProject?: Record<string, string> | undefined;
112
+ keywordRules?: {
113
+ pattern: string;
114
+ repo: string;
115
+ }[] | undefined;
116
+ default?: string | undefined;
117
+ cloneRoot?: string | undefined;
118
+ clonePaths?: Record<string, string> | undefined;
119
+ }>;
120
+ batchSize: z.ZodDefault<z.ZodNumber>;
121
+ models: z.ZodDefault<z.ZodObject<{
122
+ implementer: z.ZodOptional<z.ZodString>;
123
+ reviewer: z.ZodOptional<z.ZodString>;
124
+ triage: z.ZodOptional<z.ZodString>;
125
+ babysitter: z.ZodDefault<z.ZodString>;
126
+ }, "strip", z.ZodTypeAny, {
127
+ babysitter: string;
128
+ implementer?: string | undefined;
129
+ reviewer?: string | undefined;
130
+ triage?: string | undefined;
131
+ }, {
132
+ implementer?: string | undefined;
133
+ reviewer?: string | undefined;
134
+ triage?: string | undefined;
135
+ babysitter?: string | undefined;
136
+ }>>;
137
+ slack: z.ZodOptional<z.ZodObject<{
138
+ channel: z.ZodString;
139
+ style: z.ZodDefault<z.ZodLiteral<"threaded-summarized">>;
140
+ botUserId: z.ZodDefault<z.ZodString>;
141
+ staleAfterMs: z.ZodDefault<z.ZodNumber>;
142
+ }, "strip", z.ZodTypeAny, {
143
+ channel: string;
144
+ style: "threaded-summarized";
145
+ botUserId: string;
146
+ staleAfterMs: number;
147
+ }, {
148
+ channel: string;
149
+ style?: "threaded-summarized" | undefined;
150
+ botUserId?: string | undefined;
151
+ staleAfterMs?: number | undefined;
152
+ }>>;
153
+ mergePolicy: z.ZodDefault<z.ZodEnum<["never", "on-green-with-review"]>>;
154
+ babysitter: z.ZodDefault<z.ZodObject<{
155
+ enabled: z.ZodDefault<z.ZodBoolean>;
156
+ }, "strip", z.ZodTypeAny, {
157
+ enabled: boolean;
158
+ }, {
159
+ enabled?: boolean | undefined;
160
+ }>>;
161
+ terminalState: z.ZodDefault<z.ZodEnum<["done", "human-review"]>>;
162
+ linear: z.ZodDefault<z.ZodObject<{
163
+ states: z.ZodDefault<z.ZodDefault<z.ZodObject<{
164
+ readyForAgent: z.ZodOptional<z.ZodString>;
165
+ agentImplementing: z.ZodOptional<z.ZodString>;
166
+ inPlanning: z.ZodOptional<z.ZodString>;
167
+ done: z.ZodOptional<z.ZodString>;
168
+ humanReview: z.ZodOptional<z.ZodString>;
169
+ }, "strip", z.ZodTypeAny, {
170
+ readyForAgent?: string | undefined;
171
+ agentImplementing?: string | undefined;
172
+ inPlanning?: string | undefined;
173
+ done?: string | undefined;
174
+ humanReview?: string | undefined;
175
+ }, {
176
+ readyForAgent?: string | undefined;
177
+ agentImplementing?: string | undefined;
178
+ inPlanning?: string | undefined;
179
+ done?: string | undefined;
180
+ humanReview?: string | undefined;
181
+ }>>>;
182
+ statesByTeam: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodDefault<z.ZodObject<{
183
+ readyForAgent: z.ZodOptional<z.ZodString>;
184
+ agentImplementing: z.ZodOptional<z.ZodString>;
185
+ inPlanning: z.ZodOptional<z.ZodString>;
186
+ done: z.ZodOptional<z.ZodString>;
187
+ humanReview: z.ZodOptional<z.ZodString>;
188
+ }, "strip", z.ZodTypeAny, {
189
+ readyForAgent?: string | undefined;
190
+ agentImplementing?: string | undefined;
191
+ inPlanning?: string | undefined;
192
+ done?: string | undefined;
193
+ humanReview?: string | undefined;
194
+ }, {
195
+ readyForAgent?: string | undefined;
196
+ agentImplementing?: string | undefined;
197
+ inPlanning?: string | undefined;
198
+ done?: string | undefined;
199
+ humanReview?: string | undefined;
200
+ }>>>>;
201
+ }, "strip", z.ZodTypeAny, {
202
+ states: {
203
+ readyForAgent?: string | undefined;
204
+ agentImplementing?: string | undefined;
205
+ inPlanning?: string | undefined;
206
+ done?: string | undefined;
207
+ humanReview?: string | undefined;
208
+ };
209
+ statesByTeam: Record<string, {
210
+ readyForAgent?: string | undefined;
211
+ agentImplementing?: string | undefined;
212
+ inPlanning?: string | undefined;
213
+ done?: string | undefined;
214
+ humanReview?: string | undefined;
215
+ }>;
216
+ }, {
217
+ states?: {
218
+ readyForAgent?: string | undefined;
219
+ agentImplementing?: string | undefined;
220
+ inPlanning?: string | undefined;
221
+ done?: string | undefined;
222
+ humanReview?: string | undefined;
223
+ } | undefined;
224
+ statesByTeam?: Record<string, {
225
+ readyForAgent?: string | undefined;
226
+ agentImplementing?: string | undefined;
227
+ inPlanning?: string | undefined;
228
+ done?: string | undefined;
229
+ humanReview?: string | undefined;
230
+ } | undefined> | undefined;
231
+ }>>;
232
+ stateIds: z.ZodDefault<z.ZodObject<{
233
+ readyForAgent: z.ZodOptional<z.ZodString>;
234
+ agentImplementing: z.ZodOptional<z.ZodString>;
235
+ done: z.ZodOptional<z.ZodString>;
236
+ inPlanning: z.ZodOptional<z.ZodString>;
237
+ humanReview: z.ZodOptional<z.ZodString>;
238
+ }, "strip", z.ZodTypeAny, {
239
+ readyForAgent?: string | undefined;
240
+ agentImplementing?: string | undefined;
241
+ inPlanning?: string | undefined;
242
+ done?: string | undefined;
243
+ humanReview?: string | undefined;
244
+ }, {
245
+ readyForAgent?: string | undefined;
246
+ agentImplementing?: string | undefined;
247
+ inPlanning?: string | undefined;
248
+ done?: string | undefined;
249
+ humanReview?: string | undefined;
250
+ }>>;
251
+ safety: z.ZodDefault<z.ZodObject<{
252
+ requireTitlePrefix: z.ZodDefault<z.ZodString>;
253
+ requireLabel: z.ZodDefault<z.ZodString>;
254
+ requireTeamKey: z.ZodDefault<z.ZodString>;
255
+ }, "strip", z.ZodTypeAny, {
256
+ requireTitlePrefix: string;
257
+ requireLabel: string;
258
+ requireTeamKey: string;
259
+ }, {
260
+ requireTitlePrefix?: string | undefined;
261
+ requireLabel?: string | undefined;
262
+ requireTeamKey?: string | undefined;
263
+ }>>;
264
+ }, "strip", z.ZodTypeAny, {
265
+ triage: {
266
+ maxImplementers: number;
267
+ };
268
+ babysitter: {
269
+ enabled: boolean;
270
+ };
271
+ subscription: {
272
+ teams: string[];
273
+ projects: string[];
274
+ labels: string[];
275
+ assignees: string[];
276
+ };
277
+ liveSubscription: {
278
+ transport: "subscribe-and-poll" | "subscribe" | "poll";
279
+ pollIntervalMs: number;
280
+ eventLimit: number;
281
+ replaySkewMarginMs: number;
282
+ };
283
+ dispatch: {
284
+ errorCooldownMs: number;
285
+ maxAttempts: number;
286
+ };
287
+ loop: {
288
+ maxIterations: number;
289
+ maxConsecutiveFailures: number;
290
+ heartbeatPath: string;
291
+ registryPath: string;
292
+ heartbeatStaleMs: number;
293
+ };
294
+ repos: {
295
+ overrides: Record<string, string>;
296
+ byLabel: Record<string, string>;
297
+ byProject: Record<string, string>;
298
+ keywordRules: {
299
+ pattern: string;
300
+ repo: string;
301
+ }[];
302
+ clonePaths: Record<string, string>;
303
+ org?: string | undefined;
304
+ names?: string[] | undefined;
305
+ default?: string | undefined;
306
+ cloneRoot?: string | undefined;
307
+ };
308
+ batchSize: number;
309
+ models: {
310
+ babysitter: string;
311
+ implementer?: string | undefined;
312
+ reviewer?: string | undefined;
313
+ triage?: string | undefined;
314
+ };
315
+ mergePolicy: "never" | "on-green-with-review";
316
+ terminalState: "done" | "human-review";
317
+ linear: {
318
+ states: {
319
+ readyForAgent?: string | undefined;
320
+ agentImplementing?: string | undefined;
321
+ inPlanning?: string | undefined;
322
+ done?: string | undefined;
323
+ humanReview?: string | undefined;
324
+ };
325
+ statesByTeam: Record<string, {
326
+ readyForAgent?: string | undefined;
327
+ agentImplementing?: string | undefined;
328
+ inPlanning?: string | undefined;
329
+ done?: string | undefined;
330
+ humanReview?: string | undefined;
331
+ }>;
332
+ };
333
+ stateIds: {
334
+ readyForAgent?: string | undefined;
335
+ agentImplementing?: string | undefined;
336
+ inPlanning?: string | undefined;
337
+ done?: string | undefined;
338
+ humanReview?: string | undefined;
339
+ };
340
+ safety: {
341
+ requireTitlePrefix: string;
342
+ requireLabel: string;
343
+ requireTeamKey: string;
344
+ };
345
+ workspaceId?: string | undefined;
346
+ slack?: {
347
+ channel: string;
348
+ style: "threaded-summarized";
349
+ botUserId: string;
350
+ staleAfterMs: number;
351
+ } | undefined;
352
+ }, {
353
+ repos: {
354
+ org?: string | undefined;
355
+ names?: string[] | undefined;
356
+ overrides?: Record<string, string> | undefined;
357
+ byLabel?: Record<string, string> | undefined;
358
+ byProject?: Record<string, string> | undefined;
359
+ keywordRules?: {
360
+ pattern: string;
361
+ repo: string;
362
+ }[] | undefined;
363
+ default?: string | undefined;
364
+ cloneRoot?: string | undefined;
365
+ clonePaths?: Record<string, string> | undefined;
366
+ };
367
+ triage?: {
368
+ maxImplementers?: number | undefined;
369
+ } | undefined;
370
+ babysitter?: {
371
+ enabled?: boolean | undefined;
372
+ } | undefined;
373
+ workspaceId?: string | undefined;
374
+ subscription?: {
375
+ teams?: string[] | undefined;
376
+ projects?: string[] | undefined;
377
+ labels?: string[] | undefined;
378
+ assignees?: string[] | undefined;
379
+ } | undefined;
380
+ liveSubscription?: {
381
+ transport?: "subscribe-and-poll" | "subscribe" | "poll" | undefined;
382
+ pollIntervalMs?: number | undefined;
383
+ eventLimit?: number | undefined;
384
+ replaySkewMarginMs?: number | undefined;
385
+ } | undefined;
386
+ dispatch?: {
387
+ errorCooldownMs?: number | undefined;
388
+ maxAttempts?: number | undefined;
389
+ } | undefined;
390
+ loop?: {
391
+ maxIterations?: number | undefined;
392
+ maxConsecutiveFailures?: number | undefined;
393
+ heartbeatPath?: string | undefined;
394
+ registryPath?: string | undefined;
395
+ heartbeatStaleMs?: number | undefined;
396
+ } | undefined;
397
+ batchSize?: number | undefined;
398
+ models?: {
399
+ implementer?: string | undefined;
400
+ reviewer?: string | undefined;
401
+ triage?: string | undefined;
402
+ babysitter?: string | undefined;
403
+ } | undefined;
404
+ slack?: {
405
+ channel: string;
406
+ style?: "threaded-summarized" | undefined;
407
+ botUserId?: string | undefined;
408
+ staleAfterMs?: number | undefined;
409
+ } | undefined;
410
+ mergePolicy?: "never" | "on-green-with-review" | undefined;
411
+ terminalState?: "done" | "human-review" | undefined;
412
+ linear?: {
413
+ states?: {
414
+ readyForAgent?: string | undefined;
415
+ agentImplementing?: string | undefined;
416
+ inPlanning?: string | undefined;
417
+ done?: string | undefined;
418
+ humanReview?: string | undefined;
419
+ } | undefined;
420
+ statesByTeam?: Record<string, {
421
+ readyForAgent?: string | undefined;
422
+ agentImplementing?: string | undefined;
423
+ inPlanning?: string | undefined;
424
+ done?: string | undefined;
425
+ humanReview?: string | undefined;
426
+ } | undefined> | undefined;
427
+ } | undefined;
428
+ stateIds?: {
429
+ readyForAgent?: string | undefined;
430
+ agentImplementing?: string | undefined;
431
+ inPlanning?: string | undefined;
432
+ done?: string | undefined;
433
+ humanReview?: string | undefined;
434
+ } | undefined;
435
+ safety?: {
436
+ requireTitlePrefix?: string | undefined;
437
+ requireLabel?: string | undefined;
438
+ requireTeamKey?: string | undefined;
439
+ } | undefined;
440
+ }>, {
441
+ subscription: {
442
+ labels: string[];
443
+ teams: string[];
444
+ projects: string[];
445
+ assignees: string[];
446
+ };
447
+ repos: {
448
+ default?: string | undefined;
449
+ byLabel: {
450
+ [x: string]: string;
451
+ };
452
+ byProject: Record<string, string>;
453
+ keywordRules: {
454
+ pattern: string;
455
+ repo: string;
456
+ }[];
457
+ overrides: Record<string, string>;
458
+ org?: string | undefined;
459
+ names?: string[] | undefined;
460
+ };
461
+ triage: {
462
+ maxImplementers: number;
463
+ };
464
+ babysitter: {
465
+ enabled: boolean;
466
+ };
467
+ liveSubscription: {
468
+ transport: "subscribe-and-poll" | "subscribe" | "poll";
469
+ pollIntervalMs: number;
470
+ eventLimit: number;
471
+ replaySkewMarginMs: number;
472
+ };
473
+ dispatch: {
474
+ errorCooldownMs: number;
475
+ maxAttempts: number;
476
+ };
477
+ loop: {
478
+ maxIterations: number;
479
+ maxConsecutiveFailures: number;
480
+ heartbeatPath: string;
481
+ registryPath: string;
482
+ heartbeatStaleMs: number;
483
+ };
484
+ batchSize: number;
485
+ models: {
486
+ babysitter: string;
487
+ implementer?: string | undefined;
488
+ reviewer?: string | undefined;
489
+ triage?: string | undefined;
490
+ };
491
+ mergePolicy: "never" | "on-green-with-review";
492
+ terminalState: "done" | "human-review";
493
+ linear: {
494
+ states: {
495
+ readyForAgent?: string | undefined;
496
+ agentImplementing?: string | undefined;
497
+ inPlanning?: string | undefined;
498
+ done?: string | undefined;
499
+ humanReview?: string | undefined;
500
+ };
501
+ statesByTeam: Record<string, {
502
+ readyForAgent?: string | undefined;
503
+ agentImplementing?: string | undefined;
504
+ inPlanning?: string | undefined;
505
+ done?: string | undefined;
506
+ humanReview?: string | undefined;
507
+ }>;
508
+ };
509
+ stateIds: {
510
+ readyForAgent?: string | undefined;
511
+ agentImplementing?: string | undefined;
512
+ inPlanning?: string | undefined;
513
+ done?: string | undefined;
514
+ humanReview?: string | undefined;
515
+ };
516
+ safety: {
517
+ requireTitlePrefix: string;
518
+ requireLabel: string;
519
+ requireTeamKey: string;
520
+ };
521
+ workspaceId?: string | undefined;
522
+ slack?: {
523
+ channel: string;
524
+ style: "threaded-summarized";
525
+ botUserId: string;
526
+ staleAfterMs: number;
527
+ } | undefined;
528
+ }, {
529
+ repos: {
530
+ org?: string | undefined;
531
+ names?: string[] | undefined;
532
+ overrides?: Record<string, string> | undefined;
533
+ byLabel?: Record<string, string> | undefined;
534
+ byProject?: Record<string, string> | undefined;
535
+ keywordRules?: {
536
+ pattern: string;
537
+ repo: string;
538
+ }[] | undefined;
539
+ default?: string | undefined;
540
+ cloneRoot?: string | undefined;
541
+ clonePaths?: Record<string, string> | undefined;
542
+ };
543
+ triage?: {
544
+ maxImplementers?: number | undefined;
545
+ } | undefined;
546
+ babysitter?: {
547
+ enabled?: boolean | undefined;
548
+ } | undefined;
549
+ workspaceId?: string | undefined;
550
+ subscription?: {
551
+ teams?: string[] | undefined;
552
+ projects?: string[] | undefined;
553
+ labels?: string[] | undefined;
554
+ assignees?: string[] | undefined;
555
+ } | undefined;
556
+ liveSubscription?: {
557
+ transport?: "subscribe-and-poll" | "subscribe" | "poll" | undefined;
558
+ pollIntervalMs?: number | undefined;
559
+ eventLimit?: number | undefined;
560
+ replaySkewMarginMs?: number | undefined;
561
+ } | undefined;
562
+ dispatch?: {
563
+ errorCooldownMs?: number | undefined;
564
+ maxAttempts?: number | undefined;
565
+ } | undefined;
566
+ loop?: {
567
+ maxIterations?: number | undefined;
568
+ maxConsecutiveFailures?: number | undefined;
569
+ heartbeatPath?: string | undefined;
570
+ registryPath?: string | undefined;
571
+ heartbeatStaleMs?: number | undefined;
572
+ } | undefined;
573
+ batchSize?: number | undefined;
574
+ models?: {
575
+ implementer?: string | undefined;
576
+ reviewer?: string | undefined;
577
+ triage?: string | undefined;
578
+ babysitter?: string | undefined;
579
+ } | undefined;
580
+ slack?: {
581
+ channel: string;
582
+ style?: "threaded-summarized" | undefined;
583
+ botUserId?: string | undefined;
584
+ staleAfterMs?: number | undefined;
585
+ } | undefined;
586
+ mergePolicy?: "never" | "on-green-with-review" | undefined;
587
+ terminalState?: "done" | "human-review" | undefined;
588
+ linear?: {
589
+ states?: {
590
+ readyForAgent?: string | undefined;
591
+ agentImplementing?: string | undefined;
592
+ inPlanning?: string | undefined;
593
+ done?: string | undefined;
594
+ humanReview?: string | undefined;
595
+ } | undefined;
596
+ statesByTeam?: Record<string, {
597
+ readyForAgent?: string | undefined;
598
+ agentImplementing?: string | undefined;
599
+ inPlanning?: string | undefined;
600
+ done?: string | undefined;
601
+ humanReview?: string | undefined;
602
+ } | undefined> | undefined;
603
+ } | undefined;
604
+ stateIds?: {
605
+ readyForAgent?: string | undefined;
606
+ agentImplementing?: string | undefined;
607
+ inPlanning?: string | undefined;
608
+ done?: string | undefined;
609
+ humanReview?: string | undefined;
610
+ } | undefined;
611
+ safety?: {
612
+ requireTitlePrefix?: string | undefined;
613
+ requireLabel?: string | undefined;
614
+ requireTeamKey?: string | undefined;
615
+ } | undefined;
616
+ }>;
617
+ export declare const NodeConfigSchema: z.ZodEffects<z.ZodObject<{
618
+ workspaceId: z.ZodOptional<z.ZodString>;
619
+ capabilities: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
620
+ cloneRoot: z.ZodOptional<z.ZodString>;
621
+ clonePaths: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
622
+ dryRun: z.ZodDefault<z.ZodBoolean>;
623
+ factoryLoopHeartbeatPath: z.ZodOptional<z.ZodString>;
624
+ factoryLoopRegistryPath: z.ZodOptional<z.ZodString>;
625
+ }, "strip", z.ZodTypeAny, {
626
+ clonePaths: Record<string, string>;
627
+ capabilities: string[];
628
+ dryRun: boolean;
629
+ cloneRoot?: string | undefined;
630
+ workspaceId?: string | undefined;
631
+ factoryLoopHeartbeatPath?: string | undefined;
632
+ factoryLoopRegistryPath?: string | undefined;
633
+ }, {
634
+ cloneRoot?: string | undefined;
635
+ clonePaths?: Record<string, string> | undefined;
636
+ workspaceId?: string | undefined;
637
+ capabilities?: string[] | undefined;
638
+ dryRun?: boolean | undefined;
639
+ factoryLoopHeartbeatPath?: string | undefined;
640
+ factoryLoopRegistryPath?: string | undefined;
641
+ }>, {
642
+ factoryLoopHeartbeatPath: string | undefined;
643
+ factoryLoopRegistryPath: string | undefined;
644
+ clonePaths: Record<string, string>;
645
+ capabilities: string[];
646
+ dryRun: boolean;
647
+ cloneRoot?: string | undefined;
648
+ workspaceId?: string | undefined;
649
+ }, {
650
+ cloneRoot?: string | undefined;
651
+ clonePaths?: Record<string, string> | undefined;
652
+ workspaceId?: string | undefined;
653
+ capabilities?: string[] | undefined;
654
+ dryRun?: boolean | undefined;
655
+ factoryLoopHeartbeatPath?: string | undefined;
656
+ factoryLoopRegistryPath?: string | undefined;
657
+ }>;
658
+ export declare const FactoryConfigSchema: z.ZodEffects<z.ZodObject<{
659
+ subscription: z.ZodDefault<z.ZodObject<{
660
+ teams: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
661
+ projects: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
662
+ labels: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
663
+ assignees: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
664
+ }, "strip", z.ZodTypeAny, {
665
+ teams: string[];
666
+ projects: string[];
667
+ labels: string[];
668
+ assignees: string[];
669
+ }, {
670
+ teams?: string[] | undefined;
671
+ projects?: string[] | undefined;
672
+ labels?: string[] | undefined;
673
+ assignees?: string[] | undefined;
674
+ }>>;
675
+ liveSubscription: z.ZodDefault<z.ZodObject<{
676
+ transport: z.ZodDefault<z.ZodEnum<["subscribe-and-poll", "subscribe", "poll"]>>;
677
+ pollIntervalMs: z.ZodDefault<z.ZodNumber>;
678
+ eventLimit: z.ZodDefault<z.ZodNumber>;
679
+ replaySkewMarginMs: z.ZodDefault<z.ZodNumber>;
680
+ }, "strip", z.ZodTypeAny, {
681
+ transport: "subscribe-and-poll" | "subscribe" | "poll";
682
+ pollIntervalMs: number;
683
+ eventLimit: number;
684
+ replaySkewMarginMs: number;
685
+ }, {
686
+ transport?: "subscribe-and-poll" | "subscribe" | "poll" | undefined;
687
+ pollIntervalMs?: number | undefined;
688
+ eventLimit?: number | undefined;
689
+ replaySkewMarginMs?: number | undefined;
690
+ }>>;
691
+ dispatch: z.ZodDefault<z.ZodObject<{
692
+ errorCooldownMs: z.ZodDefault<z.ZodNumber>;
693
+ maxAttempts: z.ZodDefault<z.ZodNumber>;
694
+ }, "strip", z.ZodTypeAny, {
695
+ errorCooldownMs: number;
696
+ maxAttempts: number;
697
+ }, {
698
+ errorCooldownMs?: number | undefined;
699
+ maxAttempts?: number | undefined;
700
+ }>>;
701
+ loop: z.ZodDefault<z.ZodObject<{
702
+ maxIterations: z.ZodDefault<z.ZodNumber>;
703
+ maxConsecutiveFailures: z.ZodDefault<z.ZodNumber>;
704
+ heartbeatPath: z.ZodDefault<z.ZodString>;
705
+ registryPath: z.ZodDefault<z.ZodString>;
706
+ heartbeatStaleMs: z.ZodDefault<z.ZodNumber>;
707
+ }, "strip", z.ZodTypeAny, {
708
+ maxIterations: number;
709
+ maxConsecutiveFailures: number;
710
+ heartbeatPath: string;
711
+ registryPath: string;
712
+ heartbeatStaleMs: number;
713
+ }, {
714
+ maxIterations?: number | undefined;
715
+ maxConsecutiveFailures?: number | undefined;
716
+ heartbeatPath?: string | undefined;
717
+ registryPath?: string | undefined;
718
+ heartbeatStaleMs?: number | undefined;
719
+ }>>;
720
+ triage: z.ZodDefault<z.ZodObject<{
721
+ maxImplementers: z.ZodDefault<z.ZodNumber>;
722
+ }, "strip", z.ZodTypeAny, {
723
+ maxImplementers: number;
724
+ }, {
725
+ maxImplementers?: number | undefined;
726
+ }>>;
727
+ repos: z.ZodObject<{
728
+ org: z.ZodOptional<z.ZodString>;
729
+ names: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
730
+ overrides: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
731
+ byLabel: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
732
+ byProject: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
733
+ keywordRules: z.ZodDefault<z.ZodArray<z.ZodObject<{
734
+ pattern: z.ZodString;
735
+ repo: z.ZodString;
736
+ }, "strip", z.ZodTypeAny, {
737
+ pattern: string;
738
+ repo: string;
739
+ }, {
740
+ pattern: string;
741
+ repo: string;
742
+ }>, "many">>;
743
+ default: z.ZodOptional<z.ZodString>;
744
+ cloneRoot: z.ZodOptional<z.ZodString>;
745
+ clonePaths: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
746
+ }, "strip", z.ZodTypeAny, {
747
+ overrides: Record<string, string>;
748
+ byLabel: Record<string, string>;
749
+ byProject: Record<string, string>;
750
+ keywordRules: {
751
+ pattern: string;
752
+ repo: string;
753
+ }[];
754
+ clonePaths: Record<string, string>;
755
+ org?: string | undefined;
756
+ names?: string[] | undefined;
757
+ default?: string | undefined;
758
+ cloneRoot?: string | undefined;
759
+ }, {
760
+ org?: string | undefined;
761
+ names?: string[] | undefined;
762
+ overrides?: Record<string, string> | undefined;
763
+ byLabel?: Record<string, string> | undefined;
764
+ byProject?: Record<string, string> | undefined;
765
+ keywordRules?: {
766
+ pattern: string;
767
+ repo: string;
768
+ }[] | undefined;
769
+ default?: string | undefined;
770
+ cloneRoot?: string | undefined;
771
+ clonePaths?: Record<string, string> | undefined;
772
+ }>;
773
+ batchSize: z.ZodDefault<z.ZodNumber>;
774
+ models: z.ZodDefault<z.ZodObject<{
775
+ implementer: z.ZodOptional<z.ZodString>;
776
+ reviewer: z.ZodOptional<z.ZodString>;
777
+ triage: z.ZodOptional<z.ZodString>;
778
+ babysitter: z.ZodDefault<z.ZodString>;
779
+ }, "strip", z.ZodTypeAny, {
780
+ babysitter: string;
781
+ implementer?: string | undefined;
782
+ reviewer?: string | undefined;
783
+ triage?: string | undefined;
784
+ }, {
785
+ implementer?: string | undefined;
786
+ reviewer?: string | undefined;
787
+ triage?: string | undefined;
788
+ babysitter?: string | undefined;
789
+ }>>;
790
+ slack: z.ZodOptional<z.ZodObject<{
791
+ channel: z.ZodString;
792
+ style: z.ZodDefault<z.ZodLiteral<"threaded-summarized">>;
793
+ botUserId: z.ZodDefault<z.ZodString>;
794
+ staleAfterMs: z.ZodDefault<z.ZodNumber>;
795
+ }, "strip", z.ZodTypeAny, {
796
+ channel: string;
797
+ style: "threaded-summarized";
798
+ botUserId: string;
799
+ staleAfterMs: number;
800
+ }, {
801
+ channel: string;
802
+ style?: "threaded-summarized" | undefined;
803
+ botUserId?: string | undefined;
804
+ staleAfterMs?: number | undefined;
805
+ }>>;
806
+ mergePolicy: z.ZodDefault<z.ZodEnum<["never", "on-green-with-review"]>>;
807
+ babysitter: z.ZodDefault<z.ZodObject<{
808
+ enabled: z.ZodDefault<z.ZodBoolean>;
809
+ }, "strip", z.ZodTypeAny, {
810
+ enabled: boolean;
811
+ }, {
812
+ enabled?: boolean | undefined;
813
+ }>>;
814
+ terminalState: z.ZodDefault<z.ZodEnum<["done", "human-review"]>>;
815
+ linear: z.ZodDefault<z.ZodObject<{
816
+ states: z.ZodDefault<z.ZodDefault<z.ZodObject<{
817
+ readyForAgent: z.ZodOptional<z.ZodString>;
818
+ agentImplementing: z.ZodOptional<z.ZodString>;
819
+ inPlanning: z.ZodOptional<z.ZodString>;
820
+ done: z.ZodOptional<z.ZodString>;
821
+ humanReview: z.ZodOptional<z.ZodString>;
822
+ }, "strip", z.ZodTypeAny, {
823
+ readyForAgent?: string | undefined;
824
+ agentImplementing?: string | undefined;
825
+ inPlanning?: string | undefined;
826
+ done?: string | undefined;
827
+ humanReview?: string | undefined;
828
+ }, {
829
+ readyForAgent?: string | undefined;
830
+ agentImplementing?: string | undefined;
831
+ inPlanning?: string | undefined;
832
+ done?: string | undefined;
833
+ humanReview?: string | undefined;
834
+ }>>>;
835
+ statesByTeam: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodDefault<z.ZodObject<{
836
+ readyForAgent: z.ZodOptional<z.ZodString>;
837
+ agentImplementing: z.ZodOptional<z.ZodString>;
838
+ inPlanning: z.ZodOptional<z.ZodString>;
839
+ done: z.ZodOptional<z.ZodString>;
840
+ humanReview: z.ZodOptional<z.ZodString>;
841
+ }, "strip", z.ZodTypeAny, {
842
+ readyForAgent?: string | undefined;
843
+ agentImplementing?: string | undefined;
844
+ inPlanning?: string | undefined;
845
+ done?: string | undefined;
846
+ humanReview?: string | undefined;
847
+ }, {
848
+ readyForAgent?: string | undefined;
849
+ agentImplementing?: string | undefined;
850
+ inPlanning?: string | undefined;
851
+ done?: string | undefined;
852
+ humanReview?: string | undefined;
853
+ }>>>>;
854
+ }, "strip", z.ZodTypeAny, {
855
+ states: {
856
+ readyForAgent?: string | undefined;
857
+ agentImplementing?: string | undefined;
858
+ inPlanning?: string | undefined;
859
+ done?: string | undefined;
860
+ humanReview?: string | undefined;
861
+ };
862
+ statesByTeam: Record<string, {
863
+ readyForAgent?: string | undefined;
864
+ agentImplementing?: string | undefined;
865
+ inPlanning?: string | undefined;
866
+ done?: string | undefined;
867
+ humanReview?: string | undefined;
868
+ }>;
869
+ }, {
870
+ states?: {
871
+ readyForAgent?: string | undefined;
872
+ agentImplementing?: string | undefined;
873
+ inPlanning?: string | undefined;
874
+ done?: string | undefined;
875
+ humanReview?: string | undefined;
876
+ } | undefined;
877
+ statesByTeam?: Record<string, {
878
+ readyForAgent?: string | undefined;
879
+ agentImplementing?: string | undefined;
880
+ inPlanning?: string | undefined;
881
+ done?: string | undefined;
882
+ humanReview?: string | undefined;
883
+ } | undefined> | undefined;
884
+ }>>;
885
+ stateIds: z.ZodDefault<z.ZodObject<{
886
+ readyForAgent: z.ZodOptional<z.ZodString>;
887
+ agentImplementing: z.ZodOptional<z.ZodString>;
888
+ done: z.ZodOptional<z.ZodString>;
889
+ inPlanning: z.ZodOptional<z.ZodString>;
890
+ humanReview: z.ZodOptional<z.ZodString>;
891
+ }, "strip", z.ZodTypeAny, {
892
+ readyForAgent?: string | undefined;
893
+ agentImplementing?: string | undefined;
894
+ inPlanning?: string | undefined;
895
+ done?: string | undefined;
896
+ humanReview?: string | undefined;
897
+ }, {
898
+ readyForAgent?: string | undefined;
899
+ agentImplementing?: string | undefined;
900
+ inPlanning?: string | undefined;
901
+ done?: string | undefined;
902
+ humanReview?: string | undefined;
903
+ }>>;
904
+ safety: z.ZodDefault<z.ZodObject<{
905
+ requireTitlePrefix: z.ZodDefault<z.ZodString>;
906
+ requireLabel: z.ZodDefault<z.ZodString>;
907
+ requireTeamKey: z.ZodDefault<z.ZodString>;
908
+ }, "strip", z.ZodTypeAny, {
909
+ requireTitlePrefix: string;
910
+ requireLabel: string;
911
+ requireTeamKey: string;
912
+ }, {
913
+ requireTitlePrefix?: string | undefined;
914
+ requireLabel?: string | undefined;
915
+ requireTeamKey?: string | undefined;
916
+ }>>;
917
+ } & {
918
+ workspaceId: z.ZodOptional<z.ZodString>;
919
+ capabilities: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
920
+ cloneRoot: z.ZodOptional<z.ZodString>;
921
+ clonePaths: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
922
+ dryRun: z.ZodDefault<z.ZodBoolean>;
923
+ factoryLoopHeartbeatPath: z.ZodOptional<z.ZodString>;
924
+ factoryLoopRegistryPath: z.ZodOptional<z.ZodString>;
925
+ }, "strip", z.ZodTypeAny, {
926
+ clonePaths: Record<string, string>;
927
+ triage: {
928
+ maxImplementers: number;
929
+ };
930
+ babysitter: {
931
+ enabled: boolean;
932
+ };
933
+ subscription: {
934
+ teams: string[];
935
+ projects: string[];
936
+ labels: string[];
937
+ assignees: string[];
938
+ };
939
+ liveSubscription: {
940
+ transport: "subscribe-and-poll" | "subscribe" | "poll";
941
+ pollIntervalMs: number;
942
+ eventLimit: number;
943
+ replaySkewMarginMs: number;
944
+ };
945
+ dispatch: {
946
+ errorCooldownMs: number;
947
+ maxAttempts: number;
948
+ };
949
+ loop: {
950
+ maxIterations: number;
951
+ maxConsecutiveFailures: number;
952
+ heartbeatPath: string;
953
+ registryPath: string;
954
+ heartbeatStaleMs: number;
955
+ };
956
+ repos: {
957
+ overrides: Record<string, string>;
958
+ byLabel: Record<string, string>;
959
+ byProject: Record<string, string>;
960
+ keywordRules: {
961
+ pattern: string;
962
+ repo: string;
963
+ }[];
964
+ clonePaths: Record<string, string>;
965
+ org?: string | undefined;
966
+ names?: string[] | undefined;
967
+ default?: string | undefined;
968
+ cloneRoot?: string | undefined;
969
+ };
970
+ batchSize: number;
971
+ models: {
972
+ babysitter: string;
973
+ implementer?: string | undefined;
974
+ reviewer?: string | undefined;
975
+ triage?: string | undefined;
976
+ };
977
+ mergePolicy: "never" | "on-green-with-review";
978
+ terminalState: "done" | "human-review";
979
+ linear: {
980
+ states: {
981
+ readyForAgent?: string | undefined;
982
+ agentImplementing?: string | undefined;
983
+ inPlanning?: string | undefined;
984
+ done?: string | undefined;
985
+ humanReview?: string | undefined;
986
+ };
987
+ statesByTeam: Record<string, {
988
+ readyForAgent?: string | undefined;
989
+ agentImplementing?: string | undefined;
990
+ inPlanning?: string | undefined;
991
+ done?: string | undefined;
992
+ humanReview?: string | undefined;
993
+ }>;
994
+ };
995
+ stateIds: {
996
+ readyForAgent?: string | undefined;
997
+ agentImplementing?: string | undefined;
998
+ inPlanning?: string | undefined;
999
+ done?: string | undefined;
1000
+ humanReview?: string | undefined;
1001
+ };
1002
+ safety: {
1003
+ requireTitlePrefix: string;
1004
+ requireLabel: string;
1005
+ requireTeamKey: string;
1006
+ };
1007
+ capabilities: string[];
1008
+ dryRun: boolean;
1009
+ cloneRoot?: string | undefined;
1010
+ workspaceId?: string | undefined;
1011
+ slack?: {
1012
+ channel: string;
1013
+ style: "threaded-summarized";
1014
+ botUserId: string;
1015
+ staleAfterMs: number;
1016
+ } | undefined;
1017
+ factoryLoopHeartbeatPath?: string | undefined;
1018
+ factoryLoopRegistryPath?: string | undefined;
1019
+ }, {
1020
+ repos: {
1021
+ org?: string | undefined;
1022
+ names?: string[] | undefined;
1023
+ overrides?: Record<string, string> | undefined;
1024
+ byLabel?: Record<string, string> | undefined;
1025
+ byProject?: Record<string, string> | undefined;
1026
+ keywordRules?: {
1027
+ pattern: string;
1028
+ repo: string;
1029
+ }[] | undefined;
1030
+ default?: string | undefined;
1031
+ cloneRoot?: string | undefined;
1032
+ clonePaths?: Record<string, string> | undefined;
1033
+ };
1034
+ cloneRoot?: string | undefined;
1035
+ clonePaths?: Record<string, string> | undefined;
1036
+ triage?: {
1037
+ maxImplementers?: number | undefined;
1038
+ } | undefined;
1039
+ babysitter?: {
1040
+ enabled?: boolean | undefined;
1041
+ } | undefined;
1042
+ workspaceId?: string | undefined;
1043
+ subscription?: {
1044
+ teams?: string[] | undefined;
1045
+ projects?: string[] | undefined;
1046
+ labels?: string[] | undefined;
1047
+ assignees?: string[] | undefined;
1048
+ } | undefined;
1049
+ liveSubscription?: {
1050
+ transport?: "subscribe-and-poll" | "subscribe" | "poll" | undefined;
1051
+ pollIntervalMs?: number | undefined;
1052
+ eventLimit?: number | undefined;
1053
+ replaySkewMarginMs?: number | undefined;
1054
+ } | undefined;
1055
+ dispatch?: {
1056
+ errorCooldownMs?: number | undefined;
1057
+ maxAttempts?: number | undefined;
1058
+ } | undefined;
1059
+ loop?: {
1060
+ maxIterations?: number | undefined;
1061
+ maxConsecutiveFailures?: number | undefined;
1062
+ heartbeatPath?: string | undefined;
1063
+ registryPath?: string | undefined;
1064
+ heartbeatStaleMs?: number | undefined;
1065
+ } | undefined;
1066
+ batchSize?: number | undefined;
1067
+ models?: {
1068
+ implementer?: string | undefined;
1069
+ reviewer?: string | undefined;
1070
+ triage?: string | undefined;
1071
+ babysitter?: string | undefined;
1072
+ } | undefined;
1073
+ slack?: {
1074
+ channel: string;
1075
+ style?: "threaded-summarized" | undefined;
1076
+ botUserId?: string | undefined;
1077
+ staleAfterMs?: number | undefined;
1078
+ } | undefined;
1079
+ mergePolicy?: "never" | "on-green-with-review" | undefined;
1080
+ terminalState?: "done" | "human-review" | undefined;
1081
+ linear?: {
1082
+ states?: {
1083
+ readyForAgent?: string | undefined;
1084
+ agentImplementing?: string | undefined;
1085
+ inPlanning?: string | undefined;
1086
+ done?: string | undefined;
1087
+ humanReview?: string | undefined;
1088
+ } | undefined;
1089
+ statesByTeam?: Record<string, {
1090
+ readyForAgent?: string | undefined;
1091
+ agentImplementing?: string | undefined;
1092
+ inPlanning?: string | undefined;
1093
+ done?: string | undefined;
1094
+ humanReview?: string | undefined;
1095
+ } | undefined> | undefined;
1096
+ } | undefined;
1097
+ stateIds?: {
1098
+ readyForAgent?: string | undefined;
1099
+ agentImplementing?: string | undefined;
1100
+ inPlanning?: string | undefined;
1101
+ done?: string | undefined;
1102
+ humanReview?: string | undefined;
1103
+ } | undefined;
1104
+ safety?: {
1105
+ requireTitlePrefix?: string | undefined;
1106
+ requireLabel?: string | undefined;
1107
+ requireTeamKey?: string | undefined;
1108
+ } | undefined;
1109
+ capabilities?: string[] | undefined;
1110
+ dryRun?: boolean | undefined;
1111
+ factoryLoopHeartbeatPath?: string | undefined;
1112
+ factoryLoopRegistryPath?: string | undefined;
1113
+ }>, {
1114
+ cloneRoot: string | undefined;
1115
+ clonePaths: {
1116
+ [x: string]: string;
1117
+ };
1118
+ factoryLoopHeartbeatPath: string;
1119
+ factoryLoopRegistryPath: string;
1120
+ subscription: {
1121
+ labels: string[];
1122
+ teams: string[];
1123
+ projects: string[];
1124
+ assignees: string[];
1125
+ };
1126
+ loop: {
1127
+ heartbeatPath: string;
1128
+ registryPath: string;
1129
+ maxIterations: number;
1130
+ maxConsecutiveFailures: number;
1131
+ heartbeatStaleMs: number;
1132
+ };
1133
+ repos: {
1134
+ default?: string | undefined;
1135
+ byLabel: {
1136
+ [x: string]: string;
1137
+ };
1138
+ byProject: Record<string, string>;
1139
+ keywordRules: {
1140
+ pattern: string;
1141
+ repo: string;
1142
+ }[];
1143
+ clonePaths: {
1144
+ [x: string]: string;
1145
+ };
1146
+ };
1147
+ triage: {
1148
+ maxImplementers: number;
1149
+ };
1150
+ babysitter: {
1151
+ enabled: boolean;
1152
+ };
1153
+ liveSubscription: {
1154
+ transport: "subscribe-and-poll" | "subscribe" | "poll";
1155
+ pollIntervalMs: number;
1156
+ eventLimit: number;
1157
+ replaySkewMarginMs: number;
1158
+ };
1159
+ dispatch: {
1160
+ errorCooldownMs: number;
1161
+ maxAttempts: number;
1162
+ };
1163
+ batchSize: number;
1164
+ models: {
1165
+ babysitter: string;
1166
+ implementer?: string | undefined;
1167
+ reviewer?: string | undefined;
1168
+ triage?: string | undefined;
1169
+ };
1170
+ mergePolicy: "never" | "on-green-with-review";
1171
+ terminalState: "done" | "human-review";
1172
+ linear: {
1173
+ states: {
1174
+ readyForAgent?: string | undefined;
1175
+ agentImplementing?: string | undefined;
1176
+ inPlanning?: string | undefined;
1177
+ done?: string | undefined;
1178
+ humanReview?: string | undefined;
1179
+ };
1180
+ statesByTeam: Record<string, {
1181
+ readyForAgent?: string | undefined;
1182
+ agentImplementing?: string | undefined;
1183
+ inPlanning?: string | undefined;
1184
+ done?: string | undefined;
1185
+ humanReview?: string | undefined;
1186
+ }>;
1187
+ };
1188
+ stateIds: {
1189
+ readyForAgent?: string | undefined;
1190
+ agentImplementing?: string | undefined;
1191
+ inPlanning?: string | undefined;
1192
+ done?: string | undefined;
1193
+ humanReview?: string | undefined;
1194
+ };
1195
+ safety: {
1196
+ requireTitlePrefix: string;
1197
+ requireLabel: string;
1198
+ requireTeamKey: string;
1199
+ };
1200
+ capabilities: string[];
1201
+ dryRun: boolean;
1202
+ workspaceId?: string | undefined;
1203
+ slack?: {
1204
+ channel: string;
1205
+ style: "threaded-summarized";
1206
+ botUserId: string;
1207
+ staleAfterMs: number;
1208
+ } | undefined;
1209
+ }, {
1210
+ repos: {
1211
+ org?: string | undefined;
1212
+ names?: string[] | undefined;
1213
+ overrides?: Record<string, string> | undefined;
1214
+ byLabel?: Record<string, string> | undefined;
1215
+ byProject?: Record<string, string> | undefined;
1216
+ keywordRules?: {
1217
+ pattern: string;
1218
+ repo: string;
1219
+ }[] | undefined;
1220
+ default?: string | undefined;
1221
+ cloneRoot?: string | undefined;
1222
+ clonePaths?: Record<string, string> | undefined;
1223
+ };
1224
+ cloneRoot?: string | undefined;
1225
+ clonePaths?: Record<string, string> | undefined;
1226
+ triage?: {
1227
+ maxImplementers?: number | undefined;
1228
+ } | undefined;
1229
+ babysitter?: {
1230
+ enabled?: boolean | undefined;
1231
+ } | undefined;
1232
+ workspaceId?: string | undefined;
1233
+ subscription?: {
1234
+ teams?: string[] | undefined;
1235
+ projects?: string[] | undefined;
1236
+ labels?: string[] | undefined;
1237
+ assignees?: string[] | undefined;
1238
+ } | undefined;
1239
+ liveSubscription?: {
1240
+ transport?: "subscribe-and-poll" | "subscribe" | "poll" | undefined;
1241
+ pollIntervalMs?: number | undefined;
1242
+ eventLimit?: number | undefined;
1243
+ replaySkewMarginMs?: number | undefined;
1244
+ } | undefined;
1245
+ dispatch?: {
1246
+ errorCooldownMs?: number | undefined;
1247
+ maxAttempts?: number | undefined;
1248
+ } | undefined;
1249
+ loop?: {
1250
+ maxIterations?: number | undefined;
1251
+ maxConsecutiveFailures?: number | undefined;
1252
+ heartbeatPath?: string | undefined;
1253
+ registryPath?: string | undefined;
1254
+ heartbeatStaleMs?: number | undefined;
1255
+ } | undefined;
1256
+ batchSize?: number | undefined;
1257
+ models?: {
1258
+ implementer?: string | undefined;
1259
+ reviewer?: string | undefined;
1260
+ triage?: string | undefined;
1261
+ babysitter?: string | undefined;
1262
+ } | undefined;
1263
+ slack?: {
1264
+ channel: string;
1265
+ style?: "threaded-summarized" | undefined;
1266
+ botUserId?: string | undefined;
1267
+ staleAfterMs?: number | undefined;
1268
+ } | undefined;
1269
+ mergePolicy?: "never" | "on-green-with-review" | undefined;
1270
+ terminalState?: "done" | "human-review" | undefined;
1271
+ linear?: {
1272
+ states?: {
1273
+ readyForAgent?: string | undefined;
1274
+ agentImplementing?: string | undefined;
1275
+ inPlanning?: string | undefined;
1276
+ done?: string | undefined;
1277
+ humanReview?: string | undefined;
1278
+ } | undefined;
1279
+ statesByTeam?: Record<string, {
1280
+ readyForAgent?: string | undefined;
1281
+ agentImplementing?: string | undefined;
1282
+ inPlanning?: string | undefined;
1283
+ done?: string | undefined;
1284
+ humanReview?: string | undefined;
1285
+ } | undefined> | undefined;
1286
+ } | undefined;
1287
+ stateIds?: {
1288
+ readyForAgent?: string | undefined;
1289
+ agentImplementing?: string | undefined;
1290
+ inPlanning?: string | undefined;
1291
+ done?: string | undefined;
1292
+ humanReview?: string | undefined;
1293
+ } | undefined;
1294
+ safety?: {
1295
+ requireTitlePrefix?: string | undefined;
1296
+ requireLabel?: string | undefined;
1297
+ requireTeamKey?: string | undefined;
1298
+ } | undefined;
1299
+ capabilities?: string[] | undefined;
1300
+ dryRun?: boolean | undefined;
1301
+ factoryLoopHeartbeatPath?: string | undefined;
1302
+ factoryLoopRegistryPath?: string | undefined;
1303
+ }>;
1304
+ export interface LoadedFactoryConfig {
1305
+ workspaceConfig: WorkspaceConfig;
1306
+ nodeConfig: NodeConfig;
1307
+ factoryConfig: FactoryConfig;
1308
+ }
1309
+ export declare function loadFactoryConfig(input: unknown): LoadedFactoryConfig;
1310
+ export type WorkspaceConfig = z.infer<typeof WorkspaceConfigSchema>;
1311
+ export type NodeConfig = z.infer<typeof NodeConfigSchema>;
1312
+ export type FactoryConfig = z.infer<typeof FactoryConfigSchema>;
1313
+ //# sourceMappingURL=schema.d.ts.map