app.starrysky.streak.checkin

starrysky.app

Documentation

A verifiable check-in event for a specific service streak.

main record

A verifiable check-in event for a specific service streak.

Record Key tid Timestamp-based ID

Properties

checkinsInInterval integer Optional

Progress within the current cadence interval (e.g., 2 if this is the second check-in of the week).

Default: 1
createdAt string datetime Required

Timestamp when this check-in record was created.

freezeDates array of string datetime Optional

Explicit dates (YYYY-MM-DD) being covered by streak freezes in this check-in.

inventoryRef string cid Optional

CID of the inventory record associated with this check-in.

note string Optional

A short note or comment about this check-in (e.g. 'Ran 5km').

maxLength: 300 bytes
originService string Required

The NSID of the service where the streak event occurred.

policy string at-uri Required

The URI of the policy governing this streak.

prev string cid Optional

CID of the previous check-in record in the sequence.

streakDate string datetime Required

The explicit date this check-in is for (YYYY-MM-DD). Useful for handling timezone boundaries manually.

streakSequence integer Required

The current total count of successful intervals/days in this specific streak.

minimum: 1
subject string Required

The name of the habit (e.g., 'Daily Coding', 'Morning Run').

maxLength: 100 bytes
value integer Optional

An optional numeric metric associated with this check-in (e.g. distance, weight, count).

View raw schema
{
  "key": "tid",
  "type": "record",
  "record": {
    "type": "object",
    "required": [
      "originService",
      "policy",
      "subject",
      "streakSequence",
      "streakDate",
      "createdAt"
    ],
    "properties": {
      "note": {
        "type": "string",
        "maxLength": 300,
        "description": "A short note or comment about this check-in (e.g. 'Ran 5km')."
      },
      "prev": {
        "type": "string",
        "format": "cid",
        "description": "CID of the previous check-in record in the sequence."
      },
      "value": {
        "type": "integer",
        "description": "An optional numeric metric associated with this check-in (e.g. distance, weight, count)."
      },
      "policy": {
        "type": "string",
        "format": "at-uri",
        "description": "The URI of the policy governing this streak."
      },
      "subject": {
        "type": "string",
        "maxLength": 100,
        "description": "The name of the habit (e.g., 'Daily Coding', 'Morning Run')."
      },
      "witness": {
        "ref": "lex:app.starrysky.streak.checkin#witness",
        "type": "ref",
        "description": "Optional third-party attestation of the event."
      },
      "createdAt": {
        "type": "string",
        "format": "datetime",
        "description": "Timestamp when this check-in record was created."
      },
      "streakDate": {
        "type": "string",
        "format": "datetime",
        "description": "The explicit date this check-in is for (YYYY-MM-DD). Useful for handling timezone boundaries manually."
      },
      "freezeDates": {
        "type": "array",
        "items": {
          "type": "string",
          "format": "datetime"
        },
        "description": "Explicit dates (YYYY-MM-DD) being covered by streak freezes in this check-in."
      },
      "inventoryRef": {
        "type": "string",
        "format": "cid",
        "description": "CID of the inventory record associated with this check-in."
      },
      "originService": {
        "type": "string",
        "description": "The NSID of the service where the streak event occurred."
      },
      "streakSequence": {
        "type": "integer",
        "minimum": 1,
        "description": "The current total count of successful intervals/days in this specific streak."
      },
      "checkinsInInterval": {
        "type": "integer",
        "default": 1,
        "description": "Progress within the current cadence interval (e.g., 2 if this is the second check-in of the week)."
      }
    }
  },
  "description": "A verifiable check-in event for a specific service streak."
}
witness object

A cryptographic attestation from a third-party service.

Properties

did string did Required

The DID of the witness service.

sig bytes Required

The cryptographic signature of the witness.

subject string cid Required

The CID of the record being witnessed.

View raw schema
{
  "type": "object",
  "required": [
    "did",
    "sig",
    "subject"
  ],
  "properties": {
    "did": {
      "type": "string",
      "format": "did",
      "description": "The DID of the witness service."
    },
    "sig": {
      "type": "bytes",
      "description": "The cryptographic signature of the witness."
    },
    "subject": {
      "type": "string",
      "format": "cid",
      "description": "The CID of the record being witnessed."
    }
  },
  "description": "A cryptographic attestation from a third-party service."
}

Lexicon Garden

@