@taifoon/jev 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 (34) hide show
  1. package/README.md +4 -3
  2. package/dist/verify.d.ts +14 -0
  3. package/dist/verify.js +46 -5
  4. package/docs/SELLERS.md +374 -0
  5. package/docs/WORKFLOWS.md +6 -4
  6. package/package.json +3 -2
  7. package/workflows/0.2.14/README.md +109 -0
  8. package/workflows/0.2.14/batch-judge.json +341 -0
  9. package/workflows/0.2.14/hire-judge-settle.json +920 -0
  10. package/workflows/0.2.14/jev-grader.json +433 -0
  11. package/workflows/0.2.14/manifest.json +152 -0
  12. package/workflows/0.2.14/schemas/answers.json +230 -0
  13. package/workflows/0.2.14/schemas/common.json +397 -0
  14. package/workflows/0.2.14/schemas/delivery.json +217 -0
  15. package/workflows/0.2.14/schemas/facts.json +209 -0
  16. package/workflows/0.2.14/schemas/hire.json +314 -0
  17. package/workflows/0.2.14/schemas/job.json +88 -0
  18. package/workflows/0.2.14/schemas/settlement.json +243 -0
  19. package/workflows/0.2.14/schemas/verdict.json +296 -0
  20. package/workflows/0.2.14/stamp-grade.json +175 -0
  21. package/workflows/0.2.15/README.md +109 -0
  22. package/workflows/0.2.15/batch-judge.json +341 -0
  23. package/workflows/0.2.15/hire-judge-settle.json +920 -0
  24. package/workflows/0.2.15/jev-grader.json +433 -0
  25. package/workflows/0.2.15/manifest.json +152 -0
  26. package/workflows/0.2.15/schemas/answers.json +230 -0
  27. package/workflows/0.2.15/schemas/common.json +397 -0
  28. package/workflows/0.2.15/schemas/delivery.json +217 -0
  29. package/workflows/0.2.15/schemas/facts.json +209 -0
  30. package/workflows/0.2.15/schemas/hire.json +314 -0
  31. package/workflows/0.2.15/schemas/job.json +88 -0
  32. package/workflows/0.2.15/schemas/settlement.json +243 -0
  33. package/workflows/0.2.15/schemas/verdict.json +296 -0
  34. package/workflows/0.2.15/stamp-grade.json +175 -0
@@ -0,0 +1,314 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://www.taifoon.io/schemas/coordination/v1/hire.json",
4
+ "title": "HIRE — what was asked, of whom, on which ledger, for how much",
5
+ "description": "The job itself: parties, task, money, deadline, and the lifecycle state it is in. One shape for an ERC-8183 job, a memo-ACP job, an extra deployment’s job, an assurance-hook job and a handshake that has no job yet.",
6
+ "type": "object",
7
+ "properties": {
8
+ "schema": {
9
+ "const": "taifoon.hire.v1",
10
+ "x-stage": "L",
11
+ "description": "which canonical entity this record is; fixed per schema"
12
+ },
13
+ "job": {
14
+ "$ref": "common.json#/$defs/job_ref",
15
+ "x-stage": "S1"
16
+ },
17
+ "lane": {
18
+ "$ref": "common.json#/$defs/lane",
19
+ "x-stage": "S2"
20
+ },
21
+ "tenant": {
22
+ "type": [
23
+ "string",
24
+ "null"
25
+ ],
26
+ "x-stage": "S2"
27
+ },
28
+ "buyer": {
29
+ "anyOf": [
30
+ {
31
+ "$ref": "common.json#/$defs/address"
32
+ },
33
+ {
34
+ "type": "null"
35
+ }
36
+ ],
37
+ "x-stage": "S1"
38
+ },
39
+ "seller": {
40
+ "anyOf": [
41
+ {
42
+ "$ref": "common.json#/$defs/address"
43
+ },
44
+ {
45
+ "type": "null"
46
+ }
47
+ ],
48
+ "x-stage": "S1"
49
+ },
50
+ "seller_agent_key": {
51
+ "anyOf": [
52
+ {
53
+ "$ref": "common.json#/$defs/agent_key"
54
+ },
55
+ {
56
+ "type": "null"
57
+ }
58
+ ],
59
+ "x-stage": "S9"
60
+ },
61
+ "seller_ids": {
62
+ "type": "array",
63
+ "items": {
64
+ "type": "object",
65
+ "properties": {
66
+ "scheme": {
67
+ "type": "string"
68
+ },
69
+ "id": {
70
+ "type": "string"
71
+ }
72
+ },
73
+ "required": [
74
+ "scheme",
75
+ "id"
76
+ ],
77
+ "additionalProperties": false
78
+ },
79
+ "x-stage": "S1"
80
+ },
81
+ "evaluator": {
82
+ "anyOf": [
83
+ {
84
+ "$ref": "common.json#/$defs/address"
85
+ },
86
+ {
87
+ "type": "null"
88
+ }
89
+ ],
90
+ "x-stage": "S1"
91
+ },
92
+ "hook": {
93
+ "anyOf": [
94
+ {
95
+ "$ref": "common.json#/$defs/address"
96
+ },
97
+ {
98
+ "type": "null"
99
+ }
100
+ ],
101
+ "x-stage": "S1"
102
+ },
103
+ "evaluator_kind": {
104
+ "anyOf": [
105
+ {
106
+ "enum": [
107
+ "buyer",
108
+ "none",
109
+ "named",
110
+ "platform",
111
+ "hook"
112
+ ]
113
+ },
114
+ {
115
+ "type": "null"
116
+ }
117
+ ],
118
+ "x-stage": "S2"
119
+ },
120
+ "task": {
121
+ "type": [
122
+ "string",
123
+ "null"
124
+ ],
125
+ "x-stage": "S2"
126
+ },
127
+ "required_skills": {
128
+ "type": "array",
129
+ "items": {
130
+ "type": "string"
131
+ },
132
+ "x-stage": "L"
133
+ },
134
+ "budget": {
135
+ "anyOf": [
136
+ {
137
+ "$ref": "common.json#/$defs/amount"
138
+ },
139
+ {
140
+ "type": "null"
141
+ }
142
+ ],
143
+ "x-stage": "S1"
144
+ },
145
+ "funding": {
146
+ "type": [
147
+ "object",
148
+ "null"
149
+ ],
150
+ "properties": {
151
+ "price": {
152
+ "$ref": "common.json#/$defs/amount"
153
+ },
154
+ "premium": {
155
+ "anyOf": [
156
+ {
157
+ "$ref": "common.json#/$defs/amount"
158
+ },
159
+ {
160
+ "type": "null"
161
+ }
162
+ ]
163
+ },
164
+ "deposit": {
165
+ "anyOf": [
166
+ {
167
+ "$ref": "common.json#/$defs/amount"
168
+ },
169
+ {
170
+ "type": "null"
171
+ }
172
+ ]
173
+ },
174
+ "pool": {
175
+ "anyOf": [
176
+ {
177
+ "$ref": "common.json#/$defs/address"
178
+ },
179
+ {
180
+ "type": "null"
181
+ }
182
+ ]
183
+ },
184
+ "cover_cap": {
185
+ "anyOf": [
186
+ {
187
+ "$ref": "common.json#/$defs/uint_string"
188
+ },
189
+ {
190
+ "type": "null"
191
+ }
192
+ ]
193
+ },
194
+ "deadline": {
195
+ "anyOf": [
196
+ {
197
+ "$ref": "common.json#/$defs/unix_s"
198
+ },
199
+ {
200
+ "type": "null"
201
+ }
202
+ ]
203
+ },
204
+ "challenge_window": {
205
+ "type": [
206
+ "integer",
207
+ "null"
208
+ ],
209
+ "description": "stored by the hook, read by no contract logic"
210
+ }
211
+ },
212
+ "required": [
213
+ "price",
214
+ "premium",
215
+ "deposit",
216
+ "pool",
217
+ "cover_cap",
218
+ "deadline",
219
+ "challenge_window"
220
+ ],
221
+ "additionalProperties": false,
222
+ "x-stage": "S1"
223
+ },
224
+ "created_at": {
225
+ "anyOf": [
226
+ {
227
+ "$ref": "common.json#/$defs/unix_s"
228
+ },
229
+ {
230
+ "type": "null"
231
+ }
232
+ ],
233
+ "x-stage": "S1"
234
+ },
235
+ "deadline": {
236
+ "anyOf": [
237
+ {
238
+ "$ref": "common.json#/$defs/unix_s"
239
+ },
240
+ {
241
+ "type": "null"
242
+ }
243
+ ],
244
+ "x-stage": "S1"
245
+ },
246
+ "handshake_id": {
247
+ "type": [
248
+ "string",
249
+ "null"
250
+ ],
251
+ "pattern": "^hs_[0-9a-f]{24}$",
252
+ "x-stage": "L"
253
+ },
254
+ "offer_nonce": {
255
+ "type": [
256
+ "string",
257
+ "null"
258
+ ],
259
+ "x-stage": "S7"
260
+ },
261
+ "state": {
262
+ "$ref": "common.json#/$defs/lifecycle_state",
263
+ "x-stage": "L"
264
+ },
265
+ "ending": {
266
+ "anyOf": [
267
+ {
268
+ "$ref": "common.json#/$defs/ending"
269
+ },
270
+ {
271
+ "type": "null"
272
+ }
273
+ ],
274
+ "x-stage": "S2"
275
+ },
276
+ "anchors": {
277
+ "type": "array",
278
+ "items": {
279
+ "$ref": "common.json#/$defs/anchor"
280
+ },
281
+ "x-stage": "S1"
282
+ },
283
+ "source": {
284
+ "$ref": "common.json#/$defs/source",
285
+ "x-stage": "L"
286
+ }
287
+ },
288
+ "required": [
289
+ "schema",
290
+ "job",
291
+ "lane",
292
+ "tenant",
293
+ "buyer",
294
+ "seller",
295
+ "seller_agent_key",
296
+ "seller_ids",
297
+ "evaluator",
298
+ "hook",
299
+ "evaluator_kind",
300
+ "task",
301
+ "required_skills",
302
+ "budget",
303
+ "funding",
304
+ "created_at",
305
+ "deadline",
306
+ "handshake_id",
307
+ "offer_nonce",
308
+ "state",
309
+ "ending",
310
+ "anchors",
311
+ "source"
312
+ ],
313
+ "additionalProperties": false
314
+ }
@@ -0,0 +1,88 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://www.taifoon.io/schemas/coordination/v1/job.json",
4
+ "title": "JOB — one job with everything known about it",
5
+ "description": "The unit a harvester emits and the judge reads: HIRE always; DELIVERY and FACTS whenever the source shows them; VERDICT, SETTLEMENT and the seller RECORD when known. HARVESTABLE.md is the minimum.",
6
+ "type": "object",
7
+ "properties": {
8
+ "schema": {
9
+ "const": "taifoon.job.v1",
10
+ "x-stage": "L",
11
+ "description": "which canonical entity this record is; fixed per schema"
12
+ },
13
+ "job_key": {
14
+ "$ref": "common.json#/$defs/job_key",
15
+ "x-stage": "L"
16
+ },
17
+ "hire": {
18
+ "$ref": "hire.json",
19
+ "x-stage": "S1"
20
+ },
21
+ "delivery": {
22
+ "anyOf": [
23
+ {
24
+ "$ref": "delivery.json"
25
+ },
26
+ {
27
+ "type": "null"
28
+ }
29
+ ],
30
+ "x-stage": "S1"
31
+ },
32
+ "facts": {
33
+ "anyOf": [
34
+ {
35
+ "$ref": "facts.json"
36
+ },
37
+ {
38
+ "type": "null"
39
+ }
40
+ ],
41
+ "x-stage": "S4"
42
+ },
43
+ "verdict": {
44
+ "anyOf": [
45
+ {
46
+ "$ref": "verdict.json"
47
+ },
48
+ {
49
+ "type": "null"
50
+ }
51
+ ],
52
+ "x-stage": "S5"
53
+ },
54
+ "settlement": {
55
+ "anyOf": [
56
+ {
57
+ "$ref": "settlement.json"
58
+ },
59
+ {
60
+ "type": "null"
61
+ }
62
+ ],
63
+ "x-stage": "S6"
64
+ },
65
+ "record": {
66
+ "anyOf": [
67
+ {
68
+ "$ref": "record.json"
69
+ },
70
+ {
71
+ "type": "null"
72
+ }
73
+ ],
74
+ "x-stage": "S2"
75
+ }
76
+ },
77
+ "required": [
78
+ "schema",
79
+ "job_key",
80
+ "hire",
81
+ "delivery",
82
+ "facts",
83
+ "verdict",
84
+ "settlement",
85
+ "record"
86
+ ],
87
+ "additionalProperties": false
88
+ }
@@ -0,0 +1,243 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://www.taifoon.io/schemas/coordination/v1/settlement.json",
4
+ "title": "SETTLEMENT — how the money moved",
5
+ "description": "One row per job, whichever path settled it (settle-records.ts): every transaction with its role and link, the on-chain ending in the hook’s words.",
6
+ "type": "object",
7
+ "properties": {
8
+ "schema": {
9
+ "const": "taifoon.settlement.v1",
10
+ "x-stage": "L",
11
+ "description": "which canonical entity this record is; fixed per schema"
12
+ },
13
+ "job": {
14
+ "anyOf": [
15
+ {
16
+ "$ref": "common.json#/$defs/job_ref"
17
+ },
18
+ {
19
+ "type": "null"
20
+ }
21
+ ],
22
+ "x-stage": "S6"
23
+ },
24
+ "chain_id": {
25
+ "$ref": "common.json#/$defs/chain_id",
26
+ "x-stage": "S6"
27
+ },
28
+ "tenant": {
29
+ "type": [
30
+ "string",
31
+ "null"
32
+ ],
33
+ "x-stage": "S6"
34
+ },
35
+ "kind": {
36
+ "anyOf": [
37
+ {
38
+ "enum": [
39
+ "jev",
40
+ "agent",
41
+ "resource"
42
+ ]
43
+ },
44
+ {
45
+ "type": "null"
46
+ }
47
+ ],
48
+ "x-stage": "S6"
49
+ },
50
+ "buyer": {
51
+ "anyOf": [
52
+ {
53
+ "$ref": "common.json#/$defs/address"
54
+ },
55
+ {
56
+ "type": "null"
57
+ }
58
+ ],
59
+ "x-stage": "S6"
60
+ },
61
+ "seller": {
62
+ "anyOf": [
63
+ {
64
+ "$ref": "common.json#/$defs/address"
65
+ },
66
+ {
67
+ "type": "null"
68
+ }
69
+ ],
70
+ "x-stage": "S6"
71
+ },
72
+ "price": {
73
+ "anyOf": [
74
+ {
75
+ "$ref": "common.json#/$defs/uint_string"
76
+ },
77
+ {
78
+ "type": "null"
79
+ }
80
+ ],
81
+ "x-stage": "S6"
82
+ },
83
+ "token": {
84
+ "anyOf": [
85
+ {
86
+ "$ref": "common.json#/$defs/address"
87
+ },
88
+ {
89
+ "type": "null"
90
+ }
91
+ ],
92
+ "x-stage": "S6"
93
+ },
94
+ "verdict": {
95
+ "anyOf": [
96
+ {
97
+ "enum": [
98
+ "complete",
99
+ "reject",
100
+ "expire",
101
+ "cheat"
102
+ ]
103
+ },
104
+ {
105
+ "type": "null"
106
+ }
107
+ ],
108
+ "x-stage": "S6"
109
+ },
110
+ "state": {
111
+ "anyOf": [
112
+ {
113
+ "$ref": "common.json#/$defs/lifecycle_state"
114
+ },
115
+ {
116
+ "type": "null"
117
+ }
118
+ ],
119
+ "x-stage": "L"
120
+ },
121
+ "decision_id": {
122
+ "type": [
123
+ "string",
124
+ "null"
125
+ ],
126
+ "x-stage": "S5"
127
+ },
128
+ "jev_decision_id": {
129
+ "type": [
130
+ "string",
131
+ "null"
132
+ ],
133
+ "pattern": "^decision-[0-9]+-[0-9a-f]+$",
134
+ "x-stage": "S5"
135
+ },
136
+ "operator_decision_id": {
137
+ "type": [
138
+ "string",
139
+ "null"
140
+ ],
141
+ "pattern": "^opdec-[0-9a-f]{16}$",
142
+ "x-stage": "L"
143
+ },
144
+ "decided_by": {
145
+ "anyOf": [
146
+ {
147
+ "enum": [
148
+ "jev",
149
+ "loop-agent",
150
+ "operator"
151
+ ]
152
+ },
153
+ {
154
+ "type": "null"
155
+ }
156
+ ],
157
+ "x-stage": "L"
158
+ },
159
+ "txs": {
160
+ "type": "array",
161
+ "items": {
162
+ "type": "object",
163
+ "properties": {
164
+ "role": {
165
+ "type": "string"
166
+ },
167
+ "tx": {
168
+ "$ref": "common.json#/$defs/bytes32"
169
+ },
170
+ "link": {
171
+ "type": [
172
+ "string",
173
+ "null"
174
+ ]
175
+ }
176
+ },
177
+ "required": [
178
+ "role",
179
+ "tx",
180
+ "link"
181
+ ],
182
+ "additionalProperties": false
183
+ },
184
+ "x-stage": "S6"
185
+ },
186
+ "writer": {
187
+ "enum": [
188
+ "runner",
189
+ "relayer",
190
+ "evaluator-leg",
191
+ "keeper",
192
+ "site",
193
+ "n8n"
194
+ ],
195
+ "x-stage": "L"
196
+ },
197
+ "at": {
198
+ "anyOf": [
199
+ {
200
+ "$ref": "common.json#/$defs/unix_s"
201
+ },
202
+ {
203
+ "type": "null"
204
+ }
205
+ ],
206
+ "x-stage": "L"
207
+ },
208
+ "anchors": {
209
+ "type": "array",
210
+ "items": {
211
+ "$ref": "common.json#/$defs/anchor"
212
+ },
213
+ "x-stage": "S6"
214
+ },
215
+ "source": {
216
+ "$ref": "common.json#/$defs/source",
217
+ "x-stage": "L"
218
+ }
219
+ },
220
+ "required": [
221
+ "schema",
222
+ "job",
223
+ "chain_id",
224
+ "tenant",
225
+ "kind",
226
+ "buyer",
227
+ "seller",
228
+ "price",
229
+ "token",
230
+ "verdict",
231
+ "state",
232
+ "decision_id",
233
+ "jev_decision_id",
234
+ "operator_decision_id",
235
+ "decided_by",
236
+ "txs",
237
+ "writer",
238
+ "at",
239
+ "anchors",
240
+ "source"
241
+ ],
242
+ "additionalProperties": false
243
+ }