@astrale-os/kernel-core 0.4.4 → 0.5.0
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/auth/methods/jwt/jwt.method.d.ts +1 -1
- package/dist/auth/methods/jwt/jwt.method.d.ts.map +1 -1
- package/dist/auth/methods/jwt/jwt.method.js +1 -1
- package/dist/auth/methods/jwt/jwt.method.js.map +1 -1
- package/dist/domain/addressing/layout/build.d.ts +2 -0
- package/dist/domain/addressing/layout/build.d.ts.map +1 -1
- package/dist/domain/addressing/layout/build.js +6 -0
- package/dist/domain/addressing/layout/build.js.map +1 -1
- package/dist/domain/addressing/layout/default.d.ts +18 -3
- package/dist/domain/addressing/layout/default.d.ts.map +1 -1
- package/dist/domain/addressing/layout/default.js +28 -3
- package/dist/domain/addressing/layout/default.js.map +1 -1
- package/dist/domain/addressing/namespace.d.ts +7 -1
- package/dist/domain/addressing/namespace.d.ts.map +1 -1
- package/dist/domain/addressing/namespace.js +13 -1
- package/dist/domain/addressing/namespace.js.map +1 -1
- package/dist/domain/addressing/paths/constants.d.ts +4 -0
- package/dist/domain/addressing/paths/constants.d.ts.map +1 -1
- package/dist/domain/addressing/paths/constants.js +4 -0
- package/dist/domain/addressing/paths/constants.js.map +1 -1
- package/dist/domain/addressing/paths/domain.js +5 -2
- package/dist/domain/addressing/paths/domain.js.map +1 -1
- package/dist/domain/addressing/paths/function.d.ts +63 -0
- package/dist/domain/addressing/paths/function.d.ts.map +1 -0
- package/dist/domain/addressing/paths/function.js +161 -0
- package/dist/domain/addressing/paths/function.js.map +1 -0
- package/dist/domain/addressing/paths/index.d.ts +4 -2
- package/dist/domain/addressing/paths/index.d.ts.map +1 -1
- package/dist/domain/addressing/paths/index.js +4 -2
- package/dist/domain/addressing/paths/index.js.map +1 -1
- package/dist/domain/addressing/paths/parse.d.ts.map +1 -1
- package/dist/domain/addressing/paths/parse.js +4 -0
- package/dist/domain/addressing/paths/parse.js.map +1 -1
- package/dist/domain/addressing/paths/view.d.ts +62 -0
- package/dist/domain/addressing/paths/view.d.ts.map +1 -0
- package/dist/domain/addressing/paths/view.js +160 -0
- package/dist/domain/addressing/paths/view.js.map +1 -0
- package/dist/domain/addressing/paths/zod.d.ts +5 -1
- package/dist/domain/addressing/paths/zod.d.ts.map +1 -1
- package/dist/domain/addressing/paths/zod.js +5 -1
- package/dist/domain/addressing/paths/zod.js.map +1 -1
- package/dist/domain/addressing/refs/build.d.ts +3 -1
- package/dist/domain/addressing/refs/build.d.ts.map +1 -1
- package/dist/domain/addressing/refs/build.js +37 -47
- package/dist/domain/addressing/refs/build.js.map +1 -1
- package/dist/domain/addressing/refs/iterate.d.ts +2 -1
- package/dist/domain/addressing/refs/iterate.d.ts.map +1 -1
- package/dist/domain/addressing/refs/iterate.js +17 -11
- package/dist/domain/addressing/refs/iterate.js.map +1 -1
- package/dist/domain/addressing/refs/semantic-path.d.ts +38 -0
- package/dist/domain/addressing/refs/semantic-path.d.ts.map +1 -0
- package/dist/domain/addressing/refs/semantic-path.js +51 -0
- package/dist/domain/addressing/refs/semantic-path.js.map +1 -0
- package/dist/domain/addressing/refs/types.d.ts +38 -0
- package/dist/domain/addressing/refs/types.d.ts.map +1 -1
- package/dist/domain/compile/compile.d.ts +3 -1
- package/dist/domain/compile/compile.d.ts.map +1 -1
- package/dist/domain/compile/compile.js +2 -2
- package/dist/domain/compile/compile.js.map +1 -1
- package/dist/domain/compile/function/types.d.ts +23 -0
- package/dist/domain/compile/function/types.d.ts.map +1 -0
- package/dist/domain/compile/function/types.js +2 -0
- package/dist/domain/compile/function/types.js.map +1 -0
- package/dist/domain/compile/view/serialized.d.ts +28 -0
- package/dist/domain/compile/view/serialized.d.ts.map +1 -0
- package/dist/domain/compile/view/serialized.js +12 -0
- package/dist/domain/compile/view/serialized.js.map +1 -0
- package/dist/domain/compile/view/types.d.ts +21 -0
- package/dist/domain/compile/view/types.d.ts.map +1 -0
- package/dist/domain/compile/view/types.js +2 -0
- package/dist/domain/compile/view/types.js.map +1 -0
- package/dist/domain/deserialize/deserialize.d.ts.map +1 -1
- package/dist/domain/deserialize/deserialize.js +91 -69
- package/dist/domain/deserialize/deserialize.js.map +1 -1
- package/dist/domain/identity/resolve-callables.d.ts +16 -10
- package/dist/domain/identity/resolve-callables.d.ts.map +1 -1
- package/dist/domain/identity/resolve-callables.js +34 -5
- package/dist/domain/identity/resolve-callables.js.map +1 -1
- package/dist/domain/index.d.ts +3 -0
- package/dist/domain/index.d.ts.map +1 -1
- package/dist/domain/index.js.map +1 -1
- package/dist/domain/install-bundle.d.ts +1 -1
- package/dist/domain/install-bundle.d.ts.map +1 -1
- package/dist/domain/install-bundle.js +1 -1
- package/dist/domain/install-bundle.js.map +1 -1
- package/dist/domain/origin.d.ts +2 -0
- package/dist/domain/origin.d.ts.map +1 -1
- package/dist/domain/origin.js +6 -2
- package/dist/domain/origin.js.map +1 -1
- package/dist/domain/serialize/schema.d.ts +2 -0
- package/dist/domain/serialize/schema.d.ts.map +1 -1
- package/dist/domain/serialize/schema.js +128 -11
- package/dist/domain/serialize/schema.js.map +1 -1
- package/dist/domain/serialize/serialize.d.ts +7 -0
- package/dist/domain/serialize/serialize.d.ts.map +1 -1
- package/dist/domain/serialize/serialize.js.map +1 -1
- package/dist/graph/nav/path/kinds/registry.d.ts +20 -16
- package/dist/graph/nav/path/kinds/registry.d.ts.map +1 -1
- package/dist/graph/nav/path/kinds/registry.js +23 -19
- package/dist/graph/nav/path/kinds/registry.js.map +1 -1
- package/dist/graph/sync/reconcile/resolve.d.ts.map +1 -1
- package/dist/graph/sync/reconcile/resolve.js +1 -1
- package/dist/graph/sync/reconcile/resolve.js.map +1 -1
- package/dist/path-dsl.d.ts +4 -1
- package/dist/path-dsl.d.ts.map +1 -1
- package/dist/path-dsl.js +8 -1
- package/dist/path-dsl.js.map +1 -1
- package/dist/schema/definitions/edge-class.d.ts +1 -1
- package/dist/schema/definitions/edge-class.d.ts.map +1 -1
- package/dist/schema/definitions/edge-class.js +1 -1
- package/dist/schema/definitions/edge-class.js.map +1 -1
- package/dist/schema/interfaces/generics/Sluggable.interface.d.ts.map +1 -1
- package/dist/schema/interfaces/generics/Sluggable.interface.js +1 -1
- package/dist/schema/interfaces/generics/Sluggable.interface.js.map +1 -1
- package/package.json +1 -1
|
@@ -10,16 +10,23 @@
|
|
|
10
10
|
/**
|
|
11
11
|
* Yield every ref from a DomainRefs as a rich entry.
|
|
12
12
|
*
|
|
13
|
-
* Order: interfaces (member then methods), classes (member then methods),
|
|
13
|
+
* Order: interfaces (member then methods), classes (member then methods),
|
|
14
|
+
* functions, views, core.
|
|
14
15
|
*/
|
|
15
16
|
export function* iterateRefs(refs) {
|
|
16
|
-
yield*
|
|
17
|
-
yield*
|
|
18
|
-
yield*
|
|
17
|
+
yield* iterateMembers(refs.interfaces);
|
|
18
|
+
yield* iterateMembers(refs.classes);
|
|
19
|
+
yield* iterateLeaves(refs.functions);
|
|
20
|
+
yield* iterateLeaves(refs.views);
|
|
21
|
+
yield* iterateLeaves(refs.core);
|
|
19
22
|
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
+
/**
|
|
24
|
+
* Yield a group of member entries (interfaces, classes): the member ref itself
|
|
25
|
+
* followed by its method refs.
|
|
26
|
+
*/
|
|
27
|
+
function* iterateMembers(group) {
|
|
28
|
+
for (const entry of Object.values(group)) {
|
|
29
|
+
// Yield the member ref itself.
|
|
23
30
|
yield entry;
|
|
24
31
|
// Yield method refs — skip structural fields (ref/key/path/$) and any
|
|
25
32
|
// sub-entry without a .path (property refs, the accessors bundle).
|
|
@@ -34,9 +41,8 @@ function* iterateGroup(defs) {
|
|
|
34
41
|
}
|
|
35
42
|
}
|
|
36
43
|
}
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
}
|
|
44
|
+
/** Yield every entry of a flat record of leaf refs (functions, views, core). */
|
|
45
|
+
function* iterateLeaves(group) {
|
|
46
|
+
yield* Object.values(group);
|
|
41
47
|
}
|
|
42
48
|
//# sourceMappingURL=iterate.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"iterate.js","sourceRoot":"","sources":["../../../../domain/addressing/refs/iterate.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH
|
|
1
|
+
{"version":3,"file":"iterate.js","sourceRoot":"","sources":["../../../../domain/addressing/refs/iterate.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH;;;;;GAKG;AACH,MAAM,SAAS,CAAC,CAAC,WAAW,CAAC,IAAgB;IAC3C,KAAK,CAAC,CAAC,cAAc,CAAC,IAAI,CAAC,UAAU,CAAC,CAAA;IACtC,KAAK,CAAC,CAAC,cAAc,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;IACnC,KAAK,CAAC,CAAC,aAAa,CAAC,IAAI,CAAC,SAAS,CAAC,CAAA;IACpC,KAAK,CAAC,CAAC,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;IAChC,KAAK,CAAC,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;AACjC,CAAC;AAED;;;GAGG;AACH,QAAQ,CAAC,CAAC,cAAc,CAAC,KAA+C;IACtE,KAAK,MAAM,KAAK,IAAI,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC;QACzC,+BAA+B;QAC/B,MAAM,KAAK,CAAA;QAEX,sEAAsE;QACtE,mEAAmE;QACnE,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;YACjD,IAAI,GAAG,KAAK,KAAK,IAAI,GAAG,KAAK,KAAK,IAAI,GAAG,KAAK,MAAM,IAAI,GAAG,KAAK,GAAG;gBAAE,SAAQ;YAC7E,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI;gBAAE,SAAQ;YACzD,IAAI,CAAC,CAAC,MAAM,IAAI,KAAK,CAAC;gBAAE,SAAQ;YAChC,MAAM,KAAiB,CAAA;QACzB,CAAC;IACH,CAAC;AACH,CAAC;AAED,gFAAgF;AAChF,QAAQ,CAAC,CAAC,aAAa,CAAC,KAAyC;IAC/D,KAAK,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;AAC7B,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pure semantic-path constructors shared by the refs builder (`build.ts`) and the
|
|
3
|
+
* graph deserializer (`deserialize/deserialize.ts`).
|
|
4
|
+
*
|
|
5
|
+
* Both translate a namespace-qualified slug (`class.X`, `interface.X`) into the
|
|
6
|
+
* typed semantic Path for that member or method. Kept in one place so the two
|
|
7
|
+
* callers cannot drift.
|
|
8
|
+
*/
|
|
9
|
+
import type { DomainOrigin } from '#domain/origin';
|
|
10
|
+
import { ClassPath } from '#domain/addressing/paths/class';
|
|
11
|
+
import { DomainPath } from '#domain/addressing/paths/domain';
|
|
12
|
+
import { InterfacePath } from '#domain/addressing/paths/interface';
|
|
13
|
+
import { MethodPath } from '#domain/addressing/paths/method';
|
|
14
|
+
/**
|
|
15
|
+
* Build the typed semantic path for a class/interface/edge member.
|
|
16
|
+
*
|
|
17
|
+
* `qualified` is the namespace-prefixed slug (`class.X`, `interface.X`).
|
|
18
|
+
* `name` is the bare member name (`X`). Returns the appropriate typed path
|
|
19
|
+
* — a ClassPath, InterfacePath, or DomainPath fallback for unknown prefixes
|
|
20
|
+
* (e.g., `core.X`).
|
|
21
|
+
*
|
|
22
|
+
* Standalone-function and view members do NOT pass through here — their typed
|
|
23
|
+
* paths (`FunctionPath`/`ViewPath`) are constructed directly by their builders.
|
|
24
|
+
*/
|
|
25
|
+
export declare function memberSemanticPath(origin: DomainOrigin, qualified: string, name: string): DomainPath | ClassPath | InterfacePath;
|
|
26
|
+
/**
|
|
27
|
+
* Build the typed semantic path for a method on a class or interface.
|
|
28
|
+
*
|
|
29
|
+
* `qualified` is the parent member's namespace-prefixed slug
|
|
30
|
+
* (`class.X` / `interface.X`). `child` is the bare method name.
|
|
31
|
+
*
|
|
32
|
+
* The caller passes the qualified `class.X` / `interface.X` form; `MethodPath`
|
|
33
|
+
* stores the field verbatim and emits `:qualified:` in the raw — preserving the
|
|
34
|
+
* namespace-qualified form for compile-domain semantic refs
|
|
35
|
+
* (`/:dom:interface.Foo:method`).
|
|
36
|
+
*/
|
|
37
|
+
export declare function methodSemanticPath(origin: DomainOrigin, qualified: string, child: string): MethodPath;
|
|
38
|
+
//# sourceMappingURL=semantic-path.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"semantic-path.d.ts","sourceRoot":"","sources":["../../../../domain/addressing/refs/semantic-path.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAElD,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAA;AAE1D,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAA;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAA;AAClE,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAA;AAE5D;;;;;;;;;;GAUG;AACH,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,YAAY,EACpB,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,MAAM,GACX,UAAU,GAAG,SAAS,GAAG,aAAa,CAQxC;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,YAAY,EACpB,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,MAAM,GACZ,UAAU,CAKZ"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pure semantic-path constructors shared by the refs builder (`build.ts`) and the
|
|
3
|
+
* graph deserializer (`deserialize/deserialize.ts`).
|
|
4
|
+
*
|
|
5
|
+
* Both translate a namespace-qualified slug (`class.X`, `interface.X`) into the
|
|
6
|
+
* typed semantic Path for that member or method. Kept in one place so the two
|
|
7
|
+
* callers cannot drift.
|
|
8
|
+
*/
|
|
9
|
+
import { ClassPath } from '#domain/addressing/paths/class';
|
|
10
|
+
import { CLASS_PREFIX, INTERFACE_PREFIX } from '#domain/addressing/paths/constants';
|
|
11
|
+
import { DomainPath } from '#domain/addressing/paths/domain';
|
|
12
|
+
import { InterfacePath } from '#domain/addressing/paths/interface';
|
|
13
|
+
import { MethodPath } from '#domain/addressing/paths/method';
|
|
14
|
+
/**
|
|
15
|
+
* Build the typed semantic path for a class/interface/edge member.
|
|
16
|
+
*
|
|
17
|
+
* `qualified` is the namespace-prefixed slug (`class.X`, `interface.X`).
|
|
18
|
+
* `name` is the bare member name (`X`). Returns the appropriate typed path
|
|
19
|
+
* — a ClassPath, InterfacePath, or DomainPath fallback for unknown prefixes
|
|
20
|
+
* (e.g., `core.X`).
|
|
21
|
+
*
|
|
22
|
+
* Standalone-function and view members do NOT pass through here — their typed
|
|
23
|
+
* paths (`FunctionPath`/`ViewPath`) are constructed directly by their builders.
|
|
24
|
+
*/
|
|
25
|
+
export function memberSemanticPath(origin, qualified, name) {
|
|
26
|
+
if (qualified.startsWith(CLASS_PREFIX)) {
|
|
27
|
+
return ClassPath.from({ domain: origin, className: name });
|
|
28
|
+
}
|
|
29
|
+
if (qualified.startsWith(INTERFACE_PREFIX)) {
|
|
30
|
+
return InterfacePath.from({ domain: origin, interfaceName: name });
|
|
31
|
+
}
|
|
32
|
+
return DomainPath.from({ domain: origin, member: qualified });
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Build the typed semantic path for a method on a class or interface.
|
|
36
|
+
*
|
|
37
|
+
* `qualified` is the parent member's namespace-prefixed slug
|
|
38
|
+
* (`class.X` / `interface.X`). `child` is the bare method name.
|
|
39
|
+
*
|
|
40
|
+
* The caller passes the qualified `class.X` / `interface.X` form; `MethodPath`
|
|
41
|
+
* stores the field verbatim and emits `:qualified:` in the raw — preserving the
|
|
42
|
+
* namespace-qualified form for compile-domain semantic refs
|
|
43
|
+
* (`/:dom:interface.Foo:method`).
|
|
44
|
+
*/
|
|
45
|
+
export function methodSemanticPath(origin, qualified, child) {
|
|
46
|
+
const memberKind = qualified.startsWith(INTERFACE_PREFIX)
|
|
47
|
+
? 'interface'
|
|
48
|
+
: 'class';
|
|
49
|
+
return MethodPath.from({ domain: origin, member: qualified, memberKind, method: child });
|
|
50
|
+
}
|
|
51
|
+
//# sourceMappingURL=semantic-path.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"semantic-path.js","sourceRoot":"","sources":["../../../../domain/addressing/refs/semantic-path.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAA;AAC1D,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAA;AACnF,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAA;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAA;AAClE,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAA;AAE5D;;;;;;;;;;GAUG;AACH,MAAM,UAAU,kBAAkB,CAChC,MAAoB,EACpB,SAAiB,EACjB,IAAY;IAEZ,IAAI,SAAS,CAAC,UAAU,CAAC,YAAY,CAAC,EAAE,CAAC;QACvC,OAAO,SAAS,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAA;IAC5D,CAAC;IACD,IAAI,SAAS,CAAC,UAAU,CAAC,gBAAgB,CAAC,EAAE,CAAC;QAC3C,OAAO,aAAa,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,CAAA;IACpE,CAAC;IACD,OAAO,UAAU,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC,CAAA;AAC/D,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,UAAU,kBAAkB,CAChC,MAAoB,EACpB,SAAiB,EACjB,KAAa;IAEb,MAAM,UAAU,GAA0B,SAAS,CAAC,UAAU,CAAC,gBAAgB,CAAC;QAC9E,CAAC,CAAC,WAAW;QACb,CAAC,CAAC,OAAO,CAAA;IACX,OAAO,UAAU,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAA;AAC1F,CAAC"}
|
|
@@ -28,8 +28,10 @@ import type { ClassPath } from '#domain';
|
|
|
28
28
|
import type { DomainKey } from '#domain/addressing/keys/types';
|
|
29
29
|
import type { Namespace } from '#domain/addressing/namespace';
|
|
30
30
|
import type { DomainPath } from '#domain/addressing/paths/domain';
|
|
31
|
+
import type { FunctionPath } from '#domain/addressing/paths/function';
|
|
31
32
|
import type { InterfacePath } from '#domain/addressing/paths/interface';
|
|
32
33
|
import type { MethodPath } from '#domain/addressing/paths/method';
|
|
34
|
+
import type { ViewPath } from '#domain/addressing/paths/view';
|
|
33
35
|
import type { Path } from '#graph/nav/path';
|
|
34
36
|
import type { AbsolutePath } from '#graph/tree';
|
|
35
37
|
/** Path bundle for a class/interface/edge member. Has all three addressing modes. */
|
|
@@ -53,6 +55,20 @@ export interface MethodRefPath {
|
|
|
53
55
|
/** Tree position — layout-dependent, matches DB-returned paths. */
|
|
54
56
|
readonly absolute: AbsolutePath;
|
|
55
57
|
}
|
|
58
|
+
/** Path bundle for a standalone-function member. */
|
|
59
|
+
export interface FunctionRefPath {
|
|
60
|
+
/** Semantic function path — stable, `/:origin:function.<slug>`. */
|
|
61
|
+
readonly domain: FunctionPath;
|
|
62
|
+
/** Tree position — `/<origin>/functions/<slug>`. */
|
|
63
|
+
readonly absolute: AbsolutePath;
|
|
64
|
+
}
|
|
65
|
+
/** Path bundle for a view member. */
|
|
66
|
+
export interface ViewRefPath {
|
|
67
|
+
/** Semantic view path — stable, `/:origin:view.<slug>`. */
|
|
68
|
+
readonly domain: ViewPath;
|
|
69
|
+
/** Tree position — `/<origin>/views/<slug>`. */
|
|
70
|
+
readonly absolute: AbsolutePath;
|
|
71
|
+
}
|
|
56
72
|
/** Base path bundle for generic iteration (flatten, from-graph). */
|
|
57
73
|
export interface RefPath {
|
|
58
74
|
/** Semantic traversal path — stable, independent of tree layout. */
|
|
@@ -96,6 +112,26 @@ export interface PropertyRefEntry<Ref extends string = string> {
|
|
|
96
112
|
readonly ref: Ref;
|
|
97
113
|
readonly key: DomainKey<Ref>;
|
|
98
114
|
}
|
|
115
|
+
/**
|
|
116
|
+
* A standalone-function member ref entry. Like a class/interface member it is
|
|
117
|
+
* attached to the domain via `of_domain` and addressable by a semantic path, but
|
|
118
|
+
* it has no methods/properties and its semantic path is a {@link FunctionPath}.
|
|
119
|
+
*/
|
|
120
|
+
export interface FunctionMemberRefEntry<Ref extends string = string> {
|
|
121
|
+
readonly ref: Ref;
|
|
122
|
+
readonly key: DomainKey<Ref>;
|
|
123
|
+
readonly path: FunctionRefPath;
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* A view member ref entry. Like a standalone-function member it is attached to
|
|
127
|
+
* the domain via `of_domain` and addressable by a semantic path, but it has no
|
|
128
|
+
* methods/properties and its semantic path is a {@link ViewPath}.
|
|
129
|
+
*/
|
|
130
|
+
export interface ViewMemberRefEntry<Ref extends string = string> {
|
|
131
|
+
readonly ref: Ref;
|
|
132
|
+
readonly key: DomainKey<Ref>;
|
|
133
|
+
readonly path: ViewRefPath;
|
|
134
|
+
}
|
|
99
135
|
/** Base ref entry for generic code (iteration, deserialization). */
|
|
100
136
|
export interface RefEntry<Ref extends string = string> {
|
|
101
137
|
readonly ref: Ref;
|
|
@@ -133,6 +169,8 @@ export interface DomainRefs<S extends Schema = Schema> {
|
|
|
133
169
|
readonly classes: {
|
|
134
170
|
readonly [K in keyof S['classes'] & string]: MemberRefEntry<`class.${K}`> & MethodRefs<S['classes'][K], `class.${K}`> & PropertyRefs<S['classes'][K], `class.${K}`>;
|
|
135
171
|
};
|
|
172
|
+
readonly functions: Readonly<Record<string, FunctionMemberRefEntry<`function.${string}`>>>;
|
|
173
|
+
readonly views: Readonly<Record<string, ViewMemberRefEntry<`view.${string}`>>>;
|
|
136
174
|
readonly core: Readonly<Record<string, RefEntry<`core.${string}`>>>;
|
|
137
175
|
}
|
|
138
176
|
/** Names that are BOTH a class and an interface in a schema (homonyms, e.g. `Function`). */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../domain/addressing/refs/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAA;AAEvF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AACxC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAA;AAC9D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAA;AAC7D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAA;AACjE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAA;AACvE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAA;AACjE,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAA;AAC3C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAI/C,qFAAqF;AACrF,MAAM,WAAW,aAAa;IAC5B;;;;;OAKG;IACH,QAAQ,CAAC,MAAM,EAAE,SAAS,GAAG,aAAa,GAAG,UAAU,CAAA;IACvD,mEAAmE;IACnE,QAAQ,CAA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CAAC,QAAQ,MAAM,EAAE,CAAC,CAAC,CAAC,CAAA;IAC9E,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,QAAQ,MAAM,EAAE,CAAC,CAAC,CAAC,CAAA;CACpE;AAED,4FAA4F;AAC5F,KAAK,QAAQ,CAAC,CAAC,SAAS,MAAM,IAAI,MAAM,CAAC,CAAC,YAAY,CAAC,GAAG,MAAM,CAAC,CAAC,SAAS,CAAC,GAAG,MAAM,CAAA;AAErF;;;;;;;GAOG;AACH,MAAM,WAAW,eAAe,CAAC,CAAC,SAAS,MAAM;IAC/C,QAAQ,CAAC,WAAW,EAAE,IAAI,CAAC,mDAAmD,CAAC,8BAA8B,CAAC,sBAAsB,CAAA;CACrI;AAED;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,QAAQ,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,IAAI;IAChD,QAAQ,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,YAAY,CAAC,GAAG,MAAM,CAAC,CAAC,SAAS,CAAC,CAAC,GAAG,MAAM,GAAG,CAAC,SAAS,QAAQ,CAAC,CAAC,CAAC,GACxF,eAAe,CAAC,CAAC,CAAC,GAClB,CAAC,SAAS,MAAM,CAAC,CAAC,YAAY,CAAC,GAC7B,UAAU,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,GAC9B,CAAC,SAAS,MAAM,CAAC,CAAC,SAAS,CAAC,GAC1B,UAAU,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,GAC3B,KAAK;CACd,CAAA"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import type { Core, Schema } from '@astrale-os/kernel-dsl';
|
|
2
2
|
import type { Layout } from '#domain/addressing/layout/types';
|
|
3
|
+
import type { FunctionDeclarations } from './function/types';
|
|
3
4
|
import type { Domain } from './types';
|
|
5
|
+
import type { ViewDeclarations } from './view/types';
|
|
4
6
|
/**
|
|
5
7
|
* Compile a schema into a fully resolved CompiledDomain.
|
|
6
8
|
*
|
|
@@ -32,5 +34,5 @@ import type { Domain } from './types';
|
|
|
32
34
|
* blog.$.c('Author').key // disambiguation — works even if K.Author is shadowed
|
|
33
35
|
* ```
|
|
34
36
|
*/
|
|
35
|
-
export declare function compileDomain<S extends Schema>(schema: S, core?: Core<S>, layout?: Layout): Domain<S>;
|
|
37
|
+
export declare function compileDomain<S extends Schema>(schema: S, core?: Core<S>, layout?: Layout, functions?: FunctionDeclarations, views?: ViewDeclarations): Domain<S>;
|
|
36
38
|
//# sourceMappingURL=compile.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compile.d.ts","sourceRoot":"","sources":["../../../domain/compile/compile.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAA;AAI1D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAA;
|
|
1
|
+
{"version":3,"file":"compile.d.ts","sourceRoot":"","sources":["../../../domain/compile/compile.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAA;AAI1D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAA;AAQ7D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAA;AAE5D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,SAAS,CAAA;AAErC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AAUpD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,wBAAgB,aAAa,CAAC,CAAC,SAAS,MAAM,EAC5C,MAAM,EAAE,CAAC,EACT,IAAI,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,EACd,MAAM,CAAC,EAAE,MAAM,EACf,SAAS,CAAC,EAAE,oBAAoB,EAChC,KAAK,CAAC,EAAE,gBAAgB,GACvB,MAAM,CAAC,CAAC,CAAC,CAwDX"}
|
|
@@ -41,7 +41,7 @@ import { validateDomain } from './validation/validate';
|
|
|
41
41
|
* blog.$.c('Author').key // disambiguation — works even if K.Author is shadowed
|
|
42
42
|
* ```
|
|
43
43
|
*/
|
|
44
|
-
export function compileDomain(schema, core, layout) {
|
|
44
|
+
export function compileDomain(schema, core, layout, functions, views) {
|
|
45
45
|
// No global registry priming required: the typed-path factories
|
|
46
46
|
// used during ref construction (`ClassPath.from` etc.) lex against
|
|
47
47
|
// an internal kernel-meta grammar closure, not the global
|
|
@@ -61,7 +61,7 @@ export function compileDomain(schema, core, layout) {
|
|
|
61
61
|
const compiledCore = core
|
|
62
62
|
? compileCore(core, origin, descriptorMap, properties, defOrigins)
|
|
63
63
|
: undefined;
|
|
64
|
-
const refs = buildStructuredRefs(schema, origin, resolveLayout, compiledCore);
|
|
64
|
+
const refs = buildStructuredRefs(schema, origin, resolveLayout, compiledCore, functions, views);
|
|
65
65
|
const { keys, paths } = projectFlatMaps(refs);
|
|
66
66
|
const methods = Object.freeze(resolveAllMethodsForDomain(schema, origin));
|
|
67
67
|
const warnings = Object.freeze(validateDomain(origin, properties, schema, methods));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compile.js","sourceRoot":"","sources":["../../../domain/compile/compile.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAA;AAI9D,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAA;AAC/D,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAA;AACnE,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAA;AAClF,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;
|
|
1
|
+
{"version":3,"file":"compile.js","sourceRoot":"","sources":["../../../domain/compile/compile.ts"],"names":[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AAU;YAAE,IAAI,CAAC,IAAI,CAAC,GAAG,eAAe,CAAC,IAAI,CAAC,CAAA;IACjE,CAAC;IAED,OAAO,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,GAAG,IAAI,EAAE,CAAc,CAAA;AACnD,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Standalone-function member declarations — the CONTRACT half a function member
|
|
3
|
+
* contributes to compile (its ref / key / path). A standalone function is a
|
|
4
|
+
* domain member attached to the Domain via an `of_domain` edge (slug
|
|
5
|
+
* `function.<slug>`), laid out at `/<origin>/functions/<slug>`.
|
|
6
|
+
*
|
|
7
|
+
* Keyed by slug so the shape mirrors the SDK's authored `functions` map (and
|
|
8
|
+
* leaves room to carry per-member compile metadata later without changing the
|
|
9
|
+
* `compileDomain` signature). The impl half (binding, code) arrives at serialize
|
|
10
|
+
* time as a `FunctionSchema[]`, mirroring how a method's contract enters compile
|
|
11
|
+
* and its impl enters serialize.
|
|
12
|
+
*
|
|
13
|
+
* Authored in the SDK (`defineRemoteFunction`), NOT in the kernel DSL `Schema`:
|
|
14
|
+
* the DSL's callable contract is per-param (`fn({ params, returns })`) whereas a
|
|
15
|
+
* standalone function is whole-object (`inputSchema`), so it is not a `FnDef`.
|
|
16
|
+
*/
|
|
17
|
+
export interface FunctionDeclaration {
|
|
18
|
+
/** The function's slug — drives the ref `function.<slug>`, path, and of_domain edge. */
|
|
19
|
+
readonly slug: string;
|
|
20
|
+
}
|
|
21
|
+
/** Map of slug → declaration — the `functions` input to {@link compileDomain}. */
|
|
22
|
+
export type FunctionDeclarations = Readonly<Record<string, FunctionDeclaration>>;
|
|
23
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../domain/compile/function/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,MAAM,WAAW,mBAAmB;IAClC,wFAAwF;IACxF,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CACtB;AAED,kFAAkF;AAClF,MAAM,MAAM,oBAAoB,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,mBAAmB,CAAC,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../domain/compile/function/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Serialized form for a view MEMBER — the impl/binding half supplied at
|
|
3
|
+
* serialize time, mirroring `FunctionSchema` for standalone functions.
|
|
4
|
+
*
|
|
5
|
+
* A view differs from a plain function in three ways, all captured here:
|
|
6
|
+
* - it has no input/output Zod schema (views are transport-only iframes);
|
|
7
|
+
* - it carries a `UI.handshake` mode;
|
|
8
|
+
* - it attaches to target class meta-nodes via `view_for` edges, so it carries
|
|
9
|
+
* the resolved target paths the serializer emits those edges to.
|
|
10
|
+
*/
|
|
11
|
+
import type { FunctionSchema } from '#domain/compile/method/serialized';
|
|
12
|
+
export interface ViewSchema {
|
|
13
|
+
/** Canonical member ref — `view.<slug>`. Matches `compiled.$.refs.views[slug].ref`. */
|
|
14
|
+
ref: string;
|
|
15
|
+
/** Display name (`Named.name`). Defaults to the slug at serialize time. */
|
|
16
|
+
name?: string;
|
|
17
|
+
/** Iframe URL binding (carries `remoteUrl`). Same shape as a Function binding. */
|
|
18
|
+
binding?: FunctionSchema['binding'];
|
|
19
|
+
/** Shell handshake mode written to `UI.handshake`. */
|
|
20
|
+
handshake?: 'shell' | 'none';
|
|
21
|
+
/**
|
|
22
|
+
* Resolved `view_for` target paths (AbsolutePath raws — typically class
|
|
23
|
+
* meta-nodes `/<domain>/class.<Name>/self`). The serializer emits one
|
|
24
|
+
* `view_for` edge from the view member to each.
|
|
25
|
+
*/
|
|
26
|
+
viewFor?: readonly string[];
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=serialized.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"serialized.d.ts","sourceRoot":"","sources":["../../../../domain/compile/view/serialized.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAA;AAEvE,MAAM,WAAW,UAAU;IACzB,uFAAuF;IACvF,GAAG,EAAE,MAAM,CAAA;IACX,2EAA2E;IAC3E,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,kFAAkF;IAClF,OAAO,CAAC,EAAE,cAAc,CAAC,SAAS,CAAC,CAAA;IACnC,sDAAsD;IACtD,SAAS,CAAC,EAAE,OAAO,GAAG,MAAM,CAAA;IAC5B;;;;OAIG;IACH,OAAO,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;CAC5B"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Serialized form for a view MEMBER — the impl/binding half supplied at
|
|
3
|
+
* serialize time, mirroring `FunctionSchema` for standalone functions.
|
|
4
|
+
*
|
|
5
|
+
* A view differs from a plain function in three ways, all captured here:
|
|
6
|
+
* - it has no input/output Zod schema (views are transport-only iframes);
|
|
7
|
+
* - it carries a `UI.handshake` mode;
|
|
8
|
+
* - it attaches to target class meta-nodes via `view_for` edges, so it carries
|
|
9
|
+
* the resolved target paths the serializer emits those edges to.
|
|
10
|
+
*/
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=serialized.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"serialized.js","sourceRoot":"","sources":["../../../../domain/compile/view/serialized.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* View member declarations — the CONTRACT half a view member contributes to
|
|
3
|
+
* compile (its ref / key / path). A view is a domain member attached to the
|
|
4
|
+
* Domain via an `of_domain` edge (slug `view.<slug>`), laid out at
|
|
5
|
+
* `/<origin>/views/<slug>` — a sibling of standalone-function members.
|
|
6
|
+
*
|
|
7
|
+
* Keyed by slug, mirroring the SDK's authored `views` map. A view carries no
|
|
8
|
+
* type contract (it's a transport-only iframe), so the declaration is the slug
|
|
9
|
+
* alone — the impl half (iframe `binding`, `UI.handshake`, resolved `view_for`
|
|
10
|
+
* targets) arrives at serialize time as a `ViewSchema[]`.
|
|
11
|
+
*
|
|
12
|
+
* Passed to {@link compileDomain} as its own argument (NOT in the DSL `Schema`,
|
|
13
|
+
* which is the type layer — a view has no type).
|
|
14
|
+
*/
|
|
15
|
+
export interface ViewDeclaration {
|
|
16
|
+
/** The view's slug — drives the ref `view.<slug>`, path, and of_domain edge. */
|
|
17
|
+
readonly slug: string;
|
|
18
|
+
}
|
|
19
|
+
/** Map of slug → declaration — the `views` input to {@link compileDomain}. */
|
|
20
|
+
export type ViewDeclarations = Readonly<Record<string, ViewDeclaration>>;
|
|
21
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../domain/compile/view/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,MAAM,WAAW,eAAe;IAC9B,gFAAgF;IAChF,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CACtB;AAED,8EAA8E;AAC9E,MAAM,MAAM,gBAAgB,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../domain/compile/view/types.ts"],"names":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deserialize.d.ts","sourceRoot":"","sources":["../../../domain/deserialize/deserialize.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;
|
|
1
|
+
{"version":3,"file":"deserialize.d.ts","sourceRoot":"","sources":["../../../domain/deserialize/deserialize.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AA8BH,OAAO,KAAK,EAAE,cAAc,EAAgB,MAAM,uBAAuB,CAAA;AAEzE,OAAO,KAAK,EAAE,QAAQ,EAAQ,QAAQ,EAAE,MAAM,QAAQ,CAAA;AACtD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,cAAc,CAAA;AA0CzC;;;;;;;GAOG;AACH,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,KAAK,GAAG,cAAc,CA0EvE;AAsBD;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE;IAAE,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAAE,GAAG,OAAO,CAGlF;AAs4BD;;;GAGG;AACH,YAAY,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAA"}
|