Skip to content

feat(memory): Add storage-backed plugin package#623

Draft
dcramer wants to merge 4 commits into
mainfrom
feat/memory-plugin-storage
Draft

feat(memory): Add storage-backed plugin package#623
dcramer wants to merge 4 commits into
mainfrom
feat/memory-plugin-storage

Conversation

@dcramer

@dcramer dcramer commented Jun 19, 2026

Copy link
Copy Markdown
Member

Adds the first memory plugin package slice: a trusted @sentry/junior-memory registration, plugin-owned SQL migration/schema, deterministic write policy, and a scoped store for create, list, search, and archive operations. The store derives personal and conversation visibility from runtime context, supports scoped idempotency, and keeps lexical search inside the visible active predicate.

I checked both the Ash memory prior art and broader memory systems before settling the storage shape. Ash uses an authoritative memories table plus a separate rebuildable memory_embeddings vector index. LangGraph frames long-term memory as scoped documents keyed by namespace/key, Letta keeps editable memory blocks and persisted messages separate, Mem0 exposes id/content/user scope/category/timestamp style memory records, and Zep puts richer entity/fact invalidation into a graph layer. For Junior, that points to a lean source-of-truth row now, with vector storage, graph/entity data, extraction confidence, subject labels, and operational metadata deferred until concrete consumers exist.

The memory row now carries only the fields needed for the current explicit tool/storage slice and near-term lifecycle semantics: authority-bearing scope/source, type/sensitivity, content/hash, idempotency, observed/created/expiration timestamps, and archive/supersession markers. This intentionally stops before model-visible tools, automatic prompt recall, passive extraction, and embeddings. The PR wires the package into release automation and adds component coverage over the real plugin DB migration path, including visibility isolation, policy rejection, idempotent retries, and lexical search beyond newest-row limits.

Add the initial memory plugin package with SQL schema, migration artifacts, deterministic write policy, and a scoped store for create, list, search, and archive operations.

Wire the package into release automation and add component coverage over the real plugin DB migration path so the storage boundary is reviewable before tools, prompt recall, extraction, or embeddings are introduced.

Co-Authored-By: GPT-5 Codex <codex@openai.com>
@vercel

vercel Bot commented Jun 19, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
junior-docs Ready Ready Preview, Comment Jun 20, 2026 2:38am

Request Review

Comment thread packages/junior-memory/src/store.ts
Comment thread packages/junior-memory/src/scope.ts
Comment thread packages/junior-memory/src/store.ts
Add explicit memory source kind and supersession timestamp fields so stored rows preserve the provenance and lifecycle data needed by later extraction and supersession work. Keep active duplicate and visibility filters aligned with superseded state.

Co-Authored-By: GPT-5 Codex <gpt-5-codex@openai.com>

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

There are 2 total unresolved issues (including 1 from previous review).

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 5f9cfc2. Configure here.

Comment thread packages/junior-memory/src/store.ts
Keep the authoritative memory row focused on concrete storage, visibility, source, idempotency, and lifecycle fields. Remove speculative provenance, metadata, subject label, and extraction confidence columns until the extraction or graph paths introduce concrete consumers.

Co-Authored-By: GPT-5 Codex <gpt-5-codex@openai.com>
Align the memory store with the lean storage contract after review. Keep Slack conversation scope source-derived, archive expired duplicates before recreation, exclude expired rows from archive, remove speculative archived-list and policy exports, and update the memory specs to match the first storage slice.

Co-Authored-By: GPT-5 Codex <gpt-5-codex@openai.com>
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