@astrale-os/kernel-core 0.9.0-beta.25 → 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.
- package/CHANGELOG.md +23 -0
- package/dist/dns-label.d.ts +1 -2
- package/dist/dns-label.js +2 -3
- package/dist/graph/graph/model/wire.d.ts +78 -78
- package/dist/graph/graph/model/wire.js +18 -19
- package/dist/graph/mutate/language/wire.d.ts +215 -215
- package/dist/graph/mutate/language/wire.js +42 -47
- package/dist/graph/mutate/result/wire.d.ts +3 -4
- package/dist/graph/mutate/result/wire.js +4 -4
- package/dist/graph/node/identity/id.d.ts +1 -2
- package/dist/graph/node/identity/id.js +2 -3
- package/dist/graph/query/language/wire.d.ts +113 -114
- package/dist/graph/query/language/wire.js +47 -47
- package/dist/graph/query/result/wire.d.ts +93 -94
- package/dist/graph/query/result/wire.js +20 -20
- package/dist/schema/authority/claims.d.ts +24 -25
- package/dist/schema/authority/claims.js +8 -8
- package/dist/schema/installation/operation-id.d.ts +1 -2
- package/dist/schema/installation/operation-id.js +2 -4
- package/dist/schema/kernel/schema.d.ts +255 -255
- package/dist/schema/kernel/syscalls/contracts/admit.d.ts +11 -12
- package/dist/schema/kernel/syscalls/contracts/admit.js +9 -9
- package/dist/schema/kernel/syscalls/contracts/can.d.ts +7 -8
- package/dist/schema/kernel/syscalls/contracts/can.js +4 -4
- package/dist/schema/kernel/syscalls/contracts/delegate.d.ts +6 -7
- package/dist/schema/kernel/syscalls/contracts/delegate.js +5 -5
- package/dist/schema/kernel/syscalls/contracts/expected.d.ts +4 -5
- package/dist/schema/kernel/syscalls/contracts/expected.js +5 -5
- package/dist/schema/kernel/syscalls/contracts/identity.d.ts +18 -19
- package/dist/schema/kernel/syscalls/contracts/identity.js +6 -6
- package/dist/schema/kernel/syscalls/contracts/install.d.ts +67 -68
- package/dist/schema/kernel/syscalls/contracts/install.js +9 -9
- package/dist/schema/kernel/syscalls/contracts/installation.d.ts +72 -73
- package/dist/schema/kernel/syscalls/contracts/installation.js +12 -12
- package/dist/schema/kernel/syscalls/contracts/introspect.d.ts +4 -5
- package/dist/schema/kernel/syscalls/contracts/introspect.js +4 -4
- package/dist/schema/kernel/syscalls/contracts/journal.d.ts +26 -27
- package/dist/schema/kernel/syscalls/contracts/journal.js +15 -15
- package/dist/schema/kernel/syscalls/contracts/mint.d.ts +6 -7
- package/dist/schema/kernel/syscalls/contracts/mint.js +5 -5
- package/dist/schema/kernel/syscalls/contracts/mutate.d.ts +223 -224
- package/dist/schema/kernel/syscalls/contracts/mutate.js +2 -2
- package/dist/schema/kernel/syscalls/contracts/provision.d.ts +267 -268
- package/dist/schema/kernel/syscalls/contracts/provision.js +15 -17
- package/dist/schema/kernel/syscalls/contracts/query.d.ts +221 -222
- package/dist/schema/kernel/syscalls/contracts/query.js +7 -7
- package/dist/schema/kernel/syscalls/contracts/uninstall.d.ts +36 -37
- package/dist/schema/kernel/syscalls/contracts/uninstall.js +3 -3
- package/dist/schema/kernel/syscalls/contracts/view-resolve.d.ts +31 -32
- package/dist/schema/kernel/syscalls/contracts/view-resolve.js +23 -23
- package/dist/schema/kernel/syscalls/contracts/whoami.d.ts +19 -20
- package/dist/schema/kernel/syscalls/contracts/whoami.js +2 -2
- package/dist/schema/kernel/syscalls/contracts/whois.d.ts +22 -23
- package/dist/schema/kernel/syscalls/contracts/whois.js +3 -3
- package/package.json +2 -2
|
@@ -1,251 +1,251 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { type ZodType } from 'zod';
|
|
2
2
|
import { type EdgeSlug } from '../../edge/index.js';
|
|
3
3
|
/** Structural JSON contract; decodeMutationAST owns paths, bindings and atomic semantics. */
|
|
4
|
-
export declare const mutationAstSchema:
|
|
5
|
-
format:
|
|
6
|
-
version:
|
|
7
|
-
preconditions:
|
|
8
|
-
kind:
|
|
9
|
-
node:
|
|
10
|
-
class:
|
|
11
|
-
props:
|
|
12
|
-
equals:
|
|
13
|
-
absent:
|
|
14
|
-
},
|
|
15
|
-
absent:
|
|
16
|
-
},
|
|
17
|
-
},
|
|
18
|
-
kind:
|
|
19
|
-
edge:
|
|
20
|
-
source:
|
|
21
|
-
target:
|
|
22
|
-
class:
|
|
23
|
-
},
|
|
24
|
-
slug:
|
|
25
|
-
props:
|
|
26
|
-
equals:
|
|
27
|
-
absent:
|
|
28
|
-
},
|
|
29
|
-
absent:
|
|
30
|
-
},
|
|
31
|
-
},
|
|
32
|
-
kind:
|
|
33
|
-
query:
|
|
34
|
-
format:
|
|
35
|
-
version:
|
|
36
|
-
source:
|
|
37
|
-
kind:
|
|
38
|
-
terms:
|
|
39
|
-
kind:
|
|
40
|
-
path:
|
|
41
|
-
},
|
|
42
|
-
kind:
|
|
43
|
-
class:
|
|
44
|
-
origin:
|
|
45
|
-
kind:
|
|
46
|
-
name:
|
|
47
|
-
},
|
|
48
|
-
},
|
|
49
|
-
binding:
|
|
50
|
-
},
|
|
51
|
-
kind:
|
|
52
|
-
terms:
|
|
53
|
-
kind:
|
|
54
|
-
class:
|
|
55
|
-
origin:
|
|
56
|
-
kind:
|
|
57
|
-
name:
|
|
58
|
-
},
|
|
59
|
-
},
|
|
60
|
-
bindings:
|
|
61
|
-
source:
|
|
62
|
-
edge:
|
|
63
|
-
target:
|
|
64
|
-
},
|
|
65
|
-
},
|
|
66
|
-
steps:
|
|
67
|
-
op:
|
|
68
|
-
binding:
|
|
69
|
-
predicate:
|
|
70
|
-
kind:
|
|
71
|
-
class:
|
|
72
|
-
origin:
|
|
73
|
-
kind:
|
|
74
|
-
name:
|
|
75
|
-
},
|
|
76
|
-
},
|
|
77
|
-
kind:
|
|
78
|
-
class:
|
|
79
|
-
origin:
|
|
80
|
-
kind:
|
|
81
|
-
name:
|
|
82
|
-
},
|
|
83
|
-
},
|
|
84
|
-
kind:
|
|
85
|
-
property:
|
|
86
|
-
value:
|
|
87
|
-
},
|
|
88
|
-
kind:
|
|
89
|
-
property:
|
|
90
|
-
},
|
|
91
|
-
kind:
|
|
92
|
-
identity:
|
|
93
|
-
source:
|
|
94
|
-
target:
|
|
95
|
-
class:
|
|
96
|
-
},
|
|
97
|
-
},
|
|
98
|
-
},
|
|
99
|
-
op:
|
|
100
|
-
from:
|
|
101
|
-
via:
|
|
102
|
-
origin:
|
|
103
|
-
kind:
|
|
104
|
-
name:
|
|
105
|
-
},
|
|
106
|
-
direction:
|
|
4
|
+
export declare const mutationAstSchema: import("zod").ZodObject<{
|
|
5
|
+
format: import("zod").ZodLiteral<"astrale.graph.mutation">;
|
|
6
|
+
version: import("zod").ZodLiteral<"v3">;
|
|
7
|
+
preconditions: import("zod").ZodArray<import("zod").ZodUnion<readonly [import("zod").ZodObject<{
|
|
8
|
+
kind: import("zod").ZodLiteral<"node">;
|
|
9
|
+
node: import("zod").ZodString;
|
|
10
|
+
class: import("zod").ZodString;
|
|
11
|
+
props: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodObject<{
|
|
12
|
+
equals: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>;
|
|
13
|
+
absent: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
|
|
14
|
+
}, import("zod/v4/core").$strict>, import("zod").ZodObject<{
|
|
15
|
+
absent: import("zod").ZodArray<import("zod").ZodString>;
|
|
16
|
+
}, import("zod/v4/core").$strict>]>>;
|
|
17
|
+
}, import("zod/v4/core").$strict>, import("zod").ZodObject<{
|
|
18
|
+
kind: import("zod").ZodLiteral<"edge">;
|
|
19
|
+
edge: import("zod").ZodObject<{
|
|
20
|
+
source: import("zod").ZodString;
|
|
21
|
+
target: import("zod").ZodString;
|
|
22
|
+
class: import("zod").ZodString;
|
|
23
|
+
}, import("zod/v4/core").$strict>;
|
|
24
|
+
slug: import("zod").ZodOptional<import("zod").ZodNullable<ZodType<EdgeSlug, unknown, import("zod/v4/core").$ZodTypeInternals<EdgeSlug, unknown>>>>;
|
|
25
|
+
props: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodObject<{
|
|
26
|
+
equals: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>;
|
|
27
|
+
absent: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
|
|
28
|
+
}, import("zod/v4/core").$strict>, import("zod").ZodObject<{
|
|
29
|
+
absent: import("zod").ZodArray<import("zod").ZodString>;
|
|
30
|
+
}, import("zod/v4/core").$strict>]>>;
|
|
31
|
+
}, import("zod/v4/core").$strict>, import("zod").ZodObject<{
|
|
32
|
+
kind: import("zod").ZodLiteral<"query">;
|
|
33
|
+
query: import("zod").ZodObject<{
|
|
34
|
+
format: import("zod").ZodLiteral<"astrale.graph.query">;
|
|
35
|
+
version: import("zod").ZodLiteral<"v6">;
|
|
36
|
+
source: import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
|
|
37
|
+
kind: import("zod").ZodLiteral<"node">;
|
|
38
|
+
terms: import("zod").ZodArray<import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
|
|
39
|
+
kind: import("zod").ZodLiteral<"path">;
|
|
40
|
+
path: import("zod").ZodString;
|
|
41
|
+
}, import("zod/v4/core").$strict>, import("zod").ZodObject<{
|
|
42
|
+
kind: import("zod").ZodLiteral<"class">;
|
|
43
|
+
class: import("zod").ZodObject<{
|
|
44
|
+
origin: import("zod").ZodString;
|
|
45
|
+
kind: import("zod").ZodLiteral<"class">;
|
|
46
|
+
name: import("zod").ZodString;
|
|
47
|
+
}, import("zod/v4/core").$strict>;
|
|
48
|
+
}, import("zod/v4/core").$strict>], "kind">>;
|
|
49
|
+
binding: import("zod").ZodString;
|
|
50
|
+
}, import("zod/v4/core").$strict>, import("zod").ZodObject<{
|
|
51
|
+
kind: import("zod").ZodLiteral<"edge">;
|
|
52
|
+
terms: import("zod").ZodArray<import("zod").ZodObject<{
|
|
53
|
+
kind: import("zod").ZodLiteral<"class">;
|
|
54
|
+
class: import("zod").ZodObject<{
|
|
55
|
+
origin: import("zod").ZodString;
|
|
56
|
+
kind: import("zod").ZodLiteral<"class">;
|
|
57
|
+
name: import("zod").ZodString;
|
|
58
|
+
}, import("zod/v4/core").$strict>;
|
|
59
|
+
}, import("zod/v4/core").$strict>>;
|
|
60
|
+
bindings: import("zod").ZodObject<{
|
|
61
|
+
source: import("zod").ZodString;
|
|
62
|
+
edge: import("zod").ZodString;
|
|
63
|
+
target: import("zod").ZodString;
|
|
64
|
+
}, import("zod/v4/core").$strict>;
|
|
65
|
+
}, import("zod/v4/core").$strict>], "kind">;
|
|
66
|
+
steps: import("zod").ZodArray<import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
|
|
67
|
+
op: import("zod").ZodLiteral<"filter">;
|
|
68
|
+
binding: import("zod").ZodString;
|
|
69
|
+
predicate: import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
|
|
70
|
+
kind: import("zod").ZodLiteral<"class.satisfies">;
|
|
71
|
+
class: import("zod").ZodObject<{
|
|
72
|
+
origin: import("zod").ZodString;
|
|
73
|
+
kind: import("zod").ZodLiteral<"class">;
|
|
74
|
+
name: import("zod").ZodString;
|
|
75
|
+
}, import("zod/v4/core").$strict>;
|
|
76
|
+
}, import("zod/v4/core").$strict>, import("zod").ZodObject<{
|
|
77
|
+
kind: import("zod").ZodLiteral<"class.equal">;
|
|
78
|
+
class: import("zod").ZodObject<{
|
|
79
|
+
origin: import("zod").ZodString;
|
|
80
|
+
kind: import("zod").ZodLiteral<"class">;
|
|
81
|
+
name: import("zod").ZodString;
|
|
82
|
+
}, import("zod/v4/core").$strict>;
|
|
83
|
+
}, import("zod/v4/core").$strict>, import("zod").ZodObject<{
|
|
84
|
+
kind: import("zod").ZodLiteral<"property.equal">;
|
|
85
|
+
property: import("zod").ZodString;
|
|
86
|
+
value: import("zod").ZodUnknown;
|
|
87
|
+
}, import("zod/v4/core").$strict>, import("zod").ZodObject<{
|
|
88
|
+
kind: import("zod").ZodLiteral<"property.present">;
|
|
89
|
+
property: import("zod").ZodString;
|
|
90
|
+
}, import("zod/v4/core").$strict>, import("zod").ZodObject<{
|
|
91
|
+
kind: import("zod").ZodLiteral<"identity.equal">;
|
|
92
|
+
identity: import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodObject<{
|
|
93
|
+
source: import("zod").ZodString;
|
|
94
|
+
target: import("zod").ZodString;
|
|
95
|
+
class: import("zod").ZodString;
|
|
96
|
+
}, import("zod/v4/core").$strict>]>;
|
|
97
|
+
}, import("zod/v4/core").$strict>], "kind">;
|
|
98
|
+
}, import("zod/v4/core").$strict>, import("zod").ZodObject<{
|
|
99
|
+
op: import("zod").ZodLiteral<"expand">;
|
|
100
|
+
from: import("zod").ZodString;
|
|
101
|
+
via: import("zod").ZodArray<import("zod").ZodObject<{
|
|
102
|
+
origin: import("zod").ZodString;
|
|
103
|
+
kind: import("zod").ZodLiteral<"class">;
|
|
104
|
+
name: import("zod").ZodString;
|
|
105
|
+
}, import("zod/v4/core").$strict>>;
|
|
106
|
+
direction: import("zod").ZodEnum<{
|
|
107
107
|
incident: "incident";
|
|
108
108
|
incoming: "incoming";
|
|
109
109
|
outgoing: "outgoing";
|
|
110
110
|
}>;
|
|
111
|
-
bindings:
|
|
112
|
-
edge:
|
|
113
|
-
node:
|
|
114
|
-
},
|
|
115
|
-
},
|
|
116
|
-
select:
|
|
117
|
-
kind:
|
|
118
|
-
binding:
|
|
119
|
-
order:
|
|
120
|
-
property:
|
|
121
|
-
direction:
|
|
111
|
+
bindings: import("zod").ZodObject<{
|
|
112
|
+
edge: import("zod").ZodString;
|
|
113
|
+
node: import("zod").ZodString;
|
|
114
|
+
}, import("zod/v4/core").$strict>;
|
|
115
|
+
}, import("zod/v4/core").$strict>], "op">>;
|
|
116
|
+
select: import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
|
|
117
|
+
kind: import("zod").ZodLiteral<"graph">;
|
|
118
|
+
binding: import("zod").ZodString;
|
|
119
|
+
order: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
120
|
+
property: import("zod").ZodString;
|
|
121
|
+
direction: import("zod").ZodEnum<{
|
|
122
122
|
asc: "asc";
|
|
123
123
|
desc: "desc";
|
|
124
124
|
}>;
|
|
125
|
-
unranked:
|
|
125
|
+
unranked: import("zod").ZodEnum<{
|
|
126
126
|
first: "first";
|
|
127
127
|
last: "last";
|
|
128
128
|
}>;
|
|
129
|
-
},
|
|
130
|
-
},
|
|
131
|
-
kind:
|
|
132
|
-
binding:
|
|
133
|
-
projection:
|
|
134
|
-
kind:
|
|
129
|
+
}, import("zod/v4/core").$strict>>;
|
|
130
|
+
}, import("zod/v4/core").$strict>, import("zod").ZodObject<{
|
|
131
|
+
kind: import("zod").ZodLiteral<"nodes">;
|
|
132
|
+
binding: import("zod").ZodString;
|
|
133
|
+
projection: import("zod").ZodObject<{
|
|
134
|
+
kind: import("zod").ZodEnum<{
|
|
135
135
|
reference: "reference";
|
|
136
136
|
value: "value";
|
|
137
137
|
}>;
|
|
138
|
-
},
|
|
139
|
-
order:
|
|
140
|
-
property:
|
|
141
|
-
direction:
|
|
138
|
+
}, import("zod/v4/core").$strict>;
|
|
139
|
+
order: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
140
|
+
property: import("zod").ZodString;
|
|
141
|
+
direction: import("zod").ZodEnum<{
|
|
142
142
|
asc: "asc";
|
|
143
143
|
desc: "desc";
|
|
144
144
|
}>;
|
|
145
|
-
unranked:
|
|
145
|
+
unranked: import("zod").ZodEnum<{
|
|
146
146
|
first: "first";
|
|
147
147
|
last: "last";
|
|
148
148
|
}>;
|
|
149
|
-
},
|
|
150
|
-
},
|
|
151
|
-
kind:
|
|
152
|
-
binding:
|
|
153
|
-
projection:
|
|
154
|
-
edge:
|
|
149
|
+
}, import("zod/v4/core").$strict>>;
|
|
150
|
+
}, import("zod/v4/core").$strict>, import("zod").ZodObject<{
|
|
151
|
+
kind: import("zod").ZodLiteral<"edges">;
|
|
152
|
+
binding: import("zod").ZodString;
|
|
153
|
+
projection: import("zod").ZodObject<{
|
|
154
|
+
edge: import("zod").ZodEnum<{
|
|
155
155
|
reference: "reference";
|
|
156
156
|
value: "value";
|
|
157
157
|
}>;
|
|
158
|
-
source:
|
|
158
|
+
source: import("zod").ZodEnum<{
|
|
159
159
|
reference: "reference";
|
|
160
160
|
value: "value";
|
|
161
161
|
}>;
|
|
162
|
-
target:
|
|
162
|
+
target: import("zod").ZodEnum<{
|
|
163
163
|
reference: "reference";
|
|
164
164
|
value: "value";
|
|
165
165
|
}>;
|
|
166
|
-
},
|
|
167
|
-
order:
|
|
168
|
-
property:
|
|
169
|
-
direction:
|
|
166
|
+
}, import("zod/v4/core").$strict>;
|
|
167
|
+
order: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
168
|
+
property: import("zod").ZodString;
|
|
169
|
+
direction: import("zod").ZodEnum<{
|
|
170
170
|
asc: "asc";
|
|
171
171
|
desc: "desc";
|
|
172
172
|
}>;
|
|
173
|
-
unranked:
|
|
173
|
+
unranked: import("zod").ZodEnum<{
|
|
174
174
|
first: "first";
|
|
175
175
|
last: "last";
|
|
176
176
|
}>;
|
|
177
|
-
},
|
|
178
|
-
},
|
|
179
|
-
},
|
|
180
|
-
equals:
|
|
181
|
-
kind:
|
|
182
|
-
ids:
|
|
183
|
-
},
|
|
184
|
-
kind:
|
|
185
|
-
keys:
|
|
186
|
-
source:
|
|
187
|
-
target:
|
|
188
|
-
class:
|
|
189
|
-
},
|
|
190
|
-
},
|
|
191
|
-
},
|
|
192
|
-
operations:
|
|
193
|
-
op:
|
|
194
|
-
as:
|
|
195
|
-
class:
|
|
196
|
-
props:
|
|
197
|
-
},
|
|
198
|
-
op:
|
|
199
|
-
node:
|
|
200
|
-
class:
|
|
201
|
-
props:
|
|
202
|
-
set:
|
|
203
|
-
unset:
|
|
204
|
-
},
|
|
205
|
-
},
|
|
206
|
-
op:
|
|
207
|
-
node:
|
|
208
|
-
class:
|
|
209
|
-
},
|
|
210
|
-
op:
|
|
211
|
-
class:
|
|
212
|
-
source:
|
|
213
|
-
created:
|
|
214
|
-
},
|
|
215
|
-
target:
|
|
216
|
-
created:
|
|
217
|
-
},
|
|
218
|
-
slug:
|
|
219
|
-
props:
|
|
220
|
-
},
|
|
221
|
-
op:
|
|
222
|
-
edge:
|
|
223
|
-
source:
|
|
224
|
-
target:
|
|
225
|
-
class:
|
|
226
|
-
},
|
|
227
|
-
slug:
|
|
228
|
-
props:
|
|
229
|
-
set:
|
|
230
|
-
unset:
|
|
231
|
-
},
|
|
232
|
-
},
|
|
233
|
-
op:
|
|
234
|
-
edge:
|
|
235
|
-
source:
|
|
236
|
-
target:
|
|
237
|
-
class:
|
|
238
|
-
},
|
|
239
|
-
props:
|
|
240
|
-
set:
|
|
241
|
-
unset:
|
|
242
|
-
},
|
|
243
|
-
},
|
|
244
|
-
op:
|
|
245
|
-
edge:
|
|
246
|
-
source:
|
|
247
|
-
target:
|
|
248
|
-
class:
|
|
249
|
-
},
|
|
250
|
-
},
|
|
251
|
-
},
|
|
177
|
+
}, import("zod/v4/core").$strict>>;
|
|
178
|
+
}, import("zod/v4/core").$strict>], "kind">;
|
|
179
|
+
}, import("zod/v4/core").$strict>;
|
|
180
|
+
equals: import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
|
|
181
|
+
kind: import("zod").ZodLiteral<"node">;
|
|
182
|
+
ids: import("zod").ZodArray<import("zod").ZodString>;
|
|
183
|
+
}, import("zod/v4/core").$strict>, import("zod").ZodObject<{
|
|
184
|
+
kind: import("zod").ZodLiteral<"edge">;
|
|
185
|
+
keys: import("zod").ZodArray<import("zod").ZodObject<{
|
|
186
|
+
source: import("zod").ZodString;
|
|
187
|
+
target: import("zod").ZodString;
|
|
188
|
+
class: import("zod").ZodString;
|
|
189
|
+
}, import("zod/v4/core").$strict>>;
|
|
190
|
+
}, import("zod/v4/core").$strict>], "kind">;
|
|
191
|
+
}, import("zod/v4/core").$strict>]>>;
|
|
192
|
+
operations: import("zod").ZodArray<import("zod").ZodUnion<readonly [import("zod").ZodObject<{
|
|
193
|
+
op: import("zod").ZodLiteral<"node.create">;
|
|
194
|
+
as: import("zod").ZodString;
|
|
195
|
+
class: import("zod").ZodString;
|
|
196
|
+
props: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>;
|
|
197
|
+
}, import("zod/v4/core").$strict>, import("zod").ZodObject<{
|
|
198
|
+
op: import("zod").ZodLiteral<"node.update">;
|
|
199
|
+
node: import("zod").ZodString;
|
|
200
|
+
class: import("zod").ZodString;
|
|
201
|
+
props: import("zod").ZodObject<{
|
|
202
|
+
set: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>;
|
|
203
|
+
unset: import("zod").ZodArray<import("zod").ZodString>;
|
|
204
|
+
}, import("zod/v4/core").$strict>;
|
|
205
|
+
}, import("zod/v4/core").$strict>, import("zod").ZodObject<{
|
|
206
|
+
op: import("zod").ZodLiteral<"node.delete">;
|
|
207
|
+
node: import("zod").ZodString;
|
|
208
|
+
class: import("zod").ZodString;
|
|
209
|
+
}, import("zod/v4/core").$strict>, import("zod").ZodObject<{
|
|
210
|
+
op: import("zod").ZodLiteral<"edge.create">;
|
|
211
|
+
class: import("zod").ZodString;
|
|
212
|
+
source: import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodObject<{
|
|
213
|
+
created: import("zod").ZodString;
|
|
214
|
+
}, import("zod/v4/core").$strict>]>;
|
|
215
|
+
target: import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodObject<{
|
|
216
|
+
created: import("zod").ZodString;
|
|
217
|
+
}, import("zod/v4/core").$strict>]>;
|
|
218
|
+
slug: import("zod").ZodOptional<ZodType<EdgeSlug, unknown, import("zod/v4/core").$ZodTypeInternals<EdgeSlug, unknown>>>;
|
|
219
|
+
props: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>;
|
|
220
|
+
}, import("zod/v4/core").$strict>, import("zod").ZodObject<{
|
|
221
|
+
op: import("zod").ZodLiteral<"edge.update">;
|
|
222
|
+
edge: import("zod").ZodObject<{
|
|
223
|
+
source: import("zod").ZodString;
|
|
224
|
+
target: import("zod").ZodString;
|
|
225
|
+
class: import("zod").ZodString;
|
|
226
|
+
}, import("zod/v4/core").$strict>;
|
|
227
|
+
slug: import("zod").ZodNullable<ZodType<EdgeSlug, unknown, import("zod/v4/core").$ZodTypeInternals<EdgeSlug, unknown>>>;
|
|
228
|
+
props: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
229
|
+
set: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>;
|
|
230
|
+
unset: import("zod").ZodArray<import("zod").ZodString>;
|
|
231
|
+
}, import("zod/v4/core").$strict>>;
|
|
232
|
+
}, import("zod/v4/core").$strict>, import("zod").ZodObject<{
|
|
233
|
+
op: import("zod").ZodLiteral<"edge.update">;
|
|
234
|
+
edge: import("zod").ZodObject<{
|
|
235
|
+
source: import("zod").ZodString;
|
|
236
|
+
target: import("zod").ZodString;
|
|
237
|
+
class: import("zod").ZodString;
|
|
238
|
+
}, import("zod/v4/core").$strict>;
|
|
239
|
+
props: import("zod").ZodObject<{
|
|
240
|
+
set: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>;
|
|
241
|
+
unset: import("zod").ZodArray<import("zod").ZodString>;
|
|
242
|
+
}, import("zod/v4/core").$strict>;
|
|
243
|
+
}, import("zod/v4/core").$strict>, import("zod").ZodObject<{
|
|
244
|
+
op: import("zod").ZodLiteral<"edge.delete">;
|
|
245
|
+
edge: import("zod").ZodObject<{
|
|
246
|
+
source: import("zod").ZodString;
|
|
247
|
+
target: import("zod").ZodString;
|
|
248
|
+
class: import("zod").ZodString;
|
|
249
|
+
}, import("zod/v4/core").$strict>;
|
|
250
|
+
}, import("zod/v4/core").$strict>]>>;
|
|
251
|
+
}, import("zod/v4/core").$strict>;
|
|
@@ -1,79 +1,75 @@
|
|
|
1
1
|
import { patterns } from '@astrale-os/kernel-dsl/v1/addressing';
|
|
2
2
|
import { fullMatch } from '@astrale-os/kernel-dsl/v1/value/full-match';
|
|
3
|
-
import {
|
|
3
|
+
import { array, discriminatedUnion, literal, record, strictObject, string, union, unknown as unknownSchema, } from 'zod';
|
|
4
4
|
import { edgeSlugSchema } from '../../edge/index.js';
|
|
5
5
|
import { queryAstSchema } from '../../query/language/index.js';
|
|
6
6
|
import { MUTATION_AST_FORMAT, MUTATION_AST_LIMITS, MUTATION_AST_VERSION } from './model.js';
|
|
7
|
-
const text =
|
|
8
|
-
const binding =
|
|
9
|
-
const propertyKey =
|
|
10
|
-
const props =
|
|
11
|
-
const patch =
|
|
12
|
-
const endpoint =
|
|
13
|
-
const edgeSelector =
|
|
14
|
-
const edgeSlug =
|
|
15
|
-
.string()
|
|
7
|
+
const text = string().min(1);
|
|
8
|
+
const binding = string().min(1).max(64);
|
|
9
|
+
const propertyKey = string().check(fullMatch(patterns.propertyKeyFullMatch));
|
|
10
|
+
const props = record(propertyKey, unknownSchema());
|
|
11
|
+
const patch = strictObject({ set: props, unset: array(propertyKey) });
|
|
12
|
+
const endpoint = union([text, strictObject({ created: binding })]);
|
|
13
|
+
const edgeSelector = strictObject({ source: text, target: text, class: text });
|
|
14
|
+
const edgeSlug = string()
|
|
16
15
|
.min(edgeSlugSchema.minLength)
|
|
17
16
|
.max(edgeSlugSchema.maxLength)
|
|
18
17
|
.check(fullMatch(edgeSlugSchema.fullMatch));
|
|
19
|
-
const edgeUpdateWithSlug =
|
|
20
|
-
op:
|
|
18
|
+
const edgeUpdateWithSlug = strictObject({
|
|
19
|
+
op: literal('edge.update'),
|
|
21
20
|
edge: edgeSelector,
|
|
22
21
|
slug: edgeSlug.nullable(),
|
|
23
22
|
props: patch.optional(),
|
|
24
23
|
});
|
|
25
|
-
const edgeUpdateWithProperties =
|
|
26
|
-
op:
|
|
24
|
+
const edgeUpdateWithProperties = strictObject({
|
|
25
|
+
op: literal('edge.update'),
|
|
27
26
|
edge: edgeSelector,
|
|
28
27
|
props: patch,
|
|
29
28
|
});
|
|
30
|
-
const propertyConditions =
|
|
31
|
-
|
|
32
|
-
|
|
29
|
+
const propertyConditions = union([
|
|
30
|
+
strictObject({ equals: props, absent: array(propertyKey).optional() }),
|
|
31
|
+
strictObject({ absent: array(propertyKey).min(1) }),
|
|
33
32
|
]);
|
|
34
|
-
const expectedSelection =
|
|
35
|
-
|
|
36
|
-
kind:
|
|
37
|
-
ids:
|
|
33
|
+
const expectedSelection = discriminatedUnion('kind', [
|
|
34
|
+
strictObject({
|
|
35
|
+
kind: literal('node'),
|
|
36
|
+
ids: array(text).max(MUTATION_AST_LIMITS.queryExpectedIdentities),
|
|
38
37
|
}),
|
|
39
|
-
|
|
40
|
-
kind:
|
|
41
|
-
keys:
|
|
42
|
-
.array(z.strictObject({ source: text, target: text, class: text }))
|
|
43
|
-
.max(MUTATION_AST_LIMITS.queryExpectedIdentities),
|
|
38
|
+
strictObject({
|
|
39
|
+
kind: literal('edge'),
|
|
40
|
+
keys: array(strictObject({ source: text, target: text, class: text })).max(MUTATION_AST_LIMITS.queryExpectedIdentities),
|
|
44
41
|
}),
|
|
45
42
|
]);
|
|
46
|
-
const precondition =
|
|
47
|
-
|
|
48
|
-
kind:
|
|
43
|
+
const precondition = union([
|
|
44
|
+
strictObject({
|
|
45
|
+
kind: literal('node'),
|
|
49
46
|
node: text,
|
|
50
47
|
class: text,
|
|
51
48
|
props: propertyConditions.optional(),
|
|
52
49
|
}),
|
|
53
|
-
|
|
54
|
-
kind:
|
|
50
|
+
strictObject({
|
|
51
|
+
kind: literal('edge'),
|
|
55
52
|
edge: edgeSelector,
|
|
56
53
|
slug: edgeSlug.nullable().optional(),
|
|
57
54
|
props: propertyConditions.optional(),
|
|
58
55
|
}),
|
|
59
|
-
|
|
60
|
-
kind:
|
|
56
|
+
strictObject({
|
|
57
|
+
kind: literal('query'),
|
|
61
58
|
query: queryAstSchema,
|
|
62
59
|
equals: expectedSelection,
|
|
63
60
|
}),
|
|
64
61
|
]);
|
|
65
62
|
/** Structural JSON contract; decodeMutationAST owns paths, bindings and atomic semantics. */
|
|
66
|
-
export const mutationAstSchema =
|
|
67
|
-
format:
|
|
68
|
-
version:
|
|
69
|
-
preconditions:
|
|
70
|
-
operations:
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
op: z.literal('edge.create'),
|
|
63
|
+
export const mutationAstSchema = strictObject({
|
|
64
|
+
format: literal(MUTATION_AST_FORMAT),
|
|
65
|
+
version: literal(MUTATION_AST_VERSION),
|
|
66
|
+
preconditions: array(precondition).max(MUTATION_AST_LIMITS.preconditions),
|
|
67
|
+
operations: array(union([
|
|
68
|
+
strictObject({ op: literal('node.create'), as: binding, class: text, props }),
|
|
69
|
+
strictObject({ op: literal('node.update'), node: text, class: text, props: patch }),
|
|
70
|
+
strictObject({ op: literal('node.delete'), node: text, class: text }),
|
|
71
|
+
strictObject({
|
|
72
|
+
op: literal('edge.create'),
|
|
77
73
|
class: text,
|
|
78
74
|
source: endpoint,
|
|
79
75
|
target: endpoint,
|
|
@@ -82,7 +78,6 @@ export const mutationAstSchema = z.strictObject({
|
|
|
82
78
|
}),
|
|
83
79
|
edgeUpdateWithSlug,
|
|
84
80
|
edgeUpdateWithProperties,
|
|
85
|
-
|
|
86
|
-
]))
|
|
87
|
-
.min(1),
|
|
81
|
+
strictObject({ op: literal('edge.delete'), edge: edgeSelector }),
|
|
82
|
+
])).min(1),
|
|
88
83
|
});
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
}, z.core.$strict>;
|
|
1
|
+
export declare const mutationResultSchema: import("zod").ZodObject<{
|
|
2
|
+
createdNodes: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodString>;
|
|
3
|
+
}, import("zod/v4/core").$strict>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
const text =
|
|
3
|
-
const binding =
|
|
4
|
-
export const mutationResultSchema =
|
|
1
|
+
import { record, strictObject, string } from 'zod';
|
|
2
|
+
const text = string().min(1);
|
|
3
|
+
const binding = string().min(1).max(64);
|
|
4
|
+
export const mutationResultSchema = strictObject({ createdNodes: record(binding, text) });
|