@astrale-os/kernel-core 0.9.0-beta.26 → 0.9.0-beta.27

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.
Files changed (55) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/dns-label.d.ts +1 -2
  3. package/dist/dns-label.js +2 -3
  4. package/dist/graph/graph/model/wire.d.ts +78 -78
  5. package/dist/graph/graph/model/wire.js +18 -19
  6. package/dist/graph/mutate/language/wire.d.ts +215 -215
  7. package/dist/graph/mutate/language/wire.js +42 -47
  8. package/dist/graph/mutate/result/wire.d.ts +3 -4
  9. package/dist/graph/mutate/result/wire.js +4 -4
  10. package/dist/graph/node/identity/id.d.ts +1 -2
  11. package/dist/graph/node/identity/id.js +2 -3
  12. package/dist/graph/query/language/wire.d.ts +113 -114
  13. package/dist/graph/query/language/wire.js +47 -47
  14. package/dist/graph/query/result/wire.d.ts +93 -94
  15. package/dist/graph/query/result/wire.js +20 -20
  16. package/dist/schema/authority/claims.d.ts +24 -25
  17. package/dist/schema/authority/claims.js +8 -8
  18. package/dist/schema/installation/operation-id.d.ts +1 -2
  19. package/dist/schema/installation/operation-id.js +2 -4
  20. package/dist/schema/kernel/schema.d.ts +255 -255
  21. package/dist/schema/kernel/syscalls/contracts/admit.d.ts +11 -12
  22. package/dist/schema/kernel/syscalls/contracts/admit.js +9 -9
  23. package/dist/schema/kernel/syscalls/contracts/can.d.ts +7 -8
  24. package/dist/schema/kernel/syscalls/contracts/can.js +4 -4
  25. package/dist/schema/kernel/syscalls/contracts/delegate.d.ts +6 -7
  26. package/dist/schema/kernel/syscalls/contracts/delegate.js +5 -5
  27. package/dist/schema/kernel/syscalls/contracts/expected.d.ts +4 -5
  28. package/dist/schema/kernel/syscalls/contracts/expected.js +5 -5
  29. package/dist/schema/kernel/syscalls/contracts/identity.d.ts +18 -19
  30. package/dist/schema/kernel/syscalls/contracts/identity.js +6 -6
  31. package/dist/schema/kernel/syscalls/contracts/install.d.ts +67 -68
  32. package/dist/schema/kernel/syscalls/contracts/install.js +9 -9
  33. package/dist/schema/kernel/syscalls/contracts/installation.d.ts +72 -73
  34. package/dist/schema/kernel/syscalls/contracts/installation.js +12 -12
  35. package/dist/schema/kernel/syscalls/contracts/introspect.d.ts +4 -5
  36. package/dist/schema/kernel/syscalls/contracts/introspect.js +4 -4
  37. package/dist/schema/kernel/syscalls/contracts/journal.d.ts +26 -27
  38. package/dist/schema/kernel/syscalls/contracts/journal.js +15 -15
  39. package/dist/schema/kernel/syscalls/contracts/mint.d.ts +6 -7
  40. package/dist/schema/kernel/syscalls/contracts/mint.js +5 -5
  41. package/dist/schema/kernel/syscalls/contracts/mutate.d.ts +223 -224
  42. package/dist/schema/kernel/syscalls/contracts/mutate.js +2 -2
  43. package/dist/schema/kernel/syscalls/contracts/provision.d.ts +267 -268
  44. package/dist/schema/kernel/syscalls/contracts/provision.js +15 -17
  45. package/dist/schema/kernel/syscalls/contracts/query.d.ts +221 -222
  46. package/dist/schema/kernel/syscalls/contracts/query.js +7 -7
  47. package/dist/schema/kernel/syscalls/contracts/uninstall.d.ts +36 -37
  48. package/dist/schema/kernel/syscalls/contracts/uninstall.js +3 -3
  49. package/dist/schema/kernel/syscalls/contracts/view-resolve.d.ts +31 -32
  50. package/dist/schema/kernel/syscalls/contracts/view-resolve.js +23 -23
  51. package/dist/schema/kernel/syscalls/contracts/whoami.d.ts +19 -20
  52. package/dist/schema/kernel/syscalls/contracts/whoami.js +2 -2
  53. package/dist/schema/kernel/syscalls/contracts/whois.d.ts +22 -23
  54. package/dist/schema/kernel/syscalls/contracts/whois.js +3 -3
  55. package/package.json +2 -2
@@ -1,4 +1,3 @@
1
- import { z } from 'zod';
2
1
  declare const NODE_ID_BRAND: unique symbol;
3
2
  /** Stable opaque identity: 1-255 ASCII characters from [A-Za-z0-9._-]. */
4
3
  export type NodeId = string & {
@@ -12,7 +11,7 @@ export declare class NodeIdError extends TypeError {
12
11
  /** Admit opaque 1-255 character ASCII NodeId text without repair or format-specific semantics. */
13
12
  export declare function NodeId(input: string): NodeId;
14
13
  export declare function isNodeId(input: unknown): input is NodeId;
15
- export declare const nodeIdSchema: z.ZodPipe<z.ZodString & z.ZodType<NodeId, string, z.core.$ZodTypeInternals<NodeId, string>>, z.ZodTransform<NodeId, string & {
14
+ export declare const nodeIdSchema: import("zod").ZodPipe<import("zod").ZodString & import("zod").ZodType<NodeId, string, import("zod/v4/core").$ZodTypeInternals<NodeId, string>>, import("zod").ZodTransform<NodeId, string & {
16
15
  readonly [NODE_ID_BRAND]: true;
17
16
  }>>;
18
17
  export {};
@@ -1,4 +1,4 @@
1
- import { z } from 'zod';
1
+ import { string } from 'zod';
2
2
  const NODE_ID_MAX_LENGTH = 255;
3
3
  const NODE_ID_INVALID_CHARACTER = /[^A-Za-z0-9._-]/u;
4
4
  const NODE_ID_ERROR_MESSAGE = 'NodeId must be 1-255 ASCII characters drawn from [A-Za-z0-9._-].';
@@ -23,7 +23,6 @@ export function isNodeId(input) {
23
23
  input.length <= NODE_ID_MAX_LENGTH &&
24
24
  !NODE_ID_INVALID_CHARACTER.test(input));
25
25
  }
26
- export const nodeIdSchema = z
27
- .string()
26
+ export const nodeIdSchema = string()
28
27
  .refine(isNodeId, NODE_ID_ERROR_MESSAGE)
29
28
  .transform((value) => value);
@@ -1,149 +1,148 @@
1
- import { z } from 'zod';
2
1
  /** Structural JSON contract; decodeQueryAST owns canonical identities and binding dependencies. */
3
- export declare const queryAstSchema: z.ZodObject<{
4
- format: z.ZodLiteral<"astrale.graph.query">;
5
- version: z.ZodLiteral<"v6">;
6
- source: z.ZodDiscriminatedUnion<[z.ZodObject<{
7
- kind: z.ZodLiteral<"node">;
8
- terms: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
9
- kind: z.ZodLiteral<"path">;
10
- path: z.ZodString;
11
- }, z.core.$strict>, z.ZodObject<{
12
- kind: z.ZodLiteral<"class">;
13
- class: z.ZodObject<{
14
- origin: z.ZodString;
15
- kind: z.ZodLiteral<"class">;
16
- name: z.ZodString;
17
- }, z.core.$strict>;
18
- }, z.core.$strict>], "kind">>;
19
- binding: z.ZodString;
20
- }, z.core.$strict>, z.ZodObject<{
21
- kind: z.ZodLiteral<"edge">;
22
- terms: z.ZodArray<z.ZodObject<{
23
- kind: z.ZodLiteral<"class">;
24
- class: z.ZodObject<{
25
- origin: z.ZodString;
26
- kind: z.ZodLiteral<"class">;
27
- name: z.ZodString;
28
- }, z.core.$strict>;
29
- }, z.core.$strict>>;
30
- bindings: z.ZodObject<{
31
- source: z.ZodString;
32
- edge: z.ZodString;
33
- target: z.ZodString;
34
- }, z.core.$strict>;
35
- }, z.core.$strict>], "kind">;
36
- steps: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
37
- op: z.ZodLiteral<"filter">;
38
- binding: z.ZodString;
39
- predicate: z.ZodDiscriminatedUnion<[z.ZodObject<{
40
- kind: z.ZodLiteral<"class.satisfies">;
41
- class: z.ZodObject<{
42
- origin: z.ZodString;
43
- kind: z.ZodLiteral<"class">;
44
- name: z.ZodString;
45
- }, z.core.$strict>;
46
- }, z.core.$strict>, z.ZodObject<{
47
- kind: z.ZodLiteral<"class.equal">;
48
- class: z.ZodObject<{
49
- origin: z.ZodString;
50
- kind: z.ZodLiteral<"class">;
51
- name: z.ZodString;
52
- }, z.core.$strict>;
53
- }, z.core.$strict>, z.ZodObject<{
54
- kind: z.ZodLiteral<"property.equal">;
55
- property: z.ZodString;
56
- value: z.ZodUnknown;
57
- }, z.core.$strict>, z.ZodObject<{
58
- kind: z.ZodLiteral<"property.present">;
59
- property: z.ZodString;
60
- }, z.core.$strict>, z.ZodObject<{
61
- kind: z.ZodLiteral<"identity.equal">;
62
- identity: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
63
- source: z.ZodString;
64
- target: z.ZodString;
65
- class: z.ZodString;
66
- }, z.core.$strict>]>;
67
- }, z.core.$strict>], "kind">;
68
- }, z.core.$strict>, z.ZodObject<{
69
- op: z.ZodLiteral<"expand">;
70
- from: z.ZodString;
71
- via: z.ZodArray<z.ZodObject<{
72
- origin: z.ZodString;
73
- kind: z.ZodLiteral<"class">;
74
- name: z.ZodString;
75
- }, z.core.$strict>>;
76
- direction: z.ZodEnum<{
2
+ export declare const queryAstSchema: import("zod").ZodObject<{
3
+ format: import("zod").ZodLiteral<"astrale.graph.query">;
4
+ version: import("zod").ZodLiteral<"v6">;
5
+ source: import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
6
+ kind: import("zod").ZodLiteral<"node">;
7
+ terms: import("zod").ZodArray<import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
8
+ kind: import("zod").ZodLiteral<"path">;
9
+ path: import("zod").ZodString;
10
+ }, import("zod/v4/core").$strict>, import("zod").ZodObject<{
11
+ kind: import("zod").ZodLiteral<"class">;
12
+ class: import("zod").ZodObject<{
13
+ origin: import("zod").ZodString;
14
+ kind: import("zod").ZodLiteral<"class">;
15
+ name: import("zod").ZodString;
16
+ }, import("zod/v4/core").$strict>;
17
+ }, import("zod/v4/core").$strict>], "kind">>;
18
+ binding: import("zod").ZodString;
19
+ }, import("zod/v4/core").$strict>, import("zod").ZodObject<{
20
+ kind: import("zod").ZodLiteral<"edge">;
21
+ terms: import("zod").ZodArray<import("zod").ZodObject<{
22
+ kind: import("zod").ZodLiteral<"class">;
23
+ class: import("zod").ZodObject<{
24
+ origin: import("zod").ZodString;
25
+ kind: import("zod").ZodLiteral<"class">;
26
+ name: import("zod").ZodString;
27
+ }, import("zod/v4/core").$strict>;
28
+ }, import("zod/v4/core").$strict>>;
29
+ bindings: import("zod").ZodObject<{
30
+ source: import("zod").ZodString;
31
+ edge: import("zod").ZodString;
32
+ target: import("zod").ZodString;
33
+ }, import("zod/v4/core").$strict>;
34
+ }, import("zod/v4/core").$strict>], "kind">;
35
+ steps: import("zod").ZodArray<import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
36
+ op: import("zod").ZodLiteral<"filter">;
37
+ binding: import("zod").ZodString;
38
+ predicate: import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
39
+ kind: import("zod").ZodLiteral<"class.satisfies">;
40
+ class: import("zod").ZodObject<{
41
+ origin: import("zod").ZodString;
42
+ kind: import("zod").ZodLiteral<"class">;
43
+ name: import("zod").ZodString;
44
+ }, import("zod/v4/core").$strict>;
45
+ }, import("zod/v4/core").$strict>, import("zod").ZodObject<{
46
+ kind: import("zod").ZodLiteral<"class.equal">;
47
+ class: import("zod").ZodObject<{
48
+ origin: import("zod").ZodString;
49
+ kind: import("zod").ZodLiteral<"class">;
50
+ name: import("zod").ZodString;
51
+ }, import("zod/v4/core").$strict>;
52
+ }, import("zod/v4/core").$strict>, import("zod").ZodObject<{
53
+ kind: import("zod").ZodLiteral<"property.equal">;
54
+ property: import("zod").ZodString;
55
+ value: import("zod").ZodUnknown;
56
+ }, import("zod/v4/core").$strict>, import("zod").ZodObject<{
57
+ kind: import("zod").ZodLiteral<"property.present">;
58
+ property: import("zod").ZodString;
59
+ }, import("zod/v4/core").$strict>, import("zod").ZodObject<{
60
+ kind: import("zod").ZodLiteral<"identity.equal">;
61
+ identity: import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodObject<{
62
+ source: import("zod").ZodString;
63
+ target: import("zod").ZodString;
64
+ class: import("zod").ZodString;
65
+ }, import("zod/v4/core").$strict>]>;
66
+ }, import("zod/v4/core").$strict>], "kind">;
67
+ }, import("zod/v4/core").$strict>, import("zod").ZodObject<{
68
+ op: import("zod").ZodLiteral<"expand">;
69
+ from: import("zod").ZodString;
70
+ via: import("zod").ZodArray<import("zod").ZodObject<{
71
+ origin: import("zod").ZodString;
72
+ kind: import("zod").ZodLiteral<"class">;
73
+ name: import("zod").ZodString;
74
+ }, import("zod/v4/core").$strict>>;
75
+ direction: import("zod").ZodEnum<{
77
76
  incident: "incident";
78
77
  incoming: "incoming";
79
78
  outgoing: "outgoing";
80
79
  }>;
81
- bindings: z.ZodObject<{
82
- edge: z.ZodString;
83
- node: z.ZodString;
84
- }, z.core.$strict>;
85
- }, z.core.$strict>], "op">>;
86
- select: z.ZodDiscriminatedUnion<[z.ZodObject<{
87
- kind: z.ZodLiteral<"graph">;
88
- binding: z.ZodString;
89
- order: z.ZodOptional<z.ZodObject<{
90
- property: z.ZodString;
91
- direction: z.ZodEnum<{
80
+ bindings: import("zod").ZodObject<{
81
+ edge: import("zod").ZodString;
82
+ node: import("zod").ZodString;
83
+ }, import("zod/v4/core").$strict>;
84
+ }, import("zod/v4/core").$strict>], "op">>;
85
+ select: import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
86
+ kind: import("zod").ZodLiteral<"graph">;
87
+ binding: import("zod").ZodString;
88
+ order: import("zod").ZodOptional<import("zod").ZodObject<{
89
+ property: import("zod").ZodString;
90
+ direction: import("zod").ZodEnum<{
92
91
  asc: "asc";
93
92
  desc: "desc";
94
93
  }>;
95
- unranked: z.ZodEnum<{
94
+ unranked: import("zod").ZodEnum<{
96
95
  first: "first";
97
96
  last: "last";
98
97
  }>;
99
- }, z.core.$strict>>;
100
- }, z.core.$strict>, z.ZodObject<{
101
- kind: z.ZodLiteral<"nodes">;
102
- binding: z.ZodString;
103
- projection: z.ZodObject<{
104
- kind: z.ZodEnum<{
98
+ }, import("zod/v4/core").$strict>>;
99
+ }, import("zod/v4/core").$strict>, import("zod").ZodObject<{
100
+ kind: import("zod").ZodLiteral<"nodes">;
101
+ binding: import("zod").ZodString;
102
+ projection: import("zod").ZodObject<{
103
+ kind: import("zod").ZodEnum<{
105
104
  reference: "reference";
106
105
  value: "value";
107
106
  }>;
108
- }, z.core.$strict>;
109
- order: z.ZodOptional<z.ZodObject<{
110
- property: z.ZodString;
111
- direction: z.ZodEnum<{
107
+ }, import("zod/v4/core").$strict>;
108
+ order: import("zod").ZodOptional<import("zod").ZodObject<{
109
+ property: import("zod").ZodString;
110
+ direction: import("zod").ZodEnum<{
112
111
  asc: "asc";
113
112
  desc: "desc";
114
113
  }>;
115
- unranked: z.ZodEnum<{
114
+ unranked: import("zod").ZodEnum<{
116
115
  first: "first";
117
116
  last: "last";
118
117
  }>;
119
- }, z.core.$strict>>;
120
- }, z.core.$strict>, z.ZodObject<{
121
- kind: z.ZodLiteral<"edges">;
122
- binding: z.ZodString;
123
- projection: z.ZodObject<{
124
- edge: z.ZodEnum<{
118
+ }, import("zod/v4/core").$strict>>;
119
+ }, import("zod/v4/core").$strict>, import("zod").ZodObject<{
120
+ kind: import("zod").ZodLiteral<"edges">;
121
+ binding: import("zod").ZodString;
122
+ projection: import("zod").ZodObject<{
123
+ edge: import("zod").ZodEnum<{
125
124
  reference: "reference";
126
125
  value: "value";
127
126
  }>;
128
- source: z.ZodEnum<{
127
+ source: import("zod").ZodEnum<{
129
128
  reference: "reference";
130
129
  value: "value";
131
130
  }>;
132
- target: z.ZodEnum<{
131
+ target: import("zod").ZodEnum<{
133
132
  reference: "reference";
134
133
  value: "value";
135
134
  }>;
136
- }, z.core.$strict>;
137
- order: z.ZodOptional<z.ZodObject<{
138
- property: z.ZodString;
139
- direction: z.ZodEnum<{
135
+ }, import("zod/v4/core").$strict>;
136
+ order: import("zod").ZodOptional<import("zod").ZodObject<{
137
+ property: import("zod").ZodString;
138
+ direction: import("zod").ZodEnum<{
140
139
  asc: "asc";
141
140
  desc: "desc";
142
141
  }>;
143
- unranked: z.ZodEnum<{
142
+ unranked: import("zod").ZodEnum<{
144
143
  first: "first";
145
144
  last: "last";
146
145
  }>;
147
- }, z.core.$strict>>;
148
- }, z.core.$strict>], "kind">;
149
- }, z.core.$strict>;
146
+ }, import("zod/v4/core").$strict>>;
147
+ }, import("zod/v4/core").$strict>], "kind">;
148
+ }, import("zod/v4/core").$strict>;
@@ -1,68 +1,68 @@
1
- import { z } from 'zod';
1
+ import { array, discriminatedUnion, enum as enumeration, literal, strictObject, string, union, unknown as unknownSchema, } from 'zod';
2
2
  import { QUERY_AST_FORMAT, QUERY_AST_LIMITS, QUERY_AST_VERSION } from './model.js';
3
- const text = z.string().min(1);
3
+ const text = string().min(1);
4
4
  const binding = text.max(64);
5
- const classRef = z.strictObject({
5
+ const classRef = strictObject({
6
6
  origin: text.max(253),
7
- kind: z.literal('class'),
7
+ kind: literal('class'),
8
8
  name: text,
9
9
  });
10
- const nodeSourceTerm = z.discriminatedUnion('kind', [
11
- z.strictObject({ kind: z.literal('path'), path: text }),
12
- z.strictObject({ kind: z.literal('class'), class: classRef }),
10
+ const nodeSourceTerm = discriminatedUnion('kind', [
11
+ strictObject({ kind: literal('path'), path: text }),
12
+ strictObject({ kind: literal('class'), class: classRef }),
13
13
  ]);
14
- const classSourceTerm = z.strictObject({ kind: z.literal('class'), class: classRef });
15
- const source = z.discriminatedUnion('kind', [
16
- z.strictObject({
17
- kind: z.literal('node'),
18
- terms: z.array(nodeSourceTerm).min(1).max(QUERY_AST_LIMITS.sourceTerms),
14
+ const classSourceTerm = strictObject({ kind: literal('class'), class: classRef });
15
+ const source = discriminatedUnion('kind', [
16
+ strictObject({
17
+ kind: literal('node'),
18
+ terms: array(nodeSourceTerm).min(1).max(QUERY_AST_LIMITS.sourceTerms),
19
19
  binding,
20
20
  }),
21
- z.strictObject({
22
- kind: z.literal('edge'),
23
- terms: z.array(classSourceTerm).min(1).max(QUERY_AST_LIMITS.sourceTerms),
24
- bindings: z.strictObject({ source: binding, edge: binding, target: binding }),
21
+ strictObject({
22
+ kind: literal('edge'),
23
+ terms: array(classSourceTerm).min(1).max(QUERY_AST_LIMITS.sourceTerms),
24
+ bindings: strictObject({ source: binding, edge: binding, target: binding }),
25
25
  }),
26
26
  ]);
27
- const predicate = z.discriminatedUnion('kind', [
28
- z.strictObject({ kind: z.literal('class.satisfies'), class: classRef }),
29
- z.strictObject({ kind: z.literal('class.equal'), class: classRef }),
30
- z.strictObject({ kind: z.literal('property.equal'), property: text, value: z.unknown() }),
31
- z.strictObject({ kind: z.literal('property.present'), property: text }),
32
- z.strictObject({
33
- kind: z.literal('identity.equal'),
34
- identity: z.union([text, z.strictObject({ source: text, target: text, class: text })]),
27
+ const predicate = discriminatedUnion('kind', [
28
+ strictObject({ kind: literal('class.satisfies'), class: classRef }),
29
+ strictObject({ kind: literal('class.equal'), class: classRef }),
30
+ strictObject({ kind: literal('property.equal'), property: text, value: unknownSchema() }),
31
+ strictObject({ kind: literal('property.present'), property: text }),
32
+ strictObject({
33
+ kind: literal('identity.equal'),
34
+ identity: union([text, strictObject({ source: text, target: text, class: text })]),
35
35
  }),
36
36
  ]);
37
- const filter = z.strictObject({ op: z.literal('filter'), binding, predicate });
38
- const expand = z.strictObject({
39
- op: z.literal('expand'),
37
+ const filter = strictObject({ op: literal('filter'), binding, predicate });
38
+ const expand = strictObject({
39
+ op: literal('expand'),
40
40
  from: binding,
41
- via: z.array(classRef).min(1).max(QUERY_AST_LIMITS.expansionClassesPerStep),
42
- direction: z.enum(['outgoing', 'incoming', 'incident']),
43
- bindings: z.strictObject({ edge: binding, node: binding }),
41
+ via: array(classRef).min(1).max(QUERY_AST_LIMITS.expansionClassesPerStep),
42
+ direction: enumeration(['outgoing', 'incoming', 'incident']),
43
+ bindings: strictObject({ edge: binding, node: binding }),
44
44
  });
45
- const propertyOrder = z.strictObject({
45
+ const propertyOrder = strictObject({
46
46
  property: text,
47
- direction: z.enum(['asc', 'desc']),
48
- unranked: z.enum(['first', 'last']),
47
+ direction: enumeration(['asc', 'desc']),
48
+ unranked: enumeration(['first', 'last']),
49
49
  });
50
- const projectionShape = z.enum(['reference', 'value']);
51
- const graphSelect = z.strictObject({
52
- kind: z.literal('graph'),
50
+ const projectionShape = enumeration(['reference', 'value']);
51
+ const graphSelect = strictObject({
52
+ kind: literal('graph'),
53
53
  binding,
54
54
  order: propertyOrder.optional(),
55
55
  });
56
- const nodeSelect = z.strictObject({
57
- kind: z.literal('nodes'),
56
+ const nodeSelect = strictObject({
57
+ kind: literal('nodes'),
58
58
  binding,
59
- projection: z.strictObject({ kind: projectionShape }),
59
+ projection: strictObject({ kind: projectionShape }),
60
60
  order: propertyOrder.optional(),
61
61
  });
62
- const edgeSelect = z.strictObject({
63
- kind: z.literal('edges'),
62
+ const edgeSelect = strictObject({
63
+ kind: literal('edges'),
64
64
  binding,
65
- projection: z.strictObject({
65
+ projection: strictObject({
66
66
  edge: projectionShape,
67
67
  source: projectionShape,
68
68
  target: projectionShape,
@@ -70,10 +70,10 @@ const edgeSelect = z.strictObject({
70
70
  order: propertyOrder.optional(),
71
71
  });
72
72
  /** Structural JSON contract; decodeQueryAST owns canonical identities and binding dependencies. */
73
- export const queryAstSchema = z.strictObject({
74
- format: z.literal(QUERY_AST_FORMAT),
75
- version: z.literal(QUERY_AST_VERSION),
73
+ export const queryAstSchema = strictObject({
74
+ format: literal(QUERY_AST_FORMAT),
75
+ version: literal(QUERY_AST_VERSION),
76
76
  source,
77
- steps: z.array(z.discriminatedUnion('op', [filter, expand])).max(QUERY_AST_LIMITS.steps),
78
- select: z.discriminatedUnion('kind', [graphSelect, nodeSelect, edgeSelect]),
77
+ steps: array(discriminatedUnion('op', [filter, expand])).max(QUERY_AST_LIMITS.steps),
78
+ select: discriminatedUnion('kind', [graphSelect, nodeSelect, edgeSelect]),
79
79
  });
@@ -1,95 +1,94 @@
1
- import { z } from 'zod';
2
1
  /** Exact discriminated structural result; Runtime owns Query-relative closure and order. */
3
- export declare const queryResultSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
4
- kind: z.ZodLiteral<"graph">;
5
- graph: z.ZodObject<{
6
- nodes: z.ZodArray<z.ZodObject<{
7
- id: z.ZodString;
8
- class: z.ZodString;
9
- props: z.ZodRecord<z.ZodString, z.ZodUnknown>;
10
- }, z.core.$strict>>;
11
- edges: z.ZodArray<z.ZodObject<{
12
- source: z.ZodString;
13
- target: z.ZodString;
14
- class: z.ZodString;
15
- slug: z.ZodOptional<z.ZodType<import("../../edge/index.js").EdgeSlug, unknown, z.core.$ZodTypeInternals<import("../../edge/index.js").EdgeSlug, unknown>>>;
16
- props: z.ZodRecord<z.ZodString, z.ZodUnknown>;
17
- }, z.core.$strict>>;
18
- }, z.core.$strict>;
19
- selection: z.ZodDiscriminatedUnion<[z.ZodObject<{
20
- kind: z.ZodLiteral<"node">;
21
- ids: z.ZodArray<z.ZodString>;
22
- }, z.core.$strict>, z.ZodObject<{
23
- kind: z.ZodLiteral<"edge">;
24
- keys: z.ZodArray<z.ZodObject<{
25
- source: z.ZodString;
26
- target: z.ZodString;
27
- class: z.ZodString;
28
- }, z.core.$strict>>;
29
- }, z.core.$strict>], "kind">;
30
- }, z.core.$strict>, z.ZodObject<{
31
- kind: z.ZodLiteral<"nodes">;
32
- nodes: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
33
- kind: z.ZodLiteral<"reference">;
34
- value: z.ZodObject<{
35
- id: z.ZodString;
36
- class: z.ZodString;
37
- }, z.core.$strict>;
38
- }, z.core.$strict>, z.ZodObject<{
39
- kind: z.ZodLiteral<"value">;
40
- value: z.ZodObject<{
41
- id: z.ZodString;
42
- class: z.ZodString;
43
- props: z.ZodRecord<z.ZodString, z.ZodUnknown>;
44
- }, z.core.$strict>;
45
- }, z.core.$strict>], "kind">>;
46
- }, z.core.$strict>, z.ZodObject<{
47
- kind: z.ZodLiteral<"edges">;
48
- edges: z.ZodArray<z.ZodObject<{
49
- edge: z.ZodDiscriminatedUnion<[z.ZodObject<{
50
- kind: z.ZodLiteral<"reference">;
51
- value: z.ZodObject<{
52
- source: z.ZodString;
53
- target: z.ZodString;
54
- class: z.ZodString;
55
- }, z.core.$strict>;
56
- }, z.core.$strict>, z.ZodObject<{
57
- kind: z.ZodLiteral<"value">;
58
- value: z.ZodObject<{
59
- source: z.ZodString;
60
- target: z.ZodString;
61
- class: z.ZodString;
62
- slug: z.ZodOptional<z.ZodType<import("../../edge/index.js").EdgeSlug, unknown, z.core.$ZodTypeInternals<import("../../edge/index.js").EdgeSlug, unknown>>>;
63
- props: z.ZodRecord<z.ZodString, z.ZodUnknown>;
64
- }, z.core.$strict>;
65
- }, z.core.$strict>], "kind">;
66
- source: z.ZodDiscriminatedUnion<[z.ZodObject<{
67
- kind: z.ZodLiteral<"reference">;
68
- value: z.ZodObject<{
69
- id: z.ZodString;
70
- class: z.ZodString;
71
- }, z.core.$strict>;
72
- }, z.core.$strict>, z.ZodObject<{
73
- kind: z.ZodLiteral<"value">;
74
- value: z.ZodObject<{
75
- id: z.ZodString;
76
- class: z.ZodString;
77
- props: z.ZodRecord<z.ZodString, z.ZodUnknown>;
78
- }, z.core.$strict>;
79
- }, z.core.$strict>], "kind">;
80
- target: z.ZodDiscriminatedUnion<[z.ZodObject<{
81
- kind: z.ZodLiteral<"reference">;
82
- value: z.ZodObject<{
83
- id: z.ZodString;
84
- class: z.ZodString;
85
- }, z.core.$strict>;
86
- }, z.core.$strict>, z.ZodObject<{
87
- kind: z.ZodLiteral<"value">;
88
- value: z.ZodObject<{
89
- id: z.ZodString;
90
- class: z.ZodString;
91
- props: z.ZodRecord<z.ZodString, z.ZodUnknown>;
92
- }, z.core.$strict>;
93
- }, z.core.$strict>], "kind">;
94
- }, z.core.$strict>>;
95
- }, z.core.$strict>], "kind">;
2
+ export declare const queryResultSchema: import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
3
+ kind: import("zod").ZodLiteral<"graph">;
4
+ graph: import("zod").ZodObject<{
5
+ nodes: import("zod").ZodArray<import("zod").ZodObject<{
6
+ id: import("zod").ZodString;
7
+ class: import("zod").ZodString;
8
+ props: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>;
9
+ }, import("zod/v4/core").$strict>>;
10
+ edges: import("zod").ZodArray<import("zod").ZodObject<{
11
+ source: import("zod").ZodString;
12
+ target: import("zod").ZodString;
13
+ class: import("zod").ZodString;
14
+ slug: import("zod").ZodOptional<import("zod").ZodType<import("../../edge/index.js").EdgeSlug, unknown, import("zod/v4/core").$ZodTypeInternals<import("../../edge/index.js").EdgeSlug, unknown>>>;
15
+ props: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>;
16
+ }, import("zod/v4/core").$strict>>;
17
+ }, import("zod/v4/core").$strict>;
18
+ selection: import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
19
+ kind: import("zod").ZodLiteral<"node">;
20
+ ids: import("zod").ZodArray<import("zod").ZodString>;
21
+ }, import("zod/v4/core").$strict>, import("zod").ZodObject<{
22
+ kind: import("zod").ZodLiteral<"edge">;
23
+ keys: import("zod").ZodArray<import("zod").ZodObject<{
24
+ source: import("zod").ZodString;
25
+ target: import("zod").ZodString;
26
+ class: import("zod").ZodString;
27
+ }, import("zod/v4/core").$strict>>;
28
+ }, import("zod/v4/core").$strict>], "kind">;
29
+ }, import("zod/v4/core").$strict>, import("zod").ZodObject<{
30
+ kind: import("zod").ZodLiteral<"nodes">;
31
+ nodes: import("zod").ZodArray<import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
32
+ kind: import("zod").ZodLiteral<"reference">;
33
+ value: import("zod").ZodObject<{
34
+ id: import("zod").ZodString;
35
+ class: import("zod").ZodString;
36
+ }, import("zod/v4/core").$strict>;
37
+ }, import("zod/v4/core").$strict>, import("zod").ZodObject<{
38
+ kind: import("zod").ZodLiteral<"value">;
39
+ value: import("zod").ZodObject<{
40
+ id: import("zod").ZodString;
41
+ class: import("zod").ZodString;
42
+ props: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>;
43
+ }, import("zod/v4/core").$strict>;
44
+ }, import("zod/v4/core").$strict>], "kind">>;
45
+ }, import("zod/v4/core").$strict>, import("zod").ZodObject<{
46
+ kind: import("zod").ZodLiteral<"edges">;
47
+ edges: import("zod").ZodArray<import("zod").ZodObject<{
48
+ edge: import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
49
+ kind: import("zod").ZodLiteral<"reference">;
50
+ value: import("zod").ZodObject<{
51
+ source: import("zod").ZodString;
52
+ target: import("zod").ZodString;
53
+ class: import("zod").ZodString;
54
+ }, import("zod/v4/core").$strict>;
55
+ }, import("zod/v4/core").$strict>, import("zod").ZodObject<{
56
+ kind: import("zod").ZodLiteral<"value">;
57
+ value: import("zod").ZodObject<{
58
+ source: import("zod").ZodString;
59
+ target: import("zod").ZodString;
60
+ class: import("zod").ZodString;
61
+ slug: import("zod").ZodOptional<import("zod").ZodType<import("../../edge/index.js").EdgeSlug, unknown, import("zod/v4/core").$ZodTypeInternals<import("../../edge/index.js").EdgeSlug, unknown>>>;
62
+ props: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>;
63
+ }, import("zod/v4/core").$strict>;
64
+ }, import("zod/v4/core").$strict>], "kind">;
65
+ source: import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
66
+ kind: import("zod").ZodLiteral<"reference">;
67
+ value: import("zod").ZodObject<{
68
+ id: import("zod").ZodString;
69
+ class: import("zod").ZodString;
70
+ }, import("zod/v4/core").$strict>;
71
+ }, import("zod/v4/core").$strict>, import("zod").ZodObject<{
72
+ kind: import("zod").ZodLiteral<"value">;
73
+ value: import("zod").ZodObject<{
74
+ id: import("zod").ZodString;
75
+ class: import("zod").ZodString;
76
+ props: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>;
77
+ }, import("zod/v4/core").$strict>;
78
+ }, import("zod/v4/core").$strict>], "kind">;
79
+ target: import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
80
+ kind: import("zod").ZodLiteral<"reference">;
81
+ value: import("zod").ZodObject<{
82
+ id: import("zod").ZodString;
83
+ class: import("zod").ZodString;
84
+ }, import("zod/v4/core").$strict>;
85
+ }, import("zod/v4/core").$strict>, import("zod").ZodObject<{
86
+ kind: import("zod").ZodLiteral<"value">;
87
+ value: import("zod").ZodObject<{
88
+ id: import("zod").ZodString;
89
+ class: import("zod").ZodString;
90
+ props: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>;
91
+ }, import("zod/v4/core").$strict>;
92
+ }, import("zod/v4/core").$strict>], "kind">;
93
+ }, import("zod/v4/core").$strict>>;
94
+ }, import("zod/v4/core").$strict>], "kind">;