@aifabrix/builder 2.46.0 → 2.47.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (191) hide show
  1. package/.npmrc.token +1 -0
  2. package/.temp/jest-protection-convert/run-IFN2nv/.protection/hubspot-companies.json +1 -0
  3. package/.temp/jest-protection-convert/run-IvmKLO/.protection/hubspot-companies.yaml +17 -0
  4. package/.temp/jest-protection-convert/run-SdvblF/.protection/hubspot-companies.json +1 -0
  5. package/.temp/jest-protection-convert/run-b51TsW/.protection/hubspot-companies.json +1 -0
  6. package/.temp/jest-protection-convert/run-fiLmb1/.protection/hubspot-companies.json +1 -0
  7. package/.temp/jest-protection-convert/run-qYGHMU/.protection/hubspot-companies.yaml +17 -0
  8. package/.temp/jest-protection-fixtures/hubspot-Mq5re8/hubspot-companies.yaml +17 -0
  9. package/.temp/jest-protection-fixtures/hubspot-f3u4YL/hubspot-companies.yaml +17 -0
  10. package/.temp/jest-protection-fixtures/hubspot-iQtd1O/hubspot-companies.yaml +17 -0
  11. package/.temp/jest-protection-fixtures/hubspot-mdmz5M/hubspot-companies.yaml +17 -0
  12. package/.temp/jest-protection-fixtures/hubspot-qbKYxQ/hubspot-companies.yaml +17 -0
  13. package/.temp/jest-protection-fixtures/hubspot-yzlJy6/hubspot-companies.yaml +17 -0
  14. package/.temp/validation/summary.txt +5 -0
  15. package/jest.isolated-projects.js +18 -2
  16. package/jest.projects.js +24 -0
  17. package/lib/api/dataplane-health.api.js +19 -7
  18. package/lib/api/lifecycle.api.js +22 -1
  19. package/lib/api/resource-types.api.js +107 -0
  20. package/lib/api/runtime-configuration.api.js +72 -0
  21. package/lib/api/types/resource-types.types.js +45 -0
  22. package/lib/api/user-groups.api.js +9 -9
  23. package/lib/api/users.api.js +8 -8
  24. package/lib/api/wizard.api.js +10 -2
  25. package/lib/app/down.js +58 -26
  26. package/lib/app/index.js +2 -2
  27. package/lib/app/run-resolve-image.js +2 -1
  28. package/lib/app/run-stop-containers.js +113 -0
  29. package/lib/app/run.js +1 -31
  30. package/lib/app/show-display.js +35 -0
  31. package/lib/app/show.js +32 -1
  32. package/lib/build/index.js +17 -5
  33. package/lib/build/miso-controller-npm-sdk-guard.js +25 -0
  34. package/lib/channels/add-channel.js +348 -0
  35. package/lib/channels/channel-artifact-generator.js +141 -0
  36. package/lib/channels/channel-audit.js +101 -0
  37. package/lib/channels/channel-auth-context.js +37 -0
  38. package/lib/channels/channel-credential.js +200 -0
  39. package/lib/channels/channel-display-name.js +64 -0
  40. package/lib/channels/channel-external-system.js +106 -0
  41. package/lib/channels/channel-integration-generator.js +274 -0
  42. package/lib/channels/channel-probe.js +89 -0
  43. package/lib/channels/channel-runtime-resolver.js +152 -0
  44. package/lib/channels/channel-status-display.js +141 -0
  45. package/lib/channels/channel-targets.js +115 -0
  46. package/lib/cli/index.js +18 -4
  47. package/lib/cli/infra-guided-auth.js +36 -12
  48. package/lib/cli/setup-app.js +54 -3
  49. package/lib/cli/setup-infra-up-dataplane-action.js +2 -2
  50. package/lib/cli/setup-infra-up-platform-action.js +2 -1
  51. package/lib/cli/setup-npm.js +59 -0
  52. package/lib/cli/setup-platform.js +1 -1
  53. package/lib/cli/setup-secrets.js +1 -1
  54. package/lib/cli/setup-utility-help-after.js +4 -1
  55. package/lib/cli/setup-utility-resolve.js +8 -5
  56. package/lib/commands/app-logs.js +54 -26
  57. package/lib/commands/app.js +41 -0
  58. package/lib/commands/auth-status-dataplane-version.js +97 -61
  59. package/lib/commands/auth-status.js +2 -7
  60. package/lib/commands/channel.js +58 -0
  61. package/lib/commands/datasource.js +1 -1
  62. package/lib/commands/identity-apply-sync.js +49 -8
  63. package/lib/commands/identity-group-cli.js +66 -26
  64. package/lib/commands/identity-membership-role-cache.js +58 -37
  65. package/lib/commands/identity-shared.js +22 -1
  66. package/lib/commands/identity-user-cli.js +80 -34
  67. package/lib/commands/login-device.js +11 -3
  68. package/lib/commands/login.js +8 -3
  69. package/lib/commands/npm-config.js +103 -0
  70. package/lib/commands/repair-auth-apply.js +30 -4
  71. package/lib/commands/repair-auth-config.js +8 -13
  72. package/lib/commands/repair-datasource-com-v2.js +15 -0
  73. package/lib/commands/repair-datasource-service-contract.js +206 -0
  74. package/lib/commands/repair-datasource.js +53 -18
  75. package/lib/commands/repair-env-template.js +12 -12
  76. package/lib/commands/repair-openapi-sync.js +26 -4
  77. package/lib/commands/repair-steps.js +28 -13
  78. package/lib/commands/repair-system-alignment.js +7 -4
  79. package/lib/commands/resource-type.js +371 -0
  80. package/lib/commands/setup-modes.js +1 -1
  81. package/lib/commands/setup-prompts-platform-mode.js +24 -21
  82. package/lib/commands/test-trust-external.js +39 -90
  83. package/lib/commands/up-common.js +33 -1
  84. package/lib/commands/up-dataplane.js +8 -4
  85. package/lib/commands/upload.js +24 -3
  86. package/lib/commands/verify-trust-command-action.js +4 -1
  87. package/lib/commands/verify-trust-external.js +12 -20
  88. package/lib/core/config-setup-platform-mode.js +3 -3
  89. package/lib/core/setup-platform-mode.js +41 -6
  90. package/lib/datasource/capability/capability-diff-slice.js +2 -2
  91. package/lib/datasource/capability/capability-manifest.js +254 -0
  92. package/lib/datasource/capability/capability-resolve.js +3 -4
  93. package/lib/datasource/capability/copy-operations.js +5 -3
  94. package/lib/datasource/capability/remove-operations.js +2 -1
  95. package/lib/datasource/capability/run-capability-copy.js +32 -4
  96. package/lib/datasource/capability/run-capability-diff.js +3 -3
  97. package/lib/datasource/capability/run-capability-dimension.js +2 -4
  98. package/lib/datasource/capability/run-capability-edit.js +4 -7
  99. package/lib/datasource/capability/run-capability-relate.js +2 -4
  100. package/lib/datasource/capability/run-capability-remove.js +2 -4
  101. package/lib/datasource/capability/validate-capability-slice.js +2 -1
  102. package/lib/datasource/datasource-identifier.js +2 -1
  103. package/lib/datasource/datasource-validate-display.js +1 -1
  104. package/lib/datasource/field-reference-validator.js +24 -3
  105. package/lib/datasource/orphan-profiles-validator.js +98 -0
  106. package/lib/datasource/validate.js +41 -23
  107. package/lib/external-system/download-helpers.js +87 -0
  108. package/lib/external-system/download.js +61 -122
  109. package/lib/external-system/generator.js +1 -59
  110. package/lib/external-system/test.js +10 -15
  111. package/lib/generator/builders.js +11 -1
  112. package/lib/generator/external-controller-manifest.js +5 -2
  113. package/lib/generator/split.js +3 -1
  114. package/lib/generator/wizard.js +1 -28
  115. package/lib/identity/fk-reference.js +65 -0
  116. package/lib/identity/identity-apply-core.js +13 -58
  117. package/lib/identity/identity-apply-phases.js +5 -1
  118. package/lib/identity/identity-display.js +243 -0
  119. package/lib/identity/identity-response-helpers.js +52 -0
  120. package/lib/identity/identity-sync-errors.js +62 -0
  121. package/lib/identity/resolve-user-id.js +129 -0
  122. package/lib/identity/username-default.js +31 -0
  123. package/lib/lifecycle/certification-progress.js +2 -2
  124. package/lib/lifecycle/report-display-trust.js +70 -0
  125. package/lib/lifecycle/report-display.js +14 -13
  126. package/lib/resolvers/datasource-resolver.js +2 -3
  127. package/lib/resolvers/resource-type-file.js +159 -0
  128. package/lib/schema/application-schema.json +16 -0
  129. package/lib/schema/deployment-rules.yaml +2 -1
  130. package/lib/schema/external-datasource.schema.json +372 -58
  131. package/lib/schema/external-system.schema.json +331 -2
  132. package/lib/schema/type/document-storage.json +9 -5
  133. package/lib/utils/api.js +2 -1
  134. package/lib/utils/app-run-containers.js +25 -2
  135. package/lib/utils/authentication-shape.js +224 -0
  136. package/lib/utils/build-copy.js +36 -5
  137. package/lib/utils/build-resolve-image.js +66 -12
  138. package/lib/utils/celery-companion-apps.js +53 -0
  139. package/lib/utils/cli-utils.js +4 -0
  140. package/lib/utils/compose-celery-worker.js +23 -0
  141. package/lib/utils/compose-generate-docker-compose.js +9 -1
  142. package/lib/utils/configuration-env-resolver.js +36 -0
  143. package/lib/utils/controller-url.js +4 -1
  144. package/lib/utils/credential-secrets-env-kv.js +216 -0
  145. package/lib/utils/credential-secrets-env.js +52 -262
  146. package/lib/utils/dataplane-resolver.js +4 -115
  147. package/lib/utils/declarative-url-ports.js +24 -1
  148. package/lib/utils/dev-platform-tls.js +148 -0
  149. package/lib/utils/docker-build.js +1 -4
  150. package/lib/utils/external-env-template.js +10 -3
  151. package/lib/utils/external-system-validators.js +8 -2
  152. package/lib/utils/health-check-request.js +114 -0
  153. package/lib/utils/health-check-url.js +3 -1
  154. package/lib/utils/health-check.js +1 -113
  155. package/lib/utils/help-builder.js +3 -0
  156. package/lib/utils/keycloak-realm-ready.js +5 -1
  157. package/lib/utils/localhost-public-host.js +31 -0
  158. package/lib/utils/npm-user-config.js +145 -0
  159. package/lib/utils/paths.js +25 -0
  160. package/lib/utils/platform-controller-url.js +58 -4
  161. package/lib/utils/platform-kv-ref.js +57 -0
  162. package/lib/utils/runtime-configuration-download.js +189 -0
  163. package/lib/utils/runtime-configuration-values.js +119 -0
  164. package/lib/utils/schema-loader.js +19 -4
  165. package/lib/utils/url-declarative-public-base.js +33 -25
  166. package/lib/utils/worker-sidecars.js +142 -0
  167. package/lib/validation/external-manifest-validator.js +2 -0
  168. package/lib/validation/runtime-configuration-rules.js +98 -0
  169. package/lib/validation/validate-display-dimensions.js +154 -0
  170. package/lib/validation/validate-display-sections.js +276 -0
  171. package/lib/validation/validate-display-steps.js +67 -0
  172. package/lib/validation/validate-display.js +24 -402
  173. package/package.json +1 -1
  174. package/templates/applications/dataplane/application.yaml +5 -0
  175. package/templates/applications/dataplane/env.template +26 -13
  176. package/templates/applications/dataplane/rbac.yaml +108 -1
  177. package/templates/applications/miso-controller/application.yaml +2 -2
  178. package/templates/applications/miso-controller/env.template +37 -122
  179. package/templates/applications/miso-controller/rbac.yaml +28 -13
  180. package/templates/channels/chatgpt/install.template.md.hbs +49 -0
  181. package/templates/channels/chatgpt/manifest.template.json.hbs +9 -0
  182. package/templates/channels/microsoft-copilot/install.template.md.hbs +49 -0
  183. package/templates/channels/microsoft-copilot/manifest.template.json.hbs +8 -0
  184. package/templates/channels/slack/install.template.md.hbs +49 -0
  185. package/templates/channels/slack/manifest.template.json.hbs +66 -0
  186. package/templates/channels/teams-bot/install.template.md.hbs +49 -0
  187. package/templates/channels/teams-bot/manifest.template.json.hbs +13 -0
  188. package/templates/channels/web-embed/install.template.md.hbs +49 -0
  189. package/templates/channels/web-embed/manifest.template.json.hbs +8 -0
  190. package/templates/python/docker-compose.hbs +56 -0
  191. package/templates/typescript/docker-compose.hbs +52 -0
@@ -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
+ }
@@ -87,6 +87,62 @@ services:
87
87
  condition: service_completed_successfully
88
88
  {{/if}}
89
89
 
90
+ {{#if workerSidecars.enabled}}
91
+ {{#if workerSidecars.worker}}
92
+ {{workerSidecars.worker.key}}:
93
+ image: {{image.name}}:{{image.tag}}
94
+ container_name: {{workerSidecars.worker.containerName}}
95
+ environment:
96
+ - MISO_ENVIRONMENT={{misoEnvironment}}
97
+ - LOCAL_MODE=false
98
+ env_file:
99
+ - {{envFile}}
100
+ command: ["sh", "-c", "cd /app && {{{workerSidecars.worker.command}}}"]
101
+ networks:
102
+ - {{networkName}}
103
+ {{#if devMountPath}}
104
+ volumes:
105
+ - {{devMountPath}}:/app
106
+ user: "${AIFABRIX_UID:-1000}:${AIFABRIX_GID:-1000}"
107
+ {{/if}}
108
+ depends_on:
109
+ {{app.key}}:
110
+ condition: service_started
111
+ healthcheck:
112
+ disable: true
113
+ restart: unless-stopped
114
+ {{/if}}
115
+
116
+ {{#if workerSidecars.beat}}
117
+ {{workerSidecars.beat.key}}:
118
+ image: {{image.name}}:{{image.tag}}
119
+ container_name: {{workerSidecars.beat.containerName}}
120
+ environment:
121
+ - MISO_ENVIRONMENT={{misoEnvironment}}
122
+ - LOCAL_MODE=false
123
+ env_file:
124
+ - {{envFile}}
125
+ command: ["sh", "-c", "cd /app && {{{workerSidecars.beat.command}}}"]
126
+ networks:
127
+ - {{networkName}}
128
+ {{#if devMountPath}}
129
+ volumes:
130
+ - {{devMountPath}}:/app
131
+ user: "${AIFABRIX_UID:-1000}:${AIFABRIX_GID:-1000}"
132
+ {{/if}}
133
+ depends_on:
134
+ {{#if workerSidecars.worker}}
135
+ {{workerSidecars.worker.key}}:
136
+ {{else}}
137
+ {{app.key}}:
138
+ {{/if}}
139
+ condition: service_started
140
+ healthcheck:
141
+ disable: true
142
+ restart: unless-stopped
143
+ {{/if}}
144
+ {{/if}}
145
+
90
146
  {{#if requiresDatabase}}
91
147
  # Database Initialization (uses infra pgpass when available: ~/.aifabrix/infra/pgpass)
92
148
  # env_file: .env.run.admin only (POSTGRES_PASSWORD + DB_*); admin secrets never in app container
@@ -87,6 +87,58 @@ services:
87
87
  condition: service_completed_successfully
88
88
  {{/if}}
89
89
 
90
+ {{#if workerSidecars.enabled}}
91
+ {{#if workerSidecars.worker}}
92
+ {{workerSidecars.worker.key}}:
93
+ image: {{image.name}}:{{image.tag}}
94
+ container_name: {{workerSidecars.worker.containerName}}
95
+ environment:
96
+ - MISO_ENVIRONMENT={{misoEnvironment}}
97
+ - LOCAL_MODE=false
98
+ env_file:
99
+ - {{envFile}}
100
+ command: ["sh", "-c", "cd /app && {{{workerSidecars.worker.command}}}"]
101
+ networks:
102
+ - {{networkName}}
103
+ {{#if devMountPath}}
104
+ volumes:
105
+ - {{devMountPath}}:/app
106
+ user: "${AIFABRIX_UID:-1000}:${AIFABRIX_GID:-1000}"
107
+ {{/if}}
108
+ depends_on:
109
+ {{app.key}}:
110
+ condition: service_started
111
+ restart: unless-stopped
112
+ {{/if}}
113
+
114
+ {{#if workerSidecars.beat}}
115
+ {{workerSidecars.beat.key}}:
116
+ image: {{image.name}}:{{image.tag}}
117
+ container_name: {{workerSidecars.beat.containerName}}
118
+ environment:
119
+ - MISO_ENVIRONMENT={{misoEnvironment}}
120
+ - LOCAL_MODE=false
121
+ env_file:
122
+ - {{envFile}}
123
+ command: ["sh", "-c", "cd /app && {{{workerSidecars.beat.command}}}"]
124
+ networks:
125
+ - {{networkName}}
126
+ {{#if devMountPath}}
127
+ volumes:
128
+ - {{devMountPath}}:/app
129
+ user: "${AIFABRIX_UID:-1000}:${AIFABRIX_GID:-1000}"
130
+ {{/if}}
131
+ depends_on:
132
+ {{#if workerSidecars.worker}}
133
+ {{workerSidecars.worker.key}}:
134
+ {{else}}
135
+ {{app.key}}:
136
+ {{/if}}
137
+ condition: service_started
138
+ restart: unless-stopped
139
+ {{/if}}
140
+ {{/if}}
141
+
90
142
  {{#if requiresDatabase}}
91
143
  # Database Initialization (uses infra pgpass when available: ~/.aifabrix/infra/pgpass)
92
144
  # env_file: .env.run.admin only (POSTGRES_PASSWORD + DB_*); admin secrets never in app container