full diff

dev.cocore.compute.modelActivity

cocore.dev +18 −1
From
bafyreiadqfgpn32doyy44rr3zp45ktksnc5qpc7rmugeuerrgo7rauafaq indexed 2026-06-21 00:58 UTC View this version
To
bafyreidyhdpih564ch2pmwhitde2uoxqblibjzhxg4btztmfxn7x5efxpy indexed 2026-10-29 21:52 UTC View this version

Compatibility

backward compatible Backward compatible. 8 non-breaking changes.

Non-breaking changes (8)
  • AddedVertex AddedVertex { vertex_id: "dev.cocore.compute.modelActivity:output.oldestScannedAt" }
  • AddedVertex AddedVertex { vertex_id: "dev.cocore.compute.modelActivity:output.scanLimit" }
  • AddedVertex AddedVertex { vertex_id: "dev.cocore.compute.modelActivity:output.scanned" }
  • AddedVertex AddedVertex { vertex_id: "dev.cocore.compute.modelActivity:output.truncated" }
  • AddedEdge AddedEdge { src: "dev.cocore.compute.modelActivity:output", tgt: "dev.cocore.compute.modelActivity:output.oldestScannedAt", kind: "prop", name: Some("oldestScannedAt") }
  • AddedEdge AddedEdge { src: "dev.cocore.compute.modelActivity:output", tgt: "dev.cocore.compute.modelActivity:output.scanLimit", kind: "prop", name: Some("scanLimit") }
  • AddedEdge AddedEdge { src: "dev.cocore.compute.modelActivity:output", tgt: "dev.cocore.compute.modelActivity:output.scanned", kind: "prop", name: Some("scanned") }
  • AddedEdge AddedEdge { src: "dev.cocore.compute.modelActivity:output", tgt: "dev.cocore.compute.modelActivity:output.truncated", kind: "prop", name: Some("truncated") }

Migration guidance

Added

  • AddedVertex { vertex_id: "dev.cocore.compute.modelActivity:output.oldestScannedAt" }
  • AddedVertex { vertex_id: "dev.cocore.compute.modelActivity:output.scanLimit" }
  • AddedVertex { vertex_id: "dev.cocore.compute.modelActivity:output.scanned" }
  • AddedVertex { vertex_id: "dev.cocore.compute.modelActivity:output.truncated" }

Notes

  • Non-breaking: AddedEdge { src: "dev.cocore.compute.modelActivity:output", tgt: "dev.cocore.compute.modelActivity:output.oldestScannedAt", kind: "prop", name: Some("oldestScannedAt") }
  • Non-breaking: AddedEdge { src: "dev.cocore.compute.modelActivity:output", tgt: "dev.cocore.compute.modelActivity:output.scanLimit", kind: "prop", name: Some("scanLimit") }
  • Non-breaking: AddedEdge { src: "dev.cocore.compute.modelActivity:output", tgt: "dev.cocore.compute.modelActivity:output.scanned", kind: "prop", name: Some("scanned") }
  • Non-breaking: AddedEdge { src: "dev.cocore.compute.modelActivity:output", tgt: "dev.cocore.compute.modelActivity:output.truncated", kind: "prop", name: Some("truncated") }

Changes

11{
22 "$type": "com.atproto.lexicon.schema",
33 "defs": {
44 "main": {
5 "description": "Aggregate receipt activity per model and per time window. Walks the most-recent indexed receipts (capped at 5000), groups by `body.model`, and tallies requests + tokens across the hour/day/week/month windows, with per-provider breakdowns.",
5 "description": "Aggregate receipt activity per model and per time window. Walks the most-recent indexed receipts (capped at 5000), groups by `body.model`, and tallies requests + tokens across the hour/day/week/month windows, with per-provider breakdowns. The scan cap is reported back as `scanned`/`scanLimit`/`truncated` so consumers can tell an exact total from a lower bound; `oldestScannedAt` is the earliest receipt that contributed to any window.",
66 "output": {
77 "encoding": "application/json",
88 "schema": {
99 "properties": {
1010 "generatedAt": {
1111 "format": "datetime",
1212 "type": "string"
1313 },
1414 "models": {
1515 "items": {
1616 "properties": {
1717 "byProvider": {
1818 "items": {
1919 "properties": {
2020 "did": {
2121 "format": "did",
2222 "type": "string"
2323 },
2424 "stats": {
2525 "ref": "dev.cocore.defs#activityWindows",
2626 "type": "ref"
2727 }
2828 },
2929 "required": [
3030 "did",
3131 "stats"
3232 ],
3333 "type": "object"
3434 },
3535 "type": "array"
3636 },
3737 "modelId": {
3838 "type": "string"
3939 },
4040 "totals": {
4141 "ref": "dev.cocore.defs#activityWindows",
4242 "type": "ref"
4343 }
4444 },
4545 "required": [
4646 "modelId",
4747 "totals",
4848 "byProvider"
4949 ],
5050 "type": "object"
5151 },
5252 "type": "array"
53 },
54 "oldestScannedAt": {
55 "description": "Earliest receipt timestamp that contributed to any window, so a consumer can state the coverage of the counts. Absent when nothing counted.",
56 "format": "datetime",
57 "type": "string"
58 },
59 "scanLimit": {
60 "description": "Cap the scan applied (receipts are walked newest-first).",
61 "type": "integer"
62 },
63 "scanned": {
64 "description": "Number of indexed receipts this scan walked.",
65 "type": "integer"
66 },
67 "truncated": {
68 "description": "True when the scan filled its cap, so older receipts exist that these totals do not include. The wider windows (week/month) are then lower bounds.",
69 "type": "boolean"
5370 }
5471 },
5572 "required": [
5673 "generatedAt",
5774 "models"
5875 ],
5976 "type": "object"
6077 }
6178 },
6279 "type": "query"
6380 }
6481 },
6582 "id": "dev.cocore.compute.modelActivity",
6683 "lexicon": 1
6784}

Compare other versions