@aigile/core 0.2.3 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (176) hide show
  1. package/dist/agent-config.d.ts +850 -0
  2. package/dist/agent-config.d.ts.map +1 -0
  3. package/dist/agent-config.js +111 -0
  4. package/dist/agent-config.js.map +1 -0
  5. package/dist/collections.d.ts +33 -1
  6. package/dist/collections.d.ts.map +1 -1
  7. package/dist/collections.js +33 -1
  8. package/dist/collections.js.map +1 -1
  9. package/dist/config-sections.d.ts +78 -0
  10. package/dist/config-sections.d.ts.map +1 -0
  11. package/dist/config-sections.js +42 -0
  12. package/dist/config-sections.js.map +1 -0
  13. package/dist/config.d.ts +6795 -445
  14. package/dist/config.d.ts.map +1 -1
  15. package/dist/config.js +724 -87
  16. package/dist/config.js.map +1 -1
  17. package/dist/domain/action-item.d.ts +409 -0
  18. package/dist/domain/action-item.d.ts.map +1 -0
  19. package/dist/domain/action-item.js +155 -0
  20. package/dist/domain/action-item.js.map +1 -0
  21. package/dist/domain/ai-call.d.ts +15 -11
  22. package/dist/domain/ai-call.d.ts.map +1 -1
  23. package/dist/domain/ai-call.js +2 -0
  24. package/dist/domain/ai-call.js.map +1 -1
  25. package/dist/domain/build.d.ts +47 -5
  26. package/dist/domain/build.d.ts.map +1 -1
  27. package/dist/domain/build.js +6 -0
  28. package/dist/domain/build.js.map +1 -1
  29. package/dist/domain/change-set.d.ts +216 -0
  30. package/dist/domain/change-set.d.ts.map +1 -0
  31. package/dist/domain/change-set.js +48 -0
  32. package/dist/domain/change-set.js.map +1 -0
  33. package/dist/domain/common.d.ts +6 -3
  34. package/dist/domain/common.d.ts.map +1 -1
  35. package/dist/domain/common.js +4 -1
  36. package/dist/domain/common.js.map +1 -1
  37. package/dist/domain/conflict.d.ts +8 -8
  38. package/dist/domain/conversation.d.ts +78 -8
  39. package/dist/domain/conversation.d.ts.map +1 -1
  40. package/dist/domain/conversation.js +2 -0
  41. package/dist/domain/conversation.js.map +1 -1
  42. package/dist/domain/deliverable.d.ts +235 -0
  43. package/dist/domain/deliverable.d.ts.map +1 -0
  44. package/dist/domain/deliverable.js +76 -0
  45. package/dist/domain/deliverable.js.map +1 -0
  46. package/dist/domain/index.d.ts +4 -1
  47. package/dist/domain/index.d.ts.map +1 -1
  48. package/dist/domain/index.js +4 -1
  49. package/dist/domain/index.js.map +1 -1
  50. package/dist/domain/message.d.ts +7 -7
  51. package/dist/domain/milestone.d.ts +11 -11
  52. package/dist/domain/organization.d.ts +2 -2
  53. package/dist/domain/project.d.ts +524 -3
  54. package/dist/domain/project.d.ts.map +1 -1
  55. package/dist/domain/project.js +38 -1
  56. package/dist/domain/project.js.map +1 -1
  57. package/dist/domain/question.d.ts +238 -26
  58. package/dist/domain/question.d.ts.map +1 -1
  59. package/dist/domain/question.js +49 -4
  60. package/dist/domain/question.js.map +1 -1
  61. package/dist/domain/reassignment.d.ts +23 -18
  62. package/dist/domain/reassignment.d.ts.map +1 -1
  63. package/dist/domain/reassignment.js +14 -6
  64. package/dist/domain/reassignment.js.map +1 -1
  65. package/dist/domain/reference.d.ts +595 -0
  66. package/dist/domain/reference.d.ts.map +1 -0
  67. package/dist/domain/reference.js +180 -0
  68. package/dist/domain/reference.js.map +1 -0
  69. package/dist/domain/release.d.ts +246 -10
  70. package/dist/domain/release.d.ts.map +1 -1
  71. package/dist/domain/release.js +6 -0
  72. package/dist/domain/release.js.map +1 -1
  73. package/dist/domain/review.d.ts +11 -11
  74. package/dist/domain/role-assignment.d.ts +5 -5
  75. package/dist/domain/role-assignment.js +1 -1
  76. package/dist/domain/role.d.ts +41 -6
  77. package/dist/domain/role.d.ts.map +1 -1
  78. package/dist/domain/role.js +12 -0
  79. package/dist/domain/role.js.map +1 -1
  80. package/dist/domain/spec.d.ts +197 -6
  81. package/dist/domain/spec.d.ts.map +1 -1
  82. package/dist/domain/spec.js +73 -1
  83. package/dist/domain/spec.js.map +1 -1
  84. package/dist/domain/sweep.d.ts +11 -11
  85. package/dist/domain/sweep.d.ts.map +1 -1
  86. package/dist/domain/sweep.js +1 -1
  87. package/dist/domain/sweep.js.map +1 -1
  88. package/dist/domain/track.d.ts +16 -16
  89. package/dist/domain/user.d.ts +50 -2
  90. package/dist/domain/user.d.ts.map +1 -1
  91. package/dist/domain/user.js +13 -0
  92. package/dist/domain/user.js.map +1 -1
  93. package/dist/domain/verification.d.ts +4 -4
  94. package/dist/id.d.ts +114 -0
  95. package/dist/id.d.ts.map +1 -0
  96. package/dist/id.js +204 -0
  97. package/dist/id.js.map +1 -0
  98. package/dist/ids.d.ts +0 -2
  99. package/dist/ids.d.ts.map +1 -1
  100. package/dist/ids.js +0 -5
  101. package/dist/ids.js.map +1 -1
  102. package/dist/index.d.ts +7 -0
  103. package/dist/index.d.ts.map +1 -1
  104. package/dist/index.js +7 -0
  105. package/dist/index.js.map +1 -1
  106. package/dist/jira.d.ts +26 -0
  107. package/dist/jira.d.ts.map +1 -0
  108. package/dist/jira.js +37 -0
  109. package/dist/jira.js.map +1 -0
  110. package/dist/outline.d.ts +64 -0
  111. package/dist/outline.d.ts.map +1 -0
  112. package/dist/outline.js +127 -0
  113. package/dist/outline.js.map +1 -0
  114. package/dist/plugins/action-source.d.ts +44 -0
  115. package/dist/plugins/action-source.d.ts.map +1 -0
  116. package/dist/plugins/action-source.js +2 -0
  117. package/dist/plugins/action-source.js.map +1 -0
  118. package/dist/plugins/ai.d.ts +5 -0
  119. package/dist/plugins/ai.d.ts.map +1 -1
  120. package/dist/plugins/blob-store.d.ts +36 -0
  121. package/dist/plugins/blob-store.d.ts.map +1 -0
  122. package/dist/plugins/blob-store.js +11 -0
  123. package/dist/plugins/blob-store.js.map +1 -0
  124. package/dist/plugins/datastore.d.ts +6 -0
  125. package/dist/plugins/datastore.d.ts.map +1 -1
  126. package/dist/plugins/design.d.ts +62 -0
  127. package/dist/plugins/design.d.ts.map +1 -0
  128. package/dist/plugins/design.js +2 -0
  129. package/dist/plugins/design.js.map +1 -0
  130. package/dist/plugins/git-host.d.ts +35 -0
  131. package/dist/plugins/git-host.d.ts.map +1 -0
  132. package/dist/plugins/git-host.js +2 -0
  133. package/dist/plugins/git-host.js.map +1 -0
  134. package/dist/plugins/index.d.ts +9 -0
  135. package/dist/plugins/index.d.ts.map +1 -1
  136. package/dist/plugins/index.js +9 -0
  137. package/dist/plugins/index.js.map +1 -1
  138. package/dist/plugins/registry.d.ts +360 -0
  139. package/dist/plugins/registry.d.ts.map +1 -0
  140. package/dist/plugins/registry.js +218 -0
  141. package/dist/plugins/registry.js.map +1 -0
  142. package/dist/plugins/release-gate.d.ts +53 -0
  143. package/dist/plugins/release-gate.d.ts.map +1 -0
  144. package/dist/plugins/release-gate.js +2 -0
  145. package/dist/plugins/release-gate.js.map +1 -0
  146. package/dist/plugins/spec-cache.d.ts +23 -0
  147. package/dist/plugins/spec-cache.d.ts.map +1 -0
  148. package/dist/plugins/spec-cache.js +2 -0
  149. package/dist/plugins/spec-cache.js.map +1 -0
  150. package/dist/plugins/spec-source.d.ts +177 -0
  151. package/dist/plugins/spec-source.d.ts.map +1 -0
  152. package/dist/plugins/spec-source.js +31 -0
  153. package/dist/plugins/spec-source.js.map +1 -0
  154. package/dist/plugins/test-runner.d.ts +68 -0
  155. package/dist/plugins/test-runner.d.ts.map +1 -0
  156. package/dist/plugins/test-runner.js +14 -0
  157. package/dist/plugins/test-runner.js.map +1 -0
  158. package/dist/preamble.d.ts +11 -0
  159. package/dist/preamble.d.ts.map +1 -0
  160. package/dist/preamble.js +12 -0
  161. package/dist/preamble.js.map +1 -0
  162. package/dist/prompts.d.ts +8 -0
  163. package/dist/prompts.d.ts.map +1 -0
  164. package/dist/prompts.js +13 -0
  165. package/dist/prompts.js.map +1 -0
  166. package/dist/settings.d.ts +90 -0
  167. package/dist/settings.d.ts.map +1 -0
  168. package/dist/settings.js +120 -0
  169. package/dist/settings.js.map +1 -0
  170. package/dist/template.d.ts +89 -0
  171. package/dist/template.d.ts.map +1 -0
  172. package/dist/template.js +9 -0
  173. package/dist/template.js.map +1 -0
  174. package/package.json +9 -3
  175. package/prompts/mission.md +3 -0
  176. package/prompts/preamble.md +37 -0
@@ -3,7 +3,7 @@ import { z } from 'zod';
3
3
  * A Project belongs to one Organization and may have child Projects.
4
4
  * `gitUrl` is the source repository the build agent operates on (a local path
5
5
  * works too), `gitBranch` its mainline; a project
6
- * without one groups its children (Final Draft → fd-web, fd-web-lambda, …) and
6
+ * without one groups its children (Acme → web-app, api, …) and
7
7
  * carries specs that apply to all of them, but is never built itself.
8
8
  */
9
9
  export declare const projectSchema: z.ZodObject<{
@@ -15,26 +15,547 @@ export declare const projectSchema: z.ZodObject<{
15
15
  gitUrl: z.ZodDefault<z.ZodNullable<z.ZodEffects<z.ZodString, string, string>>>;
16
16
  /** The branch the build agent branches from and the approver's push targets with a branch of its own. */
17
17
  gitBranch: z.ZodDefault<z.ZodString>;
18
+ /** The project's Jira project key ("WF"), if its work is tracked there: a template may bring its issues in as tasks (documentation/action-items.md "Action sources"). */
19
+ jiraKey: z.ZodDefault<z.ZodNullable<z.ZodString>>;
18
20
  organizationId: z.ZodString;
19
21
  parentProjectId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
22
+ /** The kind of work this project is (documentation/templates.md): its primary template, the first of `templates`. */
23
+ templateId: z.ZodDefault<z.ZodString>;
24
+ /**
25
+ * The templates applied to this project and the seats imported from each
26
+ * (`seats: null` = every seat). Empty means the primary template with every
27
+ * seat (`appliedTemplates`). A project may apply several templates; each agent
28
+ * slot is played by the first imported seat that fills it.
29
+ */
30
+ templates: z.ZodDefault<z.ZodArray<z.ZodObject<{
31
+ id: z.ZodString;
32
+ seats: z.ZodDefault<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
33
+ }, "strip", z.ZodTypeAny, {
34
+ id: string;
35
+ seats: string[] | null;
36
+ }, {
37
+ id: string;
38
+ seats?: string[] | null | undefined;
39
+ }>, "many">>;
40
+ /**
41
+ * Which role instance plays each agent seat for this project, by the seat's
42
+ * key ("engineer" → a role id). A seat not listed uses the installation's
43
+ * shared instance (the seeded role). A project points at another project's
44
+ * instance only when a person says so; a fork makes it independent again.
45
+ */
46
+ agentRoleIds: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
47
+ /** This project's overrides of the agents' configuration (checks, probes, stages, the allowlist…), over its templates' and the installation's. */
48
+ agentConfig: z.ZodDefault<z.ZodObject<{
49
+ engineer: z.ZodOptional<z.ZodObject<{
50
+ allow: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString, "many">>>;
51
+ budgetTokens: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
52
+ commandTimeoutMs: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
53
+ buildTimeoutMs: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
54
+ autoBuild: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
55
+ planGate: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
56
+ specs: z.ZodOptional<z.ZodDefault<z.ZodEnum<["inline", "index"]>>>;
57
+ }, "strip", z.ZodTypeAny, {
58
+ allow?: string[] | undefined;
59
+ budgetTokens?: number | undefined;
60
+ commandTimeoutMs?: number | undefined;
61
+ buildTimeoutMs?: number | undefined;
62
+ autoBuild?: boolean | undefined;
63
+ planGate?: boolean | undefined;
64
+ specs?: "inline" | "index" | undefined;
65
+ }, {
66
+ allow?: string[] | undefined;
67
+ budgetTokens?: number | undefined;
68
+ commandTimeoutMs?: number | undefined;
69
+ buildTimeoutMs?: number | undefined;
70
+ autoBuild?: boolean | undefined;
71
+ planGate?: boolean | undefined;
72
+ specs?: "inline" | "index" | undefined;
73
+ }>>;
74
+ sandbox: z.ZodOptional<z.ZodObject<{
75
+ runtime: z.ZodOptional<z.ZodDefault<z.ZodEnum<["auto", "host", "container"]>>>;
76
+ engine: z.ZodOptional<z.ZodDefault<z.ZodEnum<["auto", "podman", "docker"]>>>;
77
+ image: z.ZodOptional<z.ZodDefault<z.ZodString>>;
78
+ imageByProject: z.ZodOptional<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>>;
79
+ memory: z.ZodOptional<z.ZodDefault<z.ZodString>>;
80
+ cpus: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
81
+ pids: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
82
+ extraArgs: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString, "many">>>;
83
+ }, "strip", z.ZodTypeAny, {
84
+ runtime?: "auto" | "host" | "container" | undefined;
85
+ engine?: "auto" | "podman" | "docker" | undefined;
86
+ image?: string | undefined;
87
+ imageByProject?: Record<string, string> | undefined;
88
+ memory?: string | undefined;
89
+ cpus?: number | undefined;
90
+ pids?: number | undefined;
91
+ extraArgs?: string[] | undefined;
92
+ }, {
93
+ runtime?: "auto" | "host" | "container" | undefined;
94
+ engine?: "auto" | "podman" | "docker" | undefined;
95
+ image?: string | undefined;
96
+ imageByProject?: Record<string, string> | undefined;
97
+ memory?: string | undefined;
98
+ cpus?: number | undefined;
99
+ pids?: number | undefined;
100
+ extraArgs?: string[] | undefined;
101
+ }>>;
102
+ pullRequests: z.ZodOptional<z.ZodObject<{
103
+ enabled: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
104
+ }, "strip", z.ZodTypeAny, {
105
+ enabled?: boolean | undefined;
106
+ }, {
107
+ enabled?: boolean | undefined;
108
+ }>>;
109
+ verifier: z.ZodOptional<z.ZodObject<{
110
+ checks: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString, "many">>>;
111
+ checksByProject: z.ZodOptional<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString, "many">>>>;
112
+ timeoutMs: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
113
+ writeTests: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
114
+ testPaths: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString, "many">>>;
115
+ }, "strip", z.ZodTypeAny, {
116
+ checks?: string[] | undefined;
117
+ checksByProject?: Record<string, string[]> | undefined;
118
+ timeoutMs?: number | undefined;
119
+ writeTests?: boolean | undefined;
120
+ testPaths?: string[] | undefined;
121
+ }, {
122
+ checks?: string[] | undefined;
123
+ checksByProject?: Record<string, string[]> | undefined;
124
+ timeoutMs?: number | undefined;
125
+ writeTests?: boolean | undefined;
126
+ testPaths?: string[] | undefined;
127
+ }>>;
128
+ monitor: z.ZodOptional<z.ZodObject<{
129
+ probes: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodObject<{
130
+ name: z.ZodString;
131
+ command: z.ZodString;
132
+ projectId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
133
+ }, "strip", z.ZodTypeAny, {
134
+ name: string;
135
+ command: string;
136
+ projectId: string | null;
137
+ }, {
138
+ name: string;
139
+ command: string;
140
+ projectId?: string | null | undefined;
141
+ }>, "many">>>;
142
+ cadenceMinutes: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
143
+ auditDelaysMinutes: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodNumber, "many">>>;
144
+ runtime: z.ZodOptional<z.ZodDefault<z.ZodEnum<["host", "sandbox"]>>>;
145
+ timeoutMs: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
146
+ notifyUserId: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodString>>>;
147
+ }, "strip", z.ZodTypeAny, {
148
+ runtime?: "host" | "sandbox" | undefined;
149
+ timeoutMs?: number | undefined;
150
+ probes?: {
151
+ name: string;
152
+ command: string;
153
+ projectId: string | null;
154
+ }[] | undefined;
155
+ cadenceMinutes?: number | undefined;
156
+ auditDelaysMinutes?: number[] | undefined;
157
+ notifyUserId?: string | null | undefined;
158
+ }, {
159
+ runtime?: "host" | "sandbox" | undefined;
160
+ timeoutMs?: number | undefined;
161
+ probes?: {
162
+ name: string;
163
+ command: string;
164
+ projectId?: string | null | undefined;
165
+ }[] | undefined;
166
+ cadenceMinutes?: number | undefined;
167
+ auditDelaysMinutes?: number[] | undefined;
168
+ notifyUserId?: string | null | undefined;
169
+ }>>;
170
+ release: z.ZodOptional<z.ZodObject<{
171
+ environments: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodObject<{
172
+ name: z.ZodString;
173
+ deploy: z.ZodString;
174
+ verify: z.ZodDefault<z.ZodNullable<z.ZodString>>;
175
+ rollback: z.ZodDefault<z.ZodNullable<z.ZodString>>;
176
+ requiresGo: z.ZodDefault<z.ZodBoolean>;
177
+ auditAfter: z.ZodDefault<z.ZodBoolean>;
178
+ }, "strip", z.ZodTypeAny, {
179
+ name: string;
180
+ deploy: string;
181
+ verify: string | null;
182
+ rollback: string | null;
183
+ requiresGo: boolean;
184
+ auditAfter: boolean;
185
+ }, {
186
+ name: string;
187
+ deploy: string;
188
+ verify?: string | null | undefined;
189
+ rollback?: string | null | undefined;
190
+ requiresGo?: boolean | undefined;
191
+ auditAfter?: boolean | undefined;
192
+ }>, "many">>>;
193
+ runtime: z.ZodOptional<z.ZodDefault<z.ZodEnum<["host", "sandbox"]>>>;
194
+ timeoutMs: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
195
+ notifyUserId: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodString>>>;
196
+ }, "strip", z.ZodTypeAny, {
197
+ runtime?: "host" | "sandbox" | undefined;
198
+ timeoutMs?: number | undefined;
199
+ notifyUserId?: string | null | undefined;
200
+ environments?: {
201
+ name: string;
202
+ deploy: string;
203
+ verify: string | null;
204
+ rollback: string | null;
205
+ requiresGo: boolean;
206
+ auditAfter: boolean;
207
+ }[] | undefined;
208
+ }, {
209
+ runtime?: "host" | "sandbox" | undefined;
210
+ timeoutMs?: number | undefined;
211
+ notifyUserId?: string | null | undefined;
212
+ environments?: {
213
+ name: string;
214
+ deploy: string;
215
+ verify?: string | null | undefined;
216
+ rollback?: string | null | undefined;
217
+ requiresGo?: boolean | undefined;
218
+ auditAfter?: boolean | undefined;
219
+ }[] | undefined;
220
+ }>>;
221
+ schedule: z.ZodOptional<z.ZodObject<{
222
+ enabled: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
223
+ tickSeconds: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
224
+ quietSeconds: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
225
+ }, "strip", z.ZodTypeAny, {
226
+ enabled?: boolean | undefined;
227
+ tickSeconds?: number | undefined;
228
+ quietSeconds?: number | undefined;
229
+ }, {
230
+ enabled?: boolean | undefined;
231
+ tickSeconds?: number | undefined;
232
+ quietSeconds?: number | undefined;
233
+ }>>;
234
+ specAnalyst: z.ZodOptional<z.ZodObject<{
235
+ reviewChars: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
236
+ sweepChars: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
237
+ sweepDays: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
238
+ }, "strip", z.ZodTypeAny, {
239
+ reviewChars?: number | undefined;
240
+ sweepChars?: number | undefined;
241
+ sweepDays?: number | undefined;
242
+ }, {
243
+ reviewChars?: number | undefined;
244
+ sweepChars?: number | undefined;
245
+ sweepDays?: number | undefined;
246
+ }>>;
247
+ }, "strip", z.ZodTypeAny, {
248
+ sandbox?: {
249
+ runtime?: "auto" | "host" | "container" | undefined;
250
+ engine?: "auto" | "podman" | "docker" | undefined;
251
+ image?: string | undefined;
252
+ imageByProject?: Record<string, string> | undefined;
253
+ memory?: string | undefined;
254
+ cpus?: number | undefined;
255
+ pids?: number | undefined;
256
+ extraArgs?: string[] | undefined;
257
+ } | undefined;
258
+ engineer?: {
259
+ allow?: string[] | undefined;
260
+ budgetTokens?: number | undefined;
261
+ commandTimeoutMs?: number | undefined;
262
+ buildTimeoutMs?: number | undefined;
263
+ autoBuild?: boolean | undefined;
264
+ planGate?: boolean | undefined;
265
+ specs?: "inline" | "index" | undefined;
266
+ } | undefined;
267
+ pullRequests?: {
268
+ enabled?: boolean | undefined;
269
+ } | undefined;
270
+ verifier?: {
271
+ checks?: string[] | undefined;
272
+ checksByProject?: Record<string, string[]> | undefined;
273
+ timeoutMs?: number | undefined;
274
+ writeTests?: boolean | undefined;
275
+ testPaths?: string[] | undefined;
276
+ } | undefined;
277
+ monitor?: {
278
+ runtime?: "host" | "sandbox" | undefined;
279
+ timeoutMs?: number | undefined;
280
+ probes?: {
281
+ name: string;
282
+ command: string;
283
+ projectId: string | null;
284
+ }[] | undefined;
285
+ cadenceMinutes?: number | undefined;
286
+ auditDelaysMinutes?: number[] | undefined;
287
+ notifyUserId?: string | null | undefined;
288
+ } | undefined;
289
+ release?: {
290
+ runtime?: "host" | "sandbox" | undefined;
291
+ timeoutMs?: number | undefined;
292
+ notifyUserId?: string | null | undefined;
293
+ environments?: {
294
+ name: string;
295
+ deploy: string;
296
+ verify: string | null;
297
+ rollback: string | null;
298
+ requiresGo: boolean;
299
+ auditAfter: boolean;
300
+ }[] | undefined;
301
+ } | undefined;
302
+ schedule?: {
303
+ enabled?: boolean | undefined;
304
+ tickSeconds?: number | undefined;
305
+ quietSeconds?: number | undefined;
306
+ } | undefined;
307
+ specAnalyst?: {
308
+ reviewChars?: number | undefined;
309
+ sweepChars?: number | undefined;
310
+ sweepDays?: number | undefined;
311
+ } | undefined;
312
+ }, {
313
+ sandbox?: {
314
+ runtime?: "auto" | "host" | "container" | undefined;
315
+ engine?: "auto" | "podman" | "docker" | undefined;
316
+ image?: string | undefined;
317
+ imageByProject?: Record<string, string> | undefined;
318
+ memory?: string | undefined;
319
+ cpus?: number | undefined;
320
+ pids?: number | undefined;
321
+ extraArgs?: string[] | undefined;
322
+ } | undefined;
323
+ engineer?: {
324
+ allow?: string[] | undefined;
325
+ budgetTokens?: number | undefined;
326
+ commandTimeoutMs?: number | undefined;
327
+ buildTimeoutMs?: number | undefined;
328
+ autoBuild?: boolean | undefined;
329
+ planGate?: boolean | undefined;
330
+ specs?: "inline" | "index" | undefined;
331
+ } | undefined;
332
+ pullRequests?: {
333
+ enabled?: boolean | undefined;
334
+ } | undefined;
335
+ verifier?: {
336
+ checks?: string[] | undefined;
337
+ checksByProject?: Record<string, string[]> | undefined;
338
+ timeoutMs?: number | undefined;
339
+ writeTests?: boolean | undefined;
340
+ testPaths?: string[] | undefined;
341
+ } | undefined;
342
+ monitor?: {
343
+ runtime?: "host" | "sandbox" | undefined;
344
+ timeoutMs?: number | undefined;
345
+ probes?: {
346
+ name: string;
347
+ command: string;
348
+ projectId?: string | null | undefined;
349
+ }[] | undefined;
350
+ cadenceMinutes?: number | undefined;
351
+ auditDelaysMinutes?: number[] | undefined;
352
+ notifyUserId?: string | null | undefined;
353
+ } | undefined;
354
+ release?: {
355
+ runtime?: "host" | "sandbox" | undefined;
356
+ timeoutMs?: number | undefined;
357
+ notifyUserId?: string | null | undefined;
358
+ environments?: {
359
+ name: string;
360
+ deploy: string;
361
+ verify?: string | null | undefined;
362
+ rollback?: string | null | undefined;
363
+ requiresGo?: boolean | undefined;
364
+ auditAfter?: boolean | undefined;
365
+ }[] | undefined;
366
+ } | undefined;
367
+ schedule?: {
368
+ enabled?: boolean | undefined;
369
+ tickSeconds?: number | undefined;
370
+ quietSeconds?: number | undefined;
371
+ } | undefined;
372
+ specAnalyst?: {
373
+ reviewChars?: number | undefined;
374
+ sweepChars?: number | undefined;
375
+ sweepDays?: number | undefined;
376
+ } | undefined;
377
+ }>>;
378
+ /** Its deliverables: `one` builds the top open one, then the next; `selected` builds the ones marked active, several at once. */
379
+ deliverableMode: z.ZodDefault<z.ZodEnum<["one", "selected"]>>;
380
+ /**
381
+ * The software template's (documentation/tests.md): its repository holds the
382
+ * automated tests testers' test cases become; `templateSettings.software.projectId`
383
+ * overrides. Kept on the platform's record so stored projects need no migration.
384
+ */
385
+ holdsTests: z.ZodDefault<z.ZodBoolean>;
20
386
  }, "strip", z.ZodTypeAny, {
21
387
  name: string;
22
388
  id: string;
23
- createdAt: string;
24
389
  updatedAt: string;
390
+ templates: {
391
+ id: string;
392
+ seats: string[] | null;
393
+ }[];
394
+ createdAt: string;
25
395
  gitUrl: string | null;
26
396
  gitBranch: string;
397
+ jiraKey: string | null;
27
398
  organizationId: string;
28
399
  parentProjectId: string | null;
400
+ templateId: string;
401
+ agentRoleIds: Record<string, string>;
402
+ agentConfig: {
403
+ sandbox?: {
404
+ runtime?: "auto" | "host" | "container" | undefined;
405
+ engine?: "auto" | "podman" | "docker" | undefined;
406
+ image?: string | undefined;
407
+ imageByProject?: Record<string, string> | undefined;
408
+ memory?: string | undefined;
409
+ cpus?: number | undefined;
410
+ pids?: number | undefined;
411
+ extraArgs?: string[] | undefined;
412
+ } | undefined;
413
+ engineer?: {
414
+ allow?: string[] | undefined;
415
+ budgetTokens?: number | undefined;
416
+ commandTimeoutMs?: number | undefined;
417
+ buildTimeoutMs?: number | undefined;
418
+ autoBuild?: boolean | undefined;
419
+ planGate?: boolean | undefined;
420
+ specs?: "inline" | "index" | undefined;
421
+ } | undefined;
422
+ pullRequests?: {
423
+ enabled?: boolean | undefined;
424
+ } | undefined;
425
+ verifier?: {
426
+ checks?: string[] | undefined;
427
+ checksByProject?: Record<string, string[]> | undefined;
428
+ timeoutMs?: number | undefined;
429
+ writeTests?: boolean | undefined;
430
+ testPaths?: string[] | undefined;
431
+ } | undefined;
432
+ monitor?: {
433
+ runtime?: "host" | "sandbox" | undefined;
434
+ timeoutMs?: number | undefined;
435
+ probes?: {
436
+ name: string;
437
+ command: string;
438
+ projectId: string | null;
439
+ }[] | undefined;
440
+ cadenceMinutes?: number | undefined;
441
+ auditDelaysMinutes?: number[] | undefined;
442
+ notifyUserId?: string | null | undefined;
443
+ } | undefined;
444
+ release?: {
445
+ runtime?: "host" | "sandbox" | undefined;
446
+ timeoutMs?: number | undefined;
447
+ notifyUserId?: string | null | undefined;
448
+ environments?: {
449
+ name: string;
450
+ deploy: string;
451
+ verify: string | null;
452
+ rollback: string | null;
453
+ requiresGo: boolean;
454
+ auditAfter: boolean;
455
+ }[] | undefined;
456
+ } | undefined;
457
+ schedule?: {
458
+ enabled?: boolean | undefined;
459
+ tickSeconds?: number | undefined;
460
+ quietSeconds?: number | undefined;
461
+ } | undefined;
462
+ specAnalyst?: {
463
+ reviewChars?: number | undefined;
464
+ sweepChars?: number | undefined;
465
+ sweepDays?: number | undefined;
466
+ } | undefined;
467
+ };
468
+ deliverableMode: "one" | "selected";
469
+ holdsTests: boolean;
29
470
  }, {
30
471
  name: string;
31
472
  id: string;
32
- createdAt: string;
33
473
  updatedAt: string;
474
+ createdAt: string;
34
475
  organizationId: string;
476
+ templates?: {
477
+ id: string;
478
+ seats?: string[] | null | undefined;
479
+ }[] | undefined;
35
480
  gitUrl?: string | null | undefined;
36
481
  gitBranch?: string | undefined;
482
+ jiraKey?: string | null | undefined;
37
483
  parentProjectId?: string | null | undefined;
484
+ templateId?: string | undefined;
485
+ agentRoleIds?: Record<string, string> | undefined;
486
+ agentConfig?: {
487
+ sandbox?: {
488
+ runtime?: "auto" | "host" | "container" | undefined;
489
+ engine?: "auto" | "podman" | "docker" | undefined;
490
+ image?: string | undefined;
491
+ imageByProject?: Record<string, string> | undefined;
492
+ memory?: string | undefined;
493
+ cpus?: number | undefined;
494
+ pids?: number | undefined;
495
+ extraArgs?: string[] | undefined;
496
+ } | undefined;
497
+ engineer?: {
498
+ allow?: string[] | undefined;
499
+ budgetTokens?: number | undefined;
500
+ commandTimeoutMs?: number | undefined;
501
+ buildTimeoutMs?: number | undefined;
502
+ autoBuild?: boolean | undefined;
503
+ planGate?: boolean | undefined;
504
+ specs?: "inline" | "index" | undefined;
505
+ } | undefined;
506
+ pullRequests?: {
507
+ enabled?: boolean | undefined;
508
+ } | undefined;
509
+ verifier?: {
510
+ checks?: string[] | undefined;
511
+ checksByProject?: Record<string, string[]> | undefined;
512
+ timeoutMs?: number | undefined;
513
+ writeTests?: boolean | undefined;
514
+ testPaths?: string[] | undefined;
515
+ } | undefined;
516
+ monitor?: {
517
+ runtime?: "host" | "sandbox" | undefined;
518
+ timeoutMs?: number | undefined;
519
+ probes?: {
520
+ name: string;
521
+ command: string;
522
+ projectId?: string | null | undefined;
523
+ }[] | undefined;
524
+ cadenceMinutes?: number | undefined;
525
+ auditDelaysMinutes?: number[] | undefined;
526
+ notifyUserId?: string | null | undefined;
527
+ } | undefined;
528
+ release?: {
529
+ runtime?: "host" | "sandbox" | undefined;
530
+ timeoutMs?: number | undefined;
531
+ notifyUserId?: string | null | undefined;
532
+ environments?: {
533
+ name: string;
534
+ deploy: string;
535
+ verify?: string | null | undefined;
536
+ rollback?: string | null | undefined;
537
+ requiresGo?: boolean | undefined;
538
+ auditAfter?: boolean | undefined;
539
+ }[] | undefined;
540
+ } | undefined;
541
+ schedule?: {
542
+ enabled?: boolean | undefined;
543
+ tickSeconds?: number | undefined;
544
+ quietSeconds?: number | undefined;
545
+ } | undefined;
546
+ specAnalyst?: {
547
+ reviewChars?: number | undefined;
548
+ sweepChars?: number | undefined;
549
+ sweepDays?: number | undefined;
550
+ } | undefined;
551
+ } | undefined;
552
+ deliverableMode?: "one" | "selected" | undefined;
553
+ holdsTests?: boolean | undefined;
38
554
  }>;
39
555
  export type Project = z.infer<typeof projectSchema>;
556
+ /** The templates a project applies, with the seats imported from each: `templates` when set, else the primary template with every seat. */
557
+ export declare function appliedTemplates(project: Pick<Project, 'templateId' | 'templates'>): Array<{
558
+ id: string;
559
+ seats: string[] | null;
560
+ }>;
40
561
  //# sourceMappingURL=project.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"project.d.ts","sourceRoot":"","sources":["../../src/domain/project.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB;;;;;;GAMG;AACH,eAAO,MAAM,aAAa;;;;;;;IAQxB,yGAAyG;;;;;;;;;;;;;;;;;;;;;;EAIzG,CAAC;AACH,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC"}
1
+ {"version":3,"file":"project.d.ts","sourceRoot":"","sources":["../../src/domain/project.ts"],"names":[],"mappings":"AAA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  import { baseEntitySchema, idSchema } from './common.js';
3
4
  /**
4
5
  * A Project belongs to one Organization and may have child Projects.
5
6
  * `gitUrl` is the source repository the build agent operates on (a local path
6
7
  * works too), `gitBranch` its mainline; a project
7
- * without one groups its children (Final Draft → fd-web, fd-web-lambda, …) and
8
+ * without one groups its children (Acme → web-app, api, …) and
8
9
  * carries specs that apply to all of them, but is never built itself.
9
10
  */
10
11
  export const projectSchema = baseEntitySchema.extend({
@@ -17,7 +18,43 @@ export const projectSchema = baseEntitySchema.extend({
17
18
  .default(null),
18
19
  /** The branch the build agent branches from and the approver's push targets with a branch of its own. */
19
20
  gitBranch: z.string().min(1).default('main'),
21
+ /** The project's Jira project key ("WF"), if its work is tracked there: a template may bring its issues in as tasks (documentation/action-items.md "Action sources"). */
22
+ jiraKey: z
23
+ .string()
24
+ .regex(/^[A-Z][A-Z0-9_]+$/, 'a Jira project key, e.g. WF')
25
+ .nullable()
26
+ .default(null),
20
27
  organizationId: idSchema,
21
28
  parentProjectId: idSchema.nullable().default(null),
29
+ /** The kind of work this project is (documentation/templates.md): its primary template, the first of `templates`. */
30
+ templateId: z.string().min(1).default('software'),
31
+ /**
32
+ * The templates applied to this project and the seats imported from each
33
+ * (`seats: null` = every seat). Empty means the primary template with every
34
+ * seat (`appliedTemplates`). A project may apply several templates; each agent
35
+ * slot is played by the first imported seat that fills it.
36
+ */
37
+ templates: z.array(z.object({ id: z.string().min(1), seats: z.array(z.string()).nullable().default(null) })).default([]),
38
+ /**
39
+ * Which role instance plays each agent seat for this project, by the seat's
40
+ * key ("engineer" → a role id). A seat not listed uses the installation's
41
+ * shared instance (the seeded role). A project points at another project's
42
+ * instance only when a person says so; a fork makes it independent again.
43
+ */
44
+ agentRoleIds: z.record(z.string(), z.string()).default({}),
45
+ /** This project's overrides of the agents' configuration (checks, probes, stages, the allowlist…), over its templates' and the installation's. */
46
+ agentConfig: agentsOverrideSchema.default({}),
47
+ /** Its deliverables: `one` builds the top open one, then the next; `selected` builds the ones marked active, several at once. */
48
+ deliverableMode: z.enum(['one', 'selected']).default('one'),
49
+ /**
50
+ * The software template's (documentation/tests.md): its repository holds the
51
+ * automated tests testers' test cases become; `templateSettings.software.projectId`
52
+ * overrides. Kept on the platform's record so stored projects need no migration.
53
+ */
54
+ holdsTests: z.boolean().default(false),
22
55
  });
56
+ /** The templates a project applies, with the seats imported from each: `templates` when set, else the primary template with every seat. */
57
+ export function appliedTemplates(project) {
58
+ return project.templates.length > 0 ? project.templates : [{ id: project.templateId, seats: null }];
59
+ }
23
60
  //# sourceMappingURL=project.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"project.js","sourceRoot":"","sources":["../../src/domain/project.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEzD;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,gBAAgB,CAAC,MAAM,CAAC;IACnD,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACvB,MAAM,EAAE,CAAC;SACN,MAAM,EAAE;SACR,GAAG,CAAC,CAAC,CAAC;SACN,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,0BAA0B,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,oBAAoB,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,mEAAmE,CAAC;SAC3K,QAAQ,EAAE;SACV,OAAO,CAAC,IAAI,CAAC;IAChB,yGAAyG;IACzG,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC;IAC5C,cAAc,EAAE,QAAQ;IACxB,eAAe,EAAE,QAAQ,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC;CACnD,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