@gtrabanco/agentic-workflow-schema 3.3.0 → 3.5.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.
- package/README.es.md +549 -3
- package/README.md +539 -3
- package/dist/canonical-json.d.ts +60 -0
- package/dist/canonical-json.js +119 -0
- package/dist/index.d.ts +263 -2
- package/dist/index.js +587 -52
- package/dist/pre-execution-contract.d.ts +175 -0
- package/dist/pre-execution-contract.js +676 -0
- package/dist/pre-execution-vectors.d.ts +19 -0
- package/dist/pre-execution-vectors.js +35 -0
- package/dist/pre-execution.d.ts +363 -0
- package/dist/pre-execution.js +838 -0
- package/dist/sha256.d.ts +43 -0
- package/dist/sha256.js +189 -0
- package/dist/verification-contract.d.ts +294 -0
- package/dist/verification-contract.js +1229 -0
- package/package.json +21 -3
- package/pre-execution-artifact-snapshot.schema.json +383 -0
- package/pre-execution-review-receipt.schema.json +457 -0
- package/verification-plan.schema.json +197 -0
- package/verification-receipt.schema.json +309 -0
|
@@ -0,0 +1,309 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$comment": "agentic-workflow generated file - DO NOT HAND-EDIT. | projection: structural-only | authoritative: false | authority: validateVerificationReceiptAgainstPlan | semantic validation: required (a Draft-07 PASS is not contract validity) | runtime-only rules (not expressible in Draft-07): unique-result-command-ids, timestamp-order, timestamp-calendar-valid | payload budget: runtime-only (canonical receipt <= 512 KiB) | diagnostics: runtime-only (at most 50 redacted code+path rows) | values: never returned (D16 — diagnostics carry a frozen code and an RFC 6901 pointer only) | regenerate with: node scripts/generate-verification-schemas.mjs",
|
|
4
|
+
"title": "VerificationReceipt v1",
|
|
5
|
+
"description": "A verification receipt bound to a plan, candidate snapshot, and acceptance fingerprint. This document is a NON-AUTHORITATIVE Draft-07 structural projection generated from the package's canonical verification-contract definition. It is not a semantic authority: a Draft-07 match is not contract validity — use the authoritative runtime entry point named in $comment.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": [
|
|
9
|
+
"contract",
|
|
10
|
+
"planDigest",
|
|
11
|
+
"candidateSnapshotDigest",
|
|
12
|
+
"acceptanceFingerprint",
|
|
13
|
+
"stageRequested",
|
|
14
|
+
"results",
|
|
15
|
+
"verdict"
|
|
16
|
+
],
|
|
17
|
+
"properties": {
|
|
18
|
+
"contract": {
|
|
19
|
+
"type": "string",
|
|
20
|
+
"const": "agentic-workflow/verification-receipt@1",
|
|
21
|
+
"description": "Contract identifier."
|
|
22
|
+
},
|
|
23
|
+
"planDigest": {
|
|
24
|
+
"type": "string",
|
|
25
|
+
"pattern": "^[a-f0-9]{64}$",
|
|
26
|
+
"description": "Lowercase 64-hex SHA-256 digest of the bound plan."
|
|
27
|
+
},
|
|
28
|
+
"candidateSnapshotDigest": {
|
|
29
|
+
"type": "string",
|
|
30
|
+
"pattern": "^[a-f0-9]{64}$",
|
|
31
|
+
"description": "Lowercase 64-hex SHA-256 from #138's candidate-snapshot digest."
|
|
32
|
+
},
|
|
33
|
+
"acceptanceFingerprint": {
|
|
34
|
+
"type": "string",
|
|
35
|
+
"pattern": "^[a-f0-9]{64}$",
|
|
36
|
+
"description": "Lowercase 64-hex acceptance fingerprint from #138."
|
|
37
|
+
},
|
|
38
|
+
"stageRequested": {
|
|
39
|
+
"type": "string",
|
|
40
|
+
"enum": [
|
|
41
|
+
"fast",
|
|
42
|
+
"full"
|
|
43
|
+
],
|
|
44
|
+
"description": "Which stage was requested."
|
|
45
|
+
},
|
|
46
|
+
"results": {
|
|
47
|
+
"type": "array",
|
|
48
|
+
"items": {
|
|
49
|
+
"$ref": "#/$defs/VerificationResultV1"
|
|
50
|
+
},
|
|
51
|
+
"maxItems": 128,
|
|
52
|
+
"description": "Ordered per-command results; at most 128 rows in declared order."
|
|
53
|
+
},
|
|
54
|
+
"verdict": {
|
|
55
|
+
"type": "string",
|
|
56
|
+
"enum": [
|
|
57
|
+
"pass",
|
|
58
|
+
"fail",
|
|
59
|
+
"incomplete"
|
|
60
|
+
],
|
|
61
|
+
"description": "Must equal deriveVerificationVerdict."
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
"$defs": {
|
|
65
|
+
"EvidenceReferenceV1": {
|
|
66
|
+
"type": "object",
|
|
67
|
+
"additionalProperties": false,
|
|
68
|
+
"required": [
|
|
69
|
+
"ref",
|
|
70
|
+
"bytes",
|
|
71
|
+
"sha256"
|
|
72
|
+
],
|
|
73
|
+
"properties": {
|
|
74
|
+
"ref": {
|
|
75
|
+
"type": "string",
|
|
76
|
+
"minLength": 1,
|
|
77
|
+
"maxLength": 1024,
|
|
78
|
+
"pattern": "^[^\\0]*$",
|
|
79
|
+
"description": "Non-empty opaque pointer to stored evidence; NUL-free."
|
|
80
|
+
},
|
|
81
|
+
"bytes": {
|
|
82
|
+
"type": "integer",
|
|
83
|
+
"minimum": 0,
|
|
84
|
+
"description": "Size of the captured evidence in bytes."
|
|
85
|
+
},
|
|
86
|
+
"sha256": {
|
|
87
|
+
"type": "string",
|
|
88
|
+
"pattern": "^[a-f0-9]{64}$",
|
|
89
|
+
"description": "Lowercase 64-hex SHA-256 digest of the captured evidence."
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
"VerificationResultV1": {
|
|
94
|
+
"type": "object",
|
|
95
|
+
"additionalProperties": false,
|
|
96
|
+
"required": [
|
|
97
|
+
"commandId",
|
|
98
|
+
"status",
|
|
99
|
+
"exitCode",
|
|
100
|
+
"signal",
|
|
101
|
+
"startedAt",
|
|
102
|
+
"endedAt",
|
|
103
|
+
"stdout",
|
|
104
|
+
"stderr",
|
|
105
|
+
"skipReason"
|
|
106
|
+
],
|
|
107
|
+
"properties": {
|
|
108
|
+
"commandId": {
|
|
109
|
+
"type": "string",
|
|
110
|
+
"minLength": 1,
|
|
111
|
+
"maxLength": 128,
|
|
112
|
+
"pattern": "^[^\\0]*$",
|
|
113
|
+
"description": "Must exist in the bound plan's commands; NUL-free, at most 128 chars."
|
|
114
|
+
},
|
|
115
|
+
"status": {
|
|
116
|
+
"type": "string",
|
|
117
|
+
"enum": [
|
|
118
|
+
"passed",
|
|
119
|
+
"failed",
|
|
120
|
+
"timed-out",
|
|
121
|
+
"skipped",
|
|
122
|
+
"infrastructure-error"
|
|
123
|
+
],
|
|
124
|
+
"description": "The terminal status of this command execution."
|
|
125
|
+
},
|
|
126
|
+
"exitCode": {
|
|
127
|
+
"oneOf": [
|
|
128
|
+
{
|
|
129
|
+
"type": "integer"
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
"type": "null"
|
|
133
|
+
}
|
|
134
|
+
],
|
|
135
|
+
"description": "Per the D4 exit-code/signal matrix."
|
|
136
|
+
},
|
|
137
|
+
"signal": {
|
|
138
|
+
"oneOf": [
|
|
139
|
+
{
|
|
140
|
+
"type": "string",
|
|
141
|
+
"minLength": 1,
|
|
142
|
+
"maxLength": 1024,
|
|
143
|
+
"pattern": "^[^\\0]*$"
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
"type": "null"
|
|
147
|
+
}
|
|
148
|
+
],
|
|
149
|
+
"description": "Per the D4 exit-code/signal matrix; NUL-free, at most 1024 chars."
|
|
150
|
+
},
|
|
151
|
+
"startedAt": {
|
|
152
|
+
"type": "string",
|
|
153
|
+
"pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$",
|
|
154
|
+
"description": "ISO-8601 UTC start timestamp."
|
|
155
|
+
},
|
|
156
|
+
"endedAt": {
|
|
157
|
+
"type": "string",
|
|
158
|
+
"pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$",
|
|
159
|
+
"description": "ISO-8601 UTC end timestamp, >= startedAt."
|
|
160
|
+
},
|
|
161
|
+
"stdout": {
|
|
162
|
+
"oneOf": [
|
|
163
|
+
{
|
|
164
|
+
"$ref": "#/$defs/EvidenceReferenceV1"
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
"type": "null"
|
|
168
|
+
}
|
|
169
|
+
],
|
|
170
|
+
"description": "Bounded stdout evidence reference or null."
|
|
171
|
+
},
|
|
172
|
+
"stderr": {
|
|
173
|
+
"oneOf": [
|
|
174
|
+
{
|
|
175
|
+
"$ref": "#/$defs/EvidenceReferenceV1"
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
"type": "null"
|
|
179
|
+
}
|
|
180
|
+
],
|
|
181
|
+
"description": "Bounded stderr evidence reference or null."
|
|
182
|
+
},
|
|
183
|
+
"skipReason": {
|
|
184
|
+
"oneOf": [
|
|
185
|
+
{
|
|
186
|
+
"type": "string",
|
|
187
|
+
"minLength": 1,
|
|
188
|
+
"maxLength": 1024,
|
|
189
|
+
"pattern": "^[^\\0]*$"
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
"type": "null"
|
|
193
|
+
}
|
|
194
|
+
],
|
|
195
|
+
"description": "Null on non-skipped rows; non-empty NUL-free string ≤ 1024 chars on skipped."
|
|
196
|
+
}
|
|
197
|
+
},
|
|
198
|
+
"allOf": [
|
|
199
|
+
{
|
|
200
|
+
"description": "[d4-exactly-one-terminal-result] D4 exit-code/signal matrix: passed/failed carry exactly one of exitCode (integer) or signal (non-empty string).",
|
|
201
|
+
"if": {
|
|
202
|
+
"properties": {
|
|
203
|
+
"status": {
|
|
204
|
+
"enum": [
|
|
205
|
+
"passed",
|
|
206
|
+
"failed"
|
|
207
|
+
]
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
},
|
|
211
|
+
"then": {
|
|
212
|
+
"anyOf": [
|
|
213
|
+
{
|
|
214
|
+
"required": [
|
|
215
|
+
"exitCode",
|
|
216
|
+
"signal"
|
|
217
|
+
],
|
|
218
|
+
"properties": {
|
|
219
|
+
"exitCode": {
|
|
220
|
+
"type": "integer"
|
|
221
|
+
},
|
|
222
|
+
"signal": {
|
|
223
|
+
"type": "null"
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
"required": [
|
|
229
|
+
"exitCode",
|
|
230
|
+
"signal"
|
|
231
|
+
],
|
|
232
|
+
"properties": {
|
|
233
|
+
"exitCode": {
|
|
234
|
+
"type": "null"
|
|
235
|
+
},
|
|
236
|
+
"signal": {
|
|
237
|
+
"type": "string"
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
]
|
|
242
|
+
}
|
|
243
|
+
},
|
|
244
|
+
{
|
|
245
|
+
"description": "[d4-timed-out-has-no-exit-code] D4: timed-out carries exitCode null and an optional captured kill signal.",
|
|
246
|
+
"if": {
|
|
247
|
+
"properties": {
|
|
248
|
+
"status": {
|
|
249
|
+
"const": "timed-out"
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
},
|
|
253
|
+
"then": {
|
|
254
|
+
"properties": {
|
|
255
|
+
"exitCode": {
|
|
256
|
+
"type": "null"
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
},
|
|
261
|
+
{
|
|
262
|
+
"description": "[d4-no-terminal-result] D4: infrastructure-error and skipped carry neither exitCode nor signal.",
|
|
263
|
+
"if": {
|
|
264
|
+
"properties": {
|
|
265
|
+
"status": {
|
|
266
|
+
"enum": [
|
|
267
|
+
"infrastructure-error",
|
|
268
|
+
"skipped"
|
|
269
|
+
]
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
},
|
|
273
|
+
"then": {
|
|
274
|
+
"properties": {
|
|
275
|
+
"exitCode": {
|
|
276
|
+
"type": "null"
|
|
277
|
+
},
|
|
278
|
+
"signal": {
|
|
279
|
+
"type": "null"
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
},
|
|
284
|
+
{
|
|
285
|
+
"description": "[skip-reason-only-when-skipped] Non-skipped rows carry skipReason null.",
|
|
286
|
+
"if": {
|
|
287
|
+
"properties": {
|
|
288
|
+
"status": {
|
|
289
|
+
"enum": [
|
|
290
|
+
"passed",
|
|
291
|
+
"failed",
|
|
292
|
+
"timed-out",
|
|
293
|
+
"infrastructure-error"
|
|
294
|
+
]
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
},
|
|
298
|
+
"then": {
|
|
299
|
+
"properties": {
|
|
300
|
+
"skipReason": {
|
|
301
|
+
"type": "null"
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
]
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
}
|