net.anisota.chronicle.expedition

anisota.net

Documentation

Expedition record. Created with status 'active' when entering the forest, updated to 'completed'/'abandoned' on extraction/abandon. rkey is a TID. Tracks the full lifecycle of a forest expedition including camps, gathered loot, light consumption, and conditions.

main record

Expedition record. Created with status 'active' when entering the forest, updated to 'completed'/'abandoned' on extraction/abandon. rkey is a TID. Tracks the full lifecycle of a forest expedition including camps, gathered loot, light consumption, and conditions.

Record Key tid Timestamp-based ID

Properties

abandonReason string Optional

Reason for abandonment (only set if status is 'abandoned')

Allowed: light_depleted, user_abandoned, app_crash, force_close, auto_abandoned_stale
activeDuration integer Optional

Active exploring time in milliseconds (excludes camp rest time)

minimum: 0
campsCount integer Optional

Number of camps made during the expedition

minimum: 0
completedAt string datetime Optional

When the expedition ended (extracted or abandoned)

createdAt string datetime Required

When the record was created

duration integer Optional

Total expedition duration in milliseconds

minimum: 0
expeditionNumber integer Optional

Sequential expedition number for this user (Expedition 1, 2, 3...)

minimum: 1
restDuration integer Optional

Total camp/rest time in milliseconds

minimum: 0
startedAt string datetime Optional

When the expedition started (entered forest)

status string Required

Current expedition status

Allowed: active, completed, abandoned
updatedAt string datetime Optional

When the record was last updated

View raw schema
{
  "key": "tid",
  "type": "record",
  "record": {
    "type": "object",
    "required": [
      "status",
      "signature",
      "createdAt"
    ],
    "properties": {
      "light": {
        "ref": "#expeditionLight",
        "type": "ref"
      },
      "status": {
        "enum": [
          "active",
          "completed",
          "abandoned"
        ],
        "type": "string",
        "description": "Current expedition status"
      },
      "duration": {
        "type": "integer",
        "minimum": 0,
        "description": "Total expedition duration in milliseconds"
      },
      "findings": {
        "ref": "#expeditionFindings",
        "type": "ref"
      },
      "createdAt": {
        "type": "string",
        "format": "datetime",
        "description": "When the record was created"
      },
      "heartbeat": {
        "ref": "#expeditionHeartbeat",
        "type": "ref"
      },
      "signature": {
        "ref": "#chronicleSignature",
        "type": "ref"
      },
      "startedAt": {
        "type": "string",
        "format": "datetime",
        "description": "When the expedition started (entered forest)"
      },
      "updatedAt": {
        "type": "string",
        "format": "datetime",
        "description": "When the record was last updated"
      },
      "campsCount": {
        "type": "integer",
        "minimum": 0,
        "description": "Number of camps made during the expedition"
      },
      "conditions": {
        "ref": "#expeditionConditions",
        "type": "ref"
      },
      "completedAt": {
        "type": "string",
        "format": "datetime",
        "description": "When the expedition ended (extracted or abandoned)"
      },
      "restDuration": {
        "type": "integer",
        "minimum": 0,
        "description": "Total camp/rest time in milliseconds"
      },
      "abandonReason": {
        "enum": [
          "light_depleted",
          "user_abandoned",
          "app_crash",
          "force_close",
          "auto_abandoned_stale"
        ],
        "type": "string",
        "description": "Reason for abandonment (only set if status is 'abandoned')"
      },
      "activeDuration": {
        "type": "integer",
        "minimum": 0,
        "description": "Active exploring time in milliseconds (excludes camp rest time)"
      },
      "expeditionNumber": {
        "type": "integer",
        "minimum": 1,
        "description": "Sequential expedition number for this user (Expedition 1, 2, 3...)"
      }
    }
  },
  "description": "Expedition record. Created with status 'active' when entering the forest, updated to 'completed'/'abandoned' on extraction/abandon. rkey is a TID. Tracks the full lifecycle of a forest expedition including camps, gathered loot, light consumption, and conditions."
}
chronicleSignature object

ES256 cryptographic signature proving record authenticity

Properties

alg string Required

Signing algorithm (ES256)

kid string Required

Key identifier for the signing key

nonce string Required

Unique random nonce to prevent replay

sig string Required

Base64-encoded ES256 signature

signedAt string datetime Required

When the record was signed

version integer Required

Signature schema version

View raw schema
{
  "type": "object",
  "required": [
    "sig",
    "alg",
    "kid",
    "signedAt",
    "nonce",
    "version"
  ],
  "properties": {
    "alg": {
      "type": "string",
      "description": "Signing algorithm (ES256)"
    },
    "kid": {
      "type": "string",
      "description": "Key identifier for the signing key"
    },
    "sig": {
      "type": "string",
      "description": "Base64-encoded ES256 signature"
    },
    "nonce": {
      "type": "string",
      "description": "Unique random nonce to prevent replay"
    },
    "version": {
      "type": "integer",
      "description": "Signature schema version"
    },
    "signedAt": {
      "type": "string",
      "format": "datetime",
      "description": "When the record was signed"
    }
  },
  "description": "ES256 cryptographic signature proving record authenticity"
}
expeditionConditions object

Environmental conditions during expedition

Properties

biome string Optional

Forest biome type

lightLevel string Optional

Time-of-day light condition at expedition start

moonPhase string Optional

Moon phase condition (nighttime only)

userState string Optional

User fatigue state at expedition start

weather string Optional

Weather condition during expedition

View raw schema
{
  "type": "object",
  "properties": {
    "biome": {
      "type": "string",
      "description": "Forest biome type"
    },
    "weather": {
      "enum": [
        "clear",
        "overcast",
        "rainy",
        "stormy",
        "foggy"
      ],
      "type": "string",
      "description": "Weather condition during expedition"
    },
    "moonPhase": {
      "enum": [
        "full_moon",
        "new_moon"
      ],
      "type": "string",
      "description": "Moon phase condition (nighttime only)"
    },
    "userState": {
      "enum": [
        "well_rested",
        "tired",
        "exhausted",
        "first_expedition"
      ],
      "type": "string",
      "description": "User fatigue state at expedition start"
    },
    "lightLevel": {
      "enum": [
        "dawn",
        "morning",
        "midday",
        "afternoon",
        "dusk",
        "night",
        "deepnight"
      ],
      "type": "string",
      "description": "Time-of-day light condition at expedition start"
    }
  },
  "description": "Environmental conditions during expedition"
}
expeditionFindings object

What was found/gathered during the expedition

Properties

itemsCollected integer Optional

Number of items collected

minimum: 0
likesSent integer Optional

Likes sent during the expedition

minimum: 0
mothsSeen integer Optional

Total moth encounters (caught + escaped)

minimum: 0
postsCreated integer Optional

Posts created during the expedition

minimum: 0
postsRead integer Optional

Posts read during the expedition

minimum: 0
specimensFound integer Optional

Number of specimens successfully caught

minimum: 0
xpGained integer Optional

XP gained from the expedition

minimum: 0
View raw schema
{
  "type": "object",
  "properties": {
    "xpGained": {
      "type": "integer",
      "minimum": 0,
      "description": "XP gained from the expedition"
    },
    "likesSent": {
      "type": "integer",
      "minimum": 0,
      "description": "Likes sent during the expedition"
    },
    "mothsSeen": {
      "type": "integer",
      "minimum": 0,
      "description": "Total moth encounters (caught + escaped)"
    },
    "postsRead": {
      "type": "integer",
      "minimum": 0,
      "description": "Posts read during the expedition"
    },
    "postsCreated": {
      "type": "integer",
      "minimum": 0,
      "description": "Posts created during the expedition"
    },
    "itemsCollected": {
      "type": "integer",
      "minimum": 0,
      "description": "Number of items collected"
    },
    "specimensFound": {
      "type": "integer",
      "minimum": 0,
      "description": "Number of specimens successfully caught"
    }
  },
  "description": "What was found/gathered during the expedition"
}
expeditionHeartbeat object

Periodic snapshot of expedition progress for cross-device sync

Properties

updatedAt string datetime Optional

When this heartbeat was written

View raw schema
{
  "type": "object",
  "properties": {
    "light": {
      "ref": "#heartbeatLight",
      "type": "ref"
    },
    "progress": {
      "ref": "#heartbeatProgress",
      "type": "ref"
    },
    "updatedAt": {
      "type": "string",
      "format": "datetime",
      "description": "When this heartbeat was written"
    }
  },
  "description": "Periodic snapshot of expedition progress for cross-device sync"
}
expeditionLight object

Light resource tracking for the expedition

Properties

atEnd integer Optional

Light level when expedition ended (in minutes)

minimum: 0
atStart integer Optional

Light level when expedition started (in minutes)

minimum: 0
consumed integer Optional

Total light consumed during expedition

minimum: 0
drainRate integer Optional

Effective drain rate as a percentage (80 = 0.8x drain). Multiply by 0.01 to get the float multiplier.

regenerated integer Optional

Light regenerated during camps

minimum: 0
status string Optional

Light status at start of expedition

View raw schema
{
  "type": "object",
  "properties": {
    "atEnd": {
      "type": "integer",
      "minimum": 0,
      "description": "Light level when expedition ended (in minutes)"
    },
    "status": {
      "enum": [
        "bright",
        "steady",
        "dim",
        "flickering",
        "dying",
        "fullCharge",
        "charged",
        "low",
        "critical",
        "dead"
      ],
      "type": "string",
      "description": "Light status at start of expedition"
    },
    "atStart": {
      "type": "integer",
      "minimum": 0,
      "description": "Light level when expedition started (in minutes)"
    },
    "consumed": {
      "type": "integer",
      "minimum": 0,
      "description": "Total light consumed during expedition"
    },
    "drainRate": {
      "type": "integer",
      "description": "Effective drain rate as a percentage (80 = 0.8x drain). Multiply by 0.01 to get the float multiplier."
    },
    "regenerated": {
      "type": "integer",
      "minimum": 0,
      "description": "Light regenerated during camps"
    }
  },
  "description": "Light resource tracking for the expedition"
}
heartbeatLight object

Light state at heartbeat time

Properties

current integer Optional

Current light level

drainActive boolean Optional

Whether drain is actively ticking

drainRate integer Optional

Current drain rate as percentage

frozen boolean Optional

Whether light is frozen (at hub/trailhead)

View raw schema
{
  "type": "object",
  "properties": {
    "frozen": {
      "type": "boolean",
      "description": "Whether light is frozen (at hub/trailhead)"
    },
    "current": {
      "type": "integer",
      "description": "Current light level"
    },
    "drainRate": {
      "type": "integer",
      "description": "Current drain rate as percentage"
    },
    "drainActive": {
      "type": "boolean",
      "description": "Whether drain is actively ticking"
    }
  },
  "description": "Light state at heartbeat time"
}
heartbeatProgress object

Session progress counters at heartbeat time

Properties

itemsCount integer Optional

No description available.

minimum: 0
likesSent integer Optional

No description available.

minimum: 0
mothsSeenCount integer Optional

No description available.

minimum: 0
postsCreated integer Optional

No description available.

minimum: 0
postsRead integer Optional

No description available.

minimum: 0
repostsSent integer Optional

No description available.

minimum: 0
specimensCount integer Optional

No description available.

minimum: 0
xpGained integer Optional

No description available.

minimum: 0
View raw schema
{
  "type": "object",
  "properties": {
    "xpGained": {
      "type": "integer",
      "minimum": 0
    },
    "likesSent": {
      "type": "integer",
      "minimum": 0
    },
    "postsRead": {
      "type": "integer",
      "minimum": 0
    },
    "itemsCount": {
      "type": "integer",
      "minimum": 0
    },
    "repostsSent": {
      "type": "integer",
      "minimum": 0
    },
    "postsCreated": {
      "type": "integer",
      "minimum": 0
    },
    "mothsSeenCount": {
      "type": "integer",
      "minimum": 0
    },
    "specimensCount": {
      "type": "integer",
      "minimum": 0
    }
  },
  "description": "Session progress counters at heartbeat time"
}

Lexicon Garden

@