GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat(session): add storage interface for pluggable session backends by ryanjwong · Pull Request #15922 · anomalyco/opencode

Conversation

@ryanjwong

@ryanjwong ryanjwong commented Mar 4, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Issue for this PR

Closes #

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

This adds a typed storage contract for session persistence, wraps SQLite behind that contract, and makes the contract async-compatible so non-SQLite providers can be added more easily.

Changes included:

  • Added SessionStore + SessionStoreTx interfaces in packages/opencode/src/session/store.ts, with operation groups for sessions/messages/parts/todos/permissions.
  • Added schema-derived insert/select types (SessionInput, SessionRow, etc.).
  • Added Asyncable<T> return support across the store interface (use, transaction, effect, and tx methods).
  • Added SqliteSessionStore adapter in packages/opencode/src/session/store.sqlite.ts that wraps Database.use, Database.transaction, and Database.effect.
  • Routed core write paths through the adapter:
    • Session.updateMessage, Session.removeMessage, Session.removePart, Session.updatePart
    • Todo.update and Todo.get (now async to align with async-capable store)
  • Exported store types and sqlite adapter from packages/opencode/src/session/index.ts.

This remains incremental: runtime behavior should stay equivalent while introducing a real, async-ready boundary for follow-up backends.

How did you verify your code works?

  • Installed Bun (1.3.10) in this environment
  • Ran bun install at repo root
  • Ran bun run typecheck in packages/opencode
  • Pushed branch successfully; pre-push hook ran bun turbo typecheck and passed

Screenshots / recordings

N/A (no UI changes)

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@ryanjwong
feat(session): add pluggable session store interfaces
89b2aa0
@github-actions github-actions Bot added needs:compliance This means the issue will auto-close after 2 hours. and removed needs:compliance This means the issue will auto-close after 2 hours. labels Mar 4, 2026
@github-actions

github-actions Bot commented Mar 4, 2026

Copy link
Copy Markdown
Contributor

Thanks for updating your PR! It now meets our contributing guidelines. 👍

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

ryanjwong added 3 commits March 3, 2026 16:25
@ryanjwong
refactor(session): add sqlite store adapter and route writes
117c952
@ryanjwong
refactor(session): make store contract async-compatible
6f932cf
@ryanjwong
fix(session): preserve part update events with async store
3e650e2
@guazi04 guazi04 mentioned this pull request Mar 5, 2026
[FEATURE]: Session Lifecycle Management — unified storage reclamation, auto-archival, and child session cleanup #16101
Closed
1 task done
@github-actions github-actions Bot mentioned this pull request Mar 10, 2026
Add SQLite storage layer with FTS5 for memory-efficient data persistence #16913
Closed
4 of 6 tasks
@opencode-agent
opencode-agent Bot force-pushed the dev branch from 2f2ed11 to 9f201d6 Compare April 16, 2026 21:55
@github-actions

github-actions Bot commented May 3, 2026

Copy link
Copy Markdown
Contributor

Closing this pull request because it has had no updates for more than 60 days. If you plan to continue working on it, feel free to reopen or open a new PR.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot closed this May 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@ryanjwong
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.