|
| 1 | +{ |
| 2 | + "$schema": "https://json-schema.org/draft/2020-12/schema", |
| 3 | + "$id": "urn:srcos:agent-machine:schema:storage-receipt:v0.1.0", |
| 4 | + "title": "StorageReceipt", |
| 5 | + "description": "Secret-free evidence for Agent Machine storage/cache/evidence volumes across local filesystem, local LVM, TopoLVM, tmpfs, object-store, and remote-volume backends.", |
| 6 | + "type": "object", |
| 7 | + "additionalProperties": false, |
| 8 | + "required": [ |
| 9 | + "specVersion", |
| 10 | + "id", |
| 11 | + "kind", |
| 12 | + "agentMachineId", |
| 13 | + "backend", |
| 14 | + "volumeClass", |
| 15 | + "tier", |
| 16 | + "reference", |
| 17 | + "filesystem", |
| 18 | + "capacity", |
| 19 | + "encryption", |
| 20 | + "quota", |
| 21 | + "policy", |
| 22 | + "sensitivity", |
| 23 | + "lifecycle", |
| 24 | + "runtime", |
| 25 | + "receiptSafety", |
| 26 | + "observedAt" |
| 27 | + ], |
| 28 | + "properties": { |
| 29 | + "specVersion": { "type": "string", "const": "0.1.0" }, |
| 30 | + "id": { |
| 31 | + "type": "string", |
| 32 | + "pattern": "^urn:srcos:agent-machine:storage-receipt:[a-z0-9][a-z0-9-]*$" |
| 33 | + }, |
| 34 | + "kind": { "type": "string", "const": "StorageReceipt" }, |
| 35 | + "agentMachineId": { |
| 36 | + "type": "string", |
| 37 | + "pattern": "^urn:srcos:agent-machine:[a-z0-9][a-z0-9-]*$" |
| 38 | + }, |
| 39 | + "agentPodId": { |
| 40 | + "type": "string", |
| 41 | + "pattern": "^urn:srcos:agent-machine:agent-pod:[a-z0-9][a-z0-9-]*$" |
| 42 | + }, |
| 43 | + "backend": { |
| 44 | + "type": "string", |
| 45 | + "enum": ["filesystem", "local-lvm", "topolvm-k8s", "tmpfs", "object-store", "remote-volume"] |
| 46 | + }, |
| 47 | + "volumeClass": { |
| 48 | + "type": "string", |
| 49 | + "enum": [ |
| 50 | + "agent-models", |
| 51 | + "agent-cache-hot", |
| 52 | + "agent-cache-warm", |
| 53 | + "agent-cache-cold", |
| 54 | + "agent-scratch", |
| 55 | + "agent-evidence", |
| 56 | + "agent-artifacts" |
| 57 | + ] |
| 58 | + }, |
| 59 | + "tier": { |
| 60 | + "type": "string", |
| 61 | + "enum": ["hot", "warm", "cold", "scratch", "evidence", "artifact", "model"] |
| 62 | + }, |
| 63 | + "purpose": { |
| 64 | + "type": "array", |
| 65 | + "items": { |
| 66 | + "type": "string", |
| 67 | + "enum": [ |
| 68 | + "model-artifacts", |
| 69 | + "tokenizer-assets", |
| 70 | + "kv-cache", |
| 71 | + "prompt-prefix-cache", |
| 72 | + "embedding-index", |
| 73 | + "reranker-state", |
| 74 | + "retrieval-pack", |
| 75 | + "scratch-workspace", |
| 76 | + "execution-evidence", |
| 77 | + "user-artifact" |
| 78 | + ] |
| 79 | + }, |
| 80 | + "uniqueItems": true |
| 81 | + }, |
| 82 | + "reference": { |
| 83 | + "type": "object", |
| 84 | + "additionalProperties": false, |
| 85 | + "required": ["referenceType"], |
| 86 | + "properties": { |
| 87 | + "referenceType": { |
| 88 | + "type": "string", |
| 89 | + "enum": ["host-path", "lvm-logical-volume", "topolvm-pvc", "tmpfs-mount", "object-uri", "remote-volume"] |
| 90 | + }, |
| 91 | + "hostPath": { "type": "string" }, |
| 92 | + "containerPath": { "type": "string" }, |
| 93 | + "mountPath": { "type": "string" }, |
| 94 | + "volumeGroup": { "type": "string" }, |
| 95 | + "logicalVolume": { "type": "string" }, |
| 96 | + "thinPool": { "type": "string" }, |
| 97 | + "pvcName": { "type": "string" }, |
| 98 | + "storageClassName": { "type": "string" }, |
| 99 | + "namespace": { "type": "string" }, |
| 100 | + "objectUriDigest": { |
| 101 | + "type": "string", |
| 102 | + "pattern": "^sha256:[a-f0-9]{64}$", |
| 103 | + "description": "Digest of an object URI/reference when the raw URI should not be exposed." |
| 104 | + } |
| 105 | + } |
| 106 | + }, |
| 107 | + "filesystem": { |
| 108 | + "type": "object", |
| 109 | + "additionalProperties": false, |
| 110 | + "required": ["type", "mountOptions"], |
| 111 | + "properties": { |
| 112 | + "type": { "type": "string" }, |
| 113 | + "mountOptions": { |
| 114 | + "type": "array", |
| 115 | + "items": { "type": "string" }, |
| 116 | + "uniqueItems": true |
| 117 | + }, |
| 118 | + "uid": { "type": ["integer", "null"], "minimum": 0 }, |
| 119 | + "gid": { "type": ["integer", "null"], "minimum": 0 }, |
| 120 | + "mode": { "type": ["string", "null"], "pattern": "^[0-7]{3,4}$" }, |
| 121 | + "selinuxLabel": { "type": ["string", "null"] }, |
| 122 | + "worldWritable": { "type": "boolean" }, |
| 123 | + "symlinkTraversalObserved": { "type": "boolean" } |
| 124 | + } |
| 125 | + }, |
| 126 | + "capacity": { |
| 127 | + "type": "object", |
| 128 | + "additionalProperties": false, |
| 129 | + "required": ["sizeBytes", "freeBytes"], |
| 130 | + "properties": { |
| 131 | + "sizeBytes": { "type": ["integer", "null"], "minimum": 0 }, |
| 132 | + "freeBytes": { "type": ["integer", "null"], "minimum": 0 }, |
| 133 | + "usedBytes": { "type": ["integer", "null"], "minimum": 0 }, |
| 134 | + "reservedBytes": { "type": ["integer", "null"], "minimum": 0 }, |
| 135 | + "inodeCapacity": { "type": ["integer", "null"], "minimum": 0 }, |
| 136 | + "inodeFree": { "type": ["integer", "null"], "minimum": 0 } |
| 137 | + } |
| 138 | + }, |
| 139 | + "encryption": { |
| 140 | + "type": "object", |
| 141 | + "additionalProperties": false, |
| 142 | + "required": ["required", "observed", "mode"], |
| 143 | + "properties": { |
| 144 | + "required": { "type": "boolean" }, |
| 145 | + "observed": { "type": "boolean" }, |
| 146 | + "mode": { "type": "string", "enum": ["none", "fscrypt", "luks", "dm-crypt", "hardware", "unknown"] }, |
| 147 | + "keyScope": { "type": ["string", "null"], "enum": ["machine", "user", "agent", "policy-domain", "unknown", null] }, |
| 148 | + "keyIdDigest": { "type": ["string", "null"], "pattern": "^sha256:[a-f0-9]{64}$" } |
| 149 | + } |
| 150 | + }, |
| 151 | + "quota": { |
| 152 | + "type": "object", |
| 153 | + "additionalProperties": false, |
| 154 | + "required": ["required", "observed"], |
| 155 | + "properties": { |
| 156 | + "required": { "type": "boolean" }, |
| 157 | + "observed": { "type": "boolean" }, |
| 158 | + "sizeBytes": { "type": ["integer", "null"], "minimum": 0 }, |
| 159 | + "maxInodes": { "type": ["integer", "null"], "minimum": 0 }, |
| 160 | + "policyRef": { "type": ["string", "null"] } |
| 161 | + } |
| 162 | + }, |
| 163 | + "policy": { |
| 164 | + "type": "object", |
| 165 | + "additionalProperties": false, |
| 166 | + "required": ["policyDomain", "cacheReuseRequiresPolicy", "wipeReceiptRequired"], |
| 167 | + "properties": { |
| 168 | + "policyDomain": { "type": "string" }, |
| 169 | + "cacheReuseRequiresPolicy": { "type": "boolean" }, |
| 170 | + "policyDecisionRef": { "type": ["string", "null"] }, |
| 171 | + "agentRegistryGrantRef": { "type": ["string", "null"] }, |
| 172 | + "wipeReceiptRequired": { "type": "boolean" } |
| 173 | + } |
| 174 | + }, |
| 175 | + "sensitivity": { |
| 176 | + "type": "object", |
| 177 | + "additionalProperties": false, |
| 178 | + "required": ["class", "promptLikeContentPossible", "secretLikeContentPossible"], |
| 179 | + "properties": { |
| 180 | + "class": { "type": "string", "enum": ["public", "internal", "sensitive", "secret", "mixed"] }, |
| 181 | + "promptLikeContentPossible": { "type": "boolean" }, |
| 182 | + "secretLikeContentPossible": { "type": "boolean" }, |
| 183 | + "classificationRef": { "type": ["string", "null"] } |
| 184 | + } |
| 185 | + }, |
| 186 | + "snapshot": { |
| 187 | + "type": "object", |
| 188 | + "additionalProperties": false, |
| 189 | + "properties": { |
| 190 | + "snapshotAllowed": { "type": "boolean" }, |
| 191 | + "snapshotObserved": { "type": "boolean" }, |
| 192 | + "snapshotId": { "type": ["string", "null"] }, |
| 193 | + "parentSnapshotId": { "type": ["string", "null"] }, |
| 194 | + "lineageDigest": { "type": ["string", "null"], "pattern": "^sha256:[a-f0-9]{64}$" } |
| 195 | + } |
| 196 | + }, |
| 197 | + "lifecycle": { |
| 198 | + "type": "object", |
| 199 | + "additionalProperties": false, |
| 200 | + "required": ["durability", "ttlSeconds", "evictionPolicy", "wipeStatus"], |
| 201 | + "properties": { |
| 202 | + "durability": { "type": "string", "enum": ["ephemeral", "semi-durable", "durable"] }, |
| 203 | + "ttlSeconds": { "type": ["integer", "null"], "minimum": 0 }, |
| 204 | + "evictionPolicy": { "type": "string", "enum": ["manual", "lru", "ttl", "quota", "policy", "none"] }, |
| 205 | + "wipeStatus": { "type": "string", "enum": ["not-requested", "pending", "completed", "failed", "not-applicable"] }, |
| 206 | + "lastWipeReceiptRef": { "type": ["string", "null"] } |
| 207 | + } |
| 208 | + }, |
| 209 | + "runtime": { |
| 210 | + "type": "object", |
| 211 | + "additionalProperties": false, |
| 212 | + "required": ["probeVersion", "runtimeVersion"], |
| 213 | + "properties": { |
| 214 | + "probeVersion": { "type": "string" }, |
| 215 | + "runtimeVersion": { "type": "string" }, |
| 216 | + "providerId": { "type": ["string", "null"] }, |
| 217 | + "modelDigest": { "type": ["string", "null"], "pattern": "^sha256:[a-f0-9]{64}$" }, |
| 218 | + "tokenizerDigest": { "type": ["string", "null"], "pattern": "^sha256:[a-f0-9]{64}$" } |
| 219 | + } |
| 220 | + }, |
| 221 | + "receiptSafety": { |
| 222 | + "type": "object", |
| 223 | + "additionalProperties": false, |
| 224 | + "required": ["includeRawContent", "rawPromptContentIncluded", "rawKvCacheContentIncluded", "secretValuesIncluded"], |
| 225 | + "properties": { |
| 226 | + "includeRawContent": { "type": "boolean", "const": false }, |
| 227 | + "rawPromptContentIncluded": { "type": "boolean", "const": false }, |
| 228 | + "rawKvCacheContentIncluded": { "type": "boolean", "const": false }, |
| 229 | + "secretValuesIncluded": { "type": "boolean", "const": false } |
| 230 | + } |
| 231 | + }, |
| 232 | + "observedAt": { "type": "string" }, |
| 233 | + "labels": { "type": "object", "additionalProperties": { "type": "string" } } |
| 234 | + } |
| 235 | +} |
0 commit comments