@aifabrix/builder 2.44.5 → 2.45.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.cursor/rules/cli-layout.mdc +8 -4
- package/.cursor/rules/project-rules.mdc +1 -1
- package/README.md +15 -23
- package/integration/hubspot-test/README.md +2 -0
- package/integration/hubspot-test/test.js +5 -3
- package/jest.projects.js +104 -2
- package/lib/api/controller-health.api.js +49 -0
- package/lib/api/dimension-values.api.js +82 -0
- package/lib/api/dimensions.api.js +114 -0
- package/lib/api/external-systems.api.js +1 -0
- package/lib/api/integration-clients.api.js +168 -0
- package/lib/api/types/dimension-values.types.js +28 -0
- package/lib/api/types/dimensions.types.js +31 -0
- package/lib/api/types/integration-clients.types.js +45 -0
- package/lib/api/validation-runner.js +46 -25
- package/lib/app/deploy-config.js +11 -1
- package/lib/app/deploy-status-display.js +3 -3
- package/lib/app/deploy.js +36 -14
- package/lib/app/display.js +15 -11
- package/lib/app/helpers.js +3 -3
- package/lib/app/index.js +3 -3
- package/lib/app/push.js +46 -23
- package/lib/app/register.js +7 -6
- package/lib/app/restart-display.js +126 -0
- package/lib/app/rotate-secret.js +7 -6
- package/lib/app/run-container-start.js +12 -6
- package/lib/app/run-env-compose.js +30 -1
- package/lib/app/run-helpers.js +58 -19
- package/lib/app/run-reload-sync.js +148 -0
- package/lib/app/run-resolve-image.js +51 -1
- package/lib/app/run.js +148 -74
- package/lib/app/show-display.js +7 -0
- package/lib/app/show.js +87 -5
- package/lib/build/index.js +83 -49
- package/lib/cli/doctor-check.js +117 -0
- package/lib/cli/index.js +8 -2
- package/lib/cli/infra-guided.js +460 -0
- package/lib/cli/installation-log-command.js +73 -0
- package/lib/cli/setup-app.js +31 -3
- package/lib/cli/setup-auth.js +98 -27
- package/lib/cli/setup-dev-path-commands.js +50 -3
- package/lib/cli/setup-infra-up-dataplane-action.js +111 -0
- package/lib/cli/setup-infra-up-platform-action.js +131 -0
- package/lib/cli/setup-infra.js +132 -118
- package/lib/cli/setup-integration-client.js +182 -0
- package/lib/cli/setup-parameters.js +21 -2
- package/lib/cli/setup-platform.js +102 -0
- package/lib/cli/setup-secrets.js +18 -6
- package/lib/cli/setup-utility-resolve.js +132 -0
- package/lib/cli/setup-utility.js +143 -84
- package/lib/commands/app-logs.js +81 -33
- package/lib/commands/auth-config.js +116 -18
- package/lib/commands/datasource-capability-dimension-cli.js +128 -0
- package/lib/commands/datasource-capability-output.js +29 -0
- package/lib/commands/datasource-capability-relate-cli.js +140 -0
- package/lib/commands/datasource-capability.js +411 -0
- package/lib/commands/datasource-unified-test-cli.options.js +1 -1
- package/lib/commands/datasource.js +53 -13
- package/lib/commands/dev-down.js +3 -3
- package/lib/commands/dev-infra-gate.js +32 -0
- package/lib/commands/dev-init.js +13 -7
- package/lib/commands/dimension-value.js +179 -0
- package/lib/commands/dimension.js +330 -0
- package/lib/commands/integration-client.js +430 -0
- package/lib/commands/login-device.js +65 -30
- package/lib/commands/login.js +21 -10
- package/lib/commands/parameters-validate.js +78 -13
- package/lib/commands/repair-datasource-auto-rbac.js +166 -0
- package/lib/commands/repair-datasource-keys.js +10 -5
- package/lib/commands/repair-datasource.js +19 -7
- package/lib/commands/repair-env-template.js +4 -1
- package/lib/commands/repair-openapi-sync.js +172 -0
- package/lib/commands/repair-persist.js +102 -0
- package/lib/commands/repair-rbac-extract.js +27 -0
- package/lib/commands/repair-rbac-migrate.js +186 -0
- package/lib/commands/repair-rbac.js +214 -31
- package/lib/commands/repair-system-alignment.js +246 -0
- package/lib/commands/repair-system-permissions.js +168 -0
- package/lib/commands/repair.js +120 -338
- package/lib/commands/secure.js +1 -1
- package/lib/commands/setup-modes.js +468 -0
- package/lib/commands/setup-prompts.js +421 -0
- package/lib/commands/setup.js +254 -0
- package/lib/commands/teardown.js +277 -0
- package/lib/commands/up-common.js +113 -19
- package/lib/commands/up-dataplane.js +44 -19
- package/lib/commands/up-miso.js +18 -18
- package/lib/commands/upload.js +111 -23
- package/lib/commands/wizard-core-helpers.js +14 -11
- package/lib/commands/wizard-core.js +6 -5
- package/lib/commands/wizard-dataplane.js +2 -2
- package/lib/commands/wizard-entity-selection.js +4 -3
- package/lib/commands/wizard-headless.js +2 -1
- package/lib/commands/wizard.js +2 -1
- package/lib/constants/infra-compose-service-names.js +40 -0
- package/lib/core/audit-logger.js +1 -34
- package/lib/core/config-admin-email.js +56 -0
- package/lib/core/config-normalize.js +60 -0
- package/lib/core/config-registered-controller-urls.js +54 -0
- package/lib/core/config.js +33 -50
- package/lib/core/env-reader.js +16 -3
- package/lib/core/secrets-admin-env.js +101 -0
- package/lib/core/secrets-ensure-infra.js +34 -1
- package/lib/core/secrets-ensure.js +88 -66
- package/lib/core/secrets-env-content.js +428 -0
- package/lib/core/secrets-env-declarative-expand.js +170 -0
- package/lib/core/secrets-env-write.js +29 -1
- package/lib/core/secrets-load.js +252 -0
- package/lib/core/secrets-names.js +32 -0
- package/lib/core/secrets.js +17 -757
- package/lib/datasource/capability/basic-exposure.js +76 -0
- package/lib/datasource/capability/capability-diff-slice.js +41 -0
- package/lib/datasource/capability/capability-key.js +34 -0
- package/lib/datasource/capability/capability-resolve.js +172 -0
- package/lib/datasource/capability/capability-storage-keys.js +22 -0
- package/lib/datasource/capability/copy-operations.js +348 -0
- package/lib/datasource/capability/copy-test-payload.js +139 -0
- package/lib/datasource/capability/create-operations.js +235 -0
- package/lib/datasource/capability/dimension-operations.js +151 -0
- package/lib/datasource/capability/dimension-validate.js +219 -0
- package/lib/datasource/capability/json-pointer.js +31 -0
- package/lib/datasource/capability/reference-rewrite.js +51 -0
- package/lib/datasource/capability/relate-operations.js +325 -0
- package/lib/datasource/capability/relate-validate.js +219 -0
- package/lib/datasource/capability/remove-operations.js +275 -0
- package/lib/datasource/capability/run-capability-copy.js +152 -0
- package/lib/datasource/capability/run-capability-diff.js +135 -0
- package/lib/datasource/capability/run-capability-dimension.js +291 -0
- package/lib/datasource/capability/run-capability-edit.js +377 -0
- package/lib/datasource/capability/run-capability-relate.js +193 -0
- package/lib/datasource/capability/run-capability-remove.js +105 -0
- package/lib/datasource/capability/templates/minimal-fetch.json +18 -0
- package/lib/datasource/capability/validate-capability-slice.js +35 -0
- package/lib/datasource/list.js +136 -23
- package/lib/datasource/log-viewer.js +2 -4
- package/lib/datasource/unified-validation-run.js +51 -16
- package/lib/datasource/validate.js +53 -1
- package/lib/deployment/deploy-poll-ui.js +60 -0
- package/lib/deployment/deployer-status.js +29 -3
- package/lib/deployment/deployer.js +48 -30
- package/lib/deployment/environment.js +7 -2
- package/lib/deployment/poll-interval.js +72 -0
- package/lib/deployment/push.js +11 -9
- package/lib/external-system/deploy.js +9 -2
- package/lib/external-system/download.js +61 -32
- package/lib/external-system/sync-deploy-manifest.js +33 -0
- package/lib/infrastructure/index.js +49 -19
- package/lib/infrastructure/orphan-infra-docker-teardown.js +177 -0
- package/lib/internal/node-fs.js +2 -0
- package/lib/parameters/infra-kv-discovery.js +29 -4
- package/lib/parameters/infra-parameter-catalog.js +6 -3
- package/lib/parameters/infra-parameter-validate.js +67 -19
- package/lib/resolvers/datasource-resolver.js +53 -0
- package/lib/resolvers/dimension-file.js +52 -0
- package/lib/resolvers/manifest-resolver.js +133 -0
- package/lib/schema/application-schema.json +4 -0
- package/lib/schema/external-datasource.schema.json +183 -53
- package/lib/schema/external-system.schema.json +23 -10
- package/lib/schema/infra.parameter.yaml +26 -1
- package/lib/schema/wizard-config.schema.json +1 -1
- package/lib/utils/aifabrix-config-dir-walk.js +40 -0
- package/lib/utils/aifabrix-runtime-config-dir.js +26 -3
- package/lib/utils/app-config-resolver.js +24 -1
- package/lib/utils/app-run-containers.js +2 -2
- package/lib/utils/applications-config-defaults.js +206 -0
- package/lib/utils/auth-config-validator.js +2 -12
- package/lib/utils/bash-secret-env.js +59 -0
- package/lib/utils/cli-secrets-error-format.js +78 -0
- package/lib/utils/cli-test-layout-chalk.js +31 -9
- package/lib/utils/cli-utils.js +4 -36
- package/lib/utils/compose-generate-docker-compose.js +111 -6
- package/lib/utils/compose-generator.js +17 -8
- package/lib/utils/controller-url.js +50 -7
- package/lib/utils/datasource-test-run-display.js +8 -0
- package/lib/utils/dev-hosts-helper.js +3 -2
- package/lib/utils/dev-init-ssh-merge.js +2 -1
- package/lib/utils/docker-build.js +17 -9
- package/lib/utils/docker-reload-mount.js +127 -0
- package/lib/utils/env-copy.js +99 -14
- package/lib/utils/env-template.js +5 -1
- package/lib/utils/external-readme.js +71 -2
- package/lib/utils/external-system-local-test-tty.js +3 -2
- package/lib/utils/external-system-readiness-core.js +45 -12
- package/lib/utils/external-system-readiness-deploy-display.js +3 -3
- package/lib/utils/external-system-readiness-display-internals.js +33 -3
- package/lib/utils/external-system-readiness-display.js +10 -1
- package/lib/utils/file-upload.js +40 -3
- package/lib/utils/health-check-db-init.js +107 -0
- package/lib/utils/health-check-public-warn.js +69 -0
- package/lib/utils/health-check-url.js +28 -10
- package/lib/utils/health-check.js +139 -107
- package/lib/utils/help-builder.js +5 -1
- package/lib/utils/image-name.js +34 -7
- package/lib/utils/infra-optional-service-flags.js +69 -0
- package/lib/utils/installation-log-core.js +282 -0
- package/lib/utils/installation-log-record.js +237 -0
- package/lib/utils/installation-log.js +123 -0
- package/lib/utils/integration-file-backup.js +74 -0
- package/lib/utils/log-redaction.js +105 -0
- package/lib/utils/manifest-location.js +164 -0
- package/lib/utils/manifest-source-emit.js +162 -0
- package/lib/utils/mutagen-install.js +30 -3
- package/lib/utils/paths.js +308 -76
- package/lib/utils/postgres-wipe.js +212 -0
- package/lib/utils/register-aifabrix-shell-env.js +15 -0
- package/lib/utils/remote-dev-auth.js +21 -5
- package/lib/utils/remote-docker-env.js +9 -1
- package/lib/utils/remote-secrets-loader.js +49 -4
- package/lib/utils/resolve-docker-image-ref.js +9 -3
- package/lib/utils/run-cli-flags.js +29 -0
- package/lib/utils/secrets-ancestor-paths.js +47 -0
- package/lib/utils/secrets-canonical.js +10 -3
- package/lib/utils/secrets-helpers.js +17 -10
- package/lib/utils/secrets-kv-refs.js +42 -0
- package/lib/utils/secrets-kv-scope.js +19 -2
- package/lib/utils/secrets-materialize-local.js +134 -0
- package/lib/utils/secrets-path.js +26 -13
- package/lib/utils/secrets-utils.js +20 -10
- package/lib/utils/system-builder-root.js +42 -0
- package/lib/utils/url-declarative-public-base.js +80 -12
- package/lib/utils/url-declarative-resolve-build-urls.js +238 -0
- package/lib/utils/url-declarative-resolve-build.js +24 -388
- package/lib/utils/url-declarative-resolve-expand-token.js +189 -0
- package/lib/utils/url-declarative-resolve-load-doc.js +12 -3
- package/lib/utils/url-declarative-resolve-surface-state.js +102 -0
- package/lib/utils/url-declarative-resolve.js +47 -7
- package/lib/utils/url-declarative-runtime-base-path.js +52 -0
- package/lib/utils/url-declarative-vdir-inactive-env.js +2 -1
- package/lib/utils/urls-local-registry-scan.js +103 -0
- package/lib/utils/urls-local-registry.js +158 -76
- package/lib/utils/validation-poll-ui.js +81 -0
- package/lib/utils/validation-run-poll.js +29 -5
- package/lib/utils/with-muted-logger.js +53 -0
- package/package.json +3 -1
- package/templates/applications/dataplane/application.yaml +5 -1
- package/templates/applications/dataplane/rbac.yaml +10 -10
- package/templates/applications/keycloak/env.template +8 -6
- package/templates/applications/miso-controller/application.yaml +9 -0
- package/templates/applications/miso-controller/env.template +27 -29
- package/templates/applications/miso-controller/rbac.yaml +9 -9
- package/templates/external-system/README.md.hbs +83 -123
- package/.npmrc.token +0 -1
- package/.nyc_output/55e9d034-ddab-4579-a706-e02a91d75c91.json +0 -1
- package/.nyc_output/processinfo/55e9d034-ddab-4579-a706-e02a91d75c91.json +0 -1
- package/.nyc_output/processinfo/index.json +0 -1
- package/lib/api/service-users.api.js +0 -150
- package/lib/api/types/service-users.types.js +0 -65
- package/lib/cli/setup-service-user.js +0 -187
- package/lib/commands/service-user.js +0 -429
|
@@ -57,7 +57,6 @@ NODE_ENV=dev
|
|
|
57
57
|
PORT=${PORT}
|
|
58
58
|
AUTO_CREATE_TABLES=true
|
|
59
59
|
FAST_STARTUP=false
|
|
60
|
-
ALLOWED_ORIGINS=http://localhost:*,url://host-public,url://host-private,url://dataplane-host-public,url://dataplane-host-private
|
|
61
60
|
ENABLE_API_DOCS=true
|
|
62
61
|
|
|
63
62
|
# Rate Limiting Configuration (for local development)
|
|
@@ -141,6 +140,33 @@ KEYCLOAK_EVENTS_SECRET=kv://keycloak-events-secretKeyVault
|
|
|
141
140
|
WAIT_FOR_KEYCLOAK=true
|
|
142
141
|
# KEYCLOAK_WAIT_TIMEOUT=60
|
|
143
142
|
|
|
143
|
+
# =============================================================================
|
|
144
|
+
# MISO CONTROLLER CONFIGURATION
|
|
145
|
+
# =============================================================================
|
|
146
|
+
# Web Server URL (for OpenAPI documentation server URLs and Keycloak callbacks)
|
|
147
|
+
# This is the PUBLIC-FACING URL that browsers/users access (e.g., http://localhost:3100)
|
|
148
|
+
# Used to generate correct server URLs in OpenAPI spec and Keycloak callback URLs
|
|
149
|
+
# For Docker: use localhost with mapped port (e.g., localhost:3100)
|
|
150
|
+
# For production: use public domain (e.g., https://miso.example.com)
|
|
151
|
+
# url://public includes front-door path from application.yaml (e.g. /controller).
|
|
152
|
+
MISO_WEB_SERVER_URL=url://public
|
|
153
|
+
MISO_CONTROLLER_URL=url://internal
|
|
154
|
+
MISO_RELATIVE_PATH=url://vdir-public
|
|
155
|
+
ALLOWED_ORIGINS=http://localhost:*,url://host-public,url://host-private,url://dataplane-host-public,url://dataplane-host-private
|
|
156
|
+
|
|
157
|
+
# MISO Environment Configuration (miso, dev, tst, pro)
|
|
158
|
+
MISO_ENVIRONMENT=miso
|
|
159
|
+
|
|
160
|
+
# MISO Application Client Credentials (per application)
|
|
161
|
+
MISO_CLIENTID=kv://miso-controller-client-idKeyVault
|
|
162
|
+
MISO_CLIENTSECRET=kv://miso-controller-client-secretKeyVault
|
|
163
|
+
|
|
164
|
+
# Evaluation mode (optional .env override of DB controller.configuration.evaluation):
|
|
165
|
+
# When true (default if DB omits flag), infra deploy may coerce :envKey to `miso` — e2e poll on `dev` can 404.
|
|
166
|
+
# Set false locally to force path envKey to match deploy + GET .../deployments/:id.
|
|
167
|
+
# Unset = use DB only.
|
|
168
|
+
CONTROLLER_EVALUATION=
|
|
169
|
+
|
|
144
170
|
# =============================================================================
|
|
145
171
|
# TENANT ACTIVATION (TA-3) — EXISTING LLM CATALOG
|
|
146
172
|
# =============================================================================
|
|
@@ -301,34 +327,6 @@ JWT_SECRET=kv://miso-controller-jwt-secretKeyVault
|
|
|
301
327
|
# When API_KEY is set, a matching Bearer token bypasses OAuth2 validation
|
|
302
328
|
API_KEY=kv://miso-controller-secrets-apiKeyVault
|
|
303
329
|
|
|
304
|
-
# NPM token for private package (npmjs.org)
|
|
305
|
-
NPM_TOKEN=kv://BASH_NPM_TOKEN
|
|
306
|
-
|
|
307
|
-
# =============================================================================
|
|
308
|
-
# MISO CONTROLLER CONFIGURATION
|
|
309
|
-
# =============================================================================
|
|
310
|
-
# Web Server URL (for OpenAPI documentation server URLs and Keycloak callbacks)
|
|
311
|
-
# This is the PUBLIC-FACING URL that browsers/users access (e.g., http://localhost:3100)
|
|
312
|
-
# Used to generate correct server URLs in OpenAPI spec and Keycloak callback URLs
|
|
313
|
-
# For Docker: use localhost with mapped port (e.g., localhost:3100)
|
|
314
|
-
# For production: use public domain (e.g., https://miso.example.com)
|
|
315
|
-
# url://public includes front-door path from application.yaml (e.g. /controller).
|
|
316
|
-
MISO_WEB_SERVER_URL=url://public
|
|
317
|
-
MISO_CONTROLLER_URL=url://internal
|
|
318
|
-
|
|
319
|
-
# MISO Environment Configuration (miso, dev, tst, pro)
|
|
320
|
-
MISO_ENVIRONMENT=miso
|
|
321
|
-
|
|
322
|
-
# MISO Application Client Credentials (per application)
|
|
323
|
-
MISO_CLIENTID=kv://miso-controller-client-idKeyVault
|
|
324
|
-
MISO_CLIENTSECRET=kv://miso-controller-client-secretKeyVault
|
|
325
|
-
|
|
326
|
-
# Evaluation mode (optional .env override of DB controller.configuration.evaluation):
|
|
327
|
-
# When true (default if DB omits flag), infra deploy may coerce :envKey to `miso` — e2e poll on `dev` can 404.
|
|
328
|
-
# Set false locally to force path envKey to match deploy + GET .../deployments/:id.
|
|
329
|
-
# Unset = use DB only.
|
|
330
|
-
CONTROLLER_EVALUATION=
|
|
331
|
-
|
|
332
330
|
# =============================================================================
|
|
333
331
|
# LICENSE CONFIGURATION
|
|
334
332
|
# =============================================================================
|
|
@@ -35,22 +35,22 @@ roles:
|
|
|
35
35
|
groups: ['AI-Fabrix-Observers']
|
|
36
36
|
|
|
37
37
|
permissions:
|
|
38
|
-
#
|
|
39
|
-
- name: '
|
|
38
|
+
# Integration clients (Keycloak OIDC clients + control-plane metadata)
|
|
39
|
+
- name: 'integration-client:create'
|
|
40
40
|
roles: ['aifabrix-platform-admin', 'aifabrix-security-admin']
|
|
41
|
-
description: 'Create
|
|
41
|
+
description: 'Create integration clients and Keycloak OIDC clients'
|
|
42
42
|
|
|
43
|
-
- name: '
|
|
43
|
+
- name: 'integration-client:read'
|
|
44
44
|
roles: ['aifabrix-platform-admin', 'aifabrix-security-admin', 'aifabrix-observer']
|
|
45
|
-
description: 'View
|
|
45
|
+
description: 'View integration clients and their configurations'
|
|
46
46
|
|
|
47
|
-
- name: '
|
|
47
|
+
- name: 'integration-client:update'
|
|
48
48
|
roles: ['aifabrix-platform-admin', 'aifabrix-security-admin']
|
|
49
|
-
description: 'Update
|
|
49
|
+
description: 'Update integration client configuration and regenerate secrets'
|
|
50
50
|
|
|
51
|
-
- name: '
|
|
51
|
+
- name: 'integration-client:delete'
|
|
52
52
|
roles: ['aifabrix-platform-admin', 'aifabrix-security-admin']
|
|
53
|
-
description: 'Deactivate
|
|
53
|
+
description: 'Deactivate integration clients'
|
|
54
54
|
|
|
55
55
|
# User Management
|
|
56
56
|
- name: 'users:create'
|
|
@@ -2,147 +2,119 @@
|
|
|
2
2
|
|
|
3
3
|
{{description}}
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## At a glance
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
| | |
|
|
8
|
+
| --- | --- |
|
|
9
|
+
| **System key** | `{{systemKey}}` |
|
|
10
|
+
| **Type** | `{{systemType}}` |
|
|
11
|
+
| **Datasources** | {{datasourceCount}} |
|
|
10
12
|
|
|
11
13
|
## Files
|
|
12
14
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
+
| File | Purpose |
|
|
16
|
+
| --- | --- |
|
|
17
|
+
| `application{{fileExt}}` | App manifest and `externalIntegration` |
|
|
18
|
+
| `{{systemKey}}-system{{fileExt}}` | Auth, API definition, roles |
|
|
15
19
|
{{#each datasources}}
|
|
16
|
-
|
|
20
|
+
| `{{fileName}}` | Datasource: {{displayName}} (**capabilities** here) |
|
|
17
21
|
{{/each}}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
+
| `env.template` | Secrets and env placeholders |
|
|
23
|
+
| `{{systemKey}}-deploy.json` | Deploy manifest (`aifabrix json {{appName}}`) |
|
|
24
|
+
| `deploy.js` | Deploy helper |
|
|
25
|
+
| `wizard.yaml` | Wizard input |
|
|
26
|
+
| `{{rbacOptionalFile}}` | Roles and permissions |
|
|
22
27
|
|
|
23
|
-
|
|
24
|
-
present.
|
|
28
|
+
## Typical workflow
|
|
25
29
|
|
|
26
|
-
|
|
30
|
+
1. **Login** — `aifabrix login` (controller URL set via `aifabrix auth config` if needed).
|
|
31
|
+
2. **Change config** — edit JSON/YAML under `integration/{{appName}}/`, or extend with `aifabrix wizard --app {{appName}}`.
|
|
32
|
+
3. **Adjust operations** — use `aifabrix datasource capability …` to copy, add, or remove **capabilities** (see below).
|
|
33
|
+
4. **Check locally** — `aifabrix validate {{appName}}` and `aifabrix datasource validate` on files you touched.
|
|
34
|
+
5. **Align manifest** — `aifabrix repair {{appName}}` after bigger edits.
|
|
35
|
+
6. **Publish** — `aifabrix upload {{appName}}` or `aifabrix deploy {{appName}}`.
|
|
27
36
|
|
|
28
|
-
|
|
37
|
+
Rollback an experiment: `datasource capability remove …` → validate → upload/deploy again.
|
|
29
38
|
|
|
30
|
-
|
|
31
|
-
aifabrix auth config --set-controller URL --set-environment dev
|
|
32
|
-
aifabrix login
|
|
33
|
-
```
|
|
39
|
+
## Capabilities (per datasource)
|
|
34
40
|
|
|
35
|
-
|
|
41
|
+
Each `*-datasource-*` file lists **capabilities**: named slices that tie together HTTP/API definitions and execution steps. Use the CLI to clone or drop them safely instead of editing huge JSON by hand.
|
|
36
42
|
|
|
37
|
-
|
|
43
|
+
**After any change:** run `aifabrix datasource validate <file-or-key>` (or `aifabrix validate {{appName}}` for the whole app).
|
|
38
44
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
45
|
+
| Command | What it does |
|
|
46
|
+
| --- | --- |
|
|
47
|
+
| `datasource capability copy` | Clone one capability to a new name (`--from` / `--as`). Supports `--dry-run`, `--overwrite`, backups. If `exposed.profiles.<from>` exists, it’s copied to `exposed.profiles.<as>`. |
|
|
48
|
+
| `datasource capability create` (or `add`) | New capability from `--from`, `--template`, or `--openapi-operation`. |
|
|
49
|
+
| `datasource capability remove` | Remove one capability (`--capability`; optional `--profile`). Use `--dry-run` first. |
|
|
50
|
+
| `datasource capability validate` | Schema check for the file or one `--capability`. |
|
|
51
|
+
| `datasource capability diff` | Compare two files for one capability. |
|
|
52
|
+
| `datasource capability edit` | Edit one capability’s API definition, runtime steps, or exposure profile in your editor (TTY). |
|
|
53
|
+
| `datasource capability relate` | Link this datasource to another (foreign-key style metadata). See `--help` for flags. |
|
|
42
54
|
|
|
43
|
-
|
|
55
|
+
Short alias (recommended): `af ds cap <command> …`
|
|
56
|
+
Full command: `aifabrix datasource capability <command> …`
|
|
44
57
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
- **Authentication**: `{{systemKey}}-system{{fileExt}}` (auth type, credentials placeholders)
|
|
48
|
-
- **Field mappings**: `{{systemKey}}-datasource-*{{fileExt}}` (dimensions, attributes, operations)
|
|
49
|
-
- **Credential and configuration**: `env.template` (security settings and configuration variables)
|
|
50
|
-
{{#if secretPaths}}{{#if secretPaths.length}}
|
|
51
|
-
|
|
52
|
-
### Secrets
|
|
53
|
-
|
|
54
|
-
Secrets are resolved from `.aifabrix` or key vault. Set them with:
|
|
58
|
+
Examples (use the first datasource from the Files table):
|
|
55
59
|
|
|
56
60
|
```bash
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
{{/each}}
|
|
60
|
-
```
|
|
61
|
-
{{/if}}{{/if}}
|
|
62
|
-
|
|
63
|
-
### 3. Validate configuration (local only)
|
|
64
|
-
|
|
65
|
-
`aifabrix validate` runs **on your machine**: it loads files under
|
|
66
|
-
`integration/{{appName}}/`, checks them against the application and
|
|
67
|
-
external-system / external-datasource JSON schemas, and runs related manifest rules.
|
|
68
|
-
It does **not** call the dataplane or any other remote API.
|
|
69
|
-
|
|
70
|
-
```bash
|
|
71
|
-
aifabrix validate {{appName}}
|
|
72
|
-
```
|
|
61
|
+
# Preview cloning "create" to "createBasic" (no write)
|
|
62
|
+
af ds cap copy {{#if hasDatasources}}{{datasources.[0].datasourceKey}}{{else}}<datasource-key>{{/if}} --from create --as createBasic --dry-run
|
|
73
63
|
|
|
74
|
-
|
|
64
|
+
# Apply the copy, then validate
|
|
65
|
+
af ds cap copy {{#if hasDatasources}}{{datasources.[0].datasourceKey}}{{else}}<datasource-key>{{/if}} --from create --as createBasic
|
|
66
|
+
af ds validate {{#if hasDatasources}}{{datasources.[0].datasourceKey}}{{else}}<datasource-key>{{/if}}
|
|
75
67
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
**Run repair regularly.** It keeps naming conventions, filenames, and the deployment
|
|
79
|
-
manifest aligned with AI Fabrix platform best practices. Use it after editing
|
|
80
|
-
datasources, env.template, or system config—and run it often to catch drift early.
|
|
81
|
-
|
|
82
|
-
```bash
|
|
83
|
-
aifabrix repair {{appName}}
|
|
68
|
+
# Remove a capability you no longer need
|
|
69
|
+
af ds cap remove {{#if hasDatasources}}{{datasources.[0].datasourceKey}}{{else}}<datasource-key>{{/if}} --capability createBasic --dry-run
|
|
84
70
|
```
|
|
85
71
|
|
|
86
|
-
|
|
72
|
+
For flags, run `af ds cap <command> --help`.
|
|
87
73
|
|
|
88
|
-
|
|
89
|
-
`queryParam`, `oidc`, `hmac`, `none`); updates system file and env.template
|
|
90
|
-
- `--dry-run` — Report changes only; do not write
|
|
91
|
-
- `--rbac` — Ensure RBAC permissions per datasource and add default Admin/Reader roles if none exist
|
|
92
|
-
- `--expose` — Set `exposed.attributes` on each datasource to all `fieldMappings.attributes` keys
|
|
93
|
-
- `--sync` — Add default sync section to datasources that lack it
|
|
94
|
-
- `--test` — Generate `testPayload.payloadTemplate` and `testPayload.expectedResult` from attributes
|
|
74
|
+
## Single datasource lifecycle (production-ready)
|
|
95
75
|
|
|
96
|
-
|
|
76
|
+
Start with one datasource and iterate until it’s stable.
|
|
97
77
|
|
|
98
78
|
```bash
|
|
99
|
-
|
|
79
|
+
af ds validate {{#if hasDatasources}}{{datasources.[0].datasourceKey}}{{else}}<datasource-key>{{/if}}
|
|
80
|
+
af ds test {{#if hasDatasources}}{{datasources.[0].datasourceKey}}{{else}}<datasource-key>{{/if}} --debug --sync
|
|
81
|
+
af ds test-integration {{#if hasDatasources}}{{datasources.[0].datasourceKey}}{{else}}<datasource-key>{{/if}} --sync
|
|
82
|
+
af ds test-e2e {{#if hasDatasources}}{{datasources.[0].datasourceKey}}{{else}}<datasource-key>{{/if}} --debug --sync
|
|
100
83
|
```
|
|
101
84
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
| Command | Where it runs | Calls dataplane? |
|
|
105
|
-
| --- | --- | --- |
|
|
106
|
-
| `aifabrix validate {{appName}}` | Local (schemas / files) | No |
|
|
107
|
-
| `aifabrix test {{appName}}` | Local (manifest / payload checks) | No |
|
|
108
|
-
| `aifabrix test-integration {{appName}}` | Auth + dataplane | Yes |
|
|
109
|
-
| `aifabrix test-e2e {{appName}}` | Auth + dataplane | Yes |
|
|
110
|
-
| Datasource `test` / `test-integration` / `test-e2e` | Auth + dataplane | Yes |
|
|
85
|
+
{{#if secretPaths}}{{#if secretPaths.length}}
|
|
111
86
|
|
|
112
|
-
|
|
113
|
-
commands** exercise the system **via the API** (after login and a reachable
|
|
114
|
-
dataplane).
|
|
87
|
+
## Secrets
|
|
115
88
|
|
|
116
|
-
|
|
89
|
+
Store values the CLI expects (no secrets in Git):
|
|
117
90
|
|
|
118
91
|
```bash
|
|
119
|
-
|
|
120
|
-
aifabrix
|
|
92
|
+
{{#each secretPaths}}
|
|
93
|
+
aifabrix secret set {{path}} <your value> # {{description}}
|
|
94
|
+
{{/each}}
|
|
121
95
|
```
|
|
96
|
+
{{/if}}{{/if}}
|
|
122
97
|
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
```bash
|
|
126
|
-
aifabrix test-integration {{appName}}
|
|
127
|
-
```
|
|
98
|
+
## Repair
|
|
128
99
|
|
|
129
|
-
|
|
100
|
+
Keeps filenames, lists, and deploy manifest in sync after manual edits.
|
|
130
101
|
|
|
131
102
|
```bash
|
|
132
|
-
aifabrix
|
|
103
|
+
aifabrix repair {{appName}}
|
|
133
104
|
```
|
|
134
105
|
|
|
135
|
-
|
|
106
|
+
Useful flags: `--dry-run`, `--auth <method>`, `--rbac`, `--expose`, `--sync`, `--test`.
|
|
136
107
|
|
|
137
|
-
|
|
138
|
-
- `-v`, `--verbose` — Show detailed step output and poll progress
|
|
139
|
-
- `-d`, `--debug` — Include debug output and write log to `integration/{{appName}}/logs/`
|
|
140
|
-
- `--no-async` — Use sync mode (no polling); single POST per datasource
|
|
108
|
+
## Validate and test
|
|
141
109
|
|
|
142
|
-
|
|
110
|
+
| Command | Network |
|
|
111
|
+
| --- | --- |
|
|
112
|
+
| `aifabrix validate {{appName}}` | Off — schemas and files only |
|
|
113
|
+
| `aifabrix test {{appName}}` | Off — local checks |
|
|
114
|
+
| `aifabrix test-integration {{appName}}` | On — needs login + dataplane |
|
|
115
|
+
| `aifabrix test-e2e {{appName}}` | On — full pipeline per datasource |
|
|
143
116
|
|
|
144
|
-
|
|
145
|
-
CIP), use `aifabrix datasource test-e2e` with the datasource key and app:
|
|
117
|
+
Single datasource E2E:
|
|
146
118
|
|
|
147
119
|
{{#if hasDatasources}}
|
|
148
120
|
```bash
|
|
@@ -152,40 +124,28 @@ aifabrix datasource test-e2e {{datasourceKey}} --app {{../appName}}
|
|
|
152
124
|
|
|
153
125
|
{{/each}}
|
|
154
126
|
```
|
|
127
|
+
{{else}}
|
|
128
|
+
```bash
|
|
129
|
+
aifabrix datasource test-e2e <datasource-key> --app {{appName}}
|
|
130
|
+
```
|
|
155
131
|
{{/if}}
|
|
156
132
|
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
- `-a`, `--app {{appName}}` — App key (default: resolve from cwd if inside `integration/{{appName}}/`)
|
|
160
|
-
- `-e`, `--env ENV` — Environment: `dev`, `tst`, or `pro`
|
|
161
|
-
- `-v`, `--verbose` — Show detailed step output and poll progress
|
|
162
|
-
- `-d`, `--debug` — Include debug output and write log to `integration/{{appName}}/logs/`
|
|
163
|
-
- `--no-run-scenarios` — Skip expanding `testPayload.scenarios` in capacity step
|
|
164
|
-
- `--no-cleanup` — Disable cleanup after test (body cleanup: false)
|
|
165
|
-
- `--primary-key-value VALUE` — Primary key value or path to JSON file (e.g.
|
|
166
|
-
`@pk.json`) for body `primaryKeyValue`
|
|
167
|
-
- `--no-async` — Use sync mode (no polling); single POST, no asyncRun
|
|
168
|
-
|
|
169
|
-
## Deployment
|
|
133
|
+
Common E2E flags: `-v` / `--verbose`, `-d` / `--debug`, `--no-async`.
|
|
170
134
|
|
|
171
|
-
Deploy
|
|
172
|
-
come from `aifabrix login` and `aifabrix auth config`:
|
|
135
|
+
## Deploy
|
|
173
136
|
|
|
174
137
|
```bash
|
|
175
138
|
aifabrix deploy {{appName}}
|
|
176
139
|
```
|
|
177
140
|
|
|
178
|
-
##
|
|
141
|
+
## Remove app
|
|
179
142
|
|
|
180
143
|
```bash
|
|
181
144
|
aifabrix delete {{appName}}
|
|
182
145
|
```
|
|
183
146
|
|
|
184
|
-
##
|
|
147
|
+
## When something fails
|
|
185
148
|
|
|
186
|
-
- **
|
|
187
|
-
|
|
188
|
-
- **
|
|
189
|
-
`aifabrix auth config --set-controller URL --set-environment ENV` and
|
|
190
|
-
`aifabrix login` before `aifabrix deploy`.
|
|
191
|
-
- **File not found**: Run commands from the project root (where `package.json` and `integration/` live).
|
|
149
|
+
- **Validation errors** — Fix JSON/schema issues; run `aifabrix validate {{appName}}` and `aifabrix datasource validate` on the file you changed.
|
|
150
|
+
- **Auth** — `aifabrix auth config` + `aifabrix login` before upload, deploy, or remote tests.
|
|
151
|
+
- **Wrong folder** — Run CLI from the project root (where `integration/{{appName}}/` lives).
|
package/.npmrc.token
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
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
|