@aventara/core 1.0.0-rc.0 → 1.0.0-rc.2
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/CHANGELOG.md +1434 -0
- package/ERRORS.md +142 -0
- package/README.md +247 -57
- package/dist/adapters/adapter-discovery-diagnostic.d.ts +4 -4
- package/dist/adapters/adapter-discovery-diagnostic.guidance.d.ts +6 -0
- package/dist/adapters/adapter-discovery-diagnostic.guidance.js +7 -0
- package/dist/adapters/adapter-field.d.ts +25 -11
- package/dist/adapters/adapter-identifier.d.ts +6 -6
- package/dist/adapters/adapter-model.d.ts +18 -9
- package/dist/adapters/adapter-operation-executor.interface.d.ts +4 -4
- package/dist/adapters/adapter-operation.d.ts +3 -3
- package/dist/adapters/adapter-resource.d.ts +18 -9
- package/dist/adapters/adapter-sql-statement.d.ts +19 -0
- package/dist/adapters/adapter-transaction-executor.interface.d.ts +19 -0
- package/dist/adapters/adapter.interface.d.ts +59 -29
- package/dist/avz/avz-check.factory.d.ts +83 -0
- package/dist/avz/avz-check.factory.js +116 -0
- package/dist/avz/avz-check.registry.d.ts +35 -0
- package/dist/avz/avz-check.registry.js +9 -0
- package/dist/avz/avz.d.ts +203 -0
- package/dist/{json → avz}/avz.js +150 -8
- package/dist/{json → avz}/index.d.ts +2 -1
- package/dist/{json → avz}/json-shape.registry.d.ts +7 -7
- package/dist/{json → avz}/zod-issue.translator.d.ts +8 -2
- package/dist/{json → avz}/zod-issue.translator.js +7 -0
- package/dist/compiler/contract-compiler-diagnostic.d.ts +31 -5
- package/dist/compiler/contract-compiler-diagnostic.guidance.d.ts +6 -0
- package/dist/compiler/contract-compiler-diagnostic.guidance.js +97 -0
- package/dist/compiler/contract.compiler.d.ts +18 -18
- package/dist/compiler/contract.compiler.js +637 -442
- package/dist/compiler/create-requirements.projector.d.ts +49 -0
- package/dist/compiler/create-requirements.projector.js +423 -0
- package/dist/compiler/field-validator.compiler.d.ts +47 -0
- package/dist/compiler/field-validator.compiler.js +238 -0
- package/dist/config/any-framework-config.d.ts +19 -12
- package/dist/config/computed-fields.d.ts +62 -0
- package/dist/config/computed-fields.js +80 -0
- package/dist/config/config-diagnostic.d.ts +11 -4
- package/dist/config/config-diagnostic.guidance.d.ts +6 -0
- package/dist/config/config-diagnostic.guidance.js +32 -0
- package/dist/config/config-layer.d.ts +15 -6
- package/dist/config/config.resolver.d.ts +74 -31
- package/dist/config/config.resolver.js +108 -44
- package/dist/config/config.validator.d.ts +7 -7
- package/dist/config/config.validator.js +581 -72
- package/dist/config/define-resource.d.ts +57 -0
- package/dist/config/define-resource.js +14 -0
- package/dist/config/effective-fields.d.ts +19 -23
- package/dist/config/entrypoint.normalizer.d.ts +1 -1
- package/dist/config/exact-framework-config.d.ts +308 -0
- package/dist/config/field-compute.resolver.d.ts +21 -0
- package/dist/config/field-compute.resolver.js +123 -0
- package/dist/config/field-pipeline-config.d.ts +47 -0
- package/dist/config/forced-operation.validator.d.ts +10 -0
- package/dist/config/forced-operation.validator.js +66 -0
- package/dist/config/framework-config.d.ts +111 -39
- package/dist/config/framework-exemptions-config.d.ts +91 -0
- package/dist/config/framework-exemptions-config.js +1 -0
- package/dist/config/framework-field-definition.d.ts +78 -0
- package/dist/config/framework-field-definition.js +28 -0
- package/dist/config/framework-resources-config.d.ts +122 -0
- package/dist/config/framework-resources-config.js +1 -0
- package/dist/config/pipeline-config.d.ts +56 -20
- package/dist/config/pipeline-tree.resolver.d.ts +79 -0
- package/dist/config/pipeline-tree.resolver.js +220 -0
- package/dist/config/stage-type.eraser.d.ts +65 -0
- package/dist/config/stage-type.eraser.js +1 -0
- package/dist/contracts/capability.d.ts +21 -12
- package/dist/contracts/capability.js +2 -0
- package/dist/contracts/client-contract-structure.validator.d.ts +388 -63
- package/dist/contracts/client-contract-structure.validator.js +156 -10
- package/dist/contracts/contract-canonicalizer.d.ts +26 -3
- package/dist/contracts/contract-canonicalizer.js +156 -29
- package/dist/contracts/contract-hash.d.ts +12 -7
- package/dist/contracts/contract-hash.js +3 -2
- package/dist/contracts/contract-limits.d.ts +4 -1
- package/dist/contracts/contract-limits.js +1 -0
- package/dist/contracts/contract-lookup.d.ts +5 -5
- package/dist/contracts/contract-protocol.d.ts +4 -4
- package/dist/contracts/contract.d.ts +24 -16
- package/dist/contracts/create-requirements.d.ts +35 -0
- package/dist/contracts/create-requirements.js +1 -0
- package/dist/contracts/enum-definition.d.ts +1 -1
- package/dist/contracts/field-check.d.ts +101 -0
- package/dist/contracts/field-check.js +1 -0
- package/dist/contracts/field.d.ts +81 -42
- package/dist/contracts/identifier.d.ts +4 -4
- package/dist/contracts/json-shape.d.ts +12 -1
- package/dist/contracts/lifecycle-trait.d.ts +2 -2
- package/dist/contracts/resource-operations.d.ts +28 -28
- package/dist/contracts/resource.d.ts +15 -9
- package/dist/contracts/scalar-value-type.d.ts +15 -15
- package/dist/contracts/scalar.d.ts +3 -3
- package/dist/contracts/transaction-capability.d.ts +1 -1
- package/dist/contracts/wire-scalar-format.d.ts +4 -4
- package/dist/framework/contract-view.d.ts +213 -147
- package/dist/framework/framework-construction.error.d.ts +19 -10
- package/dist/framework/framework-construction.error.js +7 -3
- package/dist/framework/framework.d.ts +47 -23
- package/dist/framework/framework.factory.d.ts +8 -6
- package/dist/framework/framework.factory.js +49 -22
- package/dist/framework/operation-facade.d.ts +123 -52
- package/dist/framework/operation-facade.js +9 -1
- package/dist/index.d.ts +57 -50
- package/dist/index.js +7 -6
- package/dist/internal.d.ts +17 -10
- package/dist/internal.js +4 -1
- package/dist/operations/database-refusal.d.ts +51 -0
- package/dist/operations/database-refusal.js +45 -0
- package/dist/operations/operation-arguments.d.ts +343 -207
- package/dist/operations/operation-call.d.ts +27 -28
- package/dist/operations/operation-identity.d.ts +10 -10
- package/dist/operations/operation-result.d.ts +21 -21
- package/dist/operations/operation-validator-core.d.ts +6 -6
- package/dist/operations/operation-validator-core.js +99 -6
- package/dist/operations/operation-validator.d.ts +9 -9
- package/dist/operations/projection-scope.resolver.d.ts +6 -6
- package/dist/operations/structural-limits.walker.d.ts +6 -6
- package/dist/operations/structural-limits.walker.js +145 -0
- package/dist/operations/validation-code.d.ts +11 -6
- package/dist/operations/validation-code.guidance.d.ts +6 -0
- package/dist/operations/validation-code.guidance.js +90 -0
- package/dist/operations/validation-code.js +4 -0
- package/dist/operations/write-scope.resolver.d.ts +10 -6
- package/dist/operations/write-scope.resolver.js +2 -0
- package/dist/protocol/absent-route.responder.d.ts +13 -12
- package/dist/protocol/absent-route.responder.js +19 -19
- package/dist/protocol/contract-document.responder.d.ts +3 -3
- package/dist/protocol/contract-document.responder.js +2 -2
- package/dist/protocol/http-request.decoder.d.ts +17 -13
- package/dist/protocol/http-request.decoder.js +10 -10
- package/dist/protocol/http-request.reader.d.ts +3 -3
- package/dist/protocol/http-response.encoder.d.ts +4 -4
- package/dist/protocol/http-response.encoder.js +94 -55
- package/dist/protocol/http-status.table.d.ts +2 -2
- package/dist/protocol/operation-response.guard.d.ts +2 -2
- package/dist/protocol/protocol-surface.d.ts +4 -4
- package/dist/protocol/protocol.binder.d.ts +50 -27
- package/dist/protocol/protocol.binder.js +12 -9
- package/dist/protocol/protocol.handler.d.ts +22 -13
- package/dist/protocol/protocol.handler.js +91 -17
- package/dist/protocol/unmounted-route.error.d.ts +4 -4
- package/dist/protocol/unmounted-route.error.js +2 -2
- package/dist/runtime/caller-data.copier.d.ts +22 -5
- package/dist/runtime/caller-data.copier.js +31 -14
- package/dist/runtime/caller-data.door.d.ts +17 -11
- package/dist/runtime/caller-data.door.js +6 -4
- package/dist/runtime/computed-read-runtime.d.ts +7 -6
- package/dist/runtime/computed-read-runtime.js +76 -50
- package/dist/runtime/computed-value.error.d.ts +7 -6
- package/dist/runtime/computed-value.error.js +5 -4
- package/dist/runtime/context-executor.runtime.d.ts +59 -0
- package/dist/runtime/context-executor.runtime.js +275 -0
- package/dist/runtime/create-requirement.d.ts +44 -79
- package/dist/runtime/create-requirement.js +213 -73
- package/dist/runtime/decimal.d.ts +2 -2
- package/dist/runtime/decimal.js +1 -1
- package/dist/runtime/diagnostics-reporter.d.ts +54 -27
- package/dist/runtime/diagnostics-reporter.js +24 -0
- package/dist/runtime/error-boundary.d.ts +65 -8
- package/dist/runtime/error-boundary.js +49 -19
- package/dist/runtime/error-guidance.d.ts +12 -0
- package/dist/runtime/error-guidance.js +1 -0
- package/dist/runtime/error.catalog.d.ts +49 -0
- package/dist/runtime/error.catalog.js +49 -0
- package/dist/runtime/execution-options.d.ts +10 -2
- package/dist/runtime/field-check.evaluator.d.ts +29 -0
- package/dist/runtime/field-check.evaluator.js +521 -0
- package/dist/runtime/field-compute.d.ts +64 -0
- package/dist/runtime/field-compute.js +1 -0
- package/dist/runtime/field-stage.plan.d.ts +15 -0
- package/dist/runtime/field-stage.plan.js +27 -0
- package/dist/runtime/field-stage.runtime.d.ts +37 -0
- package/dist/runtime/field-stage.runtime.js +147 -0
- package/dist/runtime/field-validator.runtime.d.ts +19 -0
- package/dist/runtime/field-validator.runtime.js +92 -0
- package/dist/runtime/framework-error-class.table.d.ts +33 -0
- package/dist/runtime/framework-error-class.table.js +25 -0
- package/dist/runtime/framework-error.d.ts +68 -8
- package/dist/runtime/framework-error.factory.d.ts +4 -0
- package/dist/runtime/framework-error.factory.js +15 -0
- package/dist/runtime/framework-error.js +23 -2
- package/dist/runtime/interceptor-next.error.d.ts +5 -0
- package/dist/runtime/interceptor-next.error.js +6 -0
- package/dist/runtime/json-value.d.ts +11 -6
- package/dist/runtime/level-lifecycle.runtime.d.ts +25 -0
- package/dist/runtime/level-lifecycle.runtime.js +39 -0
- package/dist/runtime/misuse-reporter.d.ts +12 -12
- package/dist/runtime/mutation-planner.d.ts +19 -10
- package/dist/runtime/mutation-planner.js +48 -35
- package/dist/runtime/nested-write.walker.d.ts +32 -0
- package/dist/runtime/nested-write.walker.js +73 -0
- package/dist/runtime/operation-code.guidance.d.ts +6 -0
- package/dist/runtime/operation-code.guidance.js +167 -0
- package/dist/runtime/operation-request.d.ts +33 -6
- package/dist/runtime/operation-response.d.ts +17 -17
- package/dist/runtime/operation-runtime.d.ts +127 -25
- package/dist/runtime/operation-runtime.js +441 -78
- package/dist/runtime/outcome-mapper.d.ts +16 -5
- package/dist/runtime/outcome-mapper.js +23 -6
- package/dist/runtime/output-validator.d.ts +10 -10
- package/dist/runtime/output-validator.js +3 -3
- package/dist/runtime/owned-execution.registry.d.ts +16 -6
- package/dist/runtime/pipe-output.validator.d.ts +43 -18
- package/dist/runtime/pipe-output.validator.js +15 -13
- package/dist/runtime/pipeline.d.ts +223 -34
- package/dist/runtime/readonly-value.d.ts +43 -0
- package/dist/runtime/readonly-value.js +150 -0
- package/dist/runtime/request-envelope.validator.d.ts +3 -3
- package/dist/runtime/request-envelope.validator.js +12 -7
- package/dist/runtime/request-id.d.ts +1 -1
- package/dist/runtime/request-state.d.ts +14 -0
- package/dist/runtime/request-state.js +1 -0
- package/dist/runtime/request-state.resolver.d.ts +12 -0
- package/dist/runtime/request-state.resolver.js +20 -0
- package/dist/runtime/scalar-runtime.d.ts +35 -16
- package/dist/runtime/scalar-runtime.js +102 -34
- package/dist/runtime/unsent-value.normalizer.d.ts +15 -0
- package/dist/runtime/unsent-value.normalizer.js +128 -0
- package/dist/transactions/deferred-operation.d.ts +35 -20
- package/dist/transactions/operation-arguments-encoder.d.ts +3 -3
- package/dist/transactions/operation-arguments-encoder.js +2 -2
- package/dist/transactions/operation-fingerprint.js +2 -2
- package/dist/transactions/sql-statement.d.ts +85 -0
- package/dist/transactions/sql-statement.js +47 -0
- package/dist/transactions/sql-statement.validator.d.ts +44 -0
- package/dist/transactions/sql-statement.validator.js +167 -0
- package/dist/transactions/transaction-envelope.d.ts +4 -4
- package/dist/transactions/transaction-integrity-error.d.ts +6 -6
- package/dist/transactions/transaction-integrity-error.js +5 -2
- package/dist/transactions/transaction-plan-assembler.d.ts +21 -11
- package/dist/transactions/transaction-plan-assembler.js +169 -32
- package/dist/transactions/transaction-plan-validator.d.ts +45 -20
- package/dist/transactions/transaction-plan-validator.js +96 -38
- package/dist/transactions/transaction-reference-collector.d.ts +5 -5
- package/dist/transactions/transaction-reference-resolver.d.ts +19 -2
- package/dist/transactions/transaction-reference-resolver.js +26 -14
- package/dist/transactions/transaction-reference-validator.d.ts +76 -4
- package/dist/transactions/transaction-reference-validator.js +129 -71
- package/dist/transactions/transaction-reference.d.ts +13 -13
- package/dist/transactions/transaction-reference.js +5 -0
- package/dist/transactions/transaction-request.d.ts +18 -5
- package/dist/transactions/transaction-response.d.ts +6 -6
- package/dist/transactions/transaction-runtime.d.ts +8 -7
- package/dist/transactions/transaction-runtime.js +191 -50
- package/dist/transactions/transaction-settlement.runtime.d.ts +51 -0
- package/dist/transactions/transaction-settlement.runtime.js +120 -0
- package/dist/transactions/transaction-slot-path-error.d.ts +4 -4
- package/dist/transactions/transaction-slot-path-error.js +2 -2
- package/dist/transactions/transaction-slot-writer.js +2 -2
- package/dist/transactions/transaction-stage.runtime.d.ts +82 -0
- package/dist/transactions/transaction-stage.runtime.js +126 -0
- package/package.json +9 -7
- package/src/runtime/field-check.evaluator.ts +720 -0
- package/dist/config/define-fields.d.ts +0 -42
- package/dist/config/define-fields.js +0 -3
- package/dist/config/framework-behaviors-config.d.ts +0 -30
- package/dist/config/framework-fields-config.d.ts +0 -42
- package/dist/config/framework-restrictions-config.d.ts +0 -142
- package/dist/json/avz.d.ts +0 -96
- package/dist/runtime/field-behavior.d.ts +0 -48
- /package/dist/{config/framework-behaviors-config.js → adapters/adapter-sql-statement.js} +0 -0
- /package/dist/{config/framework-fields-config.js → adapters/adapter-transaction-executor.interface.js} +0 -0
- /package/dist/{json → avz}/index.js +0 -0
- /package/dist/{json → avz}/json-shape.registry.js +0 -0
- /package/dist/config/{framework-restrictions-config.js → exact-framework-config.js} +0 -0
- /package/dist/{runtime/field-behavior.js → config/field-pipeline-config.js} +0 -0
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { AvConstructionError } from "../framework/framework-construction.error.js";
|
|
2
|
+
import { mountPathRefusalDiagnostic } from "./config.validator.js";
|
|
3
3
|
import { normalizeEntrypoint } from "./entrypoint.normalizer.js";
|
|
4
|
+
import { chainCompute, computeOfLayer, } from "./field-compute.resolver.js";
|
|
5
|
+
import { resolvePipelineTree, } from "./pipeline-tree.resolver.js";
|
|
4
6
|
const hasOwn = (value, key) => Object.hasOwn(value, key);
|
|
5
7
|
function isPlainRecord(value) {
|
|
6
8
|
if (value === null || typeof value !== "object" || Array.isArray(value)) {
|
|
@@ -39,7 +41,7 @@ function resolveRecord(root, scoped) {
|
|
|
39
41
|
}
|
|
40
42
|
return result;
|
|
41
43
|
}
|
|
42
|
-
function
|
|
44
|
+
function resolveOverride(root, scoped, key) {
|
|
43
45
|
if (scoped === undefined || !hasOwn(scoped, key)) {
|
|
44
46
|
return cloneConfigValue(root[key]);
|
|
45
47
|
}
|
|
@@ -49,63 +51,125 @@ function resolveProperty(root, scoped, key) {
|
|
|
49
51
|
? resolveRecord(rootValue, scopedValue)
|
|
50
52
|
: cloneConfigValue(scopedValue);
|
|
51
53
|
}
|
|
52
|
-
function
|
|
54
|
+
function resolveLayer(root, rootCompute, overlay, scoped) {
|
|
53
55
|
return {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
],
|
|
67
|
-
filters: [...(root?.filters ?? []), ...(scoped?.filters ?? [])],
|
|
56
|
+
compute: scoped === undefined
|
|
57
|
+
? rootCompute
|
|
58
|
+
: chainCompute(rootCompute, computeOfLayer(scoped.resources)),
|
|
59
|
+
exposed: overlay
|
|
60
|
+
? scoped?.exposed
|
|
61
|
+
: (root.exposed ?? true),
|
|
62
|
+
exemptions: overlay ? scoped?.exemptions : root.exemptions,
|
|
63
|
+
limits: resolveOverride(root, scoped, "limits"),
|
|
64
|
+
transactionsStyle: resolveOverride(root, scoped, "transactionsStyle"),
|
|
65
|
+
pipelines: scoped === undefined
|
|
66
|
+
? resolvePipelineTree([root])
|
|
67
|
+
: resolvePipelineTree([root, scoped]),
|
|
68
68
|
};
|
|
69
69
|
}
|
|
70
|
-
function
|
|
70
|
+
function resolveAgentLayer(root, parentName, parentOverlay, parent, agent, stated) {
|
|
71
|
+
const effective = {
|
|
72
|
+
limits: parent.limits,
|
|
73
|
+
transactionsStyle: parent.transactionsStyle,
|
|
74
|
+
};
|
|
75
|
+
const chain = [root];
|
|
76
|
+
if (parentName !== "root" && parentOverlay !== undefined) {
|
|
77
|
+
chain.push(parentOverlay);
|
|
78
|
+
}
|
|
79
|
+
if (agent !== undefined) {
|
|
80
|
+
chain.push(agent);
|
|
81
|
+
}
|
|
71
82
|
return {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
83
|
+
parent: parentName,
|
|
84
|
+
stated,
|
|
85
|
+
compute: agent === undefined
|
|
86
|
+
? parent.compute
|
|
87
|
+
: chainCompute(parent.compute, computeOfLayer(agent.resources)),
|
|
88
|
+
exposed: agent?.exposed,
|
|
89
|
+
exemptions: agent?.exemptions,
|
|
90
|
+
limits: resolveOverride(effective, agent, "limits"),
|
|
91
|
+
transactionsStyle: resolveOverride(effective, agent, "transactionsStyle"),
|
|
92
|
+
pipelines: resolvePipelineTree(chain),
|
|
78
93
|
};
|
|
79
94
|
}
|
|
80
|
-
function
|
|
81
|
-
const
|
|
95
|
+
function definitionsOf(resources) {
|
|
96
|
+
const result = {};
|
|
97
|
+
if (!isPlainRecord(resources)) {
|
|
98
|
+
return result;
|
|
99
|
+
}
|
|
100
|
+
for (const [resourceName, resource] of Object.entries(resources)) {
|
|
101
|
+
if (!isPlainRecord(resource) || !isPlainRecord(resource.fields)) {
|
|
102
|
+
continue;
|
|
103
|
+
}
|
|
104
|
+
for (const [fieldName, field] of Object.entries(resource.fields)) {
|
|
105
|
+
if (!isPlainRecord(field) || field.definition === undefined) {
|
|
106
|
+
continue;
|
|
107
|
+
}
|
|
108
|
+
result[resourceName] ??= {};
|
|
109
|
+
result[resourceName][fieldName] =
|
|
110
|
+
field.definition;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
return result;
|
|
114
|
+
}
|
|
115
|
+
function resolveMountPath(value, path) {
|
|
116
|
+
const normalized = normalizeEntrypoint(value);
|
|
82
117
|
if (!normalized.ok) {
|
|
83
|
-
throw new
|
|
84
|
-
|
|
118
|
+
throw new AvConstructionError("configuration", [
|
|
119
|
+
mountPathRefusalDiagnostic(path, normalized.message),
|
|
85
120
|
]);
|
|
86
121
|
}
|
|
87
122
|
return normalized.path;
|
|
88
123
|
}
|
|
124
|
+
function resolveMcp(mcp) {
|
|
125
|
+
if (mcp === undefined) {
|
|
126
|
+
return undefined;
|
|
127
|
+
}
|
|
128
|
+
if (typeof mcp === "string") {
|
|
129
|
+
return Object.freeze({ path: resolveMountPath(mcp, "mcp") });
|
|
130
|
+
}
|
|
131
|
+
const path = resolveMountPath(mcp.path, "mcp.path");
|
|
132
|
+
const authorization = mcp.authorization;
|
|
133
|
+
return Object.freeze(authorization === undefined
|
|
134
|
+
? { path }
|
|
135
|
+
: {
|
|
136
|
+
path,
|
|
137
|
+
authorization: Object.freeze({
|
|
138
|
+
servers: Object.freeze([...authorization.servers]),
|
|
139
|
+
verify: authorization.verify,
|
|
140
|
+
}),
|
|
141
|
+
});
|
|
142
|
+
}
|
|
89
143
|
export function resolveFrameworkConfig(config) {
|
|
90
|
-
const root =
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
? { transactions: config.transactions }
|
|
100
|
-
: {}),
|
|
144
|
+
const root = config;
|
|
145
|
+
const application = config.application;
|
|
146
|
+
const client = config.client;
|
|
147
|
+
const agent = config.agent;
|
|
148
|
+
const rootCompute = computeOfLayer(root.resources);
|
|
149
|
+
const layers = {
|
|
150
|
+
root: resolveLayer(root, rootCompute, false),
|
|
151
|
+
application: resolveLayer(root, rootCompute, true, application),
|
|
152
|
+
client: resolveLayer(root, rootCompute, true, client),
|
|
101
153
|
};
|
|
154
|
+
const parent = agent?.extends ?? "client";
|
|
102
155
|
return {
|
|
103
|
-
|
|
156
|
+
api: resolveMountPath(config.api, "api"),
|
|
157
|
+
mcp: resolveMcp(config.mcp),
|
|
104
158
|
adapter: config.adapter,
|
|
105
159
|
diagnostics: config.diagnostics,
|
|
106
160
|
misuse: config.misuse,
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
161
|
+
definitions: definitionsOf(root.resources),
|
|
162
|
+
trees: {
|
|
163
|
+
root: root.resources,
|
|
164
|
+
application: application?.resources,
|
|
165
|
+
client: client?.resources,
|
|
166
|
+
agent: agent?.resources,
|
|
167
|
+
},
|
|
168
|
+
...layers,
|
|
169
|
+
agent: resolveAgentLayer(root, parent, parent === "application"
|
|
170
|
+
? application
|
|
171
|
+
: parent === "client"
|
|
172
|
+
? client
|
|
173
|
+
: undefined, layers[parent], agent, agent !== undefined || config.mcp !== undefined),
|
|
110
174
|
};
|
|
111
175
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { AvConfigDiagnostic } from "./config-diagnostic.js";
|
|
2
2
|
/**
|
|
3
|
-
* The refusal of
|
|
4
|
-
* normalizer's message: it names the defect and the rule — never the
|
|
5
|
-
* carry credentials.
|
|
3
|
+
* The refusal of a mount path (`api`, `mcp`, `mcp.path`) that is not canonical,
|
|
4
|
+
* from the normalizer's message: it names the defect and the rule — never the
|
|
5
|
+
* value, which may carry credentials.
|
|
6
6
|
*/
|
|
7
|
-
export declare function
|
|
7
|
+
export declare function mountPathRefusalDiagnostic(path: string, message: string): AvConfigDiagnostic;
|
|
8
8
|
/**
|
|
9
9
|
* Checks the structure of a configuration object and reports each problem as
|
|
10
|
-
* a {@link
|
|
10
|
+
* a {@link AvConfigDiagnostic}.
|
|
11
11
|
*/
|
|
12
|
-
export declare function validateFrameworkConfig(value: unknown): readonly
|
|
12
|
+
export declare function validateFrameworkConfig(value: unknown): readonly AvConfigDiagnostic[];
|