# net.anisota.fieldwork.state

> Published by [anisota.net](https://lexicon.garden/identity/did:plc:lcieujcfkv4jx7gehsvok3pr)

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:lcieujcfkv4jx7gehsvok3pr/net.anisota.fieldwork.state)
- [Documentation](https://lexicon.garden/lexicon/did:plc:lcieujcfkv4jx7gehsvok3pr/net.anisota.fieldwork.state/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:lcieujcfkv4jx7gehsvok3pr/net.anisota.fieldwork.state/examples)

## Definitions

### `net.anisota.fieldwork.state`

**Type**: `record`

Quest system state for cross-device sync (dismissals, nudge timing, visited routes). Singleton record (rkey: self), overwritten via putRecord. Client-written (no backend signing). Distinct from net.anisota.chronicle.fieldwork (immutable, backend-signed completion records).

**Key**: `any`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `counters` | `unknown` | No | Reserved for future quest progress counters. Object mapping counter ids to values. |
| `dismissed` | `unknown` | No | Object mapping dismissed quest ids to the ISO datetime they were dismissed. Dismissed quests are excluded from recommendations and nudges until undismissed. |
| `updatedAt` | `string` (datetime) | Yes | When this state snapshot was taken |
| `lastNudgeAt` | `string` (datetime) | No | When a quest nudge was last shown (nudges are spaced at least a day apart) |
| `retroSweepAt` | `string` (datetime) | No | When the retroactive completion sweep last ran (throttles the sweep to once per day) |
| `snoozedUntil` | `string` (datetime) | No | Suppress quest nudges until this time |
| `pinnedQuestId` | `string` | No | Quest the player has pinned to keep in view |
| `visitedRoutes` | `unknown` | No | Object mapping visited app routes (e.g. '/chronicle') to the ISO datetime of the first tracked visit. Drives route-based quest detection. |
| `lastNudgeQuestId` | `string` | No | Which quest the most recent nudge was about |
| `retroSweepVersion` | `integer` | No | Version of the retroactive sweep that armed retroSweepAt. When it doesn't match the client's current sweep version the throttle is treated as stale and the sweep runs once more, so a throttle armed by an earlier (buggy) sweep can't lock out backfill. |

## Raw Schema

```json
{
  "id": "net.anisota.fieldwork.state",
  "defs": {
    "main": {
      "key": "any",
      "type": "record",
      "record": {
        "type": "object",
        "required": [
          "updatedAt"
        ],
        "properties": {
          "counters": {
            "type": "unknown",
            "description": "Reserved for future quest progress counters. Object mapping counter ids to values."
          },
          "dismissed": {
            "type": "unknown",
            "description": "Object mapping dismissed quest ids to the ISO datetime they were dismissed. Dismissed quests are excluded from recommendations and nudges until undismissed."
          },
          "updatedAt": {
            "type": "string",
            "format": "datetime",
            "description": "When this state snapshot was taken"
          },
          "lastNudgeAt": {
            "type": "string",
            "format": "datetime",
            "description": "When a quest nudge was last shown (nudges are spaced at least a day apart)"
          },
          "retroSweepAt": {
            "type": "string",
            "format": "datetime",
            "description": "When the retroactive completion sweep last ran (throttles the sweep to once per day)"
          },
          "snoozedUntil": {
            "type": "string",
            "format": "datetime",
            "description": "Suppress quest nudges until this time"
          },
          "pinnedQuestId": {
            "type": "string",
            "description": "Quest the player has pinned to keep in view"
          },
          "visitedRoutes": {
            "type": "unknown",
            "description": "Object mapping visited app routes (e.g. '/chronicle') to the ISO datetime of the first tracked visit. Drives route-based quest detection."
          },
          "lastNudgeQuestId": {
            "type": "string",
            "description": "Which quest the most recent nudge was about"
          },
          "retroSweepVersion": {
            "type": "integer",
            "description": "Version of the retroactive sweep that armed retroSweepAt. When it doesn't match the client's current sweep version the throttle is treated as stale and the sweep runs once more, so a throttle armed by an earlier (buggy) sweep can't lock out backfill."
          }
        }
      },
      "description": "Quest system state for cross-device sync (dismissals, nudge timing, visited routes). Singleton record (rkey: self), overwritten via putRecord. Client-written (no backend signing). Distinct from net.anisota.chronicle.fieldwork (immutable, backend-signed completion records)."
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
