Expand description
Cockpit metrics and receipts.
POST /v1/metricsMetricsUploadV1(leanctx.cloud-metrics/v1, unchanged from the cloud cockpit) →MetricsAckV1. Idempotent replace per(device.id, date, vault.id);vault.idis the resolved Cloudvault_id.- 1.9 (X4): a day may carry
cloud(MetricsCloudV1), how Cloud helped in that vault: counts and durations only. Claim conflicts are not reported; Cloud derives them from its own refusals and bus lease conflicts. POST /v1/receiptsReceiptsUploadV1→ReceiptsAckV1; a receipt already stored (samereceipt_idanddigest) counts as duplicate.
Structs§
- Metrics
AckV1 - Response of
POST /v1/metrics. - Metrics
Agent V1 - Metrics
Cloud V1 - 1.9 (X4): one vault day of Cloud use.
- Metrics
DayV1 - Metrics
Device V1 - Metrics
Guards V1 - Metrics
Ledger V1 - Metrics
Memory V1 - Metrics
Savings V1 - Metrics
Spend V1 - Metrics
Task Usage V1 - Metrics
Upload V1 - Metrics
Vault V1 - Receipt
Item V1 - One receipt.
documentis the receipt as persisted locally. - Receipts
AckV1 - Response of
POST /v1/receipts. - Receipts
Upload V1 POST /v1/receipts.
Constants§
- MAX_
METRIC_ AGENT_ ROWS - MAX_
METRIC_ DAYS - MAX_
METRIC_ DAY_ COUNT - 1.9 R3: ceilings of
MetricsCloudV1(counts per day, the median in milliseconds up to one day, tokens and USD micros per task row); the names match the Cloud server’s. - MAX_
METRIC_ DAY_ MS - MAX_
METRIC_ SPEND_ ROWS - MAX_
METRIC_ TASK_ ROWS - MAX_
METRIC_ TASK_ TOKENS - MAX_
METRIC_ TASK_ USD_ MICROS - MAX_
RECEIPTS - METRICS_
ACK_ SCHEMA - METRICS_
SCHEMA - RECEIPTS_
ACK_ SCHEMA - RECEIPTS_
SCHEMA
Functions§
- receipt_
digest sha256:<hex>ofdocumentwith object keys sorted and no whitespace (numbers asserde_jsonprints them; receipts are not signed here).