@deepblend/dsh-blender-contracts 0.1.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,295 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://deepblend.local/schemas/job-result.schema.json",
4
+ "title": "DeepBlend JobResult v1",
5
+ "description": "The durable record of one Blender batch attempt (SPEC §9.3 result.json, §10.2). M1 writes one job record per apply/render attempt beneath `<project>/jobs/`; M3 promotes this to the persistent, restart-recovered Job Store, so the on-disk shape is fixed here now.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": [
9
+ "schemaVersion",
10
+ "jobId",
11
+ "projectId",
12
+ "action",
13
+ "status",
14
+ "startedAt"
15
+ ],
16
+ "properties": {
17
+ "schemaVersion": {
18
+ "type": "string",
19
+ "const": "deepblend.job/v1"
20
+ },
21
+ "jobId": {
22
+ "type": "string",
23
+ "minLength": 1
24
+ },
25
+ "projectId": {
26
+ "type": "string",
27
+ "minLength": 1
28
+ },
29
+ "revision": {
30
+ "type": [
31
+ "string",
32
+ "null"
33
+ ],
34
+ "description": "The revision this job produced (apply) or read (preview/validate). Null when the job failed before a revision existed."
35
+ },
36
+ "action": {
37
+ "type": "string",
38
+ "enum": [
39
+ "compile_scene",
40
+ "render_preview",
41
+ "render_views",
42
+ "apply_scene_patch",
43
+ "validate_scene",
44
+ "restore_revision",
45
+ "visual_review"
46
+ ]
47
+ },
48
+ "status": {
49
+ "type": "string",
50
+ "enum": [
51
+ "running",
52
+ "succeeded",
53
+ "failed"
54
+ ]
55
+ },
56
+ "errorCode": {
57
+ "type": [
58
+ "string",
59
+ "null"
60
+ ],
61
+ "description": "A BlenderErrorCode value. Present only when status is failed."
62
+ },
63
+ "message": {
64
+ "type": [
65
+ "string",
66
+ "null"
67
+ ]
68
+ },
69
+ "startedAt": {
70
+ "type": "string",
71
+ "description": "ISO-8601 UTC."
72
+ },
73
+ "finishedAt": {
74
+ "type": [
75
+ "string",
76
+ "null"
77
+ ],
78
+ "description": "ISO-8601 UTC."
79
+ },
80
+ "durationMs": {
81
+ "type": [
82
+ "integer",
83
+ "null"
84
+ ],
85
+ "minimum": 0
86
+ },
87
+ "idempotencyKey": {
88
+ "type": [
89
+ "string",
90
+ "null"
91
+ ]
92
+ },
93
+ "baseRevision": {
94
+ "type": [
95
+ "string",
96
+ "null"
97
+ ]
98
+ },
99
+ "artifacts": {
100
+ "type": "array",
101
+ "items": {
102
+ "$ref": "#/$defs/artifact"
103
+ }
104
+ },
105
+ "warnings": {
106
+ "type": "array",
107
+ "description": "Warnings the action produced on its SUCCESS path, each with a stable code.",
108
+ "items": {
109
+ "$ref": "#/$defs/warning"
110
+ }
111
+ },
112
+ "blender": {
113
+ "type": [
114
+ "object",
115
+ "null"
116
+ ],
117
+ "additionalProperties": true,
118
+ "description": "Runtime identity recorded for reproducibility: version, engine, device, protocol version (SPEC §9.5)."
119
+ }
120
+ },
121
+ "$defs": {
122
+ "artifact": {
123
+ "type": "object",
124
+ "additionalProperties": false,
125
+ "required": [
126
+ "kind",
127
+ "path",
128
+ "bytes"
129
+ ],
130
+ "properties": {
131
+ "kind": {
132
+ "type": "string",
133
+ "enum": [
134
+ "blend",
135
+ "preview",
136
+ "view",
137
+ "contact-sheet",
138
+ "validation",
139
+ "scene-spec",
140
+ "log"
141
+ ]
142
+ },
143
+ "path": {
144
+ "type": "string",
145
+ "description": "Path relative to the PROJECT root, never absolute — a stored manifest must survive the workspace being moved."
146
+ },
147
+ "bytes": {
148
+ "type": "integer",
149
+ "minimum": 0
150
+ },
151
+ "cameraId": {
152
+ "type": [
153
+ "string",
154
+ "null"
155
+ ],
156
+ "description": "The camera a preview was rendered from. Present on preview artifacts, absent on a `.blend`."
157
+ },
158
+ "frame": {
159
+ "type": [
160
+ "integer",
161
+ "null"
162
+ ],
163
+ "minimum": 0,
164
+ "description": "The scene frame a preview shows."
165
+ },
166
+ "engine": {
167
+ "type": [
168
+ "string",
169
+ "null"
170
+ ],
171
+ "description": "The render engine the preview actually used, as Blender reported it (e.g. \"CYCLES\")."
172
+ },
173
+ "samples": {
174
+ "type": [
175
+ "integer",
176
+ "null"
177
+ ],
178
+ "minimum": 1,
179
+ "description": "The sample count the preview actually used — which may be below the profile asked for."
180
+ },
181
+ "sha256": {
182
+ "type": [
183
+ "string",
184
+ "null"
185
+ ],
186
+ "pattern": "^[a-f0-9]{64}$"
187
+ },
188
+ "width": {
189
+ "type": [
190
+ "integer",
191
+ "null"
192
+ ],
193
+ "minimum": 1
194
+ },
195
+ "height": {
196
+ "type": [
197
+ "integer",
198
+ "null"
199
+ ],
200
+ "minimum": 1
201
+ },
202
+ "mime": {
203
+ "type": [
204
+ "string",
205
+ "null"
206
+ ]
207
+ },
208
+ "viewId": {
209
+ "type": [
210
+ "string",
211
+ "null"
212
+ ],
213
+ "description": "The declared view this image answers (view artifacts)."
214
+ },
215
+ "role": {
216
+ "type": [
217
+ "string",
218
+ "null"
219
+ ],
220
+ "description": "The camera role the view was rendered from (view artifacts)."
221
+ },
222
+ "at": {
223
+ "type": [
224
+ "string",
225
+ "null"
226
+ ],
227
+ "description": "When this artifact was produced, for the artifacts of one action that happen at different moments."
228
+ },
229
+ "iteration": {
230
+ "type": [
231
+ "integer",
232
+ "null"
233
+ ],
234
+ "minimum": 0,
235
+ "description": "The visual-loop round a contact sheet belongs to."
236
+ },
237
+ "columns": {
238
+ "type": [
239
+ "integer",
240
+ "null"
241
+ ],
242
+ "minimum": 1
243
+ },
244
+ "rows": {
245
+ "type": [
246
+ "integer",
247
+ "null"
248
+ ],
249
+ "minimum": 1
250
+ },
251
+ "slot": {
252
+ "type": [
253
+ "string",
254
+ "null"
255
+ ],
256
+ "description": "The contact-sheet slot a view occupies — the view id, so a reader can tell which cell is which."
257
+ },
258
+ "views": {
259
+ "type": [
260
+ "array",
261
+ "null"
262
+ ],
263
+ "items": {
264
+ "type": "string"
265
+ },
266
+ "description": "The view ids a contact sheet contains, in slot order."
267
+ }
268
+ }
269
+ },
270
+ "warning": {
271
+ "type": "object",
272
+ "additionalProperties": false,
273
+ "required": [
274
+ "code",
275
+ "message"
276
+ ],
277
+ "properties": {
278
+ "code": {
279
+ "type": "string",
280
+ "minLength": 1
281
+ },
282
+ "message": {
283
+ "type": "string",
284
+ "minLength": 1
285
+ },
286
+ "detail": {
287
+ "type": [
288
+ "object",
289
+ "null"
290
+ ]
291
+ }
292
+ }
293
+ }
294
+ }
295
+ }