@aifabrix/builder 2.45.5 → 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 (355) hide show
  1. package/.cursor/rules/cli-layout.mdc +2 -0
  2. package/.cursor/rules/cli-product-neutral.mdc +43 -0
  3. package/.cursor/rules/project-rules.mdc +1 -0
  4. package/.npmrc.token +1 -0
  5. package/.temp/jest-protection-convert/run-IFN2nv/.protection/hubspot-companies.json +1 -0
  6. package/.temp/jest-protection-convert/run-IvmKLO/.protection/hubspot-companies.yaml +17 -0
  7. package/.temp/jest-protection-convert/run-SdvblF/.protection/hubspot-companies.json +1 -0
  8. package/.temp/jest-protection-convert/run-b51TsW/.protection/hubspot-companies.json +1 -0
  9. package/.temp/jest-protection-convert/run-fiLmb1/.protection/hubspot-companies.json +1 -0
  10. package/.temp/jest-protection-convert/run-qYGHMU/.protection/hubspot-companies.yaml +17 -0
  11. package/.temp/jest-protection-fixtures/hubspot-Mq5re8/hubspot-companies.yaml +17 -0
  12. package/.temp/jest-protection-fixtures/hubspot-f3u4YL/hubspot-companies.yaml +17 -0
  13. package/.temp/jest-protection-fixtures/hubspot-iQtd1O/hubspot-companies.yaml +17 -0
  14. package/.temp/jest-protection-fixtures/hubspot-mdmz5M/hubspot-companies.yaml +17 -0
  15. package/.temp/jest-protection-fixtures/hubspot-qbKYxQ/hubspot-companies.yaml +17 -0
  16. package/.temp/jest-protection-fixtures/hubspot-yzlJy6/hubspot-companies.yaml +17 -0
  17. package/.temp/validation/summary.txt +5 -0
  18. package/README.md +43 -17
  19. package/integration/hubspot-test/test-artifacts/wizard-hubspot-credential-real.yaml +1 -1
  20. package/integration/hubspot-test/test-artifacts/wizard-hubspot-env-vars.yaml +1 -1
  21. package/jest.config.default.js +2 -1
  22. package/jest.config.isolated.js +2 -1
  23. package/jest.global-live-fabrix-hooks.js +36 -0
  24. package/jest.isolated-projects.js +146 -0
  25. package/jest.projects.js +65 -136
  26. package/lib/api/api-response-errors.js +124 -0
  27. package/lib/api/dataplane-health.api.js +19 -7
  28. package/lib/api/governance-scenario-pack.api.js +159 -0
  29. package/lib/api/index.js +43 -3
  30. package/lib/api/lifecycle.api.js +98 -0
  31. package/lib/api/pipeline.api.js +3 -1
  32. package/lib/api/records-bulk.api.js +14 -1
  33. package/lib/api/resource-types.api.js +107 -0
  34. package/lib/api/runtime-configuration.api.js +72 -0
  35. package/lib/api/types/resource-types.types.js +45 -0
  36. package/lib/api/user-groups.api.js +9 -9
  37. package/lib/api/users.api.js +8 -8
  38. package/lib/api/validation-runner.js +3 -1
  39. package/lib/api/wizard.api.js +10 -2
  40. package/lib/app/deploy-config.js +4 -1
  41. package/lib/app/down.js +78 -27
  42. package/lib/app/index.js +2 -2
  43. package/lib/app/push.js +4 -5
  44. package/lib/app/register.js +7 -4
  45. package/lib/app/run-env-compose.js +84 -30
  46. package/lib/app/run-resolve-image.js +2 -1
  47. package/lib/app/run-stop-containers.js +113 -0
  48. package/lib/app/run.js +1 -31
  49. package/lib/app/show-display.js +35 -0
  50. package/lib/app/show.js +32 -1
  51. package/lib/build/index.js +22 -5
  52. package/lib/build/miso-controller-npm-sdk-guard.js +25 -0
  53. package/lib/certification/sync-system-certification.js +13 -6
  54. package/lib/channels/add-channel.js +348 -0
  55. package/lib/channels/channel-artifact-generator.js +141 -0
  56. package/lib/channels/channel-audit.js +101 -0
  57. package/lib/channels/channel-auth-context.js +37 -0
  58. package/lib/channels/channel-credential.js +200 -0
  59. package/lib/channels/channel-display-name.js +64 -0
  60. package/lib/channels/channel-external-system.js +106 -0
  61. package/lib/channels/channel-integration-generator.js +274 -0
  62. package/lib/channels/channel-probe.js +89 -0
  63. package/lib/channels/channel-runtime-resolver.js +152 -0
  64. package/lib/channels/channel-status-display.js +141 -0
  65. package/lib/channels/channel-targets.js +115 -0
  66. package/lib/cli/index.js +20 -4
  67. package/lib/cli/infra-guided-auth.js +109 -0
  68. package/lib/cli/infra-guided.js +84 -81
  69. package/lib/cli/setup-app.help.js +0 -31
  70. package/lib/cli/setup-app.js +82 -5
  71. package/lib/cli/setup-app.test-commands.js +5 -57
  72. package/lib/cli/setup-auth.js +25 -0
  73. package/lib/cli/setup-certification-commands.js +147 -0
  74. package/lib/cli/setup-certification.help.js +141 -0
  75. package/lib/cli/setup-environment.js +19 -2
  76. package/lib/cli/setup-external-system-help.js +62 -0
  77. package/lib/cli/setup-external-system.js +25 -3
  78. package/lib/cli/setup-infra-up-dataplane-action.js +2 -2
  79. package/lib/cli/setup-infra-up-platform-action.js +2 -1
  80. package/lib/cli/setup-infra.js +9 -1
  81. package/lib/cli/setup-platform.js +6 -1
  82. package/lib/cli/setup-secrets.js +33 -1
  83. package/lib/cli/setup-utility-help-after.js +25 -2
  84. package/lib/cli/setup-utility-repair.js +198 -0
  85. package/lib/cli/setup-utility-resolve.js +44 -5
  86. package/lib/cli/setup-utility-validate.js +197 -0
  87. package/lib/cli/setup-utility.js +4 -239
  88. package/lib/commands/app-logs.js +54 -26
  89. package/lib/commands/app.js +41 -0
  90. package/lib/commands/auth-status-client-tokens.js +214 -0
  91. package/lib/commands/auth-status-dataplane-version.js +142 -68
  92. package/lib/commands/auth-status.js +43 -54
  93. package/lib/commands/channel.js +58 -0
  94. package/lib/commands/datasource-test-trust-cli.js +27 -23
  95. package/lib/commands/datasource-unified-test-cli.js +6 -3
  96. package/lib/commands/datasource-unified-test-cli.options.js +5 -1
  97. package/lib/commands/datasource.js +8 -8
  98. package/lib/commands/dev-show-display.js +8 -1
  99. package/lib/commands/governance-cli-shared.js +94 -0
  100. package/lib/commands/governance-command-action.js +132 -0
  101. package/lib/commands/governance-download-external.js +34 -0
  102. package/lib/commands/governance-generate-external.js +71 -0
  103. package/lib/commands/governance-upload-external.js +36 -0
  104. package/lib/commands/governance-verify-external.js +64 -0
  105. package/lib/commands/governance.js +144 -0
  106. package/lib/commands/identity-apply-sync.js +49 -8
  107. package/lib/commands/identity-group-cli.js +66 -26
  108. package/lib/commands/identity-membership-role-cache.js +58 -37
  109. package/lib/commands/identity-shared.js +22 -1
  110. package/lib/commands/identity-user-cli.js +80 -34
  111. package/lib/commands/lifecycle-command-action.js +123 -0
  112. package/lib/commands/lifecycle-external.js +268 -0
  113. package/lib/commands/login.js +11 -2
  114. package/lib/commands/repair-auth-apply.js +153 -0
  115. package/lib/commands/repair-auth-config.js +8 -13
  116. package/lib/commands/repair-changed-files.js +41 -0
  117. package/lib/commands/repair-datasource-com-v2.js +15 -0
  118. package/lib/commands/repair-datasource-keys.js +4 -1
  119. package/lib/commands/repair-datasource-run.js +59 -0
  120. package/lib/commands/repair-datasource-service-contract.js +206 -0
  121. package/lib/commands/repair-datasource-test-payload.js +259 -0
  122. package/lib/commands/repair-datasource.js +49 -64
  123. package/lib/commands/repair-env-template.js +76 -25
  124. package/lib/commands/repair-external-run.js +216 -0
  125. package/lib/commands/repair-openapi-sync.js +49 -4
  126. package/lib/commands/repair-persist.js +4 -0
  127. package/lib/commands/repair-rbac.js +52 -1
  128. package/lib/commands/repair-steps.js +160 -0
  129. package/lib/commands/repair-system-alignment.js +7 -4
  130. package/lib/commands/repair.js +29 -296
  131. package/lib/commands/resource-type.js +371 -0
  132. package/lib/commands/secrets-get.js +184 -0
  133. package/lib/commands/secrets-remove-all.js +3 -1
  134. package/lib/commands/setup-image-refresh.js +146 -0
  135. package/lib/commands/setup-modes.js +158 -162
  136. package/lib/commands/setup-platform-auth.js +76 -0
  137. package/lib/commands/setup-prompts-admin.js +244 -0
  138. package/lib/commands/setup-prompts-platform-mode.js +70 -0
  139. package/lib/commands/setup-prompts-validators.js +36 -0
  140. package/lib/commands/setup-prompts.js +24 -76
  141. package/lib/commands/setup-run-context.js +45 -0
  142. package/lib/commands/setup-spinners.js +39 -0
  143. package/lib/commands/setup.js +27 -5
  144. package/lib/commands/teardown.js +39 -0
  145. package/lib/commands/test-e2e-external.js +24 -8
  146. package/lib/commands/test-governance-external.js +3 -24
  147. package/lib/commands/test-trust-external.js +48 -100
  148. package/lib/commands/up-common.js +57 -13
  149. package/lib/commands/up-dataplane.js +56 -15
  150. package/lib/commands/upload-publish-context.js +75 -0
  151. package/lib/commands/upload-sidecar-followups.js +89 -0
  152. package/lib/commands/upload.js +113 -110
  153. package/lib/commands/verify-governance-combined-external.js +61 -0
  154. package/lib/commands/verify-governance-command-action.js +64 -0
  155. package/lib/commands/verify-governance-db.js +102 -0
  156. package/lib/commands/verify-governance-external.js +77 -0
  157. package/lib/commands/verify-governance-result-builders.js +71 -0
  158. package/lib/commands/verify-operations-command-action.js +68 -0
  159. package/lib/commands/verify-operations-external.js +268 -0
  160. package/lib/commands/verify-operations-persist.js +75 -0
  161. package/lib/commands/verify-operations-step-plan.js +68 -0
  162. package/lib/commands/verify-operations-steps.js +111 -0
  163. package/lib/commands/verify-trust-command-action.js +73 -0
  164. package/lib/commands/verify-trust-external.js +59 -0
  165. package/lib/commands/wizard-config-normalizer.js +43 -23
  166. package/lib/commands/wizard-core.js +2 -0
  167. package/lib/core/admin-password-generator.js +38 -0
  168. package/lib/core/admin-secrets-bundle.js +111 -0
  169. package/lib/core/admin-secrets-env-overlay.js +62 -0
  170. package/lib/core/admin-secrets.js +32 -4
  171. package/lib/core/config-attach-extensions.js +3 -0
  172. package/lib/core/config-platform-controller.js +44 -0
  173. package/lib/core/config-setup-installation-profile.js +42 -0
  174. package/lib/core/config-setup-platform-mode.js +46 -0
  175. package/lib/core/config.js +46 -36
  176. package/lib/core/secrets-admin-env.js +6 -2
  177. package/lib/core/secrets-ensure.js +4 -0
  178. package/lib/core/secrets-env-content.js +54 -48
  179. package/lib/core/secrets-env-write.js +10 -1
  180. package/lib/core/secrets-infra-placeholder-sync.js +2 -0
  181. package/lib/core/setup-installation-profile.js +43 -0
  182. package/lib/core/setup-platform-mode.js +90 -0
  183. package/lib/datasource/agent-trust-debug-log.js +1 -1
  184. package/lib/datasource/agent-trust-run.js +5 -3
  185. package/lib/datasource/audit-evidence-extract-debug.js +30 -18
  186. package/lib/datasource/audit-evidence-extract.js +7 -4
  187. package/lib/datasource/audit-evidence-verify-matrix.js +54 -26
  188. package/lib/datasource/bulk-loader-run-batches.js +15 -3
  189. package/lib/datasource/capability/capability-diff-slice.js +2 -2
  190. package/lib/datasource/capability/capability-manifest.js +254 -0
  191. package/lib/datasource/capability/capability-resolve.js +3 -4
  192. package/lib/datasource/capability/copy-operations.js +5 -3
  193. package/lib/datasource/capability/remove-operations.js +2 -1
  194. package/lib/datasource/capability/run-capability-copy.js +32 -4
  195. package/lib/datasource/capability/run-capability-diff.js +3 -3
  196. package/lib/datasource/capability/run-capability-dimension.js +2 -4
  197. package/lib/datasource/capability/run-capability-edit.js +4 -7
  198. package/lib/datasource/capability/run-capability-relate.js +2 -4
  199. package/lib/datasource/capability/run-capability-remove.js +2 -4
  200. package/lib/datasource/capability/validate-capability-slice.js +2 -1
  201. package/lib/datasource/datasource-identifier.js +2 -1
  202. package/lib/datasource/datasource-load-export-context.js +3 -0
  203. package/lib/datasource/datasource-validate-display.js +1 -1
  204. package/lib/datasource/field-reference-validator.js +24 -3
  205. package/lib/datasource/log-cleaner.js +2 -2
  206. package/lib/datasource/log-viewer.js +8 -8
  207. package/lib/datasource/orphan-profiles-validator.js +98 -0
  208. package/lib/datasource/test-e2e.js +4 -1
  209. package/lib/datasource/unified-validation-run-body.js +3 -1
  210. package/lib/datasource/unified-validation-run.js +5 -2
  211. package/lib/datasource/validate.js +41 -23
  212. package/lib/deployment/environment-poll-status.js +138 -0
  213. package/lib/deployment/environment.js +42 -34
  214. package/lib/external-system/download-helpers.js +87 -0
  215. package/lib/external-system/download.js +78 -138
  216. package/lib/external-system/generator.js +1 -55
  217. package/lib/external-system/integration-auth-context.js +45 -0
  218. package/lib/external-system/test-auth.js +12 -5
  219. package/lib/external-system/test.js +16 -21
  220. package/lib/generator/builders.js +11 -1
  221. package/lib/generator/external-controller-manifest.js +18 -0
  222. package/lib/generator/split.js +3 -1
  223. package/lib/generator/wizard.js +1 -28
  224. package/lib/governance/governance-cli-errors.js +96 -0
  225. package/lib/governance/governance-download-display.js +38 -0
  226. package/lib/governance/governance-run-display.js +215 -25
  227. package/lib/identity/fk-reference.js +65 -0
  228. package/lib/identity/identity-apply-core.js +13 -58
  229. package/lib/identity/identity-apply-phases.js +5 -1
  230. package/lib/identity/identity-display.js +243 -0
  231. package/lib/identity/identity-response-helpers.js +52 -0
  232. package/lib/identity/identity-sync-errors.js +62 -0
  233. package/lib/identity/resolve-user-id.js +129 -0
  234. package/lib/identity/username-default.js +31 -0
  235. package/lib/infrastructure/admin-secrets-apply.js +84 -0
  236. package/lib/infrastructure/admin-secrets-ensure.js +130 -0
  237. package/lib/infrastructure/admin-secrets-resolve.js +95 -0
  238. package/lib/infrastructure/admin-secrets-sync.js +91 -0
  239. package/lib/infrastructure/helpers.js +23 -129
  240. package/lib/infrastructure/index.js +5 -6
  241. package/lib/infrastructure/orphan-infra-docker-teardown.js +11 -5
  242. package/lib/lifecycle/certification-progress.js +231 -0
  243. package/lib/lifecycle/dataplane-ui-url.js +145 -0
  244. package/lib/lifecycle/exit-codes.js +24 -0
  245. package/lib/lifecycle/json-envelope.js +25 -0
  246. package/lib/lifecycle/lifecycle-governance-options.js +51 -0
  247. package/lib/lifecycle/logger-quiet.js +29 -0
  248. package/lib/lifecycle/open-api-published.js +59 -0
  249. package/lib/lifecycle/operations-readiness-metrics.js +101 -0
  250. package/lib/lifecycle/product-model.js +196 -0
  251. package/lib/lifecycle/report-display-trust.js +70 -0
  252. package/lib/lifecycle/report-display.js +472 -0
  253. package/lib/lifecycle/scenario-upload.js +191 -0
  254. package/lib/lifecycle/verify-step-progress.js +87 -0
  255. package/lib/parameters/infra-kv-discovery.js +27 -2
  256. package/lib/protection/auth-context.js +10 -4
  257. package/lib/resolvers/datasource-resolver.js +2 -3
  258. package/lib/resolvers/resource-type-file.js +159 -0
  259. package/lib/schema/application-schema.json +17 -1
  260. package/lib/schema/datasource-test-run.schema.json +89 -6
  261. package/lib/schema/deployment-rules.yaml +2 -1
  262. package/lib/schema/external-datasource.schema.json +2947 -2619
  263. package/lib/schema/external-system.schema.json +1418 -761
  264. package/lib/schema/infra.parameter.yaml +45 -0
  265. package/lib/schema/type/credential-field-registry.json +103 -97
  266. package/lib/schema/type/document-storage.json +9 -5
  267. package/lib/utils/aifabrix-test-runtime-guard.js +125 -0
  268. package/lib/utils/api.js +55 -31
  269. package/lib/utils/app-relative-path-env.js +112 -0
  270. package/lib/utils/app-run-containers.js +25 -2
  271. package/lib/utils/authentication-shape.js +224 -0
  272. package/lib/utils/build-copy.js +36 -5
  273. package/lib/utils/build-resolve-image.js +66 -12
  274. package/lib/utils/celery-companion-apps.js +53 -0
  275. package/lib/utils/cli-secrets-error-format.js +83 -21
  276. package/lib/utils/cli-utils.js +20 -4
  277. package/lib/utils/compose-celery-worker.js +23 -0
  278. package/lib/utils/compose-generate-docker-compose.js +13 -1
  279. package/lib/utils/compose-traefik-ingress-base.js +16 -1
  280. package/lib/utils/config-secrets-path.js +46 -0
  281. package/lib/utils/configuration-env-resolver.js +36 -0
  282. package/lib/utils/controller-url.js +88 -1
  283. package/lib/utils/credential-secrets-env-kv.js +216 -0
  284. package/lib/utils/credential-secrets-env.js +175 -257
  285. package/lib/utils/dataplane-resolver.js +18 -2
  286. package/lib/utils/declarative-url-ports.js +27 -4
  287. package/lib/utils/deployment-auth-mode.js +41 -0
  288. package/lib/utils/developer-volume-id.js +33 -0
  289. package/lib/utils/docker-build.js +1 -4
  290. package/lib/utils/env-copy.js +14 -9
  291. package/lib/utils/env-kv-orphan-lines.js +43 -0
  292. package/lib/utils/error-formatters/network-errors.js +13 -4
  293. package/lib/utils/external-env-template.js +11 -3
  294. package/lib/utils/external-system-readiness-core.js +10 -0
  295. package/lib/utils/external-system-readiness-display.js +80 -23
  296. package/lib/utils/external-system-validators.js +8 -2
  297. package/lib/utils/health-check.js +4 -1
  298. package/lib/utils/help-builder.js +13 -8
  299. package/lib/utils/keycloak-realm-ready.js +101 -0
  300. package/lib/utils/load-cip-capacity-display-config.js +61 -15
  301. package/lib/utils/manifest-source-emit.js +2 -0
  302. package/lib/utils/paths.js +25 -0
  303. package/lib/utils/pipeline-upload-auth-retry.js +82 -0
  304. package/lib/utils/platform-controller-url.js +157 -0
  305. package/lib/utils/platform-kv-ref.js +57 -0
  306. package/lib/utils/postgres-platform-bootstrap.js +199 -0
  307. package/lib/utils/postgres-wipe.js +9 -2
  308. package/lib/utils/resolve-env-mode.js +47 -0
  309. package/lib/utils/runtime-configuration-download.js +189 -0
  310. package/lib/utils/runtime-configuration-values.js +119 -0
  311. package/lib/utils/schema-loader.js +19 -4
  312. package/lib/utils/secrets-generator.js +31 -25
  313. package/lib/utils/secrets-missing-error.js +164 -0
  314. package/lib/utils/service-url-label.js +81 -0
  315. package/lib/utils/setup-quiet-output.js +25 -0
  316. package/lib/utils/template-helpers.js +15 -0
  317. package/lib/utils/token-manager-client-credentials.js +201 -0
  318. package/lib/utils/token-manager-messages.js +8 -0
  319. package/lib/utils/token-manager-refresh.js +12 -2
  320. package/lib/utils/token-manager.js +86 -105
  321. package/lib/utils/upload-pipeline-ui.js +12 -5
  322. package/lib/utils/upload-sync-options.js +42 -0
  323. package/lib/utils/url-declarative-public-base.js +21 -3
  324. package/lib/utils/url-declarative-vdir-inactive-env.js +14 -4
  325. package/lib/utils/validation-poll-ui.js +8 -0
  326. package/lib/utils/validation-run-stage.js +45 -0
  327. package/lib/utils/worker-sidecars.js +142 -0
  328. package/lib/validation/external-manifest-validator.js +2 -0
  329. package/lib/validation/runtime-configuration-rules.js +98 -0
  330. package/lib/validation/validate-display-dimensions.js +154 -0
  331. package/lib/validation/validate-display-sections.js +276 -0
  332. package/lib/validation/validate-display-steps.js +67 -0
  333. package/lib/validation/validate-display.js +24 -402
  334. package/package.json +1 -1
  335. package/templates/applications/dataplane/application.yaml +7 -1
  336. package/templates/applications/dataplane/env.template +50 -14
  337. package/templates/applications/dataplane/rbac.yaml +108 -1
  338. package/templates/applications/miso-controller/application.yaml +2 -2
  339. package/templates/applications/miso-controller/env.template +53 -122
  340. package/templates/applications/miso-controller/rbac.yaml +28 -13
  341. package/templates/channels/chatgpt/install.template.md.hbs +49 -0
  342. package/templates/channels/chatgpt/manifest.template.json.hbs +9 -0
  343. package/templates/channels/microsoft-copilot/install.template.md.hbs +49 -0
  344. package/templates/channels/microsoft-copilot/manifest.template.json.hbs +8 -0
  345. package/templates/channels/slack/install.template.md.hbs +49 -0
  346. package/templates/channels/slack/manifest.template.json.hbs +66 -0
  347. package/templates/channels/teams-bot/install.template.md.hbs +49 -0
  348. package/templates/channels/teams-bot/manifest.template.json.hbs +13 -0
  349. package/templates/channels/web-embed/install.template.md.hbs +49 -0
  350. package/templates/channels/web-embed/manifest.template.json.hbs +8 -0
  351. package/templates/external-system/README.md.hbs +74 -17
  352. package/templates/python/docker-compose.hbs +75 -18
  353. package/templates/typescript/docker-compose.hbs +70 -17
  354. package/lib/commands/test-governance-command-action.js +0 -55
  355. package/lib/commands/test-trust-command-action.js +0 -118
@@ -31,8 +31,34 @@ Prefer aifabrix wizard [systemKey] for guided external setup.
31
31
 
32
32
  const DEPLOY_HELP_AFTER = `
33
33
  Examples:
34
- $ aifabrix deploy myapp # builder appKey → builder/myapp/
35
- $ aifabrix deploy hubspot --local # systemKey → integration/hubspot/
34
+ # Local — builder app (builder/<appKey>/)
35
+ $ aifabrix deploy myapp
36
+ $ aifabrix deploy myapp --local
37
+
38
+ # Local — external system (integration/<systemKey>/); manifest regenerated on deploy
39
+ $ aifabrix deploy hubspot-demo
40
+ $ aifabrix deploy hubspot-demo --local
41
+ $ aifabrix deploy hubspot-demo --probe
42
+
43
+ # CI/CD — builder app (GitHub Actions / Azure DevOps; pipeline client credentials in secrets)
44
+ $ aifabrix validate myapp
45
+ $ aifabrix build myapp
46
+ $ aifabrix push myapp --registry $ACR_REGISTRY --tag $IMAGE_TAG
47
+ $ aifabrix deploy myapp \\
48
+ --client-id "$DEV_MISO_CLIENTID" \\
49
+ --client-secret "$DEV_MISO_CLIENTSECRET" \\
50
+ --no-poll
51
+
52
+ # CI/CD — external integration (after upload/tests; promote to controller)
53
+ $ aifabrix validate hubspot-demo
54
+ $ aifabrix upload hubspot-demo --probe
55
+ $ aifabrix deploy hubspot-demo --probe --no-poll
56
+
57
+ Notes:
58
+ - Login or set MISO_CONTROLLER_URL + environment (aifabrix login / aifabrix auth).
59
+ - CI: register once (aifabrix app register <appKey>), store DEV_MISO_CLIENTID and DEV_MISO_CLIENTSECRET in pipeline secrets.
60
+ - upload = dataplane publish for dev iteration; deploy = controller validate + deploy (Azure or local Docker).
61
+ - --repository-url overrides repo URL for pipeline validate (default: application.yaml repository.repositoryUrl).
36
62
  `;
37
63
 
38
64
  const PUSH_HELP_AFTER = `
@@ -86,6 +112,49 @@ function normalizeExternalOptions(options) {
86
112
  return normalized;
87
113
  }
88
114
 
115
+ /**
116
+ * Whether normalized options include all external CLI fields for headless create.
117
+ * @param {Object} normalized - Normalized external create options
118
+ * @returns {boolean}
119
+ */
120
+ function hasFullExternalCliOptions(normalized) {
121
+ return Boolean(
122
+ normalized.systemKey &&
123
+ normalized.systemDisplayName &&
124
+ normalized.systemDescription &&
125
+ normalized.systemType &&
126
+ normalized.authType &&
127
+ normalized.entityType &&
128
+ normalized.datasourceCount
129
+ );
130
+ }
131
+
132
+ /**
133
+ * Map positional systemKey and apply headless defaults for external create.
134
+ * @param {string} appName - Positional appKey or systemKey from CLI
135
+ * @param {Object} options - Raw CLI options
136
+ * @returns {Object} Normalized options ready for createApp
137
+ */
138
+ function prepareExternalCreateOptions(appName, options) {
139
+ const normalized = normalizeExternalOptions(options);
140
+ const isExternalType = options.type === 'external' || !options.type;
141
+
142
+ if (isExternalType && appName) {
143
+ normalized.systemKey = appName;
144
+ }
145
+
146
+ if (isExternalType && hasFullExternalCliOptions(normalized)) {
147
+ if (!Object.prototype.hasOwnProperty.call(normalized, 'github')) {
148
+ normalized.github = false;
149
+ }
150
+ if (!Object.prototype.hasOwnProperty.call(normalized, 'controller')) {
151
+ normalized.controller = false;
152
+ }
153
+ }
154
+
155
+ return normalized;
156
+ }
157
+
89
158
  /**
90
159
  * Validate required options for non-interactive external creation
91
160
  * @param {Object} normalizedOptions - Normalized options
@@ -123,7 +192,7 @@ async function handleCreateCommand(appName, options) {
123
192
  }
124
193
 
125
194
  const wizardOptions = { app: appName, ...options };
126
- const normalizedOptions = normalizeExternalOptions(options);
195
+ const normalizedOptions = prepareExternalCreateOptions(appName, options);
127
196
 
128
197
  const isExternalType = options.type === 'external' || !options.type;
129
198
  const isNonInteractive = process.stdin && process.stdin.isTTY === false;
@@ -253,7 +322,10 @@ function setupBuildRunLogsDownCommands(program) {
253
322
  .option('-f, --force-template', 'Force rebuild from template')
254
323
  .option('--no-cache', 'Full Docker rebuild (disable layer cache); use after Dockerfile or context fixes')
255
324
  .option('-t, --tag <tag>', 'Image tag (default: latest). Set image.tag in application.yaml to match for deploy.')
256
- .option('--base', 'Also tag the manifest base image name (after developer-scoped build when developer id > 0)')
325
+ .option(
326
+ '--base',
327
+ 'When manifest omits image: also tag the base repository after a developer-scoped build (ignored when application.yaml defines image)'
328
+ )
257
329
  .action(async(appName, options) => {
258
330
  try {
259
331
  const imageTag = await app.buildApp(appName, options);
@@ -411,4 +483,9 @@ function setupAppCommands(program) {
411
483
  setupPushDeployDockerfileCommands(program);
412
484
  }
413
485
 
414
- module.exports = { setupAppCommands };
486
+ module.exports = {
487
+ setupAppCommands,
488
+ normalizeExternalOptions,
489
+ prepareExternalCreateOptions,
490
+ validateNonInteractiveExternalOptions
491
+ };
@@ -10,9 +10,7 @@ const { handleCommandError } = require('../utils/cli-utils');
10
10
  const { cliOptsSkipCertSync } = require('../certification/cli-cert-sync-skip');
11
11
  const {
12
12
  TEST_HELP_AFTER,
13
- TEST_E2E_HELP_AFTER,
14
- TEST_TRUST_HELP_AFTER,
15
- TEST_GOVERNANCE_HELP_AFTER
13
+ TEST_E2E_HELP_AFTER
16
14
  } = require('./setup-app.help');
17
15
 
18
16
  function setupTestCommand(program) {
@@ -177,6 +175,10 @@ function setupTestE2eCommand(program) {
177
175
  '--no-sync',
178
176
  'Skip publishing local integration files; E2E uses the system config already on the dataplane (external integration only)'
179
177
  )
178
+ .option(
179
+ '--force',
180
+ 'With default sync, pass force to upload (bypass active-datasource schema replacement guards; same as aifabrix upload --force)'
181
+ )
180
182
  .option('--warnings-as-errors', 'Treat aggregate warn as failure (exit 1)')
181
183
  .option('--require-cert', 'Require certification passed on every datasource (exit 2 if not)')
182
184
  .option(
@@ -222,64 +224,10 @@ function setupLintCommand(program) {
222
224
  });
223
225
  }
224
226
 
225
- function collectScenarioId(value, previous) {
226
- return previous.concat([value]);
227
- }
228
-
229
- function setupTestGovernanceCommand(program) {
230
- const { testGovernanceCommandHandler } = require('../commands/test-governance-command-action');
231
- program
232
- .command('test-governance <appKey|systemKey>')
233
- .description(
234
- 'Governance scenario acceptance: ABAC visibility via governed search (key sets only)'
235
- )
236
- .option('-e, --env <env>', 'Environment: dev, tst, or pro', 'dev')
237
- .option('--pack <path>', 'Scenario pack YAML (default: scenarios/default.yaml or <systemKey>-v1.yaml)')
238
- .option('-a, --app <path>', 'Integration folder override')
239
- .option(
240
- '--scenario <id>',
241
- 'Run subset of scenario ids (repeatable)',
242
- collectScenarioId,
243
- []
244
- )
245
- .option('--no-sync', 'Skip publishing local integration files before run')
246
- .option('-v, --verbose', 'Per-scenario verdict lines with subject and counts')
247
- .option('--json', 'Machine-readable redacted result (same allowlist as API)')
248
- .addHelpText('after', TEST_GOVERNANCE_HELP_AFTER)
249
- .action((appName, options, cmd) => testGovernanceCommandHandler(appName, options, cmd));
250
- }
251
-
252
- function setupTestTrustCommand(program) {
253
- const { testTrustCommandHandler } = require('../commands/test-trust-command-action');
254
- program
255
- .command('test-trust <appKey|systemKey>')
256
- .description(
257
- 'Semantic agent metadata validation for external system (all datasources via dataplane 404.5)'
258
- )
259
- .option('-e, --env <env>', 'Environment: dev, tst, or pro', 'dev')
260
- .option('-v, --verbose', 'Show findings and observed business model')
261
- .option('-d, --debug', 'Write debug log under integration/<systemKey>/logs/')
262
- .option('--no-sync', 'Skip publishing local integration files before validate')
263
- .option('--revalidate', 'Force new validation for each datasource')
264
- .option(
265
- '--timeout <ms>',
266
- 'HTTP timeout for validate/latest requests (ms)',
267
- '120000'
268
- )
269
- .option('--strict', 'Exit 1 unless every datasource is trusted')
270
- .option('--warnings-as-errors', 'Exit 1 when any datasource is usableWithWarnings')
271
- .option('--json', 'Print JSON array of trust runs')
272
- .option('--summary', 'One line per datasource')
273
- .addHelpText('after', TEST_TRUST_HELP_AFTER)
274
- .action((appName, options, cmd) => testTrustCommandHandler(appName, options, cmd));
275
- }
276
-
277
227
  function setupInstallTestE2eLintCommands(program) {
278
228
  setupInstallCommand(program);
279
229
  setupTestCommand(program);
280
230
  setupTestE2eCommand(program);
281
- setupTestGovernanceCommand(program);
282
- setupTestTrustCommand(program);
283
231
  setupLintCommand(program);
284
232
  }
285
233
 
@@ -31,11 +31,31 @@ Aliases:
31
31
  Subcommand: auth status [--validate] for CI/scripts (exit codes 0/1/3).
32
32
  `;
33
33
 
34
+ const LOGOUT_HELP_AFTER = `
35
+ Examples:
36
+ $ aifabrix logout
37
+ $ aifabrix logout -c http://localhost:3600
38
+ $ aifabrix logout -e dev
39
+ $ aifabrix logout -e dev -a hubspot-e2e
40
+
41
+ Notes:
42
+ - With no flags: clears all device tokens and all client tokens in config.yaml.
43
+ - Device tokens are keyed by controller URL (-c).
44
+ - Client tokens are per environment and app (-e and optional -a).
45
+ - Run aifabrix auth status to list stored app tokens and copy-paste logout commands.
46
+ `;
47
+
34
48
  const AUTH_STATUS_HELP_AFTER = `
35
49
  Examples:
36
50
  $ aifabrix auth status
37
51
  $ aifabrix auth status --validate
38
52
 
53
+ Client token refresh:
54
+ - Expired application tokens are refreshed automatically when client id/secret
55
+ exist in ~/.aifabrix/secrets.local.yaml (pattern <app>-client-idKeyVault) or env
56
+ (MISO_CLIENTID / MISO_CLIENTSECRET).
57
+ - Lists each stored app token with aifabrix logout -e <env> -a <app> to clear it.
58
+
39
59
  Exit codes (--validate only):
40
60
  0 Authenticated and Builder CLI meets dataplane minimum (or no minimum configured)
41
61
  1 Not authenticated — run aifabrix login
@@ -152,6 +172,10 @@ function setupLoginCommand(program) {
152
172
  .option('-e, --environment <env>', 'Environment key (updates root-level environment in config.yaml, e.g., miso, dev, tst, pro)')
153
173
  .option('--online', 'Request online-only token (excludes offline_access scope, device flow only)')
154
174
  .option('--scope <scopes>', 'Custom OAuth2 scope string (device flow only, default: "openid profile email offline_access")')
175
+ .option(
176
+ '--skip-version-cache',
177
+ 'Skip post-login dataplane version cache refresh (faster exit when controller/dataplane URLs are slow)'
178
+ )
155
179
  .action(async(options) => {
156
180
  try {
157
181
  await handleLogin(options);
@@ -168,6 +192,7 @@ function setupLogoutCommand(program) {
168
192
  .option('-c, --controller <url>', 'Clear device tokens for specific controller')
169
193
  .option('-e, --environment <env>', 'Clear client tokens for specific environment')
170
194
  .option('-a, --app <app>', 'Clear client tokens for specific app (requires --environment)')
195
+ .addHelpText('after', LOGOUT_HELP_AFTER)
171
196
  .action(async(options) => {
172
197
  try {
173
198
  await handleLogout(options);
@@ -0,0 +1,147 @@
1
+ /**
2
+ * @fileoverview Enterprise AI Certification CLI commands (plan 150.0).
3
+ */
4
+
5
+ 'use strict';
6
+
7
+ const {
8
+ VERIFY_OPERATIONS_HELP_AFTER,
9
+ VERIFY_TRUST_HELP_AFTER,
10
+ VERIFY_GOVERNANCE_HELP_AFTER,
11
+ LIFECYCLE_HELP_AFTER
12
+ } = require('./setup-certification.help');
13
+ const { collectString } = require('../commands/governance');
14
+
15
+ function setupVerifyOperationsCommand(program) {
16
+ const { verifyOperationsCommandHandler } = require('../commands/verify-operations-command-action');
17
+ program
18
+ .command('verify-operations <systemKey>')
19
+ .description('Operational readiness: validate, unit, integration, and E2E (system scope)')
20
+ .option('-e, --env <env>', 'Environment: dev, tst, or pro', 'dev')
21
+ .option('-v, --verbose', 'Readiness breakdown and verification step checklist')
22
+ .option('-d, --debug', 'Write debug logs under integration/<systemKey>/logs/')
23
+ .option('--no-sync', 'Skip publishing local integration files before dataplane steps')
24
+ .option(
25
+ '--force',
26
+ 'With default sync, pass force to upload (same as aifabrix upload --force)'
27
+ )
28
+ .option('--continue', 'Continue after a failed step (still reports FAILED verdict)')
29
+ .option('--json', 'Machine-readable product envelope')
30
+ .addHelpText('after', VERIFY_OPERATIONS_HELP_AFTER)
31
+ .action((systemKey, options, cmd) => verifyOperationsCommandHandler(systemKey, options, cmd));
32
+ }
33
+
34
+ function setupVerifyTrustCommand(program) {
35
+ const { verifyTrustCommandHandler } = require('../commands/verify-trust-command-action');
36
+ program
37
+ .command('verify-trust <systemKey>')
38
+ .description('AI business context confidence for every datasource (semantic metadata trust)')
39
+ .option('-e, --env <env>', 'Environment: dev, tst, or pro', 'dev')
40
+ .option('-v, --verbose', 'Per-datasource breakdown')
41
+ .option('-d, --debug', 'Write debug log under integration/<systemKey>/logs/')
42
+ .option('--no-sync', 'Skip publishing local integration files before validate')
43
+ .option(
44
+ '--force',
45
+ 'With default sync, pass force to upload (same as aifabrix upload --force)'
46
+ )
47
+ .option('--revalidate', 'Force new validation for each datasource')
48
+ .option('--timeout <ms>', 'HTTP timeout for validate/latest requests (ms)', '120000')
49
+ .option('--json', 'Machine-readable product envelope')
50
+ .addHelpText('after', VERIFY_TRUST_HELP_AFTER)
51
+ .action((systemKey, options, cmd) => verifyTrustCommandHandler(systemKey, options, cmd));
52
+ }
53
+
54
+ function setupVerifyGovernanceCommand(program) {
55
+ const { verifyGovernanceCommandHandler } = require('../commands/verify-governance-command-action');
56
+ program
57
+ .command('verify-governance <systemKey>')
58
+ .description(
59
+ 'Generate integration validation packs, then verify governance (upload local YAML when present)'
60
+ )
61
+ .option('-e, --env <env>', 'Environment: dev, tst, or pro', 'dev')
62
+ .option('-v, --verbose', 'Per-datasource breakdown and pipeline detail')
63
+ .option('-d, --debug', 'Write debug logs under integration/<systemKey>/logs/')
64
+ .option('--no-sync', 'Skip publishing local integration files before dataplane steps')
65
+ .option(
66
+ '--force',
67
+ 'With default sync, pass force to upload (same as aifabrix upload --force)'
68
+ )
69
+ .option(
70
+ '--certification-profile <profile>',
71
+ 'Certification profile for generate (bronze, silver, gold, …)',
72
+ 'bronze'
73
+ )
74
+ .option(
75
+ '--subject-user-id <id>',
76
+ 'Subject user id for generated scenarios (repeatable)',
77
+ collectString,
78
+ []
79
+ )
80
+ .option(
81
+ '--subject-email <email>',
82
+ 'Subject email for generated scenarios (repeatable)',
83
+ collectString,
84
+ []
85
+ )
86
+ .option(
87
+ '--max-samples-per-partition <n>',
88
+ 'Max keys per mustInclude/mustExclude partition',
89
+ '25'
90
+ )
91
+ .option(
92
+ '--pack <path>',
93
+ 'Authoring override: local YAML only (skips generate and local upload)'
94
+ )
95
+ .option('-a, --app <path>', 'Integration folder override (with --pack)')
96
+ .option('--scenario <id>', 'Scenario subset when using --pack (repeatable)', collectString, [])
97
+ .option('--json', 'Machine-readable product envelope')
98
+ .addHelpText('after', VERIFY_GOVERNANCE_HELP_AFTER)
99
+ .action((systemKey, options, cmd) => verifyGovernanceCommandHandler(systemKey, options, cmd));
100
+ }
101
+
102
+ function setupLifecycleCommand(program) {
103
+ const { lifecycleCommandHandler } = require('../commands/lifecycle-command-action');
104
+ program
105
+ .command('lifecycle <systemKey>')
106
+ .description('Enterprise AI certification report (default: read persisted results from dataplane)')
107
+ .option('-e, --env <env>', 'Environment: dev, tst, or pro', 'dev')
108
+ .option('-v, --verbose', 'Per-datasource breakdown in the report')
109
+ .option('-d, --debug', 'Write debug logs under integration/<systemKey>/logs/ when --run')
110
+ .option('--run', 'Run missing verify steps, then print certification report')
111
+ .option('--no-sync', 'With --run, skip publishing local integration files before verify')
112
+ .option(
113
+ '--force',
114
+ 'With default sync on --run, pass force to upload (same as aifabrix upload --force)'
115
+ )
116
+ .option(
117
+ '--subject-user-id <id>',
118
+ 'Subject user id for governance generate when --run (repeatable)',
119
+ collectString,
120
+ []
121
+ )
122
+ .option(
123
+ '--subject-email <email>',
124
+ 'Subject email for governance generate when --run (repeatable)',
125
+ collectString,
126
+ []
127
+ )
128
+ .option(
129
+ '--certification-profile <profile>',
130
+ 'Certification profile for governance generate on --run (bronze, silver, gold, …)',
131
+ 'bronze'
132
+ )
133
+ .option('--json', 'Machine-readable certification envelope')
134
+ .addHelpText('after', LIFECYCLE_HELP_AFTER)
135
+ .action((systemKey, options, cmd) => lifecycleCommandHandler(systemKey, options, cmd));
136
+ }
137
+
138
+ function setupCertificationCommands(program) {
139
+ setupVerifyOperationsCommand(program);
140
+ setupVerifyTrustCommand(program);
141
+ setupVerifyGovernanceCommand(program);
142
+ setupLifecycleCommand(program);
143
+ }
144
+
145
+ module.exports = {
146
+ setupCertificationCommands
147
+ };
@@ -0,0 +1,141 @@
1
+ /**
2
+ * @fileoverview Help text for Enterprise AI Certification CLI commands (plan 150.0).
3
+ */
4
+
5
+ 'use strict';
6
+
7
+ const VERIFY_OPERATIONS_HELP_AFTER = `
8
+ Examples:
9
+ $ aifabrix verify-operations hubspot
10
+ $ aifabrix verify-operations hubspot -v
11
+ $ aifabrix verify-operations hubspot --no-sync
12
+
13
+ Notes:
14
+ - Orchestrates validate → test → test-integration → test-e2e for the system.
15
+ - Default output shows Operational Readiness % and OPERATIONS VERIFIED/FAILED only.
16
+ - -v / --verbose adds readiness breakdown and verification step checklist at the end.
17
+ - -v does not enable upload sidecar logs or inner E2E poll spinners (use aifabrix upload -v for upload detail).
18
+ - Low-level commands (validate, test, test-integration, test-e2e) remain for debugging.
19
+ - Generate or upload integration validation packs: aifabrix governance generate|upload <systemKey>
20
+ `;
21
+
22
+ const VERIFY_TRUST_HELP_AFTER = `
23
+ Examples:
24
+ $ aifabrix verify-trust hubspot
25
+ $ aifabrix verify-trust hubspot -v --revalidate
26
+ $ aifabrix verify-trust hubspot --no-sync --json
27
+
28
+ Notes:
29
+ - For one datasource: aifabrix datasource verify-trust <datasourceKey>
30
+ - Does not call external vendor APIs (use verify-operations / test-e2e for connectivity).
31
+ - Local integration files are published before run unless --no-sync.
32
+ `;
33
+
34
+ const VERIFY_GOVERNANCE_HELP_AFTER = `
35
+ Examples:
36
+ $ aifabrix verify-governance hubspot-e2e --subject-email us.sales@example.com
37
+ $ aifabrix verify-governance hubspot-e2e --subject-email a@x.com,b@y.com -v
38
+ $ aifabrix verify-governance hubspot-e2e --certification-profile gold --json
39
+
40
+ Notes:
41
+ - All-in-one: publishes local integration (unless --no-sync), generates packs on the dataplane,
42
+ then runs governance verification (dataplane-first; no local YAML upload).
43
+ - Requires at least one --subject-user-id or --subject-email (repeatable or comma-separated).
44
+ - Prefer this over separate generate + verify when certifying an integration.
45
+ - --pack skips generate and runs a single local YAML override (authoring only).
46
+ - Granular steps: aifabrix governance generate|verify|upload|download <systemKey>
47
+ `;
48
+
49
+ const GOVERNANCE_GENERATE_HELP_AFTER = `
50
+ Examples:
51
+ $ aifabrix governance generate hubspot-e2e --subject-email us.sales@example.com
52
+ $ aifabrix governance generate hubspot-e2e --subject-user-id user-a --subject-user-id user-b -v
53
+ $ aifabrix governance generate hubspot-e2e --certification-profile gold --no-sync
54
+
55
+ Notes:
56
+ - Dataplane generates keys, coverage, and generationState; the CLI never authors partitions locally.
57
+ - Requires at least one --subject-user-id or --subject-email per datasource fan-out.
58
+ - Publishes local integration files before generate unless --no-sync.
59
+ `;
60
+
61
+ const GOVERNANCE_VERIFY_HELP_AFTER = `
62
+ Examples:
63
+ $ aifabrix governance verify hubspot-e2e
64
+ $ aifabrix governance verify hubspot-e2e -v
65
+ $ aifabrix governance verify hubspot-e2e --pack scenarios/custom.yaml
66
+
67
+ Notes:
68
+ - Default: runs persisted scenario packs from the dataplane (after governance generate).
69
+ - --pack is an authoring override only; product path uses DB packs per datasource.
70
+ - Does not call vendor APIs (use verify-operations for connectivity).
71
+ - All-in-one cert path: aifabrix verify-governance <systemKey> --subject-email <email>
72
+ `;
73
+
74
+ const GOVERNANCE_UPLOAD_HELP_AFTER = `
75
+ Examples:
76
+ $ aifabrix governance upload hubspot-e2e
77
+ $ aifabrix governance upload hubspot-e2e --no-sync
78
+
79
+ Notes:
80
+ - Expert path: pushes integration/<systemKey>/scenarios/*.yaml to the dataplane.
81
+ - Packs must satisfy the 424.0 schema (spec.coverage, metadata.generationState). Use governance generate
82
+ or verify-governance for dataplane-first packs.
83
+ `;
84
+
85
+ const GOVERNANCE_DOWNLOAD_HELP_AFTER = `
86
+ Examples:
87
+ $ aifabrix governance download hubspot-e2e
88
+ $ aifabrix governance download hubspot-e2e --json
89
+
90
+ Notes:
91
+ - Pulls active packs to integration/<systemKey>/scenarios/<datasourceKey>.yaml.
92
+ - Does not publish the integration (read-only against the dataplane).
93
+ - When no pack exists, lists datasources and suggests governance generate.
94
+ `;
95
+
96
+ const LIFECYCLE_HELP_AFTER = `
97
+ Examples:
98
+ $ aifabrix lifecycle hubspot
99
+ $ aifabrix lifecycle hubspot -v
100
+ $ aifabrix lifecycle hubspot --run
101
+ $ aifabrix lifecycle hubspot --run --no-sync
102
+ $ aifabrix lifecycle hubspot-e2e --run --subject-email us.sales@example.com
103
+ $ aifabrix lifecycle hubspot-e2e --run --subject-email a@x.com,b@y.com -v
104
+
105
+ Notes:
106
+ - Default: certification report only (GET persisted pillar results from dataplane).
107
+ - --run executes missing verify steps, then prints the report (publishes local files first unless --no-sync).
108
+ - With --run, --subject-email / --subject-user-id generate and verify governance packs (same as verify-governance).
109
+ - Repeat the flag or use comma-separated values: --subject-email a@x.com,b@y.com
110
+ - One-shot cert path: lifecycle <systemKey> --run --subject-email <email>
111
+ - Tier is never inflated — incomplete pillars show NOT VERIFIED and actionable recommendations.
112
+ `;
113
+
114
+ const GOVERNANCE_PARENT_HELP_AFTER = `
115
+ Subcommands:
116
+ generate Create versioned packs on the dataplane (dataplane-first)
117
+ verify Run persisted packs (governance:evaluate)
118
+ upload Push local scenarios/*.yaml (expert path)
119
+ download Pull active packs to integration/<systemKey>/scenarios/
120
+
121
+ All-in-one certification:
122
+ $ aifabrix verify-governance <systemKey> --subject-email <email>
123
+
124
+ Per-command help:
125
+ $ aifabrix governance generate --help
126
+ $ aifabrix governance verify --help
127
+ $ aifabrix governance upload --help
128
+ $ aifabrix governance download --help
129
+ `;
130
+
131
+ module.exports = {
132
+ VERIFY_OPERATIONS_HELP_AFTER,
133
+ VERIFY_TRUST_HELP_AFTER,
134
+ VERIFY_GOVERNANCE_HELP_AFTER,
135
+ GOVERNANCE_GENERATE_HELP_AFTER,
136
+ GOVERNANCE_VERIFY_HELP_AFTER,
137
+ GOVERNANCE_UPLOAD_HELP_AFTER,
138
+ GOVERNANCE_DOWNLOAD_HELP_AFTER,
139
+ GOVERNANCE_PARENT_HELP_AFTER,
140
+ LIFECYCLE_HELP_AFTER
141
+ };
@@ -26,10 +26,27 @@ function setupEnvironmentCommands(program) {
26
26
  const deployExamples = `
27
27
  Examples:
28
28
  $ aifabrix env deploy dev
29
- $ aifabrix env deploy tst --preset m
30
- $ aifabrix env deploy dev --config ./env-config.json --no-poll`;
29
+ $ aifabrix env deploy tst
30
+ $ aifabrix env deploy pro --preset m
31
+ $ aifabrix env deploy dev --preset xl
32
+ $ aifabrix env deploy dev --config ./env-config.json
33
+ $ aifabrix env deploy dev --no-poll
34
+
35
+ Prerequisites: aifabrix login (device token; controller permission controller:deploy).
36
+ Environment keys: miso, dev, tst, pro. Default size preset: s (use --preset s|m|l|xl).
37
+ Run this before aifabrix deploy <app> — the environment must exist first.`;
31
38
 
32
39
  const ENV_GROUP_HELP_AFTER = `
40
+ Examples:
41
+ $ aifabrix env deploy dev
42
+ $ aifabrix env deploy dev --preset m
43
+ $ aifabrix env deploy dev --help
44
+
45
+ Typical workflow:
46
+ 1. aifabrix login
47
+ 2. aifabrix env deploy dev
48
+ 3. aifabrix deploy <app>
49
+
33
50
  Subcommands:
34
51
  deploy <env> Provision/update environment in Miso Controller (see env deploy --help)
35
52
  `;
@@ -0,0 +1,62 @@
1
+ /**
2
+ * @fileoverview Help-after blocks for external system lifecycle CLI commands.
3
+ */
4
+
5
+ 'use strict';
6
+
7
+ const UPLOAD_HELP_AFTER = `
8
+ Examples:
9
+ # Publish integration/<systemKey>/ to the dataplane (typical lab flow after validate + resolve)
10
+ $ aifabrix upload hubspot-demo
11
+ $ aifabrix upload hubspot-demo --verbose
12
+ $ aifabrix upload hubspot-demo --probe
13
+
14
+ # Build and validate payload only (no API calls)
15
+ $ aifabrix upload hubspot-demo --dry-run
16
+
17
+ # Short summary after publish
18
+ $ aifabrix upload hubspot-demo --minimal
19
+
20
+ # Protection manifests (integration/.protection/ at repo root)
21
+ $ aifabrix upload .protection
22
+ $ aifabrix upload .protection --warnings-as-errors --no-sync
23
+
24
+ Notes:
25
+ - Requires login (aifabrix auth status).
26
+ - Reads files under integration/<systemKey>/ (system JSON, datasources, credentials).
27
+ - --probe runs dataplane runtime checks after publish (slower; common in Session 1).
28
+ - test-e2e and test-integration publish local files first by default; use --no-sync on those commands to skip.
29
+ - After dimension/FK edits on active datasources, use --force (or test-e2e / test-integration / datasource test-* with --sync --force).
30
+ - For one datasource only: aifabrix datasource upload <datasourceKey>
31
+ `;
32
+
33
+ const DOWNLOAD_HELP_AFTER = `
34
+ Examples:
35
+ # Pull an existing system from the dataplane into integration/<systemKey>/
36
+ $ aifabrix download hubspot-demo
37
+ $ aifabrix download hubspot-demo --format yaml
38
+
39
+ # Preview without writing files
40
+ $ aifabrix download hubspot-demo --dry-run
41
+
42
+ Notes:
43
+ - Requires login and a system that already exists on the dataplane.
44
+ - Overwrite prompts apply when integration/<systemKey>/ already exists (--force for README).
45
+ `;
46
+
47
+ const DELETE_HELP_AFTER = `
48
+ Examples:
49
+ # Remove system and datasources from the dataplane
50
+ $ aifabrix delete hubspot-demo
51
+ $ aifabrix delete hubspot-demo --yes
52
+
53
+ Notes:
54
+ - Does not delete local files under integration/<systemKey>/.
55
+ - Use when cleaning up test systems or fixing upload schema overlap (then re-run wizard).
56
+ `;
57
+
58
+ module.exports = {
59
+ UPLOAD_HELP_AFTER,
60
+ DOWNLOAD_HELP_AFTER,
61
+ DELETE_HELP_AFTER
62
+ };