@aifabrix/builder 2.40.0 → 2.41.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 (108) hide show
  1. package/README.md +7 -5
  2. package/integration/hubspot/test.js +1 -1
  3. package/jest.config.manual.js +29 -0
  4. package/lib/api/credential.api.js +40 -0
  5. package/lib/api/dev.api.js +423 -0
  6. package/lib/api/types/credential.types.js +23 -0
  7. package/lib/api/types/dev.types.js +140 -0
  8. package/lib/app/config.js +21 -0
  9. package/lib/app/down.js +2 -1
  10. package/lib/app/index.js +9 -0
  11. package/lib/app/push.js +36 -12
  12. package/lib/app/readme.js +1 -3
  13. package/lib/app/run-env-compose.js +201 -0
  14. package/lib/app/run-helpers.js +121 -118
  15. package/lib/app/run.js +148 -28
  16. package/lib/app/show.js +5 -2
  17. package/lib/build/index.js +11 -3
  18. package/lib/cli/setup-app.js +140 -14
  19. package/lib/cli/setup-auth.js +1 -0
  20. package/lib/cli/setup-dev.js +180 -17
  21. package/lib/cli/setup-environment.js +4 -2
  22. package/lib/cli/setup-external-system.js +71 -21
  23. package/lib/cli/setup-infra.js +29 -2
  24. package/lib/cli/setup-secrets.js +52 -5
  25. package/lib/cli/setup-utility.js +19 -4
  26. package/lib/commands/app-install.js +172 -0
  27. package/lib/commands/app-shell.js +75 -0
  28. package/lib/commands/app-test.js +282 -0
  29. package/lib/commands/app.js +1 -1
  30. package/lib/commands/auth-status.js +36 -3
  31. package/lib/commands/dev-cli-handlers.js +141 -0
  32. package/lib/commands/dev-down.js +114 -0
  33. package/lib/commands/dev-init.js +309 -0
  34. package/lib/commands/secrets-list.js +118 -0
  35. package/lib/commands/secrets-remove.js +97 -0
  36. package/lib/commands/secrets-set.js +30 -17
  37. package/lib/commands/secrets-validate.js +50 -0
  38. package/lib/commands/up-dataplane.js +2 -2
  39. package/lib/commands/up-miso.js +0 -25
  40. package/lib/commands/upload.js +26 -1
  41. package/lib/core/admin-secrets.js +96 -0
  42. package/lib/core/secrets-ensure.js +378 -0
  43. package/lib/core/secrets-env-write.js +157 -0
  44. package/lib/core/secrets.js +147 -81
  45. package/lib/datasource/field-reference-validator.js +91 -0
  46. package/lib/datasource/validate.js +21 -3
  47. package/lib/deployment/environment-config.js +137 -0
  48. package/lib/deployment/environment.js +21 -98
  49. package/lib/deployment/push.js +32 -2
  50. package/lib/external-system/download.js +7 -0
  51. package/lib/external-system/test-auth.js +7 -3
  52. package/lib/external-system/test.js +5 -1
  53. package/lib/generator/index.js +174 -25
  54. package/lib/generator/wizard.js +13 -1
  55. package/lib/infrastructure/helpers.js +103 -20
  56. package/lib/infrastructure/index.js +88 -10
  57. package/lib/infrastructure/services.js +70 -15
  58. package/lib/schema/application-schema.json +24 -3
  59. package/lib/schema/external-system.schema.json +435 -413
  60. package/lib/utils/api.js +3 -3
  61. package/lib/utils/app-register-auth.js +25 -3
  62. package/lib/utils/cli-utils.js +20 -0
  63. package/lib/utils/compose-generator.js +76 -75
  64. package/lib/utils/compose-handlebars-helpers.js +43 -0
  65. package/lib/utils/compose-vector-helper.js +18 -0
  66. package/lib/utils/config-paths.js +127 -2
  67. package/lib/utils/credential-secrets-env.js +267 -0
  68. package/lib/utils/dev-cert-helper.js +122 -0
  69. package/lib/utils/device-code-helpers.js +224 -0
  70. package/lib/utils/device-code.js +37 -336
  71. package/lib/utils/docker-build.js +40 -8
  72. package/lib/utils/env-copy.js +83 -13
  73. package/lib/utils/env-map.js +35 -5
  74. package/lib/utils/env-template.js +6 -5
  75. package/lib/utils/error-formatters/http-status-errors.js +20 -1
  76. package/lib/utils/help-builder.js +15 -2
  77. package/lib/utils/infra-status.js +30 -1
  78. package/lib/utils/local-secrets.js +7 -52
  79. package/lib/utils/mutagen-install.js +195 -0
  80. package/lib/utils/mutagen.js +146 -0
  81. package/lib/utils/paths.js +49 -33
  82. package/lib/utils/port-resolver.js +28 -16
  83. package/lib/utils/remote-dev-auth.js +38 -0
  84. package/lib/utils/remote-docker-env.js +43 -0
  85. package/lib/utils/remote-secrets-loader.js +60 -0
  86. package/lib/utils/secrets-generator.js +94 -6
  87. package/lib/utils/secrets-helpers.js +33 -25
  88. package/lib/utils/secrets-path.js +2 -2
  89. package/lib/utils/secrets-utils.js +52 -1
  90. package/lib/utils/secrets-validation.js +84 -0
  91. package/lib/utils/ssh-key-helper.js +116 -0
  92. package/lib/utils/token-manager-messages.js +90 -0
  93. package/lib/utils/token-manager.js +5 -4
  94. package/lib/utils/variable-transformer.js +3 -3
  95. package/lib/validation/validate.js +1 -1
  96. package/lib/validation/validator.js +65 -0
  97. package/package.json +4 -2
  98. package/scripts/install-local.js +34 -15
  99. package/templates/README.md +0 -1
  100. package/templates/applications/README.md.hbs +4 -4
  101. package/templates/applications/dataplane/application.yaml +5 -4
  102. package/templates/applications/dataplane/env.template +12 -7
  103. package/templates/applications/keycloak/env.template +2 -0
  104. package/templates/applications/miso-controller/application.yaml +1 -0
  105. package/templates/applications/miso-controller/env.template +11 -9
  106. package/templates/external-system/external-system.json.hbs +1 -16
  107. package/templates/python/docker-compose.hbs +49 -23
  108. package/templates/typescript/docker-compose.hbs +48 -22
@@ -1,430 +1,452 @@
1
1
  {
2
- "$schema": "http://json-schema.org/draft-07/schema#",
3
- "$id": "https://raw.githubusercontent.com/esystemsdev/aifabrix-builder/refs/heads/main/lib/schema/external-system.schema.json",
4
- "title": "AI Fabrix External System Configuration Schema",
5
- "description": "Schema for configuring an external system connected to the AI Fabrix Dataplane. This defines authentication, OpenAPI/MCP bindings, field mappings defaults, metadata handling and portal inputs.",
6
- "metadata": {
7
- "key": "external-system-schema",
8
- "name": "External System Configuration Schema",
9
- "description": "JSON schema for validating ExternalSystem configuration files",
10
- "version": "1.2.0",
11
- "type": "schema",
12
- "category": "integration",
13
- "author": "AI Fabrix Team",
14
- "createdAt": "2024-01-01T00:00:00Z",
15
- "updatedAt": "2025-12-01T00:00:00Z",
16
- "compatibility": {
17
- "minVersion": "1.0.0",
18
- "maxVersion": "2.0.0",
19
- "deprecated": false
20
- },
21
- "tags": [
22
- "schema",
23
- "external-system",
24
- "dataplane",
25
- "integration",
26
- "validation"
27
- ],
28
- "dependencies": [],
29
- "changelog": [
30
- {
31
- "version": "1.2.0",
32
- "date": "2025-02-01T00:00:00Z",
33
- "changes": [
34
- "Added generateMcpContract (boolean, default true): config-only control for MCP contract generation on publish",
35
- "Added generateOpenApiContract (boolean, default true): reserved for future use"
36
- ],
37
- "breaking": false
38
- },
39
- {
40
- "version": "1.1.0",
41
- "date": "2025-12-01T00:00:00Z",
42
- "changes": [
43
- "Added RBAC roles and permissions support",
44
- "RBAC roles/permissions are registered with miso-controller during deployment",
45
- "Roles support Azure AD group mapping via Groups property",
46
- "Permissions reference roles and are used for access control"
47
- ],
48
- "breaking": false
49
- },
50
- {
51
- "version": "1.0.0",
52
- "date": "2024-01-01T00:00:00Z",
53
- "changes": [
54
- "Initial schema for External Systems",
55
- "Added OpenAPI and MCP contract configuration",
56
- "Added authentication and environment variables",
57
- "Added portalInput for UI-driven onboarding",
58
- "Compatible with field-mappings.schema and security-model.schema"
59
- ],
60
- "breaking": false
61
- }
62
- ]
2
+ "$schema":"http://json-schema.org/draft-07/schema#",
3
+ "$id":"https://raw.githubusercontent.com/esystemsdev/aifabrix-builder/refs/heads/main/lib/schema/external-system.schema.json",
4
+ "title":"AI Fabrix External System Configuration Schema",
5
+ "description":"Schema for configuring an external system connected to the AI Fabrix Dataplane. This defines authentication, OpenAPI/MCP bindings, field mappings defaults, metadata handling and portal inputs.",
6
+ "metadata":{
7
+ "key":"external-system-schema",
8
+ "name":"External System Configuration Schema",
9
+ "description":"JSON schema for validating ExternalSystem configuration files",
10
+ "version":"1.3.0",
11
+ "type":"schema",
12
+ "category":"integration",
13
+ "author":"AI Fabrix Team",
14
+ "createdAt":"2024-01-01T00:00:00Z",
15
+ "updatedAt":"2026-02-18T00:00:00Z",
16
+ "compatibility":{
17
+ "minVersion":"1.3.0",
18
+ "maxVersion":"2.0.0",
19
+ "deprecated":false
20
+ },
21
+ "tags":[
22
+ "schema",
23
+ "external-system",
24
+ "dataplane",
25
+ "integration",
26
+ "validation"
27
+ ],
28
+ "dependencies":[
29
+
30
+ ],
31
+ "changelog":[
32
+ {
33
+ "version":"1.3.0",
34
+ "date":"2026-02-18T00:00:00Z",
35
+ "changes":[
36
+ "Template-based authentication: method, variables (baseUrl when method not none), security (kv:// only), credentialKey, writeOnce",
37
+ "Credential created on deploy as authentication.credentialKey or <external-system.key>-cred"
38
+ ]
39
+ },
40
+ {
41
+ "version":"1.2.0",
42
+ "date":"2025-02-01T00:00:00Z",
43
+ "changes":[
44
+ "Added generateMcpContract (boolean, default true): config-only control for MCP contract generation on publish",
45
+ "Added generateOpenApiContract (boolean, default true): reserved for future use"
46
+ ],
47
+ "breaking":false
48
+ },
49
+ {
50
+ "version":"1.1.0",
51
+ "date":"2025-12-01T00:00:00Z",
52
+ "changes":[
53
+ "Added RBAC roles and permissions support",
54
+ "RBAC roles/permissions are registered with miso-controller during deployment",
55
+ "Roles support Azure AD group mapping via Groups property",
56
+ "Permissions reference roles and are used for access control"
57
+ ],
58
+ "breaking":false
59
+ },
60
+ {
61
+ "version":"1.0.0",
62
+ "date":"2024-01-01T00:00:00Z",
63
+ "changes":[
64
+ "Initial schema for External Systems",
65
+ "Added OpenAPI and MCP contract configuration",
66
+ "Added authentication and environment variables",
67
+ "Added portalInput for UI-driven onboarding",
68
+ "Compatible with field-mappings.schema and security-model.schema"
69
+ ],
70
+ "breaking":false
71
+ }
72
+ ]
63
73
  },
64
- "type": "object",
65
- "required": [
66
- "key",
67
- "displayName",
68
- "description",
69
- "type",
70
- "authentication"
74
+ "type":"object",
75
+ "required":[
76
+ "key",
77
+ "displayName",
78
+ "description",
79
+ "type",
80
+ "authentication"
71
81
  ],
72
- "properties": {
73
- "key": {
74
- "type": "string",
75
- "description": "Unique external system identifier (cannot be changed after creation). Example: 'hubspot', 'salesforce', 'teams'.",
76
- "pattern": "^[a-z0-9-]+$",
77
- "minLength": 3,
78
- "maxLength": 40
79
- },
80
- "displayName": {
81
- "type": "string",
82
- "description": "Human-readable name for the external system",
83
- "minLength": 1,
84
- "maxLength": 100
85
- },
86
- "description": {
87
- "type": "string",
88
- "description": "Description of this external system integration",
89
- "minLength": 1,
90
- "maxLength": 500
91
- },
92
- "type": {
93
- "type": "string",
94
- "enum": [
95
- "openapi",
96
- "mcp",
97
- "custom"
98
- ],
99
- "description": "Integration type: OpenAPI-driven, MCP-driven, or custom Python connector."
100
- },
101
- "enabled": {
102
- "type": "boolean",
103
- "default": true
104
- },
105
- "internal": {
106
- "type": "boolean",
107
- "description": "When true, this integration is deployed on dataplane startup (internal integration). When false or absent, deployed via pipeline only.",
108
- "default": false
109
- },
110
- "authentication": {
111
- "type": "object",
112
- "description": "Authentication configuration for external system",
113
- "required": [
114
- "type"
115
- ],
116
- "properties": {
117
- "type": {
118
- "type": "string",
119
- "enum": [
120
- "oauth2",
121
- "apikey",
122
- "basic",
123
- "aad",
124
- "none"
125
- ],
126
- "description": "Authentication type"
82
+ "properties":{
83
+ "key":{
84
+ "type":"string",
85
+ "description":"Unique external system identifier (cannot be changed after creation). Example: 'hubspot', 'salesforce', 'teams'.",
86
+ "pattern":"^[a-z0-9-]+$",
87
+ "minLength":3,
88
+ "maxLength":40
89
+ },
90
+ "displayName":{
91
+ "type":"string",
92
+ "description":"Human-readable name for the external system",
93
+ "minLength":1,
94
+ "maxLength":100
95
+ },
96
+ "description":{
97
+ "type":"string",
98
+ "description":"Description of this external system integration",
99
+ "minLength":1,
100
+ "maxLength":500
101
+ },
102
+ "type":{
103
+ "type":"string",
104
+ "enum":[
105
+ "openapi",
106
+ "mcp",
107
+ "custom"
108
+ ],
109
+ "description":"Integration type: OpenAPI-driven, MCP-driven, or custom Python connector."
110
+ },
111
+ "enabled":{
112
+ "type":"boolean",
113
+ "default":true
114
+ },
115
+ "credentialIdOrKey":{
116
+ "type":"string",
117
+ "description":"Credential identifier (ID or key) to attach to this system. Used by dataplane when creating/updating system from deploy config."
118
+ },
119
+ "internal":{
120
+ "type":"boolean",
121
+ "description":"When true, this integration is deployed on dataplane startup (internal integration). When false or absent, deployed via pipeline only.",
122
+ "default":false
123
+ },
124
+ "authentication":{
125
+ "type":"object",
126
+ "description":"Template-based authentication. Required: method, variables. When method is not 'none', variables must include baseUrl and security must contain only kv:// references. On deploy, a credential is created with key authentication.credentialKey or <external-system.key>-cred. Template is write-once.",
127
+ "required":[
128
+ "method",
129
+ "variables"
130
+ ],
131
+ "properties":{
132
+ "credentialKey":{
133
+ "type":"string",
134
+ "description":"Stable reference key for the active credential. Default: <external-system.key>-cred."
135
+ },
136
+ "displayName":{
137
+ "type":"string",
138
+ "description":"Display name for the credential created from this template."
139
+ },
140
+ "method":{
141
+ "type":"string",
142
+ "enum":[
143
+ "oauth2",
144
+ "apikey",
145
+ "basic",
146
+ "aad",
147
+ "none",
148
+ "queryParam",
149
+ "oidc",
150
+ "hmac"
151
+ ],
152
+ "description":"Authentication method."
153
+ },
154
+ "variables":{
155
+ "type":"object",
156
+ "description":"Non-secret config. Must include baseUrl for all methods except none. Common keys: baseUrl, tokenUrl, authorizationUrl, tenantId, audience, scope, headerName; queryParam: paramName; oidc: openIdConfigUrl, clientId, expectedIssuer; hmac: algorithm, signatureHeader, timestampHeader, signaturePrefix, timestampMaxAge.",
157
+ "additionalProperties":{
158
+ "type":"string"
159
+ }
160
+ },
161
+ "security":{
162
+ "type":"object",
163
+ "description":"Secret-bearing keys only. Every value must be a Key Vault reference matching ^kv://.+$",
164
+ "additionalProperties":{
165
+ "type":"string",
166
+ "pattern":"^kv://.+$"
167
+ }
168
+ },
169
+ "writeOnce":{
170
+ "type":"boolean",
171
+ "description":"Template is immutable after first deploy; dataplane does not update the credential from this template again.",
172
+ "default":true
173
+ }
127
174
  },
128
- "oauth2": {
129
- "type": "object",
130
- "description": "OAuth2 authentication configuration",
131
- "additionalProperties": true
175
+ "additionalProperties":false
176
+ },
177
+ "openapi":{
178
+ "type":"object",
179
+ "description":"OpenAPI integration configuration",
180
+ "properties":{
181
+ "documentKey":{
182
+ "type":"string",
183
+ "description":"Key of the OpenAPI document in the registry"
184
+ },
185
+ "specUrl":{
186
+ "type":"string",
187
+ "description":"URL to the OpenAPI specification",
188
+ "pattern":"^(http|https)://.*$"
189
+ }
132
190
  },
133
- "apikey": {
134
- "type": "object",
135
- "description": "API key authentication configuration",
136
- "additionalProperties": true
191
+ "additionalProperties":true
192
+ },
193
+ "mcp":{
194
+ "type":"object",
195
+ "description":"Model Context Protocol integration configuration",
196
+ "properties":{
197
+ "serverUrl":{
198
+ "type":"string",
199
+ "description":"MCP server URL",
200
+ "pattern":"^(http|https)://.*$"
201
+ },
202
+ "toolPrefix":{
203
+ "type":"string",
204
+ "description":"Prefix for MCP tool names",
205
+ "pattern":"^[a-zA-Z0-9_-]+$"
206
+ }
137
207
  },
138
- "basic": {
139
- "type": "object",
140
- "description": "Basic authentication configuration",
141
- "additionalProperties": true
208
+ "additionalProperties":true
209
+ },
210
+ "dataSources":{
211
+ "type":"array",
212
+ "description":"List of data source keys belonging to this external system. Each must match external-datasource.schema.json.",
213
+ "items":{
214
+ "type":"string",
215
+ "pattern":"^[a-z0-9-]+$"
142
216
  },
143
- "aad": {
144
- "type": "object",
145
- "description": "Azure AD authentication configuration",
146
- "additionalProperties": true
217
+ "uniqueItems":true
218
+ },
219
+ "configuration":{
220
+ "type":"array",
221
+ "description":"External system configuration variables (same pattern as application-schema).",
222
+ "items":{
223
+ "type":"object",
224
+ "required":[
225
+ "name",
226
+ "value",
227
+ "location",
228
+ "required"
229
+ ],
230
+ "properties":{
231
+ "name":{
232
+ "type":"string",
233
+ "pattern":"^[A-Z_][A-Z0-9_]*$"
234
+ },
235
+ "value":{
236
+ "type":"string",
237
+ "description":"Literal value or parameter reference ({{parameter}})"
238
+ },
239
+ "location":{
240
+ "type":"string",
241
+ "enum":[
242
+ "variable",
243
+ "keyvault"
244
+ ]
245
+ },
246
+ "required":{
247
+ "type":"boolean"
248
+ },
249
+ "portalInput":{
250
+ "type":"object",
251
+ "required":[
252
+ "field",
253
+ "label"
254
+ ],
255
+ "properties":{
256
+ "field":{
257
+ "type":"string",
258
+ "enum":[
259
+ "password",
260
+ "text",
261
+ "textarea",
262
+ "select",
263
+ "json"
264
+ ]
265
+ },
266
+ "label":{
267
+ "type":"string"
268
+ },
269
+ "placeholder":{
270
+ "type":"string"
271
+ },
272
+ "options":{
273
+ "type":"array",
274
+ "items":{
275
+ "type":"string"
276
+ }
277
+ },
278
+ "masked":{
279
+ "type":"boolean"
280
+ },
281
+ "validation":{
282
+ "type":"object",
283
+ "properties":{
284
+ "minLength":{
285
+ "type":"integer"
286
+ },
287
+ "maxLength":{
288
+ "type":"integer"
289
+ },
290
+ "pattern":{
291
+ "type":"string"
292
+ },
293
+ "required":{
294
+ "type":"boolean"
295
+ }
296
+ },
297
+ "additionalProperties":false
298
+ }
299
+ },
300
+ "additionalProperties":false
301
+ }
302
+ },
303
+ "additionalProperties":false
147
304
  }
148
- },
149
- "additionalProperties": true
150
- },
151
- "openapi": {
152
- "type": "object",
153
- "description": "OpenAPI integration configuration",
154
- "properties": {
155
- "documentKey": {
156
- "type": "string",
157
- "description": "Key of the OpenAPI document in the registry"
158
- },
159
- "specUrl": {
160
- "type": "string",
161
- "description": "URL to the OpenAPI specification",
162
- "pattern": "^(http|https)://.*$"
305
+ },
306
+ "tags":{
307
+ "type":"array",
308
+ "description":"Optional tags for search / filtering",
309
+ "items":{
310
+ "type":"string"
163
311
  }
164
- },
165
- "additionalProperties": true
166
- },
167
- "mcp": {
168
- "type": "object",
169
- "description": "Model Context Protocol integration configuration",
170
- "properties": {
171
- "serverUrl": {
172
- "type": "string",
173
- "description": "MCP server URL",
174
- "pattern": "^(http|https)://.*$"
175
- },
176
- "toolPrefix": {
177
- "type": "string",
178
- "description": "Prefix for MCP tool names",
179
- "pattern": "^[a-zA-Z0-9_-]+$"
312
+ },
313
+ "roles":{
314
+ "type":"array",
315
+ "description":"External system roles for Azure AD group mapping",
316
+ "items":{
317
+ "type":"object",
318
+ "required":[
319
+ "name",
320
+ "value",
321
+ "description"
322
+ ],
323
+ "properties":{
324
+ "name":{
325
+ "type":"string",
326
+ "description":"Human-readable role name",
327
+ "minLength":1,
328
+ "maxLength":100
329
+ },
330
+ "value":{
331
+ "type":"string",
332
+ "description":"Role identifier (used in JWT and ACL)",
333
+ "pattern":"^[a-z-]+$"
334
+ },
335
+ "description":{
336
+ "type":"string",
337
+ "description":"Role description",
338
+ "minLength":1,
339
+ "maxLength":500
340
+ },
341
+ "groups":{
342
+ "type":"array",
343
+ "description":"Azure AD groups mapped to this role",
344
+ "items":{
345
+ "type":"string",
346
+ "minLength":1,
347
+ "maxLength":100
348
+ }
349
+ }
350
+ },
351
+ "additionalProperties":false
180
352
  }
181
- },
182
- "additionalProperties": true
183
- },
184
- "dataSources": {
185
- "type": "array",
186
- "description": "List of data source keys belonging to this external system. Each must match external-datasource.schema.json.",
187
- "items": {
188
- "type": "string",
189
- "pattern": "^[a-z0-9-]+$"
190
- },
191
- "uniqueItems": true
192
- },
193
- "configuration": {
194
- "type": "array",
195
- "description": "External system configuration variables (same pattern as application-schema).",
196
- "items": {
197
- "type": "object",
198
- "required": [
199
- "name",
200
- "value",
201
- "location",
202
- "required"
203
- ],
204
- "properties": {
205
- "name": {
206
- "type": "string",
207
- "pattern": "^[A-Z_][A-Z0-9_]*$"
208
- },
209
- "value": {
210
- "type": "string",
211
- "description": "Literal value or parameter reference ({{parameter}})"
212
- },
213
- "location": {
214
- "type": "string",
215
- "enum": [
216
- "variable",
217
- "keyvault"
218
- ]
219
- },
220
- "required": {
221
- "type": "boolean"
222
- },
223
- "portalInput": {
224
- "type": "object",
225
- "required": [
226
- "field",
227
- "label"
228
- ],
229
- "properties": {
230
- "field": {
231
- "type": "string",
232
- "enum": [
233
- "password",
234
- "text",
235
- "textarea",
236
- "select",
237
- "json"
238
- ]
353
+ },
354
+ "permissions":{
355
+ "type":"array",
356
+ "description":"External system permissions with role mappings for access control",
357
+ "items":{
358
+ "type":"object",
359
+ "required":[
360
+ "name",
361
+ "roles",
362
+ "description"
363
+ ],
364
+ "properties":{
365
+ "name":{
366
+ "type":"string",
367
+ "description":"Permission identifier (e.g., 'documentstore:read', 'flowise:dev:access')",
368
+ "pattern":"^[a-z0-9-:]+$",
369
+ "minLength":1,
370
+ "maxLength":100
371
+ },
372
+ "roles":{
373
+ "type":"array",
374
+ "description":"Roles that have this permission",
375
+ "items":{
376
+ "type":"string",
377
+ "pattern":"^[a-z-]+$",
378
+ "minLength":1,
379
+ "maxLength":50
380
+ },
381
+ "minItems":1
239
382
  },
240
- "label": {
241
- "type": "string"
383
+ "description":{
384
+ "type":"string",
385
+ "description":"Permission description",
386
+ "minLength":1,
387
+ "maxLength":500
388
+ }
389
+ },
390
+ "additionalProperties":false
391
+ }
392
+ },
393
+ "endpoints":{
394
+ "type":"array",
395
+ "description":"API endpoint configurations for this external system. Used for dynamic endpoint registration at application startup.",
396
+ "items":{
397
+ "type":"object",
398
+ "required":[
399
+ "type",
400
+ "path"
401
+ ],
402
+ "properties":{
403
+ "type":{
404
+ "type":"string",
405
+ "description":"Endpoint type identifier (e.g., 'commands', 'events', 'notifications')",
406
+ "pattern":"^[a-z0-9-]+$"
242
407
  },
243
- "placeholder": {
244
- "type": "string"
408
+ "path":{
409
+ "type":"string",
410
+ "description":"URL path for this endpoint (e.g., '/commands', '/events')",
411
+ "pattern":"^/[a-z0-9/-]*$"
245
412
  },
246
- "options": {
247
- "type": "array",
248
- "items": {
249
- "type": "string"
250
- }
413
+ "description":{
414
+ "type":"string",
415
+ "description":"Human-readable description of the endpoint"
251
416
  },
252
- "masked": {
253
- "type": "boolean"
417
+ "active":{
418
+ "type":"boolean",
419
+ "description":"Whether this endpoint should be registered (defaults to true)",
420
+ "default":true
254
421
  },
255
- "validation": {
256
- "type": "object",
257
- "properties": {
258
- "minLength": {
259
- "type": "integer"
260
- },
261
- "maxLength": {
262
- "type": "integer"
263
- },
264
- "pattern": {
265
- "type": "string"
266
- },
267
- "required": {
268
- "type": "boolean"
269
- }
270
- },
271
- "additionalProperties": false
422
+ "router":{
423
+ "type":"string",
424
+ "description":"Custom router module path override (defaults to auto-discovery based on naming convention)"
272
425
  }
273
- },
274
- "additionalProperties": false
275
- }
276
- },
277
- "additionalProperties": false
278
- }
279
- },
280
- "tags": {
281
- "type": "array",
282
- "description": "Optional tags for search / filtering",
283
- "items": {
284
- "type": "string"
285
- }
286
- },
287
- "roles": {
288
- "type": "array",
289
- "description": "External system roles for Azure AD group mapping",
290
- "items": {
291
- "type": "object",
292
- "required": [
293
- "name",
294
- "value",
295
- "description"
296
- ],
297
- "properties": {
298
- "name": {
299
- "type": "string",
300
- "description": "Human-readable role name",
301
- "minLength": 1,
302
- "maxLength": 100
303
- },
304
- "value": {
305
- "type": "string",
306
- "description": "Role identifier (used in JWT and ACL)",
307
- "pattern": "^[a-z-]+$"
308
- },
309
- "description": {
310
- "type": "string",
311
- "description": "Role description",
312
- "minLength": 1,
313
- "maxLength": 500
314
- },
315
- "groups": {
316
- "type": "array",
317
- "description": "Azure AD groups mapped to this role",
318
- "items": {
319
- "type": "string",
320
- "minLength": 1,
321
- "maxLength": 100
322
- }
323
- }
324
- },
325
- "additionalProperties": false
326
- }
327
- },
328
- "permissions": {
329
- "type": "array",
330
- "description": "External system permissions with role mappings for access control",
331
- "items": {
332
- "type": "object",
333
- "required": [
334
- "name",
335
- "roles",
336
- "description"
337
- ],
338
- "properties": {
339
- "name": {
340
- "type": "string",
341
- "description": "Permission identifier (e.g., 'documentstore:read', 'flowise:dev:access')",
342
- "pattern": "^[a-z0-9-:]+$",
343
- "minLength": 1,
344
- "maxLength": 100
345
- },
346
- "roles": {
347
- "type": "array",
348
- "description": "Roles that have this permission",
349
- "items": {
350
- "type": "string",
351
- "pattern": "^[a-z-]+$",
352
- "minLength": 1,
353
- "maxLength": 50
354
- },
355
- "minItems": 1
356
- },
357
- "description": {
358
- "type": "string",
359
- "description": "Permission description",
360
- "minLength": 1,
361
- "maxLength": 500
362
- }
363
- },
364
- "additionalProperties": false
365
- }
366
- },
367
- "endpoints": {
368
- "type": "array",
369
- "description": "API endpoint configurations for this external system. Used for dynamic endpoint registration at application startup.",
370
- "items": {
371
- "type": "object",
372
- "required": [
373
- "type",
374
- "path"
375
- ],
376
- "properties": {
377
- "type": {
378
- "type": "string",
379
- "description": "Endpoint type identifier (e.g., 'commands', 'events', 'notifications')",
380
- "pattern": "^[a-z0-9-]+$"
381
- },
382
- "path": {
383
- "type": "string",
384
- "description": "URL path for this endpoint (e.g., '/commands', '/events')",
385
- "pattern": "^/[a-z0-9/-]*$"
386
- },
387
- "description": {
388
- "type": "string",
389
- "description": "Human-readable description of the endpoint"
390
- },
391
- "active": {
392
- "type": "boolean",
393
- "description": "Whether this endpoint should be registered (defaults to true)",
394
- "default": true
395
- },
396
- "router": {
397
- "type": "string",
398
- "description": "Custom router module path override (defaults to auto-discovery based on naming convention)"
399
- }
400
- },
401
- "additionalProperties": false
402
- }
403
- },
404
- "endpointsActive": {
405
- "type": "boolean",
406
- "description": "Master switch for all endpoints in this system. If false, no endpoints are registered regardless of individual endpoint active flags.",
407
- "default": true
408
- },
409
- "credentialIdOrKey": {
410
- "type": "string",
411
- "description": "Credential identifier (ID or key) to use for authenticating with this external system."
412
- },
413
- "generateMcpContract": {
414
- "type": "boolean",
415
- "description": "Whether to generate MCP contract on publish. Config only (no query parameter); default true when absent.",
416
- "default": true
417
- },
418
- "generateOpenApiContract": {
419
- "type": "boolean",
420
- "description": "Reserved: whether to generate or expose OpenAPI contract on publish. Not yet implemented.",
421
- "default": true
422
- },
423
- "triggerPathsHash": {
424
- "type": "string",
425
- "description": "SHA256 hash of triggerPaths payload (64-char hex). Used to detect structural changes. Optional; Dataplane computes when absent.",
426
- "pattern": "^[a-f0-9]{64}$"
427
- }
426
+ },
427
+ "additionalProperties":false
428
+ }
429
+ },
430
+ "endpointsActive":{
431
+ "type":"boolean",
432
+ "description":"Master switch for all endpoints in this system. If false, no endpoints are registered regardless of individual endpoint active flags.",
433
+ "default":true
434
+ },
435
+ "generateMcpContract":{
436
+ "type":"boolean",
437
+ "description":"Whether to generate MCP contract on publish. Config only (no query parameter); default true when absent.",
438
+ "default":true
439
+ },
440
+ "generateOpenApiContract":{
441
+ "type":"boolean",
442
+ "description":"Reserved: whether to generate or expose OpenAPI contract on publish. Not yet implemented.",
443
+ "default":true
444
+ },
445
+ "triggerPathsHash":{
446
+ "type":"string",
447
+ "description":"SHA256 hash of triggerPaths payload (64-char hex). Used to detect structural changes. Optional; Dataplane computes when absent.",
448
+ "pattern":"^[a-f0-9]{64}$"
449
+ }
428
450
  },
429
- "additionalProperties": false
430
- }
451
+ "additionalProperties":false
452
+ }