@aifabrix/builder 2.52.0 → 2.53.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/datasources-extended.api.js +8 -8
- package/lib/api/keycloak.api.js +92 -0
- package/lib/api/token-providers.api.js +77 -0
- package/lib/api/types/keycloak.types.js +23 -0
- package/lib/api/types/token-providers.types.js +65 -0
- package/lib/app/deploy-config.js +3 -2
- package/lib/app/down.js +16 -1
- package/lib/channels/add-channel.js +134 -57
- package/lib/channels/approval-guides/chatgpt.js +1 -1
- package/lib/channels/approval-guides/index.js +3 -0
- package/lib/channels/approval-guides/microsoft-copilot.js +27 -14
- package/lib/channels/channel-add-ensure.js +128 -0
- package/lib/channels/channel-add-existing.js +72 -0
- package/lib/channels/channel-artifact-generator.js +11 -1
- package/lib/channels/channel-branding.js +94 -0
- package/lib/channels/channel-credential.js +8 -0
- package/lib/channels/channel-discovery.js +330 -0
- package/lib/channels/channel-external-system.js +1 -1
- package/lib/channels/channel-runtime-resolver.js +107 -14
- package/lib/channels/channel-status-display.js +36 -3
- package/lib/channels/microsoft-copilot-channel-add.js +138 -0
- package/lib/channels/microsoft-copilot-entra-sso-form.js +251 -0
- package/lib/channels/microsoft-copilot-entra-sso.js +285 -0
- package/lib/channels/microsoft-copilot-icons.js +74 -0
- package/lib/channels/microsoft-copilot-limits.js +103 -0
- package/lib/channels/microsoft-copilot-package.js +178 -52
- package/lib/channels/microsoft-copilot-validate.js +227 -0
- package/lib/cli/attach-default-help-examples.js +102 -0
- package/lib/cli/index.js +4 -0
- package/lib/cli/infra-guided.js +13 -6
- package/lib/cli/setup-credential-deployment.js +7 -5
- package/lib/cli/setup-infra.js +31 -4
- package/lib/cli/setup-utility-validate.js +1 -0
- package/lib/commands/channel-add-setup.js +28 -9
- package/lib/commands/channel.js +14 -10
- package/lib/commands/credential-push.js +37 -5
- package/lib/commands/integration-definition.js +158 -0
- package/lib/commands/package-score.js +72 -0
- package/lib/commands/repair-auth-apply.js +19 -5
- package/lib/commands/repair-datasource-sync-operations.js +4 -1
- package/lib/commands/role-assistant-test-output.js +200 -0
- package/lib/commands/role-assistant.js +163 -166
- package/lib/datasource/capability/capability-resolve.js +15 -5
- package/lib/datasource/capability/copy-operations.js +14 -4
- package/lib/deployment/deployer-poll-run.js +2 -2
- package/lib/deployment/deployer.js +1 -1
- package/lib/deployment/environment.js +2 -2
- package/lib/external-system/deploy.js +11 -21
- package/lib/infrastructure/index.js +19 -4
- package/lib/integration-definition/apply.js +476 -0
- package/lib/integration-definition/canonical-json.js +51 -0
- package/lib/integration-definition/emit-suite-bid.js +94 -0
- package/lib/integration-definition/enrich-crm-field-mappings.js +240 -0
- package/lib/integration-definition/enrich-openapi-operations.js +433 -0
- package/lib/integration-definition/from-discovery.js +339 -0
- package/lib/integration-definition/hash.js +37 -0
- package/lib/integration-definition/index.js +37 -0
- package/lib/integration-definition/resource-type-catalog.js +59 -0
- package/lib/integration-definition/system-kind-enum.js +40 -0
- package/lib/integration-definition/validate.js +148 -0
- package/lib/lab/package-parity-score.js +417 -0
- package/lib/programmatic/builder-api-request.js +5 -1
- package/lib/programmatic/builder-help-governance.js +3 -2
- package/lib/programmatic/capability-registry.js +20 -0
- package/lib/programmatic/help-content/channel-onboarding.md +35 -0
- package/lib/programmatic/help-content/cip-overview.md +27 -0
- package/lib/programmatic/help-content/connected-system-ui.md +70 -0
- package/lib/programmatic/help-content/dimensions-guide.md +23 -0
- package/lib/programmatic/help-content/enterprise-sync-fabrix.md +123 -0
- package/lib/programmatic/help-content/overview.md +25 -0
- package/lib/programmatic/help-content/subscription-guide.md +27 -0
- package/lib/programmatic/help-content/workflow.md +50 -0
- package/lib/programmatic/openapi-component-schemas.js +7 -1
- package/lib/programmatic/openapi-descriptions.js +46 -0
- package/lib/programmatic/openapi-envelope-examples.js +280 -0
- package/lib/programmatic/openapi-operation-bindings.js +50 -0
- package/lib/programmatic/openapi-request-schemas.js +40 -0
- package/lib/programmatic/openapi-result-schemas-overflow.js +101 -0
- package/lib/programmatic/openapi-result-schemas.js +76 -99
- package/lib/programmatic/openapi-schema-descriptions-core.js +25 -4
- package/lib/programmatic/openapi-schema-descriptions-help.js +1 -1
- package/lib/programmatic/openapi-schema-descriptions-operations.js +43 -0
- package/lib/programmatic/openapi-schema-helpers.js +9 -9
- package/lib/programmatic/openapi-spec.js +11 -1
- package/lib/programmatic/orchestration-openapi-meta.js +10 -0
- package/lib/programmatic/persist-supplied-openapi.js +180 -0
- package/lib/programmatic/route-handler-map.js +35 -1
- package/lib/programmatic/run-channel-package.js +236 -0
- package/lib/programmatic/run-integration-definition.js +77 -0
- package/lib/role-assistant/evidence-sync.js +55 -7
- package/lib/role-assistant/knowledge-sync-logging.js +58 -0
- package/lib/role-assistant/knowledge-sync.js +88 -93
- package/lib/role-assistant/test-cases-bid.js +155 -0
- package/lib/role-assistant/test-cases-evaluate.js +9 -1
- package/lib/role-assistant/test-cases-honesty.js +24 -10
- package/lib/role-assistant/test-cases.js +28 -0
- package/lib/role-assistant/test-runner-attachments.js +118 -0
- package/lib/role-assistant/test-runner-bid-apply.js +201 -0
- package/lib/role-assistant/test-runner-bid-document.js +278 -0
- package/lib/role-assistant/test-runner-start-payload.js +96 -0
- package/lib/role-assistant/test-runner-workhub-answers.js +249 -20
- package/lib/role-assistant/test-runner-workhub-helpers.js +100 -0
- package/lib/role-assistant/test-runner-workhub-soft.js +86 -0
- package/lib/role-assistant/test-runner-workhub.js +152 -107
- package/lib/role-assistant/test-runner.js +5 -63
- package/lib/role-assistant/test-suite.js +112 -0
- package/lib/schema/application-schema.json +56 -6
- package/lib/schema/external-datasource.schema.json +103 -17
- package/lib/schema/external-system.schema.json +54 -3
- package/lib/schema/integration-definition.schema.json +195 -0
- package/lib/utils/authentication-shape.js +6 -0
- package/lib/utils/compose-generator.js +10 -1
- package/lib/utils/compose-traefik-extra-routes.js +107 -0
- package/lib/utils/docker-build.js +2 -2
- package/lib/utils/help-builder.js +3 -1
- package/lib/utils/promote-dev-docker-image.js +102 -18
- package/lib/utils/transient-developer-id.js +28 -0
- package/package.json +14 -16
- package/templates/README.md +12 -1
- package/templates/applications/dataplane/application.yaml +10 -2
- package/templates/applications/dataplane/env.template +7 -6
- package/templates/applications/miso-controller/application.yaml +23 -8
- package/templates/applications/miso-controller/env.template +8 -2
- package/templates/applications/miso-controller/rbac.yaml +1 -0
- package/templates/channels/README.md +11 -1
- package/templates/channels/brand/color-192.png +0 -0
- package/templates/channels/brand/dark/128.png +0 -0
- package/templates/channels/brand/dark/192.png +0 -0
- package/templates/channels/brand/dark/256.png +0 -0
- package/templates/channels/brand/dark/32.png +0 -0
- package/templates/channels/brand/dark/512.png +0 -0
- package/templates/channels/brand/dark/64.png +0 -0
- package/templates/channels/brand/light/128.png +0 -0
- package/templates/channels/brand/light/192.png +0 -0
- package/templates/channels/brand/light/256.png +0 -0
- package/templates/channels/brand/light/32.png +0 -0
- package/templates/channels/brand/light/512.png +0 -0
- package/templates/channels/brand/light/64.png +0 -0
- package/templates/channels/brand/mono-white/128.png +0 -0
- package/templates/channels/brand/mono-white/192.png +0 -0
- package/templates/channels/brand/mono-white/256.png +0 -0
- package/templates/channels/brand/mono-white/32.png +0 -0
- package/templates/channels/brand/mono-white/512.png +0 -0
- package/templates/channels/brand/mono-white/64.png +0 -0
- package/templates/channels/brand/outline-32.png +0 -0
- package/templates/channels/chatgpt/install.template.md.hbs +6 -4
- package/templates/channels/chatgpt/integration/README.md +4 -5
- package/templates/channels/chatgpt/integration/chatgpt-system.json +1 -16
- package/templates/channels/microsoft-copilot/ai-plugin.template.json.hbs +14 -16
- package/templates/channels/microsoft-copilot/declarative-agent.template.json.hbs +5 -3
- package/templates/channels/microsoft-copilot/entra-sso-registration.template.md.hbs +30 -0
- package/templates/channels/microsoft-copilot/fi-fi.template.json.hbs +7 -0
- package/templates/channels/microsoft-copilot/install.template.md.hbs +93 -22
- package/templates/channels/microsoft-copilot/integration/README.md +2 -3
- package/templates/channels/microsoft-copilot/integration/microsoft-copilot-system.json +1 -22
- package/templates/channels/microsoft-copilot/manifest.template.json.hbs +34 -19
- package/templates/channels/microsoft-copilot/oauth-plugin-vault-required.template.md.hbs +15 -0
- package/templates/channels/slack/integration/README.md +2 -4
- package/templates/channels/teams-bot/install.template.md.hbs +4 -0
- package/templates/channels/teams-bot/integration/README.md +3 -5
- package/templates/channels/web-embed/integration/web-embed-system.json +1 -16
- package/templates/python/docker-compose.hbs +36 -0
- package/templates/typescript/docker-compose.hbs +36 -0
- package/.cursor/plans/Done/157.1-security-quality-violations-by-type.csv +0 -374
- package/.cursor/process/README.md +0 -9
- package/.cursor/rules/anchor-docs.mdc +0 -15
- package/.cursor/rules/assistant-driven-integration-build.mdc +0 -40
- package/.cursor/rules/cli-layout.mdc +0 -81
- package/.cursor/rules/cli-product-neutral.mdc +0 -43
- package/.cursor/rules/deploy-rules/docker-image-ip-policy.mdc +0 -49
- package/.cursor/rules/docs-rules.mdc +0 -32
- package/.cursor/rules/plan-rules/application-lifecycle.mdc +0 -30
- package/.cursor/rules/plan-rules/plan-frontmatter.mdc +0 -35
- package/.cursor/rules/plan-rules/plan-lifecycle.mdc +0 -31
- package/.cursor/rules/plan-rules/plan-validation-gate.mdc +0 -34
- package/.cursor/rules/project-rules.mdc +0 -913
- package/.cursor/skills/README.md +0 -15
- package/.dockerignore +0 -52
- package/.eslintignore +0 -22
- package/.markdownlint.json +0 -14
- package/anchor-docs/README.md +0 -10
- package/anchor-docs/_TEMPLATE +0 -24
- package/babel.config.js +0 -6
- package/bin/builder-api-cleanup.js +0 -26
- package/bin/builder-api-nest.js +0 -10
- package/bin/builder-api-spike.js +0 -19
- package/enterprise-knowledge/README.md +0 -50
- package/enterprise-knowledge/enterprise-integration-lifecycle/README.md +0 -22
- package/enterprise-knowledge/enterprise-integration-lifecycle/application.json +0 -15
- package/enterprise-knowledge/enterprise-integration-lifecycle/deploy.js +0 -69
- package/enterprise-knowledge/enterprise-integration-lifecycle/enterprise-integration-lifecycle-deploy.json +0 -52
- package/enterprise-knowledge/enterprise-integration-lifecycle/enterprise-integration-lifecycle-system.json +0 -29
- package/enterprise-knowledge/enterprise-integration-lifecycle/env.template +0 -2
- package/integration/README.md +0 -81
- package/integration/github/README.md +0 -53
- package/integration/github/application.json +0 -21
- package/integration/github/deploy.js +0 -72
- package/integration/github/env.template +0 -11
- package/integration/github/github-datasource-issue-comments.json +0 -239
- package/integration/github/github-datasource-issues.json +0 -399
- package/integration/github/github-datasource-repository.json +0 -354
- package/integration/github/github-deploy.json +0 -1202
- package/integration/github/github-system.json +0 -82
- package/integration/hubspot-test/README.md +0 -159
- package/integration/hubspot-test/application.json +0 -54
- package/integration/hubspot-test/companies.json +0 -2048
- package/integration/hubspot-test/create-hubspot.js +0 -523
- package/integration/hubspot-test/env.template +0 -4
- package/integration/hubspot-test/hubspot-test-datasource-company.json +0 -138
- package/integration/hubspot-test/hubspot-test-datasource-contact.json +0 -146
- package/integration/hubspot-test/hubspot-test-datasource-deal.json +0 -146
- package/integration/hubspot-test/hubspot-test-datasource-users.json +0 -76
- package/integration/hubspot-test/hubspot-test-deploy.json +0 -2160
- package/integration/hubspot-test/hubspot-test-system.json +0 -74
- package/integration/hubspot-test/rbac.json +0 -166
- package/integration/hubspot-test/test-artifacts/wizard-hubspot-credential-real.yaml +0 -20
- package/integration/hubspot-test/test-artifacts/wizard-hubspot-env-vars.yaml +0 -9
- package/integration/hubspot-test/test-artifacts/wizard-invalid-add-datasource.yaml +0 -5
- package/integration/hubspot-test/test-artifacts/wizard-invalid-app-name.yaml +0 -5
- package/integration/hubspot-test/test-artifacts/wizard-invalid-credential-create.yaml +0 -7
- package/integration/hubspot-test/test-artifacts/wizard-invalid-credential-select.yaml +0 -7
- package/integration/hubspot-test/test-artifacts/wizard-invalid-known-platform.yaml +0 -4
- package/integration/hubspot-test/test-artifacts/wizard-invalid-missing-app.yaml +0 -4
- package/integration/hubspot-test/test-artifacts/wizard-invalid-missing-source.yaml +0 -2
- package/integration/hubspot-test/test-artifacts/wizard-invalid-mode.yaml +0 -5
- package/integration/hubspot-test/test-artifacts/wizard-invalid-openapi-file.yaml +0 -5
- package/integration/hubspot-test/test-artifacts/wizard-invalid-openapi-url.yaml +0 -4
- package/integration/hubspot-test/test-artifacts/wizard-invalid-source.yaml +0 -4
- package/integration/hubspot-test/test-artifacts/wizard-valid-for-dimension-array-test.yaml +0 -5
- package/integration/hubspot-test/test-artifacts/wizard-valid-for-dimension-key-test.yaml +0 -5
- package/integration/hubspot-test/test-artifacts/wizard-valid-for-dimension-path-test.yaml +0 -5
- package/integration/hubspot-test/test-artifacts/wizard-valid-for-dimension-test.yaml +0 -5
- package/integration/hubspot-test/test-artifacts/wizard-valid-for-rbac-test.yaml +0 -5
- package/integration/hubspot-test/test-artifacts/wizard-valid-for-rbac-yaml-test.yaml +0 -5
- package/integration/hubspot-test/test-dataplane-down-helpers.js +0 -249
- package/integration/hubspot-test/test-dataplane-down-tests.js +0 -386
- package/integration/hubspot-test/test-dataplane-down.js +0 -209
- package/integration/hubspot-test/test.js +0 -1588
- package/integration/hubspot-test/wizard-hubspot-e2e.yaml +0 -16
- package/integration/hubspot-test/wizard-hubspot-platform.yaml +0 -8
- package/integration/hubspot-test/wizard-hubspot-test-headless.yaml +0 -23
- package/integration/roundtrip-test-local/README.md +0 -143
- package/integration/roundtrip-test-local/application.yaml +0 -13
- package/integration/roundtrip-test-local/env.template +0 -15
- package/integration/roundtrip-test-local/roundtrip-test-local-datasource-roundtrip-test-company.yaml +0 -14
- package/integration/roundtrip-test-local/roundtrip-test-local-deploy.json +0 -61
- package/integration/roundtrip-test-local/roundtrip-test-local-system.yaml +0 -25
- package/integration/roundtrip-test-local2/README.md +0 -143
- package/integration/roundtrip-test-local2/application.yaml +0 -13
- package/integration/roundtrip-test-local2/env.template +0 -15
- package/integration/roundtrip-test-local2/roundtrip-test-local2-datasource-company.yaml +0 -31
- package/integration/roundtrip-test-local2/roundtrip-test-local2-deploy.json +0 -86
- package/integration/roundtrip-test-local2/roundtrip-test-local2-system.yaml +0 -25
- package/integration/test/wizard.yaml +0 -8
- package/jest.config.coverage.js +0 -37
- package/jest.config.default.js +0 -11
- package/jest.config.integration.fixtures.js +0 -22
- package/jest.config.integration.js +0 -33
- package/jest.config.isolated.js +0 -11
- package/jest.config.manual.js +0 -30
- package/jest.global-live-fabrix-hooks.js +0 -36
- package/jest.isolated-projects.js +0 -260
- package/jest.projects.js +0 -76
- package/packages/builder-api/README.md +0 -120
- package/packages/builder-api/package.json +0 -30
- package/packages/builder-api/src/app.module.ts +0 -7
- package/packages/builder-api/src/auth/auth.module.ts +0 -5
- package/packages/builder-api/src/external-system/external-system.module.ts +0 -5
- package/packages/builder-api/src/main.ts +0 -16
- package/packages/builder-api/tsconfig.json +0 -15
- package/scripts/check-builder-api-architecture-grep.js +0 -79
- package/scripts/check-datasource-test-run-schema-sync.js +0 -34
- package/scripts/ci-fix.sh +0 -19
- package/scripts/ci-simulate.sh +0 -19
- package/scripts/diagnose-cli.js +0 -150
- package/scripts/docker_image_content_gate.js +0 -47
- package/scripts/docker_image_content_gate.sh +0 -5
- package/scripts/export-builder-api-evidence.js +0 -262
- package/scripts/install-local.js +0 -490
- package/scripts/lib/builder-api-docker-staging-copy.js +0 -60
- package/scripts/lib/builder-api-docker-staging-core.js +0 -183
- package/scripts/lib/docker-image-content-gate-core.js +0 -166
- package/scripts/lib/plan-actor.js +0 -109
- package/scripts/lib/plan-config.js +0 -20
- package/scripts/lib/plan-gates.js +0 -154
- package/scripts/lib/plan-meta.js +0 -104
- package/scripts/lib/plan-parse.js +0 -162
- package/scripts/lib/plan-prevalidate-gates.js +0 -337
- package/scripts/lib/plan-run-core.js +0 -125
- package/scripts/lib/plan-run-report.js +0 -119
- package/scripts/plan-approve.js +0 -24
- package/scripts/plan-archive.js +0 -49
- package/scripts/plan-run.js +0 -13
- package/scripts/plan-set-actor.js +0 -21
- package/scripts/plan-validate.js +0 -80
- package/scripts/pnpm/af.mjs +0 -110
- package/scripts/pnpm/check-quiet.mjs +0 -32
- package/scripts/pnpm/dev-install.mjs +0 -29
- package/scripts/pnpm/dev-reload.mjs +0 -18
- package/scripts/pnpm/help.mjs +0 -55
- package/scripts/pnpm/lib/dev-reload-core.mjs +0 -189
- package/scripts/pnpm/lib/dev-reload-log-capture.mjs +0 -67
- package/scripts/pnpm/lib/dev-reload-log-utils.mjs +0 -32
- package/scripts/pnpm/lib/resolve-aifabrix-bin.mjs +0 -124
- package/scripts/pnpm/lib/resolve-app-url.mjs +0 -183
- package/scripts/pnpm/lib/spinner.mjs +0 -42
- package/scripts/pnpm-global-remove.js +0 -48
- package/scripts/stage_builder_api_for_docker.js +0 -65
- package/scripts/sync-builder-api-template.js +0 -44
- package/scripts/test-dataplane-bootstrap.js +0 -331
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Role Assistant suite discovery for multi-case CLI runs.
|
|
3
|
+
* @fileoverview Discover YAML cases under tests/ra-* / package tests/
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
'use strict';
|
|
7
|
+
|
|
8
|
+
const path = require('path');
|
|
9
|
+
const fs = require('../internal/fs-real-sync');
|
|
10
|
+
const { bareRoleKey, roleAssistantSystemKey } = require('../utils/role-assistant-paths');
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Candidate case roots (first existing wins).
|
|
14
|
+
* 1. tests/<ra-key>/<role-key>/
|
|
15
|
+
* 2. tests/role-assistant/<ra-key>/ (legacy)
|
|
16
|
+
* 3. role-assistant/<ra-key>/tests/
|
|
17
|
+
* @param {string} roleKey
|
|
18
|
+
* @param {string} cwd
|
|
19
|
+
* @returns {string[]}
|
|
20
|
+
*/
|
|
21
|
+
function listCasesRootCandidates(roleKey, cwd) {
|
|
22
|
+
const bare = bareRoleKey(roleKey);
|
|
23
|
+
const raKey = roleAssistantSystemKey(bare);
|
|
24
|
+
return [
|
|
25
|
+
path.join(cwd, 'tests', raKey, bare),
|
|
26
|
+
path.join(cwd, 'tests', 'role-assistant', raKey),
|
|
27
|
+
path.join(cwd, 'role-assistant', raKey, 'tests')
|
|
28
|
+
];
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Resolve cases root for a role.
|
|
33
|
+
* @param {string} roleKey
|
|
34
|
+
* @param {{ casesRoot?: string, cwd?: string }} [options]
|
|
35
|
+
* @returns {string}
|
|
36
|
+
*/
|
|
37
|
+
function resolveCasesRoot(roleKey, options = {}) {
|
|
38
|
+
if (options.casesRoot) {
|
|
39
|
+
return path.resolve(String(options.casesRoot));
|
|
40
|
+
}
|
|
41
|
+
const cwd = options.cwd || process.cwd();
|
|
42
|
+
const candidates = listCasesRootCandidates(roleKey, cwd);
|
|
43
|
+
for (const candidate of candidates) {
|
|
44
|
+
if (fs.existsSync(candidate)) {
|
|
45
|
+
return candidate;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
// Prefer package path in errors — primary authoring location when repo-root tests/ is absent.
|
|
49
|
+
return candidates[candidates.length - 1];
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* @param {string} casesRoot
|
|
54
|
+
* @param {{ suite?: string }} [options]
|
|
55
|
+
* @returns {Array<{ suite: string, file: string, absPath: string, caseIdHint: string }>}
|
|
56
|
+
*/
|
|
57
|
+
function discoverSuiteCaseFiles(casesRoot, options = {}) {
|
|
58
|
+
if (!fs.existsSync(casesRoot)) {
|
|
59
|
+
return [];
|
|
60
|
+
}
|
|
61
|
+
const suiteFilter = options.suite ? String(options.suite).trim() : '';
|
|
62
|
+
const rows = [];
|
|
63
|
+
for (const ent of fs.readdirSync(casesRoot, { withFileTypes: true })) {
|
|
64
|
+
if (!ent.isDirectory() || String(ent.name).startsWith('.')) {
|
|
65
|
+
continue;
|
|
66
|
+
}
|
|
67
|
+
if (suiteFilter && ent.name !== suiteFilter) {
|
|
68
|
+
continue;
|
|
69
|
+
}
|
|
70
|
+
const suitePath = path.join(casesRoot, ent.name);
|
|
71
|
+
for (const fileEnt of fs.readdirSync(suitePath, { withFileTypes: true })) {
|
|
72
|
+
const name = fileEnt.name;
|
|
73
|
+
if (!fileEnt.isFile() || !/\.(ya?ml)$/i.test(name)) {
|
|
74
|
+
continue;
|
|
75
|
+
}
|
|
76
|
+
const absPath = path.join(suitePath, name);
|
|
77
|
+
rows.push({
|
|
78
|
+
suite: ent.name,
|
|
79
|
+
file: name,
|
|
80
|
+
absPath,
|
|
81
|
+
caseIdHint: path.basename(name, path.extname(name))
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
return rows.sort((a, b) => a.absPath.localeCompare(b.absPath));
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Filter discovered rows by --case id or basename.
|
|
90
|
+
* @param {Array<{ absPath: string, caseIdHint: string, file: string }>} rows
|
|
91
|
+
* @param {string} caseSel
|
|
92
|
+
* @returns {Array}
|
|
93
|
+
*/
|
|
94
|
+
function filterDiscoveredCases(rows, caseSel) {
|
|
95
|
+
const sel = String(caseSel || '').trim();
|
|
96
|
+
if (!sel) {
|
|
97
|
+
return rows;
|
|
98
|
+
}
|
|
99
|
+
return rows.filter((row) => {
|
|
100
|
+
if (row.absPath === path.resolve(sel) || row.file === sel) {
|
|
101
|
+
return true;
|
|
102
|
+
}
|
|
103
|
+
return row.caseIdHint === sel || row.caseIdHint.endsWith(`-${sel}`) || sel === row.caseIdHint;
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
module.exports = {
|
|
108
|
+
listCasesRootCandidates,
|
|
109
|
+
resolveCasesRoot,
|
|
110
|
+
discoverSuiteCaseFiles,
|
|
111
|
+
filterDiscoveredCases
|
|
112
|
+
};
|
|
@@ -7,12 +7,12 @@
|
|
|
7
7
|
"key": "application-schema",
|
|
8
8
|
"name": "Application Configuration Schema",
|
|
9
9
|
"description": "JSON schema for validating AI Fabrix application configuration files",
|
|
10
|
-
"version": "1.6.
|
|
10
|
+
"version": "1.6.2",
|
|
11
11
|
"type": "schema",
|
|
12
12
|
"category": "infrastructure",
|
|
13
13
|
"author": "AI Fabrix Team",
|
|
14
14
|
"createdAt": "2024-01-01T00:00:00Z",
|
|
15
|
-
"updatedAt": "2026-08-
|
|
15
|
+
"updatedAt": "2026-08-06T00:00:00Z",
|
|
16
16
|
"compatibility": {
|
|
17
17
|
"minVersion": "1.0.0",
|
|
18
18
|
"maxVersion": "2.0.0",
|
|
@@ -30,6 +30,14 @@
|
|
|
30
30
|
"external-datasource.schema.json"
|
|
31
31
|
],
|
|
32
32
|
"changelog": [
|
|
33
|
+
{
|
|
34
|
+
"version": "1.6.2",
|
|
35
|
+
"date": "2026-08-06T00:00:00Z",
|
|
36
|
+
"changes": [
|
|
37
|
+
"portalInput.options items may be plain strings (including empty for env-default) or {label, value} objects (matches miso-ui Configuration tab and miso-controller types)."
|
|
38
|
+
],
|
|
39
|
+
"breaking": false
|
|
40
|
+
},
|
|
33
41
|
{
|
|
34
42
|
"version": "1.6.1",
|
|
35
43
|
"date": "2026-08-03T00:00:00Z",
|
|
@@ -281,9 +289,30 @@
|
|
|
281
289
|
},
|
|
282
290
|
"options": {
|
|
283
291
|
"type": "array",
|
|
284
|
-
"description": "Options for select fields",
|
|
292
|
+
"description": "Options for select fields (plain string or {label, value}; empty string allowed for env-default)",
|
|
285
293
|
"items": {
|
|
286
|
-
"
|
|
294
|
+
"oneOf": [
|
|
295
|
+
{
|
|
296
|
+
"type": "string"
|
|
297
|
+
},
|
|
298
|
+
{
|
|
299
|
+
"type": "object",
|
|
300
|
+
"required": [
|
|
301
|
+
"label",
|
|
302
|
+
"value"
|
|
303
|
+
],
|
|
304
|
+
"properties": {
|
|
305
|
+
"label": {
|
|
306
|
+
"type": "string",
|
|
307
|
+
"minLength": 1
|
|
308
|
+
},
|
|
309
|
+
"value": {
|
|
310
|
+
"type": "string"
|
|
311
|
+
}
|
|
312
|
+
},
|
|
313
|
+
"additionalProperties": false
|
|
314
|
+
}
|
|
315
|
+
]
|
|
287
316
|
}
|
|
288
317
|
}
|
|
289
318
|
},
|
|
@@ -399,9 +428,30 @@
|
|
|
399
428
|
},
|
|
400
429
|
"options": {
|
|
401
430
|
"type": "array",
|
|
402
|
-
"description": "Options for select fields",
|
|
431
|
+
"description": "Options for select fields (plain string or {label, value}; empty string allowed for env-default)",
|
|
403
432
|
"items": {
|
|
404
|
-
"
|
|
433
|
+
"oneOf": [
|
|
434
|
+
{
|
|
435
|
+
"type": "string"
|
|
436
|
+
},
|
|
437
|
+
{
|
|
438
|
+
"type": "object",
|
|
439
|
+
"required": [
|
|
440
|
+
"label",
|
|
441
|
+
"value"
|
|
442
|
+
],
|
|
443
|
+
"properties": {
|
|
444
|
+
"label": {
|
|
445
|
+
"type": "string",
|
|
446
|
+
"minLength": 1
|
|
447
|
+
},
|
|
448
|
+
"value": {
|
|
449
|
+
"type": "string"
|
|
450
|
+
}
|
|
451
|
+
},
|
|
452
|
+
"additionalProperties": false
|
|
453
|
+
}
|
|
454
|
+
]
|
|
405
455
|
}
|
|
406
456
|
}
|
|
407
457
|
},
|
|
@@ -7,12 +7,12 @@
|
|
|
7
7
|
"key":"external-datasource-schema",
|
|
8
8
|
"name":"External Data Source Configuration Schema",
|
|
9
9
|
"description":"JSON schema for validating ExternalDataSource configuration files",
|
|
10
|
-
"version":"2.9.
|
|
10
|
+
"version":"2.9.6",
|
|
11
11
|
"type":"schema",
|
|
12
12
|
"category":"integration",
|
|
13
13
|
"author":"AI Fabrix Team",
|
|
14
14
|
"createdAt":"2024-01-01T00:00:00Z",
|
|
15
|
-
"updatedAt":"2026-
|
|
15
|
+
"updatedAt":"2026-08-07T00:00:00Z",
|
|
16
16
|
"compatibility":{
|
|
17
17
|
"minVersion":"1.0.0",
|
|
18
18
|
"maxVersion":"3.0.0",
|
|
@@ -390,6 +390,12 @@
|
|
|
390
390
|
"enum":["documentStorage","vectorStore","recordStorage","messageService","serviceContract","none"],
|
|
391
391
|
"description":"Entity type identifier. Defines storage semantics and behavior: 'documentStorage' (creates document storage service with vector-storage), 'vectorStore' (external vector storage system), 'recordStorage' (creates record-based system with metadata sync and access rights), 'messageService' (message service for notifications - Slack, Teams, Email), 'serviceContract' (normalized executable service adapter without persistence — requires metadataSchema, fieldMappings, exposed), 'none' (orchestration/composition only). Required field. Canonical values are camelCase."
|
|
392
392
|
},
|
|
393
|
+
"storageType":{
|
|
394
|
+
"type":"string",
|
|
395
|
+
"enum":["table","view"],
|
|
396
|
+
"default":"table",
|
|
397
|
+
"description":"recordStorage persistence mode. 'table' (default) is ordinary synced record storage. 'view' is calculated read-only CIP perspectives with fetch.source viewpoint SQL; not a permanent PostgreSQL VIEW object."
|
|
398
|
+
},
|
|
393
399
|
"resourceType":{
|
|
394
400
|
"type":"string",
|
|
395
401
|
"pattern":"^[a-z0-9-]+$",
|
|
@@ -1307,6 +1313,33 @@
|
|
|
1307
1313
|
]
|
|
1308
1314
|
}
|
|
1309
1315
|
},
|
|
1316
|
+
{
|
|
1317
|
+
"if":{
|
|
1318
|
+
"properties":{
|
|
1319
|
+
"storageType":{
|
|
1320
|
+
"const":"view"
|
|
1321
|
+
}
|
|
1322
|
+
},
|
|
1323
|
+
"required":[
|
|
1324
|
+
"storageType"
|
|
1325
|
+
]
|
|
1326
|
+
},
|
|
1327
|
+
"then":{
|
|
1328
|
+
"properties":{
|
|
1329
|
+
"entityType":{
|
|
1330
|
+
"const":"recordStorage"
|
|
1331
|
+
},
|
|
1332
|
+
"execution":{
|
|
1333
|
+
"type":"object",
|
|
1334
|
+
"properties":{
|
|
1335
|
+
"engine":{
|
|
1336
|
+
"const":"cip"
|
|
1337
|
+
}
|
|
1338
|
+
}
|
|
1339
|
+
}
|
|
1340
|
+
}
|
|
1341
|
+
}
|
|
1342
|
+
},
|
|
1310
1343
|
{
|
|
1311
1344
|
"if":{
|
|
1312
1345
|
"properties":{
|
|
@@ -2498,11 +2531,12 @@
|
|
|
2498
2531
|
"source":{
|
|
2499
2532
|
"type":"string",
|
|
2500
2533
|
"enum":[
|
|
2501
|
-
|
|
2534
|
+
"openapi",
|
|
2502
2535
|
"http",
|
|
2503
|
-
"datasource"
|
|
2536
|
+
"datasource",
|
|
2537
|
+
"viewpoint"
|
|
2504
2538
|
],
|
|
2505
|
-
"description":"If 'openapi', refer to openapi.operations.*. If 'http', use explicit method/path. If 'datasource', execute another datasource operation."
|
|
2539
|
+
"description":"If 'openapi', refer to openapi.operations.*. If 'http', use explicit method/path. If 'datasource', execute another datasource operation. If 'viewpoint', execute saved SQL in fetch.query against records storage (storageType view)."
|
|
2506
2540
|
},
|
|
2507
2541
|
"openapiRef":{
|
|
2508
2542
|
"type":"string",
|
|
@@ -2555,16 +2589,7 @@
|
|
|
2555
2589
|
"description":"When true, append fetch items to the pipeline accumulator for a following merge step."
|
|
2556
2590
|
},
|
|
2557
2591
|
"query":{
|
|
2558
|
-
"
|
|
2559
|
-
"description":"Static query parameters. ABAC/runtime can still override or append at runtime.",
|
|
2560
|
-
"additionalProperties":{
|
|
2561
|
-
"type":[
|
|
2562
|
-
"string",
|
|
2563
|
-
"number",
|
|
2564
|
-
"boolean",
|
|
2565
|
-
"null"
|
|
2566
|
-
]
|
|
2567
|
-
}
|
|
2592
|
+
"description":"When source is openapi/http/datasource: static query parameter object. When source is viewpoint: non-empty SQL SELECT string. ABAC/runtime may still append supported filters at execution for viewpoint."
|
|
2568
2593
|
},
|
|
2569
2594
|
"bodyTemplate":{
|
|
2570
2595
|
"description":"Optional static request body or template for POST/PUT/PATCH fetches.",
|
|
@@ -2606,7 +2631,20 @@
|
|
|
2606
2631
|
"operationId"
|
|
2607
2632
|
]
|
|
2608
2633
|
}
|
|
2609
|
-
]
|
|
2634
|
+
],
|
|
2635
|
+
"properties":{
|
|
2636
|
+
"query":{
|
|
2637
|
+
"type":"object",
|
|
2638
|
+
"additionalProperties":{
|
|
2639
|
+
"type":[
|
|
2640
|
+
"string",
|
|
2641
|
+
"number",
|
|
2642
|
+
"boolean",
|
|
2643
|
+
"null"
|
|
2644
|
+
]
|
|
2645
|
+
}
|
|
2646
|
+
}
|
|
2647
|
+
}
|
|
2610
2648
|
}
|
|
2611
2649
|
},
|
|
2612
2650
|
{
|
|
@@ -2621,7 +2659,20 @@
|
|
|
2621
2659
|
"required":[
|
|
2622
2660
|
"method",
|
|
2623
2661
|
"path"
|
|
2624
|
-
]
|
|
2662
|
+
],
|
|
2663
|
+
"properties":{
|
|
2664
|
+
"query":{
|
|
2665
|
+
"type":"object",
|
|
2666
|
+
"additionalProperties":{
|
|
2667
|
+
"type":[
|
|
2668
|
+
"string",
|
|
2669
|
+
"number",
|
|
2670
|
+
"boolean",
|
|
2671
|
+
"null"
|
|
2672
|
+
]
|
|
2673
|
+
}
|
|
2674
|
+
}
|
|
2675
|
+
}
|
|
2625
2676
|
}
|
|
2626
2677
|
},
|
|
2627
2678
|
{
|
|
@@ -2637,9 +2688,44 @@
|
|
|
2637
2688
|
"datasource":{
|
|
2638
2689
|
"type":"string",
|
|
2639
2690
|
"description":"Target child datasource key. Omitted when parent manifest composition.datasources has two or more entries; runtime resolves via selector input."
|
|
2691
|
+
},
|
|
2692
|
+
"query":{
|
|
2693
|
+
"type":"object",
|
|
2694
|
+
"additionalProperties":{
|
|
2695
|
+
"type":[
|
|
2696
|
+
"string",
|
|
2697
|
+
"number",
|
|
2698
|
+
"boolean",
|
|
2699
|
+
"null"
|
|
2700
|
+
]
|
|
2701
|
+
}
|
|
2640
2702
|
}
|
|
2641
2703
|
}
|
|
2642
2704
|
}
|
|
2705
|
+
},
|
|
2706
|
+
{
|
|
2707
|
+
"if":{
|
|
2708
|
+
"properties":{
|
|
2709
|
+
"source":{
|
|
2710
|
+
"const":"viewpoint"
|
|
2711
|
+
}
|
|
2712
|
+
},
|
|
2713
|
+
"required":[
|
|
2714
|
+
"source"
|
|
2715
|
+
]
|
|
2716
|
+
},
|
|
2717
|
+
"then":{
|
|
2718
|
+
"required":[
|
|
2719
|
+
"query"
|
|
2720
|
+
],
|
|
2721
|
+
"properties":{
|
|
2722
|
+
"query":{
|
|
2723
|
+
"type":"string",
|
|
2724
|
+
"minLength":1,
|
|
2725
|
+
"description":"Saved read-only SQL SELECT for viewpoint fetch. Parameter-free in first implementation."
|
|
2726
|
+
}
|
|
2727
|
+
}
|
|
2728
|
+
}
|
|
2643
2729
|
}
|
|
2644
2730
|
],
|
|
2645
2731
|
"additionalProperties":false
|
|
@@ -7,12 +7,12 @@
|
|
|
7
7
|
"key": "external-system-schema",
|
|
8
8
|
"name": "External System Configuration Schema",
|
|
9
9
|
"description": "JSON schema for validating ExternalSystem configuration files",
|
|
10
|
-
"version": "1.
|
|
10
|
+
"version": "1.14.0",
|
|
11
11
|
"type": "schema",
|
|
12
12
|
"category": "integration",
|
|
13
13
|
"author": "AI Fabrix Team",
|
|
14
14
|
"createdAt": "2024-01-01T00:00:00Z",
|
|
15
|
-
"updatedAt": "2026-
|
|
15
|
+
"updatedAt": "2026-08-07T00:00:00Z",
|
|
16
16
|
"compatibility": {
|
|
17
17
|
"minVersion": "1.4.0",
|
|
18
18
|
"maxVersion": "2.0.0",
|
|
@@ -27,6 +27,14 @@
|
|
|
27
27
|
],
|
|
28
28
|
"dependencies": [],
|
|
29
29
|
"changelog": [
|
|
30
|
+
{
|
|
31
|
+
"version": "1.14.0",
|
|
32
|
+
"date": "2026-08-07T00:00:00Z",
|
|
33
|
+
"changes": [
|
|
34
|
+
"Added authentication.authType system for platform-managed downstream auth (no credential/apiProvider; ownership only — not autonomous system actor)."
|
|
35
|
+
],
|
|
36
|
+
"breaking": false
|
|
37
|
+
},
|
|
30
38
|
{
|
|
31
39
|
"version": "1.13.1",
|
|
32
40
|
"date": "2026-07-22T00:00:00Z",
|
|
@@ -806,6 +814,7 @@
|
|
|
806
814
|
"enum": [
|
|
807
815
|
"credential",
|
|
808
816
|
"apiProvider",
|
|
817
|
+
"system",
|
|
809
818
|
"none"
|
|
810
819
|
]
|
|
811
820
|
},
|
|
@@ -845,6 +854,36 @@
|
|
|
845
854
|
"apiProvider"
|
|
846
855
|
]
|
|
847
856
|
}
|
|
857
|
+
},
|
|
858
|
+
{
|
|
859
|
+
"if": {
|
|
860
|
+
"properties": {
|
|
861
|
+
"authType": {
|
|
862
|
+
"const": "system"
|
|
863
|
+
}
|
|
864
|
+
}
|
|
865
|
+
},
|
|
866
|
+
"then": {
|
|
867
|
+
"properties": {
|
|
868
|
+
"credential": false,
|
|
869
|
+
"apiProvider": false
|
|
870
|
+
}
|
|
871
|
+
}
|
|
872
|
+
},
|
|
873
|
+
{
|
|
874
|
+
"if": {
|
|
875
|
+
"properties": {
|
|
876
|
+
"authType": {
|
|
877
|
+
"const": "none"
|
|
878
|
+
}
|
|
879
|
+
}
|
|
880
|
+
},
|
|
881
|
+
"then": {
|
|
882
|
+
"properties": {
|
|
883
|
+
"credential": false,
|
|
884
|
+
"apiProvider": false
|
|
885
|
+
}
|
|
886
|
+
}
|
|
848
887
|
}
|
|
849
888
|
]
|
|
850
889
|
}
|
|
@@ -1039,7 +1078,7 @@
|
|
|
1039
1078
|
"default": false
|
|
1040
1079
|
},
|
|
1041
1080
|
"authentication": {
|
|
1042
|
-
"description": "Nested authentication: authType credential (local template), apiProvider (Miso delegated), or none. Deprecated — prefer authentications[] with usage.",
|
|
1081
|
+
"description": "Nested authentication: authType credential (local template), apiProvider (Miso delegated), system (platform-managed downstream auth ownership), or none (downstream anonymous). Deprecated — prefer authentications[] with usage.",
|
|
1043
1082
|
"oneOf": [
|
|
1044
1083
|
{
|
|
1045
1084
|
"type": "object",
|
|
@@ -1073,6 +1112,18 @@
|
|
|
1073
1112
|
},
|
|
1074
1113
|
"additionalProperties": false
|
|
1075
1114
|
},
|
|
1115
|
+
{
|
|
1116
|
+
"type": "object",
|
|
1117
|
+
"required": [
|
|
1118
|
+
"authType"
|
|
1119
|
+
],
|
|
1120
|
+
"properties": {
|
|
1121
|
+
"authType": {
|
|
1122
|
+
"const": "system"
|
|
1123
|
+
}
|
|
1124
|
+
},
|
|
1125
|
+
"additionalProperties": false
|
|
1126
|
+
},
|
|
1076
1127
|
{
|
|
1077
1128
|
"type": "object",
|
|
1078
1129
|
"required": [
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "aifabrix://schema/integration-definition.schema.json",
|
|
4
|
+
"title": "AI Fabrix Builder Integration Definition (BID)",
|
|
5
|
+
"description": "Canonical BT → Builder integration definition. Schema name aifabrix.builder.integrationDefinition v1.0.0.",
|
|
6
|
+
"metadata": {
|
|
7
|
+
"key": "integration-definition-schema",
|
|
8
|
+
"name": "Builder Integration Definition",
|
|
9
|
+
"version": "1.0.0",
|
|
10
|
+
"schemaName": "aifabrix.builder.integrationDefinition",
|
|
11
|
+
"type": "schema",
|
|
12
|
+
"category": "integration",
|
|
13
|
+
"author": "AI Fabrix Team",
|
|
14
|
+
"createdAt": "2026-08-04T00:00:00Z",
|
|
15
|
+
"updatedAt": "2026-08-04T00:00:00Z"
|
|
16
|
+
},
|
|
17
|
+
"type": "object",
|
|
18
|
+
"additionalProperties": false,
|
|
19
|
+
"required": [
|
|
20
|
+
"schemaName",
|
|
21
|
+
"schemaVersion",
|
|
22
|
+
"definitionId",
|
|
23
|
+
"definitionHash",
|
|
24
|
+
"meta",
|
|
25
|
+
"packageIdentity",
|
|
26
|
+
"system",
|
|
27
|
+
"datasources",
|
|
28
|
+
"relationships",
|
|
29
|
+
"sync",
|
|
30
|
+
"capabilities",
|
|
31
|
+
"authority",
|
|
32
|
+
"acceptance"
|
|
33
|
+
],
|
|
34
|
+
"properties": {
|
|
35
|
+
"schemaName": {
|
|
36
|
+
"type": "string",
|
|
37
|
+
"const": "aifabrix.builder.integrationDefinition"
|
|
38
|
+
},
|
|
39
|
+
"schemaVersion": {
|
|
40
|
+
"type": "string",
|
|
41
|
+
"pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+$",
|
|
42
|
+
"description": "BID schema semver; implementers must accept 1.0.0."
|
|
43
|
+
},
|
|
44
|
+
"definitionId": {
|
|
45
|
+
"type": "string",
|
|
46
|
+
"format": "uuid"
|
|
47
|
+
},
|
|
48
|
+
"definitionHash": {
|
|
49
|
+
"type": "string",
|
|
50
|
+
"pattern": "^sha256:[a-f0-9]{64}$",
|
|
51
|
+
"description": "SHA-256 of canonicalized BID body excluding this field."
|
|
52
|
+
},
|
|
53
|
+
"meta": {
|
|
54
|
+
"type": "object",
|
|
55
|
+
"additionalProperties": false,
|
|
56
|
+
"required": ["suiteRunId", "producedAt", "btAssistantKey"],
|
|
57
|
+
"properties": {
|
|
58
|
+
"suiteRunId": { "type": "string", "minLength": 1 },
|
|
59
|
+
"producedAt": { "type": "string", "format": "date-time" },
|
|
60
|
+
"btAssistantKey": { "type": "string", "minLength": 1 },
|
|
61
|
+
"answerFingerprint": { "type": "string" },
|
|
62
|
+
"knowledgePackRefs": {
|
|
63
|
+
"type": "array",
|
|
64
|
+
"items": { "type": "string", "minLength": 1 }
|
|
65
|
+
},
|
|
66
|
+
"humanAnswerRefs": {
|
|
67
|
+
"type": "array",
|
|
68
|
+
"items": { "type": "string", "minLength": 1 }
|
|
69
|
+
},
|
|
70
|
+
"replaceSystemKey": { "type": "boolean", "default": false }
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
"packageIdentity": {
|
|
74
|
+
"type": "object",
|
|
75
|
+
"additionalProperties": false,
|
|
76
|
+
"required": ["systemKey", "packageVersion", "displayName"],
|
|
77
|
+
"properties": {
|
|
78
|
+
"systemKey": { "type": "string", "pattern": "^[a-z0-9-]+$", "minLength": 3 },
|
|
79
|
+
"packageVersion": { "type": "string", "pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+$" },
|
|
80
|
+
"displayName": { "type": "string", "minLength": 1 }
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
"system": {
|
|
84
|
+
"type": "object",
|
|
85
|
+
"additionalProperties": true,
|
|
86
|
+
"required": ["key", "systemKind", "connectionRefs"],
|
|
87
|
+
"properties": {
|
|
88
|
+
"key": { "type": "string", "pattern": "^[a-z0-9-]+$" },
|
|
89
|
+
"displayName": { "type": "string" },
|
|
90
|
+
"description": { "type": "string" },
|
|
91
|
+
"systemKind": { "type": "string", "minLength": 1 },
|
|
92
|
+
"type": { "type": "string", "enum": ["openapi", "mcp", "custom"] },
|
|
93
|
+
"connectionRefs": {
|
|
94
|
+
"type": "object",
|
|
95
|
+
"description": "kv:// or credential key refs only — no plaintext secrets.",
|
|
96
|
+
"additionalProperties": { "type": "string", "minLength": 1 }
|
|
97
|
+
},
|
|
98
|
+
"openapiSourceRef": { "type": "string" }
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
"datasources": {
|
|
102
|
+
"type": "array",
|
|
103
|
+
"minItems": 1,
|
|
104
|
+
"items": {
|
|
105
|
+
"type": "object",
|
|
106
|
+
"additionalProperties": true,
|
|
107
|
+
"required": ["key", "displayName", "entityType", "resourceType"],
|
|
108
|
+
"properties": {
|
|
109
|
+
"key": { "type": "string", "pattern": "^[a-z0-9-]+$", "minLength": 3 },
|
|
110
|
+
"displayName": { "type": "string", "minLength": 1 },
|
|
111
|
+
"entityType": {
|
|
112
|
+
"type": "string",
|
|
113
|
+
"enum": [
|
|
114
|
+
"documentStorage",
|
|
115
|
+
"vectorStore",
|
|
116
|
+
"recordStorage",
|
|
117
|
+
"messageService",
|
|
118
|
+
"serviceContract",
|
|
119
|
+
"none"
|
|
120
|
+
]
|
|
121
|
+
},
|
|
122
|
+
"resourceType": { "type": "string", "pattern": "^[a-z0-9-]+$" },
|
|
123
|
+
"capabilityKeys": {
|
|
124
|
+
"type": "array",
|
|
125
|
+
"items": { "type": "string", "pattern": "^[a-z][a-zA-Z0-9]*$" }
|
|
126
|
+
},
|
|
127
|
+
"propertyKeys": {
|
|
128
|
+
"type": "array",
|
|
129
|
+
"description": "Vendor property names to sync/index (CRM objects → CIP query.properties + fieldMappings).",
|
|
130
|
+
"items": { "type": "string", "pattern": "^[a-zA-Z][a-zA-Z0-9_]*$", "minLength": 1 }
|
|
131
|
+
},
|
|
132
|
+
"openapiSourceRef": { "type": "string" }
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
"relationships": {
|
|
137
|
+
"type": "array",
|
|
138
|
+
"items": {
|
|
139
|
+
"type": "object",
|
|
140
|
+
"additionalProperties": true,
|
|
141
|
+
"required": ["from", "to", "kind"],
|
|
142
|
+
"properties": {
|
|
143
|
+
"from": { "type": "string", "minLength": 1 },
|
|
144
|
+
"to": { "type": "string", "minLength": 1 },
|
|
145
|
+
"kind": { "type": "string", "minLength": 1 }
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
},
|
|
149
|
+
"sync": {
|
|
150
|
+
"type": "object",
|
|
151
|
+
"additionalProperties": true,
|
|
152
|
+
"required": ["mode"],
|
|
153
|
+
"properties": {
|
|
154
|
+
"mode": {
|
|
155
|
+
"type": "string",
|
|
156
|
+
"enum": ["incremental"],
|
|
157
|
+
"description": "Incremental sync is mandatory for CRM profile datasources."
|
|
158
|
+
},
|
|
159
|
+
"datasources": {
|
|
160
|
+
"type": "array",
|
|
161
|
+
"items": { "type": "string", "pattern": "^[a-z0-9-]+$" }
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
},
|
|
165
|
+
"capabilities": {
|
|
166
|
+
"type": "object",
|
|
167
|
+
"additionalProperties": {
|
|
168
|
+
"type": "array",
|
|
169
|
+
"items": { "type": "string", "pattern": "^[a-z][a-zA-Z0-9]*$" }
|
|
170
|
+
},
|
|
171
|
+
"description": "Map of datasource key → capability keys (must include named write for company DS)."
|
|
172
|
+
},
|
|
173
|
+
"authority": {
|
|
174
|
+
"type": "object",
|
|
175
|
+
"additionalProperties": true,
|
|
176
|
+
"required": ["writeRequiresUserAuthority"],
|
|
177
|
+
"properties": {
|
|
178
|
+
"writeRequiresUserAuthority": { "type": "boolean" },
|
|
179
|
+
"notes": { "type": "string" }
|
|
180
|
+
}
|
|
181
|
+
},
|
|
182
|
+
"acceptance": {
|
|
183
|
+
"type": "object",
|
|
184
|
+
"additionalProperties": true,
|
|
185
|
+
"required": ["gates"],
|
|
186
|
+
"properties": {
|
|
187
|
+
"gates": {
|
|
188
|
+
"type": "array",
|
|
189
|
+
"minItems": 1,
|
|
190
|
+
"items": { "type": "string", "minLength": 1 }
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
}
|