@aifabrix/builder 2.43.0 → 2.44.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 (371) hide show
  1. package/.cursor/rules/anchor-docs.mdc +15 -0
  2. package/.cursor/rules/cli-layout.mdc +75 -0
  3. package/.cursor/rules/project-rules.mdc +8 -0
  4. package/.npmrc.token +1 -0
  5. package/.nyc_output/55e9d034-ddab-4579-a706-e02a91d75c91.json +1 -0
  6. package/.nyc_output/processinfo/55e9d034-ddab-4579-a706-e02a91d75c91.json +1 -0
  7. package/.nyc_output/processinfo/index.json +1 -0
  8. package/README.md +1 -1
  9. package/anchor-docs/README.md +10 -0
  10. package/anchor-docs/_TEMPLATE +24 -0
  11. package/bin/aifabrix.js +13 -4
  12. package/integration/hubspot-test/README.md +31 -0
  13. package/integration/hubspot-test/create-hubspot.js +5 -5
  14. package/integration/hubspot-test/hubspot-test-datasource-company.json +58 -462
  15. package/integration/hubspot-test/hubspot-test-datasource-contact.json +61 -555
  16. package/integration/hubspot-test/hubspot-test-datasource-deal.json +63 -506
  17. package/integration/hubspot-test/hubspot-test-datasource-users.json +42 -83
  18. package/integration/hubspot-test/hubspot-test-deploy.json +3 -3
  19. package/integration/hubspot-test/test-dataplane-down-tests.js +1 -7
  20. package/integration/hubspot-test/test-dataplane-down.js +3 -3
  21. package/integration/hubspot-test/test.js +35 -43
  22. package/integration/hubspot-test/wizard-hubspot-test-headless.yaml +23 -0
  23. package/integration/roundtrip-test-local/README.md +144 -0
  24. package/integration/roundtrip-test-local/application.yaml +13 -0
  25. package/integration/roundtrip-test-local/env.template +15 -0
  26. package/integration/roundtrip-test-local/roundtrip-test-local-datasource-roundtrip-test-company.yaml +14 -0
  27. package/integration/roundtrip-test-local/roundtrip-test-local-deploy.json +61 -0
  28. package/integration/roundtrip-test-local/roundtrip-test-local-system.yaml +25 -0
  29. package/integration/roundtrip-test-local2/README.md +144 -0
  30. package/integration/roundtrip-test-local2/application.yaml +13 -0
  31. package/integration/roundtrip-test-local2/env.template +15 -0
  32. package/integration/roundtrip-test-local2/roundtrip-test-local2-datasource-company.yaml +31 -0
  33. package/integration/roundtrip-test-local2/roundtrip-test-local2-deploy.json +86 -0
  34. package/integration/roundtrip-test-local2/roundtrip-test-local2-system.yaml +25 -0
  35. package/integration/test/wizard.yaml +8 -0
  36. package/jest.config.default.js +10 -0
  37. package/jest.config.integration.fixtures.js +22 -0
  38. package/jest.config.integration.js +21 -18
  39. package/jest.config.isolated.js +10 -0
  40. package/jest.projects.js +301 -0
  41. package/lib/api/certificates.api.js +62 -0
  42. package/lib/api/datasources-core.api.js +3 -3
  43. package/lib/api/dev-mtls-request.js +110 -0
  44. package/lib/api/dev-server-https.js +145 -0
  45. package/lib/api/dev.api.js +133 -144
  46. package/lib/api/index.js +11 -3
  47. package/lib/api/pipeline.api.js +67 -20
  48. package/lib/api/types/certificates.types.js +48 -0
  49. package/lib/api/types/dev.types.js +4 -3
  50. package/lib/api/types/pipeline.types.js +8 -5
  51. package/lib/api/types/validation-run.types.js +56 -0
  52. package/lib/api/validation-run.api.js +111 -0
  53. package/lib/api/validation-runner.js +109 -0
  54. package/lib/app/certification-show-enrich.js +129 -0
  55. package/lib/app/certification-verify-rows.js +60 -0
  56. package/lib/app/config.js +1 -1
  57. package/lib/app/deploy-status-display.js +2 -2
  58. package/lib/app/deploy.js +7 -6
  59. package/lib/app/display.js +2 -1
  60. package/lib/app/dockerfile.js +3 -2
  61. package/lib/app/down.js +2 -1
  62. package/lib/app/helpers.js +6 -5
  63. package/lib/app/index.js +27 -8
  64. package/lib/app/list.js +7 -6
  65. package/lib/app/push.js +4 -3
  66. package/lib/app/register.js +16 -7
  67. package/lib/app/rotate-secret.js +14 -13
  68. package/lib/app/run-container-start.js +184 -0
  69. package/lib/app/run-docker-fallback.js +108 -0
  70. package/lib/app/run-env-compose.js +30 -42
  71. package/lib/app/run-helpers.js +49 -126
  72. package/lib/app/run-infra-requirements.js +30 -0
  73. package/lib/app/run-resolve-image.js +21 -0
  74. package/lib/app/run.js +74 -21
  75. package/lib/app/show-display.js +44 -1
  76. package/lib/app/show.js +93 -9
  77. package/lib/build/index.js +13 -10
  78. package/lib/certification/cli-cert-sync-skip.js +21 -0
  79. package/lib/certification/merge-certification-from-artifact.js +185 -0
  80. package/lib/certification/post-unified-cert-sync.js +33 -0
  81. package/lib/certification/sync-after-external-command.js +52 -0
  82. package/lib/certification/sync-system-certification.js +197 -0
  83. package/lib/cli/index.js +2 -0
  84. package/lib/cli/setup-app.help.js +67 -0
  85. package/lib/cli/setup-app.js +61 -121
  86. package/lib/cli/setup-app.test-commands.js +195 -0
  87. package/lib/cli/setup-auth.js +19 -5
  88. package/lib/cli/setup-credential-deployment.js +22 -8
  89. package/lib/cli/setup-dev-path-commands.js +124 -0
  90. package/lib/cli/setup-dev.js +170 -113
  91. package/lib/cli/setup-environment.js +7 -1
  92. package/lib/cli/setup-external-system.js +84 -23
  93. package/lib/cli/setup-infra.js +126 -47
  94. package/lib/cli/setup-parameters.js +32 -0
  95. package/lib/cli/setup-secrets.js +137 -18
  96. package/lib/cli/setup-service-user.js +1 -1
  97. package/lib/cli/setup-utility.js +54 -22
  98. package/lib/commands/app-down.js +5 -7
  99. package/lib/commands/app-install.js +14 -7
  100. package/lib/commands/app-logs.js +13 -10
  101. package/lib/commands/app-shell.js +4 -1
  102. package/lib/commands/app-test.js +25 -19
  103. package/lib/commands/app.js +32 -11
  104. package/lib/commands/auth-config.js +6 -6
  105. package/lib/commands/auth-status.js +4 -3
  106. package/lib/commands/credential-env.js +4 -3
  107. package/lib/commands/credential-list.js +5 -4
  108. package/lib/commands/credential-push.js +4 -3
  109. package/lib/commands/datasource-unified-test-cli.js +428 -0
  110. package/lib/commands/datasource-unified-test-cli.options.js +191 -0
  111. package/lib/commands/datasource-unified-test-e2e-cli-helpers.js +106 -0
  112. package/lib/commands/datasource-validation-cli.js +143 -0
  113. package/lib/commands/datasource.js +125 -95
  114. package/lib/commands/deployment-list.js +6 -5
  115. package/lib/commands/dev-cli-handlers.js +122 -18
  116. package/lib/commands/dev-down.js +4 -3
  117. package/lib/commands/dev-init.js +231 -116
  118. package/lib/commands/dev-show-display.js +473 -0
  119. package/lib/commands/login-credentials.js +3 -2
  120. package/lib/commands/login-device.js +4 -3
  121. package/lib/commands/login.js +5 -4
  122. package/lib/commands/logout.js +8 -7
  123. package/lib/commands/parameters-validate.js +54 -0
  124. package/lib/commands/repair-datasource.js +314 -68
  125. package/lib/commands/repair-env-template.js +2 -2
  126. package/lib/commands/repair.js +21 -3
  127. package/lib/commands/secrets-list.js +23 -12
  128. package/lib/commands/secrets-remove-all.js +220 -0
  129. package/lib/commands/secrets-remove.js +21 -12
  130. package/lib/commands/secrets-set.js +21 -12
  131. package/lib/commands/secrets-validate.js +4 -4
  132. package/lib/commands/secure.js +10 -9
  133. package/lib/commands/service-user.js +26 -25
  134. package/lib/commands/test-e2e-external.js +27 -1
  135. package/lib/commands/up-common.js +3 -2
  136. package/lib/commands/up-dataplane.js +29 -16
  137. package/lib/commands/up-miso.js +19 -29
  138. package/lib/commands/upload.js +149 -39
  139. package/lib/commands/wizard-core-helpers.js +1 -1
  140. package/lib/commands/wizard-dataplane.js +4 -3
  141. package/lib/commands/wizard-helpers.js +3 -3
  142. package/lib/commands/wizard.js +2 -2
  143. package/lib/core/admin-secrets.js +14 -5
  144. package/lib/core/audit-logger.js +12 -4
  145. package/lib/core/config-attach-extensions.js +46 -0
  146. package/lib/core/config-runtime-paths.js +29 -0
  147. package/lib/core/config.js +55 -56
  148. package/lib/core/diff.js +3 -2
  149. package/lib/core/ensure-encryption-key.js +1 -1
  150. package/lib/core/secrets-ensure-infra.js +77 -0
  151. package/lib/core/secrets-ensure.js +120 -64
  152. package/lib/core/secrets-env-write.js +35 -7
  153. package/lib/core/secrets-infra-placeholder-sync.js +61 -0
  154. package/lib/core/secrets.js +200 -37
  155. package/lib/core/templates-env.js +4 -3
  156. package/lib/datasource/abac-validator.js +1 -10
  157. package/lib/datasource/deploy.js +75 -53
  158. package/lib/datasource/field-reference-validator.js +9 -6
  159. package/lib/datasource/integration-context.js +63 -0
  160. package/lib/datasource/list.js +8 -7
  161. package/lib/datasource/log-viewer.js +189 -67
  162. package/lib/datasource/resolve-app.js +4 -4
  163. package/lib/datasource/test-e2e.js +113 -146
  164. package/lib/datasource/test-integration.js +114 -122
  165. package/lib/datasource/unified-validation-run-body.js +68 -0
  166. package/lib/datasource/unified-validation-run-post.js +23 -0
  167. package/lib/datasource/unified-validation-run-resolve.js +43 -0
  168. package/lib/datasource/unified-validation-run.js +93 -0
  169. package/lib/datasource/validate.js +157 -13
  170. package/lib/deployment/deployer.js +4 -3
  171. package/lib/deployment/environment.js +7 -6
  172. package/lib/deployment/push.js +17 -8
  173. package/lib/external-system/delete.js +4 -3
  174. package/lib/external-system/deploy.js +166 -53
  175. package/lib/external-system/download-helpers.js +1 -1
  176. package/lib/external-system/download.js +7 -6
  177. package/lib/external-system/generator.js +92 -6
  178. package/lib/external-system/integration-test-dispatch.js +26 -0
  179. package/lib/external-system/test-execution.js +5 -1
  180. package/lib/external-system/test-helpers.js +0 -4
  181. package/lib/external-system/test-system-level-helpers.js +110 -0
  182. package/lib/external-system/test-system-level.js +83 -44
  183. package/lib/external-system/test.js +59 -8
  184. package/lib/generator/builders.js +23 -11
  185. package/lib/generator/deploy-manifest-azure-kv.js +81 -0
  186. package/lib/generator/external.js +16 -4
  187. package/lib/generator/helpers.js +58 -3
  188. package/lib/generator/index.js +4 -0
  189. package/lib/generator/split-readme.js +12 -7
  190. package/lib/generator/split-variables.js +2 -1
  191. package/lib/generator/split.js +1 -1
  192. package/lib/generator/wizard-readme.js +3 -3
  193. package/lib/generator/wizard.js +8 -8
  194. package/lib/infrastructure/compose.js +70 -7
  195. package/lib/infrastructure/helpers-docker-check.js +67 -0
  196. package/lib/infrastructure/helpers.js +203 -42
  197. package/lib/infrastructure/index.js +31 -18
  198. package/lib/infrastructure/services.js +21 -67
  199. package/lib/internal/fs-real-sync.js +104 -0
  200. package/lib/internal/node-fs.js +98 -0
  201. package/lib/parameters/database-secret-values.js +173 -0
  202. package/lib/parameters/infra-kv-discovery.js +121 -0
  203. package/lib/parameters/infra-parameter-catalog.js +458 -0
  204. package/lib/parameters/infra-parameter-validate.js +64 -0
  205. package/lib/schema/application-schema.json +37 -17
  206. package/lib/schema/datasource-test-run.schema.json +493 -0
  207. package/lib/schema/deployment-rules.yaml +102 -63
  208. package/lib/schema/external-datasource.schema.json +1200 -442
  209. package/lib/schema/external-system.schema.json +203 -5
  210. package/lib/schema/flag-map-validation-run.json +31 -0
  211. package/lib/schema/infra-parameter.schema.json +106 -0
  212. package/lib/schema/infra.parameter.yaml +421 -0
  213. package/lib/schema/type/credential-auth-templates.json +40 -0
  214. package/lib/schema/type/document-storage.json +226 -0
  215. package/lib/schema/type/message-service.json +123 -0
  216. package/lib/schema/type/vector-store.json +88 -0
  217. package/lib/utils/aifabrix-runtime-config-dir.js +132 -0
  218. package/lib/utils/api-error-handler.js +2 -2
  219. package/lib/utils/api.js +77 -17
  220. package/lib/utils/app-register-api.js +3 -2
  221. package/lib/utils/app-register-auth.js +1 -1
  222. package/lib/utils/app-register-config.js +4 -4
  223. package/lib/utils/app-register-display.js +3 -2
  224. package/lib/utils/app-register-validator.js +3 -2
  225. package/lib/utils/app-run-containers.js +26 -22
  226. package/lib/utils/app-scoped-config.js +31 -0
  227. package/lib/utils/app-service-env-from-builder.js +164 -0
  228. package/lib/utils/build-copy.js +1 -1
  229. package/lib/utils/build-helpers.js +20 -20
  230. package/lib/utils/build-resolve-image.js +165 -0
  231. package/lib/utils/cli-layout-chalk.js +8 -0
  232. package/lib/utils/cli-test-layout-chalk.js +267 -0
  233. package/lib/utils/cli-utils.js +88 -11
  234. package/lib/utils/compose-db-passwords.js +138 -0
  235. package/lib/utils/compose-generate-docker-compose.js +216 -0
  236. package/lib/utils/compose-generator.js +197 -291
  237. package/lib/utils/compose-miso-env.js +18 -0
  238. package/lib/utils/compose-traefik-ingress-base.js +158 -0
  239. package/lib/utils/config-paths.js +166 -7
  240. package/lib/utils/config-scoped-resources-preference.js +41 -0
  241. package/lib/utils/configuration-env-resolver.js +11 -8
  242. package/lib/utils/controller-deployment-outcome.js +68 -0
  243. package/lib/utils/credential-display.js +2 -2
  244. package/lib/utils/credential-secrets-env.js +5 -5
  245. package/lib/utils/dataplane-pipeline-warning.js +4 -3
  246. package/lib/utils/datasource-test-run-capability-scope.js +43 -0
  247. package/lib/utils/datasource-test-run-certificate-tty.js +82 -0
  248. package/lib/utils/datasource-test-run-debug-display.js +137 -0
  249. package/lib/utils/datasource-test-run-debug-slice.js +93 -0
  250. package/lib/utils/datasource-test-run-display.js +459 -0
  251. package/lib/utils/datasource-test-run-exit.js +83 -0
  252. package/lib/utils/datasource-test-run-legacy-adapter.js +93 -0
  253. package/lib/utils/datasource-test-run-report-version.js +51 -0
  254. package/lib/utils/datasource-test-run-schema-sync.js +59 -0
  255. package/lib/utils/datasource-test-run-tty-log.js +81 -0
  256. package/lib/utils/datasource-validation-watch.js +266 -0
  257. package/lib/utils/declarative-url-ports.js +47 -0
  258. package/lib/utils/derive-env-key-from-client-id.js +41 -0
  259. package/lib/utils/dev-ca-install.js +185 -23
  260. package/lib/utils/dev-cert-helper.js +266 -17
  261. package/lib/utils/dev-hosts-helper.js +307 -0
  262. package/lib/utils/dev-init-cert-hints.js +37 -0
  263. package/lib/utils/dev-init-health-messages.js +52 -0
  264. package/lib/utils/dev-init-resolve.js +86 -0
  265. package/lib/utils/dev-init-ssh-merge.js +65 -0
  266. package/lib/utils/dev-ssh-config-helper.js +196 -0
  267. package/lib/utils/dev-user-groups.js +93 -0
  268. package/lib/utils/docker-build.js +42 -17
  269. package/lib/utils/docker-exec.js +28 -0
  270. package/lib/utils/docker-manifest-public-port.js +116 -0
  271. package/lib/utils/docker-not-running-hint.js +52 -0
  272. package/lib/utils/docker.js +98 -11
  273. package/lib/utils/ensure-dev-certs-for-remote-docker.js +192 -0
  274. package/lib/utils/env-config-loader.js +10 -91
  275. package/lib/utils/env-copy.js +19 -10
  276. package/lib/utils/env-map.js +35 -8
  277. package/lib/utils/env-template.js +2 -2
  278. package/lib/utils/environment-scoped-resources.js +144 -0
  279. package/lib/utils/error-formatter.js +92 -13
  280. package/lib/utils/error-formatters/http-status-errors.js +6 -5
  281. package/lib/utils/error-formatters/network-errors.js +2 -1
  282. package/lib/utils/error-formatters/permission-errors.js +2 -1
  283. package/lib/utils/error-formatters/validation-errors.js +2 -1
  284. package/lib/utils/external-readme.js +8 -1
  285. package/lib/utils/external-system-display.js +242 -136
  286. package/lib/utils/external-system-local-test-tty.js +389 -0
  287. package/lib/utils/external-system-readiness-core.js +377 -0
  288. package/lib/utils/external-system-readiness-deploy-display.js +270 -0
  289. package/lib/utils/external-system-readiness-display-internals.js +150 -0
  290. package/lib/utils/external-system-readiness-display.js +186 -0
  291. package/lib/utils/external-system-system-test-tty-overview.js +120 -0
  292. package/lib/utils/external-system-system-test-tty.js +417 -0
  293. package/lib/utils/external-system-test-helpers.js +24 -6
  294. package/lib/utils/external-system-validators.js +30 -12
  295. package/lib/utils/health-check-url.js +119 -0
  296. package/lib/utils/health-check.js +59 -25
  297. package/lib/utils/help-builder.js +11 -8
  298. package/lib/utils/image-version.js +4 -8
  299. package/lib/utils/infra-containers.js +4 -7
  300. package/lib/utils/infra-env-defaults.js +162 -0
  301. package/lib/utils/infra-status-display.js +167 -0
  302. package/lib/utils/infra-status.js +16 -8
  303. package/lib/utils/local-secrets.js +3 -4
  304. package/lib/utils/paths.js +148 -47
  305. package/lib/utils/port-resolver.js +10 -23
  306. package/lib/utils/redis-env-scope.js +62 -0
  307. package/lib/utils/register-aifabrix-shell-env.js +204 -0
  308. package/lib/utils/remote-builder-validation.js +99 -0
  309. package/lib/utils/remote-dev-auth.js +117 -21
  310. package/lib/utils/remote-docker-env.js +67 -15
  311. package/lib/utils/remote-secrets-loader.js +13 -4
  312. package/lib/utils/resolve-docker-image-ref.js +124 -0
  313. package/lib/utils/schema-loader.js +22 -9
  314. package/lib/utils/secrets-bash-kv.js +25 -0
  315. package/lib/utils/secrets-generator.js +169 -49
  316. package/lib/utils/secrets-helpers.js +70 -59
  317. package/lib/utils/secrets-kv-scope.js +60 -0
  318. package/lib/utils/secrets-utils.js +32 -38
  319. package/lib/utils/secrets-validation.js +3 -1
  320. package/lib/utils/secrets-yaml-preserve.js +109 -0
  321. package/lib/utils/ssh-key-helper.js +4 -2
  322. package/lib/utils/template-helpers.js +2 -2
  323. package/lib/utils/test-log-writer.js +3 -3
  324. package/lib/utils/token-manager.js +1 -2
  325. package/lib/utils/url-declarative-public-base.js +188 -0
  326. package/lib/utils/url-declarative-resolve-build.js +493 -0
  327. package/lib/utils/url-declarative-resolve-load-doc.js +51 -0
  328. package/lib/utils/url-declarative-resolve.js +220 -0
  329. package/lib/utils/url-declarative-token-parse.js +74 -0
  330. package/lib/utils/url-declarative-url-flags.js +50 -0
  331. package/lib/utils/url-declarative-vdir-inactive-env.js +99 -0
  332. package/lib/utils/url-public-path-prefix.js +34 -0
  333. package/lib/utils/urls-local-registry.js +220 -0
  334. package/lib/utils/validation-report-tty-kit.js +77 -0
  335. package/lib/utils/validation-run-poll.js +112 -0
  336. package/lib/utils/validation-run-post-retry.js +85 -0
  337. package/lib/utils/validation-run-request.js +116 -0
  338. package/lib/utils/variable-transformer.js +21 -4
  339. package/lib/utils/yaml-preserve.js +33 -14
  340. package/lib/validation/datasource-warnings.js +56 -0
  341. package/lib/validation/env-template-auth.js +1 -1
  342. package/lib/validation/external-manifest-validator.js +27 -7
  343. package/lib/validation/validate-display.js +37 -31
  344. package/lib/validation/validate-external-cert-sync.js +23 -0
  345. package/lib/validation/validate.js +8 -14
  346. package/lib/validation/validator-unresolved-placeholders.js +98 -0
  347. package/lib/validation/validator.js +22 -65
  348. package/lib/validation/wizard-config-validator.js +2 -1
  349. package/package.json +9 -4
  350. package/scripts/check-datasource-test-run-schema-sync.js +34 -0
  351. package/scripts/diagnose-cli.js +150 -0
  352. package/scripts/install-local.js +307 -55
  353. package/scripts/pnpm-global-remove.js +48 -0
  354. package/templates/README.md +15 -2
  355. package/templates/applications/dataplane/application.yaml +52 -2
  356. package/templates/applications/dataplane/env.template +79 -17
  357. package/templates/applications/dataplane/rbac.yaml +8 -0
  358. package/templates/applications/keycloak/application.yaml +9 -1
  359. package/templates/applications/keycloak/env.template +15 -6
  360. package/templates/applications/miso-controller/application.yaml +10 -2
  361. package/templates/applications/miso-controller/env.template +42 -12
  362. package/templates/applications/miso-controller/rbac.yaml +5 -0
  363. package/templates/external-system/README.md.hbs +20 -7
  364. package/templates/external-system/deploy.js.hbs +5 -5
  365. package/templates/external-system/external-datasource.yaml.hbs +197 -118
  366. package/templates/infra/compose.yaml.hbs +33 -16
  367. package/templates/infra/servers.json.hbs +3 -1
  368. package/templates/python/docker-compose.hbs +16 -0
  369. package/templates/typescript/docker-compose.hbs +16 -0
  370. package/lib/api/external-test.api.js +0 -111
  371. package/lib/schema/env-config.yaml +0 -60
@@ -0,0 +1,421 @@
1
+ # Builder catalog: local kv:// secret keys, generators, and Azure KV naming hints.
2
+ # Local keys use suffixes like databases-{appKey}-{index}-urlKeyVault; Azure often prefixes {app-key}- (see .cursor/plans/keyvault.md).
3
+ # Maintenance: cross-check SecretName= lines in aifabrix-miso infrastructure/bicep/modules/05_miso-webapp.bicep
4
+ # and 07_keycloak-webapp.bicep with docs/configuration/infra-parameters.md (§ Bicep audit).
5
+ version: 1
6
+ # Shared {{adminEmail}} / {{adminPassword}} / {{userPassword}} for catalog literals and admin-secrets backfill.
7
+ # Override any time with: aifabrix up-infra --adminPassword … --adminEmail … --userPassword …
8
+ defaults:
9
+ adminEmail: admin@aifabrix.dev
10
+ adminPassword: admin123
11
+ userPassword: user123
12
+ # Always ensured on up-infra even when no workspace env.template references these kv:// keys (bootstrap defaults).
13
+ standardUpInfraEnsureKeys:
14
+ - databases-miso-controller-0-urlKeyVault
15
+ - databases-miso-controller-0-passwordKeyVault
16
+ - databases-miso-controller-1-urlKeyVault
17
+ - databases-miso-controller-1-passwordKeyVault
18
+ # Dataplane (four DB slots) — bootstrap before builder/dataplane is copied
19
+ - databases-dataplane-0-urlKeyVault
20
+ - databases-dataplane-0-passwordKeyVault
21
+ - databases-dataplane-1-urlKeyVault
22
+ - databases-dataplane-1-passwordKeyVault
23
+ - databases-dataplane-2-urlKeyVault
24
+ - databases-dataplane-2-passwordKeyVault
25
+ - databases-dataplane-3-urlKeyVault
26
+ - databases-dataplane-3-passwordKeyVault
27
+ parameters:
28
+ - key: postgres-passwordKeyVault
29
+ scope: infra
30
+ generator:
31
+ type: literal
32
+ value: '{{adminPassword}}'
33
+ ensureOn: [upInfra, resolveApp]
34
+ azure:
35
+ vaultSecretName: postgres-passwordKeyVault
36
+ notes: >-
37
+ Shared Docker Postgres admin password for local up-infra. This is separate from Keycloak’s
38
+ Azure Postgres admin secret `{appKey}-postgres-admin-password` in aifabrix-miso
39
+ infrastructure/bicep/modules/07_keycloak-webapp.bicep.
40
+
41
+ - key: redis-passwordKeyVault
42
+ scope: infra
43
+ generator:
44
+ type: emptyAllowed
45
+ ensureOn: [upInfra, resolveApp]
46
+ azure:
47
+ vaultSecretName: redis-passwordKeyVault
48
+ notes: >-
49
+ Local `up-infra` Redis has no requirepass; absent key resolves to empty string at `aifabrix resolve`.
50
+ Set a value in secrets when using authenticated Redis or Azure.
51
+
52
+ - key: redis-url
53
+ scope: infra
54
+ generator:
55
+ type: literal
56
+ value: 'redis://${REDIS_HOST}:${REDIS_PORT}'
57
+ ensureOn: [upInfra, resolveApp]
58
+ azure:
59
+ notes: Not a Key Vault secret in local dev; URL built from infra endpoints in Azure.
60
+
61
+ - key: keycloak-admin-passwordKeyVault
62
+ scope: shared-service
63
+ generator:
64
+ type: literal
65
+ value: '{{adminPassword}}'
66
+ ensureOn: [upInfra, resolveApp]
67
+ azure:
68
+ vaultSecretNamePattern: '{appKey}-keycloak-admin-password'
69
+ notes: >-
70
+ Local kv:// and secrets.local.yaml use the *KeyVault suffix. Miso install Bicep references
71
+ SecretName `${prefix}-keycloak-admin-password` (no KeyVault suffix) in
72
+ infrastructure/bicep/modules/05_miso-webapp.bicep and 07_keycloak-webapp.bicep.
73
+
74
+ - key: keycloak-web-server-url
75
+ scope: shared-service
76
+ generator:
77
+ type: emptyString
78
+ ensureOn: [upInfra, resolveApp]
79
+ azure:
80
+ vaultSecretName: keycloak-web-server-url
81
+ notes: >-
82
+ Bicep (05_miso-webapp.bicep) uses unprefixed SecretName `keycloak-web-server-url` (same as local key).
83
+ Shipped miso-controller/dataplane env templates use url://keycloak-public instead of this kv:// for local resolve.
84
+
85
+ - key: keycloak-internal-server-url
86
+ scope: shared-service
87
+ generator:
88
+ type: emptyString
89
+ ensureOn: [upInfra, resolveApp]
90
+ azure:
91
+ vaultSecretName: keycloak-internal-server-url
92
+ notes: >-
93
+ Bicep (05_miso-webapp.bicep) uses unprefixed SecretName `keycloak-internal-server-url`.
94
+ Shipped templates use url://keycloak-internal for local resolve.
95
+
96
+ # When env.template uses kv://keycloak-client-idKeyVault (multi-realm / dev naming).
97
+ - key: keycloak-client-idKeyVault
98
+ scope: shared-service
99
+ generator:
100
+ type: literal
101
+ value: 'miso-controller-miso-keycloak'
102
+ ensureOn: [upInfra, resolveApp]
103
+ azure:
104
+ notes: >-
105
+ Default OAuth client id for controller ↔ Keycloak when resolved from secrets; override per environment.
106
+
107
+ - key: keycloak-client-secretKeyVault
108
+ scope: shared-service
109
+ generator:
110
+ type: randomBytes32
111
+ ensureOn: [upInfra, resolveApp]
112
+ azure:
113
+ vaultSecretName: keycloak-client-secretKeyVault
114
+ notes: Per-app OAuth client secret from Keycloak registration; generated on first ensure.
115
+
116
+ - key: keycloak-default-passwordKeyVault
117
+ scope: shared-service
118
+ generator:
119
+ type: literal
120
+ value: '{{userPassword}}'
121
+ ensureOn: [upInfra, resolveApp]
122
+ azure:
123
+ notes: >-
124
+ Keycloak default-user password for local/bootstrap; explicit literal so it is not randomBytes32.
125
+
126
+ - key: miso-controller-secrets-encryptionKeyVault
127
+ scope: app
128
+ generator:
129
+ type: randomBytes32
130
+ ensureOn: [upInfra, resolveApp]
131
+ azure:
132
+ vaultSecretNamePattern: '{appKey}-secrets-encryptionKeyVault'
133
+ notes: >-
134
+ 32-byte secret as base64; generated on first ensure. Rotate in production.
135
+
136
+ # Local kv:// name matches miso-controller env.template (JWT_SECRET); not the generic {appKey}-secrets-jwtKeyVault Azure name.
137
+ - key: miso-controller-jwt-secretKeyVault
138
+ scope: app
139
+ generator:
140
+ type: randomBytes32
141
+ ensureOn: [upInfra, resolveApp]
142
+ azure:
143
+ vaultSecretNamePattern: '{appKey}-secrets-jwtKeyVault'
144
+ notes: >-
145
+ JWT signing secret; generated on first ensure. Azure Bicep typically uses `${prefix}-secrets-jwtKeyVault`.
146
+
147
+ # Exact entry so this is not caught by *KeyVault → randomBytes32 (invalid email).
148
+ - key: miso-controller-admin-emailKeyVault
149
+ scope: app
150
+ generator:
151
+ type: literal
152
+ value: '{{adminEmail}}'
153
+ ensureOn: [upInfra, resolveApp]
154
+ azure:
155
+ notes: Onboarding admin email; align with controller onboarding defaults.
156
+
157
+ # Local first-time install / onboarding default (change in production).
158
+ - key: miso-controller-admin-passwordKeyVault
159
+ scope: app
160
+ generator:
161
+ type: literal
162
+ value: '{{adminPassword}}'
163
+ ensureOn: [upInfra, resolveApp]
164
+ azure:
165
+ notes: >-
166
+ Matches controller onboarding default; override in secrets for non-dev.
167
+ Same secret backs ONBOARDING_ADMIN_PASSWORD and MISO_ADMIN_PASSWORD in env.template.
168
+
169
+ # DEPLOYMENT=azure only; local/docker leave empty (do not generate random placeholders).
170
+ - key: azure-subscription-idKeyVault
171
+ scope: infra
172
+ generator:
173
+ type: emptyString
174
+ ensureOn: [upInfra, resolveApp]
175
+ azure:
176
+ notes: Production Key Vault / app settings; empty locally.
177
+
178
+ - key: azure-tenant-idKeyVault
179
+ scope: infra
180
+ generator:
181
+ type: emptyString
182
+ ensureOn: [upInfra, resolveApp]
183
+ azure:
184
+ notes: Production only; empty locally.
185
+
186
+ - key: azure-service-nameKeyVault
187
+ scope: infra
188
+ generator:
189
+ type: emptyString
190
+ ensureOn: [upInfra, resolveApp]
191
+ azure:
192
+ notes: Production only; empty locally.
193
+
194
+ - key: azure-client-idKeyVault
195
+ scope: infra
196
+ generator:
197
+ type: emptyString
198
+ ensureOn: [upInfra, resolveApp]
199
+ azure:
200
+ notes: Production only; empty locally.
201
+
202
+ - key: azure-client-secretKeyVault
203
+ scope: infra
204
+ generator:
205
+ type: emptyString
206
+ ensureOn: [upInfra, resolveApp]
207
+ azure:
208
+ notes: Production only; empty locally.
209
+
210
+ # Optional private npm; local scaffold leaves empty.
211
+ - key: BASH_NPM_TOKEN
212
+ scope: infra
213
+ generator:
214
+ type: emptyString
215
+ ensureOn: [upInfra, resolveApp]
216
+ azure:
217
+ notes: Not a typical Key Vault name; local optional npm token.
218
+
219
+ # Optional private pypi; local scaffold leaves empty.
220
+ - key: BASH_PYPI_TOKEN
221
+ scope: infra
222
+ generator:
223
+ type: emptyString
224
+ ensureOn: [upInfra, resolveApp]
225
+ azure:
226
+ notes: Not a typical Key Vault name; local optional pypi token.
227
+
228
+ # Default client id for controller app in local multi-service layout; override after register if needed.
229
+ - key: miso-controller-client-idKeyVault
230
+ scope: app
231
+ generator:
232
+ type: literal
233
+ value: 'miso-controller-miso-miso-controller'
234
+ ensureOn: [upInfra, resolveApp]
235
+ azure:
236
+ notes: >-
237
+ Per-app OAuth client id from controller registration; literal default matches local Keycloak client naming.
238
+
239
+ # Dataplane ↔ controller OAuth (builder/dataplane env.template MISO_CLIENTID / MISO_CLIENTSECRET).
240
+ - key: dataplane-client-idKeyVault
241
+ scope: app
242
+ generator:
243
+ type: literal
244
+ value: 'miso-controller-dev-dataplane'
245
+ ensureOn: [upInfra, resolveApp]
246
+ azure:
247
+ notes: >-
248
+ Per-app OAuth client id from controller registration; literal default matches local Keycloak client naming
249
+ (override for environments such as miso-controller-dev-dataplane).
250
+
251
+ - key: dataplane-client-secretKeyVault
252
+ scope: app
253
+ generator:
254
+ type: randomBytes32
255
+ ensureOn: [upInfra, resolveApp]
256
+ azure:
257
+ vaultSecretName: dataplane-client-secretKeyVault
258
+ notes: Per-app OAuth client secret for dataplane; generated on first ensure.
259
+
260
+ # Mori / telemetry: optional locally (LICENSE_JWT=DEVELOPMENT skips Mori); empty until integrated.
261
+ - key: mori-controller-api-keyKeyVault
262
+ scope: infra
263
+ generator:
264
+ type: emptyString
265
+ ensureOn: [upInfra, resolveApp]
266
+ azure:
267
+ notes: Empty locally; set when calling Mori with API key auth.
268
+
269
+ - key: mori-controller-basic-usernameKeyVault
270
+ scope: infra
271
+ generator:
272
+ type: emptyString
273
+ ensureOn: [upInfra, resolveApp]
274
+ azure:
275
+ notes: Empty locally; Mori basic auth optional.
276
+
277
+ - key: mori-controller-basic-passwordKeyVault
278
+ scope: infra
279
+ generator:
280
+ type: emptyString
281
+ ensureOn: [upInfra, resolveApp]
282
+ azure:
283
+ notes: Empty locally; Mori basic auth optional.
284
+
285
+ - key: appinsights-connectionStringKeyVault
286
+ scope: infra
287
+ generator:
288
+ type: emptyString
289
+ ensureOn: [upInfra, resolveApp]
290
+ azure:
291
+ vaultSecretName: appinsights-connectionStringKeyVault
292
+ notes: >-
293
+ Aligns with keyvault.md / Azure naming (appinsights.connectionStringKeyVault). Empty locally until set from Azure Portal.
294
+
295
+ # Dataplane builder/dataplane env.template (AI/LLM); optional until OpenAI or Azure OpenAI is configured.
296
+ - key: secrets-openaiApiKeyVault
297
+ scope: app
298
+ generator:
299
+ type: emptyString
300
+ ensureOn: [upInfra, resolveApp]
301
+ azure:
302
+ notes: Empty until set; user-supplied OpenAI API key (not auto-generated).
303
+
304
+ - key: azure-openaiapi-urlKeyVault
305
+ scope: app
306
+ generator:
307
+ type: emptyString
308
+ ensureOn: [upInfra, resolveApp]
309
+ azure:
310
+ notes: Empty until set; Azure OpenAI endpoint URL.
311
+
312
+ - key: secrets-azureOpenaiApiKeyVault
313
+ scope: app
314
+ generator:
315
+ type: emptyString
316
+ ensureOn: [upInfra, resolveApp]
317
+ azure:
318
+ notes: Empty until set; user-supplied Azure OpenAI API key (not auto-generated).
319
+
320
+ # Legacy unprefixed name (scaffold / old env.template); prefer *KeyVault suffix or {appKey}-secrets-apiKeyVault (keyvault.md).
321
+ - key: api-key
322
+ scope: app
323
+ generator:
324
+ type: randomBytes32
325
+ ensureOn: [resolveApp]
326
+ azure:
327
+ notes: >-
328
+ Legacy kv://api-key; new apps should use kv://api-keyKeyVault or {appKey}-secrets-apiKeyVault.
329
+
330
+ # Legacy unprefixed name; prefer kv://{appKey}-secrets-apiKeyVault in env.template (keyvault.md secrets.apiKeyVault).
331
+ - key: miso-controller-secrets-apiKeyVault
332
+ scope: app
333
+ generator:
334
+ type: randomBytes32
335
+ ensureOn: [resolveApp]
336
+ azure:
337
+ notes: >-
338
+ Prefer {appKey}-secrets-apiKeyVault locally; dataplane shares miso-controller's entry for pipeline Bearer bypass.
339
+
340
+ # App semver when env.template / conversion yields kv://version (local secrets backfill).
341
+ - key: version
342
+ scope: app
343
+ generator:
344
+ type: literal
345
+ value: '1.0.0'
346
+ ensureOn: [resolveApp]
347
+ azure:
348
+ notes: >-
349
+ Default application version for kv://version; override in secrets when needed.
350
+
351
+ # Per-index database secrets (local names). Index must match requires.databases order in application.yaml.
352
+ - keyPattern: '^databases-[a-z0-9-]+-\d+-urlKeyVault$'
353
+ scope: app
354
+ generator:
355
+ type: databaseUrl
356
+ ensureOn: [upInfra, resolveApp]
357
+ azure:
358
+ vaultSecretNamePattern: '{appKey}-databases-{index}-urlKeyVault'
359
+ notes: Azure vault secret name prefixes app key; local kv:// key has no app prefix.
360
+
361
+ - keyPattern: '^databases-[a-z0-9-]+-\d+-passwordKeyVault$'
362
+ scope: app
363
+ generator:
364
+ type: databasePassword
365
+ ensureOn: [upInfra, resolveApp]
366
+ azure:
367
+ vaultSecretNamePattern: '{appKey}-databases-{index}-passwordKeyVault'
368
+
369
+ # Keycloak and other *-url keys (non-database).
370
+ - keyPattern: '^keycloak-.+-url$'
371
+ scope: shared-service
372
+ generator:
373
+ type: emptyString
374
+ ensureOn: [upInfra, resolveApp]
375
+
376
+ # App-scoped URL placeholders (filled at resolve / deploy).
377
+ - keyPattern: '^[a-z0-9-]+-url$'
378
+ scope: app
379
+ generator:
380
+ type: emptyString
381
+ ensureOn: [resolveApp]
382
+
383
+ # Deploy manifest maps frontDoorRouting.host templates to this secret (Azure / pipeline).
384
+ - keyPattern: '^[a-z0-9-]+-frontdoor-routing-host$'
385
+ scope: app
386
+ generator:
387
+ type: emptyString
388
+ ensureOn: [upInfra, resolveApp]
389
+ azure:
390
+ notes: Hostname template for Traefik / Front Door; filled at deploy.
391
+
392
+ - keyPattern: '^[a-z0-9-]+-vdir-public$'
393
+ scope: app
394
+ generator:
395
+ type: emptyString
396
+ ensureOn: [resolveApp]
397
+
398
+ - keyPattern: '^[a-z0-9-]+-vdir-internal$'
399
+ scope: app
400
+ generator:
401
+ type: emptyString
402
+ ensureOn: [resolveApp]
403
+
404
+ - keyPattern: '^[a-z0-9-]+-host-public$'
405
+ scope: app
406
+ generator:
407
+ type: emptyString
408
+ ensureOn: [resolveApp]
409
+
410
+ - keyPattern: '^[a-z0-9-]+-host-internal$'
411
+ scope: app
412
+ generator:
413
+ type: emptyString
414
+ ensureOn: [resolveApp]
415
+
416
+ # Remaining *KeyVault secrets — generated tokens/passwords (not database rows above).
417
+ - keyPattern: '^[a-zA-Z0-9_-]+KeyVault$'
418
+ scope: app
419
+ generator:
420
+ type: randomBytes32
421
+ ensureOn: [resolveApp]
@@ -0,0 +1,40 @@
1
+ {
2
+ "oauth2": [
3
+ { "name": "grantType", "field": "select", "label": "Grant type", "options": ["authorization_code", "client_credentials"] },
4
+ { "name": "tokenUrl", "field": "text", "label": "Token URL", "validation": { "required": true } },
5
+ { "name": "authorizationUrl", "field": "text", "label": "Authorization URL" },
6
+ { "name": "clientId", "field": "text", "label": "Client ID", "validation": { "required": true } },
7
+ { "name": "clientSecret", "field": "password", "label": "Client secret", "masked": true, "validation": { "required": true } },
8
+ { "name": "scope", "field": "text", "label": "Scope" },
9
+ { "name": "redirectUri", "field": "text", "label": "Redirect URI" },
10
+ { "name": "baseUrl", "field": "text", "label": "Base URL" }
11
+ ],
12
+ "apiKey": [
13
+ { "name": "apiKey", "field": "password", "label": "API key", "masked": true, "validation": { "required": true } },
14
+ { "name": "headerName", "field": "text", "label": "Header name", "placeholder": "Authorization" },
15
+ { "name": "prefix", "field": "text", "label": "Prefix", "placeholder": "Bearer" },
16
+ { "name": "baseUrl", "field": "text", "label": "Base URL" }
17
+ ],
18
+ "basicAuth": [
19
+ { "name": "username", "field": "text", "label": "Username", "validation": { "required": true } },
20
+ { "name": "password", "field": "password", "label": "Password", "masked": true, "validation": { "required": true } },
21
+ { "name": "baseUrl", "field": "text", "label": "Base URL" }
22
+ ],
23
+ "queryParam": [
24
+ { "name": "paramName", "field": "text", "label": "Parameter name", "placeholder": "api_key", "validation": { "required": true } },
25
+ { "name": "paramValue", "field": "password", "label": "Parameter value", "masked": true, "validation": { "required": true } },
26
+ { "name": "baseUrl", "field": "text", "label": "Base URL" }
27
+ ],
28
+ "oidc": [
29
+ { "name": "openIdConfigUrl", "field": "text", "label": "OpenID config URL", "validation": { "required": true } },
30
+ { "name": "clientId", "field": "text", "label": "Client ID (audience)", "validation": { "required": true } },
31
+ { "name": "expectedIssuer", "field": "text", "label": "Expected issuer" }
32
+ ],
33
+ "hmac": [
34
+ { "name": "signingSecret", "field": "password", "label": "Signing secret", "masked": true, "validation": { "required": true } },
35
+ { "name": "algorithm", "field": "text", "label": "Algorithm", "placeholder": "sha256" },
36
+ { "name": "signatureHeader", "field": "text", "label": "Signature header", "placeholder": "X-Slack-Signature" },
37
+ { "name": "timestampHeader", "field": "text", "label": "Timestamp header", "placeholder": "X-Slack-Request-Timestamp" },
38
+ { "name": "signaturePrefix", "field": "text", "label": "Signature prefix", "placeholder": "v0=" }
39
+ ]
40
+ }
@@ -0,0 +1,226 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "aifabrix://schema/type/document-storage.json",
4
+ "title": "Document Storage Configuration Schema",
5
+ "description": "Internal schema for validating document storage configurations in ExternalDataSource. Enforces CIP-only binary operations, simplifying binary retrieval configuration.",
6
+ "metadata": {
7
+ "key": "document-storage-schema",
8
+ "name": "Document Storage Configuration Schema",
9
+ "description": "JSON schema for validating document storage configurations",
10
+ "version": "1.3.0",
11
+ "type": "schema",
12
+ "category": "document-storage",
13
+ "author": "AI Fabrix Team",
14
+ "createdAt": "2026-01-02T00:00:00Z",
15
+ "updatedAt": "2026-04-22T00:00:00Z",
16
+ "compatibility": {
17
+ "minVersion": "1.0.0",
18
+ "maxVersion": "2.0.0",
19
+ "deprecated": false
20
+ },
21
+ "tags": [
22
+ "schema",
23
+ "document-storage",
24
+ "dataplane",
25
+ "validation"
26
+ ],
27
+ "dependencies": [],
28
+ "changelog": [
29
+ {
30
+ "version": "1.0.0",
31
+ "date": "2026-01-02T00:00:00Z",
32
+ "changes": [
33
+ "Initial schema for document storage validation",
34
+ "Simplified binary operation to CIP-only approach",
35
+ "Removed HTTP/OpenAPI fallback mode",
36
+ "Standardized on CIP operation reference (default: 'get')"
37
+ ],
38
+ "breaking": false
39
+ },
40
+ {
41
+ "version": "1.1.0",
42
+ "date": "2026-03-22T00:00:00Z",
43
+ "changes": [
44
+ "Aligned notifications to strict flat shape (email/slack/teams/webhookUrl)",
45
+ "Removed processing.ingestAfterSync duplicate (top-level ingestAfterSync remains canonical)",
46
+ "Removed aiValidation llmProvider/llmModel from schema contract",
47
+ "Removed unused documentStorage.credentialId from type schema"
48
+ ],
49
+ "breaking": true
50
+ },
51
+ {
52
+ "version": "1.1.1",
53
+ "date": "2026-03-31T00:00:00Z",
54
+ "changes": [
55
+ "Removed duplicate processing.aiPrompt definition and enforced string-only prompt contract"
56
+ ],
57
+ "breaking": false
58
+ },
59
+ {
60
+ "version": "1.2.0",
61
+ "date": "2026-03-31T00:00:00Z",
62
+ "changes": [
63
+ "Added optional securityLevel classification field (public/internal/restricted/confidential)"
64
+ ],
65
+ "breaking": false
66
+ },
67
+ {
68
+ "version": "1.3.0",
69
+ "date": "2026-04-22T00:00:00Z",
70
+ "changes": [
71
+ "Added optional parameterLookupCoalesceNestedItemScope (boolean, default true) for manifest-controlled binary parameter lookup enrichment"
72
+ ],
73
+ "breaking": false
74
+ }
75
+ ]
76
+ },
77
+ "type": "object",
78
+ "required": ["enabled"],
79
+ "properties": {
80
+ "enabled": {
81
+ "type": "boolean",
82
+ "default": true,
83
+ "description": "Whether document storage is enabled"
84
+ },
85
+ "securityLevel": {
86
+ "type": "string",
87
+ "enum": ["public", "internal", "restricted", "confidential"],
88
+ "description": "Document sensitivity classification applied at datasource level"
89
+ },
90
+ "twoPhaseSync": {
91
+ "type": "boolean",
92
+ "default": true,
93
+ "description": "Enable two-phase sync: metadata validation first, then binary retrieval via CIP. When true, validates metadata before fetching binaries. When false, fetches binaries directly without validation phase."
94
+ },
95
+ "ingestAfterSync": {
96
+ "type": "boolean",
97
+ "default": false,
98
+ "description": "When true, chunk and embed each document after store during sync so vector search returns hits immediately. When false, ingestion runs later (e.g. Celery task or on approval). Set true for E2E tests that validate vector step."
99
+ },
100
+ "binaryOperationRef": {
101
+ "type": "string",
102
+ "default": "get",
103
+ "description": "CIP operation name for binary document retrieval. Must exist in execution.cip.operations. Defaults to 'get' operation."
104
+ },
105
+ "responseType": {
106
+ "type": "string",
107
+ "enum": ["binary", "base64", "json"],
108
+ "default": "binary",
109
+ "description": "Expected response type from CIP operation. 'binary' for raw binary data, 'base64' for base64-encoded data, 'json' for JSON response with binary field."
110
+ },
111
+ "binaryField": {
112
+ "type": "string",
113
+ "description": "Field name containing binary data if responseType is 'json' or 'base64'. Required when responseType is not 'binary'."
114
+ },
115
+ "parameterMapping": {
116
+ "type": "object",
117
+ "additionalProperties": {
118
+ "type": "string"
119
+ },
120
+ "description": "Map metadata record fields to CIP operation parameters. Example: {\"fileId\": \"{{key}}\", \"downloadUrl\": \"{{metadata.downloadUrl}}\"}"
121
+ },
122
+ "pathSuffix": {
123
+ "type": "string",
124
+ "description": "Optional suffix appended to CIP fetch path for binary retrieval (for example '/content')."
125
+ },
126
+ "dropQueryParameters": {
127
+ "type": "boolean",
128
+ "default": false,
129
+ "description": "If true, removes fetch.query when applying binary retrieval path override."
130
+ },
131
+ "parameterLookupCoalesceNestedItemScope": {
132
+ "type": "boolean",
133
+ "default": true,
134
+ "description": "When true, binary parameterMapping and HTTP path templates use a lookup view that merges metadata and coalesces storage-scope ids from a nested item parentReference when the row's parentReference omits them. Set false for strict manifest-only paths."
135
+ },
136
+ "processing": {
137
+ "type": "object",
138
+ "properties": {
139
+ "fileStoragePath": {
140
+ "type": "string",
141
+ "default": "/data/documents"
142
+ },
143
+ "aiValidation": {
144
+ "type": "object",
145
+ "description": "AI validation configuration.",
146
+ "properties": {
147
+ "enabled": {
148
+ "type": "boolean",
149
+ "default": true
150
+ },
151
+ "confidenceThreshold": {
152
+ "type": "number",
153
+ "minimum": 0.0,
154
+ "maximum": 1.0,
155
+ "default": 0.85
156
+ },
157
+ "requiredFields": {
158
+ "type": "array",
159
+ "items": {
160
+ "type": "string"
161
+ },
162
+ "uniqueItems": true
163
+ }
164
+ },
165
+ "additionalProperties": false
166
+ },
167
+ "aiPrompt": {
168
+ "type": "string",
169
+ "description": "Approved AI prompt text stored in the manifest."
170
+ },
171
+ "spacyEnrichment": {
172
+ "type": "object",
173
+ "description": "spaCy enrichment configuration.",
174
+ "properties": {
175
+ "enabled": {
176
+ "type": "boolean",
177
+ "default": true
178
+ },
179
+ "extractEntities": {
180
+ "type": "boolean",
181
+ "default": true
182
+ },
183
+ "extractKeywords": {
184
+ "type": "boolean",
185
+ "default": true
186
+ },
187
+ "extractSentences": {
188
+ "type": "boolean",
189
+ "default": false
190
+ },
191
+ "language": {
192
+ "type": "string",
193
+ "minLength": 2,
194
+ "maxLength": 16,
195
+ "default": "en"
196
+ }
197
+ },
198
+ "additionalProperties": false
199
+ },
200
+ "notifications": {
201
+ "type": "object",
202
+ "description": "Validation notification configuration.",
203
+ "properties": {
204
+ "email": {
205
+ "type": "boolean"
206
+ },
207
+ "slack": {
208
+ "type": "boolean"
209
+ },
210
+ "teams": {
211
+ "type": "boolean"
212
+ },
213
+ "webhookUrl": {
214
+ "type": "string",
215
+ "format": "uri"
216
+ }
217
+ },
218
+ "additionalProperties": false
219
+ }
220
+ },
221
+ "additionalProperties": false
222
+ }
223
+ },
224
+ "additionalProperties": false
225
+ }
226
+