@attested-intelligence/aga-verify 1.0.0 → 2.0.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.md +44 -28
- package/dist/aga-verify.mjs +214 -126
- package/example-bundle.json +86 -258
- package/package.json +3 -6
- package/verify.ts +275 -198
package/example-bundle.json
CHANGED
|
@@ -1,284 +1,112 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
"policy_reference": "c5090e8677afc35133da645aa2aecdcd36cd67184dfcfe031f1c55d5d1294020",
|
|
10
|
-
"policy_version": 4,
|
|
11
|
-
"sealed_hash": "1dd8ed34d6cd1c1c5cec647d26cc4c3676d7796a729376bb3fcf26b2a6edba33",
|
|
12
|
-
"seal_salt": "910887666ac8dc2b7db5695fd0186b4e",
|
|
13
|
-
"issued_timestamp": "2026-06-02T08:30:36.164Z",
|
|
14
|
-
"effective_timestamp": "2026-06-02T08:30:36.164Z",
|
|
15
|
-
"expiration_timestamp": null,
|
|
16
|
-
"issuer_identifier": "ac92dd48402bf3255177df55198c449dc61e36c97a3ed62e81462e72f741b311",
|
|
17
|
-
"enforcement_parameters": {
|
|
18
|
-
"measurement_cadence_ms": 200,
|
|
19
|
-
"ttl_seconds": 3600,
|
|
20
|
-
"enforcement_triggers": [
|
|
21
|
-
"QUARANTINE",
|
|
22
|
-
"TERMINATE",
|
|
23
|
-
"SAFE_STATE"
|
|
24
|
-
],
|
|
25
|
-
"re_attestation_required": true,
|
|
26
|
-
"measurement_types": [
|
|
27
|
-
"EXECUTABLE_IMAGE",
|
|
28
|
-
"LOADED_MODULES",
|
|
29
|
-
"CONFIG_MANIFEST"
|
|
30
|
-
],
|
|
31
|
-
"behavioral_baseline": {
|
|
32
|
-
"permitted_tools": [
|
|
33
|
-
"web_search",
|
|
34
|
-
"code_execute",
|
|
35
|
-
"file_read",
|
|
36
|
-
"summarize"
|
|
37
|
-
],
|
|
38
|
-
"forbidden_sequences": [
|
|
39
|
-
[
|
|
40
|
-
"file_read",
|
|
41
|
-
"web_search",
|
|
42
|
-
"code_execute"
|
|
43
|
-
]
|
|
44
|
-
],
|
|
45
|
-
"rate_limits": {
|
|
46
|
-
"web_search": 20,
|
|
47
|
-
"code_execute": 10,
|
|
48
|
-
"file_read": 30,
|
|
49
|
-
"summarize": 50
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
},
|
|
53
|
-
"disclosure_policy": {
|
|
54
|
-
"claims_taxonomy": [
|
|
55
|
-
{
|
|
56
|
-
"claim_id": "agent.model_weights_hash",
|
|
57
|
-
"sensitivity": "S4_CRITICAL",
|
|
58
|
-
"substitutes": [
|
|
59
|
-
"agent.model_family",
|
|
60
|
-
"agent.model_generation"
|
|
61
|
-
],
|
|
62
|
-
"inference_risks": [],
|
|
63
|
-
"permitted_modes": []
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
"claim_id": "agent.model_family",
|
|
67
|
-
"sensitivity": "S2_MODERATE",
|
|
68
|
-
"substitutes": [
|
|
69
|
-
"agent.model_generation"
|
|
70
|
-
],
|
|
71
|
-
"inference_risks": [],
|
|
72
|
-
"permitted_modes": [
|
|
73
|
-
"REVEAL_MIN",
|
|
74
|
-
"REVEAL_FULL"
|
|
75
|
-
]
|
|
76
|
-
},
|
|
77
|
-
{
|
|
78
|
-
"claim_id": "agent.model_generation",
|
|
79
|
-
"sensitivity": "S1_LOW",
|
|
80
|
-
"substitutes": [],
|
|
81
|
-
"inference_risks": [],
|
|
82
|
-
"permitted_modes": [
|
|
83
|
-
"PROOF_ONLY",
|
|
84
|
-
"REVEAL_MIN",
|
|
85
|
-
"REVEAL_FULL"
|
|
86
|
-
]
|
|
87
|
-
}
|
|
88
|
-
],
|
|
89
|
-
"substitution_rules": []
|
|
90
|
-
},
|
|
91
|
-
"evidence_commitments": [
|
|
92
|
-
{
|
|
93
|
-
"commitment": "3a7cafa939fa3732b4d36875b8909b467a2d063ce01c617b1f491983f9b8de71",
|
|
94
|
-
"salt": "eb5050aaff095529b52e03f920f32736",
|
|
95
|
-
"label": "model_card"
|
|
96
|
-
},
|
|
97
|
-
{
|
|
98
|
-
"commitment": "8f6a61abea33aca30d67af6fee22780ac2b689058882f70f8723c9f37d8da8bd",
|
|
99
|
-
"salt": "edba40897cd4d45923f00891c11d7746",
|
|
100
|
-
"label": "scope_approval"
|
|
101
|
-
}
|
|
102
|
-
],
|
|
103
|
-
"signature": "X9IEtvUlU8AUixd/ZTbWqUGFhfqEbeQKYZy3/nzKhbj43uYS678X8BV+7hrd26Ts1m2hbUa+JHPAqzgj+z5YDg=="
|
|
104
|
-
},
|
|
2
|
+
"schema_version": "2.0",
|
|
3
|
+
"bundle_id": "bundle-3",
|
|
4
|
+
"algorithm": "Ed25519-SHA256-JCS",
|
|
5
|
+
"generated_at": "2026-06-03T00:00:00.000Z",
|
|
6
|
+
"gateway_id": "aga-demo-001",
|
|
7
|
+
"public_key": "ea4a6c63e29c520abef5507b132ec5f9954776aebebe7b92421eea691446d22c",
|
|
8
|
+
"policy_reference": "0e705e25519d3a1bf3aa09fa39498cd6d15bf6dca45d290514f9f6b2a6d321bf",
|
|
105
9
|
"receipts": [
|
|
106
10
|
{
|
|
107
|
-
"receipt_id": "
|
|
108
|
-
"
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
"
|
|
113
|
-
"
|
|
114
|
-
"
|
|
115
|
-
"
|
|
116
|
-
"
|
|
117
|
-
"
|
|
118
|
-
"
|
|
119
|
-
"
|
|
120
|
-
"
|
|
121
|
-
"
|
|
122
|
-
"portal_signature": "TaIz2Tb0TCE34lKD0UKdTqpQzThourYzGZHhpVPajy6C2bBA3oJsbE9BpZhx3utm62O1erKYOlT/WWUAVCGjDg=="
|
|
11
|
+
"receipt_id": "00000000-0000-4000-8000-000000000000",
|
|
12
|
+
"receipt_version": "1.0",
|
|
13
|
+
"algorithm": "Ed25519-SHA256-JCS",
|
|
14
|
+
"timestamp": "2026-06-03T00:00:00.000Z",
|
|
15
|
+
"request_id": "1",
|
|
16
|
+
"method": "tools/call",
|
|
17
|
+
"tool_name": "search_web",
|
|
18
|
+
"decision": "PERMITTED",
|
|
19
|
+
"reason": "tool permitted by allowlist",
|
|
20
|
+
"policy_reference": "0e705e25519d3a1bf3aa09fa39498cd6d15bf6dca45d290514f9f6b2a6d321bf",
|
|
21
|
+
"arguments_hash": "58ca0b73a694d65862346563961f7fcb8ec85cb3e2f5ddc9a26f744de8df1cb4",
|
|
22
|
+
"previous_receipt_hash": "",
|
|
23
|
+
"gateway_id": "aga-demo-001",
|
|
24
|
+
"public_key": "ea4a6c63e29c520abef5507b132ec5f9954776aebebe7b92421eea691446d22c",
|
|
25
|
+
"signature": "273e86ed174ec648d879d26752e93269366acd432657556b81632a9d1829665db49f7b01c8e6ddabbcbdca417ff67703428cac73d08c8ad4fdf732167a5c1805"
|
|
123
26
|
},
|
|
124
27
|
{
|
|
125
|
-
"receipt_id": "
|
|
126
|
-
"
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
"
|
|
131
|
-
"
|
|
132
|
-
"
|
|
133
|
-
"
|
|
134
|
-
"
|
|
135
|
-
"
|
|
136
|
-
"
|
|
137
|
-
"
|
|
138
|
-
"
|
|
139
|
-
"
|
|
140
|
-
"portal_signature": "lAhEHV/upEaWALRHCaqVc+thPmKdHHlGDGiFYvdv1TTtGzZLQ8S5Zjgm3jqGVactI+ntlwIbdNp6qhOY+CFkBA=="
|
|
28
|
+
"receipt_id": "00000000-0000-4000-8000-000000000001",
|
|
29
|
+
"receipt_version": "1.0",
|
|
30
|
+
"algorithm": "Ed25519-SHA256-JCS",
|
|
31
|
+
"timestamp": "2026-06-03T00:00:01.000Z",
|
|
32
|
+
"request_id": "2",
|
|
33
|
+
"method": "tools/call",
|
|
34
|
+
"tool_name": "read_file",
|
|
35
|
+
"decision": "PERMITTED",
|
|
36
|
+
"reason": "tool permitted by allowlist",
|
|
37
|
+
"policy_reference": "0e705e25519d3a1bf3aa09fa39498cd6d15bf6dca45d290514f9f6b2a6d321bf",
|
|
38
|
+
"arguments_hash": "4c1b0a036eba1702197bd43e33f54e63c515654a47e0ecc343ef7be90532cc8b",
|
|
39
|
+
"previous_receipt_hash": "3fffdf530d3c702b177f883c14061a4820bfc43ce65728f5ade6c547b1cb3c29",
|
|
40
|
+
"gateway_id": "aga-demo-001",
|
|
41
|
+
"public_key": "ea4a6c63e29c520abef5507b132ec5f9954776aebebe7b92421eea691446d22c",
|
|
42
|
+
"signature": "bd06955845f5fc4ffb509c8e4050b52df25c18ed20108cc87ea6160b2e807e9394930537c62ec892c270208efd67da689f91198f57758ad86ab2e0a3d7db9802"
|
|
141
43
|
},
|
|
142
44
|
{
|
|
143
|
-
"receipt_id": "
|
|
144
|
-
"
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
"
|
|
149
|
-
"
|
|
150
|
-
"
|
|
151
|
-
"
|
|
152
|
-
"
|
|
153
|
-
"
|
|
154
|
-
"
|
|
155
|
-
"
|
|
156
|
-
"
|
|
157
|
-
"
|
|
158
|
-
"portal_signature": "HGpzkE4CK1QNXngHafIe4sr7ydqs7ZY0ZD7+me8vPw4RxtqBMAWfi200A9dC5OvDcN4zwZcwWF51oqBNk1l2Cw=="
|
|
159
|
-
},
|
|
160
|
-
{
|
|
161
|
-
"receipt_id": "0040e0cc-e560-4014-86d0-1b294f3d4b4c",
|
|
162
|
-
"subject_identifier": {
|
|
163
|
-
"bytes_hash": "d75f39ce7c674f6e63ed0d36113262a5b3411c7974c4962f8a4b545996edd7d3",
|
|
164
|
-
"metadata_hash": "88fa13c6d55d6642c88dc4cc49ed53be26bafd26a3d67fdfd0b70c8ee39dbd63"
|
|
165
|
-
},
|
|
166
|
-
"artifact_reference": "c801497e4020ea3913e94541c2c869fac9422735686a6d3c4b75c4298145b237",
|
|
167
|
-
"current_hash": "950e5c3896a95e42d179500a6b61543f707285b8ee889327eb1be92daeec7f60",
|
|
168
|
-
"sealed_hash": "d75f39ce7c674f6e63ed0d36113262a5b3411c7974c4962f8a4b545996edd7d3||88fa13c6d55d6642c88dc4cc49ed53be26bafd26a3d67fdfd0b70c8ee39dbd63",
|
|
169
|
-
"drift_detected": true,
|
|
170
|
-
"drift_description": "Behavioral drift: forbidden tool sequence (data exfiltration pattern)",
|
|
171
|
-
"enforcement_action": "TERMINATE",
|
|
172
|
-
"measurement_type": "EXECUTABLE_IMAGE",
|
|
173
|
-
"timestamp": "2026-06-02T08:30:36.192Z",
|
|
174
|
-
"sequence_number": 3,
|
|
175
|
-
"previous_leaf_hash": "838f59b7c940b3061018f6c70c13c2e2ef17554659fb48dafd33af267d5d2026",
|
|
176
|
-
"portal_signature": "vMEgOydXm63Hgwm4+A75VKYsJ0BceNfR/juEEXmQh9/KmXpVDlTuXoHi3EHOUOv/t8Qey7rxfuldAq8hp+FkCA=="
|
|
45
|
+
"receipt_id": "00000000-0000-4000-8000-000000000002",
|
|
46
|
+
"receipt_version": "1.0",
|
|
47
|
+
"algorithm": "Ed25519-SHA256-JCS",
|
|
48
|
+
"timestamp": "2026-06-03T00:00:02.000Z",
|
|
49
|
+
"request_id": "3",
|
|
50
|
+
"method": "tools/call",
|
|
51
|
+
"tool_name": "execute_command",
|
|
52
|
+
"decision": "DENIED",
|
|
53
|
+
"reason": "tool explicitly disallowed by policy",
|
|
54
|
+
"policy_reference": "0e705e25519d3a1bf3aa09fa39498cd6d15bf6dca45d290514f9f6b2a6d321bf",
|
|
55
|
+
"arguments_hash": "c11ec0d6ae74adee183197ff8c6905ec89d4c306a04044cfcc8a9e763a1d4a91",
|
|
56
|
+
"previous_receipt_hash": "a5fdaf85e232c7b598a9725913765145be18279a110676278030d0c080896e38",
|
|
57
|
+
"gateway_id": "aga-demo-001",
|
|
58
|
+
"public_key": "ea4a6c63e29c520abef5507b132ec5f9954776aebebe7b92421eea691446d22c",
|
|
59
|
+
"signature": "dbb3070095e3d1428183b6a3a083b58f85274c16e8654834bbff0c20c6e096d6fae4782382a07265a585b0a1f71c45e6877816314df0a2999ef645ae31d60502"
|
|
177
60
|
}
|
|
178
61
|
],
|
|
62
|
+
"merkle_root": "223f04ffb656eb972d66f5c6843005b4d61d3a67aa06fa78ff9d8586df2c8639",
|
|
179
63
|
"merkle_proofs": [
|
|
180
64
|
{
|
|
181
|
-
"
|
|
182
|
-
"
|
|
65
|
+
"leaf_hash": "3fffdf530d3c702b177f883c14061a4820bfc43ce65728f5ade6c547b1cb3c29",
|
|
66
|
+
"leaf_index": 0,
|
|
183
67
|
"siblings": [
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
"position": "right"
|
|
187
|
-
},
|
|
188
|
-
{
|
|
189
|
-
"hash": "db44e24f99b8086c7194eabcd240ef2b38f9d1214d49cc31337c45462a494082",
|
|
190
|
-
"position": "left"
|
|
191
|
-
},
|
|
192
|
-
{
|
|
193
|
-
"hash": "0463d91f9baebddee57414e78c8d22507a9d33a0ce5a7bfa882e2ccb4c98a13c",
|
|
194
|
-
"position": "right"
|
|
195
|
-
},
|
|
196
|
-
{
|
|
197
|
-
"hash": "71b83667104222412e522e83ce89978fbde04d0c02eabf0e1e759aadbde0dac2",
|
|
198
|
-
"position": "right"
|
|
199
|
-
}
|
|
68
|
+
"a5fdaf85e232c7b598a9725913765145be18279a110676278030d0c080896e38",
|
|
69
|
+
"64e41466ac4f38c588ef8e4f1848681863a42472453ac2c4cdb950c11430d606"
|
|
200
70
|
],
|
|
201
|
-
"
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
"leafHash": "893cefa6bddc9c8a40c6655e938f912cec5daef0f6a9074bd4d27ca09ad4af9c",
|
|
205
|
-
"leafIndex": 3,
|
|
206
|
-
"siblings": [
|
|
207
|
-
{
|
|
208
|
-
"hash": "5ed1a416eb4c97b358cfceb1b3a0a662a698f1be2425b0063f546e4a2402f398",
|
|
209
|
-
"position": "left"
|
|
210
|
-
},
|
|
211
|
-
{
|
|
212
|
-
"hash": "db44e24f99b8086c7194eabcd240ef2b38f9d1214d49cc31337c45462a494082",
|
|
213
|
-
"position": "left"
|
|
214
|
-
},
|
|
215
|
-
{
|
|
216
|
-
"hash": "0463d91f9baebddee57414e78c8d22507a9d33a0ce5a7bfa882e2ccb4c98a13c",
|
|
217
|
-
"position": "right"
|
|
218
|
-
},
|
|
219
|
-
{
|
|
220
|
-
"hash": "71b83667104222412e522e83ce89978fbde04d0c02eabf0e1e759aadbde0dac2",
|
|
221
|
-
"position": "right"
|
|
222
|
-
}
|
|
71
|
+
"directions": [
|
|
72
|
+
"right",
|
|
73
|
+
"right"
|
|
223
74
|
],
|
|
224
|
-
"
|
|
75
|
+
"merkle_root": "223f04ffb656eb972d66f5c6843005b4d61d3a67aa06fa78ff9d8586df2c8639"
|
|
225
76
|
},
|
|
226
77
|
{
|
|
227
|
-
"
|
|
228
|
-
"
|
|
78
|
+
"leaf_hash": "a5fdaf85e232c7b598a9725913765145be18279a110676278030d0c080896e38",
|
|
79
|
+
"leaf_index": 1,
|
|
229
80
|
"siblings": [
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
"position": "right"
|
|
237
|
-
},
|
|
238
|
-
{
|
|
239
|
-
"hash": "36a5c22125121fb0f9c7645f06454c48151970c297942e9025d2e8a0d0bc2a2b",
|
|
240
|
-
"position": "left"
|
|
241
|
-
},
|
|
242
|
-
{
|
|
243
|
-
"hash": "71b83667104222412e522e83ce89978fbde04d0c02eabf0e1e759aadbde0dac2",
|
|
244
|
-
"position": "right"
|
|
245
|
-
}
|
|
81
|
+
"3fffdf530d3c702b177f883c14061a4820bfc43ce65728f5ade6c547b1cb3c29",
|
|
82
|
+
"64e41466ac4f38c588ef8e4f1848681863a42472453ac2c4cdb950c11430d606"
|
|
83
|
+
],
|
|
84
|
+
"directions": [
|
|
85
|
+
"left",
|
|
86
|
+
"right"
|
|
246
87
|
],
|
|
247
|
-
"
|
|
88
|
+
"merkle_root": "223f04ffb656eb972d66f5c6843005b4d61d3a67aa06fa78ff9d8586df2c8639"
|
|
248
89
|
},
|
|
249
90
|
{
|
|
250
|
-
"
|
|
251
|
-
"
|
|
91
|
+
"leaf_hash": "64e41466ac4f38c588ef8e4f1848681863a42472453ac2c4cdb950c11430d606",
|
|
92
|
+
"leaf_index": 2,
|
|
252
93
|
"siblings": [
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
{
|
|
258
|
-
"hash": "69479007abe86c6e09f6453dfa2762996a3cdc10b9df03e31b477958898877c8",
|
|
259
|
-
"position": "right"
|
|
260
|
-
},
|
|
261
|
-
{
|
|
262
|
-
"hash": "1b19cbeb9a5ecdb1c209447c9292a00d8699a18211fa3a97d0dc9776f9c64575",
|
|
263
|
-
"position": "right"
|
|
264
|
-
},
|
|
265
|
-
{
|
|
266
|
-
"hash": "e9599515a3379cc1ae106b51c80424db87db3c8ee57855f282843afdc12eda40",
|
|
267
|
-
"position": "left"
|
|
268
|
-
}
|
|
94
|
+
"d7cb3da29b56ae335f8609bb9cb09a69442265ee1ff33840f151b709ad5f5ad5"
|
|
95
|
+
],
|
|
96
|
+
"directions": [
|
|
97
|
+
"left"
|
|
269
98
|
],
|
|
270
|
-
"
|
|
99
|
+
"merkle_root": "223f04ffb656eb972d66f5c6843005b4d61d3a67aa06fa78ff9d8586df2c8639"
|
|
271
100
|
}
|
|
272
101
|
],
|
|
273
|
-
"
|
|
274
|
-
"
|
|
275
|
-
"
|
|
276
|
-
"
|
|
277
|
-
"
|
|
278
|
-
"
|
|
279
|
-
"
|
|
102
|
+
"checkpoint": {
|
|
103
|
+
"algorithm": "Ed25519-SHA256-JCS",
|
|
104
|
+
"gateway_id": "aga-demo-001",
|
|
105
|
+
"generated_at": "2026-06-03T00:00:00.000Z",
|
|
106
|
+
"head_leaf_hash": "64e41466ac4f38c588ef8e4f1848681863a42472453ac2c4cdb950c11430d606",
|
|
107
|
+
"leaf_count": 3,
|
|
108
|
+
"merkle_root": "223f04ffb656eb972d66f5c6843005b4d61d3a67aa06fa78ff9d8586df2c8639",
|
|
109
|
+
"signature": "01aa24ce48683393bbf517826773494c03f2e3ea96230e5f628de49f94319587e9a0dfe6be34b8693c0f45db23e34de0d8ef8be13f8b42e12fb6883337233907"
|
|
280
110
|
},
|
|
281
|
-
"
|
|
282
|
-
"verification_tier": "GOLD",
|
|
283
|
-
"bundle_signature": "O6erEOh0UwH9vIEpkrdRKJl3wYb6d8RlS30I4jXeV+aKQOFSaOHuc4JF1KM73pLcGpqEv5c3slDxEs4loinMCg=="
|
|
111
|
+
"offline_capable": true
|
|
284
112
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@attested-intelligence/aga-verify",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "Standalone,
|
|
3
|
+
"version": "2.0.0",
|
|
4
|
+
"description": "Standalone, dependency-free verifier for canonical AGA SEP Evidence Bundles (Ed25519 + SHA-256 via Node's built-in crypto; zero AGA imports, zero third-party deps).",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"author": "Attested Intelligence Holdings LLC",
|
|
@@ -33,10 +33,7 @@
|
|
|
33
33
|
"test": "vitest run",
|
|
34
34
|
"prepublishOnly": "node build.mjs && vitest run"
|
|
35
35
|
},
|
|
36
|
-
"dependencies": {
|
|
37
|
-
"@noble/ed25519": "^2.1.0",
|
|
38
|
-
"@noble/hashes": "^1.7.0"
|
|
39
|
-
},
|
|
36
|
+
"dependencies": {},
|
|
40
37
|
"devDependencies": {
|
|
41
38
|
"esbuild": "^0.27.4",
|
|
42
39
|
"tsx": "^4.19.0",
|