dev.cocore.compute.provider

cocore.dev

Schema Diff

+57 -0

From

CID
bafyreidhoa6o2qf...
Indexed At
2026-06-17 21:16 UTC
View this version

To

CID
bafyreia2nwvw7v4...
Indexed At
2026-06-25 16:58 UTC
View this version

Compatibility Analysis

Breaking Changes Detected

1 breaking change, 22 non-breaking changes.

Breaking Changes (1)
  • RequiredEdgeAdded RequiredEdgeAdded { vertex_id: "dev.cocore.compute.provider#proBonoPolicy", src: "dev.cocore.compute.provider#proBonoPolicy", tgt: "dev.cocore.compute.provider#proBonoPolicy.mode", kind: "prop", name: Some("mode") }
Non-Breaking Changes (22)
  • AddedVertex AddedVertex { vertex_id: "dev.cocore.compute.defs#tier" }
  • AddedVertex AddedVertex { vertex_id: "dev.cocore.compute.provider#proBonoPolicy" }
  • AddedVertex AddedVertex { vertex_id: "dev.cocore.compute.provider#proBonoPolicy.dids" }
  • AddedVertex AddedVertex { vertex_id: "dev.cocore.compute.provider#proBonoPolicy.dids:items" }
  • AddedVertex AddedVertex { vertex_id: "dev.cocore.compute.provider#proBonoPolicy.mode" }
  • AddedVertex AddedVertex { vertex_id: "dev.cocore.compute.provider:body.desiredTier" }
  • AddedVertex AddedVertex { vertex_id: "dev.cocore.compute.provider:body.proBono" }
  • AddedVertex AddedVertex { vertex_id: "dev.cocore.compute.provider:body.region" }
  • AddedVertex AddedVertex { vertex_id: "dev.cocore.compute.provider:body.regionObservedAt" }
  • AddedVertex AddedVertex { vertex_id: "dev.cocore.compute.provider:body.regionSource" }
  • AddedVertex AddedVertex { vertex_id: "dev.cocore.compute.provider:body.tier" }
  • AddedEdge AddedEdge { src: "dev.cocore.compute.provider#proBonoPolicy", tgt: "dev.cocore.compute.provider#proBonoPolicy.dids", kind: "prop", name: Some("dids") }
  • AddedEdge AddedEdge { src: "dev.cocore.compute.provider#proBonoPolicy.dids", tgt: "dev.cocore.compute.provider#proBonoPolicy.dids:items", kind: "items", name: None }
  • AddedEdge AddedEdge { src: "dev.cocore.compute.provider:body", tgt: "dev.cocore.compute.provider:body.desiredTier", kind: "prop", name: Some("desiredTier") }
  • AddedEdge AddedEdge { src: "dev.cocore.compute.provider:body", tgt: "dev.cocore.compute.provider:body.proBono", kind: "prop", name: Some("proBono") }
  • AddedEdge AddedEdge { src: "dev.cocore.compute.provider:body", tgt: "dev.cocore.compute.provider:body.region", kind: "prop", name: Some("region") }
  • AddedEdge AddedEdge { src: "dev.cocore.compute.provider:body", tgt: "dev.cocore.compute.provider:body.regionObservedAt", kind: "prop", name: Some("regionObservedAt") }
  • AddedEdge AddedEdge { src: "dev.cocore.compute.provider:body", tgt: "dev.cocore.compute.provider:body.regionSource", kind: "prop", name: Some("regionSource") }
  • AddedEdge AddedEdge { src: "dev.cocore.compute.provider:body", tgt: "dev.cocore.compute.provider:body.tier", kind: "prop", name: Some("tier") }
  • AddedEdge AddedEdge { src: "dev.cocore.compute.provider:body.desiredTier", tgt: "dev.cocore.compute.defs#tier", kind: "ref", name: None }
  • AddedEdge AddedEdge { src: "dev.cocore.compute.provider:body.proBono", tgt: "dev.cocore.compute.provider#proBonoPolicy", kind: "ref", name: None }
  • AddedEdge AddedEdge { src: "dev.cocore.compute.provider:body.tier", tgt: "dev.cocore.compute.defs#tier", kind: "ref", name: None }

Migration Guidance

Added Elements

  • AddedVertex { vertex_id: "dev.cocore.compute.defs#tier" }
  • AddedVertex { vertex_id: "dev.cocore.compute.provider#proBonoPolicy" }
  • AddedVertex { vertex_id: "dev.cocore.compute.provider#proBonoPolicy.dids" }
  • AddedVertex { vertex_id: "dev.cocore.compute.provider#proBonoPolicy.dids:items" }
  • AddedVertex { vertex_id: "dev.cocore.compute.provider#proBonoPolicy.mode" }
  • AddedVertex { vertex_id: "dev.cocore.compute.provider:body.desiredTier" }
  • AddedVertex { vertex_id: "dev.cocore.compute.provider:body.proBono" }
  • AddedVertex { vertex_id: "dev.cocore.compute.provider:body.region" }
  • AddedVertex { vertex_id: "dev.cocore.compute.provider:body.regionObservedAt" }
  • AddedVertex { vertex_id: "dev.cocore.compute.provider:body.regionSource" }
  • AddedVertex { vertex_id: "dev.cocore.compute.provider:body.tier" }

Additional Notes

  • Breaking: RequiredEdgeAdded { vertex_id: "dev.cocore.compute.provider#proBonoPolicy", src: "dev.cocore.compute.provider#proBonoPolicy", tgt: "dev.cocore.compute.provider#proBonoPolicy.mode", kind: "prop", name: Some("mode") }
  • Non-breaking: AddedEdge { src: "dev.cocore.compute.provider#proBonoPolicy", tgt: "dev.cocore.compute.provider#proBonoPolicy.dids", kind: "prop", name: Some("dids") }
  • Non-breaking: AddedEdge { src: "dev.cocore.compute.provider#proBonoPolicy.dids", tgt: "dev.cocore.compute.provider#proBonoPolicy.dids:items", kind: "items", name: None }
  • Non-breaking: AddedEdge { src: "dev.cocore.compute.provider:body", tgt: "dev.cocore.compute.provider:body.desiredTier", kind: "prop", name: Some("desiredTier") }
  • Non-breaking: AddedEdge { src: "dev.cocore.compute.provider:body", tgt: "dev.cocore.compute.provider:body.proBono", kind: "prop", name: Some("proBono") }
  • Non-breaking: AddedEdge { src: "dev.cocore.compute.provider:body", tgt: "dev.cocore.compute.provider:body.region", kind: "prop", name: Some("region") }
  • Non-breaking: AddedEdge { src: "dev.cocore.compute.provider:body", tgt: "dev.cocore.compute.provider:body.regionObservedAt", kind: "prop", name: Some("regionObservedAt") }
  • Non-breaking: AddedEdge { src: "dev.cocore.compute.provider:body", tgt: "dev.cocore.compute.provider:body.regionSource", kind: "prop", name: Some("regionSource") }
  • Non-breaking: AddedEdge { src: "dev.cocore.compute.provider:body", tgt: "dev.cocore.compute.provider:body.tier", kind: "prop", name: Some("tier") }
  • Non-breaking: AddedEdge { src: "dev.cocore.compute.provider:body.desiredTier", tgt: "dev.cocore.compute.defs#tier", kind: "ref", name: None }
  • Non-breaking: AddedEdge { src: "dev.cocore.compute.provider:body.proBono", tgt: "dev.cocore.compute.provider#proBonoPolicy", kind: "ref", name: None }
  • Non-breaking: AddedEdge { src: "dev.cocore.compute.provider:body.tier", tgt: "dev.cocore.compute.defs#tier", kind: "ref", name: None }
1 1
{
2 2
  "$type": "com.atproto.lexicon.schema",
3 3
  "defs": {
4 4
    "main": {
5 5
      "key": "tid",
6 6
      "record": {
7 7
        "properties": {
8 8
          "acceptedExchanges": {
9 9
            "description": "Exchange DIDs this provider will accept settlement from. Empty/absent means any exchange is acceptable.",
10 10
            "items": {
11 11
              "format": "did",
12 12
              "type": "string"
13 13
            },
14 14
            "maxLength": 64,
15 15
            "type": "array"
16 16
          },
17 17
          "active": {
18 18
            "default": true,
19 19
            "description": "Soft delete: false means the machine is retired and should not be matched.",
20 20
            "type": "boolean"
21 21
          },
22 22
          "attestationPubKey": {
23 23
            "description": "P-256 public key (base64) bound to this machine's Secure Enclave. Used to verify attestation and receipt signatures. Doubles as the stable per-machine fingerprint: the SE keypair is generated once at first agent boot and survives reboots / re-pairs / OS updates, so two records with the same `attestationPubKey` describe the same physical machine. Agents reuse the rkey of any existing record with this same key (and delete duplicates) instead of creating a fresh provider record per `serve` invocation, so the on-PDS view stays one record per machine.",
24 24
            "maxLength": 256,
25 25
            "type": "string"
26 26
          },
27 27
          "binaryVersion": {
28 28
            "description": "Version string of the agent binary that wrote this record (e.g. `0.3.4`). Stamped on every `cocore agent serve` startup, so the record reflects the freshest deploy. Operators / dashboards use this to spot machines that haven't been updated to a release with a known fix. Optional / additive — pre-2026-05 records won't carry it.",
29 29
            "maxLength": 64,
30 30
            "type": "string"
31 31
          },
32 32
          "chip": {
33 33
            "description": "Hardware identifier, e.g. 'Apple M3 Max'.",
34 34
            "maxLength": 64,
35 35
            "type": "string"
36 36
          },
37 37
          "contactEndpoint": {
38 38
            "description": "URL of the advisor / matchmaking service this provider currently uses. Federable; may change without invalidating prior receipts.",
39 39
            "format": "uri",
40 40
            "type": "string"
41 41
          },
42 42
          "cpuCores": {
43 43
            "description": "Total CPU core count (logical = physical for Apple Silicon).",
44 44
            "minimum": 1,
45 45
            "type": "integer"
46 46
          },
47 47
          "createdAt": {
48 48
            "format": "datetime",
49 49
            "type": "string"
50 50
          },
51 51
          "desiredModels": {
52 52
            "description": "Model identifiers the OWNER wants this machine to load, set from a management UI (e.g. the console's per-machine model picker). The agent reconciles toward it: on serve start it loads this set instead of its local default, and while running it restarts to reload when this set changes. Distinct from `supportedModels`, which is what actually loaded (a model that won't fit RAM stays in `desiredModels` but never appears in `supportedModels`). Owner-written, agent-preserved; absent means the agent uses its local config. Additive / optional — pre-2026-06 agents ignore it.",
53 53
            "items": {
54 54
              "maxLength": 256,
55 55
              "type": "string"
56 56
            },
57 57
            "maxLength": 256,
58 58
            "type": "array"
59 59
          },
60 +
          "desiredTier": {
61 +
            "description": "The confidentiality tier the OWNER has opted this machine into, set from a management UI (the console / tray 'Upgrade security' action). Mirrors `desiredModels`: owner-written INTENT, the agent reconciles toward it (e.g. switches to the measured native engine and earns the hardware-attested posture). Setting `attested-confidential` NEVER fakes the achieved state — the agent only publishes the higher `tier`/`trustLevel` once it actually earns them, and a machine that can't (e.g. not a native build) stays best-effort with a surfaced reason. Absent / `best-effort` means the owner has not opted into confidential and the machine serves exactly as before — opting in is the only thing that changes anything. Owner-written, agent-preserved. Optional / additive; pre-0.9.19 agents ignore it.",
62 +
            "ref": "dev.cocore.compute.defs#tier",
63 +
            "type": "ref"
64 +
          },
60 65
          "eCores": {
61 66
            "description": "Apple Silicon efficiency-core count, when applicable.",
62 67
            "minimum": 0,
63 68
            "type": "integer"
64 69
          },
65 70
          "encryptionPubKey": {
66 71
            "description": "X25519 public key (base64) used to wrap requests to this provider.",
67 72
            "maxLength": 128,
68 73
            "type": "string"
69 74
          },
70 75
          "engineFault": {
71 76
            "description": "Present when the agent could not bring its configured inference engine online after exhausting its startup recovery attempts. The machine still appears (and may still serve the no-op `stub` engine), but it will NOT be routed real inference jobs because its `supportedModels` does not include the configured model. Consumers SHOULD surface this to the operator as a fault with remediation guidance. Absence means the engine loaded cleanly (the agent clears this field on every healthy serve). Additive / optional — pre-2026-06 readers ignore it.",
72 77
            "properties": {
73 78
              "at": {
74 79
                "description": "When the agent gave up and recorded the fault.",
75 80
                "format": "datetime",
76 81
                "type": "string"
77 82
              },
78 83
              "code": {
79 84
                "description": "Machine-readable fault class: `model-load-failed` (the inference subprocess never became ready), `venv-missing` (the Python environment is absent or incomplete), or `no-home` (the agent could not locate its state directory).",
80 85
                "maxLength": 64,
81 86
                "type": "string"
82 87
              },
83 88
              "message": {
84 89
                "description": "Human-readable, content-safe summary with remediation guidance. Never contains prompt or completion bytes (faults are recorded before any job is served).",
85 90
                "maxLength": 600,
86 91
                "type": "string"
87 92
              },
88 93
              "models": {
89 94
                "description": "The configured model identifiers that failed to load.",
90 95
                "items": {
91 96
                  "maxLength": 256,
92 97
                  "type": "string"
93 98
                },
94 99
                "maxLength": 256,
95 100
                "type": "array"
96 101
              }
97 102
            },
98 103
            "required": [
99 104
              "code",
100 105
              "message",
101 106
              "at"
102 107
            ],
103 108
            "type": "object"
104 109
          },
105 110
          "gpuCores": {
106 111
            "description": "Reported GPU core count, when applicable.",
107 112
            "minimum": 0,
108 113
            "type": "integer"
109 114
          },
110 115
          "machineLabel": {
111 116
            "description": "Human-readable name for this machine, e.g. 'MacBook Pro M3 Max #1'.",
112 117
            "maxLength": 128,
113 118
            "type": "string"
114 119
          },
115 120
          "memoryBandwidthGBs": {
116 121
            "description": "Reported memory bandwidth in GB/s, when applicable.",
117 122
            "minimum": 0,
118 123
            "type": "integer"
119 124
          },
120 125
          "modelIdentifier": {
121 126
            "description": "Apple model code, e.g. 'Macmini9,1' or 'Mac15,3'. Stable across OS updates and useful for hardware-class matching.",
122 127
            "maxLength": 64,
123 128
            "type": "string"
124 129
          },
125 130
          "os": {
126 131
            "description": "Operating system + version, e.g. 'macOS 14.5.1'. Helpful for capability-based matchmaking (e.g. CoreML / MLX feature support).",
127 132
            "maxLength": 64,
128 133
            "type": "string"
129 134
          },
130 135
          "pCores": {
131 136
            "description": "Apple Silicon performance-core count, when applicable.",
132 137
            "minimum": 0,
133 138
            "type": "integer"
134 139
          },
135 140
          "payoutsEnabled": {
136 141
            "description": "True iff the provider has completed payout onboarding with at least one exchange and that exchange has confirmed it can transfer funds to them. Matchmakers SHOULD filter paid jobs away from providers where this is false; self-loop jobs (requester == provider) and free-tier jobs are unaffected. Absence is equivalent to false. The exchange asserts this from its own side via the corresponding paymentAccount record; this field exists so consumers don't have to do a second lookup to know whether the provider can be paid.",
137 142
            "type": "boolean"
138 143
          },
139 144
          "priceList": {
140 145
            "description": "Per-model rates the provider advertises. INFORMATIONAL since 2026-05: the active `dev.cocore.compute.exchangePolicy.tokenRate` is canonical for any provider settling through that exchange — providers MUST price receipts at the exchange's tokenRate and SHOULD denormalize the same rate into every priceList entry so the on-PDS view is internally consistent. A future lexicon revision will introduce a per-receipt provider-set override (gated on the exchange's permission), at which point priceList becomes authoritative again. Held required for backward compat with pre-2026-05 readers.",
141 146
            "items": {
142 147
              "ref": "dev.cocore.compute.defs#modelPrice",
143 148
              "type": "ref"
144 149
            },
145 150
            "maxLength": 256,
146 151
            "minLength": 1,
147 152
            "type": "array"
148 153
          },
154 +
          "proBono": {
155 +
            "description": "The owner's pro-bono election for this machine: it serves matching jobs for free — no tokens metered, no exchange cut taken. Owner-written INTENT (set from the console / tray), like `desiredModels`/`active`: the agent reconciles toward it (it serves a matching job pro bono by writing a receipt with `proBono: true`, `price.amount: 0`, and `tokens: { in: 0, out: 0 }`) but NEVER authors it, so it must PRESERVE whatever it finds on every re-publish. Absent ≡ off: the machine meters and bills every job exactly as before. Pro bono is purely ADDITIVE — a requester that does not match the policy is still served as a normal paid job, so opting in never costs the machine paid work. This is the carve-out for explicitly unlimited usage: a matched requester is never metered or charged, and a requester with no balance is admissible against a machine offering them pro bono. Optional / additive; pre-2026-06 agents ignore it.",
156 +
            "ref": "#proBonoPolicy",
157 +
            "type": "ref"
158 +
          },
149 159
          "provisioning": {
150 160
            "description": "True while the agent is still coming up — it publishes this record immediately on serve start (so the machine appears right away) but before its inference engine has finished loading. The agent re-publishes with this false (or absent) once the engine is ready and it has connected to its matchmaker. Consumers SHOULD show such a machine as 'provisioning' and SHOULD NOT route jobs to it. Absence is equivalent to false.",
151 161
            "type": "boolean"
152 162
          },
153 163
          "ramGB": {
154 164
            "minimum": 1,
155 165
            "type": "integer"
156 166
          },
167 +
          "region": {
168 +
            "description": "Coarse, opt-in country of this machine as an ISO 3166-1 alpha-2 code (e.g. 'US'). AGENT-published and ADVISORY: a self-asserted claim derived from a best-effort public-IP geolocation at serve start, NOT a proof of location — a VPN or proxy moves it, and Apple exposes no signed-location primitive — so a verifier MUST treat it as unverified and MUST NOT gate anything security-relevant on it (same trust posture as `tier`). Present only when the machine's owner has opted into location sharing from the tray; the agent re-resolves it on every serve (refresh-on-serve) and OMITS it when sharing is off, so opting out drops the value on the next re-publish. Optional / additive; absent ≡ location not shared. A future revision may add finer fields (e.g. integer-rounded lat/lon) additively if needed.",
169 +
            "maxLength": 2,
170 +
            "minLength": 2,
171 +
            "type": "string"
172 +
          },
173 +
          "regionObservedAt": {
174 +
            "description": "When `region` was observed during the current serve (RFC3339, UTC). Because the agent re-stamps on every serve, this doubles as a freshness signal for the coarse location. Present iff `region` is present. Optional / additive.",
175 +
            "format": "datetime",
176 +
            "type": "string"
177 +
          },
178 +
          "regionSource": {
179 +
            "description": "How `region` was derived, e.g. 'ip-geo' (public-IP geolocation). Surfaces the provenance — and thus the trust ceiling — of the coarse location to consumers. Present iff `region` is present. Optional / additive.",
180 +
            "maxLength": 32,
181 +
            "type": "string"
182 +
          },
157 183
          "serving": {
158 184
            "description": "Liveness flag. The agent sets this true while its serve loop is up, and publishes false on graceful shutdown (it receives SIGTERM when quit/paused/bounced or its schedule window closes), so consumers can show the machine as 'offline' the moment it stops serving rather than leaving it looking idle. Absence means unknown — treat as NOT offline for backward-compat with pre-2026-06 records that never set it. (An ungraceful stop — crash / power loss — can't publish false; a future lastSeenAt heartbeat will cover that case.)",
159 185
            "type": "boolean"
160 186
          },
161 187
          "supportedModels": {
162 188
            "description": "Opaque model identifiers honored by this provider.",
163 189
            "items": {
164 190
              "maxLength": 256,
165 191
              "type": "string"
166 192
            },
167 193
            "maxLength": 256,
168 194
            "minLength": 1,
169 195
            "type": "array"
170 196
          },
197 +
          "tier": {
198 +
            "description": "The highest confidentiality tier this machine can serve, advertised so requesters and matchmakers can pre-filter. ADVISORY: a requester demanding `attested-confidential` MUST still verify the per-job attestation + session handshake and fail closed; this field only avoids routing confidential jobs to machines that cannot serve them. A machine earns `attested-confidential` here only when it runs the measured native engine under a hardware-attested posture. This is the AGENT-published ACHIEVED tier, derived from evidence (never self-declared); see `desiredTier` for the owner's intent. Optional / additive; absent equivalent to `best-effort`.",
199 +
            "ref": "dev.cocore.compute.defs#tier",
200 +
            "type": "ref"
201 +
          },
171 202
          "trustLevel": {
172 203
            "ref": "dev.cocore.compute.defs#trustLevel",
173 204
            "type": "ref"
174 205
          }
175 206
        },
176 207
        "required": [
177 208
          "machineLabel",
178 209
          "chip",
179 210
          "ramGB",
180 211
          "supportedModels",
181 212
          "priceList",
182 213
          "encryptionPubKey",
183 214
          "attestationPubKey",
184 215
          "trustLevel",
185 216
          "createdAt"
186 217
        ],
187 218
        "type": "object"
188 219
      },
189 220
      "type": "record"
221 +
    },
222 +
    "proBonoPolicy": {
223 +
      "description": "How this machine holds itself out for pro-bono (free, unmetered, no-cut) work. `mode: any` opts the machine into pro bono for EVERY requester — held out for any pro-bono work. `mode: direct` restricts the carve-out to the requesters listed in `dids` — the owner's direct pro-bono relationships — and serves everyone else as a normal paid job. An absent policy (or an unknown `mode` a reader doesn't understand) means pro bono is off and the machine bills normally; readers MUST fail closed to paid rather than assume free.",
224 +
      "properties": {
225 +
        "dids": {
226 +
          "description": "Requester DIDs this machine serves pro bono when `mode` is `direct` — the owner's explicit pro-bono relationships. Ignored when `mode` is `any` (everyone is already free). Empty/absent under `direct` means the machine currently serves no one pro bono (every job is paid), which is the safe default for a half-configured policy.",
227 +
          "items": {
228 +
            "format": "did",
229 +
            "type": "string"
230 +
          },
231 +
          "maxLength": 1024,
232 +
          "type": "array"
233 +
        },
234 +
        "mode": {
235 +
          "description": "`any`: serve every requester pro bono. `direct`: serve only the requesters in `dids` pro bono; all others are normal paid jobs.",
236 +
          "knownValues": [
237 +
            "any",
238 +
            "direct"
239 +
          ],
240 +
          "type": "string"
241 +
        }
242 +
      },
243 +
      "required": [
244 +
        "mode"
245 +
      ],
246 +
      "type": "object"
190 247
    }
191 248
  },
192 249
  "description": "A compute provider's public profile. One record per physical machine. The DID owning the record is the provider's billable identity; the same DID may own multiple provider records (one per machine).",
193 250
  "id": "dev.cocore.compute.provider",
194 251
  "lexicon": 1
195 252
}

Compare Other Versions

Lexicon Garden

@