@aifabrix/builder 2.46.0 → 2.47.1

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 (191) hide show
  1. package/.npmrc.token +1 -0
  2. package/.temp/jest-protection-convert/run-IFN2nv/.protection/hubspot-companies.json +1 -0
  3. package/.temp/jest-protection-convert/run-IvmKLO/.protection/hubspot-companies.yaml +17 -0
  4. package/.temp/jest-protection-convert/run-SdvblF/.protection/hubspot-companies.json +1 -0
  5. package/.temp/jest-protection-convert/run-b51TsW/.protection/hubspot-companies.json +1 -0
  6. package/.temp/jest-protection-convert/run-fiLmb1/.protection/hubspot-companies.json +1 -0
  7. package/.temp/jest-protection-convert/run-qYGHMU/.protection/hubspot-companies.yaml +17 -0
  8. package/.temp/jest-protection-fixtures/hubspot-Mq5re8/hubspot-companies.yaml +17 -0
  9. package/.temp/jest-protection-fixtures/hubspot-f3u4YL/hubspot-companies.yaml +17 -0
  10. package/.temp/jest-protection-fixtures/hubspot-iQtd1O/hubspot-companies.yaml +17 -0
  11. package/.temp/jest-protection-fixtures/hubspot-mdmz5M/hubspot-companies.yaml +17 -0
  12. package/.temp/jest-protection-fixtures/hubspot-qbKYxQ/hubspot-companies.yaml +17 -0
  13. package/.temp/jest-protection-fixtures/hubspot-yzlJy6/hubspot-companies.yaml +17 -0
  14. package/.temp/validation/summary.txt +5 -0
  15. package/jest.isolated-projects.js +18 -2
  16. package/jest.projects.js +24 -0
  17. package/lib/api/dataplane-health.api.js +19 -7
  18. package/lib/api/lifecycle.api.js +22 -1
  19. package/lib/api/resource-types.api.js +107 -0
  20. package/lib/api/runtime-configuration.api.js +72 -0
  21. package/lib/api/types/resource-types.types.js +45 -0
  22. package/lib/api/user-groups.api.js +9 -9
  23. package/lib/api/users.api.js +8 -8
  24. package/lib/api/wizard.api.js +10 -2
  25. package/lib/app/down.js +58 -26
  26. package/lib/app/index.js +2 -2
  27. package/lib/app/run-resolve-image.js +2 -1
  28. package/lib/app/run-stop-containers.js +113 -0
  29. package/lib/app/run.js +1 -31
  30. package/lib/app/show-display.js +35 -0
  31. package/lib/app/show.js +32 -1
  32. package/lib/build/index.js +17 -5
  33. package/lib/build/miso-controller-npm-sdk-guard.js +25 -0
  34. package/lib/channels/add-channel.js +348 -0
  35. package/lib/channels/channel-artifact-generator.js +141 -0
  36. package/lib/channels/channel-audit.js +101 -0
  37. package/lib/channels/channel-auth-context.js +37 -0
  38. package/lib/channels/channel-credential.js +200 -0
  39. package/lib/channels/channel-display-name.js +64 -0
  40. package/lib/channels/channel-external-system.js +106 -0
  41. package/lib/channels/channel-integration-generator.js +274 -0
  42. package/lib/channels/channel-probe.js +89 -0
  43. package/lib/channels/channel-runtime-resolver.js +152 -0
  44. package/lib/channels/channel-status-display.js +141 -0
  45. package/lib/channels/channel-targets.js +115 -0
  46. package/lib/cli/index.js +18 -4
  47. package/lib/cli/infra-guided-auth.js +36 -12
  48. package/lib/cli/setup-app.js +54 -3
  49. package/lib/cli/setup-infra-up-dataplane-action.js +2 -2
  50. package/lib/cli/setup-infra-up-platform-action.js +2 -1
  51. package/lib/cli/setup-npm.js +59 -0
  52. package/lib/cli/setup-platform.js +1 -1
  53. package/lib/cli/setup-secrets.js +1 -1
  54. package/lib/cli/setup-utility-help-after.js +4 -1
  55. package/lib/cli/setup-utility-resolve.js +8 -5
  56. package/lib/commands/app-logs.js +54 -26
  57. package/lib/commands/app.js +41 -0
  58. package/lib/commands/auth-status-dataplane-version.js +97 -61
  59. package/lib/commands/auth-status.js +2 -7
  60. package/lib/commands/channel.js +58 -0
  61. package/lib/commands/datasource.js +1 -1
  62. package/lib/commands/identity-apply-sync.js +49 -8
  63. package/lib/commands/identity-group-cli.js +66 -26
  64. package/lib/commands/identity-membership-role-cache.js +58 -37
  65. package/lib/commands/identity-shared.js +22 -1
  66. package/lib/commands/identity-user-cli.js +80 -34
  67. package/lib/commands/login-device.js +11 -3
  68. package/lib/commands/login.js +8 -3
  69. package/lib/commands/npm-config.js +103 -0
  70. package/lib/commands/repair-auth-apply.js +30 -4
  71. package/lib/commands/repair-auth-config.js +8 -13
  72. package/lib/commands/repair-datasource-com-v2.js +15 -0
  73. package/lib/commands/repair-datasource-service-contract.js +206 -0
  74. package/lib/commands/repair-datasource.js +53 -18
  75. package/lib/commands/repair-env-template.js +12 -12
  76. package/lib/commands/repair-openapi-sync.js +26 -4
  77. package/lib/commands/repair-steps.js +28 -13
  78. package/lib/commands/repair-system-alignment.js +7 -4
  79. package/lib/commands/resource-type.js +371 -0
  80. package/lib/commands/setup-modes.js +1 -1
  81. package/lib/commands/setup-prompts-platform-mode.js +24 -21
  82. package/lib/commands/test-trust-external.js +39 -90
  83. package/lib/commands/up-common.js +33 -1
  84. package/lib/commands/up-dataplane.js +8 -4
  85. package/lib/commands/upload.js +24 -3
  86. package/lib/commands/verify-trust-command-action.js +4 -1
  87. package/lib/commands/verify-trust-external.js +12 -20
  88. package/lib/core/config-setup-platform-mode.js +3 -3
  89. package/lib/core/setup-platform-mode.js +41 -6
  90. package/lib/datasource/capability/capability-diff-slice.js +2 -2
  91. package/lib/datasource/capability/capability-manifest.js +254 -0
  92. package/lib/datasource/capability/capability-resolve.js +3 -4
  93. package/lib/datasource/capability/copy-operations.js +5 -3
  94. package/lib/datasource/capability/remove-operations.js +2 -1
  95. package/lib/datasource/capability/run-capability-copy.js +32 -4
  96. package/lib/datasource/capability/run-capability-diff.js +3 -3
  97. package/lib/datasource/capability/run-capability-dimension.js +2 -4
  98. package/lib/datasource/capability/run-capability-edit.js +4 -7
  99. package/lib/datasource/capability/run-capability-relate.js +2 -4
  100. package/lib/datasource/capability/run-capability-remove.js +2 -4
  101. package/lib/datasource/capability/validate-capability-slice.js +2 -1
  102. package/lib/datasource/datasource-identifier.js +2 -1
  103. package/lib/datasource/datasource-validate-display.js +1 -1
  104. package/lib/datasource/field-reference-validator.js +24 -3
  105. package/lib/datasource/orphan-profiles-validator.js +98 -0
  106. package/lib/datasource/validate.js +41 -23
  107. package/lib/external-system/download-helpers.js +87 -0
  108. package/lib/external-system/download.js +61 -122
  109. package/lib/external-system/generator.js +1 -59
  110. package/lib/external-system/test.js +10 -15
  111. package/lib/generator/builders.js +11 -1
  112. package/lib/generator/external-controller-manifest.js +5 -2
  113. package/lib/generator/split.js +3 -1
  114. package/lib/generator/wizard.js +1 -28
  115. package/lib/identity/fk-reference.js +65 -0
  116. package/lib/identity/identity-apply-core.js +13 -58
  117. package/lib/identity/identity-apply-phases.js +5 -1
  118. package/lib/identity/identity-display.js +243 -0
  119. package/lib/identity/identity-response-helpers.js +52 -0
  120. package/lib/identity/identity-sync-errors.js +62 -0
  121. package/lib/identity/resolve-user-id.js +129 -0
  122. package/lib/identity/username-default.js +31 -0
  123. package/lib/lifecycle/certification-progress.js +2 -2
  124. package/lib/lifecycle/report-display-trust.js +70 -0
  125. package/lib/lifecycle/report-display.js +14 -13
  126. package/lib/resolvers/datasource-resolver.js +2 -3
  127. package/lib/resolvers/resource-type-file.js +159 -0
  128. package/lib/schema/application-schema.json +16 -0
  129. package/lib/schema/deployment-rules.yaml +2 -1
  130. package/lib/schema/external-datasource.schema.json +372 -58
  131. package/lib/schema/external-system.schema.json +331 -2
  132. package/lib/schema/type/document-storage.json +9 -5
  133. package/lib/utils/api.js +2 -1
  134. package/lib/utils/app-run-containers.js +25 -2
  135. package/lib/utils/authentication-shape.js +224 -0
  136. package/lib/utils/build-copy.js +36 -5
  137. package/lib/utils/build-resolve-image.js +66 -12
  138. package/lib/utils/celery-companion-apps.js +53 -0
  139. package/lib/utils/cli-utils.js +4 -0
  140. package/lib/utils/compose-celery-worker.js +23 -0
  141. package/lib/utils/compose-generate-docker-compose.js +9 -1
  142. package/lib/utils/configuration-env-resolver.js +36 -0
  143. package/lib/utils/controller-url.js +4 -1
  144. package/lib/utils/credential-secrets-env-kv.js +216 -0
  145. package/lib/utils/credential-secrets-env.js +52 -262
  146. package/lib/utils/dataplane-resolver.js +4 -115
  147. package/lib/utils/declarative-url-ports.js +24 -1
  148. package/lib/utils/dev-platform-tls.js +148 -0
  149. package/lib/utils/docker-build.js +1 -4
  150. package/lib/utils/external-env-template.js +10 -3
  151. package/lib/utils/external-system-validators.js +8 -2
  152. package/lib/utils/health-check-request.js +114 -0
  153. package/lib/utils/health-check-url.js +3 -1
  154. package/lib/utils/health-check.js +1 -113
  155. package/lib/utils/help-builder.js +3 -0
  156. package/lib/utils/keycloak-realm-ready.js +5 -1
  157. package/lib/utils/localhost-public-host.js +31 -0
  158. package/lib/utils/npm-user-config.js +145 -0
  159. package/lib/utils/paths.js +25 -0
  160. package/lib/utils/platform-controller-url.js +58 -4
  161. package/lib/utils/platform-kv-ref.js +57 -0
  162. package/lib/utils/runtime-configuration-download.js +189 -0
  163. package/lib/utils/runtime-configuration-values.js +119 -0
  164. package/lib/utils/schema-loader.js +19 -4
  165. package/lib/utils/url-declarative-public-base.js +33 -25
  166. package/lib/utils/worker-sidecars.js +142 -0
  167. package/lib/validation/external-manifest-validator.js +2 -0
  168. package/lib/validation/runtime-configuration-rules.js +98 -0
  169. package/lib/validation/validate-display-dimensions.js +154 -0
  170. package/lib/validation/validate-display-sections.js +276 -0
  171. package/lib/validation/validate-display-steps.js +67 -0
  172. package/lib/validation/validate-display.js +24 -402
  173. package/package.json +1 -1
  174. package/templates/applications/dataplane/application.yaml +5 -0
  175. package/templates/applications/dataplane/env.template +26 -13
  176. package/templates/applications/dataplane/rbac.yaml +108 -1
  177. package/templates/applications/miso-controller/application.yaml +2 -2
  178. package/templates/applications/miso-controller/env.template +37 -122
  179. package/templates/applications/miso-controller/rbac.yaml +28 -13
  180. package/templates/channels/chatgpt/install.template.md.hbs +49 -0
  181. package/templates/channels/chatgpt/manifest.template.json.hbs +9 -0
  182. package/templates/channels/microsoft-copilot/install.template.md.hbs +49 -0
  183. package/templates/channels/microsoft-copilot/manifest.template.json.hbs +8 -0
  184. package/templates/channels/slack/install.template.md.hbs +49 -0
  185. package/templates/channels/slack/manifest.template.json.hbs +66 -0
  186. package/templates/channels/teams-bot/install.template.md.hbs +49 -0
  187. package/templates/channels/teams-bot/manifest.template.json.hbs +13 -0
  188. package/templates/channels/web-embed/install.template.md.hbs +49 -0
  189. package/templates/channels/web-embed/manifest.template.json.hbs +8 -0
  190. package/templates/python/docker-compose.hbs +56 -0
  191. package/templates/typescript/docker-compose.hbs +52 -0
@@ -7,12 +7,12 @@
7
7
  "key": "external-system-schema",
8
8
  "name": "External System Configuration Schema",
9
9
  "description": "JSON schema for validating ExternalSystem configuration files",
10
- "version": "1.7.0",
10
+ "version": "1.9.0",
11
11
  "type": "schema",
12
12
  "category": "integration",
13
13
  "author": "AI Fabrix Team",
14
14
  "createdAt": "2024-01-01T00:00:00Z",
15
- "updatedAt": "2026-05-20T00:00:00Z",
15
+ "updatedAt": "2026-06-15T00:00:00Z",
16
16
  "compatibility": {
17
17
  "minVersion": "1.4.0",
18
18
  "maxVersion": "2.0.0",
@@ -27,6 +27,23 @@
27
27
  ],
28
28
  "dependencies": [],
29
29
  "changelog": [
30
+ {
31
+ "version": "1.9.0",
32
+ "date": "2026-06-15T00:00:00Z",
33
+ "changes": [
34
+ "Added systemKind digitalWorker to x-systemKindCatalog (enterpriseContext group).",
35
+ "Extended subscriptionFilter with roleKeys, includeSystemKinds, and excludeSystemKinds for Digital Worker generation inputs."
36
+ ],
37
+ "breaking": false
38
+ },
39
+ {
40
+ "version": "1.8.0",
41
+ "date": "2026-06-11T00:00:00Z",
42
+ "changes": [
43
+ "Added x-systemKindCatalog as single source of truth for systemKind keys, displayName labels, and UX filter groups (enterpriseContext, externalSystems, platformServices)."
44
+ ],
45
+ "breaking": false
46
+ },
30
47
  {
31
48
  "version": "1.7.0",
32
49
  "date": "2026-05-20T00:00:00Z",
@@ -125,6 +142,141 @@
125
142
  ]
126
143
  },
127
144
  "$defs": {
145
+ "subscriptionFilter": {
146
+ "type": "object",
147
+ "description": "Shared filter engine shape for subscription triggers and Digital Worker generation inputs.",
148
+ "properties": {
149
+ "resourceTypes": {
150
+ "type": "array",
151
+ "items": {
152
+ "type": "string",
153
+ "minLength": 1
154
+ },
155
+ "minItems": 1
156
+ },
157
+ "systemKeys": {
158
+ "type": "array",
159
+ "items": {
160
+ "type": "string",
161
+ "minLength": 1
162
+ },
163
+ "minItems": 1
164
+ },
165
+ "datasourceKeys": {
166
+ "type": "array",
167
+ "items": {
168
+ "type": "string",
169
+ "minLength": 1
170
+ },
171
+ "minItems": 1
172
+ },
173
+ "roleKeys": {
174
+ "type": "array",
175
+ "items": {
176
+ "type": "string",
177
+ "minLength": 1
178
+ },
179
+ "minItems": 1,
180
+ "description": "Role keys that scope Digital Worker or subscription generation."
181
+ },
182
+ "includeSystemKinds": {
183
+ "type": "array",
184
+ "items": {
185
+ "type": "string",
186
+ "minLength": 1
187
+ },
188
+ "minItems": 1,
189
+ "description": "Include external systems whose systemKind matches any listed value."
190
+ },
191
+ "excludeSystemKinds": {
192
+ "type": "array",
193
+ "items": {
194
+ "type": "string",
195
+ "minLength": 1
196
+ },
197
+ "minItems": 1,
198
+ "description": "Exclude external systems whose systemKind matches any listed value."
199
+ }
200
+ },
201
+ "additionalProperties": false
202
+ },
203
+ "subscriptionTask": {
204
+ "type": "object",
205
+ "required": [
206
+ "type"
207
+ ],
208
+ "properties": {
209
+ "type": {
210
+ "type": "string",
211
+ "enum": [
212
+ "compileCom",
213
+ "generateEnterpriseDatasources",
214
+ "generateRestContracts",
215
+ "generateMcpContracts"
216
+ ],
217
+ "description": "Platform task type executed when the subscription fires."
218
+ },
219
+ "version": {
220
+ "type": "integer",
221
+ "minimum": 1,
222
+ "default": 1,
223
+ "description": "Task definition version snapshot for audit."
224
+ }
225
+ },
226
+ "additionalProperties": false
227
+ },
228
+ "subscriptionEntry": {
229
+ "type": "object",
230
+ "required": [
231
+ "key",
232
+ "event",
233
+ "task"
234
+ ],
235
+ "properties": {
236
+ "key": {
237
+ "type": "string",
238
+ "pattern": "^[a-z][a-z0-9-]*$",
239
+ "minLength": 1,
240
+ "maxLength": 100,
241
+ "description": "Unique subscription key within the external system."
242
+ },
243
+ "displayName": {
244
+ "type": "string",
245
+ "maxLength": 255
246
+ },
247
+ "description": {
248
+ "type": "string",
249
+ "maxLength": 2000
250
+ },
251
+ "event": {
252
+ "type": "string",
253
+ "minLength": 1,
254
+ "description": "V1 event namespace (platform.* or schedule.*)."
255
+ },
256
+ "filter": {
257
+ "$ref": "#/$defs/subscriptionFilter"
258
+ },
259
+ "task": {
260
+ "$ref": "#/$defs/subscriptionTask"
261
+ },
262
+ "priority": {
263
+ "type": "string",
264
+ "enum": [
265
+ "low",
266
+ "normal",
267
+ "high",
268
+ "critical"
269
+ ],
270
+ "default": "normal"
271
+ },
272
+ "runOnCreate": {
273
+ "type": "boolean",
274
+ "default": false,
275
+ "description": "When true, run the subscription task once after publish/sync."
276
+ }
277
+ },
278
+ "additionalProperties": false
279
+ },
128
280
  "authenticationVariablesByMethod": {
129
281
  "oauth2": {
130
282
  "variables": [
@@ -459,6 +611,145 @@
459
611
  "additionalProperties": false
460
612
  }
461
613
  },
614
+ "x-systemKindCatalog": {
615
+ "description": "Single source of truth for systemKind keys, display labels, and UX filter groups. Runtime catalog API and validators derive from this block.",
616
+ "groups": [
617
+ {
618
+ "key": "enterpriseContext",
619
+ "displayName": "Enterprise Context"
620
+ },
621
+ {
622
+ "key": "externalSystems",
623
+ "displayName": "External Systems"
624
+ },
625
+ {
626
+ "key": "platformServices",
627
+ "displayName": "Platform Services"
628
+ }
629
+ ],
630
+ "kinds": [
631
+ {
632
+ "key": "crm",
633
+ "displayName": "CRM",
634
+ "group": "externalSystems"
635
+ },
636
+ {
637
+ "key": "erp",
638
+ "displayName": "ERP",
639
+ "group": "externalSystems"
640
+ },
641
+ {
642
+ "key": "hr",
643
+ "displayName": "HR",
644
+ "group": "externalSystems"
645
+ },
646
+ {
647
+ "key": "finance",
648
+ "displayName": "Finance",
649
+ "group": "externalSystems"
650
+ },
651
+ {
652
+ "key": "projectManagement",
653
+ "displayName": "Project Management",
654
+ "group": "externalSystems"
655
+ },
656
+ {
657
+ "key": "customerService",
658
+ "displayName": "Customer Service",
659
+ "group": "externalSystems"
660
+ },
661
+ {
662
+ "key": "marketing",
663
+ "displayName": "Marketing",
664
+ "group": "externalSystems"
665
+ },
666
+ {
667
+ "key": "procurement",
668
+ "displayName": "Procurement",
669
+ "group": "externalSystems"
670
+ },
671
+ {
672
+ "key": "supplyChain",
673
+ "displayName": "Supply Chain",
674
+ "group": "externalSystems"
675
+ },
676
+ {
677
+ "key": "collaboration",
678
+ "displayName": "Collaboration",
679
+ "group": "externalSystems"
680
+ },
681
+ {
682
+ "key": "communication",
683
+ "displayName": "Communication",
684
+ "group": "externalSystems"
685
+ },
686
+ {
687
+ "key": "documentManagement",
688
+ "displayName": "Document Management",
689
+ "group": "externalSystems"
690
+ },
691
+ {
692
+ "key": "identity",
693
+ "displayName": "Identity",
694
+ "group": "platformServices"
695
+ },
696
+ {
697
+ "key": "analytics",
698
+ "displayName": "Analytics",
699
+ "group": "platformServices"
700
+ },
701
+ {
702
+ "key": "dataPlatform",
703
+ "displayName": "Data Platform",
704
+ "group": "platformServices"
705
+ },
706
+ {
707
+ "key": "database",
708
+ "displayName": "Database",
709
+ "group": "platformServices"
710
+ },
711
+ {
712
+ "key": "vectorStore",
713
+ "displayName": "Vector Store",
714
+ "group": "platformServices"
715
+ },
716
+ {
717
+ "key": "llm",
718
+ "displayName": "LLM",
719
+ "group": "platformServices"
720
+ },
721
+ {
722
+ "key": "workflow",
723
+ "displayName": "Workflow",
724
+ "group": "platformServices"
725
+ },
726
+ {
727
+ "key": "integration",
728
+ "displayName": "Integration",
729
+ "group": "platformServices"
730
+ },
731
+ {
732
+ "key": "monitoring",
733
+ "displayName": "Monitoring",
734
+ "group": "platformServices"
735
+ },
736
+ {
737
+ "key": "enterpriseKnowledge",
738
+ "displayName": "Enterprise Knowledge",
739
+ "group": "enterpriseContext"
740
+ },
741
+ {
742
+ "key": "digitalWorker",
743
+ "displayName": "Digital Worker",
744
+ "group": "enterpriseContext"
745
+ },
746
+ {
747
+ "key": "custom",
748
+ "displayName": "Custom",
749
+ "group": null
750
+ }
751
+ ]
752
+ },
462
753
  "type": "object",
463
754
  "required": [
464
755
  "key",
@@ -1016,6 +1307,44 @@
1016
1307
  },
1017
1308
  "additionalProperties": false
1018
1309
  },
1310
+ "systemKind": {
1311
+ "type": "string",
1312
+ "enum": [
1313
+ "crm",
1314
+ "erp",
1315
+ "hr",
1316
+ "finance",
1317
+ "projectManagement",
1318
+ "customerService",
1319
+ "marketing",
1320
+ "procurement",
1321
+ "supplyChain",
1322
+ "collaboration",
1323
+ "communication",
1324
+ "documentManagement",
1325
+ "identity",
1326
+ "analytics",
1327
+ "dataPlatform",
1328
+ "database",
1329
+ "vectorStore",
1330
+ "llm",
1331
+ "workflow",
1332
+ "integration",
1333
+ "monitoring",
1334
+ "enterpriseKnowledge",
1335
+ "digitalWorker",
1336
+ "custom"
1337
+ ],
1338
+ "default": "custom",
1339
+ "description": "Enterprise system classification metadata (CRM, LLM, enterprise knowledge, etc.). Does not affect execution or routing. Valid keys, display labels, and UX groups are defined in x-systemKindCatalog at schema root — not stored per row."
1340
+ },
1341
+ "subscriptions": {
1342
+ "type": "array",
1343
+ "description": "Event subscriptions that bootstrap platform tasks on publish/sync. Runtime uses persisted Subscription rows after sync.",
1344
+ "items": {
1345
+ "$ref": "#/$defs/subscriptionEntry"
1346
+ }
1347
+ },
1019
1348
  "certification": {
1020
1349
  "type": "object",
1021
1350
  "description": "Public certification settings for external system version verification.",
@@ -7,7 +7,7 @@
7
7
  "key": "document-storage-schema",
8
8
  "name": "Document Storage Configuration Schema",
9
9
  "description": "JSON schema for validating document storage configurations",
10
- "version": "1.7.0",
10
+ "version": "1.8.0",
11
11
  "type": "schema",
12
12
  "category": "document-storage",
13
13
  "author": "AI Fabrix Team",
@@ -103,6 +103,14 @@
103
103
  "Added optional maxBinaryFetchConcurrency (integer >= 1, default 1) to bound parallel binary fetches in two-phase sync phase 3"
104
104
  ],
105
105
  "breaking": false
106
+ },
107
+ {
108
+ "version": "1.8.0",
109
+ "date": "2026-06-15T00:00:00Z",
110
+ "changes": [
111
+ "Removed processing.aiPrompt — use COM field hints (441.1) instead; no backward compatibility"
112
+ ],
113
+ "breaking": true
106
114
  }
107
115
  ]
108
116
  },
@@ -223,10 +231,6 @@
223
231
  },
224
232
  "additionalProperties": false
225
233
  },
226
- "aiPrompt": {
227
- "type": "string",
228
- "description": "Approved AI prompt text stored in the manifest."
229
- },
230
234
  "spacyEnrichment": {
231
235
  "type": "object",
232
236
  "description": "spaCy enrichment configuration.",
package/lib/utils/api.js CHANGED
@@ -12,6 +12,7 @@
12
12
 
13
13
  const { parseErrorResponse, formatNetworkError } = require('./api-error-handler');
14
14
  const { inferServiceLabelFromUrl } = require('./service-url-label');
15
+ const { fetchWithOptionalDevPlatformTls } = require('./dev-platform-tls');
15
16
  const auditLogger = require('../core/audit-logger');
16
17
 
17
18
  /** Default timeout for HTTP requests (ms). Prevents hanging when the controller is unreachable. 30s allows Azure Web App cold start to complete. */
@@ -350,7 +351,7 @@ async function makeApiCall(url, options = {}) {
350
351
  const { fetchOptions, singleRequestTimeoutMs } = prepareFetchOptionsForRequest(options);
351
352
 
352
353
  try {
353
- const response = await fetch(url, fetchOptions);
354
+ const response = await fetchWithOptionalDevPlatformTls(url, fetchOptions);
354
355
  const duration = Date.now() - startTime;
355
356
 
356
357
  if (!response.ok) {
@@ -85,6 +85,27 @@ async function logContainerDebugInfo(containerName) {
85
85
  logger.log(chalk.gray(`[DEBUG] Container ports: ${ports.trim()}`));
86
86
  }
87
87
 
88
+ /**
89
+ * @param {string} stdout - `docker ps --format "{{.Names}}"` output
90
+ * @returns {string[]}
91
+ */
92
+ function parseDockerPsNameLines(stdout) {
93
+ return String(stdout || '')
94
+ .split('\n')
95
+ .map((line) => line.trim())
96
+ .filter(Boolean);
97
+ }
98
+
99
+ /**
100
+ * True when an exact container name appears in docker ps output (not a substring sibling).
101
+ * @param {string} containerName
102
+ * @param {string} stdout
103
+ * @returns {boolean}
104
+ */
105
+ function isExactContainerNameInPsOutput(containerName, stdout) {
106
+ return parseDockerPsNameLines(stdout).includes(containerName);
107
+ }
108
+
88
109
  async function checkContainerRunning(appName, developerId, debug = false, scopeOpts = null) {
89
110
  try {
90
111
  const containerName = getContainerName(appName, developerId, scopeOpts);
@@ -93,7 +114,7 @@ async function checkContainerRunning(appName, developerId, debug = false, scopeO
93
114
  logger.log(chalk.gray(`[DEBUG] Executing: ${cmd}`));
94
115
  }
95
116
  const { stdout } = await execWithDockerEnv(cmd);
96
- const isRunning = stdout.trim() === containerName;
117
+ const isRunning = isExactContainerNameInPsOutput(containerName, stdout);
97
118
  if (debug) {
98
119
  logger.log(chalk.gray(`[DEBUG] Container ${containerName} running: ${isRunning}`));
99
120
  if (isRunning) {
@@ -161,6 +182,8 @@ module.exports = {
161
182
  checkContainerRunning,
162
183
  stopAndRemoveContainer,
163
184
  logContainerStatus,
164
- getContainerName
185
+ getContainerName,
186
+ parseDockerPsNameLines,
187
+ isExactContainerNameInPsOutput
165
188
  };
166
189
 
@@ -0,0 +1,224 @@
1
+ /**
2
+ * External system authentication shape helpers (schema 2.4.x nested credential).
3
+ *
4
+ * @fileoverview Normalize flat legacy auth blocks to authType + credential template
5
+ * @author AI Fabrix Team
6
+ * @version 1.0.0
7
+ */
8
+
9
+ 'use strict';
10
+
11
+ const { getKvPathSegmentForSecurityKey } = require('./credential-secrets-env');
12
+
13
+ /**
14
+ * @param {Object|null|undefined} authentication
15
+ * @returns {Object|null} Credential template (method, variables, security) or null
16
+ */
17
+ function getAuthCredentialTemplate(authentication) {
18
+ if (!authentication || typeof authentication !== 'object') {
19
+ return null;
20
+ }
21
+ if (authentication.authType === 'credential' && authentication.credential) {
22
+ return authentication.credential;
23
+ }
24
+ if (authentication.method) {
25
+ return authentication;
26
+ }
27
+ return null;
28
+ }
29
+
30
+ /**
31
+ * @param {Object|null|undefined} authentication
32
+ * @returns {string}
33
+ */
34
+ function getAuthMethodFromAuthentication(authentication) {
35
+ const credential = getAuthCredentialTemplate(authentication);
36
+ return String(credential?.method || authentication?.method || '').trim();
37
+ }
38
+
39
+ /**
40
+ * Builds flat credential template fields (method, variables, security) for a method.
41
+ * @param {string} systemKey
42
+ * @param {string} authType
43
+ * @returns {{ method: string, variables: Object, security: Object }}
44
+ */
45
+ function buildFlatCredentialTemplate(systemKey, authType) {
46
+ const kvPath = (securityKey) => {
47
+ const segment = getKvPathSegmentForSecurityKey(securityKey);
48
+ return segment ? `kv://${systemKey}/${segment}` : null;
49
+ };
50
+ const method = authType || 'apikey';
51
+ const base = 'https://api.example.com';
52
+
53
+ const authMap = {
54
+ oauth2: {
55
+ variables: { baseUrl: base, tokenUrl: `${base}/oauth/token`, authorizationUrl: `${base}/oauth/authorize` },
56
+ security: { clientId: kvPath('clientId'), clientSecret: kvPath('clientSecret') }
57
+ },
58
+ aad: {
59
+ variables: {
60
+ baseUrl: base,
61
+ tokenUrl: 'https://login.microsoftonline.com/{tenant}/oauth2/v2.0/token',
62
+ tenantId: '{tenant-id}'
63
+ },
64
+ security: { clientId: kvPath('clientId'), clientSecret: kvPath('clientSecret') }
65
+ },
66
+ apikey: {
67
+ variables: { baseUrl: base, headerName: 'X-API-Key' },
68
+ security: { apiKey: kvPath('apiKey') }
69
+ },
70
+ bearerToken: {
71
+ variables: { baseUrl: base, headerName: 'Authorization', prefix: 'Bearer' },
72
+ security: { token: kvPath('token') }
73
+ },
74
+ basic: {
75
+ variables: { baseUrl: base },
76
+ security: { username: kvPath('username'), password: kvPath('password') }
77
+ },
78
+ queryParam: {
79
+ variables: { baseUrl: base, paramName: 'api_key' },
80
+ security: { paramValue: kvPath('paramValue') }
81
+ },
82
+ oidc: {
83
+ variables: { openIdConfigUrl: 'https://example.com/.well-known/openid-configuration', clientId: 'app-id' },
84
+ security: {}
85
+ },
86
+ hmac: {
87
+ variables: { baseUrl: base, algorithm: 'sha256', signatureHeader: 'X-Signature' },
88
+ security: { signingSecret: kvPath('signingSecret') }
89
+ },
90
+ none: {
91
+ variables: {},
92
+ security: {}
93
+ }
94
+ };
95
+
96
+ const auth = authMap[method] || authMap.apikey;
97
+ return { method, variables: auth.variables, security: auth.security };
98
+ }
99
+
100
+ /**
101
+ * Builds schema-compliant authentication block for external-system.schema.json.
102
+ * @param {string} systemKey
103
+ * @param {string} authType - oauth2, apikey, bearerToken, none, …
104
+ * @returns {Object}
105
+ */
106
+ function buildAuthenticationFromMethod(systemKey, authType) {
107
+ const method = authType || 'apikey';
108
+ if (method === 'none') {
109
+ return { authType: 'none' };
110
+ }
111
+ const flat = buildFlatCredentialTemplate(systemKey, method);
112
+ return {
113
+ authType: 'credential',
114
+ credential: {
115
+ credentialKey: `${systemKey}-cred`,
116
+ method: flat.method,
117
+ variables: flat.variables,
118
+ security: flat.security,
119
+ writeOnce: true
120
+ }
121
+ };
122
+ }
123
+
124
+ /**
125
+ * @param {Object} authentication
126
+ * @param {string} systemKey
127
+ * @returns {{ authentication: Object, changed: boolean }}
128
+ */
129
+ function normalizeNestedCredentialBlock(authentication, systemKey) {
130
+ const credential = { ...authentication.credential };
131
+ let changed = Object.keys(authentication).some((k) => !['authType', 'credential'].includes(k));
132
+ if (!credential.credentialKey) {
133
+ credential.credentialKey = `${systemKey}-cred`;
134
+ changed = true;
135
+ }
136
+ if (credential.writeOnce === undefined) {
137
+ credential.writeOnce = true;
138
+ changed = true;
139
+ }
140
+ return { authentication: { authType: 'credential', credential }, changed };
141
+ }
142
+
143
+ /**
144
+ * @param {Object} flatAuth
145
+ * @param {string} systemKey
146
+ * @returns {{ authentication: Object, changed: boolean }}
147
+ */
148
+ function wrapFlatAuthAsNested(flatAuth, systemKey) {
149
+ const credential = {
150
+ credentialKey: flatAuth.credentialKey || `${systemKey}-cred`,
151
+ method: flatAuth.method,
152
+ variables: flatAuth.variables && typeof flatAuth.variables === 'object' ? flatAuth.variables : {},
153
+ security: flatAuth.security && typeof flatAuth.security === 'object' ? flatAuth.security : {},
154
+ writeOnce: flatAuth.writeOnce !== false
155
+ };
156
+ if (flatAuth.displayName) {
157
+ credential.displayName = flatAuth.displayName;
158
+ }
159
+ return { authentication: { authType: 'credential', credential }, changed: true };
160
+ }
161
+
162
+ /**
163
+ * Migrates legacy flat authentication to nested authType + credential.
164
+ * @param {Object|null|undefined} authentication
165
+ * @param {string} systemKey
166
+ * @returns {{ authentication: Object, changed: boolean }}
167
+ */
168
+ function migrateAuthenticationToNestedSchema(authentication, systemKey) {
169
+ if (!authentication || typeof authentication !== 'object') {
170
+ return { authentication: authentication || { authType: 'none' }, changed: false };
171
+ }
172
+ if (authentication.authType === 'none') {
173
+ return { authentication: { authType: 'none' }, changed: false };
174
+ }
175
+ if (authentication.authType === 'apiProvider' && authentication.apiProvider) {
176
+ return { authentication, changed: false };
177
+ }
178
+ if (authentication.authType === 'credential' && authentication.credential) {
179
+ return normalizeNestedCredentialBlock(authentication, systemKey);
180
+ }
181
+ if (authentication.method) {
182
+ return wrapFlatAuthAsNested(authentication, systemKey);
183
+ }
184
+ return { authentication, changed: false };
185
+ }
186
+
187
+ /**
188
+ * Align credential kv:// paths and credentialKey with the integration system key (wizard output).
189
+ * @param {Object|null|undefined} authentication
190
+ * @param {string} systemKey
191
+ * @param {string} [authDisplayName]
192
+ */
193
+ function normalizeAuthenticationToSystemKey(authentication, systemKey, authDisplayName) {
194
+ if (!authentication || typeof authentication !== 'object') return;
195
+ const migrated = migrateAuthenticationToNestedSchema(authentication, systemKey);
196
+ Object.assign(authentication, migrated.authentication);
197
+ const credential = authentication.authType === 'credential' ? authentication.credential : null;
198
+ if (!credential) return;
199
+ credential.credentialKey = `${systemKey}-cred`;
200
+ const security = credential.security;
201
+ if (security && typeof security === 'object') {
202
+ for (const k of Object.keys(security)) {
203
+ const v = security[k];
204
+ if (typeof v === 'string' && v.startsWith('kv://')) {
205
+ const rest = v.slice(5);
206
+ const idx = rest.indexOf('/');
207
+ const suffix = idx >= 0 ? rest.slice(idx + 1) : '';
208
+ security[k] = suffix ? `kv://${systemKey}/${suffix}` : `kv://${systemKey}`;
209
+ }
210
+ }
211
+ }
212
+ if (authDisplayName) {
213
+ credential.displayName = authDisplayName;
214
+ }
215
+ }
216
+
217
+ module.exports = {
218
+ getAuthCredentialTemplate,
219
+ getAuthMethodFromAuthentication,
220
+ buildFlatCredentialTemplate,
221
+ buildAuthenticationFromMethod,
222
+ migrateAuthenticationToNestedSchema,
223
+ normalizeAuthenticationToSystemKey
224
+ };