Skip to content

Add bounded memory and IndexedDB storage#2

Open
dskvr wants to merge 1 commit into
masterfrom
add-storage-backends
Open

Add bounded memory and IndexedDB storage#2
dskvr wants to merge 1 commit into
masterfrom
add-storage-backends

Conversation

@dskvr

@dskvr dskvr commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add memory and IndexedDB coordinator storage modes
  • add configurable message buffer limit for in-memory storage
  • evict old snapshot data before IndexedDB writes approach the configured byte limit
  • expose storage backend and buffer controls in runtime config

Validation

  • pnpm lint
  • pnpm build
  • pnpm test
  • pnpm test:e2e

The browser coordinator previously hid storage behavior behind identity persistence and used a SQLite snapshot wrapper. This makes storage a first-class runtime option with volatile memory and IndexedDB modes, bounds the in-memory message buffer, and trims IndexedDB snapshots before writes so message history is evicted before storage pressure becomes a hard failure.

Constraint: Browser coordinator storage remains snapshot-backed around the existing domain-shaped storage contract.

Rejected: Keep SQLite/KVVFS as the persistent backend | IndexedDB is the requested browser storage target and avoids carrying the unused wasm dependency.

Confidence: high

Scope-risk: moderate

Directive: Treat message buffer limits as message-history retention, not key-package or pending-request quotas.

Tested: pnpm lint; pnpm build; pnpm test; pnpm test:e2e; targeted vitest for storage/config/transport.

Not-tested: Real browser quota-exceeded behavior under multi-megabyte live chat history.
@dskvr

dskvr commented Jun 24, 2026

Copy link
Copy Markdown
Contributor Author

Agent misbehaved, wasn't supposed to delete sqlite-wasm, was supposed to add two new methods and leave existing method where it was. Will fix.

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