{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Ephemeral player state for cross-device sync. Singleton record (rkey: self), overwritten via putRecord.",
      "key": "any",
      "record": {
        "properties": {
          "acceptedTermsAt": {
            "description": "ISO datetime the player most recently accepted the Terms of Service / Privacy Policy.",
            "format": "datetime",
            "type": "string"
          },
          "acceptedTermsVersion": {
            "description": "The highest Terms of Service / Privacy Policy version this player has accepted (see src/utils/termsVersion.js TERMS_VERSION). Drives the first-run acceptance gate; when this is below the current TERMS_VERSION the user is re-prompted to accept.",
            "type": "integer"
          },
          "activeBlocksIntentionDaily": {
            "description": "Target active blocks per day (decimal string, e.g. '6')",
            "type": "string"
          },
          "activityIntentionConsuming7d": {
            "description": "Deprecated: use activityIntentionTotal7d. Target weekly consuming count.",
            "type": "string"
          },
          "activityIntentionCreating7d": {
            "description": "Deprecated: use activityIntentionTotal7d. Target weekly creating count.",
            "type": "string"
          },
          "activityIntentionTotal7d": {
            "description": "Target total weekly activity count, sum of all actions (decimal string, e.g. '500')",
            "type": "string"
          },
          "activityIntentionX": {
            "description": "Activity style intention X position as grid percentage (0-100, consuming axis)",
            "type": "string"
          },
          "activityIntentionY": {
            "description": "Activity style intention Y position as grid percentage (0-100, creating axis)",
            "type": "string"
          },
          "appMode": {
            "description": "Chosen app experience: 'story' (full immersive) or 'open' (simpler). Authoritative cross-device value for the mode picked during onboarding.",
            "type": "string"
          },
          "completedChapters": {
            "description": "Object mapping completed story/onboarding chapter ids (e.g. 'welcome') to the ISO datetime they were completed. Drives whether the onboarding/changelog overlays are shown.",
            "type": "unknown"
          },
          "currentLight": {
            "description": "Current light charge in Wh (decimal string, e.g. '280.0')",
            "type": "string"
          },
          "currentStamina": {
            "description": "Current stamina level (decimal string, e.g. '42.5')",
            "type": "string"
          },
          "equipped": {
            "description": "Equipment slots: object mapping slotId (hands, backpack, camp) to arrays of equipped item ID strings",
            "type": "unknown"
          },
          "inventoryMigrationV2": {
            "description": "Whether the v2 inventory/equipment migration has been applied for this player.",
            "type": "boolean"
          },
          "inventoryMigrationV3": {
            "description": "Whether the v3 inventory/equipment migration (power-station id remap) has been applied for this player.",
            "type": "boolean"
          },
          "lastSessionStart": {
            "description": "When the current session started (for multi-device awareness)",
            "format": "datetime",
            "type": "string"
          },
          "lightDrainActive": {
            "description": "Whether light drain was active when state was saved",
            "type": "boolean"
          },
          "longestRestMinutes": {
            "description": "Rest ledger high-water-mark: the longest rest stretch ever (time away from the forest between walks) in minutes, as a decimal string. Monotonic — only ever increases. Everything else the rest ledger shows is computed on read from the walk records; this is the one durable figure.",
            "type": "string"
          },
          "onboardingGoals": {
            "description": "Comma-joined list of goal ids the player selected during onboarding (e.g. 'offline-more,reply-more'). Stored as a string to avoid depending on array support.",
            "type": "string"
          },
          "slotCapacity": {
            "description": "Slot capacity overrides: object mapping slotId to integer capacity (for upgrades). Slots not listed use default capacity.",
            "type": "unknown"
          },
          "starterItemsGranted": {
            "description": "Whether the player has received their starter items",
            "type": "boolean"
          },
          "triggerSource": {
            "description": "What caused this state snapshot (visibility_hidden, session_end, stamina_depleted, manual)",
            "type": "string"
          },
          "tutorialCompletedAt": {
            "description": "When the player completed (or skipped) the interactive tutorial. Presence of this field means the tutorial is done; absence means it has not been completed.",
            "format": "datetime",
            "type": "string"
          },
          "updatedAt": {
            "description": "When this state snapshot was taken",
            "format": "datetime",
            "type": "string"
          }
        },
        "required": [
          "updatedAt"
        ],
        "type": "object"
      },
      "type": "record"
    }
  },
  "id": "net.anisota.player.state",
  "lexicon": 1
}
