dev.cocore.compute.receipt

cocore.dev

Documentation

main record

No description available.

Record Key tid Timestamp-based ID

Properties

attestation ref com.atproto.repo.strongRef Required

Strong-ref to a dev.cocore.compute.attestation record published by this provider. completedAt MUST fall within [attestedAt, expiresAt] of that attestation.

brokerageCountersignature ref #brokerageCountersignature Optional

ADR-0004: the session-bound witness of the BROKERAGE (the matchmaking authority the requester routed through — e.g. the advisor). The brokerage live-challenges the machine it dispatches to, so its countersignature proves 'authority X dispatched THIS job to the machine it attested, and that machine served it'. This is what elevates a receipt to `attested-confidential` under the forkable-authority model: a self-published attestation record is NOT sufficient without a trusted brokerage's countersignature. UNLIKE every other field, this is NOT covered by `enclaveSignature` — it is signed by the brokerage, not the provider, and is added after the provider signs (verifiers strip it before checking enclaveSignature, exactly as they strip enclaveSignature and $type). A confidential requester REQUIRES this from an authority in its trust set (default: cocore's brokerage DID); best-effort receipts omit it. Optional / additive.

completedAt string datetime Required

An RFC 3339 formatted timestamp.

enclaveSignature bytes Required

Secure Enclave P-256 signature (DER) over a sorted-key canonical JSON of every other field in this record. Verified against the publicKey of the strong-reffed attestation. This binding survives PDS migration: the repo-commit signature changes when keys rotate, but the enclaveSignature does not.

maxLength: 256
inputCommitment string Required

MUST equal job.inputCommitment.

maxLength: 64 bytesminLength: 64 bytes
model string Required

No description available.

maxLength: 256 bytes
outputCipherCommitment string Optional

Optional SHA-256 hex over the EXACT encrypted bytes delivered to the requester (the sealed reply). Lets a requester confirm the ciphertext they received is the one the provider's enclaveSignature commits to — defends against an intermediary swapping the delivered bytes. Covered by enclaveSignature like every other field.

maxLength: 64 bytesminLength: 64 bytes
outputCipherURL string uri Optional

Optional URL where the encrypted output lives.

outputCommitment string Required

SHA-256 hex over the plaintext output bytes — the decrypted result the requester receives. (The earlier 'encrypted output' wording was a doc error; the provider has always committed to the plaintext, which is what a requester can verify after decrypting. Use outputCipherCommitment to commit to the encrypted bytes on the wire.)

maxLength: 64 bytesminLength: 64 bytes
params ref #generationParams Optional

Optional record of the sampling parameters the provider committed to for this job. Integer-only (canonical JSON forbids floats): temperature/top_p are carried as integer milliunits. Covered by enclaveSignature, so a requester can prove the provider claimed these settings.

proBono boolean Optional

True when the provider served this job pro bono under its `dev.cocore.compute.provider.proBono` election — free, unmetered, no exchange cut. A pro-bono receipt MUST carry `price.amount: 0` and `tokens: { in: 0, out: 0 }`: the work is explicitly not counted, so neither figure is a billing claim. An exchange settling a `proBono: true` receipt takes no fee and moves no balance (`amountCharged`, `providerPayout`, and `exchangeFee` are all 0). Covered by `enclaveSignature` like every other field, so the carve-out is part of the signed, self-verifying record rather than an off-record side channel. Absent/false ≡ a normal metered, billable receipt. Optional / additive; pre-2026-06 readers ignore it and still see a well-formed zero-price receipt.

reasoningCommitment string Optional

Optional SHA-256 hex over the plaintext reasoning ('thinking') output bytes the provider produced for this job, separate from outputCommitment which covers only the answer the requester acts on. Present only when the model emitted reasoning on a distinct channel (a sibling reasoning_content field, or inline <think>...</think> tags the provider split out). Lets a requester independently verify the reasoning trace without it perturbing the answer's commitment. Covered by enclaveSignature.

maxLength: 64 bytesminLength: 64 bytes
requester string did Required

DID of the requester. Denormalized from the job record for indexer convenience; MUST equal the DID owning the job record.

sessionKeyCommitment string Optional

Optional SHA-256 hex over (ephemeralPubKey || sessionNonce) — the per-job ephemeral X25519 key the requester sealed the input to, bound to the request nonce. Present when the job ran under the forward-secret confidential handshake (the enclave minted a fresh ephemeral key, enclave-signed it against the requester's nonce, and the requester sealed to that key after verifying it). Lets a requester prove after the fact that its prompt was sealed to a key the measured enclave controlled for this job, not the long-lived encryptionPubKey. Covered by enclaveSignature.

maxLength: 64 bytesminLength: 64 bytes
sessionNonce string Optional

Optional lowercase hex of the fresh requester nonce that the ephemeral session key was bound to (the freshness challenge for this job). Pairs with sessionKeyCommitment. Covered by enclaveSignature.

maxLength: 64 bytesminLength: 32 bytes
startedAt string datetime Required

An RFC 3339 formatted timestamp.

tier ref dev.cocore.compute.defs#tier Optional

The confidentiality tier this job actually ran under. Set by the provider to `attested-confidential` only when the input was sealed to a verified, enclave-bound ephemeral session key AND served by a measured native engine under a hardware-attested posture; otherwise `best-effort`. A requester recomputes this from the receipt's attestation + sessionKeyCommitment rather than trusting the field. Optional / additive; absent equivalent to `best-effort`.

View raw schema
{
  "key": "tid",
  "type": "record",
  "record": {
    "type": "object",
    "required": [
      "job",
      "requester",
      "model",
      "inputCommitment",
      "outputCommitment",
      "tokens",
      "startedAt",
      "completedAt",
      "price",
      "attestation",
      "enclaveSignature"
    ],
    "properties": {
      "job": {
        "ref": "com.atproto.repo.strongRef",
        "type": "ref",
        "description": "Strong-ref to the requester's dev.cocore.compute.job record."
      },
      "tier": {
        "ref": "dev.cocore.compute.defs#tier",
        "type": "ref",
        "description": "The confidentiality tier this job actually ran under. Set by the provider to `attested-confidential` only when the input was sealed to a verified, enclave-bound ephemeral session key AND served by a measured native engine under a hardware-attested posture; otherwise `best-effort`. A requester recomputes this from the receipt's attestation + sessionKeyCommitment rather than trusting the field. Optional / additive; absent equivalent to `best-effort`."
      },
      "model": {
        "type": "string",
        "maxLength": 256
      },
      "price": {
        "ref": "dev.cocore.compute.defs#money",
        "type": "ref",
        "description": "MUST be <= job.priceCeiling. Currency MUST match job.priceCeiling.currency."
      },
      "params": {
        "ref": "#generationParams",
        "type": "ref",
        "description": "Optional record of the sampling parameters the provider committed to for this job. Integer-only (canonical JSON forbids floats): temperature/top_p are carried as integer milliunits. Covered by enclaveSignature, so a requester can prove the provider claimed these settings."
      },
      "tokens": {
        "ref": "dev.cocore.compute.defs#tokenCounts",
        "type": "ref"
      },
      "proBono": {
        "type": "boolean",
        "description": "True when the provider served this job pro bono under its `dev.cocore.compute.provider.proBono` election — free, unmetered, no exchange cut. A pro-bono receipt MUST carry `price.amount: 0` and `tokens: { in: 0, out: 0 }`: the work is explicitly not counted, so neither figure is a billing claim. An exchange settling a `proBono: true` receipt takes no fee and moves no balance (`amountCharged`, `providerPayout`, and `exchangeFee` are all 0). Covered by `enclaveSignature` like every other field, so the carve-out is part of the signed, self-verifying record rather than an off-record side channel. Absent/false ≡ a normal metered, billable receipt. Optional / additive; pre-2026-06 readers ignore it and still see a well-formed zero-price receipt."
      },
      "requester": {
        "type": "string",
        "format": "did",
        "description": "DID of the requester. Denormalized from the job record for indexer convenience; MUST equal the DID owning the job record."
      },
      "startedAt": {
        "type": "string",
        "format": "datetime"
      },
      "attestation": {
        "ref": "com.atproto.repo.strongRef",
        "type": "ref",
        "description": "Strong-ref to a dev.cocore.compute.attestation record published by this provider. completedAt MUST fall within [attestedAt, expiresAt] of that attestation."
      },
      "completedAt": {
        "type": "string",
        "format": "datetime"
      },
      "sessionNonce": {
        "type": "string",
        "maxLength": 64,
        "minLength": 32,
        "description": "Optional lowercase hex of the fresh requester nonce that the ephemeral session key was bound to (the freshness challenge for this job). Pairs with sessionKeyCommitment. Covered by enclaveSignature."
      },
      "inputCommitment": {
        "type": "string",
        "maxLength": 64,
        "minLength": 64,
        "description": "MUST equal job.inputCommitment."
      },
      "outputCipherURL": {
        "type": "string",
        "format": "uri",
        "description": "Optional URL where the encrypted output lives."
      },
      "enclaveSignature": {
        "type": "bytes",
        "maxLength": 256,
        "description": "Secure Enclave P-256 signature (DER) over a sorted-key canonical JSON of every other field in this record. Verified against the publicKey of the strong-reffed attestation. This binding survives PDS migration: the repo-commit signature changes when keys rotate, but the enclaveSignature does not."
      },
      "outputCommitment": {
        "type": "string",
        "maxLength": 64,
        "minLength": 64,
        "description": "SHA-256 hex over the plaintext output bytes — the decrypted result the requester receives. (The earlier 'encrypted output' wording was a doc error; the provider has always committed to the plaintext, which is what a requester can verify after decrypting. Use outputCipherCommitment to commit to the encrypted bytes on the wire.)"
      },
      "reasoningCommitment": {
        "type": "string",
        "maxLength": 64,
        "minLength": 64,
        "description": "Optional SHA-256 hex over the plaintext reasoning ('thinking') output bytes the provider produced for this job, separate from outputCommitment which covers only the answer the requester acts on. Present only when the model emitted reasoning on a distinct channel (a sibling reasoning_content field, or inline <think>...</think> tags the provider split out). Lets a requester independently verify the reasoning trace without it perturbing the answer's commitment. Covered by enclaveSignature."
      },
      "sessionKeyCommitment": {
        "type": "string",
        "maxLength": 64,
        "minLength": 64,
        "description": "Optional SHA-256 hex over (ephemeralPubKey || sessionNonce) — the per-job ephemeral X25519 key the requester sealed the input to, bound to the request nonce. Present when the job ran under the forward-secret confidential handshake (the enclave minted a fresh ephemeral key, enclave-signed it against the requester's nonce, and the requester sealed to that key after verifying it). Lets a requester prove after the fact that its prompt was sealed to a key the measured enclave controlled for this job, not the long-lived encryptionPubKey. Covered by enclaveSignature."
      },
      "outputCipherCommitment": {
        "type": "string",
        "maxLength": 64,
        "minLength": 64,
        "description": "Optional SHA-256 hex over the EXACT encrypted bytes delivered to the requester (the sealed reply). Lets a requester confirm the ciphertext they received is the one the provider's enclaveSignature commits to — defends against an intermediary swapping the delivered bytes. Covered by enclaveSignature like every other field."
      },
      "brokerageCountersignature": {
        "ref": "#brokerageCountersignature",
        "type": "ref",
        "description": "ADR-0004: the session-bound witness of the BROKERAGE (the matchmaking authority the requester routed through — e.g. the advisor). The brokerage live-challenges the machine it dispatches to, so its countersignature proves 'authority X dispatched THIS job to the machine it attested, and that machine served it'. This is what elevates a receipt to `attested-confidential` under the forkable-authority model: a self-published attestation record is NOT sufficient without a trusted brokerage's countersignature. UNLIKE every other field, this is NOT covered by `enclaveSignature` — it is signed by the brokerage, not the provider, and is added after the provider signs (verifiers strip it before checking enclaveSignature, exactly as they strip enclaveSignature and $type). A confidential requester REQUIRES this from an authority in its trust set (default: cocore's brokerage DID); best-effort receipts omit it. Optional / additive."
      }
    }
  }
}
brokerageCountersignature object

A brokerage's session-bound witness on a receipt (ADR-0004). Verified OFFLINE against the `authority` DID document's signing key (invariant #2 holds — the live challenge happened at seal time; the receipt stays verifiable after the fact). The signature covers the sorted-key canonical JSON of `{ authority, attestation, jobCid, jobUri, machineId, nonce, requester }`, where `attestation`/`jobUri` are the `uri` of the receipt's respective strong-refs, `jobCid` is the receipt's `job.cid`, and `requester` is the receipt's `requester` — so the witness is bound to this exact job, requester, serving machine, and attested identity, and cannot be lifted onto another receipt.

Properties

authority string did Required

The brokerage's DID (did:web or did:plc). The verifier resolves its DID document to get the signing key, and MUST require this DID to be in its configured trust set — validity is relative to a named authority the verifier chooses to trust (CA-style trust roots).

machineId string Required

The stable per-machine id (the provider record's rkey / advisor machine_id) the brokerage dispatched to and live-challenged. Bound into `sig` so the witness names the specific machine that served.

maxLength: 256 bytes
nonce string Required

Lowercase-hex nonce unique to this witness (the brokerage's per-job witness id). Bound into `sig`.

maxLength: 64 bytesminLength: 16 bytes
sig bytes Required

P-256 signature (DER) by the brokerage authority key over the canonical message described above. Verified against the key in the `authority` DID document.

maxLength: 256
View raw schema
{
  "type": "object",
  "required": [
    "authority",
    "machineId",
    "nonce",
    "sig"
  ],
  "properties": {
    "sig": {
      "type": "bytes",
      "maxLength": 256,
      "description": "P-256 signature (DER) by the brokerage authority key over the canonical message described above. Verified against the key in the `authority` DID document."
    },
    "nonce": {
      "type": "string",
      "maxLength": 64,
      "minLength": 16,
      "description": "Lowercase-hex nonce unique to this witness (the brokerage's per-job witness id). Bound into `sig`."
    },
    "authority": {
      "type": "string",
      "format": "did",
      "description": "The brokerage's DID (did:web or did:plc). The verifier resolves its DID document to get the signing key, and MUST require this DID to be in its configured trust set — validity is relative to a named authority the verifier chooses to trust (CA-style trust roots)."
    },
    "machineId": {
      "type": "string",
      "maxLength": 256,
      "description": "The stable per-machine id (the provider record's rkey / advisor machine_id) the brokerage dispatched to and live-challenged. Bound into `sig` so the witness names the specific machine that served."
    }
  },
  "description": "A brokerage's session-bound witness on a receipt (ADR-0004). Verified OFFLINE against the `authority` DID document's signing key (invariant #2 holds — the live challenge happened at seal time; the receipt stays verifiable after the fact). The signature covers the sorted-key canonical JSON of `{ authority, attestation, jobCid, jobUri, machineId, nonce, requester }`, where `attestation`/`jobUri` are the `uri` of the receipt's respective strong-refs, `jobCid` is the receipt's `job.cid`, and `requester` is the receipt's `requester` — so the witness is bound to this exact job, requester, serving machine, and attested identity, and cannot be lifted onto another receipt."
}
generationParams object

Sampling parameters committed to in a receipt. Integer-only because the canonical signing form forbids floats — temperature and top_p are carried as milliunits (value × 1000, e.g. temperature 0.7 -> 700).

Properties

maxTokens integer Optional

Max output tokens requested for this job.

minimum: 0
outputSchemaHash string Optional

SHA-256 hex over the canonical JSON of the outputSchema the provider used for this job. Present only when the job specified outputSchema. Covered by enclaveSignature, so a requester can prove the provider honored the schema they asked for.

maxLength: 64 bytesminLength: 64 bytes
seed integer Optional

RNG seed, when the provider ran with a fixed seed (enables reproducibility claims).

temperatureMilli integer Optional

Sampling temperature × 1000 (e.g. 0.7 -> 700). Omitted when the provider used the model default.

minimum: 0
toolSchemaHash string Optional

SHA-256 hex over the canonical JSON of the tools the provider used for this job. Present only when the job specified tools. Covered by enclaveSignature, so a requester can prove the provider honored the tool definitions they asked for.

maxLength: 64 bytesminLength: 64 bytes
topPMilli integer Optional

Nucleus sampling top_p × 1000 (e.g. 0.95 -> 950). Omitted when the provider used the model default.

minimum: 0maximum: 1000
View raw schema
{
  "type": "object",
  "properties": {
    "seed": {
      "type": "integer",
      "description": "RNG seed, when the provider ran with a fixed seed (enables reproducibility claims)."
    },
    "maxTokens": {
      "type": "integer",
      "minimum": 0,
      "description": "Max output tokens requested for this job."
    },
    "topPMilli": {
      "type": "integer",
      "maximum": 1000,
      "minimum": 0,
      "description": "Nucleus sampling top_p × 1000 (e.g. 0.95 -> 950). Omitted when the provider used the model default."
    },
    "toolSchemaHash": {
      "type": "string",
      "maxLength": 64,
      "minLength": 64,
      "description": "SHA-256 hex over the canonical JSON of the tools the provider used for this job. Present only when the job specified tools. Covered by enclaveSignature, so a requester can prove the provider honored the tool definitions they asked for."
    },
    "outputSchemaHash": {
      "type": "string",
      "maxLength": 64,
      "minLength": 64,
      "description": "SHA-256 hex over the canonical JSON of the outputSchema the provider used for this job. Present only when the job specified outputSchema. Covered by enclaveSignature, so a requester can prove the provider honored the schema they asked for."
    },
    "temperatureMilli": {
      "type": "integer",
      "minimum": 0,
      "description": "Sampling temperature × 1000 (e.g. 0.7 -> 700). Omitted when the provider used the model default."
    }
  },
  "description": "Sampling parameters committed to in a receipt. Integer-only because the canonical signing form forbids floats — temperature and top_p are carried as milliunits (value × 1000, e.g. temperature 0.7 -> 700)."
}

Lexicon Garden

@