@aifabrix/builder 2.46.0 → 2.47.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 (175) 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 +16 -4
  47. package/lib/cli/setup-app.js +54 -3
  48. package/lib/cli/setup-infra-up-dataplane-action.js +2 -2
  49. package/lib/cli/setup-infra-up-platform-action.js +2 -1
  50. package/lib/cli/setup-platform.js +1 -1
  51. package/lib/cli/setup-utility-help-after.js +4 -1
  52. package/lib/cli/setup-utility-resolve.js +8 -5
  53. package/lib/commands/app-logs.js +54 -26
  54. package/lib/commands/app.js +41 -0
  55. package/lib/commands/auth-status-dataplane-version.js +97 -61
  56. package/lib/commands/auth-status.js +2 -7
  57. package/lib/commands/channel.js +58 -0
  58. package/lib/commands/datasource.js +1 -1
  59. package/lib/commands/identity-apply-sync.js +49 -8
  60. package/lib/commands/identity-group-cli.js +66 -26
  61. package/lib/commands/identity-membership-role-cache.js +58 -37
  62. package/lib/commands/identity-shared.js +22 -1
  63. package/lib/commands/identity-user-cli.js +80 -34
  64. package/lib/commands/repair-auth-apply.js +30 -4
  65. package/lib/commands/repair-auth-config.js +8 -13
  66. package/lib/commands/repair-datasource-com-v2.js +15 -0
  67. package/lib/commands/repair-datasource-service-contract.js +206 -0
  68. package/lib/commands/repair-datasource.js +53 -18
  69. package/lib/commands/repair-env-template.js +12 -12
  70. package/lib/commands/repair-openapi-sync.js +26 -4
  71. package/lib/commands/repair-steps.js +28 -13
  72. package/lib/commands/repair-system-alignment.js +7 -4
  73. package/lib/commands/resource-type.js +371 -0
  74. package/lib/commands/setup-modes.js +1 -1
  75. package/lib/commands/setup-prompts-platform-mode.js +24 -21
  76. package/lib/commands/test-trust-external.js +39 -90
  77. package/lib/commands/up-common.js +33 -1
  78. package/lib/commands/up-dataplane.js +8 -4
  79. package/lib/commands/upload.js +24 -3
  80. package/lib/commands/verify-trust-command-action.js +4 -1
  81. package/lib/commands/verify-trust-external.js +12 -20
  82. package/lib/core/config-setup-platform-mode.js +3 -3
  83. package/lib/core/setup-platform-mode.js +41 -6
  84. package/lib/datasource/capability/capability-diff-slice.js +2 -2
  85. package/lib/datasource/capability/capability-manifest.js +254 -0
  86. package/lib/datasource/capability/capability-resolve.js +3 -4
  87. package/lib/datasource/capability/copy-operations.js +5 -3
  88. package/lib/datasource/capability/remove-operations.js +2 -1
  89. package/lib/datasource/capability/run-capability-copy.js +32 -4
  90. package/lib/datasource/capability/run-capability-diff.js +3 -3
  91. package/lib/datasource/capability/run-capability-dimension.js +2 -4
  92. package/lib/datasource/capability/run-capability-edit.js +4 -7
  93. package/lib/datasource/capability/run-capability-relate.js +2 -4
  94. package/lib/datasource/capability/run-capability-remove.js +2 -4
  95. package/lib/datasource/capability/validate-capability-slice.js +2 -1
  96. package/lib/datasource/datasource-identifier.js +2 -1
  97. package/lib/datasource/datasource-validate-display.js +1 -1
  98. package/lib/datasource/field-reference-validator.js +24 -3
  99. package/lib/datasource/orphan-profiles-validator.js +98 -0
  100. package/lib/datasource/validate.js +41 -23
  101. package/lib/external-system/download-helpers.js +87 -0
  102. package/lib/external-system/download.js +61 -122
  103. package/lib/external-system/generator.js +1 -59
  104. package/lib/external-system/test.js +10 -15
  105. package/lib/generator/builders.js +11 -1
  106. package/lib/generator/external-controller-manifest.js +5 -2
  107. package/lib/generator/split.js +3 -1
  108. package/lib/generator/wizard.js +1 -28
  109. package/lib/identity/fk-reference.js +65 -0
  110. package/lib/identity/identity-apply-core.js +13 -58
  111. package/lib/identity/identity-apply-phases.js +5 -1
  112. package/lib/identity/identity-display.js +243 -0
  113. package/lib/identity/identity-response-helpers.js +52 -0
  114. package/lib/identity/identity-sync-errors.js +62 -0
  115. package/lib/identity/resolve-user-id.js +129 -0
  116. package/lib/identity/username-default.js +31 -0
  117. package/lib/lifecycle/certification-progress.js +2 -2
  118. package/lib/lifecycle/report-display-trust.js +70 -0
  119. package/lib/lifecycle/report-display.js +14 -13
  120. package/lib/resolvers/datasource-resolver.js +2 -3
  121. package/lib/resolvers/resource-type-file.js +159 -0
  122. package/lib/schema/application-schema.json +16 -0
  123. package/lib/schema/deployment-rules.yaml +2 -1
  124. package/lib/schema/external-datasource.schema.json +372 -58
  125. package/lib/schema/external-system.schema.json +331 -2
  126. package/lib/schema/type/document-storage.json +9 -5
  127. package/lib/utils/app-run-containers.js +25 -2
  128. package/lib/utils/authentication-shape.js +224 -0
  129. package/lib/utils/build-copy.js +36 -5
  130. package/lib/utils/build-resolve-image.js +66 -12
  131. package/lib/utils/celery-companion-apps.js +53 -0
  132. package/lib/utils/cli-utils.js +4 -0
  133. package/lib/utils/compose-celery-worker.js +23 -0
  134. package/lib/utils/compose-generate-docker-compose.js +9 -1
  135. package/lib/utils/configuration-env-resolver.js +36 -0
  136. package/lib/utils/credential-secrets-env-kv.js +216 -0
  137. package/lib/utils/credential-secrets-env.js +52 -262
  138. package/lib/utils/dataplane-resolver.js +4 -115
  139. package/lib/utils/declarative-url-ports.js +24 -1
  140. package/lib/utils/docker-build.js +1 -4
  141. package/lib/utils/external-env-template.js +10 -3
  142. package/lib/utils/external-system-validators.js +8 -2
  143. package/lib/utils/help-builder.js +2 -0
  144. package/lib/utils/paths.js +25 -0
  145. package/lib/utils/platform-controller-url.js +2 -1
  146. package/lib/utils/platform-kv-ref.js +57 -0
  147. package/lib/utils/runtime-configuration-download.js +189 -0
  148. package/lib/utils/runtime-configuration-values.js +119 -0
  149. package/lib/utils/schema-loader.js +19 -4
  150. package/lib/utils/worker-sidecars.js +142 -0
  151. package/lib/validation/external-manifest-validator.js +2 -0
  152. package/lib/validation/runtime-configuration-rules.js +98 -0
  153. package/lib/validation/validate-display-dimensions.js +154 -0
  154. package/lib/validation/validate-display-sections.js +276 -0
  155. package/lib/validation/validate-display-steps.js +67 -0
  156. package/lib/validation/validate-display.js +24 -402
  157. package/package.json +1 -1
  158. package/templates/applications/dataplane/application.yaml +5 -0
  159. package/templates/applications/dataplane/env.template +26 -13
  160. package/templates/applications/dataplane/rbac.yaml +108 -1
  161. package/templates/applications/miso-controller/application.yaml +2 -2
  162. package/templates/applications/miso-controller/env.template +37 -122
  163. package/templates/applications/miso-controller/rbac.yaml +28 -13
  164. package/templates/channels/chatgpt/install.template.md.hbs +49 -0
  165. package/templates/channels/chatgpt/manifest.template.json.hbs +9 -0
  166. package/templates/channels/microsoft-copilot/install.template.md.hbs +49 -0
  167. package/templates/channels/microsoft-copilot/manifest.template.json.hbs +8 -0
  168. package/templates/channels/slack/install.template.md.hbs +49 -0
  169. package/templates/channels/slack/manifest.template.json.hbs +66 -0
  170. package/templates/channels/teams-bot/install.template.md.hbs +49 -0
  171. package/templates/channels/teams-bot/manifest.template.json.hbs +13 -0
  172. package/templates/channels/web-embed/install.template.md.hbs +49 -0
  173. package/templates/channels/web-embed/manifest.template.json.hbs +8 -0
  174. package/templates/python/docker-compose.hbs +56 -0
  175. package/templates/typescript/docker-compose.hbs +52 -0
@@ -23,8 +23,6 @@ port: 3000
23
23
  frontDoorRouting:
24
24
  pattern: /miso/*
25
25
  enabled: true
26
- # Docker url://internal full URLs: http://miso-controller:PORT only (ingress /miso is not on in-container routes).
27
- internalDockerUseOriginOnly: false
28
26
  host: ${DEV_USERNAME}.${REMOTE_HOST}
29
27
  tls: ${TLS_ENABLED}
30
28
 
@@ -54,6 +52,8 @@ authentication:
54
52
  - aifabrix-user
55
53
 
56
54
  # Build Configuration
55
+ # Image policy (442.0): .dockerignore + explicit COPY; final image has dist/ + public/ only.
56
+ # No integration/, .cursor/, builder/, package src/, or markdown except /app/README.md.
57
57
  build:
58
58
  context: ../.. # Docker build context (relative to builder/miso-controller/)
59
59
  dockerfile: builder/miso-controller/Dockerfile # Dockerfile name (relative to project root)
@@ -15,8 +15,10 @@
15
15
  #
16
16
  # =============================================================================
17
17
 
18
- # Skip automatic first-time onboarding (default: false)
19
- # Set to true to disable automatic onboarding on first startup
18
+ # Skip automatic first-time bootstrap on controller startup (default: false).
19
+ # Bootstrap = DB controller row, Keycloak realm/client, admin user, roles (empty DB only).
20
+ # Keep false for normal dev — this is NOT the Azure tenant-activation UI wizard.
21
+ # Set true only for tests that must not mutate Keycloak/DB on startup.
20
22
  SKIP_FIRST_TIME_SETUP=false
21
23
 
22
24
  # Force onboarding to run even when a controller row already exists (default: unset/false).
@@ -43,8 +45,12 @@ ONBOARDING_ADMIN_PASSWORD=kv://miso-controller-admin-passwordKeyVault
43
45
  ONBOARDING_ADMIN_EMAIL=kv://miso-controller-admin-emailKeyVault
44
46
 
45
47
  # Create development environment during onboarding (default: false)
48
+ # Full platform: create miso, dev, tst, and pro during onboarding (default: false)
49
+ # When true, supersedes ONBOARDING_CREATE_DEV_ENV for which extra environments are created
50
+ ONBOARDING_FULL_PLATFORM=false
51
+
46
52
  # Set to true to create both miso and dev environments during onboarding
47
- # When false (default), only the miso environment is created
53
+ # When false (default), only the miso environment is created (ignored when ONBOARDING_FULL_PLATFORM=true)
48
54
  ONBOARDING_CREATE_DEV_ENV=true
49
55
 
50
56
  # =============================================================================
@@ -101,15 +107,16 @@ REDIS_PERMISSIONS_TTL=900
101
107
  # Connects to external Keycloak from aifabrix-setup.
102
108
  #
103
109
  # URL semantics:
104
- # KEYCLOAK_SERVER_URL = Public URL (browser, issuer, OAuth callbacks)
105
- # KEYCLOAK_INTERNAL_SERVER_URL = Internal URL (server-to-Keycloak HTTP only, e.g. Docker)
110
+ # KEYCLOAK_SERVER_URL = Public URL (browser, device-code verification URI for CLI, issuer, OAuth callbacks)
111
+ # KEYCLOAK_INTERNAL_SERVER_URL = Internal URL (controller→Keycloak HTTP in Docker; include /auth when Keycloak uses KC_HTTP_RELATIVE_PATH)
106
112
  #
107
113
  # Usage: Env vars are used for bootstrap/onboarding only. Runtime config comes from DB
108
114
  # (KeycloakConfiguration + Application url/internalUrl). Sync env->DB at startup via
109
115
  # sync-application-urls-from-env.service.
110
116
  #
111
- # NOTE: Do NOT onboard Azure Entra SSO in Keycloak during onboarding (skipAzureEntraSso=true).
112
- # KEYCLOAK_SKIP_AZURE_ENTRA_SSO=false
117
+ # After POST /api/ide/onboarding/entra-id/configure succeeds, controller adds Microsoft Entra IdP to stock Keycloak
118
+ # using the customer enterprise app (AI Fabrix Miso), not the vendor ENTRA_ID_CLIENT_ID app.
119
+ # After configure: Keycloak broker redirect is on the customer enterprise app (AI Fabrix Miso), not ENTRA_ID_CLIENT_ID.
113
120
 
114
121
  KEYCLOAK_REALM=aifabrix
115
122
  # Public issuer / browser URL (includes /auth when Keycloak uses KC_HTTP_RELATIVE_PATH=/auth).
@@ -171,6 +178,7 @@ CONTROLLER_EVALUATION=
171
178
  # ENTRA ID ONBOARDING (vendor multi-tenant app — admin consent)
172
179
  # =============================================================================
173
180
  # AI Fabrix vendor app for TA-1 admin consent and Entra ID configure flows.
181
+ # Same ENTRA_ID_CLIENT_ID / ENTRA_ID_CLIENT_SECRET on every deployment.
174
182
  # Customer SSO after configure uses a separate enterprise app (AI Fabrix Miso);
175
183
  # Keycloak broker redirect is on that customer app, not ENTRA_ID_CLIENT_ID.
176
184
  #
@@ -178,6 +186,8 @@ CONTROLLER_EVALUATION=
178
186
  # Mori (e.g. …/entra-id-concent/callback), not the SPA or controller.
179
187
  # ENTRA_CALLBACK_STATE_SECRET — Shared HMAC secret (min 16 chars) for OAuth state
180
188
  # between controller and Mori callback service; same value on Mori and controller.
189
+ #
190
+ # Delegated Graph (second redirect URI on the same vendor app): see section below.
181
191
  ENTRA_CALLBACK_STATE_SECRET=kv://entra-callback-state-secret
182
192
  ENTRA_ID_CENTRAL_CALLBACK_URI=kv://entra-callback-uri
183
193
  ENTRA_ID_CLIENT_ID=kv://entra-client-idKeyVault
@@ -201,128 +211,27 @@ ENTRA_ID_CLIENT_SECRET=kv://entra-client-secretKeyVault
201
211
  # =============================================================================
202
212
 
203
213
  AZURE_SUBSCRIPTION_ID=kv://azure-subscription-idKeyVault
204
- AZURE_TENANT_ID=kv://azure-tenant-idKeyVault
214
+ TENANT_ID=kv://azure-tenant-idKeyVault
205
215
  AZURE_SERVICE_NAME=kv://azure-service-nameKeyVault
206
216
  AZURE_CLIENT_ID=kv://azure-client-idKeyVault
207
217
  AZURE_CLIENT_SECRET=kv://azure-client-secretKeyVault
208
218
 
219
+ # When true, environment infrastructure deploy skips the ai.azureOpenAI module (no new Cognitive Services account).
220
+ SKIP_AZURE_OPENAI=false
221
+
222
+ # When true, environment deploy skips Postgres ARM/KV updates if the flexible server already exists (marketplace redeploy).
223
+ SKIP_DB_REDEPLOY=true
224
+
209
225
  # =============================================================================
210
- # DEPLOYMENT TYPE CONFIGURATION
226
+ # DEPLOYMENT TYPE
211
227
  # =============================================================================
212
- # Controls deployment behavior for Azure, mock Azure, local Docker, or database-only deployments
213
- #
214
- # DEPLOYMENT types: azure, azure-mock, local, database
215
- #
216
- # -----------------------------------------------------------------------------
217
- # DEPLOYMENT=azure: Real Azure Operations (Production Mode)
218
- # -----------------------------------------------------------------------------
219
- # - Creates actual Azure resources (App Services, Databases, Key Vaults, etc.)
220
- # - Requires valid Azure credentials (AZURE_SUBSCRIPTION_ID, AZURE_TENANT_ID, etc.)
221
- # - Requires proper Azure RBAC permissions for resource creation
222
- # - Use for: Production deployments, staging environments, integration testing
223
- # - WARNING: This mode will create/modify/delete real Azure resources!
224
- #
225
- # -----------------------------------------------------------------------------
226
- # DEPLOYMENT=azure-mock: Mock Azure Operations (Development/Testing Mode)
227
- # -----------------------------------------------------------------------------
228
- # - Mocks Azure SDK operations (no real resources created)
229
- # - Azure SDK is initialized but operations return mock responses
230
- # - Useful for: Local development, unit testing, CI/CD pipelines
231
- # - No Azure credentials required (but can be set for SDK initialization)
232
- # - Faster than real Azure mode, but still initializes Azure SDK
233
- #
234
- # Example use cases:
235
- # - Testing deployment workflows without creating real resources
236
- # - Local development when you don't have Azure access
237
- # - CI/CD pipelines that need to test deployment logic
238
- #
239
- # -----------------------------------------------------------------------------
240
- # DEPLOYMENT=local: Local Docker Deployment (Localhost Controller)
241
- # -----------------------------------------------------------------------------
242
- # - Does NOT touch Azure at all (completely skips all Azure operations)
243
- # - Deploys applications as Docker containers on localhost (runs "docker run")
244
- # - Works with local PostgreSQL and Redis containers
245
- # - Fastest mode for local development (no Azure SDK overhead)
246
- # - No Azure SDK initialization (reduces startup time)
247
- # - Use for: Local development, testing, rapid iteration
248
- #
249
- # Example use cases:
250
- # - Local development and testing of applications
251
- # - Testing deployment workflows with actual containers
252
- # - Development when Azure SDK is not needed
253
- #
254
- # Requirements (controller must be able to run "docker" successfully):
255
- # - Docker must be installed and running where the controller runs
256
- # - Docker network (e.g. infra-<env>-aifabrix-network) must exist
257
- #
258
- # When miso-controller runs INSIDE a Docker container (e.g. aifabrix up-miso):
259
- # - The controller has no Docker CLI or host daemon by default, so deployments
260
- # will fail with "docker: not found" unless you either:
261
- # (A) Mount the host Docker socket and install Docker CLI in the controller
262
- # image (e.g. -v /var/run/docker.sock:/var/run/docker.sock and docker
263
- # client in the image), or
264
- # (B) Use DEPLOYMENT=database instead and start apps from the host, e.g.:
265
- # "aifabrix up-dataplane" (controller will only update DB; you run
266
- # dataplane/other apps via aifabrix on the host).
267
- # - Recommended when controller is in Docker: DEPLOYMENT=database and start
268
- # dataplane with "aifabrix up-dataplane" (see QUICK-START.md).
269
- #
270
- # -----------------------------------------------------------------------------
271
- # DEPLOYMENT=database: Database-Only Mode (DB Updates Only)
272
- # -----------------------------------------------------------------------------
273
- # - Performs only database operations (deployment/job/application records, RBAC sync)
274
- # - Does NOT run Docker containers (no container startup, health checks, port mapping)
275
- # - Does NOT use Azure SDK (no Azure SDK initialization overhead)
276
- # - Fastest mode for CI/CD pipelines that only need DB state validation
277
- # - Use for: Testing DB workflows, validating RBAC sync, testing deployment records
278
- #
279
- # Example use cases:
280
- # - CI/CD pipelines that validate deployment workflow without containers
281
- # - Testing RBAC sync logic without Docker/Azure dependencies
282
- # - Validating database schema changes and migrations
283
- # - Testing deployment job creation and status updates
284
- # - Fast validation of DB state changes
285
- #
286
- # What happens:
287
- # - Creates deployment job in database
288
- # - Updates deployment status (DEPLOYING → COMPLETED)
289
- # - Updates application record (status, version, repository URL)
290
- # - Syncs roles and permissions (RBAC)
291
- # - Marks deployment as completed
292
- # - Cleans up expired tokens
293
- # - Invalidates role/permission caches
294
- #
295
- # What does NOT happen:
296
- # - No Docker container execution
297
- # - No Azure SDK initialization
298
- # - No container URLs or health check URLs
299
- #
300
- # Requirements:
301
- # - Database connection (DATABASE_URL)
302
- # - No Docker required
303
- # - No Azure credentials required
304
- #
305
- # -----------------------------------------------------------------------------
306
- # Configuration Notes
307
- # -----------------------------------------------------------------------------
308
- # Default: azure (Real Azure) if not set or invalid value
309
- # Case insensitive: 'AZURE', 'azure', 'Azure' all work
310
- # Whitespace is trimmed
311
- #
312
- # Environment-specific recommendations:
313
- # - Production: DEPLOYMENT=azure
314
- # - Staging: DEPLOYMENT=azure
315
- # - Local Development: DEPLOYMENT=azure-mock or DEPLOYMENT=local
316
- # - CI/CD Testing: DEPLOYMENT=azure-mock or DEPLOYMENT=database
317
- # - Local Docker development: DEPLOYMENT=local
318
- # - DB-only validation/testing: DEPLOYMENT=database
319
- #
320
- # When to use each mode:
321
- # - Need to deploy to actual Azure resources? → DEPLOYMENT=azure
322
- # - Need to test deployment logic without creating resources? → DEPLOYMENT=azure-mock
323
- # - Want to run applications locally in Docker? → DEPLOYMENT=local
324
- # - Only need DB updates and RBAC sync (no containers/Azure)? → DEPLOYMENT=database
228
+ # azure — Real Azure resources + tenant activation wizard until completed
229
+ # azure-mock — Mock Azure SDK; dashboard after login (no wizard)
230
+ # local — Controller runs docker deploy; dashboard (no wizard)
231
+ # database — DB/RBAC only, no Docker from controller; dashboard (default dev)
325
232
  #
233
+ # Missing or invalid value defaults to azure (wizard + Azure credentials).
234
+ # Bootstrap (SKIP_FIRST_TIME_SETUP=false) is separate from the activation wizard.
326
235
  DEPLOYMENT=database
327
236
 
328
237
  # =============================================================================
@@ -364,6 +273,12 @@ LICENSE_JWT=DEVELOPMENT
364
273
  # ENTRA_GRAPH_DELEGATED_REDIRECT_URI=https://aifabrix001-mori-web-we.azurewebsites.net/entra-graph-delegated/callback
365
274
  ENTRA_GRAPH_DELEGATED_REDIRECT_URI=
366
275
 
276
+ # Optional delegated Graph scopes for GET …/graph-auth-url (space- or comma-separated).
277
+ # ENTRA_GRAPH_DELEGATED_SCOPES=https://graph.microsoft.com/Application.ReadWrite.All,https://graph.microsoft.com/Group.ReadWrite.All,https://graph.microsoft.com/Synchronization.ReadWrite.All,openid,profile,offline_access
278
+
279
+ # Dev only: log full delegated Graph JWT in general_log_* as delegatedGraphJwt (default off).
280
+ # LOG_GRAPH_TOKEN=true
281
+
367
282
  # =============================================================================
368
283
  # MORI SERVICE CONFIGURATION
369
284
  # =============================================================================
@@ -303,8 +303,23 @@ permissions:
303
303
  roles: ['aifabrix-platform-admin', 'aifabrix-security-admin']
304
304
  description: 'Delete dimensions and dimension values'
305
305
 
306
- # Token Delegation
307
- - name: 'delegation:link'
306
+ # Token Providers
307
+ - name: 'token-provider:read'
308
+ roles:
309
+ [
310
+ 'aifabrix-platform-admin',
311
+ 'aifabrix-security-admin',
312
+ 'aifabrix-deployment-admin',
313
+ 'aifabrix-observer'
314
+ ]
315
+ description: 'View token provider configurations'
316
+
317
+ - name: 'token-provider:write'
318
+ roles: ['aifabrix-platform-admin', 'aifabrix-security-admin']
319
+ description: 'Create, update, and delete token provider configurations'
320
+
321
+ # Provider Grants
322
+ - name: 'provider-grant:link'
308
323
  roles:
309
324
  [
310
325
  'aifabrix-platform-admin',
@@ -312,9 +327,9 @@ permissions:
312
327
  'aifabrix-deployment-admin',
313
328
  'aifabrix-developer'
314
329
  ]
315
- description: 'Link OAuth providers for token delegation'
330
+ description: 'Link OAuth providers for provider grants'
316
331
 
317
- - name: 'delegation:mint'
332
+ - name: 'provider-grant:mint'
318
333
  roles:
319
334
  [
320
335
  'aifabrix-platform-admin',
@@ -322,9 +337,9 @@ permissions:
322
337
  'aifabrix-deployment-admin',
323
338
  'aifabrix-developer'
324
339
  ]
325
- description: 'Mint delegated OAuth tokens for external API calls'
340
+ description: 'Mint OAuth tokens for granted provider access'
326
341
 
327
- - name: 'delegation:read'
342
+ - name: 'provider-grant:read'
328
343
  roles:
329
344
  [
330
345
  'aifabrix-platform-admin',
@@ -333,9 +348,9 @@ permissions:
333
348
  'aifabrix-developer',
334
349
  'aifabrix-observer'
335
350
  ]
336
- description: 'View delegated OAuth credentials'
351
+ description: 'View provider grants'
337
352
 
338
- - name: 'delegation:delete'
353
+ - name: 'provider-grant:delete'
339
354
  roles:
340
355
  [
341
356
  'aifabrix-platform-admin',
@@ -343,15 +358,15 @@ permissions:
343
358
  'aifabrix-deployment-admin',
344
359
  'aifabrix-developer'
345
360
  ]
346
- description: 'Revoke delegated OAuth credentials'
361
+ description: 'Revoke provider grants'
347
362
 
348
- - name: 'delegation:admin:read'
363
+ - name: 'provider-grant:admin:read'
349
364
  roles: ['aifabrix-platform-admin', 'aifabrix-security-admin']
350
- description: 'Administrative read access to all delegated credentials'
365
+ description: 'Administrative read access to all provider grants'
351
366
 
352
- - name: 'delegation:admin:delete'
367
+ - name: 'provider-grant:admin:delete'
353
368
  roles: ['aifabrix-platform-admin', 'aifabrix-security-admin']
354
- description: 'Administrative delete access to all delegated credentials'
369
+ description: 'Administrative delete access to all provider grants'
355
370
 
356
371
  # Onboarding
357
372
  - name: 'onboarding:read'
@@ -0,0 +1,49 @@
1
+ # {{appName}} — assistant channel install
2
+
3
+ {{appDescription}}
4
+
5
+ Environment: **{{environment}}** · Credential key: `{{credentialKey}}`
6
+
7
+ ## Platform callback URLs
8
+
9
+ Configure these in your Slack app, Teams bot registration, or platform admin console. Do not embed secrets in generated files — use AI Fabrix credential storage only.
10
+
11
+ {{#if eventsUrl}}
12
+ - **Events:** {{eventsUrl}}
13
+ {{/if}}
14
+ {{#if interactionUrl}}
15
+ - **Interactivity:** {{interactionUrl}}
16
+ {{/if}}
17
+ {{#if commandUrl}}
18
+ - **Slash commands:** {{commandUrl}}
19
+ {{/if}}
20
+ {{#if oauthCallbackUrl}}
21
+ - **OAuth redirect:** {{oauthCallbackUrl}}
22
+ {{/if}}
23
+ {{#if messagesUrl}}
24
+ - **Bot messages:** {{messagesUrl}}
25
+ {{/if}}
26
+ {{#if notificationsUrl}}
27
+ - **Notifications:** {{notificationsUrl}}
28
+ {{/if}}
29
+ {{#if botConfigUrl}}
30
+ - **Bot config:** {{botConfigUrl}}
31
+ {{/if}}
32
+
33
+ ## Assistant catalog
34
+
35
+ Runtime lists **assistants** available to each user from:
36
+
37
+ {{assistantCatalogUrl}}
38
+
39
+ ## After admin approval
40
+
41
+ ```bash
42
+ aifabrix app add-channel {{channelTarget}} --name "{{baseName}}"
43
+ ```
44
+
45
+ Optional validation:
46
+
47
+ ```bash
48
+ aifabrix app add-channel {{channelTarget}} --name "{{baseName}}" --probe
49
+ ```
@@ -0,0 +1,9 @@
1
+ {
2
+ "name": "{{appName}}",
3
+ "description": "{{appDescription}}",
4
+ "credentialKey": "{{credentialKey}}",
5
+ "openapiUrl": "{{openapiUrl}}",
6
+ "mcpUrl": "{{mcpUrl}}",
7
+ "actionsBaseUrl": "{{actionsBaseUrl}}",
8
+ "assistantCatalogUrl": "{{assistantCatalogUrl}}"
9
+ }
@@ -0,0 +1,49 @@
1
+ # {{appName}} — assistant channel install
2
+
3
+ {{appDescription}}
4
+
5
+ Environment: **{{environment}}** · Credential key: `{{credentialKey}}`
6
+
7
+ ## Platform callback URLs
8
+
9
+ Configure these in your Slack app, Teams bot registration, or platform admin console. Do not embed secrets in generated files — use AI Fabrix credential storage only.
10
+
11
+ {{#if eventsUrl}}
12
+ - **Events:** {{eventsUrl}}
13
+ {{/if}}
14
+ {{#if interactionUrl}}
15
+ - **Interactivity:** {{interactionUrl}}
16
+ {{/if}}
17
+ {{#if commandUrl}}
18
+ - **Slash commands:** {{commandUrl}}
19
+ {{/if}}
20
+ {{#if oauthCallbackUrl}}
21
+ - **OAuth redirect:** {{oauthCallbackUrl}}
22
+ {{/if}}
23
+ {{#if messagesUrl}}
24
+ - **Bot messages:** {{messagesUrl}}
25
+ {{/if}}
26
+ {{#if notificationsUrl}}
27
+ - **Notifications:** {{notificationsUrl}}
28
+ {{/if}}
29
+ {{#if botConfigUrl}}
30
+ - **Bot config:** {{botConfigUrl}}
31
+ {{/if}}
32
+
33
+ ## Assistant catalog
34
+
35
+ Runtime lists **assistants** available to each user from:
36
+
37
+ {{assistantCatalogUrl}}
38
+
39
+ ## After admin approval
40
+
41
+ ```bash
42
+ aifabrix app add-channel {{channelTarget}} --name "{{baseName}}"
43
+ ```
44
+
45
+ Optional validation:
46
+
47
+ ```bash
48
+ aifabrix app add-channel {{channelTarget}} --name "{{baseName}}" --probe
49
+ ```
@@ -0,0 +1,8 @@
1
+ {
2
+ "name": "{{appName}}",
3
+ "description": "{{appDescription}}",
4
+ "credentialKey": "{{credentialKey}}",
5
+ "openapiUrl": "{{openapiUrl}}",
6
+ "actionsBaseUrl": "{{actionsBaseUrl}}",
7
+ "assistantCatalogUrl": "{{assistantCatalogUrl}}"
8
+ }
@@ -0,0 +1,49 @@
1
+ # {{appName}} — assistant channel install
2
+
3
+ {{appDescription}}
4
+
5
+ Environment: **{{environment}}** · Credential key: `{{credentialKey}}`
6
+
7
+ ## Platform callback URLs
8
+
9
+ Configure these in your Slack app, Teams bot registration, or platform admin console. Do not embed secrets in generated files — use AI Fabrix credential storage only.
10
+
11
+ {{#if eventsUrl}}
12
+ - **Events:** {{eventsUrl}}
13
+ {{/if}}
14
+ {{#if interactionUrl}}
15
+ - **Interactivity:** {{interactionUrl}}
16
+ {{/if}}
17
+ {{#if commandUrl}}
18
+ - **Slash commands:** {{commandUrl}}
19
+ {{/if}}
20
+ {{#if oauthCallbackUrl}}
21
+ - **OAuth redirect:** {{oauthCallbackUrl}}
22
+ {{/if}}
23
+ {{#if messagesUrl}}
24
+ - **Bot messages:** {{messagesUrl}}
25
+ {{/if}}
26
+ {{#if notificationsUrl}}
27
+ - **Notifications:** {{notificationsUrl}}
28
+ {{/if}}
29
+ {{#if botConfigUrl}}
30
+ - **Bot config:** {{botConfigUrl}}
31
+ {{/if}}
32
+
33
+ ## Assistant catalog
34
+
35
+ Runtime lists **assistants** available to each user from:
36
+
37
+ {{assistantCatalogUrl}}
38
+
39
+ ## After admin approval
40
+
41
+ ```bash
42
+ aifabrix app add-channel {{channelTarget}} --name "{{baseName}}"
43
+ ```
44
+
45
+ Optional validation:
46
+
47
+ ```bash
48
+ aifabrix app add-channel {{channelTarget}} --name "{{baseName}}" --probe
49
+ ```
@@ -0,0 +1,66 @@
1
+ {
2
+ "display_information": {
3
+ "name": "{{appName}}",
4
+ "description": "{{appDescription}}",
5
+ "background_color": "#0F172A"
6
+ },
7
+ "features": {
8
+ "app_home": {
9
+ "home_tab_enabled": true,
10
+ "messages_tab_enabled": false,
11
+ "messages_tab_read_only_enabled": false
12
+ },
13
+ "bot_user": {
14
+ "display_name": "{{appName}}",
15
+ "always_online": true
16
+ },
17
+ "slash_commands": [
18
+ {
19
+ "command": "/aifabrix",
20
+ "url": "{{commandUrl}}",
21
+ "description": "Chat with your assistants",
22
+ "usage_hint": "[assistant or message]",
23
+ "should_escape": false
24
+ },
25
+ {
26
+ "command": "/assistants",
27
+ "url": "{{commandUrl}}",
28
+ "description": "Show available assistants",
29
+ "should_escape": false
30
+ }
31
+ ]
32
+ },
33
+ "oauth_config": {
34
+ "redirect_urls": [
35
+ "{{oauthCallbackUrl}}"
36
+ ],
37
+ "scopes": {
38
+ "bot": [
39
+ "app_mentions:read",
40
+ "chat:write",
41
+ "commands",
42
+ "im:history",
43
+ "im:read",
44
+ "im:write"
45
+ ]
46
+ },
47
+ "pkce_enabled": false
48
+ },
49
+ "settings": {
50
+ "event_subscriptions": {
51
+ "request_url": "{{eventsUrl}}",
52
+ "bot_events": [
53
+ "app_mention",
54
+ "message.im"
55
+ ]
56
+ },
57
+ "interactivity": {
58
+ "is_enabled": true,
59
+ "request_url": "{{interactionUrl}}"
60
+ },
61
+ "org_deploy_enabled": true,
62
+ "socket_mode_enabled": false,
63
+ "token_rotation_enabled": true,
64
+ "is_mcp_enabled": false
65
+ }
66
+ }
@@ -0,0 +1,49 @@
1
+ # {{appName}} — assistant channel install
2
+
3
+ {{appDescription}}
4
+
5
+ Environment: **{{environment}}** · Credential key: `{{credentialKey}}`
6
+
7
+ ## Platform callback URLs
8
+
9
+ Configure these in your Slack app, Teams bot registration, or platform admin console. Do not embed secrets in generated files — use AI Fabrix credential storage only.
10
+
11
+ {{#if eventsUrl}}
12
+ - **Events:** {{eventsUrl}}
13
+ {{/if}}
14
+ {{#if interactionUrl}}
15
+ - **Interactivity:** {{interactionUrl}}
16
+ {{/if}}
17
+ {{#if commandUrl}}
18
+ - **Slash commands:** {{commandUrl}}
19
+ {{/if}}
20
+ {{#if oauthCallbackUrl}}
21
+ - **OAuth redirect:** {{oauthCallbackUrl}}
22
+ {{/if}}
23
+ {{#if messagesUrl}}
24
+ - **Bot messages:** {{messagesUrl}}
25
+ {{/if}}
26
+ {{#if notificationsUrl}}
27
+ - **Notifications:** {{notificationsUrl}}
28
+ {{/if}}
29
+ {{#if botConfigUrl}}
30
+ - **Bot config:** {{botConfigUrl}}
31
+ {{/if}}
32
+
33
+ ## Assistant catalog
34
+
35
+ Runtime lists **assistants** available to each user from:
36
+
37
+ {{assistantCatalogUrl}}
38
+
39
+ ## After admin approval
40
+
41
+ ```bash
42
+ aifabrix app add-channel {{channelTarget}} --name "{{baseName}}"
43
+ ```
44
+
45
+ Optional validation:
46
+
47
+ ```bash
48
+ aifabrix app add-channel {{channelTarget}} --name "{{baseName}}" --probe
49
+ ```
@@ -0,0 +1,13 @@
1
+ {
2
+ "name": "{{appName}}",
3
+ "baseName": "{{baseName}}",
4
+ "description": "{{appDescription}}",
5
+ "credentialKey": "{{credentialKey}}",
6
+ "environment": "{{environment}}",
7
+ "endpoints": {
8
+ "messagesUrl": "{{messagesUrl}}",
9
+ "notificationsUrl": "{{notificationsUrl}}",
10
+ "botConfigUrl": "{{botConfigUrl}}",
11
+ "assistantCatalogUrl": "{{assistantCatalogUrl}}"
12
+ }
13
+ }
@@ -0,0 +1,49 @@
1
+ # {{appName}} — assistant channel install
2
+
3
+ {{appDescription}}
4
+
5
+ Environment: **{{environment}}** · Credential key: `{{credentialKey}}`
6
+
7
+ ## Platform callback URLs
8
+
9
+ Configure these in your Slack app, Teams bot registration, or platform admin console. Do not embed secrets in generated files — use AI Fabrix credential storage only.
10
+
11
+ {{#if eventsUrl}}
12
+ - **Events:** {{eventsUrl}}
13
+ {{/if}}
14
+ {{#if interactionUrl}}
15
+ - **Interactivity:** {{interactionUrl}}
16
+ {{/if}}
17
+ {{#if commandUrl}}
18
+ - **Slash commands:** {{commandUrl}}
19
+ {{/if}}
20
+ {{#if oauthCallbackUrl}}
21
+ - **OAuth redirect:** {{oauthCallbackUrl}}
22
+ {{/if}}
23
+ {{#if messagesUrl}}
24
+ - **Bot messages:** {{messagesUrl}}
25
+ {{/if}}
26
+ {{#if notificationsUrl}}
27
+ - **Notifications:** {{notificationsUrl}}
28
+ {{/if}}
29
+ {{#if botConfigUrl}}
30
+ - **Bot config:** {{botConfigUrl}}
31
+ {{/if}}
32
+
33
+ ## Assistant catalog
34
+
35
+ Runtime lists **assistants** available to each user from:
36
+
37
+ {{assistantCatalogUrl}}
38
+
39
+ ## After admin approval
40
+
41
+ ```bash
42
+ aifabrix app add-channel {{channelTarget}} --name "{{baseName}}"
43
+ ```
44
+
45
+ Optional validation:
46
+
47
+ ```bash
48
+ aifabrix app add-channel {{channelTarget}} --name "{{baseName}}" --probe
49
+ ```
@@ -0,0 +1,8 @@
1
+ {
2
+ "name": "{{appName}}",
3
+ "description": "{{appDescription}}",
4
+ "credentialKey": "{{credentialKey}}",
5
+ "configUrl": "{{configUrl}}",
6
+ "assistantCatalogUrl": "{{assistantCatalogUrl}}",
7
+ "experimental": true
8
+ }