@aventara/core 0.1.0-pilot.2 → 0.1.0-pilot.4
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/dist/adapters/adapter-discovery-diagnostic.d.ts +2 -0
- package/dist/adapters/adapter-field.d.ts +3 -26
- package/dist/adapters/adapter-identifier.d.ts +1 -11
- package/dist/adapters/adapter-model.d.ts +4 -0
- package/dist/adapters/adapter-operation-executor.interface.d.ts +5 -1
- package/dist/adapters/adapter-resource.d.ts +7 -28
- package/dist/adapters/adapter.interface.d.ts +21 -26
- package/dist/compiler/contract-compiler-diagnostic.d.ts +2 -0
- package/dist/compiler/contract.compiler.d.ts +11 -22
- package/dist/config/any-framework-config.d.ts +5 -26
- package/dist/config/config-diagnostic.d.ts +2 -0
- package/dist/config/config-layer.d.ts +6 -19
- package/dist/config/config.resolver.d.ts +6 -14
- package/dist/config/config.validator.d.ts +6 -3
- package/dist/config/define-fields.d.ts +6 -46
- package/dist/config/effective-fields.d.ts +6 -29
- package/dist/config/entrypoint.normalizer.d.ts +6 -18
- package/dist/config/framework-behaviors-config.d.ts +11 -10
- package/dist/config/framework-config.d.ts +15 -15
- package/dist/config/framework-fields-config.d.ts +14 -7
- package/dist/config/framework-restrictions-config.d.ts +41 -61
- package/dist/config/pipeline-config.d.ts +7 -17
- package/dist/contracts/capability.d.ts +13 -49
- package/dist/contracts/client-contract-structure.validator.d.ts +7 -53
- package/dist/contracts/contract-canonicalizer.d.ts +4 -6
- package/dist/contracts/contract-hash.d.ts +3 -2
- package/dist/contracts/contract-limits.d.ts +7 -1
- package/dist/contracts/contract-protocol.d.ts +7 -8
- package/dist/contracts/contract.d.ts +13 -4
- package/dist/contracts/enum-definition.d.ts +2 -0
- package/dist/contracts/field.d.ts +30 -167
- package/dist/contracts/identifier.d.ts +1 -16
- package/dist/contracts/lifecycle-trait.d.ts +4 -3
- package/dist/contracts/resource-operations.d.ts +2 -62
- package/dist/contracts/resource.d.ts +2 -0
- package/dist/contracts/scalar-value-type.d.ts +16 -47
- package/dist/contracts/scalar.d.ts +4 -3
- package/dist/contracts/transaction-capability.d.ts +2 -0
- package/dist/contracts/wire-scalar-format.d.ts +6 -21
- package/dist/framework/contract-view.d.ts +30 -113
- package/dist/framework/framework-construction.error.d.ts +6 -1
- package/dist/framework/framework.d.ts +31 -46
- package/dist/framework/framework.factory.d.ts +3 -17
- package/dist/framework/operation-facade.d.ts +3 -7
- package/dist/operations/operation-arguments.d.ts +52 -207
- package/dist/operations/operation-call.d.ts +13 -15
- package/dist/operations/operation-identity.d.ts +4 -2
- package/dist/operations/operation-result.d.ts +15 -61
- package/dist/operations/operation-validator-core.d.ts +5 -4
- package/dist/operations/operation-validator.d.ts +5 -7
- package/dist/operations/projection-scope.resolver.d.ts +0 -10
- package/dist/operations/validation-code.d.ts +5 -17
- package/dist/operations/write-scope.resolver.d.ts +3 -28
- package/dist/protocol/absent-route.responder.d.ts +23 -38
- package/dist/protocol/av-protocol.d.ts +2 -8
- package/dist/protocol/contract-document.responder.d.ts +5 -18
- package/dist/protocol/http-request.decoder.d.ts +12 -59
- package/dist/protocol/http-request.reader.d.ts +5 -5
- package/dist/protocol/http-response.encoder.d.ts +14 -20
- package/dist/protocol/http-status.table.d.ts +0 -8
- package/dist/protocol/index.d.ts +2 -7
- package/dist/protocol/operation-response.guard.d.ts +0 -15
- package/dist/protocol/protocol-failure.d.ts +8 -27
- package/dist/protocol/protocol-headers.d.ts +15 -42
- package/dist/protocol/protocol-surface.d.ts +0 -22
- package/dist/protocol/protocol.binder.d.ts +16 -26
- package/dist/protocol/protocol.handler.d.ts +15 -23
- package/dist/runtime/decimal.d.ts +5 -3
- package/dist/runtime/diagnostics-reporter.d.ts +14 -34
- package/dist/runtime/error-boundary.d.ts +6 -10
- package/dist/runtime/execution-options.d.ts +3 -7
- package/dist/runtime/field-behavior.d.ts +12 -19
- package/dist/runtime/framework-error.d.ts +2 -2
- package/dist/runtime/json-value.d.ts +7 -15
- package/dist/runtime/mutation-planner.d.ts +6 -12
- package/dist/runtime/operation-request.d.ts +7 -0
- package/dist/runtime/operation-response.d.ts +18 -23
- package/dist/runtime/operation-runtime.d.ts +12 -27
- package/dist/runtime/pipeline.d.ts +14 -29
- package/dist/runtime/referential-action.d.ts +1 -26
- package/dist/runtime/request-id.d.ts +3 -10
- package/dist/runtime/scalar-runtime.d.ts +12 -12
- package/dist/transactions/deferred-operation.d.ts +10 -21
- package/dist/transactions/operation-arguments-encoder.d.ts +1 -0
- package/dist/transactions/operation-fingerprint.d.ts +3 -1
- package/dist/transactions/transaction-envelope.d.ts +2 -4
- package/dist/transactions/transaction-integrity-error.d.ts +4 -15
- package/dist/transactions/transaction-plan-assembler.d.ts +1 -0
- package/dist/transactions/transaction-plan-validator.d.ts +3 -17
- package/dist/transactions/transaction-reference-resolver.d.ts +9 -12
- package/dist/transactions/transaction-reference.d.ts +23 -28
- package/dist/transactions/transaction-request.d.ts +3 -5
- package/dist/transactions/transaction-response.d.ts +5 -7
- package/dist/transactions/transaction-runtime.d.ts +3 -3
- package/dist/transactions/transaction-slot-path-error.d.ts +5 -15
- package/dist/transactions/transaction-slot-writer.d.ts +3 -13
- package/package.json +1 -1
|
@@ -4,25 +4,23 @@ type TransactionRequestBase = {
|
|
|
4
4
|
readonly requestId: string;
|
|
5
5
|
readonly plan: unknown;
|
|
6
6
|
};
|
|
7
|
+
/** An in-process transaction request, run under the Application Contract. */
|
|
7
8
|
export type ApplicationTransactionRequest = TransactionRequestBase & {
|
|
8
9
|
readonly scope: "application";
|
|
9
10
|
readonly protocol?: never;
|
|
10
11
|
readonly transport?: never;
|
|
11
12
|
};
|
|
13
|
+
/** A remote transaction request, run under the Client Contract. */
|
|
12
14
|
export type ClientTransactionRequest = TransactionRequestBase & {
|
|
13
15
|
readonly scope: "client";
|
|
14
16
|
readonly protocol: ClientProtocolIdentity;
|
|
15
17
|
readonly transport?: PipelineTransportContext;
|
|
16
18
|
};
|
|
19
|
+
/** One transaction request, as `framework.executeTransaction` takes it. */
|
|
17
20
|
export type FrameworkTransactionRequest = ApplicationTransactionRequest | ClientTransactionRequest;
|
|
18
21
|
/**
|
|
19
22
|
* The origin one plan operation runs under: its own layer's Contract, its own
|
|
20
23
|
* pipelines, and — for a client step — the protocol identity it is accepted with.
|
|
21
|
-
* The untyped seam derives every operation's origin from the request; the typed
|
|
22
|
-
* runner states one per handle.
|
|
23
|
-
*
|
|
24
|
-
* Internal to the transaction runtime, and deliberately not a member of the
|
|
25
|
-
* request: the public seam's request cannot smuggle a per-operation origin.
|
|
26
24
|
*/
|
|
27
25
|
export type TransactionOperationOrigin = Pick<ApplicationTransactionRequest, "scope"> | Pick<ClientTransactionRequest, "scope" | "protocol" | "transport">;
|
|
28
26
|
export {};
|
|
@@ -1,17 +1,15 @@
|
|
|
1
1
|
import type { OperationFailureResponse } from "../runtime/operation-response.js";
|
|
2
|
-
/**
|
|
3
|
-
* A committed plan: each operation's final `data`, in plan order.
|
|
4
|
-
*
|
|
5
|
-
* `T` mirrors `OperationResponse<T>`: the untyped seam (`executeTransaction`)
|
|
6
|
-
* answers the default `readonly unknown[]`, and the typed runner
|
|
7
|
-
* (`framework.transaction`) supplies the per-position tuple its handles derive.
|
|
8
|
-
*/
|
|
2
|
+
/** A committed plan: each operation's final `data`, in plan order. */
|
|
9
3
|
export type TransactionCommittedResponse<T = readonly unknown[]> = {
|
|
10
4
|
readonly data: T;
|
|
11
5
|
readonly code: "A1009";
|
|
12
6
|
readonly cause: null;
|
|
13
7
|
};
|
|
8
|
+
/** What a transaction answers: committed (`A1009`) or a failure. */
|
|
14
9
|
export type TransactionResponse = TransactionCommittedResponse | OperationFailureResponse;
|
|
10
|
+
/** Builds the committed response. */
|
|
15
11
|
export declare function transactionCommitted(results: readonly unknown[]): TransactionCommittedResponse;
|
|
12
|
+
/** Builds the failure response of a plan step, naming the step in `cause.operation`. */
|
|
16
13
|
export declare function transactionOperationFailure(failure: OperationFailureResponse, operation: number): OperationFailureResponse;
|
|
14
|
+
/** Builds the `A3002` response for a transaction that itself failed. */
|
|
17
15
|
export declare function transactionInfrastructureFailure(operation?: number): OperationFailureResponse;
|
|
@@ -13,8 +13,8 @@ import type { TransactionResponse } from "./transaction-response.js";
|
|
|
13
13
|
*/
|
|
14
14
|
export type FrameworkTransactionExecutor = (request: FrameworkTransactionRequest, diagnostics: TransactionDiagnosticsChannel, origins?: readonly TransactionOperationOrigin[]) => Promise<TransactionResponse>;
|
|
15
15
|
/**
|
|
16
|
-
* Validates a whole plan through the Framework Validation Layer, then runs it
|
|
17
|
-
*
|
|
18
|
-
*
|
|
16
|
+
* Validates a whole plan through the Framework Validation Layer, then runs it inside
|
|
17
|
+
* exactly one Adapter transaction. Guards, pipes, hooks and interceptors of every plan
|
|
18
|
+
* operation run while the provider transaction is open.
|
|
19
19
|
*/
|
|
20
20
|
export declare function createTransactionRuntime<M extends AdapterModel>(dependencies: OperationRuntimeDependencies<M>): FrameworkTransactionExecutor;
|
|
@@ -1,22 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The ways a transaction slot path can fail to name a member of
|
|
3
|
-
*
|
|
4
|
-
* plan validator, so any of these is a framework defect rather than a caller
|
|
5
|
-
* error; the violation is the only thing that tells them apart, so it is
|
|
6
|
-
* structured data rather than message text.
|
|
7
|
-
*
|
|
8
|
-
* - `slot-prefix`: the path does not begin `["operations", <this operation>,
|
|
9
|
-
* "args", <member>]`, or the view itself is not an object.
|
|
10
|
-
* - `absent-member`: a segment names no own member of its container.
|
|
11
|
-
* - `non-object-ancestor`: a segment descends through a non-object value.
|
|
2
|
+
* The ways a transaction slot path can fail to name a member of its argument
|
|
3
|
+
* view. Each is a framework defect, not a caller error.
|
|
12
4
|
*/
|
|
13
5
|
export type TransactionSlotPathViolation = "slot-prefix" | "absent-member" | "non-object-ancestor";
|
|
14
6
|
/**
|
|
15
|
-
*
|
|
16
|
-
* the
|
|
17
|
-
*
|
|
18
|
-
* guard's `A3000`. It reaches a diagnostics sink as the raw `error`, where the
|
|
19
|
-
* violation discriminates the three defects.
|
|
7
|
+
* Thrown internally when a slot path does not name a member of its argument
|
|
8
|
+
* view; the caller receives `A3000`, and the diagnostics sink receives this
|
|
9
|
+
* error.
|
|
20
10
|
*/
|
|
21
11
|
export declare class TransactionSlotPathError extends Error {
|
|
22
12
|
readonly violation: TransactionSlotPathViolation;
|
|
@@ -1,18 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The one owner of writing a value at a transaction slot path. Validation installs
|
|
3
|
-
* framework-owned `$ref` control snapshots through it and execution installs
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* Slot paths are collected once, from the validated semantic argument view.
|
|
8
|
-
* Validation then writes them into two views: that semantic view, where the path
|
|
9
|
-
* is known to name a member, and the raw wire view
|
|
10
|
-
* (`operation.request.arguments`), where the same path is asserted rather than
|
|
11
|
-
* established. It holds there because a slot names a scalar leaf key inside
|
|
12
|
-
* top-level mutation data and Framework Validation Layer normalization preserves
|
|
13
|
-
* that `data`-leaf key structure. A path that does not name a member of the view
|
|
14
|
-
* being written is therefore a framework defect either way, and fails loudly
|
|
15
|
-
* rather than being skipped.
|
|
3
|
+
* framework-owned `$ref` control snapshots through it and execution installs resolved
|
|
4
|
+
* final data through it, so both argument views are produced by the same ancestor-
|
|
5
|
+
* cloning walker.
|
|
16
6
|
*/
|
|
17
7
|
type Path = readonly (string | number)[];
|
|
18
8
|
/** One value to install at a full transaction slot path. */
|