agent-hitch 0.2.13 → 0.2.15

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 (132) hide show
  1. package/benchmark-packages/automationbench/RESOURCES.md +27 -0
  2. package/benchmark-packages/automationbench/resources.mjs +86 -0
  3. package/benchmark-packages/shared-tree/README.md +14 -0
  4. package/benchmark-packages/shared-tree/import.mjs +39 -0
  5. package/dist/scripts/canary-automation-resources.js +86 -0
  6. package/dist/scripts/canary-automation-resources.js.map +1 -0
  7. package/dist/scripts/canary-resource-empty-daemon.js +195 -0
  8. package/dist/scripts/canary-resource-empty-daemon.js.map +1 -0
  9. package/dist/scripts/canary-resources.js +89 -0
  10. package/dist/scripts/canary-resources.js.map +1 -0
  11. package/dist/scripts/check-architecture.js +6 -5
  12. package/dist/scripts/check-architecture.js.map +1 -1
  13. package/dist/scripts/resource-space-sampler.js +83 -0
  14. package/dist/scripts/resource-space-sampler.js.map +1 -0
  15. package/dist/src/backends/harbor/backend.js +5 -1
  16. package/dist/src/backends/harbor/backend.js.map +1 -1
  17. package/dist/src/backends/harbor/resource-admission.js +23 -0
  18. package/dist/src/backends/harbor/resource-admission.js.map +1 -0
  19. package/dist/src/cli/commands/resources.js +23 -0
  20. package/dist/src/cli/commands/resources.js.map +1 -0
  21. package/dist/src/cli/main.js +2 -0
  22. package/dist/src/cli/main.js.map +1 -1
  23. package/dist/src/control-plane/remote-offer-contract.js +11 -2
  24. package/dist/src/control-plane/remote-offer-contract.js.map +1 -1
  25. package/dist/src/control-plane/remote-result-transport.js +10 -0
  26. package/dist/src/control-plane/remote-result-transport.js.map +1 -1
  27. package/dist/src/control-plane/remote-work-coordinator.js +4 -1
  28. package/dist/src/control-plane/remote-work-coordinator.js.map +1 -1
  29. package/dist/src/control-plane/remote-work-inputs.js +16 -4
  30. package/dist/src/control-plane/remote-work-inputs.js.map +1 -1
  31. package/dist/src/control-plane/remote-worker-client.js +22 -0
  32. package/dist/src/control-plane/remote-worker-client.js.map +1 -1
  33. package/dist/src/control-plane/remote-worker-codecs.js +1 -1
  34. package/dist/src/control-plane/remote-worker-codecs.js.map +1 -1
  35. package/dist/src/control-plane/remote-worker-protocol.js +12 -2
  36. package/dist/src/control-plane/remote-worker-protocol.js.map +1 -1
  37. package/dist/src/control-plane/remote-worker-runner.js +1 -1
  38. package/dist/src/control-plane/remote-worker-runner.js.map +1 -1
  39. package/dist/src/control-plane/remote-workers.js +2 -1
  40. package/dist/src/control-plane/remote-workers.js.map +1 -1
  41. package/dist/src/evals/benchmark-adapter-manifest.js +4 -0
  42. package/dist/src/evals/benchmark-adapter-manifest.js.map +1 -1
  43. package/dist/src/evals/benchmark-candidate.js +11 -3
  44. package/dist/src/evals/benchmark-candidate.js.map +1 -1
  45. package/dist/src/evals/eval-result-builder.js +22 -1
  46. package/dist/src/evals/eval-result-builder.js.map +1 -1
  47. package/dist/src/evals/index.js +1 -0
  48. package/dist/src/evals/index.js.map +1 -1
  49. package/dist/src/evals/planned-execution.js +5 -14
  50. package/dist/src/evals/planned-execution.js.map +1 -1
  51. package/dist/src/evals/request.js +9 -0
  52. package/dist/src/evals/request.js.map +1 -1
  53. package/dist/src/evals/resource-eval-lifecycle.js +31 -0
  54. package/dist/src/evals/resource-eval-lifecycle.js.map +1 -0
  55. package/dist/src/evals/resource-legacy-export.js +57 -0
  56. package/dist/src/evals/resource-legacy-export.js.map +1 -0
  57. package/dist/src/evals/service.js +5 -20
  58. package/dist/src/evals/service.js.map +1 -1
  59. package/dist/src/evals/task-resources.js +12 -4
  60. package/dist/src/evals/task-resources.js.map +1 -1
  61. package/dist/src/evals/trial-bundle-files.js +81 -0
  62. package/dist/src/evals/trial-bundle-files.js.map +1 -0
  63. package/dist/src/evals/trial-import.js +7 -78
  64. package/dist/src/evals/trial-import.js.map +1 -1
  65. package/dist/src/foundation/durable-json.js +33 -0
  66. package/dist/src/foundation/durable-json.js.map +1 -0
  67. package/dist/src/foundation/index.js +2 -0
  68. package/dist/src/foundation/index.js.map +1 -1
  69. package/dist/src/foundation/resource-image-references.js +52 -0
  70. package/dist/src/foundation/resource-image-references.js.map +1 -0
  71. package/dist/src/images/gc.js +2 -2
  72. package/dist/src/images/gc.js.map +1 -1
  73. package/dist/src/images/registry.js +27 -2
  74. package/dist/src/images/registry.js.map +1 -1
  75. package/dist/src/resources/api.js +207 -0
  76. package/dist/src/resources/api.js.map +1 -0
  77. package/dist/src/resources/bundle.js +117 -0
  78. package/dist/src/resources/bundle.js.map +1 -0
  79. package/dist/src/resources/evidence.js +93 -0
  80. package/dist/src/resources/evidence.js.map +1 -0
  81. package/dist/src/resources/gc.js +123 -0
  82. package/dist/src/resources/gc.js.map +1 -0
  83. package/dist/src/resources/index.js +14 -0
  84. package/dist/src/resources/index.js.map +1 -0
  85. package/dist/src/resources/materialize.js +143 -0
  86. package/dist/src/resources/materialize.js.map +1 -0
  87. package/dist/src/resources/object-store.js +191 -0
  88. package/dist/src/resources/object-store.js.map +1 -0
  89. package/dist/src/resources/oci-layer-validation.js +202 -0
  90. package/dist/src/resources/oci-layer-validation.js.map +1 -0
  91. package/dist/src/resources/oci-provider.js +101 -0
  92. package/dist/src/resources/oci-provider.js.map +1 -0
  93. package/dist/src/resources/oci-registry-bundle.js +253 -0
  94. package/dist/src/resources/oci-registry-bundle.js.map +1 -0
  95. package/dist/src/resources/protocol.js +222 -0
  96. package/dist/src/resources/protocol.js.map +1 -0
  97. package/dist/src/resources/result-retention.js +93 -0
  98. package/dist/src/resources/result-retention.js.map +1 -0
  99. package/dist/src/resources/role-context.js +54 -0
  100. package/dist/src/resources/role-context.js.map +1 -0
  101. package/dist/src/resources/stats.js +36 -0
  102. package/dist/src/resources/stats.js.map +1 -0
  103. package/dist/src/resources/store.js +310 -0
  104. package/dist/src/resources/store.js.map +1 -0
  105. package/dist/src/resources/tasks.js +153 -0
  106. package/dist/src/resources/tasks.js.map +1 -0
  107. package/dist/src/resources/transfer.js +162 -0
  108. package/dist/src/resources/transfer.js.map +1 -0
  109. package/dist/src/resources/views.js +130 -0
  110. package/dist/src/resources/views.js.map +1 -0
  111. package/dist/src/runs/adapter-process.js +10 -0
  112. package/dist/src/runs/adapter-process.js.map +1 -1
  113. package/dist/src/runs/executor.js +2 -2
  114. package/dist/src/runs/executor.js.map +1 -1
  115. package/dist/src/trajectories/providers/deepseek.js +6 -1
  116. package/dist/src/trajectories/providers/deepseek.js.map +1 -1
  117. package/dist/src/workers/remote-harbor-work-spec.js +9 -3
  118. package/dist/src/workers/remote-harbor-work-spec.js.map +1 -1
  119. package/dist/src/workers/remote-harbor-worker.js +24 -9
  120. package/dist/src/workers/remote-harbor-worker.js.map +1 -1
  121. package/docs/resource-storage.zh-CN.md +95 -0
  122. package/docs/schemas/execution-provider-status.schema.json +20 -0
  123. package/docs/schemas/hitch-resource-dataset-v2.schema.json +590 -0
  124. package/docs/schemas/hitch-resource-lock-v1.schema.json +341 -0
  125. package/docs/schemas/hitch-resource-plan-v1.schema.json +423 -0
  126. package/docs/schemas/hitch-resource-selection-v1.schema.json +608 -0
  127. package/docs/schemas/hitch-tree-v1.schema.json +75 -0
  128. package/docs/schemas/remote-harbor-work-spec.schema.json +47 -3
  129. package/docs/schemas/remote-work-offer.schema.json +2 -1
  130. package/docs/schemas/remote-worker-registration.schema.json +20 -0
  131. package/package.json +9 -3
  132. package/test-contracts/hitch-resources-v1.json +197 -0
@@ -0,0 +1,608 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://hitch.dev/schemas/hitch-resource-selection-v1.schema.json",
4
+ "type": "object",
5
+ "additionalProperties": false,
6
+ "properties": {
7
+ "protocol": {
8
+ "const": "hitch-resource-selection@1"
9
+ },
10
+ "sourceDatasetDigest": {
11
+ "type": "string",
12
+ "pattern": "^sha256:[a-f0-9]{64}$"
13
+ },
14
+ "manifest": {
15
+ "type": "object",
16
+ "additionalProperties": false,
17
+ "properties": {
18
+ "schema_version": {
19
+ "const": "2"
20
+ },
21
+ "kind": {
22
+ "const": "gear-harbor-benchmark"
23
+ },
24
+ "resource_protocol": {
25
+ "const": "hitch-resource-lock@1"
26
+ },
27
+ "execution": {
28
+ "type": "object",
29
+ "additionalProperties": false,
30
+ "properties": {
31
+ "backend": {
32
+ "const": "harbor-role-context@1"
33
+ },
34
+ "resolver": {
35
+ "const": "hitch-resource-resolver@1"
36
+ },
37
+ "platform": {
38
+ "type": "string",
39
+ "pattern": "^linux/(amd64|arm64)(/v[0-9]+)?$"
40
+ }
41
+ },
42
+ "required": [
43
+ "backend",
44
+ "resolver",
45
+ "platform"
46
+ ]
47
+ },
48
+ "required_capabilities": {
49
+ "type": "array",
50
+ "uniqueItems": true,
51
+ "items": {
52
+ "type": "string",
53
+ "pattern": "^[a-z][a-z0-9-]*@[1-9][0-9]*$"
54
+ }
55
+ },
56
+ "benchmark": {
57
+ "type": "object",
58
+ "additionalProperties": false,
59
+ "properties": {
60
+ "id": {
61
+ "type": "string",
62
+ "minLength": 1
63
+ },
64
+ "revision": {
65
+ "type": "string",
66
+ "minLength": 1
67
+ }
68
+ },
69
+ "required": [
70
+ "id",
71
+ "revision"
72
+ ]
73
+ },
74
+ "adapter": {
75
+ "type": "object",
76
+ "additionalProperties": false,
77
+ "properties": {
78
+ "id": {
79
+ "type": "string",
80
+ "minLength": 1
81
+ },
82
+ "revision": {
83
+ "type": "string",
84
+ "minLength": 1
85
+ },
86
+ "output_protocol": {
87
+ "const": "gear-harbor-eval-result-v1"
88
+ }
89
+ },
90
+ "required": [
91
+ "id",
92
+ "revision",
93
+ "output_protocol"
94
+ ]
95
+ },
96
+ "scoring": {
97
+ "type": "object",
98
+ "additionalProperties": false,
99
+ "properties": {
100
+ "total_score": {
101
+ "type": "object",
102
+ "additionalProperties": false,
103
+ "properties": {
104
+ "source_metric": {
105
+ "type": "string",
106
+ "minLength": 1
107
+ },
108
+ "direction": {
109
+ "enum": [
110
+ "maximize",
111
+ "minimize"
112
+ ]
113
+ },
114
+ "range": {
115
+ "type": "array",
116
+ "minItems": 2,
117
+ "maxItems": 2,
118
+ "items": {
119
+ "type": "number"
120
+ }
121
+ },
122
+ "reducer": {
123
+ "const": "task-macro-mean"
124
+ }
125
+ },
126
+ "required": [
127
+ "source_metric",
128
+ "direction",
129
+ "range",
130
+ "reducer"
131
+ ]
132
+ },
133
+ "process_score": {
134
+ "type": "object",
135
+ "additionalProperties": false,
136
+ "properties": {
137
+ "source_metric": {
138
+ "type": "string",
139
+ "minLength": 1
140
+ },
141
+ "direction": {
142
+ "enum": [
143
+ "maximize",
144
+ "minimize"
145
+ ]
146
+ },
147
+ "range": {
148
+ "type": "array",
149
+ "minItems": 2,
150
+ "maxItems": 2,
151
+ "items": {
152
+ "type": "number"
153
+ }
154
+ },
155
+ "reducer": {
156
+ "const": "task-macro-mean"
157
+ }
158
+ },
159
+ "required": [
160
+ "source_metric",
161
+ "direction",
162
+ "range",
163
+ "reducer"
164
+ ]
165
+ }
166
+ },
167
+ "required": [
168
+ "total_score"
169
+ ]
170
+ },
171
+ "raw_metrics": {
172
+ "type": "object",
173
+ "additionalProperties": false,
174
+ "properties": {
175
+ "schema_version": {
176
+ "const": "1"
177
+ },
178
+ "metrics": {
179
+ "type": "array",
180
+ "items": {
181
+ "type": "object"
182
+ }
183
+ }
184
+ },
185
+ "required": [
186
+ "schema_version",
187
+ "metrics"
188
+ ]
189
+ }
190
+ },
191
+ "required": [
192
+ "schema_version",
193
+ "kind",
194
+ "resource_protocol",
195
+ "execution",
196
+ "required_capabilities",
197
+ "benchmark",
198
+ "adapter",
199
+ "scoring"
200
+ ]
201
+ },
202
+ "tasks": {
203
+ "type": "array",
204
+ "minItems": 1,
205
+ "items": {
206
+ "type": "object",
207
+ "additionalProperties": false,
208
+ "properties": {
209
+ "task_id": {
210
+ "type": "string",
211
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9_.-]{0,127}$"
212
+ },
213
+ "source_task_digest": {
214
+ "type": "string",
215
+ "pattern": "^sha256:[a-f0-9]{64}$"
216
+ },
217
+ "resource_closure_digest": {
218
+ "type": "string",
219
+ "pattern": "^sha256:[a-f0-9]{64}$"
220
+ },
221
+ "task_digest": {
222
+ "type": "string",
223
+ "pattern": "^sha256:[a-f0-9]{64}$"
224
+ },
225
+ "sourceTree": {
226
+ "type": "object",
227
+ "additionalProperties": false,
228
+ "properties": {
229
+ "kind": {
230
+ "const": "tree"
231
+ },
232
+ "format": {
233
+ "const": "hitch-tree@1"
234
+ },
235
+ "manifestDigest": {
236
+ "type": "string",
237
+ "pattern": "^sha256:[a-f0-9]{64}$"
238
+ }
239
+ },
240
+ "required": [
241
+ "kind",
242
+ "format",
243
+ "manifestDigest"
244
+ ]
245
+ },
246
+ "lock": {
247
+ "type": "object",
248
+ "additionalProperties": false,
249
+ "properties": {
250
+ "protocol": {
251
+ "const": "hitch-resource-lock@1"
252
+ },
253
+ "resources": {
254
+ "type": "object",
255
+ "propertyNames": {
256
+ "type": "string",
257
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9_.-]{0,127}$"
258
+ },
259
+ "additionalProperties": {
260
+ "oneOf": [
261
+ {
262
+ "type": "object",
263
+ "additionalProperties": false,
264
+ "properties": {
265
+ "kind": {
266
+ "const": "blob"
267
+ },
268
+ "digest": {
269
+ "type": "string",
270
+ "pattern": "^sha256:[a-f0-9]{64}$"
271
+ },
272
+ "size": {
273
+ "type": "integer",
274
+ "minimum": 0,
275
+ "maximum": 9007199254740991
276
+ }
277
+ },
278
+ "required": [
279
+ "kind",
280
+ "digest",
281
+ "size"
282
+ ]
283
+ },
284
+ {
285
+ "type": "object",
286
+ "additionalProperties": false,
287
+ "properties": {
288
+ "kind": {
289
+ "const": "tree"
290
+ },
291
+ "format": {
292
+ "const": "hitch-tree@1"
293
+ },
294
+ "manifestDigest": {
295
+ "type": "string",
296
+ "pattern": "^sha256:[a-f0-9]{64}$"
297
+ }
298
+ },
299
+ "required": [
300
+ "kind",
301
+ "format",
302
+ "manifestDigest"
303
+ ]
304
+ },
305
+ {
306
+ "type": "object",
307
+ "additionalProperties": false,
308
+ "properties": {
309
+ "kind": {
310
+ "const": "oci-image"
311
+ },
312
+ "manifestDigest": {
313
+ "type": "string",
314
+ "pattern": "^sha256:[a-f0-9]{64}$"
315
+ },
316
+ "platform": {
317
+ "type": "string",
318
+ "pattern": "^linux/(amd64|arm64)(/v[0-9]+)?$"
319
+ },
320
+ "indexDigest": {
321
+ "type": "string",
322
+ "pattern": "^sha256:[a-f0-9]{64}$"
323
+ }
324
+ },
325
+ "required": [
326
+ "kind",
327
+ "manifestDigest",
328
+ "platform"
329
+ ]
330
+ }
331
+ ]
332
+ }
333
+ },
334
+ "bindings": {
335
+ "type": "array",
336
+ "items": {
337
+ "oneOf": [
338
+ {
339
+ "type": "object",
340
+ "additionalProperties": false,
341
+ "properties": {
342
+ "resource": {
343
+ "type": "string",
344
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9_.-]{0,127}$"
345
+ },
346
+ "consumer": {
347
+ "oneOf": [
348
+ {
349
+ "type": "object",
350
+ "additionalProperties": false,
351
+ "properties": {
352
+ "role": {
353
+ "const": "candidate"
354
+ }
355
+ },
356
+ "required": [
357
+ "role"
358
+ ]
359
+ },
360
+ {
361
+ "type": "object",
362
+ "additionalProperties": false,
363
+ "properties": {
364
+ "role": {
365
+ "const": "verifier"
366
+ }
367
+ },
368
+ "required": [
369
+ "role"
370
+ ]
371
+ },
372
+ {
373
+ "type": "object",
374
+ "additionalProperties": false,
375
+ "properties": {
376
+ "role": {
377
+ "const": "service"
378
+ },
379
+ "serviceId": {
380
+ "type": "string",
381
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9_.-]{0,127}$"
382
+ }
383
+ },
384
+ "required": [
385
+ "role",
386
+ "serviceId"
387
+ ]
388
+ }
389
+ ]
390
+ },
391
+ "use": {
392
+ "const": "input-file"
393
+ },
394
+ "target": {
395
+ "type": "string",
396
+ "minLength": 1,
397
+ "maxLength": 4096,
398
+ "pattern": "^(?!/)(?!.*(?:^|/)\\.\\.?(/|$))(?!.*[\\\\\\u0000-\\u001f\\u007f:])(?!.*//)(?!.*[/ ]$).+"
399
+ },
400
+ "executable": {
401
+ "type": "boolean"
402
+ },
403
+ "access": {
404
+ "enum": [
405
+ "read-only",
406
+ "private-copy"
407
+ ]
408
+ }
409
+ },
410
+ "required": [
411
+ "resource",
412
+ "consumer",
413
+ "use",
414
+ "target",
415
+ "executable",
416
+ "access"
417
+ ]
418
+ },
419
+ {
420
+ "type": "object",
421
+ "additionalProperties": false,
422
+ "properties": {
423
+ "resource": {
424
+ "type": "string",
425
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9_.-]{0,127}$"
426
+ },
427
+ "consumer": {
428
+ "oneOf": [
429
+ {
430
+ "type": "object",
431
+ "additionalProperties": false,
432
+ "properties": {
433
+ "role": {
434
+ "const": "candidate"
435
+ }
436
+ },
437
+ "required": [
438
+ "role"
439
+ ]
440
+ },
441
+ {
442
+ "type": "object",
443
+ "additionalProperties": false,
444
+ "properties": {
445
+ "role": {
446
+ "const": "verifier"
447
+ }
448
+ },
449
+ "required": [
450
+ "role"
451
+ ]
452
+ },
453
+ {
454
+ "type": "object",
455
+ "additionalProperties": false,
456
+ "properties": {
457
+ "role": {
458
+ "const": "service"
459
+ },
460
+ "serviceId": {
461
+ "type": "string",
462
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9_.-]{0,127}$"
463
+ }
464
+ },
465
+ "required": [
466
+ "role",
467
+ "serviceId"
468
+ ]
469
+ }
470
+ ]
471
+ },
472
+ "use": {
473
+ "const": "input-tree"
474
+ },
475
+ "target": {
476
+ "type": "string",
477
+ "minLength": 1,
478
+ "maxLength": 4096,
479
+ "pattern": "^(?!/)(?!.*(?:^|/)\\.\\.?(/|$))(?!.*[\\\\\\u0000-\\u001f\\u007f:])(?!.*//)(?!.*[/ ]$).+"
480
+ },
481
+ "access": {
482
+ "enum": [
483
+ "read-only",
484
+ "private-copy"
485
+ ]
486
+ }
487
+ },
488
+ "required": [
489
+ "resource",
490
+ "consumer",
491
+ "use",
492
+ "target",
493
+ "access"
494
+ ]
495
+ },
496
+ {
497
+ "type": "object",
498
+ "additionalProperties": false,
499
+ "properties": {
500
+ "resource": {
501
+ "type": "string",
502
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9_.-]{0,127}$"
503
+ },
504
+ "consumer": {
505
+ "oneOf": [
506
+ {
507
+ "type": "object",
508
+ "additionalProperties": false,
509
+ "properties": {
510
+ "role": {
511
+ "const": "candidate"
512
+ }
513
+ },
514
+ "required": [
515
+ "role"
516
+ ]
517
+ },
518
+ {
519
+ "type": "object",
520
+ "additionalProperties": false,
521
+ "properties": {
522
+ "role": {
523
+ "const": "verifier"
524
+ }
525
+ },
526
+ "required": [
527
+ "role"
528
+ ]
529
+ },
530
+ {
531
+ "type": "object",
532
+ "additionalProperties": false,
533
+ "properties": {
534
+ "role": {
535
+ "const": "service"
536
+ },
537
+ "serviceId": {
538
+ "type": "string",
539
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9_.-]{0,127}$"
540
+ }
541
+ },
542
+ "required": [
543
+ "role",
544
+ "serviceId"
545
+ ]
546
+ }
547
+ ]
548
+ },
549
+ "use": {
550
+ "const": "environment-image"
551
+ },
552
+ "slot": {
553
+ "enum": [
554
+ "runtime",
555
+ "build-base"
556
+ ]
557
+ }
558
+ },
559
+ "required": [
560
+ "resource",
561
+ "consumer",
562
+ "use",
563
+ "slot"
564
+ ]
565
+ }
566
+ ]
567
+ }
568
+ },
569
+ "requiredCapabilities": {
570
+ "type": "array",
571
+ "uniqueItems": true,
572
+ "items": {
573
+ "type": "string",
574
+ "pattern": "^[a-z][a-z0-9-]*@[1-9][0-9]*$"
575
+ }
576
+ }
577
+ },
578
+ "required": [
579
+ "protocol",
580
+ "resources",
581
+ "bindings",
582
+ "requiredCapabilities"
583
+ ]
584
+ }
585
+ },
586
+ "required": [
587
+ "task_id",
588
+ "source_task_digest",
589
+ "resource_closure_digest",
590
+ "task_digest",
591
+ "sourceTree",
592
+ "lock"
593
+ ]
594
+ }
595
+ },
596
+ "digest": {
597
+ "type": "string",
598
+ "pattern": "^sha256:[a-f0-9]{64}$"
599
+ }
600
+ },
601
+ "required": [
602
+ "protocol",
603
+ "sourceDatasetDigest",
604
+ "manifest",
605
+ "tasks",
606
+ "digest"
607
+ ]
608
+ }
@@ -0,0 +1,75 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://hitch.dev/schemas/hitch-tree-v1.schema.json",
4
+ "type": "object",
5
+ "additionalProperties": false,
6
+ "properties": {
7
+ "protocol": {
8
+ "const": "hitch-tree@1"
9
+ },
10
+ "entries": {
11
+ "type": "array",
12
+ "items": {
13
+ "oneOf": [
14
+ {
15
+ "type": "object",
16
+ "additionalProperties": false,
17
+ "properties": {
18
+ "path": {
19
+ "type": "string",
20
+ "minLength": 1,
21
+ "maxLength": 4096,
22
+ "pattern": "^(?!/)(?!.*(?:^|/)\\.\\.?(/|$))(?!.*[\\\\\\u0000-\\u001f\\u007f:])(?!.*//)(?!.*[/ ]$).+"
23
+ },
24
+ "kind": {
25
+ "const": "directory"
26
+ }
27
+ },
28
+ "required": [
29
+ "path",
30
+ "kind"
31
+ ]
32
+ },
33
+ {
34
+ "type": "object",
35
+ "additionalProperties": false,
36
+ "properties": {
37
+ "path": {
38
+ "type": "string",
39
+ "minLength": 1,
40
+ "maxLength": 4096,
41
+ "pattern": "^(?!/)(?!.*(?:^|/)\\.\\.?(/|$))(?!.*[\\\\\\u0000-\\u001f\\u007f:])(?!.*//)(?!.*[/ ]$).+"
42
+ },
43
+ "kind": {
44
+ "const": "file"
45
+ },
46
+ "digest": {
47
+ "type": "string",
48
+ "pattern": "^sha256:[a-f0-9]{64}$"
49
+ },
50
+ "size": {
51
+ "type": "integer",
52
+ "minimum": 0,
53
+ "maximum": 9007199254740991
54
+ },
55
+ "executable": {
56
+ "type": "boolean"
57
+ }
58
+ },
59
+ "required": [
60
+ "path",
61
+ "kind",
62
+ "digest",
63
+ "size",
64
+ "executable"
65
+ ]
66
+ }
67
+ ]
68
+ }
69
+ }
70
+ },
71
+ "required": [
72
+ "protocol",
73
+ "entries"
74
+ ]
75
+ }