@aifabrix/builder 2.56.0 → 2.57.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/agent-kit/session-report.js +76 -0
- package/lib/agent-kit/start.js +124 -57
- package/lib/agent-kit/tmux-sessions.js +163 -0
- package/lib/api/environments.api.js +38 -0
- package/lib/api/marketplace-bootstrap.api.js +31 -0
- package/lib/cli/setup-environment.js +76 -19
- package/lib/commands/agent-kit-help.js +32 -15
- package/lib/commands/agent-kit.js +90 -8
- package/lib/deployment/installation/azure-infra-stage.js +160 -0
- package/lib/deployment/installation/azure-preflight.js +102 -0
- package/lib/deployment/installation/azure-readiness.js +71 -0
- package/lib/deployment/installation/docker-register.js +112 -0
- package/lib/deployment/installation/environment-auth.js +76 -0
- package/lib/deployment/installation/environment-manifest.js +165 -0
- package/lib/deployment/installation/environment-stage.js +191 -0
- package/lib/deployment/installation/index.js +39 -0
- package/lib/deployment/installation/infra-catalog.js +165 -0
- package/lib/deployment/installation/infra-manifest.js +161 -0
- package/lib/deployment/installation/infra-projection.js +86 -0
- package/lib/deployment/installation/public-ip.js +65 -0
- package/lib/deployment/installation/stage-input.js +169 -0
- package/lib/deployment/installation/stage-output.js +53 -0
- package/lib/deployment/installation/workspace-env.js +76 -0
- package/lib/deployment/installation/workspace-files.js +178 -0
- package/lib/deployment/installation/workspace-schema.js +40 -0
- package/lib/deployment/installation/workspace-secrets.js +66 -0
- package/lib/deployment/installation/workspace.js +128 -0
- package/lib/deployment/marketplace-environment.js +305 -0
- package/lib/generator/builders.js +4 -0
- package/lib/generator/helpers.js +55 -56
- package/lib/generator/split-variables.js +11 -5
- package/lib/internal/fs-real-sync.js +29 -0
- package/lib/role-assistant/package-validate.js +4 -0
- package/lib/role-assistant/test-runner-clarification-resubmit.js +149 -0
- package/lib/role-assistant/test-runner.js +14 -17
- package/lib/schema/application-schema.json +20 -2
- package/lib/schema/infra-parameter.schema.json +7 -0
- package/lib/schema/infra.parameter.yaml +26 -36
- package/lib/schema/infrastructure-schema.json +1480 -399
- package/lib/schema/installation-environment.schema.json +601 -0
- package/lib/utils/variable-transformer.js +3 -0
- package/lib/validation/required-variables.js +41 -0
- package/lib/validation/validator.js +8 -5
- package/package.json +5 -1
- package/templates/README.md +4 -0
- package/templates/agent-kit/instructions/AGENTKIT.md +6 -6
- package/templates/agent-kit/skills/shared/hosts.md +10 -10
- package/templates/applications/dataplane/application.yaml +1 -1
- package/templates/applications/dataplane/env.template +1 -1
- package/templates/applications/miso-controller/application.yaml +3 -2
- package/templates/applications/miso-controller/env.template +15 -6
- package/templates/marketplace/createUiDefinition.json +77 -0
- package/templates/marketplace/install.parameters.example.json +9 -0
- package/templates/marketplace/main.json +4087 -0
|
@@ -0,0 +1,601 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://raw.githubusercontent.com/esystemsdev/aifabrix-builder/refs/heads/main/lib/schema/installation-environment.schema.json",
|
|
4
|
+
"title": "AI Fabrix Installation Environment File",
|
|
5
|
+
"description": "Committed, non-secret infrastructure/<resource-group>/environment-dev|tst|pro.json. Inherited shared values name environment-infra.json as their source; request is the exact non-secret Miso deploy projection.",
|
|
6
|
+
"metadata": {
|
|
7
|
+
"key": "installation-environment-schema",
|
|
8
|
+
"name": "Installation Environment File Schema",
|
|
9
|
+
"description": "JSON schema for installation workspace environment-dev.json, environment-tst.json and environment-pro.json",
|
|
10
|
+
"version": "2.0.0",
|
|
11
|
+
"type": "schema",
|
|
12
|
+
"category": "infrastructure",
|
|
13
|
+
"author": "AI Fabrix Team",
|
|
14
|
+
"createdAt": "2026-09-16T00:00:00Z",
|
|
15
|
+
"updatedAt": "2026-09-16T00:00:00Z",
|
|
16
|
+
"compatibility": {
|
|
17
|
+
"minVersion": "2.0.0",
|
|
18
|
+
"maxVersion": "2.0.0",
|
|
19
|
+
"deprecated": false
|
|
20
|
+
},
|
|
21
|
+
"tags": [
|
|
22
|
+
"schema",
|
|
23
|
+
"environment",
|
|
24
|
+
"installation"
|
|
25
|
+
],
|
|
26
|
+
"dependencies": [
|
|
27
|
+
"environment-deploy-request.schema.json"
|
|
28
|
+
],
|
|
29
|
+
"changelog": [
|
|
30
|
+
{
|
|
31
|
+
"version": "2.0.0",
|
|
32
|
+
"date": "2026-09-16T00:00:00Z",
|
|
33
|
+
"breaking": false,
|
|
34
|
+
"changes": [
|
|
35
|
+
"Initial installation environment file schema"
|
|
36
|
+
]
|
|
37
|
+
}
|
|
38
|
+
]
|
|
39
|
+
},
|
|
40
|
+
"type": "object",
|
|
41
|
+
"additionalProperties": false,
|
|
42
|
+
"required": [
|
|
43
|
+
"schemaVersion",
|
|
44
|
+
"environment",
|
|
45
|
+
"name",
|
|
46
|
+
"preset",
|
|
47
|
+
"controllerUrl",
|
|
48
|
+
"serviceName",
|
|
49
|
+
"location",
|
|
50
|
+
"subscriptionId",
|
|
51
|
+
"resourceGroupName",
|
|
52
|
+
"networking",
|
|
53
|
+
"allowedIPs",
|
|
54
|
+
"infrastructureAccess",
|
|
55
|
+
"applications",
|
|
56
|
+
"variables",
|
|
57
|
+
"request",
|
|
58
|
+
"deployment"
|
|
59
|
+
],
|
|
60
|
+
"properties": {
|
|
61
|
+
"schemaVersion": {
|
|
62
|
+
"const": "2.0.0"
|
|
63
|
+
},
|
|
64
|
+
"environment": {
|
|
65
|
+
"type": "object",
|
|
66
|
+
"required": [
|
|
67
|
+
"value",
|
|
68
|
+
"source",
|
|
69
|
+
"description"
|
|
70
|
+
],
|
|
71
|
+
"additionalProperties": false,
|
|
72
|
+
"properties": {
|
|
73
|
+
"value": {
|
|
74
|
+
"enum": [
|
|
75
|
+
"dev",
|
|
76
|
+
"tst",
|
|
77
|
+
"pro"
|
|
78
|
+
]
|
|
79
|
+
},
|
|
80
|
+
"source": {
|
|
81
|
+
"type": "string",
|
|
82
|
+
"minLength": 1
|
|
83
|
+
},
|
|
84
|
+
"description": {
|
|
85
|
+
"type": "string",
|
|
86
|
+
"minLength": 1
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
"name": {
|
|
91
|
+
"type": "object",
|
|
92
|
+
"required": [
|
|
93
|
+
"value",
|
|
94
|
+
"source",
|
|
95
|
+
"description"
|
|
96
|
+
],
|
|
97
|
+
"additionalProperties": false,
|
|
98
|
+
"properties": {
|
|
99
|
+
"value": {
|
|
100
|
+
"type": "string",
|
|
101
|
+
"minLength": 1
|
|
102
|
+
},
|
|
103
|
+
"source": {
|
|
104
|
+
"type": "string",
|
|
105
|
+
"minLength": 1
|
|
106
|
+
},
|
|
107
|
+
"description": {
|
|
108
|
+
"type": "string",
|
|
109
|
+
"minLength": 1
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
"preset": {
|
|
114
|
+
"type": "object",
|
|
115
|
+
"required": [
|
|
116
|
+
"value",
|
|
117
|
+
"source",
|
|
118
|
+
"description"
|
|
119
|
+
],
|
|
120
|
+
"additionalProperties": false,
|
|
121
|
+
"properties": {
|
|
122
|
+
"value": {
|
|
123
|
+
"enum": [
|
|
124
|
+
"s",
|
|
125
|
+
"m",
|
|
126
|
+
"l",
|
|
127
|
+
"xl"
|
|
128
|
+
]
|
|
129
|
+
},
|
|
130
|
+
"source": {
|
|
131
|
+
"type": "string",
|
|
132
|
+
"minLength": 1
|
|
133
|
+
},
|
|
134
|
+
"description": {
|
|
135
|
+
"type": "string",
|
|
136
|
+
"minLength": 1
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
},
|
|
140
|
+
"controllerUrl": {
|
|
141
|
+
"type": "object",
|
|
142
|
+
"required": [
|
|
143
|
+
"value",
|
|
144
|
+
"source",
|
|
145
|
+
"description"
|
|
146
|
+
],
|
|
147
|
+
"additionalProperties": false,
|
|
148
|
+
"properties": {
|
|
149
|
+
"value": {
|
|
150
|
+
"type": [
|
|
151
|
+
"string",
|
|
152
|
+
"null"
|
|
153
|
+
],
|
|
154
|
+
"pattern": "^https://"
|
|
155
|
+
},
|
|
156
|
+
"source": {
|
|
157
|
+
"type": "string",
|
|
158
|
+
"minLength": 1
|
|
159
|
+
},
|
|
160
|
+
"description": {
|
|
161
|
+
"type": "string",
|
|
162
|
+
"minLength": 1
|
|
163
|
+
},
|
|
164
|
+
"valueFromEnv": {
|
|
165
|
+
"const": "CONTROLLER_URL"
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
"serviceName": {
|
|
170
|
+
"type": "object",
|
|
171
|
+
"required": [
|
|
172
|
+
"source",
|
|
173
|
+
"description"
|
|
174
|
+
],
|
|
175
|
+
"additionalProperties": false,
|
|
176
|
+
"anyOf": [
|
|
177
|
+
{
|
|
178
|
+
"required": [
|
|
179
|
+
"value"
|
|
180
|
+
]
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
"required": [
|
|
184
|
+
"inheritFrom"
|
|
185
|
+
]
|
|
186
|
+
}
|
|
187
|
+
],
|
|
188
|
+
"properties": {
|
|
189
|
+
"value": {
|
|
190
|
+
"type": "string",
|
|
191
|
+
"pattern": "^[a-z0-9-]{2,40}$"
|
|
192
|
+
},
|
|
193
|
+
"inheritFrom": {
|
|
194
|
+
"type": "string",
|
|
195
|
+
"pattern": "^[A-Za-z]+(\\.[A-Za-z]+)*$"
|
|
196
|
+
},
|
|
197
|
+
"source": {
|
|
198
|
+
"type": "string",
|
|
199
|
+
"minLength": 1
|
|
200
|
+
},
|
|
201
|
+
"description": {
|
|
202
|
+
"type": "string",
|
|
203
|
+
"minLength": 1
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
},
|
|
207
|
+
"location": {
|
|
208
|
+
"type": "object",
|
|
209
|
+
"required": [
|
|
210
|
+
"source",
|
|
211
|
+
"description"
|
|
212
|
+
],
|
|
213
|
+
"additionalProperties": false,
|
|
214
|
+
"anyOf": [
|
|
215
|
+
{
|
|
216
|
+
"required": [
|
|
217
|
+
"value"
|
|
218
|
+
]
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
"required": [
|
|
222
|
+
"inheritFrom"
|
|
223
|
+
]
|
|
224
|
+
}
|
|
225
|
+
],
|
|
226
|
+
"properties": {
|
|
227
|
+
"value": {
|
|
228
|
+
"type": "string",
|
|
229
|
+
"pattern": "^[a-z0-9]+$"
|
|
230
|
+
},
|
|
231
|
+
"inheritFrom": {
|
|
232
|
+
"type": "string",
|
|
233
|
+
"pattern": "^[A-Za-z]+(\\.[A-Za-z]+)*$"
|
|
234
|
+
},
|
|
235
|
+
"source": {
|
|
236
|
+
"type": "string",
|
|
237
|
+
"minLength": 1
|
|
238
|
+
},
|
|
239
|
+
"description": {
|
|
240
|
+
"type": "string",
|
|
241
|
+
"minLength": 1
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
},
|
|
245
|
+
"subscriptionId": {
|
|
246
|
+
"type": "object",
|
|
247
|
+
"required": [
|
|
248
|
+
"source",
|
|
249
|
+
"description"
|
|
250
|
+
],
|
|
251
|
+
"additionalProperties": false,
|
|
252
|
+
"anyOf": [
|
|
253
|
+
{
|
|
254
|
+
"required": [
|
|
255
|
+
"value"
|
|
256
|
+
]
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
"required": [
|
|
260
|
+
"inheritFrom"
|
|
261
|
+
]
|
|
262
|
+
}
|
|
263
|
+
],
|
|
264
|
+
"properties": {
|
|
265
|
+
"value": {
|
|
266
|
+
"type": "string",
|
|
267
|
+
"pattern": "^[0-9a-fA-F-]{36}$"
|
|
268
|
+
},
|
|
269
|
+
"inheritFrom": {
|
|
270
|
+
"type": "string",
|
|
271
|
+
"pattern": "^[A-Za-z]+(\\.[A-Za-z]+)*$"
|
|
272
|
+
},
|
|
273
|
+
"source": {
|
|
274
|
+
"type": "string",
|
|
275
|
+
"minLength": 1
|
|
276
|
+
},
|
|
277
|
+
"description": {
|
|
278
|
+
"type": "string",
|
|
279
|
+
"minLength": 1
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
},
|
|
283
|
+
"resourceGroupName": {
|
|
284
|
+
"type": "object",
|
|
285
|
+
"required": [
|
|
286
|
+
"value",
|
|
287
|
+
"source",
|
|
288
|
+
"description"
|
|
289
|
+
],
|
|
290
|
+
"additionalProperties": false,
|
|
291
|
+
"properties": {
|
|
292
|
+
"value": {
|
|
293
|
+
"type": [
|
|
294
|
+
"string",
|
|
295
|
+
"null"
|
|
296
|
+
],
|
|
297
|
+
"pattern": "^[a-zA-Z0-9._()-]{1,90}$"
|
|
298
|
+
},
|
|
299
|
+
"source": {
|
|
300
|
+
"type": "string",
|
|
301
|
+
"minLength": 1
|
|
302
|
+
},
|
|
303
|
+
"description": {
|
|
304
|
+
"type": "string",
|
|
305
|
+
"minLength": 1
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
},
|
|
309
|
+
"networking": {
|
|
310
|
+
"type": "object",
|
|
311
|
+
"required": [
|
|
312
|
+
"value",
|
|
313
|
+
"source",
|
|
314
|
+
"description"
|
|
315
|
+
],
|
|
316
|
+
"additionalProperties": false,
|
|
317
|
+
"properties": {
|
|
318
|
+
"value": {
|
|
319
|
+
"type": "object"
|
|
320
|
+
},
|
|
321
|
+
"source": {
|
|
322
|
+
"type": "string",
|
|
323
|
+
"minLength": 1
|
|
324
|
+
},
|
|
325
|
+
"description": {
|
|
326
|
+
"type": "string",
|
|
327
|
+
"minLength": 1
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
},
|
|
331
|
+
"allowedIPs": {
|
|
332
|
+
"type": "object",
|
|
333
|
+
"required": [
|
|
334
|
+
"value",
|
|
335
|
+
"source",
|
|
336
|
+
"description"
|
|
337
|
+
],
|
|
338
|
+
"additionalProperties": false,
|
|
339
|
+
"properties": {
|
|
340
|
+
"value": {
|
|
341
|
+
"type": "array",
|
|
342
|
+
"items": {
|
|
343
|
+
"type": "string"
|
|
344
|
+
}
|
|
345
|
+
},
|
|
346
|
+
"source": {
|
|
347
|
+
"type": "string",
|
|
348
|
+
"minLength": 1
|
|
349
|
+
},
|
|
350
|
+
"description": {
|
|
351
|
+
"type": "string",
|
|
352
|
+
"minLength": 1
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
},
|
|
356
|
+
"infrastructureAccess": {
|
|
357
|
+
"type": "object",
|
|
358
|
+
"required": [
|
|
359
|
+
"value",
|
|
360
|
+
"source",
|
|
361
|
+
"description"
|
|
362
|
+
],
|
|
363
|
+
"additionalProperties": false,
|
|
364
|
+
"properties": {
|
|
365
|
+
"value": {
|
|
366
|
+
"type": "array",
|
|
367
|
+
"items": {
|
|
368
|
+
"type": "object"
|
|
369
|
+
}
|
|
370
|
+
},
|
|
371
|
+
"source": {
|
|
372
|
+
"type": "string",
|
|
373
|
+
"minLength": 1
|
|
374
|
+
},
|
|
375
|
+
"description": {
|
|
376
|
+
"type": "string",
|
|
377
|
+
"minLength": 1
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
},
|
|
381
|
+
"applications": {
|
|
382
|
+
"type": "object",
|
|
383
|
+
"required": [
|
|
384
|
+
"value",
|
|
385
|
+
"source",
|
|
386
|
+
"description"
|
|
387
|
+
],
|
|
388
|
+
"additionalProperties": false,
|
|
389
|
+
"properties": {
|
|
390
|
+
"value": {
|
|
391
|
+
"type": "array",
|
|
392
|
+
"uniqueItems": true,
|
|
393
|
+
"items": {
|
|
394
|
+
"type": "string",
|
|
395
|
+
"pattern": "^[a-z0-9-]+$"
|
|
396
|
+
}
|
|
397
|
+
},
|
|
398
|
+
"source": {
|
|
399
|
+
"type": "string",
|
|
400
|
+
"minLength": 1
|
|
401
|
+
},
|
|
402
|
+
"description": {
|
|
403
|
+
"type": "string",
|
|
404
|
+
"minLength": 1
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
},
|
|
408
|
+
"variables": {
|
|
409
|
+
"type": "object",
|
|
410
|
+
"additionalProperties": false,
|
|
411
|
+
"patternProperties": {
|
|
412
|
+
"^[A-Z_][A-Z0-9_]*$": {
|
|
413
|
+
"type": "object",
|
|
414
|
+
"required": [
|
|
415
|
+
"valueFromEnv",
|
|
416
|
+
"requiredBy",
|
|
417
|
+
"source",
|
|
418
|
+
"description"
|
|
419
|
+
],
|
|
420
|
+
"additionalProperties": false,
|
|
421
|
+
"properties": {
|
|
422
|
+
"valueFromEnv": {
|
|
423
|
+
"type": "string",
|
|
424
|
+
"pattern": "^[A-Z_][A-Z0-9_]*$"
|
|
425
|
+
},
|
|
426
|
+
"requiredBy": {
|
|
427
|
+
"type": "array",
|
|
428
|
+
"uniqueItems": true,
|
|
429
|
+
"items": {
|
|
430
|
+
"type": "string"
|
|
431
|
+
}
|
|
432
|
+
},
|
|
433
|
+
"source": {
|
|
434
|
+
"type": "string",
|
|
435
|
+
"minLength": 1
|
|
436
|
+
},
|
|
437
|
+
"description": {
|
|
438
|
+
"type": "string",
|
|
439
|
+
"minLength": 1
|
|
440
|
+
},
|
|
441
|
+
"resolution": {
|
|
442
|
+
"enum": [
|
|
443
|
+
"resolved",
|
|
444
|
+
"missing"
|
|
445
|
+
]
|
|
446
|
+
}
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
}
|
|
450
|
+
},
|
|
451
|
+
"request": {
|
|
452
|
+
"type": "object",
|
|
453
|
+
"required": [
|
|
454
|
+
"value",
|
|
455
|
+
"source",
|
|
456
|
+
"description"
|
|
457
|
+
],
|
|
458
|
+
"additionalProperties": false,
|
|
459
|
+
"properties": {
|
|
460
|
+
"value": {
|
|
461
|
+
"anyOf": [
|
|
462
|
+
{
|
|
463
|
+
"type": "null"
|
|
464
|
+
},
|
|
465
|
+
{
|
|
466
|
+
"type": "object",
|
|
467
|
+
"required": [
|
|
468
|
+
"environmentConfig"
|
|
469
|
+
],
|
|
470
|
+
"additionalProperties": false,
|
|
471
|
+
"properties": {
|
|
472
|
+
"environmentConfig": {
|
|
473
|
+
"type": "object",
|
|
474
|
+
"additionalProperties": false,
|
|
475
|
+
"required": [
|
|
476
|
+
"key",
|
|
477
|
+
"environment",
|
|
478
|
+
"preset",
|
|
479
|
+
"serviceName",
|
|
480
|
+
"location",
|
|
481
|
+
"resourceGroupName",
|
|
482
|
+
"subscriptionId"
|
|
483
|
+
],
|
|
484
|
+
"properties": {
|
|
485
|
+
"key": {
|
|
486
|
+
"type": "string"
|
|
487
|
+
},
|
|
488
|
+
"environment": {
|
|
489
|
+
"type": "string"
|
|
490
|
+
},
|
|
491
|
+
"preset": {
|
|
492
|
+
"type": "string"
|
|
493
|
+
},
|
|
494
|
+
"serviceName": {
|
|
495
|
+
"type": "string"
|
|
496
|
+
},
|
|
497
|
+
"location": {
|
|
498
|
+
"type": "string"
|
|
499
|
+
},
|
|
500
|
+
"resourceGroupName": {
|
|
501
|
+
"type": "string"
|
|
502
|
+
},
|
|
503
|
+
"subscriptionId": {
|
|
504
|
+
"type": "string"
|
|
505
|
+
}
|
|
506
|
+
}
|
|
507
|
+
}
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
]
|
|
511
|
+
},
|
|
512
|
+
"source": {
|
|
513
|
+
"type": "string",
|
|
514
|
+
"minLength": 1
|
|
515
|
+
},
|
|
516
|
+
"description": {
|
|
517
|
+
"type": "string",
|
|
518
|
+
"minLength": 1
|
|
519
|
+
}
|
|
520
|
+
}
|
|
521
|
+
},
|
|
522
|
+
"deployment": {
|
|
523
|
+
"type": "object",
|
|
524
|
+
"required": [
|
|
525
|
+
"status",
|
|
526
|
+
"id"
|
|
527
|
+
],
|
|
528
|
+
"additionalProperties": false,
|
|
529
|
+
"properties": {
|
|
530
|
+
"status": {
|
|
531
|
+
"type": "object",
|
|
532
|
+
"required": [
|
|
533
|
+
"value",
|
|
534
|
+
"source",
|
|
535
|
+
"description"
|
|
536
|
+
],
|
|
537
|
+
"additionalProperties": false,
|
|
538
|
+
"properties": {
|
|
539
|
+
"value": {
|
|
540
|
+
"enum": [
|
|
541
|
+
"not-deployed",
|
|
542
|
+
"running",
|
|
543
|
+
"completed",
|
|
544
|
+
"failed",
|
|
545
|
+
"error",
|
|
546
|
+
"cancelled",
|
|
547
|
+
"timeout"
|
|
548
|
+
]
|
|
549
|
+
},
|
|
550
|
+
"source": {
|
|
551
|
+
"type": "string",
|
|
552
|
+
"minLength": 1
|
|
553
|
+
},
|
|
554
|
+
"description": {
|
|
555
|
+
"type": "string",
|
|
556
|
+
"minLength": 1
|
|
557
|
+
}
|
|
558
|
+
}
|
|
559
|
+
},
|
|
560
|
+
"id": {
|
|
561
|
+
"type": "object",
|
|
562
|
+
"required": [
|
|
563
|
+
"value",
|
|
564
|
+
"source",
|
|
565
|
+
"description"
|
|
566
|
+
],
|
|
567
|
+
"additionalProperties": false,
|
|
568
|
+
"properties": {
|
|
569
|
+
"value": {
|
|
570
|
+
"type": [
|
|
571
|
+
"string",
|
|
572
|
+
"null"
|
|
573
|
+
]
|
|
574
|
+
},
|
|
575
|
+
"source": {
|
|
576
|
+
"type": "string",
|
|
577
|
+
"minLength": 1
|
|
578
|
+
},
|
|
579
|
+
"description": {
|
|
580
|
+
"type": "string",
|
|
581
|
+
"minLength": 1
|
|
582
|
+
}
|
|
583
|
+
}
|
|
584
|
+
},
|
|
585
|
+
"updatedAt": {
|
|
586
|
+
"type": [
|
|
587
|
+
"string",
|
|
588
|
+
"null"
|
|
589
|
+
],
|
|
590
|
+
"format": "date-time"
|
|
591
|
+
},
|
|
592
|
+
"error": {
|
|
593
|
+
"type": [
|
|
594
|
+
"string",
|
|
595
|
+
"null"
|
|
596
|
+
]
|
|
597
|
+
}
|
|
598
|
+
}
|
|
599
|
+
}
|
|
600
|
+
}
|
|
601
|
+
}
|
|
@@ -301,6 +301,9 @@ function transformSimpleOptionalFields(variables, transformed) {
|
|
|
301
301
|
if (variables.externalIntegration) {
|
|
302
302
|
transformed.externalIntegration = variables.externalIntegration;
|
|
303
303
|
}
|
|
304
|
+
if (variables.required !== undefined) {
|
|
305
|
+
transformed.required = variables.required;
|
|
306
|
+
}
|
|
304
307
|
}
|
|
305
308
|
|
|
306
309
|
/**
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Semantic checks for the application top-level `required` variable list:
|
|
3
|
+
* every name must be declared by the manifest configuration and have a resolvable source.
|
|
4
|
+
* Shape (array, unique, name pattern) is enforced by application-schema.json.
|
|
5
|
+
* @author AI Fabrix Team
|
|
6
|
+
* @version 2.0.0
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
'use strict';
|
|
10
|
+
|
|
11
|
+
function hasResolvableValue(item) {
|
|
12
|
+
if (item.location === 'keyvault') return typeof item.value === 'string' && item.value !== '';
|
|
13
|
+
return (typeof item.value === 'string' && item.value !== '') || Boolean(item.portalInput);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Validates top-level `required` names against the deployment manifest configuration.
|
|
18
|
+
* @param {Object} manifest - Deployment manifest (application schema shape)
|
|
19
|
+
* @returns {string[]} Error messages (empty when valid or when `required` is absent)
|
|
20
|
+
*/
|
|
21
|
+
function validateRequiredVariables(manifest) {
|
|
22
|
+
const required = manifest && manifest.required;
|
|
23
|
+
if (!Array.isArray(required) || required.length === 0) return [];
|
|
24
|
+
const byName = new Map();
|
|
25
|
+
for (const item of Array.isArray(manifest.configuration) ? manifest.configuration : []) {
|
|
26
|
+
if (item && typeof item.name === 'string') byName.set(item.name, item);
|
|
27
|
+
}
|
|
28
|
+
const errors = [];
|
|
29
|
+
for (const name of required) {
|
|
30
|
+
if (typeof name !== 'string') continue;
|
|
31
|
+
const item = byName.get(name);
|
|
32
|
+
if (!item) {
|
|
33
|
+
errors.push(`required: ${name} is not declared in the application configuration (env.template)`);
|
|
34
|
+
} else if (!hasResolvableValue(item)) {
|
|
35
|
+
errors.push(`required: ${name} has no value or portal input, so it cannot resolve for the target`);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
return errors;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
module.exports = { validateRequiredVariables };
|
|
@@ -24,6 +24,7 @@ const { loadConfigFile } = require('../utils/config-format');
|
|
|
24
24
|
const { validateAuthKvCoverage, validateAuthSecurityPathConsistency } = require('./env-template-auth');
|
|
25
25
|
const { validateKvReferencesInLines } = require('./env-template-kv');
|
|
26
26
|
|
|
27
|
+
const { validateRequiredVariables } = require('./required-variables');
|
|
27
28
|
/**
|
|
28
29
|
* Validates application config file against application schema
|
|
29
30
|
* Provides detailed error messages for configuration issues
|
|
@@ -366,13 +367,15 @@ function validateDeploymentJson(deployment) {
|
|
|
366
367
|
ajv.addSchema(externalDataSourceSchemaCopy, externalDataSourceSchema.$id);
|
|
367
368
|
const validate = ajv.compile(applicationSchema);
|
|
368
369
|
const valid = validate(deployment);
|
|
370
|
+
const schemaErrors = valid ? [] : formatValidationErrors(validate.errors, {
|
|
371
|
+
deploymentManifest: deployment,
|
|
372
|
+
rootData: deployment
|
|
373
|
+
});
|
|
374
|
+
const requiredErrors = validateRequiredVariables(deployment);
|
|
369
375
|
|
|
370
376
|
return {
|
|
371
|
-
valid,
|
|
372
|
-
errors:
|
|
373
|
-
deploymentManifest: deployment,
|
|
374
|
-
rootData: deployment
|
|
375
|
-
})
|
|
377
|
+
valid: valid && requiredErrors.length === 0,
|
|
378
|
+
errors: [...schemaErrors, ...requiredErrors]
|
|
376
379
|
};
|
|
377
380
|
}
|
|
378
381
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aifabrix/builder",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.57.0",
|
|
4
4
|
"description": "AI Fabrix Builder — CLI and developer scripts (pnpm + af)",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -24,6 +24,10 @@
|
|
|
24
24
|
"dev-deploy": "node scripts/pnpm/dev-deploy.mjs",
|
|
25
25
|
"af": "node scripts/pnpm/af.mjs",
|
|
26
26
|
"check-quiet": "node scripts/pnpm/check-quiet.mjs",
|
|
27
|
+
"agent-skills:sync": "node scripts/pnpm/agent-skills-sync.mjs",
|
|
28
|
+
"agent-skills:check": "node scripts/pnpm/agent-skills-sync.mjs --check",
|
|
29
|
+
"agent-skills:sync:codex": "node scripts/pnpm/agent-skills-sync.mjs --codex-home",
|
|
30
|
+
"agent-skills:test": "node --test scripts/pnpm/agent-skills-sync.test.mjs",
|
|
27
31
|
"check": "npm run lint && npm run test",
|
|
28
32
|
"lint": "eslint . --ext .js",
|
|
29
33
|
"lint:fix": "eslint . --ext .js --fix",
|