@aifabrix/builder 2.55.2 → 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.
Files changed (88) hide show
  1. package/lib/agent-kit/session-report.js +76 -0
  2. package/lib/agent-kit/start.js +124 -57
  3. package/lib/agent-kit/tmux-sessions.js +163 -0
  4. package/lib/api/environments.api.js +38 -0
  5. package/lib/api/marketplace-bootstrap.api.js +31 -0
  6. package/lib/api/pipeline.api.js +32 -3
  7. package/lib/app/deploy.js +6 -5
  8. package/lib/cli/setup-app.js +7 -6
  9. package/lib/cli/setup-environment.js +76 -19
  10. package/lib/cli/setup-external-system-help.js +15 -3
  11. package/lib/cli/setup-external-system.js +21 -3
  12. package/lib/commands/agent-kit-help.js +32 -15
  13. package/lib/commands/agent-kit.js +90 -8
  14. package/lib/commands/repair-datasource-auto-rbac.js +4 -9
  15. package/lib/commands/upload-openapi-sync-followup.js +59 -0
  16. package/lib/commands/upload-qualification-client.js +131 -0
  17. package/lib/commands/upload-qualification-followups.js +104 -0
  18. package/lib/commands/upload-qualification-poll.js +143 -0
  19. package/lib/commands/upload.js +37 -156
  20. package/lib/deployment/deploy-poll-ui.js +14 -10
  21. package/lib/deployment/deployer-status.js +4 -4
  22. package/lib/deployment/installation/azure-infra-stage.js +160 -0
  23. package/lib/deployment/installation/azure-preflight.js +102 -0
  24. package/lib/deployment/installation/azure-readiness.js +71 -0
  25. package/lib/deployment/installation/docker-register.js +112 -0
  26. package/lib/deployment/installation/environment-auth.js +76 -0
  27. package/lib/deployment/installation/environment-manifest.js +165 -0
  28. package/lib/deployment/installation/environment-stage.js +191 -0
  29. package/lib/deployment/installation/index.js +39 -0
  30. package/lib/deployment/installation/infra-catalog.js +165 -0
  31. package/lib/deployment/installation/infra-manifest.js +161 -0
  32. package/lib/deployment/installation/infra-projection.js +86 -0
  33. package/lib/deployment/installation/public-ip.js +65 -0
  34. package/lib/deployment/installation/stage-input.js +169 -0
  35. package/lib/deployment/installation/stage-output.js +53 -0
  36. package/lib/deployment/installation/workspace-env.js +76 -0
  37. package/lib/deployment/installation/workspace-files.js +178 -0
  38. package/lib/deployment/installation/workspace-schema.js +40 -0
  39. package/lib/deployment/installation/workspace-secrets.js +66 -0
  40. package/lib/deployment/installation/workspace.js +128 -0
  41. package/lib/deployment/marketplace-environment.js +305 -0
  42. package/lib/external-system/deploy.js +46 -51
  43. package/lib/generator/builders.js +4 -0
  44. package/lib/generator/helpers.js +55 -99
  45. package/lib/generator/index.js +0 -4
  46. package/lib/generator/split-variables.js +11 -5
  47. package/lib/internal/fs-real-sync.js +29 -0
  48. package/lib/programmatic/builder-api-request.js +8 -4
  49. package/lib/programmatic/capability-registry.js +2 -0
  50. package/lib/programmatic/get-deploy-status.js +45 -0
  51. package/lib/programmatic/get-upload-status.js +45 -0
  52. package/lib/programmatic/http-accepted-response.js +31 -0
  53. package/lib/programmatic/openapi-descriptions.js +14 -4
  54. package/lib/programmatic/request-timeout.js +21 -15
  55. package/lib/programmatic/route-handler-map.js +6 -0
  56. package/lib/programmatic/run-deploy.js +7 -3
  57. package/lib/programmatic/run-upload.js +11 -7
  58. package/lib/role-assistant/package-validate.js +4 -0
  59. package/lib/role-assistant/test-runner-clarification-resubmit.js +149 -0
  60. package/lib/role-assistant/test-runner.js +14 -17
  61. package/lib/schema/application-schema.json +20 -2
  62. package/lib/schema/infra-parameter.schema.json +7 -0
  63. package/lib/schema/infra.parameter.yaml +32 -43
  64. package/lib/schema/infrastructure-schema.json +1480 -399
  65. package/lib/schema/installation-environment.schema.json +601 -0
  66. package/lib/utils/cli-utils.js +3 -2
  67. package/lib/utils/qualification-poll-ui.js +136 -0
  68. package/lib/utils/variable-transformer.js +3 -0
  69. package/lib/validation/required-variables.js +41 -0
  70. package/lib/validation/validator.js +8 -5
  71. package/package.json +7 -2
  72. package/templates/README.md +4 -0
  73. package/templates/agent-kit/instructions/AGENTKIT.md +6 -6
  74. package/templates/agent-kit/skills/shared/hosts.md +10 -10
  75. package/templates/applications/builder-api/env.template +4 -0
  76. package/templates/applications/dataplane/application.yaml +1 -1
  77. package/templates/applications/dataplane/env.template +1 -1
  78. package/templates/applications/keycloak/Dockerfile +12 -5
  79. package/templates/applications/keycloak/application.yaml +2 -2
  80. package/templates/applications/keycloak/cimd-lenient-parse/AbstractClientIdMetadataDocumentExecutor.java +3 -3
  81. package/templates/applications/keycloak/cimd-lenient-parse/SOURCE.md +6 -6
  82. package/templates/applications/keycloak/env.template +13 -1
  83. package/templates/applications/miso-controller/application.yaml +3 -2
  84. package/templates/applications/miso-controller/env.template +28 -22
  85. package/templates/marketplace/createUiDefinition.json +77 -0
  86. package/templates/marketplace/install.parameters.example.json +9 -0
  87. package/templates/marketplace/main.json +4087 -0
  88. package/lib/generator/deploy-manifest-azure-kv.js +0 -81
@@ -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
+ }
@@ -441,7 +441,9 @@ function handleCommandError(error, command) {
441
441
  return;
442
442
  }
443
443
  const errorMessages = appendCommandPermissionHint(formatError(error), command);
444
- const skipDoctor = isMissingSecretsErrorMessage(error && error.message);
444
+ const skipDoctor = error && error.skipDoctor === true
445
+ ? true
446
+ : isMissingSecretsErrorMessage(error && error.message);
445
447
  logError(command, errorMessages, { skipDoctor });
446
448
  if (error.wizardResumeMessage) {
447
449
  logger.log(error.wizardResumeMessage);
@@ -489,4 +491,3 @@ module.exports = {
489
491
  appendWizardError,
490
492
  logOfflinePathWhenType
491
493
  };
492
-