---
name: xstate-store
description: "Lightweight typed event store via @xstate/store"
version: "0.1.0"
entry: ./adapter.ts
npm_deps:
  required:
    - "@xstate/store"
  optional: []
fields: []
health_check: null
keywords:
  - store
  - state
  - xstate
  - kv
  - reactive
---

A lightweight event-driven store using @xstate/store. Provides a shared
key-value store between UI and agents with event history.

For typed/validated state machines with guards and actions, use the
`xstate` adapter instead.

## Operations

| Operation | Access | Description |
|-----------|--------|-------------|
| `get` | read | Get full store snapshot |
| `get_key` | read | Get a single value by key |
| `history` | read | Get event history log |
| `set` | write | Set a key to a value |
| `merge` | write | Merge an object into the store context |
| `reset` | write | Reset the store to initial context |

## Configuration

```yaml
connectors:
  - id: app-state
    adapter: xstate-store
    access: read-write
    options:
      initial:
        theme: dark
        locale: en
```
