@aifabrix/builder 2.32.2 → 2.33.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/.cursor/rules/project-rules.mdc +8 -0
- package/README.md +36 -8
- package/bin/aifabrix.js +6 -8
- package/integration/hubspot/README.md +8 -7
- package/integration/hubspot/companies.json +2048 -0
- package/integration/hubspot/create-hubspot.js +665 -0
- package/integration/hubspot/{hubspot-deploy-company.json → hubspot-datasource-company.json} +1 -1
- package/integration/hubspot/{hubspot-deploy-contact.json → hubspot-datasource-contact.json} +1 -1
- package/integration/hubspot/{hubspot-deploy-deal.json → hubspot-datasource-deal.json} +1 -1
- package/integration/hubspot/hubspot-deploy.json +832 -81
- package/integration/hubspot/hubspot-system.json +99 -0
- package/integration/hubspot/test-artifacts/wizard-hubspot-credential-real.yaml +20 -0
- package/integration/hubspot/test-artifacts/wizard-hubspot-env-vars.yaml +9 -0
- package/integration/hubspot/test-artifacts/wizard-invalid-add-datasource.yaml +5 -0
- package/integration/hubspot/test-artifacts/wizard-invalid-app-name.yaml +5 -0
- package/integration/hubspot/test-artifacts/wizard-invalid-credential-create.yaml +7 -0
- package/integration/hubspot/test-artifacts/wizard-invalid-credential-select.yaml +7 -0
- package/integration/hubspot/test-artifacts/wizard-invalid-known-platform.yaml +4 -0
- package/integration/hubspot/test-artifacts/wizard-invalid-missing-app.yaml +4 -0
- package/integration/hubspot/test-artifacts/wizard-invalid-missing-source.yaml +2 -0
- package/integration/hubspot/test-artifacts/wizard-invalid-mode.yaml +5 -0
- package/integration/hubspot/test-artifacts/wizard-invalid-openapi-file.yaml +5 -0
- package/integration/hubspot/test-artifacts/wizard-invalid-openapi-url.yaml +4 -0
- package/integration/hubspot/test-artifacts/wizard-invalid-source.yaml +4 -0
- package/integration/hubspot/test-artifacts/wizard-valid-for-dimension-array-test.yaml +5 -0
- package/integration/hubspot/test-artifacts/wizard-valid-for-dimension-key-test.yaml +5 -0
- package/integration/hubspot/test-artifacts/wizard-valid-for-dimension-path-test.yaml +5 -0
- package/integration/hubspot/test-artifacts/wizard-valid-for-dimension-test.yaml +5 -0
- package/integration/hubspot/test-artifacts/wizard-valid-for-rbac-test.yaml +5 -0
- package/integration/hubspot/test-artifacts/wizard-valid-for-rbac-yaml-test.yaml +5 -0
- package/integration/hubspot/test-dataplane-down-helpers.js +246 -0
- package/integration/hubspot/test-dataplane-down-tests.js +419 -0
- package/integration/hubspot/test-dataplane-down.js +157 -0
- package/integration/hubspot/test.js +1517 -0
- package/integration/hubspot/variables.yaml +4 -4
- package/integration/hubspot/wizard-hubspot-e2e.yaml +16 -0
- package/integration/hubspot/wizard-hubspot-platform.yaml +8 -0
- package/lib/api/applications.api.js +1 -0
- package/lib/api/index.js +10 -5
- package/lib/api/types/wizard.types.js +176 -38
- package/lib/api/wizard.api.js +207 -38
- package/lib/app/deploy.js +116 -54
- package/lib/app/display.js +6 -5
- package/lib/app/dockerfile.js +2 -1
- package/lib/app/list.js +78 -37
- package/lib/app/prompts.js +9 -5
- package/lib/app/readme.js +41 -112
- package/lib/app/register.js +44 -9
- package/lib/app/rotate-secret.js +50 -32
- package/lib/cli.js +243 -65
- package/lib/commands/app.js +4 -9
- package/lib/commands/auth-config.js +125 -0
- package/lib/commands/auth-status.js +261 -0
- package/lib/commands/datasource.js +3 -6
- package/lib/commands/login-credentials.js +4 -4
- package/lib/commands/login-device.js +43 -29
- package/lib/commands/login.js +22 -13
- package/lib/commands/wizard-config-normalizer.js +92 -0
- package/lib/commands/wizard-core.js +515 -0
- package/lib/commands/wizard-dataplane.js +122 -0
- package/lib/commands/wizard-headless.js +115 -0
- package/lib/commands/wizard.js +129 -357
- package/lib/core/config.js +46 -0
- package/lib/core/secrets.js +3 -22
- package/lib/core/templates-env.js +1 -1
- package/lib/datasource/deploy.js +34 -23
- package/lib/datasource/list.js +8 -6
- package/lib/deployment/deployer.js +25 -0
- package/lib/deployment/environment.js +10 -13
- package/lib/external-system/delete.js +151 -0
- package/lib/external-system/deploy.js +54 -378
- package/lib/external-system/download-helpers.js +45 -65
- package/lib/external-system/download.js +34 -13
- package/lib/external-system/generator.js +11 -7
- package/lib/external-system/test-auth.js +5 -3
- package/lib/generator/builders.js +3 -1
- package/lib/generator/external-controller-manifest.js +157 -0
- package/lib/generator/external-schema-utils.js +236 -0
- package/lib/generator/external.js +55 -3
- package/lib/generator/index.js +22 -10
- package/lib/generator/wizard-prompts.js +33 -10
- package/lib/generator/wizard.js +69 -86
- package/lib/infrastructure/compose.js +100 -0
- package/lib/infrastructure/helpers.js +139 -0
- package/lib/infrastructure/index.js +52 -311
- package/lib/infrastructure/services.js +168 -0
- package/lib/schema/application-schema.json +24 -5
- package/lib/schema/external-datasource.schema.json +303 -17
- package/lib/schema/external-system.schema.json +1 -1
- package/lib/schema/wizard-config.schema.json +234 -0
- package/lib/utils/api.js +37 -42
- package/lib/utils/app-existence.js +42 -0
- package/lib/utils/app-register-config.js +7 -2
- package/lib/utils/app-register-display.js +2 -1
- package/lib/utils/auth-config-validator.js +92 -0
- package/lib/utils/cli-utils.js +3 -1
- package/lib/utils/command-header.js +43 -0
- package/lib/utils/compose-generator.js +113 -70
- package/lib/utils/controller-url.js +115 -0
- package/lib/utils/dataplane-health.js +115 -0
- package/lib/utils/dataplane-resolver.js +29 -0
- package/lib/utils/dev-config.js +6 -2
- package/lib/utils/env-copy.js +2 -1
- package/lib/utils/env-map.js +2 -1
- package/lib/utils/env-ports.js +2 -1
- package/lib/utils/env-template.js +1 -1
- package/lib/utils/error-formatter.js +149 -28
- package/lib/utils/external-readme.js +125 -0
- package/lib/utils/help-builder.js +190 -0
- package/lib/utils/infra-status.js +13 -3
- package/lib/utils/paths.js +17 -2
- package/lib/utils/port-resolver.js +111 -0
- package/lib/utils/secrets-helpers.js +3 -15
- package/lib/utils/secrets-utils.js +2 -2
- package/lib/utils/token-manager.js +69 -4
- package/lib/utils/variable-transformer.js +7 -2
- package/lib/validation/external-manifest-validator.js +202 -0
- package/lib/validation/validate-display.js +406 -0
- package/lib/validation/validate.js +159 -123
- package/lib/validation/validator.js +38 -4
- package/lib/validation/wizard-config-validator.js +267 -0
- package/package.json +4 -2
- package/templates/applications/README.md.hbs +19 -17
- package/templates/applications/miso-controller/env.template +1 -1
- package/templates/applications/miso-controller/rbac.yaml +7 -7
- package/templates/external-system/README.md.hbs +99 -0
- package/templates/external-system/external-system.json.hbs +1 -1
- package/templates/infra/compose.yaml.hbs +35 -0
- package/templates/python/docker-compose.hbs +26 -0
- package/templates/typescript/docker-compose.hbs +26 -0
|
@@ -3,21 +3,21 @@
|
|
|
3
3
|
"$id":"https://raw.githubusercontent.com/esystemsdev/aifabrix-builder/refs/heads/main/lib/schema/external-datasource.schema.json",
|
|
4
4
|
"title":"External Data Source",
|
|
5
5
|
"description":"Configuration for AI Fabrix ExternalDataSource entities. Includes metadata schema, data dimensions, transformation mappings, OpenAPI/MCP exposure, execution logic, and sync behavior.",
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
6
|
+
"metadata":{
|
|
7
|
+
"key":"external-datasource-schema",
|
|
8
|
+
"name":"External Data Source Configuration Schema",
|
|
9
|
+
"description":"JSON schema for validating ExternalDataSource configuration files",
|
|
10
|
+
"version":"2.1.0",
|
|
11
|
+
"type":"schema",
|
|
12
|
+
"category":"integration",
|
|
13
|
+
"author":"AI Fabrix Team",
|
|
14
|
+
"createdAt":"2024-01-01T00:00:00Z",
|
|
15
|
+
"updatedAt":"2026-01-19T00:00:00Z",
|
|
16
|
+
"compatibility":{
|
|
17
|
+
"minVersion":"1.0.0",
|
|
18
|
+
"maxVersion":"3.0.0",
|
|
19
|
+
"deprecated":false
|
|
20
|
+
},
|
|
21
21
|
"tags":[
|
|
22
22
|
"schema",
|
|
23
23
|
"external-datasource",
|
|
@@ -80,6 +80,17 @@
|
|
|
80
80
|
"Updated descriptions to reflect dimension-first data model approach"
|
|
81
81
|
],
|
|
82
82
|
"breaking":true
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"version":"2.1.0",
|
|
86
|
+
"date":"2026-01-19T00:00:00Z",
|
|
87
|
+
"changes":[
|
|
88
|
+
"Added error semantics (onError object) to all CIP step types with error classification, retry, compensation, and failPipeline",
|
|
89
|
+
"Added idempotency configuration to CIP definition for execution-level replay guarantees",
|
|
90
|
+
"Added lineage configuration to field mappings for field-level explainability and compliance",
|
|
91
|
+
"Added contract versioning configuration to datasource root for CI/CD safety and agent stability"
|
|
92
|
+
],
|
|
93
|
+
"breaking":false
|
|
83
94
|
}
|
|
84
95
|
]
|
|
85
96
|
},
|
|
@@ -165,8 +176,8 @@
|
|
|
165
176
|
"properties":{
|
|
166
177
|
"expression":{
|
|
167
178
|
"type":"string",
|
|
168
|
-
"description":"Pipe-based DSL expression: '{{raw.path}} | toLower | trim'.",
|
|
169
|
-
"pattern":"^\\s
|
|
179
|
+
"description":"Pipe-based DSL expression: '{{raw.path}} | toLower | trim' or record reference: 'record_ref:customer'.",
|
|
180
|
+
"pattern":"^\\s*((\\{\\{[^}]+\\}\\}(\\s*\\|\\s*[a-zA-Z0-9_]+(\\([^)]*\\))?)*)|(record_ref:[a-z0-9-]+))\\s*$"
|
|
170
181
|
},
|
|
171
182
|
"type":{
|
|
172
183
|
"type":"string",
|
|
@@ -223,6 +234,9 @@
|
|
|
223
234
|
}
|
|
224
235
|
},
|
|
225
236
|
"additionalProperties":false
|
|
237
|
+
},
|
|
238
|
+
"lineage":{
|
|
239
|
+
"$ref":"#/$defs/fieldMappingLineage"
|
|
226
240
|
}
|
|
227
241
|
}
|
|
228
242
|
}
|
|
@@ -846,6 +860,9 @@
|
|
|
846
860
|
}
|
|
847
861
|
},
|
|
848
862
|
"additionalProperties":true
|
|
863
|
+
},
|
|
864
|
+
"contract":{
|
|
865
|
+
"$ref":"#/$defs/contractConfig"
|
|
849
866
|
}
|
|
850
867
|
},
|
|
851
868
|
"$defs":{
|
|
@@ -931,6 +948,9 @@
|
|
|
931
948
|
}
|
|
932
949
|
},
|
|
933
950
|
"additionalProperties":false
|
|
951
|
+
},
|
|
952
|
+
"idempotency":{
|
|
953
|
+
"$ref":"#/$defs/idempotencyConfig"
|
|
934
954
|
}
|
|
935
955
|
},
|
|
936
956
|
"additionalProperties":false
|
|
@@ -1103,6 +1123,14 @@
|
|
|
1103
1123
|
},
|
|
1104
1124
|
"lineage":{
|
|
1105
1125
|
"$ref":"#/$defs/cipLineage"
|
|
1126
|
+
},
|
|
1127
|
+
"stepId":{
|
|
1128
|
+
"type":"string",
|
|
1129
|
+
"pattern":"^[a-z0-9-_]+$",
|
|
1130
|
+
"description":"Unique identifier for this step within the operation"
|
|
1131
|
+
},
|
|
1132
|
+
"onError":{
|
|
1133
|
+
"$ref":"#/$defs/cipOnErrorConfig"
|
|
1106
1134
|
}
|
|
1107
1135
|
},
|
|
1108
1136
|
"additionalProperties":false
|
|
@@ -1160,6 +1188,14 @@
|
|
|
1160
1188
|
},
|
|
1161
1189
|
"lineage":{
|
|
1162
1190
|
"$ref":"#/$defs/cipLineage"
|
|
1191
|
+
},
|
|
1192
|
+
"stepId":{
|
|
1193
|
+
"type":"string",
|
|
1194
|
+
"pattern":"^[a-z0-9-_]+$",
|
|
1195
|
+
"description":"Unique identifier for this step within the operation"
|
|
1196
|
+
},
|
|
1197
|
+
"onError":{
|
|
1198
|
+
"$ref":"#/$defs/cipOnErrorConfig"
|
|
1163
1199
|
}
|
|
1164
1200
|
},
|
|
1165
1201
|
"additionalProperties":false
|
|
@@ -1197,6 +1233,14 @@
|
|
|
1197
1233
|
},
|
|
1198
1234
|
"lineage":{
|
|
1199
1235
|
"$ref":"#/$defs/cipLineage"
|
|
1236
|
+
},
|
|
1237
|
+
"stepId":{
|
|
1238
|
+
"type":"string",
|
|
1239
|
+
"pattern":"^[a-z0-9-_]+$",
|
|
1240
|
+
"description":"Unique identifier for this step within the operation"
|
|
1241
|
+
},
|
|
1242
|
+
"onError":{
|
|
1243
|
+
"$ref":"#/$defs/cipOnErrorConfig"
|
|
1200
1244
|
}
|
|
1201
1245
|
},
|
|
1202
1246
|
"additionalProperties":false
|
|
@@ -1236,6 +1280,14 @@
|
|
|
1236
1280
|
},
|
|
1237
1281
|
"lineage":{
|
|
1238
1282
|
"$ref":"#/$defs/cipLineage"
|
|
1283
|
+
},
|
|
1284
|
+
"stepId":{
|
|
1285
|
+
"type":"string",
|
|
1286
|
+
"pattern":"^[a-z0-9-_]+$",
|
|
1287
|
+
"description":"Unique identifier for this step within the operation"
|
|
1288
|
+
},
|
|
1289
|
+
"onError":{
|
|
1290
|
+
"$ref":"#/$defs/cipOnErrorConfig"
|
|
1239
1291
|
}
|
|
1240
1292
|
},
|
|
1241
1293
|
"additionalProperties":false
|
|
@@ -1272,6 +1324,14 @@
|
|
|
1272
1324
|
},
|
|
1273
1325
|
"lineage":{
|
|
1274
1326
|
"$ref":"#/$defs/cipLineage"
|
|
1327
|
+
},
|
|
1328
|
+
"stepId":{
|
|
1329
|
+
"type":"string",
|
|
1330
|
+
"pattern":"^[a-z0-9-_]+$",
|
|
1331
|
+
"description":"Unique identifier for this step within the operation"
|
|
1332
|
+
},
|
|
1333
|
+
"onError":{
|
|
1334
|
+
"$ref":"#/$defs/cipOnErrorConfig"
|
|
1275
1335
|
}
|
|
1276
1336
|
},
|
|
1277
1337
|
"additionalProperties":false
|
|
@@ -1298,6 +1358,232 @@
|
|
|
1298
1358
|
},
|
|
1299
1359
|
"lineage":{
|
|
1300
1360
|
"$ref":"#/$defs/cipLineage"
|
|
1361
|
+
},
|
|
1362
|
+
"stepId":{
|
|
1363
|
+
"type":"string",
|
|
1364
|
+
"pattern":"^[a-z0-9-_]+$",
|
|
1365
|
+
"description":"Unique identifier for this step within the operation"
|
|
1366
|
+
},
|
|
1367
|
+
"onError":{
|
|
1368
|
+
"$ref":"#/$defs/cipOnErrorConfig"
|
|
1369
|
+
}
|
|
1370
|
+
},
|
|
1371
|
+
"additionalProperties":false
|
|
1372
|
+
},
|
|
1373
|
+
"cipRetryConfig":{
|
|
1374
|
+
"type":"object",
|
|
1375
|
+
"description":"Retry configuration for error handling.",
|
|
1376
|
+
"properties":{
|
|
1377
|
+
"attempts":{
|
|
1378
|
+
"type":"integer",
|
|
1379
|
+
"minimum":1,
|
|
1380
|
+
"maximum":10,
|
|
1381
|
+
"default":3,
|
|
1382
|
+
"description":"Maximum number of retry attempts"
|
|
1383
|
+
},
|
|
1384
|
+
"backoff":{
|
|
1385
|
+
"type":"string",
|
|
1386
|
+
"enum":["exponential","linear","fixed"],
|
|
1387
|
+
"default":"exponential",
|
|
1388
|
+
"description":"Backoff strategy: exponential (2^attempt), linear (attempt * base), fixed (constant)"
|
|
1389
|
+
},
|
|
1390
|
+
"maxDelaySeconds":{
|
|
1391
|
+
"type":"number",
|
|
1392
|
+
"minimum":1.0,
|
|
1393
|
+
"maximum":300.0,
|
|
1394
|
+
"default":60.0,
|
|
1395
|
+
"description":"Maximum delay between retries in seconds"
|
|
1396
|
+
}
|
|
1397
|
+
},
|
|
1398
|
+
"additionalProperties":false
|
|
1399
|
+
},
|
|
1400
|
+
"cipCompensationConfig":{
|
|
1401
|
+
"type":"object",
|
|
1402
|
+
"description":"Compensation (rollback) configuration for error handling.",
|
|
1403
|
+
"properties":{
|
|
1404
|
+
"enabled":{
|
|
1405
|
+
"type":"boolean",
|
|
1406
|
+
"default":false,
|
|
1407
|
+
"description":"Whether compensation is enabled"
|
|
1408
|
+
},
|
|
1409
|
+
"stepRef":{
|
|
1410
|
+
"type":"string",
|
|
1411
|
+
"pattern":"^[a-z0-9-_]+$",
|
|
1412
|
+
"description":"Reference to a previously executed step by stepId to execute as compensation"
|
|
1413
|
+
}
|
|
1414
|
+
},
|
|
1415
|
+
"additionalProperties":false
|
|
1416
|
+
},
|
|
1417
|
+
"cipOnErrorConfig":{
|
|
1418
|
+
"type":"object",
|
|
1419
|
+
"description":"Enhanced error handling configuration for CIP steps.",
|
|
1420
|
+
"required":["class"],
|
|
1421
|
+
"properties":{
|
|
1422
|
+
"class":{
|
|
1423
|
+
"type":"string",
|
|
1424
|
+
"enum":["transient","permanent","validation","auth"],
|
|
1425
|
+
"description":"Error classification: transient (retryable), permanent (non-retryable), validation (data validation failure), auth (authentication/authorization failure)"
|
|
1426
|
+
},
|
|
1427
|
+
"retry":{
|
|
1428
|
+
"$ref":"#/$defs/cipRetryConfig",
|
|
1429
|
+
"description":"Retry configuration (only applies when class='transient')"
|
|
1430
|
+
},
|
|
1431
|
+
"compensate":{
|
|
1432
|
+
"$ref":"#/$defs/cipCompensationConfig",
|
|
1433
|
+
"description":"Compensation (rollback) configuration"
|
|
1434
|
+
},
|
|
1435
|
+
"failPipeline":{
|
|
1436
|
+
"type":"boolean",
|
|
1437
|
+
"default":true,
|
|
1438
|
+
"description":"Whether step failure should fail the entire pipeline (false allows partial success)"
|
|
1439
|
+
}
|
|
1440
|
+
},
|
|
1441
|
+
"additionalProperties":false
|
|
1442
|
+
},
|
|
1443
|
+
"idempotencyConfig":{
|
|
1444
|
+
"type":"object",
|
|
1445
|
+
"description":"Idempotency configuration for CIP execution.",
|
|
1446
|
+
"required":["key"],
|
|
1447
|
+
"properties":{
|
|
1448
|
+
"key":{
|
|
1449
|
+
"type":"string",
|
|
1450
|
+
"description":"Idempotency key template. Supports variables: {{actor.userId}}, {{raw.requestId}}, {{correlationId}}, {{execution.operation}}, {{execution.datasourceId}}"
|
|
1451
|
+
},
|
|
1452
|
+
"scope":{
|
|
1453
|
+
"type":"string",
|
|
1454
|
+
"enum":["datasource","system"],
|
|
1455
|
+
"default":"datasource",
|
|
1456
|
+
"description":"Idempotency scope: datasource (same key within datasource) or system (same key across all datasources)"
|
|
1457
|
+
},
|
|
1458
|
+
"ttlSeconds":{
|
|
1459
|
+
"type":"integer",
|
|
1460
|
+
"minimum":1,
|
|
1461
|
+
"maximum":604800,
|
|
1462
|
+
"default":86400,
|
|
1463
|
+
"description":"Time to live for idempotency records in seconds (default: 86400 = 24 hours)"
|
|
1464
|
+
},
|
|
1465
|
+
"enforcement":{
|
|
1466
|
+
"type":"string",
|
|
1467
|
+
"enum":["strict","best-effort"],
|
|
1468
|
+
"default":"strict",
|
|
1469
|
+
"description":"Enforcement mode: strict (return previous result, no execution) or best-effort (warn + continue)"
|
|
1470
|
+
}
|
|
1471
|
+
},
|
|
1472
|
+
"additionalProperties":false
|
|
1473
|
+
},
|
|
1474
|
+
"transformationRule":{
|
|
1475
|
+
"type":"object",
|
|
1476
|
+
"description":"Transformation rule applied to a field.",
|
|
1477
|
+
"required":["type"],
|
|
1478
|
+
"properties":{
|
|
1479
|
+
"type":{
|
|
1480
|
+
"type":"string",
|
|
1481
|
+
"description":"Type of transformation: 'mapping', 'function', 'filter', 'aggregate'"
|
|
1482
|
+
},
|
|
1483
|
+
"function":{
|
|
1484
|
+
"type":"string",
|
|
1485
|
+
"description":"Function name (e.g., 'mapStatus', 'toLower', 'trim')"
|
|
1486
|
+
},
|
|
1487
|
+
"rule":{
|
|
1488
|
+
"type":"string",
|
|
1489
|
+
"description":"Human-readable rule description (e.g., 'open → OPEN, closed → CLOSED')"
|
|
1490
|
+
}
|
|
1491
|
+
},
|
|
1492
|
+
"additionalProperties":false
|
|
1493
|
+
},
|
|
1494
|
+
"fieldMappingLineage":{
|
|
1495
|
+
"type":"object",
|
|
1496
|
+
"description":"Lineage metadata for a field mapping.",
|
|
1497
|
+
"required":["sourceFields"],
|
|
1498
|
+
"properties":{
|
|
1499
|
+
"sourceFields":{
|
|
1500
|
+
"type":"array",
|
|
1501
|
+
"minItems":1,
|
|
1502
|
+
"items":{
|
|
1503
|
+
"type":"string"
|
|
1504
|
+
},
|
|
1505
|
+
"description":"Source field paths that contribute to this mapped field (e.g., ['raw.fields.state'])"
|
|
1506
|
+
},
|
|
1507
|
+
"transformations":{
|
|
1508
|
+
"type":"array",
|
|
1509
|
+
"items":{
|
|
1510
|
+
"$ref":"#/$defs/transformationRule"
|
|
1511
|
+
},
|
|
1512
|
+
"description":"List of transformations applied to source fields"
|
|
1513
|
+
},
|
|
1514
|
+
"confidence":{
|
|
1515
|
+
"type":"number",
|
|
1516
|
+
"minimum":0.0,
|
|
1517
|
+
"maximum":1.0,
|
|
1518
|
+
"default":1.0,
|
|
1519
|
+
"description":"Confidence score for this mapping (0.0-1.0). Default: 1.0 for deterministic transformations."
|
|
1520
|
+
}
|
|
1521
|
+
},
|
|
1522
|
+
"additionalProperties":false
|
|
1523
|
+
},
|
|
1524
|
+
"compatibilityConfig":{
|
|
1525
|
+
"type":"object",
|
|
1526
|
+
"description":"Compatibility configuration for contract versioning.",
|
|
1527
|
+
"properties":{
|
|
1528
|
+
"backwardCompatible":{
|
|
1529
|
+
"type":"boolean",
|
|
1530
|
+
"default":true,
|
|
1531
|
+
"description":"Whether this version is backward compatible with previous versions"
|
|
1532
|
+
},
|
|
1533
|
+
"breakingChanges":{
|
|
1534
|
+
"type":"array",
|
|
1535
|
+
"items":{
|
|
1536
|
+
"type":"string"
|
|
1537
|
+
},
|
|
1538
|
+
"description":"List of breaking change types: removeField, changeType, changeSemantics"
|
|
1539
|
+
}
|
|
1540
|
+
},
|
|
1541
|
+
"additionalProperties":false
|
|
1542
|
+
},
|
|
1543
|
+
"deprecationConfig":{
|
|
1544
|
+
"type":"object",
|
|
1545
|
+
"description":"Deprecation configuration for contract versioning.",
|
|
1546
|
+
"properties":{
|
|
1547
|
+
"sunsetDate":{
|
|
1548
|
+
"type":"string",
|
|
1549
|
+
"pattern":"^\\d{4}-\\d{2}-\\d{2}$",
|
|
1550
|
+
"description":"Date when this contract version will be sunset (YYYY-MM-DD)"
|
|
1551
|
+
},
|
|
1552
|
+
"replacedBy":{
|
|
1553
|
+
"type":"string",
|
|
1554
|
+
"description":"Contract name/version that replaces this deprecated version"
|
|
1555
|
+
}
|
|
1556
|
+
},
|
|
1557
|
+
"additionalProperties":false
|
|
1558
|
+
},
|
|
1559
|
+
"contractConfig":{
|
|
1560
|
+
"type":"object",
|
|
1561
|
+
"description":"Contract versioning configuration for datasource.",
|
|
1562
|
+
"required":["name","version"],
|
|
1563
|
+
"properties":{
|
|
1564
|
+
"name":{
|
|
1565
|
+
"type":"string",
|
|
1566
|
+
"pattern":"^[a-z0-9.-]+$",
|
|
1567
|
+
"description":"Contract identifier (e.g., 'jira.issue', separate from datasource key)"
|
|
1568
|
+
},
|
|
1569
|
+
"version":{
|
|
1570
|
+
"type":"string",
|
|
1571
|
+
"pattern":"^[0-9]+\\.[0-9]+\\.[0-9]+$",
|
|
1572
|
+
"description":"Semantic version of the contract (e.g., '2.1.0')"
|
|
1573
|
+
},
|
|
1574
|
+
"status":{
|
|
1575
|
+
"type":"string",
|
|
1576
|
+
"enum":["stable","deprecated","experimental"],
|
|
1577
|
+
"default":"stable",
|
|
1578
|
+
"description":"Contract status: stable (production-ready), deprecated (being phased out), experimental (testing)"
|
|
1579
|
+
},
|
|
1580
|
+
"compatibility":{
|
|
1581
|
+
"$ref":"#/$defs/compatibilityConfig",
|
|
1582
|
+
"description":"Compatibility information for this contract version"
|
|
1583
|
+
},
|
|
1584
|
+
"deprecation":{
|
|
1585
|
+
"$ref":"#/$defs/deprecationConfig",
|
|
1586
|
+
"description":"Deprecation information if status is 'deprecated'"
|
|
1301
1587
|
}
|
|
1302
1588
|
},
|
|
1303
1589
|
"additionalProperties":false
|
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://raw.githubusercontent.com/esystemsdev/aifabrix-builder/refs/heads/main/lib/schema/wizard-config.schema.json",
|
|
4
|
+
"title": "AI Fabrix Wizard Configuration Schema",
|
|
5
|
+
"description": "Schema for validating wizard.yaml configuration files for headless external system creation",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["appName", "mode", "source"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"appName": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"description": "Application name (must be lowercase alphanumeric with hyphens and underscores)",
|
|
12
|
+
"pattern": "^[a-z0-9-_]+$",
|
|
13
|
+
"minLength": 1,
|
|
14
|
+
"maxLength": 50
|
|
15
|
+
},
|
|
16
|
+
"mode": {
|
|
17
|
+
"type": "string",
|
|
18
|
+
"description": "Wizard mode",
|
|
19
|
+
"enum": ["create-system", "add-datasource"]
|
|
20
|
+
},
|
|
21
|
+
"systemIdOrKey": {
|
|
22
|
+
"type": "string",
|
|
23
|
+
"description": "Existing system ID or key (required when mode='add-datasource')",
|
|
24
|
+
"pattern": "^[a-z0-9-]+$",
|
|
25
|
+
"minLength": 1,
|
|
26
|
+
"maxLength": 50
|
|
27
|
+
},
|
|
28
|
+
"source": {
|
|
29
|
+
"type": "object",
|
|
30
|
+
"description": "Source configuration for the wizard",
|
|
31
|
+
"required": ["type"],
|
|
32
|
+
"properties": {
|
|
33
|
+
"type": {
|
|
34
|
+
"type": "string",
|
|
35
|
+
"description": "Source type",
|
|
36
|
+
"enum": ["openapi-file", "openapi-url", "mcp-server", "known-platform"]
|
|
37
|
+
},
|
|
38
|
+
"filePath": {
|
|
39
|
+
"type": "string",
|
|
40
|
+
"description": "Path to OpenAPI file (for openapi-file type)",
|
|
41
|
+
"minLength": 1
|
|
42
|
+
},
|
|
43
|
+
"url": {
|
|
44
|
+
"type": "string",
|
|
45
|
+
"description": "OpenAPI URL (for openapi-url type)",
|
|
46
|
+
"pattern": "^https?://.*$"
|
|
47
|
+
},
|
|
48
|
+
"serverUrl": {
|
|
49
|
+
"type": "string",
|
|
50
|
+
"description": "MCP server URL (for mcp-server type)",
|
|
51
|
+
"pattern": "^https?://.*$"
|
|
52
|
+
},
|
|
53
|
+
"token": {
|
|
54
|
+
"type": "string",
|
|
55
|
+
"description": "MCP server authentication token (supports ${ENV_VAR} syntax)",
|
|
56
|
+
"minLength": 1
|
|
57
|
+
},
|
|
58
|
+
"platform": {
|
|
59
|
+
"type": "string",
|
|
60
|
+
"description": "Known platform identifier (for known-platform type)",
|
|
61
|
+
"enum": ["hubspot", "salesforce", "zendesk", "slack", "microsoft365"]
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
"allOf": [
|
|
65
|
+
{
|
|
66
|
+
"if": {
|
|
67
|
+
"properties": { "type": { "const": "openapi-file" } }
|
|
68
|
+
},
|
|
69
|
+
"then": {
|
|
70
|
+
"required": ["filePath"]
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"if": {
|
|
75
|
+
"properties": { "type": { "const": "openapi-url" } }
|
|
76
|
+
},
|
|
77
|
+
"then": {
|
|
78
|
+
"required": ["url"]
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"if": {
|
|
83
|
+
"properties": { "type": { "const": "mcp-server" } }
|
|
84
|
+
},
|
|
85
|
+
"then": {
|
|
86
|
+
"required": ["serverUrl", "token"]
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"if": {
|
|
91
|
+
"properties": { "type": { "const": "known-platform" } }
|
|
92
|
+
},
|
|
93
|
+
"then": {
|
|
94
|
+
"required": ["platform"]
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
]
|
|
98
|
+
},
|
|
99
|
+
"credential": {
|
|
100
|
+
"type": "object",
|
|
101
|
+
"description": "Credential configuration for the wizard (optional)",
|
|
102
|
+
"required": ["action"],
|
|
103
|
+
"properties": {
|
|
104
|
+
"action": {
|
|
105
|
+
"type": "string",
|
|
106
|
+
"description": "Credential action",
|
|
107
|
+
"enum": ["create", "select", "skip"]
|
|
108
|
+
},
|
|
109
|
+
"credentialIdOrKey": {
|
|
110
|
+
"type": "string",
|
|
111
|
+
"description": "Credential ID or key (required when action='select')",
|
|
112
|
+
"minLength": 1
|
|
113
|
+
},
|
|
114
|
+
"config": {
|
|
115
|
+
"type": "object",
|
|
116
|
+
"description": "Credential configuration (required when action='create')",
|
|
117
|
+
"properties": {
|
|
118
|
+
"key": {
|
|
119
|
+
"type": "string",
|
|
120
|
+
"description": "Credential key",
|
|
121
|
+
"pattern": "^[a-z0-9-]+$",
|
|
122
|
+
"minLength": 1
|
|
123
|
+
},
|
|
124
|
+
"displayName": {
|
|
125
|
+
"type": "string",
|
|
126
|
+
"description": "Credential display name",
|
|
127
|
+
"minLength": 1
|
|
128
|
+
},
|
|
129
|
+
"type": {
|
|
130
|
+
"type": "string",
|
|
131
|
+
"description": "Credential type",
|
|
132
|
+
"enum": ["OAUTH2", "API_KEY", "BASIC", "BEARER"]
|
|
133
|
+
},
|
|
134
|
+
"config": {
|
|
135
|
+
"type": "object",
|
|
136
|
+
"description": "Credential-specific configuration",
|
|
137
|
+
"additionalProperties": true
|
|
138
|
+
}
|
|
139
|
+
},
|
|
140
|
+
"required": ["key", "displayName", "type"]
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
"allOf": [
|
|
144
|
+
{
|
|
145
|
+
"if": {
|
|
146
|
+
"properties": { "action": { "const": "select" } }
|
|
147
|
+
},
|
|
148
|
+
"then": {
|
|
149
|
+
"required": ["credentialIdOrKey"]
|
|
150
|
+
}
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
"if": {
|
|
154
|
+
"properties": { "action": { "const": "create" } }
|
|
155
|
+
},
|
|
156
|
+
"then": {
|
|
157
|
+
"required": ["config"]
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
]
|
|
161
|
+
},
|
|
162
|
+
"preferences": {
|
|
163
|
+
"type": "object",
|
|
164
|
+
"description": "Generation preferences",
|
|
165
|
+
"properties": {
|
|
166
|
+
"intent": {
|
|
167
|
+
"type": "string",
|
|
168
|
+
"description": "User intent (any descriptive text, e.g., 'sales-focused CRM integration')",
|
|
169
|
+
"minLength": 1,
|
|
170
|
+
"maxLength": 500
|
|
171
|
+
},
|
|
172
|
+
"fieldOnboardingLevel": {
|
|
173
|
+
"type": "string",
|
|
174
|
+
"description": "Field onboarding level",
|
|
175
|
+
"enum": ["full", "standard", "minimal"],
|
|
176
|
+
"default": "full"
|
|
177
|
+
},
|
|
178
|
+
"enableOpenAPIGeneration": {
|
|
179
|
+
"type": "boolean",
|
|
180
|
+
"description": "Enable OpenAPI operation generation",
|
|
181
|
+
"default": true
|
|
182
|
+
},
|
|
183
|
+
"enableMCP": {
|
|
184
|
+
"type": "boolean",
|
|
185
|
+
"description": "Enable Model Context Protocol",
|
|
186
|
+
"default": false
|
|
187
|
+
},
|
|
188
|
+
"enableABAC": {
|
|
189
|
+
"type": "boolean",
|
|
190
|
+
"description": "Enable Attribute-Based Access Control",
|
|
191
|
+
"default": false
|
|
192
|
+
},
|
|
193
|
+
"enableRBAC": {
|
|
194
|
+
"type": "boolean",
|
|
195
|
+
"description": "Enable Role-Based Access Control",
|
|
196
|
+
"default": false
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
},
|
|
200
|
+
"deployment": {
|
|
201
|
+
"type": "object",
|
|
202
|
+
"description": "Deployment settings (optional overrides)",
|
|
203
|
+
"properties": {
|
|
204
|
+
"controller": {
|
|
205
|
+
"type": "string",
|
|
206
|
+
"description": "Controller URL",
|
|
207
|
+
"pattern": "^https?://.*$"
|
|
208
|
+
},
|
|
209
|
+
"environment": {
|
|
210
|
+
"type": "string",
|
|
211
|
+
"description": "Environment key",
|
|
212
|
+
"enum": ["dev", "tst", "pro", "miso"],
|
|
213
|
+
"default": "dev"
|
|
214
|
+
},
|
|
215
|
+
"dataplane": {
|
|
216
|
+
"type": "string",
|
|
217
|
+
"description": "Dataplane URL (overrides controller lookup)",
|
|
218
|
+
"pattern": "^https?://.*$"
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
},
|
|
223
|
+
"allOf": [
|
|
224
|
+
{
|
|
225
|
+
"if": {
|
|
226
|
+
"properties": { "mode": { "const": "add-datasource" } }
|
|
227
|
+
},
|
|
228
|
+
"then": {
|
|
229
|
+
"required": ["systemIdOrKey"]
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
],
|
|
233
|
+
"additionalProperties": false
|
|
234
|
+
}
|