🚀. Socket Launch Week Day 3:Socket Firewall Now Blocks Malicious VS Code and Open VSX Extensions.Learn more
Sign In

@assistant-ui/store

Package Overview
Dependencies
Maintainers
2
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@assistant-ui/store

Tap-based state management for @assistant-ui

store-0.2-compat
Source
npmnpm
Version
0.2.20
Version published
Weekly downloads
1.1M
7.56%
Maintainers
2
Weekly downloads
 
Created
Source

@assistant-ui/store

npm version GitHub stars

Tap-based state container with React Context integration. Bridges @assistant-ui/tap resources into React via useAui, useAuiState, and <AuiProvider>.

store powers the runtime layer of assistant-ui. Most users do not install it directly; reach for @assistant-ui/react instead.

Installation

npm install @assistant-ui/store @assistant-ui/tap

Usage

import { resource } from "@assistant-ui/tap";
import { useState } from "react";
import {
  useAui,
  useAuiState,
  AuiProvider,
  type ClientOutput,
} from "@assistant-ui/store";

declare module "@assistant-ui/store" {
  interface ScopeRegistry {
    counter: {
      methods: {
        getState: () => { count: number };
        increment: () => void;
      };
    };
  }
}

const useCounterClient = (): ClientOutput<"counter"> => {
  const [state, setState] = useState({ count: 0 });
  return {
    getState: () => state,
    increment: () => setState({ count: state.count + 1 }),
  };
};

const CounterClient = resource(useCounterClient);

function App() {
  const aui = useAui({ counter: CounterClient() });
  return (
    <AuiProvider value={aui}>
      <Counter />
    </AuiProvider>
  );
}

function Counter() {
  const count = useAuiState((s) => s.counter.count);
  const aui = useAui();
  return <button onClick={() => aui.counter().increment()}>{count}</button>;
}

Full API reference (clients, derived clients, events, useClientLookup, useClientList) at assistant-ui.com/tap/docs/store/quickstart.

Keywords

state-management

FAQs

Package last updated on 17 Jun 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts