Skip to content

feat: add unstorage state adapter#348

Draft
Schniz wants to merge 2 commits intomainfrom
schniz/state-unstorage-adapter
Draft

feat: add unstorage state adapter#348
Schniz wants to merge 2 commits intomainfrom
schniz/state-unstorage-adapter

Conversation

@Schniz
Copy link
Copy Markdown

@Schniz Schniz commented Apr 8, 2026

Summary

  • add a new @chat-adapter/state-unstorage package implementing the full StateAdapter surface on top of unstorage, with JSDoc for in-IDE docs
  • include a comprehensive test suite mirroring state adapter compatibility scenarios (locks, cache, lists, queue, connection behavior) and switch subscriptions to per-key storage (sub:<threadId>) to avoid list RMW
  • wire the new package into workspace/integration checks and update docs/catalog references across README, docs pages, adapters catalog, and chat skill table

Validation

  • pnpm --filter @chat-adapter/state-unstorage test
  • pnpm --filter @chat-adapter/state-unstorage build
  • pnpm --filter @chat-adapter/integration-tests test
  • pnpm validate

@vercel
Copy link
Copy Markdown
Contributor

vercel bot commented Apr 8, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
chat Ready Ready Preview, Comment, Open in v0 Apr 8, 2026 2:59am
chat-sdk-nextjs-chat Ready Ready Preview, Comment, Open in v0 Apr 8, 2026 2:59am

@socket-security
Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addedunstorage@​1.17.59810010092100

View full report

@Schniz
Copy link
Copy Markdown
Author

Schniz commented Apr 9, 2026

this might not be good enough to ship because any read-manipulate-write code path will require distributed locking, which is not really possible with unstorage's api

at least until we will have unlock :hehehe:

could've been nice if we could ship that somehow though. maybe someone else has an idea?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant