Skip to content

feat: share native stored-message data with SDK adapters - #697

Merged
danny-avila merged 1 commit into
mainfrom
danny-avila/native-message-data
Nov 17, 2026
Merged

danny-avila merged 1 commit into
mainfrom
danny-avila/native-message-data

Conversation

@danny-avila

Copy link
Copy Markdown
Collaborator

Transport and checkpoint adapters calling LangChain BaseMessage.toDict() can lose binary/Date/Map/Set values nested inside message metadata or tool artifacts before their own codec runs. The host model binding already avoids that conversion; this PR extracts and exports its toStoredMessage helper so integrations can reuse the same native field representation.

The host binding now consumes the shared helper. It reads current message fields, including values assigned after construction, tool artifacts/status, usage and tool-call fragments. Custom secret-bearing serializers fail closed rather than silently bypassing their redaction contract. Values retain references: this is a representation step, not a deep copy, JSON wire format or chunk-aware decoder. Callers must immediately apply their bounded codec and preserve chunk kind separately when relevant.

Validation: 420 tests across native-message, harness, tracing and preemption suites; Bun and TypeScript checks; scoped ESLint; CJS/ESM/declaration build; runtime circular-dependency checks. No package version change; release remains a separate commit. No Langfuse shaping changes or live exporter claim.

Related to #695 and #696. LibreChat wire-codec adoption remains the consuming transport change.

Copy link
Copy Markdown
Collaborator Author

@codex review

Please review the current PR head cfdb522. Confirm that this exact commit is the reviewed commit and ignore findings that apply only to earlier heads.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-17T01:50:11.442288Z cfdb522 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🚀

Reviewed commit: cfdb5223e4

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@danny-avila danny-avila mentioned this pull request Nov 17, 2026
@danny-avila
danny-avila merged commit 27dc908 into main Nov 17, 2026
13 checks passed
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