@astrale-os/kernel-dsl 0.2.0-beta.35 → 0.2.0-beta.36

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.
@@ -0,0 +1,57 @@
1
+ import type { Value as JsonValue } from '@astrale-os/kernel-dsl/value';
2
+ import type { Definition, Key as SemanticKey, Revision } from '../../addressing/index.js';
3
+ import type { DomainSchema } from '../model/schema.js';
4
+ import type { MeaningDifference } from './diff.js';
5
+ import type { DependencyMeaningLevel } from './fields.js';
6
+ import type { MeaningFingerprint } from './meaning.js';
7
+ export type DependencyMeaningChangeKind = 'missing' | 'changed' | 'added';
8
+ export type DependencyMeaningChange = {
9
+ readonly key: SemanticKey;
10
+ readonly kind: 'missing';
11
+ readonly sourceFingerprint: MeaningFingerprint;
12
+ } | {
13
+ readonly key: SemanticKey;
14
+ readonly kind: 'changed';
15
+ readonly sourceFingerprint: MeaningFingerprint;
16
+ readonly targetFingerprint: MeaningFingerprint;
17
+ /** Every exact path of the meaning that differs, in JSON Pointer order. */
18
+ readonly differences: readonly MeaningDifference[];
19
+ } | {
20
+ /** A required, non-automatic Property the target adds to an inherited Class. */
21
+ readonly key: SemanticKey;
22
+ readonly kind: 'added';
23
+ readonly targetFingerprint: MeaningFingerprint;
24
+ readonly meaning: JsonValue;
25
+ };
26
+ export interface DependencyMeaningComparison {
27
+ readonly version: 3;
28
+ readonly dependency: SemanticKey.Origin;
29
+ readonly source: Revision;
30
+ readonly target: Revision;
31
+ readonly footprint: readonly SemanticKey[];
32
+ readonly changes: readonly DependencyMeaningChange[];
33
+ readonly fingerprint: MeaningFingerprint;
34
+ }
35
+ /** One footprint entry: the Key, what it is, and for a Class how strongly it is used. */
36
+ export interface FootprintEntry {
37
+ readonly key: SemanticKey;
38
+ readonly kind: Definition.Kind | 'property' | 'method';
39
+ readonly level?: DependencyMeaningLevel;
40
+ }
41
+ /**
42
+ * Compare the exact V1 meaning one accepted Domain used from a retained dependency with a
43
+ * candidate revision of that same dependency origin. This operation is pure and makes no
44
+ * lifecycle-compatibility decision.
45
+ */
46
+ export declare function compareDependencyMeaning(dependent: DomainSchema, target: DomainSchema): DependencyMeaningComparison;
47
+ /** Compare one explicit non-empty source member surface and its reachable V1 meaning. */
48
+ export declare function compareMemberMeaning(source: DomainSchema, target: DomainSchema, roots: readonly [SemanticKey, ...SemanticKey[]]): DependencyMeaningComparison;
49
+ /** The footprint one accepted Domain takes from a retained dependency, Key-ordered. */
50
+ export declare function footprintOf(dependent: DomainSchema, origin: SemanticKey.Origin): readonly FootprintEntry[];
51
+ /**
52
+ * The meaning one Domain gives one of its own Keys at a usage level; a Key the Domain does not
53
+ * declare is rejected with DM_MEMBER_ROOT_INVALID.
54
+ */
55
+ export declare function meaningOf(schema: DomainSchema, key: SemanticKey, level?: DependencyMeaningLevel): JsonValue;
56
+ /** One line an operator can act on, naming the exact paths of a changed meaning. */
57
+ export declare function describeMeaningChange(change: DependencyMeaningChange): string;
@@ -0,0 +1,166 @@
1
+ import { compareUnicode } from '../../addressing/ordering.js';
2
+ import { revisionOfDomainSchema } from '../canonical/revision.js';
3
+ import { SchemaError, diagnostic } from '../diagnostic.js';
4
+ import { knownDomainClosure } from '../resolution/closure.js';
5
+ import { resolve } from '../resolution/domain.js';
6
+ import { contextOf, effectiveDefinition } from './context.js';
7
+ import { differences } from './diff.js';
8
+ import { collectReachableMeanings, collectSchemaRoots, coordinateForKey } from './footprint.js';
9
+ import { fingerprintMeaning, meaningForCoordinate, propertyMeaning } from './meaning.js';
10
+ /**
11
+ * Compare the exact V1 meaning one accepted Domain used from a retained dependency with a
12
+ * candidate revision of that same dependency origin. This operation is pure and makes no
13
+ * lifecycle-compatibility decision.
14
+ */
15
+ export function compareDependencyMeaning(dependent, target) {
16
+ const { source, meanings } = retainedMeanings(dependent, target.origin, '/target/origin');
17
+ return compareSourceMeanings(source, target, meanings);
18
+ }
19
+ /** Compare one explicit non-empty source member surface and its reachable V1 meaning. */
20
+ export function compareMemberMeaning(source, target, roots) {
21
+ if (source.origin !== target.origin) {
22
+ throw new SchemaError([
23
+ diagnostic('DM_MEMBER_ORIGIN_MISMATCH', '/target/origin', `Member comparison target ${target.origin} does not match source ${source.origin}.`),
24
+ ]);
25
+ }
26
+ if (!Array.isArray(roots) || roots.length === 0 || new Set(roots).size !== roots.length) {
27
+ throw new SchemaError([
28
+ diagnostic('DM_MEMBER_ROOT_INVALID', '/roots', 'Member comparison roots must be one non-empty duplicate-free Key set.'),
29
+ ]);
30
+ }
31
+ resolve(source);
32
+ const context = contextOf(source);
33
+ const coordinates = roots.map((key, index) => coordinateForKey(context, source, key, index));
34
+ const meanings = collectReachableMeanings(coordinates, source.origin, context);
35
+ return compareSourceMeanings(source, target, meanings);
36
+ }
37
+ /** The footprint one accepted Domain takes from a retained dependency, Key-ordered. */
38
+ export function footprintOf(dependent, origin) {
39
+ const { meanings } = retainedMeanings(dependent, origin, '/origin');
40
+ return Object.freeze([...meanings.values()]
41
+ .map(({ coordinate }) => Object.freeze({
42
+ key: coordinate.key,
43
+ kind: coordinate.kind === 'member' ? coordinate.ref.kind : coordinate.kind,
44
+ ...(coordinate.kind === 'class' ? { level: coordinate.level } : {}),
45
+ }))
46
+ .sort((left, right) => compareUnicode(left.key, right.key)));
47
+ }
48
+ /**
49
+ * The meaning one Domain gives one of its own Keys at a usage level; a Key the Domain does not
50
+ * declare is rejected with DM_MEMBER_ROOT_INVALID.
51
+ */
52
+ export function meaningOf(schema, key, level = 'reference') {
53
+ resolve(schema);
54
+ const context = contextOf(schema);
55
+ const coordinate = coordinateForKey(context, schema, key, 0, level);
56
+ return meaningForCoordinate(context, coordinate);
57
+ }
58
+ /** One line an operator can act on, naming the exact paths of a changed meaning. */
59
+ export function describeMeaningChange(change) {
60
+ switch (change.kind) {
61
+ case 'missing':
62
+ return `${change.key} missing`;
63
+ case 'added':
64
+ return `${change.key} added as an obligation`;
65
+ case 'changed': {
66
+ const paths = change.differences.map(({ path }) => path);
67
+ const shown = paths.slice(0, 3).join(', ');
68
+ return `${change.key} changed at ${paths.length > 3 ? `${shown} and ${paths.length - 3} more` : shown}`;
69
+ }
70
+ }
71
+ }
72
+ /** The retained dependency at one origin and every meaning the dependent reaches in it. */
73
+ function retainedMeanings(dependent, origin, path) {
74
+ resolve(dependent);
75
+ const context = contextOf(dependent);
76
+ const source = (knownDomainClosure(dependent) ?? []).find((candidate) => candidate.schema.origin === origin)?.schema;
77
+ if (source === undefined) {
78
+ throw new SchemaError([
79
+ diagnostic('DM_DEPENDENCY_NOT_RETAINED', path, `Domain ${dependent.origin} was not admitted with a dependency at ${origin}.`),
80
+ ]);
81
+ }
82
+ return {
83
+ source,
84
+ meanings: collectReachableMeanings(collectSchemaRoots(dependent), source.origin, context),
85
+ };
86
+ }
87
+ /**
88
+ * A footprint coordinate is unchanged only when the same Key exists in the target with the same
89
+ * meaning projected onto the source requirement of its usage level. Additions outside the
90
+ * footprint are free; a required non-automatic Property the target adds to an inherited Class is
91
+ * the one addition reported, as an obligation.
92
+ */
93
+ function compareSourceMeanings(source, target, sourceMeanings) {
94
+ // Prove the candidate still has an exact accepted semantic context before comparing it.
95
+ resolve(target);
96
+ const context = contextOf(target);
97
+ const footprint = Object.freeze([...sourceMeanings.keys()].sort(compareUnicode));
98
+ const changes = [];
99
+ const comparisonCoordinates = [];
100
+ for (const key of footprint) {
101
+ const sourceMeaning = sourceMeanings.get(key);
102
+ const targetMeaning = meaningForCoordinate(context, sourceMeaning.coordinate, sourceMeaning.requirement);
103
+ const targetFingerprint = targetMeaning === undefined ? undefined : fingerprintMeaning(targetMeaning);
104
+ comparisonCoordinates.push([
105
+ key,
106
+ sourceMeaning.fingerprint,
107
+ targetFingerprint ?? null,
108
+ ]);
109
+ if (targetMeaning === undefined || targetFingerprint === undefined) {
110
+ changes.push(Object.freeze({ key, kind: 'missing', sourceFingerprint: sourceMeaning.fingerprint }));
111
+ }
112
+ else if (targetFingerprint !== sourceMeaning.fingerprint) {
113
+ changes.push(Object.freeze({
114
+ key,
115
+ kind: 'changed',
116
+ sourceFingerprint: sourceMeaning.fingerprint,
117
+ targetFingerprint,
118
+ differences: differences(sourceMeaning.meaning, targetMeaning),
119
+ }));
120
+ }
121
+ }
122
+ const additions = addedObligations(context, sourceMeanings);
123
+ const sourceRevision = revisionOfDomainSchema(source);
124
+ const targetRevision = revisionOfDomainSchema(target);
125
+ const fingerprint = fingerprintMeaning({
126
+ version: 3,
127
+ dependency: source.origin,
128
+ source: sourceRevision,
129
+ target: targetRevision,
130
+ coordinates: comparisonCoordinates,
131
+ additions: additions.map(({ key, targetFingerprint }) => [key, targetFingerprint]),
132
+ });
133
+ return Object.freeze({
134
+ version: 3,
135
+ dependency: source.origin,
136
+ source: sourceRevision,
137
+ target: targetRevision,
138
+ footprint,
139
+ changes: Object.freeze([...changes, ...additions]),
140
+ fingerprint,
141
+ });
142
+ }
143
+ /** A target may extend an inherited Class only with optional or automatic Properties. */
144
+ function addedObligations(context, sourceMeanings) {
145
+ const additions = new Map();
146
+ for (const { coordinate, requirement } of sourceMeanings.values()) {
147
+ if (coordinate.kind !== 'class' || coordinate.level !== 'inherit' || requirement === undefined)
148
+ continue;
149
+ const owner = context.schemas.get(coordinate.ref.origin);
150
+ const analysis = owner === undefined ? undefined : effectiveDefinition(context, owner, coordinate.ref);
151
+ if (analysis === undefined)
152
+ continue;
153
+ for (const field of analysis.properties.values()) {
154
+ if (requirement.properties.has(field.identity) || !field.required || field.auto !== undefined)
155
+ continue;
156
+ const meaning = propertyMeaning(field);
157
+ additions.set(field.identity, Object.freeze({
158
+ key: field.identity,
159
+ kind: 'added',
160
+ targetFingerprint: fingerprintMeaning(meaning),
161
+ meaning,
162
+ }));
163
+ }
164
+ }
165
+ return [...additions.values()].sort((left, right) => compareUnicode(left.key, right.key));
166
+ }
@@ -0,0 +1,15 @@
1
+ import type { ClassRef, DefinitionRef, Key as SemanticKey } from '../../addressing/index.js';
2
+ import type { DefinitionAnalysis, EffectiveMethod } from '../analysis/class.js';
3
+ import type { DomainSchema } from '../model/schema.js';
4
+ import { SchemaError } from '../diagnostic.js';
5
+ /** One accepted root with its exact closure and a memoized semantic analysis per owner. */
6
+ export interface Context {
7
+ readonly schemas: ReadonlyMap<string, DomainSchema>;
8
+ analysis(owner: DomainSchema): ReadonlyMap<string, DefinitionAnalysis> | undefined;
9
+ }
10
+ export declare function contextOf(root: DomainSchema): Context;
11
+ export declare function effectiveDefinition(context: Context, owner: DomainSchema, ref: ClassRef): DefinitionAnalysis | undefined;
12
+ /** Effective Methods are keyed by name; a coordinate names one by its exact Method Key. */
13
+ export declare function effectiveMethod(analysis: DefinitionAnalysis, key: SemanticKey): EffectiveMethod | undefined;
14
+ export declare function requireOwner(context: Context, ref: DefinitionRef, key: SemanticKey): DomainSchema;
15
+ export declare function contextInvalid(message: string, key: SemanticKey): SchemaError;
@@ -0,0 +1,43 @@
1
+ import { MethodKey } from '../../addressing/index.js';
2
+ import { definitionRefIndex } from '../../addressing/ordering.js';
3
+ import { SchemaError, diagnostic } from '../diagnostic.js';
4
+ import { knownDomainClosure, lookupForDomainClosure } from '../resolution/closure.js';
5
+ import { validateDomainSchemaSemantics } from '../validation/domain.js';
6
+ export function contextOf(root) {
7
+ const schemas = new Map([
8
+ [root.origin, root],
9
+ ...(knownDomainClosure(root) ?? []).map(({ schema }) => [schema.origin, schema]),
10
+ ]);
11
+ const analyses = new Map();
12
+ return {
13
+ schemas,
14
+ analysis(owner) {
15
+ if (!analyses.has(owner)) {
16
+ const validation = validateDomainSchemaSemantics(owner, lookupForDomainClosure(owner));
17
+ analyses.set(owner, validation.diagnostics.length > 0 ? undefined : validation.analysis.definitions);
18
+ }
19
+ return analyses.get(owner);
20
+ },
21
+ };
22
+ }
23
+ export function effectiveDefinition(context, owner, ref) {
24
+ return context.analysis(owner)?.get(definitionRefIndex(ref));
25
+ }
26
+ /** Effective Methods are keyed by name; a coordinate names one by its exact Method Key. */
27
+ export function effectiveMethod(analysis, key) {
28
+ for (const method of analysis.methods.values()) {
29
+ if (MethodKey.of(method.owner, method.name) === key)
30
+ return method;
31
+ }
32
+ return undefined;
33
+ }
34
+ export function requireOwner(context, ref, key) {
35
+ const owner = context.schemas.get(ref.origin);
36
+ if (owner === undefined) {
37
+ throw contextInvalid(`Retained acceptance context cannot resolve ${key}.`, key);
38
+ }
39
+ return owner;
40
+ }
41
+ export function contextInvalid(message, key) {
42
+ return new SchemaError([diagnostic('DM_DEPENDENCY_CONTEXT_INVALID', '', message, key)]);
43
+ }
@@ -0,0 +1,44 @@
1
+ import type { ClassRef, Definition, DefinitionRef, Key as SemanticKey, PropertyKey as SemanticPropertyKey } from '../../addressing/index.js';
2
+ import type { ReferenceSite } from '../resolution/origins.js';
3
+ import type { DependencyMeaningLevel } from './fields.js';
4
+ export type MemberRef = DefinitionRef<Exclude<Definition.Kind, 'class'>>;
5
+ export type ClassCoordinate = Readonly<{
6
+ kind: 'class';
7
+ key: SemanticKey;
8
+ ref: ClassRef;
9
+ level: DependencyMeaningLevel;
10
+ }>;
11
+ export type MemberCoordinate = Readonly<{
12
+ kind: 'member';
13
+ key: SemanticKey;
14
+ ref: MemberRef;
15
+ }>;
16
+ export type PropertyCoordinate = Readonly<{
17
+ kind: 'property';
18
+ key: SemanticPropertyKey;
19
+ owner: ClassRef;
20
+ name: string;
21
+ }>;
22
+ export type MethodCoordinate = Readonly<{
23
+ kind: 'method';
24
+ key: SemanticKey;
25
+ owner: ClassRef;
26
+ name: string;
27
+ }>;
28
+ /** One exact semantic location of a dependency, as the dependent reaches it. */
29
+ export type Coordinate = ClassCoordinate | MemberCoordinate | PropertyCoordinate | MethodCoordinate;
30
+ /** `extends` and Core instantiation take on the creation contract; every other site only refers. */
31
+ export declare function levelOf(site: ReferenceSite | undefined): DependencyMeaningLevel;
32
+ export declare function classCoordinate(ref: ClassRef, level: DependencyMeaningLevel): ClassCoordinate;
33
+ export declare function memberCoordinate(ref: MemberRef): MemberCoordinate;
34
+ export declare function propertyCoordinate(owner: ClassRef, name: string): PropertyCoordinate;
35
+ export declare function methodCoordinate(owner: ClassRef, name: string): MethodCoordinate;
36
+ export declare function keyForDefinitionRef(ref: DefinitionRef): SemanticKey;
37
+ export interface ParsedKeyReference {
38
+ readonly kind: Definition.Kind;
39
+ readonly name: string;
40
+ readonly member?: 'property' | 'method';
41
+ readonly ownerName?: string;
42
+ }
43
+ /** Interpret one canonical V1 Key as a Definition or a Class member location. */
44
+ export declare function keyReference(key: SemanticKey): ParsedKeyReference;
@@ -0,0 +1,42 @@
1
+ import { Key, MethodKey, PropertyKey } from '../../addressing/index.js';
2
+ import { SchemaError, diagnostic } from '../diagnostic.js';
3
+ /** `extends` and Core instantiation take on the creation contract; every other site only refers. */
4
+ export function levelOf(site) {
5
+ return site === 'extends' || site === 'core' ? 'inherit' : 'reference';
6
+ }
7
+ export function classCoordinate(ref, level) {
8
+ return Object.freeze({ kind: 'class', key: keyForDefinitionRef(ref), ref, level });
9
+ }
10
+ export function memberCoordinate(ref) {
11
+ return Object.freeze({ kind: 'member', key: keyForDefinitionRef(ref), ref });
12
+ }
13
+ export function propertyCoordinate(owner, name) {
14
+ return Object.freeze({ kind: 'property', key: PropertyKey.of(owner, name), owner, name });
15
+ }
16
+ export function methodCoordinate(owner, name) {
17
+ return Object.freeze({ kind: 'method', key: MethodKey.of(owner, name), owner, name });
18
+ }
19
+ export function keyForDefinitionRef(ref) {
20
+ return ref.kind === 'core'
21
+ ? Key.of(ref)
22
+ : Key.of(ref);
23
+ }
24
+ /** Interpret one canonical V1 Key as a Definition or a Class member location. */
25
+ export function keyReference(key) {
26
+ const semantic = key.slice(key.indexOf(':') + 1);
27
+ const parts = semantic.split('.');
28
+ if (parts[0] === 'core' && parts.length === 2) {
29
+ return { kind: 'core', name: parts[1] };
30
+ }
31
+ if (parts.length === 2) {
32
+ return { kind: parts[0], name: parts[1] };
33
+ }
34
+ if (parts.length === 4 &&
35
+ parts[0] === 'class' &&
36
+ (parts[2] === 'property' || parts[2] === 'method')) {
37
+ return { kind: 'class', name: parts[3], member: parts[2], ownerName: parts[1] };
38
+ }
39
+ throw new SchemaError([
40
+ diagnostic('DM_MEMBER_ROOT_INVALID', '/roots', `Key ${key} has no supported V1 shape.`, key),
41
+ ]);
42
+ }
@@ -0,0 +1,12 @@
1
+ import type { Value as JsonValue } from '@astrale-os/kernel-dsl/value';
2
+ /**
3
+ * One exact place where two meanings differ, addressed by JSON Pointer into the meaning value.
4
+ * An absent side is omitted: `before` only means removed, `after` only means added.
5
+ */
6
+ export interface MeaningDifference {
7
+ readonly path: string;
8
+ readonly before?: JsonValue;
9
+ readonly after?: JsonValue;
10
+ }
11
+ /** Structural differences between two portable values, leaf by leaf, in JSON Pointer order. */
12
+ export declare function differences(before: JsonValue, after: JsonValue): readonly MeaningDifference[];
@@ -0,0 +1,39 @@
1
+ import { compareUnicode } from '../../addressing/ordering.js';
2
+ import { isValueObject as isJsonObject } from '../../language/value/model/object.js';
3
+ /** Structural differences between two portable values, leaf by leaf, in JSON Pointer order. */
4
+ export function differences(before, after) {
5
+ const found = [];
6
+ collect(before, after, '', found);
7
+ return Object.freeze(found.sort((left, right) => compareUnicode(left.path, right.path)));
8
+ }
9
+ function collect(before, after, path, found) {
10
+ if (Array.isArray(before) && Array.isArray(after)) {
11
+ const length = Math.max(before.length, after.length);
12
+ for (let index = 0; index < length; index += 1) {
13
+ collect(before[index], after[index], `${path}/${index}`, found);
14
+ }
15
+ return;
16
+ }
17
+ if (isJsonObject(before) && isJsonObject(after)) {
18
+ const keys = [...new Set([...Object.keys(before), ...Object.keys(after)])].sort(compareUnicode);
19
+ for (const key of keys) {
20
+ collect(before[key], after[key], `${path}/${escape(key)}`, found);
21
+ }
22
+ return;
23
+ }
24
+ if (before === undefined && after === undefined)
25
+ return;
26
+ if (before !== undefined &&
27
+ after !== undefined &&
28
+ JSON.stringify(before) === JSON.stringify(after)) {
29
+ return;
30
+ }
31
+ found.push(Object.freeze({
32
+ path,
33
+ ...(before === undefined ? {} : { before }),
34
+ ...(after === undefined ? {} : { after }),
35
+ }));
36
+ }
37
+ function escape(segment) {
38
+ return segment.replaceAll('~', '~0').replaceAll('/', '~1');
39
+ }
@@ -0,0 +1,180 @@
1
+ /**
2
+ * How strongly a dependent relies on a dependency Class. `inherit` covers `extends` and Core
3
+ * instantiation, which take on the Class creation contract; `reference` covers every other site,
4
+ * which only names the Class and reads its surface.
5
+ */
6
+ export type DependencyMeaningLevel = 'reference' | 'inherit';
7
+ /**
8
+ * Where one declaration field counts for a dependent:
9
+ * - `always`: at every usage level;
10
+ * - `inherit`: only when the dependent inherits or instantiates the Class;
11
+ * - `members`: as separate Property and Method coordinates with their own meaning;
12
+ * - `excluded`: never, for the stated reason.
13
+ *
14
+ * Every field of every declaration kind is classified below. A field added to the DSL does not
15
+ * compile until it is classified, so meaning can only be narrowed by an explicit decision.
16
+ */
17
+ export type FieldRole = 'always' | 'inherit' | 'members' | {
18
+ readonly excluded: 'identity' | 'annotation' | 'authorization' | 'presentation';
19
+ };
20
+ /** The coordinate Key already names the declaration; its `ref` is never repeated in the meaning. */
21
+ export declare const CLASS_FIELDS: Readonly<{
22
+ ref: Readonly<{
23
+ excluded: 'identity';
24
+ }>;
25
+ kind: "always";
26
+ abstract: "always";
27
+ orientation: "always";
28
+ extends: "inherit";
29
+ policies: "inherit";
30
+ data: "inherit";
31
+ endpoints: "inherit";
32
+ constraints: "inherit";
33
+ properties: "members";
34
+ methods: "members";
35
+ description: Readonly<{
36
+ excluded: 'annotation';
37
+ }>;
38
+ icon: Readonly<{
39
+ excluded: 'presentation';
40
+ }>;
41
+ }>;
42
+ export declare const PROPERTY_FIELDS: Readonly<{
43
+ schema: "always";
44
+ required: "always";
45
+ auto: "always";
46
+ state: "always";
47
+ description: Readonly<{
48
+ excluded: 'annotation';
49
+ }>;
50
+ }>;
51
+ /** The auth level and Policy check are decided by the Runtime at invocation, never compiled against. */
52
+ export declare const CALLABLE_FIELDS: Readonly<{
53
+ ref: Readonly<{
54
+ excluded: 'identity';
55
+ }>;
56
+ input: "always";
57
+ output: "always";
58
+ static: "always";
59
+ abstract: "always";
60
+ auth: Readonly<{
61
+ excluded: 'authorization';
62
+ }>;
63
+ policy: Readonly<{
64
+ excluded: 'authorization';
65
+ }>;
66
+ description: Readonly<{
67
+ excluded: 'annotation';
68
+ }>;
69
+ }>;
70
+ export declare const POLICY_FIELDS: Readonly<{
71
+ ref: Readonly<{
72
+ excluded: 'identity';
73
+ }>;
74
+ expression: "always";
75
+ description: Readonly<{
76
+ excluded: 'annotation';
77
+ }>;
78
+ }>;
79
+ export declare const VIEW_FIELDS: Readonly<{
80
+ ref: Readonly<{
81
+ excluded: 'identity';
82
+ }>;
83
+ target: "always";
84
+ description: Readonly<{
85
+ excluded: 'annotation';
86
+ }>;
87
+ }>;
88
+ export declare const CORE_FIELDS: Readonly<{
89
+ ref: Readonly<{
90
+ excluded: 'identity';
91
+ }>;
92
+ class: "always";
93
+ properties: "always";
94
+ source: "always";
95
+ target: "always";
96
+ }>;
97
+ /**
98
+ * JSON Schema keywords that annotate a value schema without constraining its values. Every other
99
+ * keyword, `x-astrale-path` included, is semantic; arbitrary JSON data is never inspected as schema.
100
+ * A frozen, Unicode-ordered list like the role tables: printable, and immutable at runtime.
101
+ */
102
+ export declare const ANNOTATION_KEYWORDS: readonly string[];
103
+ /** The complete classification, one table per declaration kind. */
104
+ export declare const FIELD_ROLES: Readonly<{
105
+ class: Readonly<{
106
+ ref: Readonly<{
107
+ excluded: 'identity';
108
+ }>;
109
+ kind: "always";
110
+ abstract: "always";
111
+ orientation: "always";
112
+ extends: "inherit";
113
+ policies: "inherit";
114
+ data: "inherit";
115
+ endpoints: "inherit";
116
+ constraints: "inherit";
117
+ properties: "members";
118
+ methods: "members";
119
+ description: Readonly<{
120
+ excluded: 'annotation';
121
+ }>;
122
+ icon: Readonly<{
123
+ excluded: 'presentation';
124
+ }>;
125
+ }>;
126
+ property: Readonly<{
127
+ schema: "always";
128
+ required: "always";
129
+ auto: "always";
130
+ state: "always";
131
+ description: Readonly<{
132
+ excluded: 'annotation';
133
+ }>;
134
+ }>;
135
+ callable: Readonly<{
136
+ ref: Readonly<{
137
+ excluded: 'identity';
138
+ }>;
139
+ input: "always";
140
+ output: "always";
141
+ static: "always";
142
+ abstract: "always";
143
+ auth: Readonly<{
144
+ excluded: 'authorization';
145
+ }>;
146
+ policy: Readonly<{
147
+ excluded: 'authorization';
148
+ }>;
149
+ description: Readonly<{
150
+ excluded: 'annotation';
151
+ }>;
152
+ }>;
153
+ policy: Readonly<{
154
+ ref: Readonly<{
155
+ excluded: 'identity';
156
+ }>;
157
+ expression: "always";
158
+ description: Readonly<{
159
+ excluded: 'annotation';
160
+ }>;
161
+ }>;
162
+ view: Readonly<{
163
+ ref: Readonly<{
164
+ excluded: 'identity';
165
+ }>;
166
+ target: "always";
167
+ description: Readonly<{
168
+ excluded: 'annotation';
169
+ }>;
170
+ }>;
171
+ core: Readonly<{
172
+ ref: Readonly<{
173
+ excluded: 'identity';
174
+ }>;
175
+ class: "always";
176
+ properties: "always";
177
+ source: "always";
178
+ target: "always";
179
+ }>;
180
+ }>;