@cleocode/contracts 2026.5.3 → 2026.5.4

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 (46) hide show
  1. package/dist/index.d.ts +5 -4
  2. package/dist/index.d.ts.map +1 -1
  3. package/dist/index.js.map +1 -1
  4. package/dist/lafs.d.ts +16 -143
  5. package/dist/lafs.d.ts.map +1 -1
  6. package/dist/lafs.js +11 -4
  7. package/dist/lafs.js.map +1 -1
  8. package/dist/operations/conduit.d.ts +15 -3
  9. package/dist/operations/conduit.d.ts.map +1 -1
  10. package/dist/operations/docs.d.ts +18 -15
  11. package/dist/operations/docs.d.ts.map +1 -1
  12. package/dist/operations/index.d.ts +5 -0
  13. package/dist/operations/index.d.ts.map +1 -1
  14. package/dist/operations/index.js +5 -0
  15. package/dist/operations/index.js.map +1 -1
  16. package/dist/operations/lifecycle.d.ts +3 -4
  17. package/dist/operations/lifecycle.d.ts.map +1 -1
  18. package/dist/operations/nexus.d.ts +341 -34
  19. package/dist/operations/nexus.d.ts.map +1 -1
  20. package/dist/operations/session.d.ts +201 -9
  21. package/dist/operations/session.d.ts.map +1 -1
  22. package/dist/operations/tasks.d.ts +381 -35
  23. package/dist/operations/tasks.d.ts.map +1 -1
  24. package/dist/operations/tasks.js +4 -3
  25. package/dist/operations/tasks.js.map +1 -1
  26. package/dist/tasks.d.ts +357 -0
  27. package/dist/tasks.d.ts.map +1 -0
  28. package/dist/tasks.js +18 -0
  29. package/dist/tasks.js.map +1 -0
  30. package/package.json +4 -2
  31. package/schemas/acceptance-gate.schema.json +484 -5
  32. package/schemas/attachment.schema.json +210 -5
  33. package/schemas/gate-result-details.schema.json +174 -5
  34. package/schemas/gate-result.schema.json +236 -5
  35. package/schemas/task-evidence.schema.json +199 -5
  36. package/schemas/task.schema.json +568 -5
  37. package/src/index.ts +37 -7
  38. package/src/lafs.ts +34 -162
  39. package/src/operations/conduit.ts +16 -3
  40. package/src/operations/docs.ts +22 -16
  41. package/src/operations/index.ts +5 -0
  42. package/src/operations/lifecycle.ts +3 -5
  43. package/src/operations/nexus.ts +355 -34
  44. package/src/operations/session.ts +213 -10
  45. package/src/operations/tasks.ts +377 -36
  46. package/src/tasks.ts +413 -0
@@ -1,9 +1,488 @@
1
1
  {
2
- "$schema": "http://json-schema.org/draft-07/schema#",
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
3
  "title": "AcceptanceGate",
4
4
  "description": "Machine-verifiable acceptance gate attached to a CLEO task",
5
- "$ref": "#/definitions/AcceptanceGate",
6
- "definitions": {
7
- "AcceptanceGate": {}
8
- }
5
+ "oneOf": [
6
+ {
7
+ "type": "object",
8
+ "properties": {
9
+ "req": {
10
+ "type": "string"
11
+ },
12
+ "description": {
13
+ "type": "string",
14
+ "minLength": 1
15
+ },
16
+ "advisory": {
17
+ "type": "boolean"
18
+ },
19
+ "timeoutMs": {
20
+ "type": "integer",
21
+ "exclusiveMinimum": 0,
22
+ "maximum": 9007199254740991
23
+ },
24
+ "kind": {
25
+ "type": "string",
26
+ "const": "test"
27
+ },
28
+ "command": {
29
+ "type": "string",
30
+ "minLength": 1
31
+ },
32
+ "args": {
33
+ "type": "array",
34
+ "items": {
35
+ "type": "string"
36
+ }
37
+ },
38
+ "expect": {
39
+ "type": "string",
40
+ "enum": [
41
+ "pass",
42
+ "exit0"
43
+ ]
44
+ },
45
+ "minCount": {
46
+ "type": "integer",
47
+ "minimum": 0,
48
+ "maximum": 9007199254740991
49
+ },
50
+ "cwd": {
51
+ "type": "string"
52
+ },
53
+ "env": {
54
+ "type": "object",
55
+ "propertyNames": {
56
+ "type": "string"
57
+ },
58
+ "additionalProperties": {
59
+ "type": "string"
60
+ }
61
+ }
62
+ },
63
+ "required": [
64
+ "description",
65
+ "kind",
66
+ "command",
67
+ "expect"
68
+ ],
69
+ "additionalProperties": false
70
+ },
71
+ {
72
+ "type": "object",
73
+ "properties": {
74
+ "req": {
75
+ "type": "string"
76
+ },
77
+ "description": {
78
+ "type": "string",
79
+ "minLength": 1
80
+ },
81
+ "advisory": {
82
+ "type": "boolean"
83
+ },
84
+ "timeoutMs": {
85
+ "type": "integer",
86
+ "exclusiveMinimum": 0,
87
+ "maximum": 9007199254740991
88
+ },
89
+ "kind": {
90
+ "type": "string",
91
+ "const": "file"
92
+ },
93
+ "path": {
94
+ "type": "string",
95
+ "minLength": 1
96
+ },
97
+ "attachmentSha256": {
98
+ "type": "string",
99
+ "pattern": "^[0-9a-f]{64}$"
100
+ },
101
+ "assertions": {
102
+ "minItems": 1,
103
+ "type": "array",
104
+ "items": {
105
+ "oneOf": [
106
+ {
107
+ "type": "object",
108
+ "properties": {
109
+ "type": {
110
+ "type": "string",
111
+ "const": "exists"
112
+ }
113
+ },
114
+ "required": [
115
+ "type"
116
+ ],
117
+ "additionalProperties": false
118
+ },
119
+ {
120
+ "type": "object",
121
+ "properties": {
122
+ "type": {
123
+ "type": "string",
124
+ "const": "absent"
125
+ }
126
+ },
127
+ "required": [
128
+ "type"
129
+ ],
130
+ "additionalProperties": false
131
+ },
132
+ {
133
+ "type": "object",
134
+ "properties": {
135
+ "type": {
136
+ "type": "string",
137
+ "const": "nonEmpty"
138
+ }
139
+ },
140
+ "required": [
141
+ "type"
142
+ ],
143
+ "additionalProperties": false
144
+ },
145
+ {
146
+ "type": "object",
147
+ "properties": {
148
+ "type": {
149
+ "type": "string",
150
+ "const": "maxBytes"
151
+ },
152
+ "value": {
153
+ "type": "integer",
154
+ "minimum": 0,
155
+ "maximum": 9007199254740991
156
+ }
157
+ },
158
+ "required": [
159
+ "type",
160
+ "value"
161
+ ],
162
+ "additionalProperties": false
163
+ },
164
+ {
165
+ "type": "object",
166
+ "properties": {
167
+ "type": {
168
+ "type": "string",
169
+ "const": "minBytes"
170
+ },
171
+ "value": {
172
+ "type": "integer",
173
+ "minimum": 0,
174
+ "maximum": 9007199254740991
175
+ }
176
+ },
177
+ "required": [
178
+ "type",
179
+ "value"
180
+ ],
181
+ "additionalProperties": false
182
+ },
183
+ {
184
+ "type": "object",
185
+ "properties": {
186
+ "type": {
187
+ "type": "string",
188
+ "const": "contains"
189
+ },
190
+ "value": {
191
+ "type": "string"
192
+ }
193
+ },
194
+ "required": [
195
+ "type",
196
+ "value"
197
+ ],
198
+ "additionalProperties": false
199
+ },
200
+ {
201
+ "type": "object",
202
+ "properties": {
203
+ "type": {
204
+ "type": "string",
205
+ "const": "matches"
206
+ },
207
+ "regex": {
208
+ "type": "string",
209
+ "minLength": 1
210
+ },
211
+ "flags": {
212
+ "type": "string"
213
+ }
214
+ },
215
+ "required": [
216
+ "type",
217
+ "regex"
218
+ ],
219
+ "additionalProperties": false
220
+ },
221
+ {
222
+ "type": "object",
223
+ "properties": {
224
+ "type": {
225
+ "type": "string",
226
+ "const": "sha256"
227
+ },
228
+ "value": {
229
+ "type": "string",
230
+ "minLength": 64,
231
+ "maxLength": 64
232
+ }
233
+ },
234
+ "required": [
235
+ "type",
236
+ "value"
237
+ ],
238
+ "additionalProperties": false
239
+ }
240
+ ]
241
+ }
242
+ }
243
+ },
244
+ "required": [
245
+ "description",
246
+ "kind",
247
+ "assertions"
248
+ ],
249
+ "additionalProperties": false
250
+ },
251
+ {
252
+ "type": "object",
253
+ "properties": {
254
+ "req": {
255
+ "type": "string"
256
+ },
257
+ "description": {
258
+ "type": "string",
259
+ "minLength": 1
260
+ },
261
+ "advisory": {
262
+ "type": "boolean"
263
+ },
264
+ "timeoutMs": {
265
+ "type": "integer",
266
+ "exclusiveMinimum": 0,
267
+ "maximum": 9007199254740991
268
+ },
269
+ "kind": {
270
+ "type": "string",
271
+ "const": "command"
272
+ },
273
+ "cmd": {
274
+ "type": "string",
275
+ "minLength": 1
276
+ },
277
+ "args": {
278
+ "type": "array",
279
+ "items": {
280
+ "type": "string"
281
+ }
282
+ },
283
+ "exitCode": {
284
+ "type": "integer",
285
+ "minimum": -9007199254740991,
286
+ "maximum": 9007199254740991
287
+ },
288
+ "stdoutMatches": {
289
+ "type": "string"
290
+ },
291
+ "stderrMatches": {
292
+ "type": "string"
293
+ },
294
+ "cwd": {
295
+ "type": "string"
296
+ },
297
+ "env": {
298
+ "type": "object",
299
+ "propertyNames": {
300
+ "type": "string"
301
+ },
302
+ "additionalProperties": {
303
+ "type": "string"
304
+ }
305
+ }
306
+ },
307
+ "required": [
308
+ "description",
309
+ "kind",
310
+ "cmd"
311
+ ],
312
+ "additionalProperties": false
313
+ },
314
+ {
315
+ "type": "object",
316
+ "properties": {
317
+ "req": {
318
+ "type": "string"
319
+ },
320
+ "description": {
321
+ "type": "string",
322
+ "minLength": 1
323
+ },
324
+ "advisory": {
325
+ "type": "boolean"
326
+ },
327
+ "timeoutMs": {
328
+ "type": "integer",
329
+ "exclusiveMinimum": 0,
330
+ "maximum": 9007199254740991
331
+ },
332
+ "kind": {
333
+ "type": "string",
334
+ "const": "lint"
335
+ },
336
+ "tool": {
337
+ "type": "string",
338
+ "enum": [
339
+ "biome",
340
+ "eslint",
341
+ "tsc",
342
+ "prettier",
343
+ "rustc",
344
+ "clippy"
345
+ ]
346
+ },
347
+ "args": {
348
+ "type": "array",
349
+ "items": {
350
+ "type": "string"
351
+ }
352
+ },
353
+ "expect": {
354
+ "type": "string",
355
+ "enum": [
356
+ "clean",
357
+ "noErrors"
358
+ ]
359
+ },
360
+ "cwd": {
361
+ "type": "string"
362
+ }
363
+ },
364
+ "required": [
365
+ "description",
366
+ "kind",
367
+ "tool",
368
+ "expect"
369
+ ],
370
+ "additionalProperties": false
371
+ },
372
+ {
373
+ "type": "object",
374
+ "properties": {
375
+ "req": {
376
+ "type": "string"
377
+ },
378
+ "description": {
379
+ "type": "string",
380
+ "minLength": 1
381
+ },
382
+ "advisory": {
383
+ "type": "boolean"
384
+ },
385
+ "timeoutMs": {
386
+ "type": "integer",
387
+ "exclusiveMinimum": 0,
388
+ "maximum": 9007199254740991
389
+ },
390
+ "kind": {
391
+ "type": "string",
392
+ "const": "http"
393
+ },
394
+ "url": {
395
+ "type": "string",
396
+ "format": "uri"
397
+ },
398
+ "method": {
399
+ "type": "string",
400
+ "enum": [
401
+ "GET",
402
+ "HEAD",
403
+ "POST",
404
+ "PUT",
405
+ "DELETE"
406
+ ]
407
+ },
408
+ "status": {
409
+ "type": "integer",
410
+ "minimum": 100,
411
+ "maximum": 599
412
+ },
413
+ "bodyMatches": {
414
+ "type": "string"
415
+ },
416
+ "headers": {
417
+ "type": "object",
418
+ "propertyNames": {
419
+ "type": "string"
420
+ },
421
+ "additionalProperties": {
422
+ "type": "string"
423
+ }
424
+ },
425
+ "startCommand": {
426
+ "type": "string"
427
+ },
428
+ "startupDelayMs": {
429
+ "type": "integer",
430
+ "minimum": 0,
431
+ "maximum": 9007199254740991
432
+ }
433
+ },
434
+ "required": [
435
+ "description",
436
+ "kind",
437
+ "url",
438
+ "status"
439
+ ],
440
+ "additionalProperties": false
441
+ },
442
+ {
443
+ "type": "object",
444
+ "properties": {
445
+ "req": {
446
+ "type": "string"
447
+ },
448
+ "description": {
449
+ "type": "string",
450
+ "minLength": 1
451
+ },
452
+ "advisory": {
453
+ "type": "boolean"
454
+ },
455
+ "timeoutMs": {
456
+ "type": "integer",
457
+ "exclusiveMinimum": 0,
458
+ "maximum": 9007199254740991
459
+ },
460
+ "kind": {
461
+ "type": "string",
462
+ "const": "manual"
463
+ },
464
+ "prompt": {
465
+ "type": "string",
466
+ "minLength": 1
467
+ },
468
+ "verdicts": {
469
+ "type": "array",
470
+ "items": {
471
+ "type": "string",
472
+ "enum": [
473
+ "pass",
474
+ "fail",
475
+ "warn"
476
+ ]
477
+ }
478
+ }
479
+ },
480
+ "required": [
481
+ "description",
482
+ "kind",
483
+ "prompt"
484
+ ],
485
+ "additionalProperties": false
486
+ }
487
+ ]
9
488
  }
@@ -1,9 +1,214 @@
1
1
  {
2
- "$schema": "http://json-schema.org/draft-07/schema#",
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
3
  "title": "Attachment",
4
4
  "description": "Content artifact (file, URL, blob, llms-txt, or llmtxt-doc) attachable to a CLEO owner",
5
- "$ref": "#/definitions/Attachment",
6
- "definitions": {
7
- "Attachment": {}
8
- }
5
+ "oneOf": [
6
+ {
7
+ "type": "object",
8
+ "properties": {
9
+ "description": {
10
+ "type": "string"
11
+ },
12
+ "labels": {
13
+ "type": "array",
14
+ "items": {
15
+ "type": "string"
16
+ }
17
+ },
18
+ "kind": {
19
+ "type": "string",
20
+ "const": "local-file"
21
+ },
22
+ "path": {
23
+ "type": "string",
24
+ "minLength": 1
25
+ },
26
+ "sha256": {
27
+ "type": "string",
28
+ "minLength": 64,
29
+ "maxLength": 64
30
+ },
31
+ "mime": {
32
+ "type": "string",
33
+ "minLength": 1
34
+ },
35
+ "size": {
36
+ "type": "integer",
37
+ "minimum": 0,
38
+ "maximum": 9007199254740991
39
+ }
40
+ },
41
+ "required": [
42
+ "kind",
43
+ "path",
44
+ "sha256",
45
+ "mime",
46
+ "size"
47
+ ],
48
+ "additionalProperties": false
49
+ },
50
+ {
51
+ "type": "object",
52
+ "properties": {
53
+ "description": {
54
+ "type": "string"
55
+ },
56
+ "labels": {
57
+ "type": "array",
58
+ "items": {
59
+ "type": "string"
60
+ }
61
+ },
62
+ "kind": {
63
+ "type": "string",
64
+ "const": "url"
65
+ },
66
+ "url": {
67
+ "type": "string",
68
+ "format": "uri"
69
+ },
70
+ "cachedSha256": {
71
+ "type": "string",
72
+ "minLength": 64,
73
+ "maxLength": 64
74
+ },
75
+ "cachedAt": {
76
+ "type": "string",
77
+ "format": "date-time",
78
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
79
+ },
80
+ "mime": {
81
+ "type": "string"
82
+ }
83
+ },
84
+ "required": [
85
+ "kind",
86
+ "url"
87
+ ],
88
+ "additionalProperties": false
89
+ },
90
+ {
91
+ "type": "object",
92
+ "properties": {
93
+ "description": {
94
+ "type": "string"
95
+ },
96
+ "labels": {
97
+ "type": "array",
98
+ "items": {
99
+ "type": "string"
100
+ }
101
+ },
102
+ "kind": {
103
+ "type": "string",
104
+ "const": "blob"
105
+ },
106
+ "sha256": {
107
+ "type": "string",
108
+ "minLength": 64,
109
+ "maxLength": 64
110
+ },
111
+ "storageKey": {
112
+ "type": "string",
113
+ "minLength": 1
114
+ },
115
+ "mime": {
116
+ "type": "string",
117
+ "minLength": 1
118
+ },
119
+ "size": {
120
+ "type": "integer",
121
+ "minimum": 0,
122
+ "maximum": 9007199254740991
123
+ }
124
+ },
125
+ "required": [
126
+ "kind",
127
+ "sha256",
128
+ "storageKey",
129
+ "mime",
130
+ "size"
131
+ ],
132
+ "additionalProperties": false
133
+ },
134
+ {
135
+ "type": "object",
136
+ "properties": {
137
+ "description": {
138
+ "type": "string"
139
+ },
140
+ "labels": {
141
+ "type": "array",
142
+ "items": {
143
+ "type": "string"
144
+ }
145
+ },
146
+ "kind": {
147
+ "type": "string",
148
+ "const": "llms-txt"
149
+ },
150
+ "source": {
151
+ "type": "string",
152
+ "enum": [
153
+ "url",
154
+ "generated"
155
+ ]
156
+ },
157
+ "content": {
158
+ "type": "string",
159
+ "minLength": 1
160
+ },
161
+ "sha256": {
162
+ "type": "string",
163
+ "minLength": 64,
164
+ "maxLength": 64
165
+ }
166
+ },
167
+ "required": [
168
+ "kind",
169
+ "source",
170
+ "content",
171
+ "sha256"
172
+ ],
173
+ "additionalProperties": false
174
+ },
175
+ {
176
+ "type": "object",
177
+ "properties": {
178
+ "description": {
179
+ "type": "string"
180
+ },
181
+ "labels": {
182
+ "type": "array",
183
+ "items": {
184
+ "type": "string"
185
+ }
186
+ },
187
+ "kind": {
188
+ "type": "string",
189
+ "const": "llmtxt-doc"
190
+ },
191
+ "slug": {
192
+ "type": "string",
193
+ "minLength": 1
194
+ },
195
+ "backend": {
196
+ "type": "string",
197
+ "enum": [
198
+ "local",
199
+ "remote"
200
+ ]
201
+ },
202
+ "pinnedVersion": {
203
+ "type": "string"
204
+ }
205
+ },
206
+ "required": [
207
+ "kind",
208
+ "slug",
209
+ "backend"
210
+ ],
211
+ "additionalProperties": false
212
+ }
213
+ ]
9
214
  }