@cygnuxlabs/tracekit 1.7.3 → 1.8.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 +4 -0
- package/dist/v2/client.d.ts +15 -0
- package/dist/v2/client.js +49 -2
- package/dist/v2/rpc_schema.d.ts +1 -1
- package/dist/v2/rpc_schema.js +7 -5
- package/dist/verify/detect.d.ts +2 -0
- package/dist/verify/detect.js +1 -1
- package/dist/verify/explain.js +27 -0
- package/dist/verify/index.d.ts +12 -2
- package/dist/verify/index.js +293 -24
- package/dist/verify/labels.d.ts +46 -0
- package/dist/verify/labels.js +238 -0
- package/dist/verify/rx.d.ts +31 -0
- package/dist/verify/rx.js +355 -0
- package/dist/verify/tracekit.event.v2.json +691 -1
- package/dist/verify/versions.json +2 -1
- package/dist/verify.html +927 -30
- package/package.json +5 -5
|
@@ -144,7 +144,13 @@
|
|
|
144
144
|
"identity.suspension",
|
|
145
145
|
"effect.observed",
|
|
146
146
|
"constraint.added",
|
|
147
|
-
"
|
|
147
|
+
"run.label",
|
|
148
|
+
"playbook.entry",
|
|
149
|
+
"precedent.revoked",
|
|
150
|
+
"approver.enabled",
|
|
151
|
+
"approver.switched",
|
|
152
|
+
"ext",
|
|
153
|
+
"run.writer"
|
|
148
154
|
]
|
|
149
155
|
},
|
|
150
156
|
"data": {
|
|
@@ -1199,6 +1205,86 @@
|
|
|
1199
1205
|
}
|
|
1200
1206
|
}
|
|
1201
1207
|
},
|
|
1208
|
+
{
|
|
1209
|
+
"if": {
|
|
1210
|
+
"properties": {
|
|
1211
|
+
"type": {
|
|
1212
|
+
"const": "run.label"
|
|
1213
|
+
}
|
|
1214
|
+
}
|
|
1215
|
+
},
|
|
1216
|
+
"then": {
|
|
1217
|
+
"properties": {
|
|
1218
|
+
"data": {
|
|
1219
|
+
"$ref": "#/$defs/run_label"
|
|
1220
|
+
}
|
|
1221
|
+
}
|
|
1222
|
+
}
|
|
1223
|
+
},
|
|
1224
|
+
{
|
|
1225
|
+
"if": {
|
|
1226
|
+
"properties": {
|
|
1227
|
+
"type": {
|
|
1228
|
+
"const": "playbook.entry"
|
|
1229
|
+
}
|
|
1230
|
+
}
|
|
1231
|
+
},
|
|
1232
|
+
"then": {
|
|
1233
|
+
"properties": {
|
|
1234
|
+
"data": {
|
|
1235
|
+
"$ref": "#/$defs/playbook_entry"
|
|
1236
|
+
}
|
|
1237
|
+
}
|
|
1238
|
+
}
|
|
1239
|
+
},
|
|
1240
|
+
{
|
|
1241
|
+
"if": {
|
|
1242
|
+
"properties": {
|
|
1243
|
+
"type": {
|
|
1244
|
+
"const": "precedent.revoked"
|
|
1245
|
+
}
|
|
1246
|
+
}
|
|
1247
|
+
},
|
|
1248
|
+
"then": {
|
|
1249
|
+
"properties": {
|
|
1250
|
+
"data": {
|
|
1251
|
+
"$ref": "#/$defs/precedent_revoked"
|
|
1252
|
+
}
|
|
1253
|
+
}
|
|
1254
|
+
}
|
|
1255
|
+
},
|
|
1256
|
+
{
|
|
1257
|
+
"if": {
|
|
1258
|
+
"properties": {
|
|
1259
|
+
"type": {
|
|
1260
|
+
"const": "approver.enabled"
|
|
1261
|
+
}
|
|
1262
|
+
}
|
|
1263
|
+
},
|
|
1264
|
+
"then": {
|
|
1265
|
+
"properties": {
|
|
1266
|
+
"data": {
|
|
1267
|
+
"$ref": "#/$defs/approver_enabled"
|
|
1268
|
+
}
|
|
1269
|
+
}
|
|
1270
|
+
}
|
|
1271
|
+
},
|
|
1272
|
+
{
|
|
1273
|
+
"if": {
|
|
1274
|
+
"properties": {
|
|
1275
|
+
"type": {
|
|
1276
|
+
"const": "approver.switched"
|
|
1277
|
+
}
|
|
1278
|
+
}
|
|
1279
|
+
},
|
|
1280
|
+
"then": {
|
|
1281
|
+
"properties": {
|
|
1282
|
+
"data": {
|
|
1283
|
+
"$ref": "#/$defs/approver_switched"
|
|
1284
|
+
}
|
|
1285
|
+
}
|
|
1286
|
+
}
|
|
1287
|
+
},
|
|
1202
1288
|
{
|
|
1203
1289
|
"if": {
|
|
1204
1290
|
"properties": {
|
|
@@ -1214,6 +1300,22 @@
|
|
|
1214
1300
|
}
|
|
1215
1301
|
}
|
|
1216
1302
|
}
|
|
1303
|
+
},
|
|
1304
|
+
{
|
|
1305
|
+
"if": {
|
|
1306
|
+
"properties": {
|
|
1307
|
+
"type": {
|
|
1308
|
+
"const": "run.writer"
|
|
1309
|
+
}
|
|
1310
|
+
}
|
|
1311
|
+
},
|
|
1312
|
+
"then": {
|
|
1313
|
+
"properties": {
|
|
1314
|
+
"data": {
|
|
1315
|
+
"$ref": "#/$defs/run_writer"
|
|
1316
|
+
}
|
|
1317
|
+
}
|
|
1318
|
+
}
|
|
1217
1319
|
}
|
|
1218
1320
|
],
|
|
1219
1321
|
"$defs": {
|
|
@@ -1777,6 +1879,18 @@
|
|
|
1777
1879
|
"incident_id": {
|
|
1778
1880
|
"$ref": "#/$defs/id",
|
|
1779
1881
|
"description": "format 1.2: the incident whose hold (ask, TK-HOLD) or quarantine (deny, TK-QUARANTINE) decided the call"
|
|
1882
|
+
},
|
|
1883
|
+
"run_labels": {
|
|
1884
|
+
"type": "array",
|
|
1885
|
+
"minItems": 1,
|
|
1886
|
+
"maxItems": 2,
|
|
1887
|
+
"items": {
|
|
1888
|
+
"enum": [
|
|
1889
|
+
"secrets_access",
|
|
1890
|
+
"untrusted_content"
|
|
1891
|
+
]
|
|
1892
|
+
},
|
|
1893
|
+
"description": "format 1.8: the run labels that made a run condition rule (`when`) of rule_ids apply: each one the run carried, or one a rule of this call sets"
|
|
1780
1894
|
}
|
|
1781
1895
|
}
|
|
1782
1896
|
},
|
|
@@ -1984,6 +2098,13 @@
|
|
|
1984
2098
|
"incident_id": {
|
|
1985
2099
|
"$ref": "#/$defs/id",
|
|
1986
2100
|
"description": "format 1.2: the answer to a call held by this incident, by the person `person`"
|
|
2101
|
+
},
|
|
2102
|
+
"relied_on": {
|
|
2103
|
+
"$ref": "#/$defs/approver_answer"
|
|
2104
|
+
},
|
|
2105
|
+
"run_clean": {
|
|
2106
|
+
"type": "boolean",
|
|
2107
|
+
"description": "format 1.8: a person's answer to an approval_agent approval: whether the run still met the AI approver's run bound when they answered and the answering identity never ran an agent session in the tenant (their answer is a precedent only then)"
|
|
1987
2108
|
}
|
|
1988
2109
|
}
|
|
1989
2110
|
},
|
|
@@ -2626,6 +2747,12 @@
|
|
|
2626
2747
|
"$ref": "#/$defs/id",
|
|
2627
2748
|
"description": "a findings run: the run_id of the run of the same tenant it analyses"
|
|
2628
2749
|
},
|
|
2750
|
+
"caller": {
|
|
2751
|
+
"type": "string",
|
|
2752
|
+
"maxLength": 300,
|
|
2753
|
+
"description": "format 1.8: the client a gateway registered the run for (scheme:subject): the run's labels are the client's",
|
|
2754
|
+
"minLength": 1
|
|
2755
|
+
},
|
|
2629
2756
|
"replay_of": {
|
|
2630
2757
|
"$ref": "#/$defs/id",
|
|
2631
2758
|
"description": "a tracekit why replay run: the run_id of the run of the same tenant it replays"
|
|
@@ -3023,6 +3150,9 @@
|
|
|
3023
3150
|
"passkey": {
|
|
3024
3151
|
"const": true,
|
|
3025
3152
|
"description": "the approval needs a passkey (approval: {passkey: required})"
|
|
3153
|
+
},
|
|
3154
|
+
"ai": {
|
|
3155
|
+
"$ref": "#/$defs/approver_request"
|
|
3026
3156
|
}
|
|
3027
3157
|
}
|
|
3028
3158
|
},
|
|
@@ -3190,6 +3320,9 @@
|
|
|
3190
3320
|
}
|
|
3191
3321
|
},
|
|
3192
3322
|
"description": "the approver as the signer's transport established it"
|
|
3323
|
+
},
|
|
3324
|
+
"relied_on": {
|
|
3325
|
+
"$ref": "#/$defs/approver_answer"
|
|
3193
3326
|
}
|
|
3194
3327
|
},
|
|
3195
3328
|
"description": "format 1.2: only people answer this approval from now on: an agent approver handed it over, or the signer did (no agent answered within agent_timeout_s, a budget ran out)"
|
|
@@ -3212,6 +3345,11 @@
|
|
|
3212
3345
|
"reason": {
|
|
3213
3346
|
"type": "string",
|
|
3214
3347
|
"maxLength": 1024
|
|
3348
|
+
},
|
|
3349
|
+
"person": {
|
|
3350
|
+
"type": "string",
|
|
3351
|
+
"maxLength": 256,
|
|
3352
|
+
"description": "format 1.8: the person approvals.persons (or an OIDC claim) names for `by`"
|
|
3215
3353
|
}
|
|
3216
3354
|
},
|
|
3217
3355
|
"description": "format 1.2: a person (or the kill switch, by signer) vetoed an agent's approval before it was consumed"
|
|
@@ -3308,6 +3446,9 @@
|
|
|
3308
3446
|
"reason": {
|
|
3309
3447
|
"type": "string",
|
|
3310
3448
|
"maxLength": 1024
|
|
3449
|
+
},
|
|
3450
|
+
"relied_on": {
|
|
3451
|
+
"$ref": "#/$defs/approver_answer"
|
|
3311
3452
|
}
|
|
3312
3453
|
},
|
|
3313
3454
|
"description": "format 1.2: a shadow-mode agent approver's answer, recorded only: it changes nothing"
|
|
@@ -4830,6 +4971,135 @@
|
|
|
4830
4971
|
}
|
|
4831
4972
|
}
|
|
4832
4973
|
},
|
|
4974
|
+
"run_label": {
|
|
4975
|
+
"description": "format 1.8: a change of the run's labels (docs/policy-v2.md#run-conditions), which run condition rules read. add: by the signer alone, right after the record that set it (source: that record's run_seq): a call that ran and matched a rule whose label it is, a tool whose results the policy's untrusted list names, an input observed as untrusted; or before a decision, a label the run's requester carries from another run of theirs (inherited: that run's run.label add). clear: by a person (run_label_clear), never the run's owner, principal or requester; on a signer with no approvals config (a dev signer), by any identity of the run's tenant, the run's owner too, then self_cleared",
|
|
4976
|
+
"oneOf": [
|
|
4977
|
+
{
|
|
4978
|
+
"type": "object",
|
|
4979
|
+
"additionalProperties": false,
|
|
4980
|
+
"required": [
|
|
4981
|
+
"label",
|
|
4982
|
+
"action",
|
|
4983
|
+
"by",
|
|
4984
|
+
"source"
|
|
4985
|
+
],
|
|
4986
|
+
"properties": {
|
|
4987
|
+
"label": {
|
|
4988
|
+
"enum": [
|
|
4989
|
+
"secrets_access",
|
|
4990
|
+
"untrusted_content"
|
|
4991
|
+
]
|
|
4992
|
+
},
|
|
4993
|
+
"action": {
|
|
4994
|
+
"const": "add"
|
|
4995
|
+
},
|
|
4996
|
+
"by": {
|
|
4997
|
+
"const": "signer"
|
|
4998
|
+
},
|
|
4999
|
+
"source": {
|
|
5000
|
+
"type": "integer",
|
|
5001
|
+
"minimum": 0,
|
|
5002
|
+
"description": "the run_seq of the record that set the label"
|
|
5003
|
+
}
|
|
5004
|
+
}
|
|
5005
|
+
},
|
|
5006
|
+
{
|
|
5007
|
+
"type": "object",
|
|
5008
|
+
"additionalProperties": false,
|
|
5009
|
+
"required": [
|
|
5010
|
+
"label",
|
|
5011
|
+
"action",
|
|
5012
|
+
"by",
|
|
5013
|
+
"inherited"
|
|
5014
|
+
],
|
|
5015
|
+
"properties": {
|
|
5016
|
+
"label": {
|
|
5017
|
+
"enum": [
|
|
5018
|
+
"secrets_access",
|
|
5019
|
+
"untrusted_content"
|
|
5020
|
+
]
|
|
5021
|
+
},
|
|
5022
|
+
"action": {
|
|
5023
|
+
"const": "add"
|
|
5024
|
+
},
|
|
5025
|
+
"by": {
|
|
5026
|
+
"const": "signer"
|
|
5027
|
+
},
|
|
5028
|
+
"inherited": {
|
|
5029
|
+
"type": "object",
|
|
5030
|
+
"additionalProperties": false,
|
|
5031
|
+
"required": [
|
|
5032
|
+
"run_id",
|
|
5033
|
+
"run_seq"
|
|
5034
|
+
],
|
|
5035
|
+
"description": "the run.label add of another run of the requester's that this one inherits",
|
|
5036
|
+
"properties": {
|
|
5037
|
+
"run_id": {
|
|
5038
|
+
"type": "string",
|
|
5039
|
+
"minLength": 1,
|
|
5040
|
+
"maxLength": 200
|
|
5041
|
+
},
|
|
5042
|
+
"run_seq": {
|
|
5043
|
+
"type": "integer",
|
|
5044
|
+
"minimum": 0
|
|
5045
|
+
}
|
|
5046
|
+
}
|
|
5047
|
+
}
|
|
5048
|
+
}
|
|
5049
|
+
},
|
|
5050
|
+
{
|
|
5051
|
+
"type": "object",
|
|
5052
|
+
"additionalProperties": false,
|
|
5053
|
+
"required": [
|
|
5054
|
+
"label",
|
|
5055
|
+
"action",
|
|
5056
|
+
"by",
|
|
5057
|
+
"identity",
|
|
5058
|
+
"person"
|
|
5059
|
+
],
|
|
5060
|
+
"properties": {
|
|
5061
|
+
"label": {
|
|
5062
|
+
"enum": [
|
|
5063
|
+
"secrets_access",
|
|
5064
|
+
"untrusted_content"
|
|
5065
|
+
]
|
|
5066
|
+
},
|
|
5067
|
+
"action": {
|
|
5068
|
+
"const": "clear"
|
|
5069
|
+
},
|
|
5070
|
+
"by": {
|
|
5071
|
+
"const": "person"
|
|
5072
|
+
},
|
|
5073
|
+
"identity": {
|
|
5074
|
+
"type": "string",
|
|
5075
|
+
"maxLength": 256,
|
|
5076
|
+
"description": "the identity that cleared it (scheme:subject)"
|
|
5077
|
+
},
|
|
5078
|
+
"person": {
|
|
5079
|
+
"type": "string",
|
|
5080
|
+
"maxLength": 256
|
|
5081
|
+
},
|
|
5082
|
+
"reason": {
|
|
5083
|
+
"type": "string",
|
|
5084
|
+
"maxLength": 1024
|
|
5085
|
+
},
|
|
5086
|
+
"break_glass": {
|
|
5087
|
+
"const": true
|
|
5088
|
+
},
|
|
5089
|
+
"self_cleared": {
|
|
5090
|
+
"const": true,
|
|
5091
|
+
"description": "a dev signer's (no approvals config): the run's own owner, or any identity of its tenant, cleared it"
|
|
5092
|
+
},
|
|
5093
|
+
"run_id": {
|
|
5094
|
+
"type": "string",
|
|
5095
|
+
"minLength": 1,
|
|
5096
|
+
"maxLength": 200,
|
|
5097
|
+
"description": "a clear of a run that has ended, in its tenant's signer run: that run, whose label it ends for every run that took the label from it"
|
|
5098
|
+
}
|
|
5099
|
+
}
|
|
5100
|
+
}
|
|
5101
|
+
]
|
|
5102
|
+
},
|
|
4833
5103
|
"ext_name": {
|
|
4834
5104
|
"type": "string",
|
|
4835
5105
|
"pattern": "^[a-z][a-z0-9_.-]*$",
|
|
@@ -4847,6 +5117,426 @@
|
|
|
4847
5117
|
}
|
|
4848
5118
|
},
|
|
4849
5119
|
"description": "A non-critical record (format 1.4): its name and any other strict JSON fields, checked as the ext field is."
|
|
5120
|
+
},
|
|
5121
|
+
"approver_key": {
|
|
5122
|
+
"type": "object",
|
|
5123
|
+
"additionalProperties": false,
|
|
5124
|
+
"required": [
|
|
5125
|
+
"rules",
|
|
5126
|
+
"tool",
|
|
5127
|
+
"target",
|
|
5128
|
+
"project"
|
|
5129
|
+
],
|
|
5130
|
+
"description": "format 1.8: an AI approver's precedent key as shown: the rules, the tool, what each rule read of the call (redacted, each value cut to 256 characters, 16 values at most) and the project",
|
|
5131
|
+
"properties": {
|
|
5132
|
+
"rules": {
|
|
5133
|
+
"type": "array",
|
|
5134
|
+
"minItems": 1,
|
|
5135
|
+
"maxItems": 32,
|
|
5136
|
+
"items": {
|
|
5137
|
+
"type": "string",
|
|
5138
|
+
"maxLength": 64
|
|
5139
|
+
}
|
|
5140
|
+
},
|
|
5141
|
+
"tool": {
|
|
5142
|
+
"type": "string",
|
|
5143
|
+
"maxLength": 256
|
|
5144
|
+
},
|
|
5145
|
+
"target": {
|
|
5146
|
+
"type": "object",
|
|
5147
|
+
"propertyNames": {
|
|
5148
|
+
"type": "string",
|
|
5149
|
+
"maxLength": 64
|
|
5150
|
+
},
|
|
5151
|
+
"additionalProperties": {
|
|
5152
|
+
"type": "array",
|
|
5153
|
+
"maxItems": 16,
|
|
5154
|
+
"items": {
|
|
5155
|
+
"type": "string",
|
|
5156
|
+
"maxLength": 256
|
|
5157
|
+
}
|
|
5158
|
+
}
|
|
5159
|
+
},
|
|
5160
|
+
"project": {
|
|
5161
|
+
"type": [
|
|
5162
|
+
"string",
|
|
5163
|
+
"null"
|
|
5164
|
+
],
|
|
5165
|
+
"maxLength": 128
|
|
5166
|
+
}
|
|
5167
|
+
}
|
|
5168
|
+
},
|
|
5169
|
+
"approver_request": {
|
|
5170
|
+
"type": "object",
|
|
5171
|
+
"additionalProperties": false,
|
|
5172
|
+
"required": [
|
|
5173
|
+
"key",
|
|
5174
|
+
"digest",
|
|
5175
|
+
"labels",
|
|
5176
|
+
"clean",
|
|
5177
|
+
"precedents"
|
|
5178
|
+
],
|
|
5179
|
+
"description": "format 1.8: a call held only by the policy's approval_agent rules: its precedent key (the rules, the tool, what each rule read of the call, redacted and cut, and the project the client named), the key's digest over what was read in full (a precedent matches by digest, tenant and requester), the run's labels, whether the run met the run bound (a person's answer counts as a precedent only then) and the precedents that counted",
|
|
5180
|
+
"properties": {
|
|
5181
|
+
"key": {
|
|
5182
|
+
"$ref": "#/$defs/approver_key"
|
|
5183
|
+
},
|
|
5184
|
+
"digest": {
|
|
5185
|
+
"$ref": "#/$defs/commitment",
|
|
5186
|
+
"description": "the precedent key's digest over what each rule read in full, committed under the tenant's own salt: equal keys match, and what redaction or the cut left out can't be confirmed by a guess"
|
|
5187
|
+
},
|
|
5188
|
+
"labels": {
|
|
5189
|
+
"type": "array",
|
|
5190
|
+
"maxItems": 2,
|
|
5191
|
+
"items": {
|
|
5192
|
+
"enum": [
|
|
5193
|
+
"untrusted_content",
|
|
5194
|
+
"secrets_access"
|
|
5195
|
+
]
|
|
5196
|
+
},
|
|
5197
|
+
"description": "the run's labels the signer read for approval_agent's run bound"
|
|
5198
|
+
},
|
|
5199
|
+
"clean": {
|
|
5200
|
+
"type": "boolean"
|
|
5201
|
+
},
|
|
5202
|
+
"precedents": {
|
|
5203
|
+
"type": "object",
|
|
5204
|
+
"additionalProperties": false,
|
|
5205
|
+
"required": [
|
|
5206
|
+
"approve",
|
|
5207
|
+
"reject"
|
|
5208
|
+
],
|
|
5209
|
+
"properties": {
|
|
5210
|
+
"approve": {
|
|
5211
|
+
"type": "array",
|
|
5212
|
+
"maxItems": 8,
|
|
5213
|
+
"items": {
|
|
5214
|
+
"$ref": "#/$defs/id"
|
|
5215
|
+
}
|
|
5216
|
+
},
|
|
5217
|
+
"reject": {
|
|
5218
|
+
"type": "array",
|
|
5219
|
+
"maxItems": 8,
|
|
5220
|
+
"items": {
|
|
5221
|
+
"$ref": "#/$defs/id"
|
|
5222
|
+
}
|
|
5223
|
+
}
|
|
5224
|
+
},
|
|
5225
|
+
"description": "the approval ids of people's answers to calls like this one that counted as precedents then, by decision, newest first"
|
|
5226
|
+
},
|
|
5227
|
+
"asserted": {
|
|
5228
|
+
"type": "array",
|
|
5229
|
+
"maxItems": 1,
|
|
5230
|
+
"items": {
|
|
5231
|
+
"enum": [
|
|
5232
|
+
"project"
|
|
5233
|
+
]
|
|
5234
|
+
},
|
|
5235
|
+
"description": "the parts of the key the agent's own process supplied, not the signer: they only narrow a precedent match"
|
|
5236
|
+
},
|
|
5237
|
+
"wide_digest": {
|
|
5238
|
+
"$ref": "#/$defs/commitment",
|
|
5239
|
+
"description": "the same key's digest in any project, each package source however it is spelled (no default port, no trailing slash), committed as digest is: an accepted lesson that says no binds a call of either"
|
|
5240
|
+
}
|
|
5241
|
+
}
|
|
5242
|
+
},
|
|
5243
|
+
"approver_answer": {
|
|
5244
|
+
"type": "object",
|
|
5245
|
+
"additionalProperties": false,
|
|
5246
|
+
"required": [
|
|
5247
|
+
"precedents",
|
|
5248
|
+
"playbook",
|
|
5249
|
+
"policy_hash",
|
|
5250
|
+
"labels",
|
|
5251
|
+
"mode",
|
|
5252
|
+
"view"
|
|
5253
|
+
],
|
|
5254
|
+
"description": "format 1.8: what an AI answer to an approval_agent approval relied on, as the signer read it when it answered (precedents, the playbook in force, the policy, the run's labels, the view it served the reviewer, whether its answer decided or was a suggestion and why: the circuit breaker), and the reviewer's own word (answers: each model's decision)",
|
|
5255
|
+
"properties": {
|
|
5256
|
+
"precedents": {
|
|
5257
|
+
"type": "object",
|
|
5258
|
+
"additionalProperties": false,
|
|
5259
|
+
"required": [
|
|
5260
|
+
"approve",
|
|
5261
|
+
"reject"
|
|
5262
|
+
],
|
|
5263
|
+
"properties": {
|
|
5264
|
+
"approve": {
|
|
5265
|
+
"type": "array",
|
|
5266
|
+
"maxItems": 8,
|
|
5267
|
+
"items": {
|
|
5268
|
+
"$ref": "#/$defs/id"
|
|
5269
|
+
}
|
|
5270
|
+
},
|
|
5271
|
+
"reject": {
|
|
5272
|
+
"type": "array",
|
|
5273
|
+
"maxItems": 8,
|
|
5274
|
+
"items": {
|
|
5275
|
+
"$ref": "#/$defs/id"
|
|
5276
|
+
}
|
|
5277
|
+
}
|
|
5278
|
+
},
|
|
5279
|
+
"description": "the approval ids of people's answers to calls like this one that counted as precedents then, by decision, newest first"
|
|
5280
|
+
},
|
|
5281
|
+
"playbook": {
|
|
5282
|
+
"type": "object",
|
|
5283
|
+
"additionalProperties": false,
|
|
5284
|
+
"required": [
|
|
5285
|
+
"version",
|
|
5286
|
+
"digest"
|
|
5287
|
+
],
|
|
5288
|
+
"properties": {
|
|
5289
|
+
"version": {
|
|
5290
|
+
"type": "integer",
|
|
5291
|
+
"minimum": 0,
|
|
5292
|
+
"maximum": 9007199254740991
|
|
5293
|
+
},
|
|
5294
|
+
"digest": {
|
|
5295
|
+
"$ref": "#/$defs/hash"
|
|
5296
|
+
}
|
|
5297
|
+
}
|
|
5298
|
+
},
|
|
5299
|
+
"policy_hash": {
|
|
5300
|
+
"$ref": "#/$defs/hash"
|
|
5301
|
+
},
|
|
5302
|
+
"labels": {
|
|
5303
|
+
"type": "array",
|
|
5304
|
+
"maxItems": 2,
|
|
5305
|
+
"items": {
|
|
5306
|
+
"enum": [
|
|
5307
|
+
"untrusted_content",
|
|
5308
|
+
"secrets_access"
|
|
5309
|
+
]
|
|
5310
|
+
},
|
|
5311
|
+
"description": "the run's labels the signer read for approval_agent's run bound"
|
|
5312
|
+
},
|
|
5313
|
+
"mode": {
|
|
5314
|
+
"enum": [
|
|
5315
|
+
"shadow",
|
|
5316
|
+
"enforce"
|
|
5317
|
+
]
|
|
5318
|
+
},
|
|
5319
|
+
"demoted": {
|
|
5320
|
+
"type": "string",
|
|
5321
|
+
"maxLength": 1024
|
|
5322
|
+
},
|
|
5323
|
+
"answers": {
|
|
5324
|
+
"type": "array",
|
|
5325
|
+
"minItems": 1,
|
|
5326
|
+
"maxItems": 2,
|
|
5327
|
+
"items": {
|
|
5328
|
+
"type": "object",
|
|
5329
|
+
"additionalProperties": false,
|
|
5330
|
+
"required": [
|
|
5331
|
+
"model",
|
|
5332
|
+
"decision"
|
|
5333
|
+
],
|
|
5334
|
+
"properties": {
|
|
5335
|
+
"model": {
|
|
5336
|
+
"type": "string",
|
|
5337
|
+
"minLength": 1,
|
|
5338
|
+
"maxLength": 128
|
|
5339
|
+
},
|
|
5340
|
+
"decision": {
|
|
5341
|
+
"enum": [
|
|
5342
|
+
"approve",
|
|
5343
|
+
"reject",
|
|
5344
|
+
"escalate"
|
|
5345
|
+
]
|
|
5346
|
+
},
|
|
5347
|
+
"identity": {
|
|
5348
|
+
"type": "string",
|
|
5349
|
+
"minLength": 1,
|
|
5350
|
+
"maxLength": 256,
|
|
5351
|
+
"description": "the model's identity as its server gave it (an Ollama model's /api/show digest, else the answer's model and system_fingerprint), which the circuit breaker pins: the reviewer's word"
|
|
5352
|
+
}
|
|
5353
|
+
}
|
|
5354
|
+
}
|
|
5355
|
+
},
|
|
5356
|
+
"view": {
|
|
5357
|
+
"$ref": "#/$defs/commitment",
|
|
5358
|
+
"description": "the view the reviewer was served (approval_review's view_digest) and named in its answer, committed under this record's salt"
|
|
5359
|
+
}
|
|
5360
|
+
}
|
|
5361
|
+
},
|
|
5362
|
+
"playbook_entry": {
|
|
5363
|
+
"type": "object",
|
|
5364
|
+
"additionalProperties": false,
|
|
5365
|
+
"required": [
|
|
5366
|
+
"action",
|
|
5367
|
+
"id",
|
|
5368
|
+
"text",
|
|
5369
|
+
"key",
|
|
5370
|
+
"by"
|
|
5371
|
+
],
|
|
5372
|
+
"description": "format 1.8: a person accepted a playbook entry the AI approver proposed (from people's answers, P-, or a lesson drafted from a disagreement with them, L-), retired one, or dropped a proposal (in the tenant's signer run): its id (P- or L- and 32 hex digits of the text's sha256), text and precedent key; a lesson's decision, digest and evidence",
|
|
5373
|
+
"properties": {
|
|
5374
|
+
"action": {
|
|
5375
|
+
"enum": [
|
|
5376
|
+
"accept",
|
|
5377
|
+
"retire",
|
|
5378
|
+
"drop"
|
|
5379
|
+
]
|
|
5380
|
+
},
|
|
5381
|
+
"id": {
|
|
5382
|
+
"type": "string",
|
|
5383
|
+
"pattern": "^[PL]-[0-9a-f]{32}$",
|
|
5384
|
+
"maxLength": 34
|
|
5385
|
+
},
|
|
5386
|
+
"text": {
|
|
5387
|
+
"type": "string",
|
|
5388
|
+
"maxLength": 2048
|
|
5389
|
+
},
|
|
5390
|
+
"key": {
|
|
5391
|
+
"$ref": "#/$defs/approver_key"
|
|
5392
|
+
},
|
|
5393
|
+
"by": {
|
|
5394
|
+
"type": "string",
|
|
5395
|
+
"maxLength": 256
|
|
5396
|
+
},
|
|
5397
|
+
"reason": {
|
|
5398
|
+
"type": "string",
|
|
5399
|
+
"maxLength": 1024
|
|
5400
|
+
},
|
|
5401
|
+
"decision": {
|
|
5402
|
+
"enum": [
|
|
5403
|
+
"approve",
|
|
5404
|
+
"reject"
|
|
5405
|
+
],
|
|
5406
|
+
"description": "the people's answer it holds: a later one the other way flags it"
|
|
5407
|
+
},
|
|
5408
|
+
"digest": {
|
|
5409
|
+
"type": "string",
|
|
5410
|
+
"maxLength": 77,
|
|
5411
|
+
"pattern": "^hmac-sha256:[0-9a-f]{64}$",
|
|
5412
|
+
"description": "the precedent key's digest of the calls it is about"
|
|
5413
|
+
},
|
|
5414
|
+
"wide_digest": {
|
|
5415
|
+
"type": "string",
|
|
5416
|
+
"maxLength": 77,
|
|
5417
|
+
"pattern": "^hmac-sha256:[0-9a-f]{64}$",
|
|
5418
|
+
"description": "its request's wide_digest: an entry that says no binds calls of it too (any project)"
|
|
5419
|
+
},
|
|
5420
|
+
"evidence": {
|
|
5421
|
+
"type": "array",
|
|
5422
|
+
"maxItems": 8,
|
|
5423
|
+
"items": {
|
|
5424
|
+
"type": "string",
|
|
5425
|
+
"maxLength": 128
|
|
5426
|
+
},
|
|
5427
|
+
"description": "the ids of the records it was drafted from: the AI's answer, the person's"
|
|
5428
|
+
}
|
|
5429
|
+
}
|
|
5430
|
+
},
|
|
5431
|
+
"precedent_revoked": {
|
|
5432
|
+
"type": "object",
|
|
5433
|
+
"additionalProperties": false,
|
|
5434
|
+
"required": [
|
|
5435
|
+
"approval_id",
|
|
5436
|
+
"by"
|
|
5437
|
+
],
|
|
5438
|
+
"description": "format 1.8: a person's answer no longer counts as a precedent for the AI approver (a revert, a mistake), by a person (in the tenant's signer run)",
|
|
5439
|
+
"properties": {
|
|
5440
|
+
"approval_id": {
|
|
5441
|
+
"$ref": "#/$defs/id"
|
|
5442
|
+
},
|
|
5443
|
+
"by": {
|
|
5444
|
+
"type": "string",
|
|
5445
|
+
"maxLength": 256
|
|
5446
|
+
},
|
|
5447
|
+
"reason": {
|
|
5448
|
+
"type": "string",
|
|
5449
|
+
"maxLength": 1024
|
|
5450
|
+
}
|
|
5451
|
+
}
|
|
5452
|
+
},
|
|
5453
|
+
"approver_enabled": {
|
|
5454
|
+
"type": "object",
|
|
5455
|
+
"additionalProperties": false,
|
|
5456
|
+
"required": [
|
|
5457
|
+
"rules",
|
|
5458
|
+
"by"
|
|
5459
|
+
],
|
|
5460
|
+
"description": "format 1.8: a person turned rules the AI approver's circuit breaker dropped to shadow back on (in the tenant's signer run)",
|
|
5461
|
+
"properties": {
|
|
5462
|
+
"rules": {
|
|
5463
|
+
"type": "array",
|
|
5464
|
+
"minItems": 1,
|
|
5465
|
+
"maxItems": 32,
|
|
5466
|
+
"items": {
|
|
5467
|
+
"type": "string",
|
|
5468
|
+
"maxLength": 64
|
|
5469
|
+
}
|
|
5470
|
+
},
|
|
5471
|
+
"by": {
|
|
5472
|
+
"type": "string",
|
|
5473
|
+
"maxLength": 256
|
|
5474
|
+
},
|
|
5475
|
+
"reason": {
|
|
5476
|
+
"type": "string",
|
|
5477
|
+
"maxLength": 1024
|
|
5478
|
+
}
|
|
5479
|
+
}
|
|
5480
|
+
},
|
|
5481
|
+
"approver_switched": {
|
|
5482
|
+
"type": "object",
|
|
5483
|
+
"additionalProperties": false,
|
|
5484
|
+
"required": [
|
|
5485
|
+
"on",
|
|
5486
|
+
"by"
|
|
5487
|
+
],
|
|
5488
|
+
"description": "format 1.8: a person switched the AI approver on (for `rules` only, when given) or off (in the tenant's signer run); off revokes its approvals not yet consumed and hands pending ones to people",
|
|
5489
|
+
"properties": {
|
|
5490
|
+
"on": {
|
|
5491
|
+
"type": "boolean"
|
|
5492
|
+
},
|
|
5493
|
+
"rules": {
|
|
5494
|
+
"type": "array",
|
|
5495
|
+
"minItems": 1,
|
|
5496
|
+
"maxItems": 32,
|
|
5497
|
+
"items": {
|
|
5498
|
+
"type": "string",
|
|
5499
|
+
"maxLength": 64
|
|
5500
|
+
}
|
|
5501
|
+
},
|
|
5502
|
+
"by": {
|
|
5503
|
+
"type": "string",
|
|
5504
|
+
"maxLength": 256
|
|
5505
|
+
},
|
|
5506
|
+
"reason": {
|
|
5507
|
+
"type": "string",
|
|
5508
|
+
"maxLength": 1024
|
|
5509
|
+
},
|
|
5510
|
+
"person": {
|
|
5511
|
+
"type": "string",
|
|
5512
|
+
"maxLength": 256,
|
|
5513
|
+
"description": "format 1.8: the person approvals.persons (or an OIDC claim) names for `by`"
|
|
5514
|
+
}
|
|
5515
|
+
}
|
|
5516
|
+
},
|
|
5517
|
+
"run_writer": {
|
|
5518
|
+
"description": "format 1.8: an identity other than the run's owner writes a stream of the run for the first time (one it was delegated to, or a gateway's caller), by the signer before that write's records: the run's labels are its too (docs/policy-v2.md#run-conditions), and a signer restarted from its records knows it",
|
|
5519
|
+
"type": "object",
|
|
5520
|
+
"additionalProperties": false,
|
|
5521
|
+
"required": [
|
|
5522
|
+
"identity",
|
|
5523
|
+
"stream"
|
|
5524
|
+
],
|
|
5525
|
+
"properties": {
|
|
5526
|
+
"identity": {
|
|
5527
|
+
"type": "string",
|
|
5528
|
+
"minLength": 1,
|
|
5529
|
+
"maxLength": 300,
|
|
5530
|
+
"description": "the writer, scheme:subject, as the transport established it"
|
|
5531
|
+
},
|
|
5532
|
+
"stream": {
|
|
5533
|
+
"$ref": "#/$defs/id"
|
|
5534
|
+
},
|
|
5535
|
+
"gateway": {
|
|
5536
|
+
"const": true,
|
|
5537
|
+
"description": "it wrote through a gateway (a request's caller)"
|
|
5538
|
+
}
|
|
5539
|
+
}
|
|
4850
5540
|
}
|
|
4851
5541
|
}
|
|
4852
5542
|
}
|