@astrale-os/kernel-dsl 1.0.0-beta.18 → 1.0.0-beta.19
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.
|
@@ -114,7 +114,7 @@ export interface NodeClassInput {
|
|
|
114
114
|
*/
|
|
115
115
|
export type NodeUniqueTupleInput = readonly [string, ...string[]];
|
|
116
116
|
/** Members every authored Edge Class shares. */
|
|
117
|
-
export interface
|
|
117
|
+
export interface EdgeClassCommon {
|
|
118
118
|
readonly abstract?: boolean;
|
|
119
119
|
/** Which Classes may extend this one; omitted, those of its own Domain only (`'internal'`). */
|
|
120
120
|
readonly inheritance?: Inheritance;
|
|
@@ -138,7 +138,7 @@ export type EdgeUniqueFieldInput = 'source' | 'target' | 'slug' | {
|
|
|
138
138
|
/** The distinct fields of one key, in any order. */
|
|
139
139
|
export type EdgeUniqueTupleInput = readonly [EdgeUniqueFieldInput, ...EdgeUniqueFieldInput[]];
|
|
140
140
|
/** Authored directed Edge Class. */
|
|
141
|
-
export interface DirectedEdgeInput extends
|
|
141
|
+
export interface DirectedEdgeInput extends EdgeClassCommon {
|
|
142
142
|
readonly orientation: 'directed';
|
|
143
143
|
readonly source: DirectedSourceInput;
|
|
144
144
|
readonly target: DirectedTargetInput;
|
|
@@ -149,12 +149,11 @@ export interface DirectedEdgeInput extends EdgeClassOptions {
|
|
|
149
149
|
readonly unique?: readonly EdgeUniqueTupleInput[];
|
|
150
150
|
}
|
|
151
151
|
/** Authored undirected Edge Class. */
|
|
152
|
-
export interface UndirectedEdgeInput extends Omit<
|
|
152
|
+
export interface UndirectedEdgeInput extends Omit<EdgeClassCommon, 'constraints'> {
|
|
153
153
|
readonly orientation: 'undirected';
|
|
154
154
|
readonly endpoints: readonly [IncidentEndpointInput, IncidentEndpointInput];
|
|
155
155
|
readonly constraints?: {
|
|
156
156
|
readonly noSelf?: true;
|
|
157
157
|
};
|
|
158
158
|
}
|
|
159
|
-
export type EdgeClassCommon = EdgeClassOptions;
|
|
160
159
|
export type EdgeClassInput = DirectedEdgeInput | UndirectedEdgeInput;
|
|
@@ -1,11 +1,6 @@
|
|
|
1
1
|
import type { DefinitionKey, DefinitionRef, Key, Revision } from '../../addressing/index.js';
|
|
2
2
|
import type { DomainDependency } from '../../addressing/index.js';
|
|
3
|
-
import type { MethodOwnerKeyOf, ResolvedCallable, ResolvedFunction } from '../../language/
|
|
4
|
-
import type { AnyResolvedClass } from '../../language/class/resolved.js';
|
|
5
|
-
import type { ResolvedCoreDefinition, ResolvedCoreEdge } from '../../language/core/resolved.js';
|
|
6
|
-
import type { ResolvedPolicy } from '../../language/policy/resolved.js';
|
|
7
|
-
import type { ResolvedDefinition, ResolvedDefinitionOf } from '../../language/resolved.js';
|
|
8
|
-
import type { ResolvedView } from '../../language/view/resolved.js';
|
|
3
|
+
import type { AnyResolvedClass, MethodOwnerKeyOf, PropertyInputOf, ResolvedCallable, ResolvedCoreDefinition, ResolvedCoreEdge, ResolvedDefinition, ResolvedDefinitionOf, ResolvedFunction, ResolvedPolicy, ResolvedView } from '../../language/index.js';
|
|
9
4
|
export type ClassNamespace<Classes extends Readonly<Record<string, unknown>> = Readonly<Record<string, AnyResolvedClass>>> = Readonly<Classes>;
|
|
10
5
|
export type FunctionNamespace<Functions extends Readonly<Record<string, unknown>> = Readonly<Record<string, ResolvedFunction>>> = Readonly<Functions>;
|
|
11
6
|
export type PolicyNamespace<Policies extends Readonly<Record<string, unknown>> = Readonly<Record<string, ResolvedPolicy>>> = Readonly<Policies>;
|
|
@@ -53,6 +48,6 @@ export type MethodOwnerOf<Work extends Domain, Method> = Extract<ClassesOf<Work>
|
|
|
53
48
|
export type FunctionsOf<Value> = Value extends Domain<Readonly<Record<string, unknown>>, infer Functions> ? Functions : never;
|
|
54
49
|
export type PoliciesOf<Value> = Value extends Domain<Readonly<Record<string, unknown>>, Readonly<Record<string, unknown>>, infer Policies> ? Policies : never;
|
|
55
50
|
export type ViewsOf<Value> = Value extends Domain<Readonly<Record<string, unknown>>, Readonly<Record<string, unknown>>, Readonly<Record<string, unknown>>, infer Views> ? Views : never;
|
|
56
|
-
export type PropertyInputFor<Class extends AnyResolvedClass> =
|
|
51
|
+
export type PropertyInputFor<Class extends AnyResolvedClass> = PropertyInputOf<Class>;
|
|
57
52
|
export type PropertyValuesFor<Class extends AnyResolvedClass> = ReturnType<Class['properties']['from']>;
|
|
58
53
|
export {};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { Value } from '@astrale-os/kernel-dsl/value';
|
|
2
2
|
import type { Definition, Key, Revision } from '../../addressing/index.js';
|
|
3
3
|
import type { DomainSchema } from '../model/schema.js';
|
|
4
|
-
import type { ReferenceSite } from '../resolution/origins.js';
|
|
5
4
|
import type { MeaningDifference } from './diff.js';
|
|
6
5
|
export type Fingerprint = `sha256:${string}`;
|
|
7
6
|
/**
|
|
@@ -56,7 +55,7 @@ export interface Subject {
|
|
|
56
55
|
export interface Usage {
|
|
57
56
|
readonly source: SchemaIdentity;
|
|
58
57
|
readonly key?: Key;
|
|
59
|
-
readonly relation:
|
|
58
|
+
readonly relation: 'extends' | 'core' | 'endpoint' | 'value' | 'policy' | 'pattern' | 'member' | 'abstract' | 'selection' | 'capability';
|
|
60
59
|
}
|
|
61
60
|
export type Facet = 'class.reference' | 'class.inherit' | 'class.composition' | 'class.properties' | 'class.endpoints' | 'class.inheritance' | 'property' | 'property.required' | 'method.existence' | 'method.object' | 'method.inheritance' | 'method.signature' | 'function.existence' | 'function.signature' | 'policy' | 'view' | 'core';
|
|
62
61
|
/** A fact about a compared facet, including unchanged facets. No admission decision is implied. */
|
|
@@ -28,7 +28,8 @@ export interface DomainSchemaIR {
|
|
|
28
28
|
* its in-process proofs. The structure the Kernel enforces has this type, which the build checks
|
|
29
29
|
* (`validation/domain.structure.typecheck.ts`), and the published JSON Schema describes it.
|
|
30
30
|
*/
|
|
31
|
-
export
|
|
31
|
+
export interface DomainSchemaDocument extends DocumentOf<DomainSchemaIR> {
|
|
32
|
+
}
|
|
32
33
|
/**
|
|
33
34
|
* The JSON document a model type describes. A `Revision` and `PropertyValues` are in-process
|
|
34
35
|
* proofs: the document carries them as plain text and plain values.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@astrale-os/kernel-dsl",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.19",
|
|
4
4
|
"description": "Astrale Kernel DSL - Schema authoring, inference, and IR serialization",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -79,6 +79,10 @@
|
|
|
79
79
|
"types": "./dist/v1/schema/revision.d.ts",
|
|
80
80
|
"import": "./dist/v1/schema/revision.js"
|
|
81
81
|
},
|
|
82
|
+
"./v1/schema/values": {
|
|
83
|
+
"types": "./dist/v1/schema/validation/value-api.d.ts",
|
|
84
|
+
"import": "./dist/v1/schema/validation/value-api.js"
|
|
85
|
+
},
|
|
82
86
|
"./v1/schema/domain-schema.schema.json": "./dist/v1/schema/.spec/schemas/domain-schema.schema.json",
|
|
83
87
|
"./v1/schema/value-schema.schema.json": "./dist/v1/language/.spec/schemas/value-schema.schema.json",
|
|
84
88
|
"./v1/schema/draft-2020-12.schema.json": "./dist/v1/language/.spec/schemas/draft-2020-12.schema.json",
|