Skip to content

feat(core): add session metadata support#23068

Open
shantur wants to merge 1 commit intoanomalyco:devfrom
shantur:session-metadata
Open

feat(core): add session metadata support#23068
shantur wants to merge 1 commit intoanomalyco:devfrom
shantur:session-metadata

Conversation

@shantur
Copy link
Copy Markdown
Contributor

@shantur shantur commented Apr 17, 2026

Issue for this PR

Closes #

Type of change

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

What does this PR do?

Introduces a metadata field in sessions that can be used with SDK to persist client controlled JSON metadata for session. This is simlar to metadata available in Message.Parts
Session APIs and SDK exposes metadata for create, get, update, list, and fork operations.

Support full metadata replacement on session update, add copyMetadata to session forks with default copy behavior,

If you paste a large clearly AI generated description here your PR may be IGNORED or CLOSED!

How did you verify your code works?

Added tests and manual testing.

Screenshots / recordings

If this is a UI change, please include a screenshot or recording.

Checklist

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

If you do not follow this template your PR will be automatically rejected.

Persist session metadata in the session store and expose it across the session APIs and SDK so clients can round-trip metadata during create, get, update, list, and fork operations.

Add a JSON metadata column to the session table, thread metadata through the session model/projectors, and normalize empty metadata responses to {}.

Support full metadata replacement on session update, add copyMetadata to session forks with default copy behavior, regenerate the session SDK surface, and cover the behavior with server/session tests plus a migration for existing databases.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant