@aifabrix/builder 2.59.0 → 2.61.2

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 (145) hide show
  1. package/README.md +14 -11
  2. package/docs/README.md +80 -0
  3. package/docs/builder-help/evidence-patterns.json +155 -0
  4. package/docs/builder-help/golden-examples/crm-company.json +30 -0
  5. package/docs/builder-help/golden-examples/crm-deal.json +29 -0
  6. package/docs/builder-help/golden-examples/document-storage-keyed-get.json +85 -0
  7. package/docs/builder-help/golden-examples/document-storage.json +30 -0
  8. package/docs/builder-help/golden-examples/meeting-transcript.json +29 -0
  9. package/docs/builder-help/golden-examples/repository-template.json +29 -0
  10. package/docs/builder-help/golden-examples/service-ticket.json +29 -0
  11. package/docs/builder-help/platform-roles.json +98 -0
  12. package/docs/builder-help/resource-type-catalog.json +402 -0
  13. package/lib/agent-kit/git-identity.js +180 -0
  14. package/lib/agent-kit/setup.js +3 -0
  15. package/lib/agent-kit/start.js +45 -1
  16. package/lib/api/configuration.api.js +131 -0
  17. package/lib/api/role-assistant-test-job.api.js +60 -0
  18. package/lib/api/system-secrets.api.js +72 -0
  19. package/lib/api/work-search.api.js +13 -6
  20. package/lib/app/deploy.js +8 -1
  21. package/lib/app/run-docker-fallback.js +6 -1
  22. package/lib/app/run-helpers.js +2 -1
  23. package/lib/app/run-parameter-sync.js +142 -0
  24. package/lib/app/show-display.js +1 -0
  25. package/lib/app/show-online.js +15 -0
  26. package/lib/build/docker-build-args.js +5 -2
  27. package/lib/build/index.js +3 -2
  28. package/lib/build/standard-docker-build.js +6 -3
  29. package/lib/cli/setup-app.js +19 -1
  30. package/lib/cli/setup-environment.js +156 -0
  31. package/lib/cli/setup-utility.js +24 -1
  32. package/lib/commands/datasource-capability-upsert-cli.js +112 -0
  33. package/lib/commands/datasource-capability.js +4 -2
  34. package/lib/commands/env-secret-context.js +113 -0
  35. package/lib/commands/env-secret-list.js +200 -0
  36. package/lib/commands/env-secret-push-confirm.js +54 -0
  37. package/lib/commands/env-secret-push-run.js +227 -0
  38. package/lib/commands/env-secret-push.js +168 -0
  39. package/lib/commands/repair-datasource-apply.js +2 -0
  40. package/lib/commands/repair-datasource-keyed-document.js +122 -0
  41. package/lib/commands/repair-datasource-run.js +1 -0
  42. package/lib/commands/role-assistant.js +7 -0
  43. package/lib/commands/setup-modes.js +1 -8
  44. package/lib/commands/setup-prompts.js +2 -180
  45. package/lib/commands/verify-operations-skip-e2e.js +25 -1
  46. package/lib/commands/verify-operations-steps.js +13 -1
  47. package/lib/commands/wizard-config-normalizer.js +7 -4
  48. package/lib/commands/wizard-core.js +5 -157
  49. package/lib/commands/wizard-file-saving.js +163 -0
  50. package/lib/core/env-platform-expand.js +97 -0
  51. package/lib/core/secrets-env-content.js +42 -4
  52. package/lib/core/secrets-env-write.js +10 -3
  53. package/lib/core/secrets-load.js +4 -2
  54. package/lib/datasource/binary-documents-validator.js +190 -0
  55. package/lib/datasource/capability/run-capability-upsert.js +202 -0
  56. package/lib/datasource/capability/upsert-ingredients.js +291 -0
  57. package/lib/datasource/capability/upsert-operations.js +138 -0
  58. package/lib/datasource/capability/upsert-test-scaffold.js +189 -0
  59. package/lib/datasource/validate.js +12 -5
  60. package/lib/deployment/installation/azure-infra-stage.js +3 -1
  61. package/lib/deployment/installation/infra-catalog.js +2 -5
  62. package/lib/generator/builders.js +17 -0
  63. package/lib/generator/helpers.js +23 -2
  64. package/lib/generator/index.js +13 -6
  65. package/lib/lifecycle/product-model.js +4 -3
  66. package/lib/lifecycle/report-display.js +3 -2
  67. package/lib/parameters/infra-parameter-catalog.js +1 -1
  68. package/lib/programmatic/builder-help-enterprise-sync-fabrix.js +1 -1
  69. package/lib/programmatic/builder-help-governance.js +1 -1
  70. package/lib/programmatic/builder-help.js +1 -1
  71. package/lib/role-assistant/test-cases-search.js +3 -0
  72. package/lib/role-assistant/test-job-runner.js +125 -0
  73. package/lib/role-assistant/test-runner-search.js +44 -2
  74. package/lib/role-assistant/test-runner-workhub-answers.js +4 -1
  75. package/lib/role-assistant/test-runner-workhub-missing-fields.js +42 -0
  76. package/lib/role-assistant/test-runner-workhub-wait-stop.js +94 -0
  77. package/lib/role-assistant/test-runner-workhub.js +28 -19
  78. package/lib/schema/application-schema.json +205 -2
  79. package/lib/schema/external-datasource.schema.json +23 -3
  80. package/lib/schema/infra-parameter.schema.json +139 -33
  81. package/lib/schema/infra.parameter.yaml +416 -66
  82. package/lib/schema/infrastructure-schema.json +10 -35
  83. package/lib/utils/compose-generate-docker-compose.js +16 -9
  84. package/lib/utils/datasource-binary-evidence.js +92 -0
  85. package/lib/utils/datasource-test-run-capability-scope.js +44 -1
  86. package/lib/utils/datasource-test-run-debug-display.js +2 -0
  87. package/lib/utils/datasource-test-run-display.js +8 -2
  88. package/lib/utils/datasource-test-run-issue-guidance.js +176 -0
  89. package/lib/utils/datasource-test-run-tty-log.js +2 -0
  90. package/lib/utils/docker-build.js +29 -8
  91. package/lib/utils/docker-manifest-public-port.js +36 -0
  92. package/lib/utils/env-copy.js +11 -10
  93. package/lib/utils/external-system-system-test-tty.js +3 -2
  94. package/lib/utils/image-tags.js +2 -2
  95. package/lib/utils/platform-kv-ref.js +1 -1
  96. package/lib/utils/platform-resolution.js +226 -0
  97. package/lib/utils/prepare-local-data-mount.js +58 -0
  98. package/lib/utils/resolve-docker-image-ref.js +8 -3
  99. package/lib/utils/secrets-helpers.js +0 -1
  100. package/lib/utils/system-secret-mapping.js +125 -0
  101. package/lib/utils/test-log-writer.js +2 -1
  102. package/lib/validation/external-manifest-validator.js +5 -0
  103. package/lib/validation/openapi-contract-surface-validator.js +3 -1
  104. package/lib/validation/validate-external-file.js +5 -1
  105. package/package.json +5 -4
  106. package/templates/README.md +2 -1
  107. package/templates/agent-kit/agent-kit.yaml +4 -1
  108. package/templates/agent-kit/instructions/AGENTKIT.md +1 -1
  109. package/templates/agent-kit/instructions/root.AGENTS.md +2 -0
  110. package/templates/agent-kit/skills/aifabrix-connected-system/SKILL.md +35 -2
  111. package/templates/agent-kit/skills/aifabrix-connected-system/references/delivery-gates.md +15 -0
  112. package/templates/agent-kit/skills/aifabrix-connected-system/scripts/delivery-verdict.js +176 -0
  113. package/templates/agent-kit/skills/aifabrix-plan/SKILL.md +6 -2
  114. package/templates/agent-kit/skills/aifabrix-prove/SKILL.md +28 -2
  115. package/templates/agent-kit/skills/aifabrix-prove/references/evidence-lifecycle.md +22 -0
  116. package/templates/agent-kit/skills/aifabrix-role-assistant/SKILL.md +28 -1
  117. package/templates/agent-kit/skills/aifabrix-role-assistant/references/testing-playbook.md +117 -0
  118. package/templates/agent-kit/skills/shared/feedback.md +31 -0
  119. package/templates/agent-kit/skills/shared/hosts.md +13 -3
  120. package/templates/agent-kit/skills/shared/interaction.md +83 -0
  121. package/templates/agent-kit/skills/shared/status.md +76 -0
  122. package/templates/agent-kit/workspace/BUILDER_IMPROVEMENT_FINDINGS.md +27 -0
  123. package/templates/applications/builder-api/application.yaml +1 -1
  124. package/templates/applications/builder-api/env.template +5 -1
  125. package/templates/applications/dataplane/application.yaml +30 -2
  126. package/templates/applications/dataplane/env.template +36 -5
  127. package/templates/applications/keycloak/application.yaml +6 -1
  128. package/templates/applications/miso-controller/application.yaml +96 -1
  129. package/templates/applications/miso-controller/env.template +63 -37
  130. package/templates/applications/miso-controller/rbac.yaml +17 -0
  131. package/templates/external-system/external-datasource.yaml.hbs +7 -1
  132. package/templates/marketplace/main.json +73 -225
  133. package/templates/python/Dockerfile.hbs +2 -0
  134. package/templates/python/docker-compose.hbs +1 -1
  135. package/templates/typescript/Dockerfile.hbs +2 -0
  136. package/templates/typescript/docker-compose.hbs +12 -0
  137. package/templates/agent-kit/skills/aifabrix-plan/references/interaction.md +0 -34
  138. /package/{lib/programmatic/help-content → docs/builder-help/content}/channel-onboarding.md +0 -0
  139. /package/{lib/programmatic/help-content → docs/builder-help/content}/cip-overview.md +0 -0
  140. /package/{lib/programmatic/help-content → docs/builder-help/content}/connected-system-ui.md +0 -0
  141. /package/{lib/programmatic/help-content → docs/builder-help/content}/dimensions-guide.md +0 -0
  142. /package/{lib/programmatic/help-content → docs/builder-help/content}/enterprise-sync-fabrix.md +0 -0
  143. /package/{lib/programmatic/help-content → docs/builder-help/content}/overview.md +0 -0
  144. /package/{lib/programmatic/help-content → docs/builder-help/content}/subscription-guide.md +0 -0
  145. /package/{lib/programmatic/help-content → docs/builder-help/content}/workflow.md +0 -0
@@ -29,11 +29,6 @@
29
29
  #
30
30
  # =============================================================================
31
31
 
32
- # Skip automatic first-time bootstrap on controller startup (default: false).
33
- # Bootstrap = DB controller row, Keycloak realm/client, admin user, roles (empty DB only).
34
- # Keep false for normal dev — this is NOT the Azure tenant-activation UI wizard.
35
- # Set true only for tests that must not mutate Keycloak/DB on startup.
36
- SKIP_FIRST_TIME_SETUP=false
37
32
 
38
33
  # Force onboarding to run even when a controller row already exists (default: unset/false).
39
34
  # Prefer SQL/API one-shot: POST /api/v1/controller/force-onboarding (controller:admin) or set
@@ -50,7 +45,8 @@ INFRASTRUCTURE_NAME=${DEV_USERNAME}.${DEV_ROOT_DOMAIN}
50
45
 
51
46
  # Azure region (required for first-time onboarding: controller record / provisioning metadata).
52
47
  # Use the region you deploy to (e.g. westeurope, eastus, northeurope). Single env name: LOCATION.
53
- LOCATION=westeurope
48
+ # Resolved from the platform match; see `platforms` in application.yaml.
49
+ LOCATION={LOCATION}
54
50
 
55
51
  # Required for admin user creation during onboarding
56
52
  # Password for the initial administrator user (username: admin)
@@ -59,23 +55,20 @@ ONBOARDING_ADMIN_PASSWORD=kv://miso-controller-admin-passwordKeyVault
59
55
  # Optional admin email for onboarding (default: admin@aifabrix.ai)
60
56
  ONBOARDING_ADMIN_EMAIL=kv://miso-controller-admin-emailKeyVault
61
57
 
62
- # [customerOwned] Create development environment during onboarding (default: false)
63
- # Full platform: create miso, dev, tst, and pro during onboarding (default: false)
64
- # When true, supersedes ONBOARDING_CREATE_DEV_ENV for which extra environments are created
65
- # [saasDirect] Keep false in the customer container — extra environments belong to the
66
- # eSystems deploy path, not the customer wizard.
58
+ # Which environments onboarding creates (plan 240.0). This is the only onboarding environment
59
+ # variable: false or unset creates `dev`, true creates `dev`, `tst` and `pro`.
60
+ #
61
+ # `dev` is always created — every edition is entitled to it, and the installation registers its
62
+ # own applications into it. What `dev` *is* follows the licence rather than this flag: in the
63
+ # shared model it runs on the installation stack and needs no infrastructure of its own; in the
64
+ # dedicated model it waits at lifecycle `created` for an administrator.
65
+ #
66
+ # Replaces ONBOARDING_CREATE_DEV_ENV, ONBOARDING_CREATE_MISO_ENV and SKIP_FIRST_TIME_SETUP,
67
+ # which expressed one decision in four places and disagreed about its default. Whether the
68
+ # installation environment is deployed during onboarding now follows ONBOARDING_MODE: a hosted
69
+ # (saasDirect) installation deploys it, a customer-owned one leaves it to the activation wizard.
67
70
  ONBOARDING_FULL_PLATFORM=false
68
71
 
69
- # [customerOwned] When true, run Azure env deploy for onboarding envs (SDK modules). Default false —
70
- # Marketplace already provisions infra; TA owns customer env deploy.
71
- # [saasDirect] Keep false: eSystems already deployed the required runtime services.
72
- ONBOARDING_CREATE_MISO_ENV=false
73
-
74
- # [customerOwned] Set to true to create both miso and dev environments during onboarding
75
- # When false (default), only the miso environment is created (ignored when ONBOARDING_FULL_PLATFORM=true)
76
- # [saasDirect] Keep false in the customer container.
77
- ONBOARDING_CREATE_DEV_ENV=true
78
-
79
72
  # =============================================================================
80
73
  # APPLICATION ENVIRONMENT
81
74
  # =============================================================================
@@ -200,16 +193,21 @@ WAIT_FOR_KEYCLOAK=true
200
193
  # For production: use public domain (e.g., https://miso.example.com)
201
194
  # url://public includes front-door path from application.yaml (e.g. /controller).
202
195
  MISO_WEB_SERVER_URL=url://public
196
+ # Private service-to-service controller origin; public/browser traffic uses MISO_WEB_SERVER_URL.
203
197
  MISO_CONTROLLER_URL=url://internal
204
198
  MISO_RELATIVE_PATH=url://vdir-public
205
- ALLOWED_ORIGINS=http://localhost:*,url://host-public,url://host-private,url://dataplane-host-public,url://dataplane-host-private
199
+ ALLOWED_ORIGINS=http://localhost:*,url://host-public,url://host-private,url://dataplane-host-public,url://dataplane-host-private,url://mori-controller-host-public
206
200
  # Opt-in: broker/entry/referer under /data keep …/data/auth/callback (do not append /miso). Default off.
207
201
  # AUTH_PRESERVE_DATAPLANE_VDIR=true
208
202
 
209
203
  # MISO Environment Configuration (miso, dev, tst, pro)
210
204
  MISO_ENVIRONMENT=miso
211
205
 
212
- # MISO Application Client Credentials (per application)
206
+ # Governed configuration uses per-application client credentials by default. The SDK loads
207
+ # its bootstrap snapshot and refreshes it automatically within two minutes; consumers decide
208
+ # whether a changed key also requires an internal client or resource to be recreated.
209
+ MISO_AUTH_MODE=client-credentials
210
+ # MISO Application Client Credentials (per application; never expose the secret to the browser)
213
211
  MISO_CLIENTID=kv://miso-controller-client-idKeyVault
214
212
  MISO_CLIENTSECRET=kv://miso-controller-client-secretKeyVault
215
213
 
@@ -226,12 +224,7 @@ MISO_CLIENTSECRET=kv://miso-controller-client-secretKeyVault
226
224
  #
227
225
  # ENTRA_ID_CENTRAL_CALLBACK_URI — Web redirect on the vendor app; must point at
228
226
  # Mori (e.g. …/entra-id-concent/callback), not the SPA or controller.
229
- # ENTRA_CALLBACK_STATE_SECRET — Shared HMAC secret (min 16 chars) for OAuth state
230
- # between controller and Mori callback service; same value on Mori and controller.
231
- #
232
- # Delegated Graph (second redirect URI on the same vendor app): see section below.
233
- ENTRA_CALLBACK_STATE_SECRET=kv://entra-callback-state-secret
234
- ENTRA_ID_CENTRAL_CALLBACK_URI=https://dev01.aifabrix.dev/mori/entra-id-concent/callback
227
+ ENTRA_ID_CENTRAL_CALLBACK_URI=url://mori-controller-public/entra-id-concent/callback
235
228
  ENTRA_ID_CLIENT_ID=kv://entra-client-idKeyVault
236
229
  ENTRA_ID_CLIENT_SECRET=kv://entra-client-secretKeyVault
237
230
 
@@ -285,7 +278,7 @@ SKIP_DB_REDEPLOY=true
285
278
  # database — DB/RBAC only, no Docker from controller; dashboard (default dev)
286
279
  #
287
280
  # Missing or invalid value defaults to azure (wizard + Azure credentials).
288
- # Bootstrap (SKIP_FIRST_TIME_SETUP=false) is separate from the activation wizard.
281
+ # First-time bootstrap is separate from the activation wizard.
289
282
  # NOTE: there is no `saas` value. eSystems-hosted SaaS runs DEPLOYMENT=azure with
290
283
  # ONBOARDING_MODE=saasDirect (see next section).
291
284
  DEPLOYMENT=database
@@ -375,7 +368,7 @@ MORI_LICENSE_ISSUER=mori-controller
375
368
  # =============================================================================
376
369
  # Must match a Web redirect URI on the vendor multi-tenant app and Mori’s route
377
370
  # …/entra-graph-delegated/callback. Shared pro Mori addon (CICD *-miso-rg):
378
- ENTRA_GRAPH_DELEGATED_REDIRECT_URI=https://dev01.aifabrix.dev/mori/entra-graph-delegated/callback
371
+ ENTRA_GRAPH_DELEGATED_REDIRECT_URI=url://mori-controller-public/entra-graph-delegated/callback
379
372
 
380
373
  # Optional delegated Graph scopes for GET …/graph-auth-url (space- or comma-separated).
381
374
  # 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
@@ -386,13 +379,21 @@ ENTRA_GRAPH_DELEGATED_REDIRECT_URI=https://dev01.aifabrix.dev/mori/entra-graph-d
386
379
  # =============================================================================
387
380
  # MORI SERVICE CONFIGURATION
388
381
  # =============================================================================
389
- # Shared Mori (handoff poll + Entra callback). Local `url://mori-controller-public`
390
- # only works when a local Mori app is registered and running for this developer.
391
- # MORI_CALLBACK_API_KEY must be the same secret as Mori MORI_CONTROLLER_CALLBACK_API_KEY
392
- # (both resolve from kv://mori-callback-api-keyKeyVault — do not generate separate values).
393
- MORI_BASE_URL=kv://mori-controller-web-server-url
394
- MORI_CALLBACK_API_KEY=kv://mori-callback-api-keyKeyVault
382
+ # Shared Mori. Local `url://mori-controller-public` only works when a local Mori app is
383
+ # registered and running for this developer.
384
+ # MORI_API_KEY is per-installation and is minted by POST /marketplace/bootstrap; it is written
385
+ # here by the controller after registration, not provisioned ahead of it.
386
+ MORI_BASE_URL={MORI_BASE_URL}
395
387
  MORI_API_KEY=kv://mori-controller-api-keyKeyVault
388
+ # Ask Mori for a container-registry credential when the installation was given none.
389
+ # Off by default: the call has a 30s timeout inside credential resolution, so enabling it on an
390
+ # installation whose Mori cannot issue would stall every deployment that reaches that point.
391
+ # Declared here because it was previously read from process.env and set nowhere, so there was no
392
+ # supported way to turn the path on — an installation that pulls vendor images through a
393
+ # Mori-issued token had to have an app setting added by hand. Cross-tenant managed identity
394
+ # cannot grant registry access, so this is the only mechanism that works for a customer
395
+ # installation pulling from the vendor registry.
396
+ MORI_REGISTRY_CREDENTIALS=false
396
397
 
397
398
  # =============================================================================
398
399
  # LOGGING CONFIGURATION
@@ -425,3 +426,28 @@ OTEL_SERVICE_VERSION=
425
426
 
426
427
  # Mount Volume Configuration
427
428
  MOUNT_VOLUME=/mnt/data/
429
+
430
+ # Image registry this installation deploys from.
431
+ #
432
+ # `pipeline-validation-flow.helper.ts` resolves the deploy registry as ACR_LOGIN_SERVER first, then
433
+ # the controller record's `configuration.imageRegistry`. Azure installations get the record from the
434
+ # installer, so this stays EMPTY there and behaviour is unchanged. A local installation matches no
435
+ # platform (`allowLocalPlatform` is false for the controller) and has no record, so without this key
436
+ # every `aifabrix deploy` fails with "Image registry is not configured on the controller
437
+ # installation".
438
+ #
439
+ # EMPTY on purpose. The controller record is read AFTER this and overwrites it, so an Azure
440
+ # installation ignores whatever stands here; only a local installation consumes it.
441
+ #
442
+ # This briefly shipped as `aifabrixce16.azurecr.io` — one test installation's registry, committed
443
+ # into the product, so every developer who did not override it would have pushed and pulled
444
+ # against ce-16 without being told. A `{ACR_LOGIN_SERVER}` token was tried instead and is worse
445
+ # still: nothing resolves it without a resource group, so it breaks `aifabrix build` outright
446
+ # ("no platform or environment configuration resolves it for environment dev").
447
+ #
448
+ # Empty is the honest third answer. An Azure installation is unaffected, and a local
449
+ # `aifabrix deploy` fails with "Image registry is not configured on the controller installation",
450
+ # which names the missing thing. Its proper home is the Builder run tooling, which already knows
451
+ # the answer (`aifabrix dev print-registry`) and should inject it per developer rather than have
452
+ # Miso ship one installation's registry to everybody.
453
+ ACR_LOGIN_SERVER=
@@ -176,6 +176,23 @@ permissions:
176
176
  roles: ['aifabrix-platform-admin', 'aifabrix-deployment-admin']
177
177
  description: 'Remove applications from environments'
178
178
 
179
+ # External-system catalog (aligned with src/examples/permissions.csv)
180
+ - name: 'external-system:read'
181
+ roles:
182
+ [
183
+ 'aifabrix-platform-admin',
184
+ 'aifabrix-security-admin',
185
+ 'aifabrix-deployment-admin',
186
+ 'aifabrix-compliance-admin',
187
+ 'aifabrix-developer',
188
+ 'aifabrix-observer'
189
+ ]
190
+ description: 'Read external systems'
191
+
192
+ - name: 'external-systems:domain-manager'
193
+ roles: ['aifabrix-platform-admin', 'aifabrix-security-admin']
194
+ description: 'Manage external-system catalog promotion and role-derived dimension governance'
195
+
179
196
  # Pipeline & Deployment
180
197
  - name: 'applications:deploy'
181
198
  roles: ['aifabrix-platform-admin', 'aifabrix-deployment-admin', 'aifabrix-developer']
@@ -122,7 +122,13 @@ openapi:
122
122
  # documentStorage:
123
123
  # enabled: true
124
124
  # binaryOperationRef: get
125
- # embeddingField: content
125
+ # responseType: binary
126
+ # ingestAfterSync: true
127
+ # Keyed retrieval (no list): for a vendor PDF, image or octet-stream response,
128
+ # keep only get in capabilities and end its CIP steps with output.mode: documents.
129
+ # Fetch: { source: openapi, openapiRef: get, responseType: binary }
130
+ # Map response metadata from raw.headers.FileName and raw.params.DocumentId.
131
+ # The wizard and repair infer this shape from the vendor OpenAPI response media type.
126
132
  {{/if}}
127
133
  {{#if (eq schemaEntityType "vectorStore")}}
128
134
  # vectorStore: vector index settings (model id, dimensions, etc. per schema). Uncomment and set to match your embedding deployment.