@x12i/graphenix-core 2.0.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.
@@ -0,0 +1,348 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://graphenix.dev/schema/graphenix-format-2.0.0.json",
4
+ "title": "Graphenix Format 2.0.0",
5
+ "description": "JSON Schema for the Graphenix graph description format (version 2.0.0). Execution semantics are out of scope.",
6
+ "type": "object",
7
+ "required": ["formatVersion", "id", "graph"],
8
+ "additionalProperties": false,
9
+ "properties": {
10
+ "formatVersion": {
11
+ "type": "string",
12
+ "const": "2.0.0",
13
+ "description": "Graphenix format version. Must be `2.0.0`."
14
+ },
15
+ "id": {
16
+ "type": "string",
17
+ "description": "Globally unique identifier for this graph within the system."
18
+ },
19
+ "revision": {
20
+ "type": "string",
21
+ "description": "Version/revision of this specific graph document. Not the Graphenix format version."
22
+ },
23
+ "name": {
24
+ "type": "string",
25
+ "description": "Human-readable name for the graph."
26
+ },
27
+ "description": {
28
+ "type": "string",
29
+ "description": "Free-form description of the graph."
30
+ },
31
+ "tags": {
32
+ "type": "array",
33
+ "items": { "type": "string" },
34
+ "description": "Tags for classification, search, and filtering."
35
+ },
36
+ "graph": {
37
+ "$ref": "#/$defs/Graph"
38
+ },
39
+ "types": {
40
+ "type": "array",
41
+ "items": { "$ref": "#/$defs/TypeDefinition" },
42
+ "description": "Custom logical types referenced by nodes and ports."
43
+ },
44
+ "subgraphs": {
45
+ "type": "array",
46
+ "items": { "$ref": "#/$defs/SubgraphDefinition" },
47
+ "description": "Inlined reusable graphs."
48
+ },
49
+ "metadata": {
50
+ "$ref": "#/$defs/DocumentMetadata"
51
+ }
52
+ },
53
+ "$defs": {
54
+ "GraphenixExtensions": {
55
+ "type": "object",
56
+ "description": "Namespaced extension object. Keys are extension namespace identifiers (e.g. `x12i.execution/v1`). Graphenix core does not interpret extension namespaces.",
57
+ "additionalProperties": true
58
+ },
59
+ "GraphenixMetadata": {
60
+ "type": "object",
61
+ "description": "Arbitrary metadata with optional namespaced extensions under `extensions`.",
62
+ "additionalProperties": true,
63
+ "properties": {
64
+ "extensions": {
65
+ "$ref": "#/$defs/GraphenixExtensions"
66
+ }
67
+ }
68
+ },
69
+ "DocumentMetadata": {
70
+ "allOf": [
71
+ { "$ref": "#/$defs/GraphenixMetadata" },
72
+ {
73
+ "type": "object",
74
+ "description": "Document-level metadata including graph-level summary contracts.",
75
+ "properties": {
76
+ "graphEntry": { "$ref": "#/$defs/GraphEntryContract" },
77
+ "graphResponse": { "$ref": "#/$defs/GraphResponseContract" },
78
+ "catalogRequests": { "$ref": "#/$defs/WoroxCatalogRequests" }
79
+ }
80
+ }
81
+ ]
82
+ },
83
+ "NodeMetadata": {
84
+ "allOf": [
85
+ { "$ref": "#/$defs/GraphenixMetadata" },
86
+ {
87
+ "type": "object",
88
+ "properties": {
89
+ "catalogBinding": { "$ref": "#/$defs/WoroxCatalogBinding" },
90
+ "catalogRequest": { "$ref": "#/$defs/WoroxCatalogRequest" }
91
+ }
92
+ }
93
+ ]
94
+ },
95
+ "Graph": {
96
+ "type": "object",
97
+ "required": ["nodes", "edges", "inputs", "outputs"],
98
+ "additionalProperties": false,
99
+ "properties": {
100
+ "nodes": {
101
+ "type": "array",
102
+ "items": { "$ref": "#/$defs/Node" }
103
+ },
104
+ "edges": {
105
+ "type": "array",
106
+ "items": { "$ref": "#/$defs/Edge" }
107
+ },
108
+ "inputs": {
109
+ "type": "array",
110
+ "items": { "$ref": "#/$defs/GraphInput" }
111
+ },
112
+ "outputs": {
113
+ "type": "array",
114
+ "items": { "$ref": "#/$defs/GraphOutput" }
115
+ },
116
+ "metadata": {
117
+ "$ref": "#/$defs/GraphenixMetadata"
118
+ }
119
+ }
120
+ },
121
+ "Node": {
122
+ "type": "object",
123
+ "required": ["id", "kind"],
124
+ "additionalProperties": false,
125
+ "properties": {
126
+ "id": { "type": "string" },
127
+ "name": { "type": "string" },
128
+ "kind": { "type": "string" },
129
+ "inputs": {
130
+ "type": "array",
131
+ "items": { "$ref": "#/$defs/PortDefinition" },
132
+ "default": []
133
+ },
134
+ "outputs": {
135
+ "type": "array",
136
+ "items": { "$ref": "#/$defs/PortDefinition" },
137
+ "default": []
138
+ },
139
+ "parameters": {
140
+ "type": "object",
141
+ "additionalProperties": true,
142
+ "default": {}
143
+ },
144
+ "metadata": { "$ref": "#/$defs/NodeMetadata" }
145
+ }
146
+ },
147
+ "PortDefinition": {
148
+ "type": "object",
149
+ "required": ["id", "direction", "type"],
150
+ "additionalProperties": false,
151
+ "properties": {
152
+ "id": { "type": "string" },
153
+ "name": { "type": "string" },
154
+ "direction": { "type": "string", "enum": ["input", "output"] },
155
+ "type": { "type": "string" },
156
+ "required": { "type": "boolean", "default": false },
157
+ "default": {
158
+ "type": ["string", "number", "boolean", "array", "object", "null"]
159
+ }
160
+ }
161
+ },
162
+ "EdgeEndpoint": {
163
+ "type": "object",
164
+ "required": ["nodeId", "portId"],
165
+ "additionalProperties": false,
166
+ "properties": {
167
+ "nodeId": { "type": "string" },
168
+ "portId": { "type": "string" }
169
+ }
170
+ },
171
+ "Edge": {
172
+ "type": "object",
173
+ "required": ["id", "from", "to"],
174
+ "additionalProperties": false,
175
+ "properties": {
176
+ "id": { "type": "string" },
177
+ "from": { "$ref": "#/$defs/EdgeEndpoint" },
178
+ "to": { "$ref": "#/$defs/EdgeEndpoint" },
179
+ "metadata": { "$ref": "#/$defs/GraphenixMetadata" }
180
+ }
181
+ },
182
+ "GraphInput": {
183
+ "type": "object",
184
+ "required": ["id", "type", "target"],
185
+ "additionalProperties": false,
186
+ "properties": {
187
+ "id": { "type": "string" },
188
+ "name": { "type": "string" },
189
+ "type": { "type": "string" },
190
+ "target": { "$ref": "#/$defs/EdgeEndpoint" },
191
+ "contract": { "$ref": "#/$defs/GraphInputContract" },
192
+ "metadata": { "$ref": "#/$defs/GraphenixMetadata" }
193
+ }
194
+ },
195
+ "GraphInputContract": {
196
+ "type": "object",
197
+ "additionalProperties": true,
198
+ "properties": {
199
+ "semanticKind": { "type": "string" },
200
+ "required": { "type": "boolean", "default": false },
201
+ "schema": { "type": "object", "additionalProperties": true },
202
+ "resolver": { "$ref": "#/$defs/GraphInputResolver" }
203
+ }
204
+ },
205
+ "GraphInputResolver": {
206
+ "type": "object",
207
+ "additionalProperties": true,
208
+ "properties": {
209
+ "kind": { "type": "string" },
210
+ "graphId": { "type": "string" },
211
+ "metadataFilter": { "type": "object", "additionalProperties": true }
212
+ }
213
+ },
214
+ "GraphOutput": {
215
+ "type": "object",
216
+ "required": ["id", "type"],
217
+ "additionalProperties": false,
218
+ "properties": {
219
+ "id": { "type": "string" },
220
+ "name": { "type": "string" },
221
+ "type": { "type": "string" },
222
+ "source": { "$ref": "#/$defs/EdgeEndpoint" },
223
+ "contract": { "$ref": "#/$defs/GraphOutputContract" },
224
+ "metadata": { "$ref": "#/$defs/GraphenixMetadata" }
225
+ }
226
+ },
227
+ "GraphOutputContract": {
228
+ "type": "object",
229
+ "additionalProperties": true,
230
+ "properties": {
231
+ "semanticKind": { "type": "string" },
232
+ "required": { "type": "boolean", "default": false },
233
+ "schema": { "type": "object", "additionalProperties": true },
234
+ "description": { "type": "string" }
235
+ }
236
+ },
237
+ "TypeField": {
238
+ "type": "object",
239
+ "required": ["name", "type"],
240
+ "additionalProperties": false,
241
+ "properties": {
242
+ "name": { "type": "string" },
243
+ "type": { "type": "string" },
244
+ "required": { "type": "boolean", "default": false }
245
+ }
246
+ },
247
+ "TypeObject": {
248
+ "type": "object",
249
+ "required": ["id", "kind", "fields"],
250
+ "additionalProperties": false,
251
+ "properties": {
252
+ "id": { "type": "string" },
253
+ "kind": { "const": "object" },
254
+ "description": { "type": "string" },
255
+ "fields": {
256
+ "type": "array",
257
+ "items": { "$ref": "#/$defs/TypeField" }
258
+ },
259
+ "metadata": { "$ref": "#/$defs/GraphenixMetadata" }
260
+ }
261
+ },
262
+ "TypeUnion": {
263
+ "type": "object",
264
+ "required": ["id", "kind", "options"],
265
+ "additionalProperties": false,
266
+ "properties": {
267
+ "id": { "type": "string" },
268
+ "kind": { "const": "union" },
269
+ "description": { "type": "string" },
270
+ "options": {
271
+ "type": "array",
272
+ "items": { "type": "string" }
273
+ },
274
+ "metadata": { "$ref": "#/$defs/GraphenixMetadata" }
275
+ }
276
+ },
277
+ "TypeAlias": {
278
+ "type": "object",
279
+ "required": ["id", "kind", "target"],
280
+ "additionalProperties": false,
281
+ "properties": {
282
+ "id": { "type": "string" },
283
+ "kind": { "const": "alias" },
284
+ "description": { "type": "string" },
285
+ "target": { "type": "string" },
286
+ "metadata": { "$ref": "#/$defs/GraphenixMetadata" }
287
+ }
288
+ },
289
+ "TypeDefinition": {
290
+ "oneOf": [
291
+ { "$ref": "#/$defs/TypeObject" },
292
+ { "$ref": "#/$defs/TypeUnion" },
293
+ { "$ref": "#/$defs/TypeAlias" }
294
+ ]
295
+ },
296
+ "SubgraphDefinition": {
297
+ "type": "object",
298
+ "required": ["id", "graph"],
299
+ "additionalProperties": false,
300
+ "properties": {
301
+ "id": { "type": "string" },
302
+ "name": { "type": "string" },
303
+ "graph": { "$ref": "#/$defs/Graph" },
304
+ "metadata": { "$ref": "#/$defs/GraphenixMetadata" }
305
+ }
306
+ },
307
+ "GraphEntryContract": {
308
+ "type": "object",
309
+ "description": "Graph-level summary contract for graph invocation.",
310
+ "additionalProperties": true,
311
+ "properties": {
312
+ "summary": { "type": "string" },
313
+ "requiredExecutionPaths": { "type": "array", "items": {} },
314
+ "executionSchema": { "type": "object", "additionalProperties": true },
315
+ "notableExecutionPaths": { "type": "array", "items": {} }
316
+ }
317
+ },
318
+ "GraphResponseContract": {
319
+ "type": "object",
320
+ "description": "Graph-level summary contract for the final graph result.",
321
+ "additionalProperties": true,
322
+ "properties": {
323
+ "summary": { "type": "string" },
324
+ "finalOutputSchema": { "type": "object", "additionalProperties": true }
325
+ }
326
+ },
327
+ "WoroxCatalogRequest": {
328
+ "type": "object",
329
+ "additionalProperties": true
330
+ },
331
+ "WoroxCatalogBinding": {
332
+ "type": "object",
333
+ "additionalProperties": true
334
+ },
335
+ "WoroxCatalogRequests": {
336
+ "oneOf": [
337
+ {
338
+ "type": "array",
339
+ "items": { "$ref": "#/$defs/WoroxCatalogRequest" }
340
+ },
341
+ {
342
+ "type": "object",
343
+ "additionalProperties": { "$ref": "#/$defs/WoroxCatalogRequest" }
344
+ }
345
+ ]
346
+ }
347
+ }
348
+ }