@aifabrix/builder 2.51.1 → 2.52.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.
- package/jest.isolated-projects.js +25 -2
- package/jest.projects.js +4 -1
- 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/down.js +16 -1
- package/lib/app/run-container-start.js +4 -0
- package/lib/app/run-deploy-job.js +135 -27
- package/lib/app/run-env-compose.js +32 -0
- package/lib/app/run-env-recovery.js +35 -0
- package/lib/app/run-helpers.js +5 -6
- package/lib/app/run.js +11 -3
- package/lib/channels/add-channel.js +126 -19
- package/lib/channels/approval-guides/chatgpt.js +12 -9
- package/lib/channels/approval-guides/microsoft-copilot.js +16 -12
- package/lib/channels/channel-add-ensure.js +128 -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 +103 -14
- package/lib/channels/channel-status-display.js +7 -1
- package/lib/channels/channel-targets.js +18 -1
- package/lib/channels/chatgpt-runtime-contract.js +1 -1
- package/lib/channels/microsoft-copilot-channel-add.js +138 -0
- package/lib/channels/microsoft-copilot-entra-sso-form.js +180 -0
- package/lib/channels/microsoft-copilot-entra-sso.js +264 -0
- package/lib/channels/microsoft-copilot-icons.js +74 -0
- package/lib/channels/microsoft-copilot-limits.js +84 -0
- package/lib/channels/microsoft-copilot-package.js +130 -49
- package/lib/channels/microsoft-copilot-validate.js +197 -0
- package/lib/cli/index.js +2 -0
- package/lib/cli/infra-guided-footers.js +1 -1
- package/lib/cli/infra-guided-public-url-warn.js +55 -0
- package/lib/cli/infra-guided.js +78 -62
- package/lib/cli/setup-app.help.js +4 -0
- package/lib/cli/setup-app.test-commands.js +59 -28
- package/lib/cli/setup-external-system.js +50 -12
- package/lib/cli/setup-infra.js +31 -4
- package/lib/commands/channel-add-setup.js +35 -10
- package/lib/commands/channel.js +27 -12
- package/lib/commands/deploy-gate-orchestrator.js +3 -2
- package/lib/commands/governance-verify-external.js +2 -5
- package/lib/commands/integration-definition.js +158 -0
- package/lib/commands/lifecycle-external.js +14 -7
- 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 +131 -114
- package/lib/commands/test-governance-external.js +2 -5
- package/lib/commands/up-miso.js +61 -24
- package/lib/commands/upload-data-sync-finalize.js +20 -3
- package/lib/commands/verify-governance-external.js +2 -5
- package/lib/commands/verify-operations-external.js +2 -5
- package/lib/commands/verify-operations-step-plan.js +31 -0
- package/lib/commands/verify-trust-command-action.js +2 -5
- package/lib/datasource/capability/capability-resolve.js +15 -5
- package/lib/datasource/capability/copy-operations.js +14 -4
- package/lib/datasource/datasource-identifier.js +4 -3
- package/lib/datasource/integration-context.js +3 -3
- package/lib/datasource/resolve-app.js +90 -8
- package/lib/datasource/test-e2e.js +2 -2
- package/lib/datasource/unified-validation-run-body.js +15 -1
- package/lib/datasource/unified-validation-run-resolve.js +2 -2
- package/lib/external-system/deploy-helpers.js +9 -5
- package/lib/external-system/deploy.js +2 -1
- package/lib/external-system/test-system-level.js +21 -3
- package/lib/external-system/test.js +4 -4
- package/lib/generator/builders.js +9 -15
- package/lib/infrastructure/index.js +19 -4
- package/lib/integration-definition/apply.js +478 -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 +434 -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/openapi-enrichment/hubspot-crm-companies.json +205 -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/programmatic/builder-api-request.js +5 -1
- package/lib/programmatic/builder-help-governance.js +3 -2
- package/lib/programmatic/capability-registry.js +19 -0
- package/lib/programmatic/openapi-component-schemas.js +6 -1
- package/lib/programmatic/openapi-descriptions.js +40 -0
- package/lib/programmatic/openapi-envelope-examples.js +269 -0
- package/lib/programmatic/openapi-operation-bindings.js +45 -0
- package/lib/programmatic/openapi-request-schemas.js +14 -0
- package/lib/programmatic/openapi-result-schemas-overflow.js +101 -0
- package/lib/programmatic/openapi-result-schemas.js +46 -99
- package/lib/programmatic/openapi-schema-descriptions-core.js +7 -4
- package/lib/programmatic/openapi-schema-descriptions-help.js +1 -1
- package/lib/programmatic/openapi-schema-descriptions-operations.js +24 -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/route-handler-map.js +29 -1
- package/lib/programmatic/run-channel-package.js +236 -0
- package/lib/programmatic/run-integration-definition.js +69 -0
- package/lib/role-assistant/knowledge-markdown-frontmatter.js +75 -0
- package/lib/role-assistant/knowledge-sync-logging.js +58 -0
- package/lib/role-assistant/knowledge-sync.js +104 -89
- 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-bid-apply.js +122 -0
- package/lib/role-assistant/test-runner-bid-document.js +278 -0
- package/lib/role-assistant/test-runner-workhub-answers.js +289 -46
- package/lib/role-assistant/test-runner-workhub.js +121 -25
- package/lib/role-assistant/test-suite.js +119 -0
- package/lib/schema/application-schema.json +64 -32
- package/lib/schema/external-datasource.schema.json +103 -17
- package/lib/schema/external-system.schema.json +54 -3
- package/lib/schema/infra.parameter.yaml +0 -20
- package/lib/schema/integration-definition.schema.json +195 -0
- package/lib/utils/authentication-shape.js +6 -0
- package/lib/utils/certify-external-workspace.js +40 -0
- package/lib/utils/docker-build.js +3 -3
- package/lib/utils/docker-run-ephemeral.js +77 -17
- package/lib/utils/health-check-public-warn.js +31 -13
- package/lib/utils/health-check.js +11 -1
- package/lib/utils/help-builder.js +1 -0
- package/lib/utils/paths.js +13 -15
- package/lib/utils/promote-dev-docker-image.js +97 -18
- package/lib/utils/role-assistant-paths.js +76 -14
- package/lib/utils/transient-developer-id.js +28 -0
- package/lib/utils/upload-sync-options.js +7 -4
- package/lib/validation/reserved-system-key-prefixes.js +56 -0
- package/lib/validation/validate.js +54 -19
- package/package.json +1 -1
- package/scripts/pnpm/af.mjs +24 -9
- package/scripts/pnpm/help.mjs +1 -1
- package/templates/applications/builder-api/application.yaml +3 -3
- package/templates/applications/dataplane/application.yaml +5 -5
- package/templates/applications/dataplane/env.template +8 -7
- package/templates/applications/dataplane/rbac.yaml +10 -10
- package/templates/applications/keycloak/application.yaml +2 -2
- package/templates/applications/keycloak/env.template +5 -2
- package/templates/applications/miso-controller/application.yaml +25 -11
- package/templates/applications/miso-controller/env.template +24 -5
- 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 +76 -36
- package/templates/channels/chatgpt/integration/README.md +4 -4
- package/templates/channels/chatgpt/integration/chatgpt-system.json +1 -16
- package/templates/channels/chatgpt/manifest.template.json.hbs +3 -3
- package/templates/channels/microsoft-copilot/ai-plugin.template.json.hbs +10 -16
- package/templates/channels/microsoft-copilot/declarative-agent.template.json.hbs +5 -3
- package/templates/channels/microsoft-copilot/entra-sso-registration.template.md.hbs +27 -0
- package/templates/channels/microsoft-copilot/install.template.md.hbs +39 -20
- 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 +7 -7
- package/templates/channels/microsoft-copilot/oauth-plugin-vault-required.template.md.hbs +11 -0
- package/templates/channels/slack/install.template.md.hbs +6 -1
- 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 +10 -0
- package/templates/typescript/docker-compose.hbs +10 -0
- /package/.cursor/plans/{Done → Archive}/157.1-security-quality-violations-by-type.csv +0 -0
|
@@ -66,6 +66,20 @@ const OPENAPI_REQUEST_SCHEMAS = {
|
|
|
66
66
|
},
|
|
67
67
|
['appName', 'source']
|
|
68
68
|
),
|
|
69
|
+
IntegrationDefinitionApplyRequest: frozenObject({
|
|
70
|
+
integrationDefinition: {
|
|
71
|
+
type: 'object',
|
|
72
|
+
additionalProperties: true,
|
|
73
|
+
description: 'Builder Integration Definition (aifabrix.builder.integrationDefinition).'
|
|
74
|
+
},
|
|
75
|
+
bid: {
|
|
76
|
+
type: 'object',
|
|
77
|
+
additionalProperties: true,
|
|
78
|
+
description: 'Alias for integrationDefinition.'
|
|
79
|
+
},
|
|
80
|
+
force: { type: 'boolean' },
|
|
81
|
+
dryRun: { type: 'boolean' }
|
|
82
|
+
}),
|
|
69
83
|
RepairRequest: frozenObject({
|
|
70
84
|
dryRun: { type: 'boolean' },
|
|
71
85
|
auth: { type: 'string' },
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const { frozenObject, schemaRef } = require('./openapi-schema-helpers');
|
|
4
|
+
|
|
5
|
+
const OPENAPI_RESULT_SCHEMA_OVERFLOW = {
|
|
6
|
+
LifecycleRunStep: frozenObject(
|
|
7
|
+
{
|
|
8
|
+
pillar: { type: 'string' },
|
|
9
|
+
success: { type: 'boolean' },
|
|
10
|
+
error: { type: 'string' }
|
|
11
|
+
},
|
|
12
|
+
['pillar', 'success']
|
|
13
|
+
),
|
|
14
|
+
LifecycleRunReport: frozenObject(
|
|
15
|
+
{
|
|
16
|
+
systemKey: schemaRef('SystemKey'),
|
|
17
|
+
certification: schemaRef('CertificationSummary')
|
|
18
|
+
},
|
|
19
|
+
['systemKey']
|
|
20
|
+
),
|
|
21
|
+
CertifyLifecycleRunResultData: frozenObject(
|
|
22
|
+
{
|
|
23
|
+
report: schemaRef('LifecycleRunReport'),
|
|
24
|
+
stepsRun: { type: 'array', items: schemaRef('LifecycleRunStep') }
|
|
25
|
+
},
|
|
26
|
+
['report']
|
|
27
|
+
),
|
|
28
|
+
CertifyResultData: {
|
|
29
|
+
oneOf: [
|
|
30
|
+
schemaRef('CertifyOperationsResultData'),
|
|
31
|
+
schemaRef('CertifyTrustResultData'),
|
|
32
|
+
schemaRef('CertifyGovernanceResultData'),
|
|
33
|
+
schemaRef('CertifyLifecycleRunResultData')
|
|
34
|
+
]
|
|
35
|
+
},
|
|
36
|
+
LifecycleReportData: frozenObject(
|
|
37
|
+
{
|
|
38
|
+
systemKey: schemaRef('SystemKey'),
|
|
39
|
+
certification: schemaRef('CertificationSummary'),
|
|
40
|
+
operationalReadinessPercent: { type: 'number' },
|
|
41
|
+
summary: { type: 'boolean' },
|
|
42
|
+
details: { type: 'boolean' }
|
|
43
|
+
},
|
|
44
|
+
['systemKey']
|
|
45
|
+
),
|
|
46
|
+
EnterpriseMcpToolOutput: frozenObject({
|
|
47
|
+
success: { type: 'boolean' },
|
|
48
|
+
status: { type: 'string' },
|
|
49
|
+
message: { type: 'string' },
|
|
50
|
+
branch: { type: 'string' },
|
|
51
|
+
pullRequestUrl: { type: 'string', format: 'uri' },
|
|
52
|
+
syncDirection: schemaRef('RepositorySyncDirection'),
|
|
53
|
+
commitSha: { type: 'string' },
|
|
54
|
+
workflowRunId: { type: 'string' }
|
|
55
|
+
}),
|
|
56
|
+
WorkspaceRemoteUnavailable: frozenObject(
|
|
57
|
+
{
|
|
58
|
+
unavailable: { type: 'boolean', enum: [true] },
|
|
59
|
+
message: { type: 'string' }
|
|
60
|
+
},
|
|
61
|
+
['unavailable', 'message']
|
|
62
|
+
),
|
|
63
|
+
WorkspaceRemoteStatus: {
|
|
64
|
+
oneOf: [
|
|
65
|
+
schemaRef('EnterpriseMcpToolOutput'),
|
|
66
|
+
schemaRef('WorkspaceRemoteUnavailable'),
|
|
67
|
+
{ type: 'null' }
|
|
68
|
+
]
|
|
69
|
+
},
|
|
70
|
+
EnterpriseMcpInvocationData: frozenObject(
|
|
71
|
+
{
|
|
72
|
+
capabilityKey: { type: 'string' },
|
|
73
|
+
result: schemaRef('EnterpriseMcpToolOutput')
|
|
74
|
+
},
|
|
75
|
+
['capabilityKey', 'result']
|
|
76
|
+
),
|
|
77
|
+
WorkspaceStatusData: frozenObject(
|
|
78
|
+
{
|
|
79
|
+
local: schemaRef('SystemManifestData'),
|
|
80
|
+
remote: schemaRef('WorkspaceRemoteStatus')
|
|
81
|
+
},
|
|
82
|
+
['local', 'remote']
|
|
83
|
+
),
|
|
84
|
+
RepositoryStatusData: frozenObject(
|
|
85
|
+
{
|
|
86
|
+
capabilityKey: { type: 'string', enum: ['repository.status'] },
|
|
87
|
+
result: schemaRef('EnterpriseMcpToolOutput')
|
|
88
|
+
},
|
|
89
|
+
['capabilityKey', 'result']
|
|
90
|
+
),
|
|
91
|
+
HealthData: frozenObject({ status: { type: 'string', enum: ['ok'] } }, ['status']),
|
|
92
|
+
ReadyData: frozenObject(
|
|
93
|
+
{
|
|
94
|
+
status: { type: 'string', enum: ['ready'] },
|
|
95
|
+
dataplaneUrl: { type: ['string', 'null'], format: 'uri' }
|
|
96
|
+
},
|
|
97
|
+
['status']
|
|
98
|
+
)
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
module.exports = { OPENAPI_RESULT_SCHEMA_OVERFLOW };
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
'use strict';
|
|
10
10
|
|
|
11
11
|
const { frozenObject, schemaRef, stringArraySchema } = require('./openapi-schema-helpers');
|
|
12
|
+
const { OPENAPI_RESULT_SCHEMA_OVERFLOW } = require('./openapi-result-schemas-overflow');
|
|
12
13
|
|
|
13
14
|
/** @type {Record<string, Object>} */
|
|
14
15
|
const OPENAPI_RESULT_SCHEMAS = {
|
|
@@ -19,9 +20,9 @@ const OPENAPI_RESULT_SCHEMAS = {
|
|
|
19
20
|
title: { type: 'string' },
|
|
20
21
|
status: { type: 'integer', minimum: 100, maximum: 599 },
|
|
21
22
|
detail: { type: 'string' },
|
|
22
|
-
instance: { type: 'string' },
|
|
23
|
+
instance: { type: 'string', format: 'uri' },
|
|
23
24
|
correlationId: { type: 'string' },
|
|
24
|
-
errors: { type: 'array', items: schemaRef('
|
|
25
|
+
errors: { type: 'array', items: schemaRef('ValidationError') }
|
|
25
26
|
},
|
|
26
27
|
['type', 'title', 'status', 'detail', 'correlationId', 'instance', 'errors']
|
|
27
28
|
),
|
|
@@ -31,9 +32,15 @@ const OPENAPI_RESULT_SCHEMAS = {
|
|
|
31
32
|
title: 'Unauthorized',
|
|
32
33
|
status: 401,
|
|
33
34
|
detail: 'Missing or invalid Bearer token.',
|
|
34
|
-
instance: '/api/v1/builder/workspaces/me/systems',
|
|
35
|
+
instance: 'https://api.example.com/api/v1/builder/workspaces/me/systems',
|
|
35
36
|
correlationId: '00000000-0000-4000-8000-000000000003',
|
|
36
|
-
errors: [
|
|
37
|
+
errors: [
|
|
38
|
+
{
|
|
39
|
+
field: 'authorization',
|
|
40
|
+
message: 'Missing or invalid Bearer token.',
|
|
41
|
+
value: null
|
|
42
|
+
}
|
|
43
|
+
]
|
|
37
44
|
}
|
|
38
45
|
}
|
|
39
46
|
),
|
|
@@ -41,14 +48,27 @@ const OPENAPI_RESULT_SCHEMAS = {
|
|
|
41
48
|
ProblemDetails: {
|
|
42
49
|
allOf: [schemaRef('ProblemDetail')]
|
|
43
50
|
},
|
|
44
|
-
|
|
51
|
+
ValidationError: Object.assign(
|
|
52
|
+
frozenObject(
|
|
53
|
+
{
|
|
54
|
+
field: { type: 'string' },
|
|
55
|
+
message: { type: 'string' },
|
|
56
|
+
value: { type: ['string', 'null'] }
|
|
57
|
+
},
|
|
58
|
+
['field', 'message', 'value']
|
|
59
|
+
),
|
|
45
60
|
{
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
61
|
+
example: {
|
|
62
|
+
field: 'authorization',
|
|
63
|
+
message: 'Missing or invalid Bearer token.',
|
|
64
|
+
value: null
|
|
65
|
+
}
|
|
66
|
+
}
|
|
51
67
|
),
|
|
68
|
+
/** Legacy alias — published REST requires ValidationError (OAPI-249/608). */
|
|
69
|
+
ProblemValidationError: {
|
|
70
|
+
allOf: [schemaRef('ValidationError')]
|
|
71
|
+
},
|
|
52
72
|
LifecycleVerdict: {
|
|
53
73
|
type: 'string',
|
|
54
74
|
enum: ['VERIFIED', 'FAILED', 'NOT_VERIFIED', 'NOT_APPLICABLE']
|
|
@@ -131,6 +151,21 @@ const OPENAPI_RESULT_SCHEMAS = {
|
|
|
131
151
|
},
|
|
132
152
|
['systemKey', 'status']
|
|
133
153
|
),
|
|
154
|
+
IntegrationDefinitionApplyData: frozenObject(
|
|
155
|
+
{
|
|
156
|
+
status: {
|
|
157
|
+
type: 'string',
|
|
158
|
+
enum: ['created', 'updated', 'idempotent', 'dryRun']
|
|
159
|
+
},
|
|
160
|
+
systemKey: schemaRef('SystemKey'),
|
|
161
|
+
outputDir: { type: 'string' },
|
|
162
|
+
definitionId: { type: 'string' },
|
|
163
|
+
definitionHash: { type: 'string' },
|
|
164
|
+
packageVersion: { type: 'string' },
|
|
165
|
+
files: stringArraySchema()
|
|
166
|
+
},
|
|
167
|
+
['status', 'systemKey']
|
|
168
|
+
),
|
|
134
169
|
RepairResultData: frozenObject(
|
|
135
170
|
{
|
|
136
171
|
updated: { type: 'boolean' },
|
|
@@ -397,95 +432,7 @@ const OPENAPI_RESULT_SCHEMAS = {
|
|
|
397
432
|
},
|
|
398
433
|
['command', 'systemKey', 'verdict', 'enforcementScenarios', 'datasourceRows']
|
|
399
434
|
),
|
|
400
|
-
|
|
401
|
-
{
|
|
402
|
-
pillar: { type: 'string' },
|
|
403
|
-
success: { type: 'boolean' },
|
|
404
|
-
error: { type: 'string' }
|
|
405
|
-
},
|
|
406
|
-
['pillar', 'success']
|
|
407
|
-
),
|
|
408
|
-
LifecycleRunReport: frozenObject(
|
|
409
|
-
{
|
|
410
|
-
systemKey: schemaRef('SystemKey'),
|
|
411
|
-
certification: schemaRef('CertificationSummary')
|
|
412
|
-
},
|
|
413
|
-
['systemKey']
|
|
414
|
-
),
|
|
415
|
-
CertifyLifecycleRunResultData: frozenObject(
|
|
416
|
-
{
|
|
417
|
-
report: schemaRef('LifecycleRunReport'),
|
|
418
|
-
stepsRun: { type: 'array', items: schemaRef('LifecycleRunStep') }
|
|
419
|
-
},
|
|
420
|
-
['report']
|
|
421
|
-
),
|
|
422
|
-
CertifyResultData: {
|
|
423
|
-
oneOf: [
|
|
424
|
-
schemaRef('CertifyOperationsResultData'),
|
|
425
|
-
schemaRef('CertifyTrustResultData'),
|
|
426
|
-
schemaRef('CertifyGovernanceResultData'),
|
|
427
|
-
schemaRef('CertifyLifecycleRunResultData')
|
|
428
|
-
]
|
|
429
|
-
},
|
|
430
|
-
LifecycleReportData: frozenObject(
|
|
431
|
-
{
|
|
432
|
-
systemKey: schemaRef('SystemKey'),
|
|
433
|
-
certification: schemaRef('CertificationSummary'),
|
|
434
|
-
operationalReadinessPercent: { type: 'number' },
|
|
435
|
-
summary: { type: 'boolean' },
|
|
436
|
-
details: { type: 'boolean' }
|
|
437
|
-
},
|
|
438
|
-
['systemKey']
|
|
439
|
-
),
|
|
440
|
-
EnterpriseMcpToolOutput: frozenObject({
|
|
441
|
-
success: { type: 'boolean' },
|
|
442
|
-
status: { type: 'string' },
|
|
443
|
-
message: { type: 'string' },
|
|
444
|
-
branch: { type: 'string' },
|
|
445
|
-
pullRequestUrl: { type: 'string', format: 'uri' },
|
|
446
|
-
syncDirection: schemaRef('RepositorySyncDirection'),
|
|
447
|
-
commitSha: { type: 'string' },
|
|
448
|
-
workflowRunId: { type: 'string' }
|
|
449
|
-
}),
|
|
450
|
-
WorkspaceRemoteUnavailable: frozenObject(
|
|
451
|
-
{
|
|
452
|
-
unavailable: { type: 'boolean', enum: [true] },
|
|
453
|
-
message: { type: 'string' }
|
|
454
|
-
},
|
|
455
|
-
['unavailable', 'message']
|
|
456
|
-
),
|
|
457
|
-
WorkspaceRemoteStatus: {
|
|
458
|
-
oneOf: [schemaRef('EnterpriseMcpToolOutput'), schemaRef('WorkspaceRemoteUnavailable'), { type: 'null' }]
|
|
459
|
-
},
|
|
460
|
-
EnterpriseMcpInvocationData: frozenObject(
|
|
461
|
-
{
|
|
462
|
-
capabilityKey: { type: 'string' },
|
|
463
|
-
result: schemaRef('EnterpriseMcpToolOutput')
|
|
464
|
-
},
|
|
465
|
-
['capabilityKey', 'result']
|
|
466
|
-
),
|
|
467
|
-
WorkspaceStatusData: frozenObject(
|
|
468
|
-
{
|
|
469
|
-
local: schemaRef('SystemManifestData'),
|
|
470
|
-
remote: schemaRef('WorkspaceRemoteStatus')
|
|
471
|
-
},
|
|
472
|
-
['local', 'remote']
|
|
473
|
-
),
|
|
474
|
-
RepositoryStatusData: frozenObject(
|
|
475
|
-
{
|
|
476
|
-
capabilityKey: { type: 'string', enum: ['repository.status'] },
|
|
477
|
-
result: schemaRef('EnterpriseMcpToolOutput')
|
|
478
|
-
},
|
|
479
|
-
['capabilityKey', 'result']
|
|
480
|
-
),
|
|
481
|
-
HealthData: frozenObject({ status: { type: 'string', enum: ['ok'] } }, ['status']),
|
|
482
|
-
ReadyData: frozenObject(
|
|
483
|
-
{
|
|
484
|
-
status: { type: 'string', enum: ['ready'] },
|
|
485
|
-
dataplaneUrl: { type: ['string', 'null'], format: 'uri' }
|
|
486
|
-
},
|
|
487
|
-
['status']
|
|
488
|
-
)
|
|
435
|
+
...OPENAPI_RESULT_SCHEMA_OVERFLOW
|
|
489
436
|
};
|
|
490
437
|
|
|
491
438
|
module.exports = {
|
|
@@ -28,18 +28,21 @@ const CORE_SCHEMA_DESCRIPTIONS = {
|
|
|
28
28
|
title: 'Short human-readable error title.',
|
|
29
29
|
status: 'HTTP status code echoed in the body.',
|
|
30
30
|
detail: 'Actionable error detail safe for operators and agents.',
|
|
31
|
-
instance: 'Request
|
|
31
|
+
instance: 'Request URL for this occurrence (URI).',
|
|
32
32
|
correlationId: 'Correlation id for log lookup across services.',
|
|
33
|
-
errors: 'Field-level validation errors when status is 400.'
|
|
33
|
+
errors: 'Field-level validation errors (non-empty when status is 400/422).'
|
|
34
34
|
},
|
|
35
35
|
ProblemDetails: {
|
|
36
36
|
_schema: 'Alias of ProblemDetail (allOf) for backward-compatible $refs.'
|
|
37
37
|
},
|
|
38
|
-
|
|
38
|
+
ValidationError: {
|
|
39
39
|
_schema: 'Single field validation error inside ProblemDetail.errors.',
|
|
40
40
|
field: 'JSON pointer or field name that failed validation.',
|
|
41
41
|
message: 'Validation failure message.',
|
|
42
|
-
value: 'Rejected value when safe to echo (
|
|
42
|
+
value: 'Rejected value when safe to echo (null when omitted for secrets).'
|
|
43
|
+
},
|
|
44
|
+
ProblemValidationError: {
|
|
45
|
+
_schema: 'Legacy alias of ValidationError (allOf) for older $refs.'
|
|
43
46
|
},
|
|
44
47
|
LifecycleVerdict: {
|
|
45
48
|
_schema: 'Lifecycle verification outcome: VERIFIED, FAILED, NOT_VERIFIED, or NOT_APPLICABLE.'
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
const HELP_SCHEMA_DESCRIPTIONS = Object.freeze({
|
|
13
13
|
BuilderHelpTopic: {
|
|
14
14
|
_schema:
|
|
15
|
-
'Help topic enum
|
|
15
|
+
'Help topic enum including resourceTypeCatalog (taxonomy keys for BID datasources[].resourceType), overview, sections, schemaCatalog, platformRoles, dimensionsGuide, and related bootstrap topics.'
|
|
16
16
|
},
|
|
17
17
|
BuilderHelpData: {
|
|
18
18
|
_schema: 'Deterministic LLM help payload for one topic (read-only product documentation).',
|
|
@@ -46,6 +46,30 @@ const OPERATIONS_SCHEMA_DESCRIPTIONS = {
|
|
|
46
46
|
preferences: 'Optional expose, RBAC, and sync generation flags.',
|
|
47
47
|
debug: 'When true, enable verbose wizard logging (also available as query param).'
|
|
48
48
|
},
|
|
49
|
+
IntegrationDefinitionApplyRequest: {
|
|
50
|
+
_schema: 'Apply a Builder Integration Definition (BID) into the workspace package.',
|
|
51
|
+
integrationDefinition: 'BID document (aifabrix.builder.integrationDefinition).',
|
|
52
|
+
bid: 'Alias for integrationDefinition.',
|
|
53
|
+
force: 'When true, rewrite package even if definitionHash matches stamp.',
|
|
54
|
+
dryRun: 'When true, return planned files without writing.'
|
|
55
|
+
},
|
|
56
|
+
IntegrationDefinitionApplyResponse: {
|
|
57
|
+
_schema: '200 response envelope for applyIntegrationDefinition.',
|
|
58
|
+
success: 'Always true for successful builder-api JSON responses.',
|
|
59
|
+
data: 'Typed payload; see IntegrationDefinitionApplyData.',
|
|
60
|
+
correlationId: 'UUID correlating logs for this request.',
|
|
61
|
+
requestId: 'Optional per-request UUID when emitted by the server.'
|
|
62
|
+
},
|
|
63
|
+
IntegrationDefinitionApplyData: {
|
|
64
|
+
_schema: 'Typed apply result payload.',
|
|
65
|
+
status: 'created, updated, unchanged, or dryRun.',
|
|
66
|
+
systemKey: 'Integration system key that was materialized.',
|
|
67
|
+
outputDir: 'Absolute workspace integration directory.',
|
|
68
|
+
definitionId: 'BID definitionId.',
|
|
69
|
+
definitionHash: 'Canonical definitionHash written to stamp.',
|
|
70
|
+
packageVersion: 'Package version from packageIdentity.',
|
|
71
|
+
files: 'Relative package file names written or planned.'
|
|
72
|
+
},
|
|
49
73
|
RepairRequest: {
|
|
50
74
|
_schema: 'Optional flags for workspace repair aligning manifest files with on-disk JSON.',
|
|
51
75
|
dryRun: 'Preview repair actions without writing files.',
|
|
@@ -41,14 +41,14 @@ function stringArraySchema() {
|
|
|
41
41
|
* @returns {Object}
|
|
42
42
|
*/
|
|
43
43
|
function buildSuccessEnvelopeSchema(dataSchemaName) {
|
|
44
|
-
const
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
}
|
|
44
|
+
const { OPENAPI_ENVELOPE_DATA_EXAMPLES } = require('./openapi-envelope-examples');
|
|
45
|
+
const dataExample = OPENAPI_ENVELOPE_DATA_EXAMPLES[dataSchemaName];
|
|
46
|
+
if (dataExample === undefined) {
|
|
47
|
+
throw new Error(
|
|
48
|
+
`Missing OpenAPI envelope data example for ${dataSchemaName} (OAPI-136). ` +
|
|
49
|
+
'Add it to lib/programmatic/openapi-envelope-examples.js'
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
52
|
const schema = frozenObject(
|
|
53
53
|
{
|
|
54
54
|
success: { type: 'boolean', enum: [true] },
|
|
@@ -60,7 +60,7 @@ function buildSuccessEnvelopeSchema(dataSchemaName) {
|
|
|
60
60
|
);
|
|
61
61
|
schema.example = {
|
|
62
62
|
success: true,
|
|
63
|
-
data:
|
|
63
|
+
data: dataExample,
|
|
64
64
|
correlationId: '00000000-0000-4000-8000-000000000001',
|
|
65
65
|
requestId: '00000000-0000-4000-8000-000000000002'
|
|
66
66
|
};
|
|
@@ -73,7 +73,7 @@ function buildStandardErrorResponses() {
|
|
|
73
73
|
* @returns {boolean}
|
|
74
74
|
*/
|
|
75
75
|
function requiresBearerAuth(handlerId) {
|
|
76
|
-
return handlerId !== 'health' && handlerId !== 'ready';
|
|
76
|
+
return handlerId !== 'health' && handlerId !== 'ready' && handlerId !== 'getBuilderHelp';
|
|
77
77
|
}
|
|
78
78
|
|
|
79
79
|
/**
|
|
@@ -149,10 +149,20 @@ function buildOpenApiTags() {
|
|
|
149
149
|
{ name: 'template', description: 'Enterprise MCP template.materializeWorkspace and workspace reset.' },
|
|
150
150
|
{ name: 'repository', description: 'Enterprise MCP repository.sync, createReview, status, dispatchPipeline.' },
|
|
151
151
|
{ name: 'infra', description: 'Liveness and readiness probes (no authentication).' },
|
|
152
|
+
{
|
|
153
|
+
name: 'help',
|
|
154
|
+
description:
|
|
155
|
+
'Deterministic LLM help topics (resourceTypeCatalog, schemaCatalog, …). No authentication.'
|
|
156
|
+
},
|
|
152
157
|
{
|
|
153
158
|
name: 'evidence',
|
|
154
159
|
description:
|
|
155
160
|
'BTA-facing Evidence authoring: metadata, download, upload (validate+certify), and human-gated activate.'
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
name: 'channel',
|
|
164
|
+
description:
|
|
165
|
+
'Discovery-driven channel packaging (Copilot, ChatGPT, Slack, Teams): build, summary, ZIP, branding.'
|
|
156
166
|
}
|
|
157
167
|
];
|
|
158
168
|
}
|
|
@@ -71,6 +71,16 @@ const ORCHESTRATION_TAG_CATALOG = Object.freeze({
|
|
|
71
71
|
resourceType: 'role-evidence',
|
|
72
72
|
permissionClass: 'evidence',
|
|
73
73
|
displayName: 'Evidence'
|
|
74
|
+
},
|
|
75
|
+
channel: {
|
|
76
|
+
resourceType: 'channel',
|
|
77
|
+
permissionClass: 'channel',
|
|
78
|
+
displayName: 'Channel'
|
|
79
|
+
},
|
|
80
|
+
help: {
|
|
81
|
+
resourceType: 'document',
|
|
82
|
+
permissionClass: 'read',
|
|
83
|
+
displayName: 'Help'
|
|
74
84
|
}
|
|
75
85
|
});
|
|
76
86
|
|
|
@@ -11,6 +11,9 @@
|
|
|
11
11
|
const { buildContext } = require('./route-handlers-context');
|
|
12
12
|
const { listSystems, createSystem, getSystemManifest, deleteSystem } = require('./workspace-ops');
|
|
13
13
|
const { runWizard } = require('./run-wizard');
|
|
14
|
+
const {
|
|
15
|
+
applyIntegrationDefinitionInWorkspace
|
|
16
|
+
} = require('./run-integration-definition');
|
|
14
17
|
const { runRepair } = require('./run-repair');
|
|
15
18
|
const { runValidate } = require('./run-validate');
|
|
16
19
|
const { runPreviewUpload, runUpload } = require('./run-upload');
|
|
@@ -41,6 +44,15 @@ const {
|
|
|
41
44
|
activateEvidenceCandidates
|
|
42
45
|
} = require('./run-evidence-authoring');
|
|
43
46
|
|
|
47
|
+
const {
|
|
48
|
+
buildChannelPackage,
|
|
49
|
+
getChannelPackageSummary,
|
|
50
|
+
getChannelPackageZip,
|
|
51
|
+
patchChannelBranding,
|
|
52
|
+
getChannelBranding
|
|
53
|
+
} = require('./run-channel-package');
|
|
54
|
+
const { handleGetBuilderHelp } = require('./builder-help');
|
|
55
|
+
|
|
44
56
|
/** @type {Record<string, Function>} */
|
|
45
57
|
const HANDLER_MAP = {
|
|
46
58
|
listSystems: (_params, auth) => listSystems(buildContext(auth, '_meta')),
|
|
@@ -57,6 +69,11 @@ const HANDLER_MAP = {
|
|
|
57
69
|
runWizard(buildContext(auth, params.systemKey), body, {
|
|
58
70
|
debug: query.debug === 'true' || body.debug === true
|
|
59
71
|
}),
|
|
72
|
+
applyIntegrationDefinition: (params, auth, body) =>
|
|
73
|
+
applyIntegrationDefinitionInWorkspace(
|
|
74
|
+
buildContext(auth, params.systemKey),
|
|
75
|
+
body && typeof body === 'object' ? body : {}
|
|
76
|
+
),
|
|
60
77
|
runRepair: (params, auth, body, query) =>
|
|
61
78
|
runRepair(buildContext(auth, params.systemKey), {
|
|
62
79
|
dryRun: query.dryRun === 'true' || body.dryRun === true,
|
|
@@ -179,6 +196,7 @@ const HANDLER_MAP = {
|
|
|
179
196
|
runRepositoryDispatchPipeline(buildContext(auth, params.systemKey), body),
|
|
180
197
|
health: () => ({ status: 'ok' }),
|
|
181
198
|
ready: () => ({ status: 'ready', dataplaneUrl: process.env.DATAPLANE_URL || null }),
|
|
199
|
+
getBuilderHelp: (_params, _auth, _body, query) => handleGetBuilderHelp(query || {}),
|
|
182
200
|
getEvidenceMetadata: (params, auth) =>
|
|
183
201
|
getEvidenceMetadata(buildContext(auth, '_evidence'), params.roleKey),
|
|
184
202
|
downloadEvidence: (params, auth, _body, query) =>
|
|
@@ -199,7 +217,17 @@ const HANDLER_MAP = {
|
|
|
199
217
|
roleKey: (body && body.roleKey) || params.roleKey
|
|
200
218
|
}),
|
|
201
219
|
activateEvidenceCandidates: (_params, auth, body) =>
|
|
202
|
-
activateEvidenceCandidates(buildContext(auth, '_evidence'), body)
|
|
220
|
+
activateEvidenceCandidates(buildContext(auth, '_evidence'), body),
|
|
221
|
+
buildChannelPackage: (params, auth, body) =>
|
|
222
|
+
buildChannelPackage(buildContext(auth, params.systemKey), body || {}),
|
|
223
|
+
getChannelPackageSummary: (params, auth) =>
|
|
224
|
+
getChannelPackageSummary(buildContext(auth, params.systemKey)),
|
|
225
|
+
getChannelPackageZip: (params, auth) =>
|
|
226
|
+
getChannelPackageZip(buildContext(auth, params.systemKey)),
|
|
227
|
+
getChannelBranding: (params, auth) =>
|
|
228
|
+
getChannelBranding(buildContext(auth, params.systemKey)),
|
|
229
|
+
patchChannelBranding: (params, auth, body) =>
|
|
230
|
+
patchChannelBranding(buildContext(auth, params.systemKey), body || {})
|
|
203
231
|
};
|
|
204
232
|
|
|
205
233
|
/**
|