feat(cloud): opt-in chat capture in @ratel-ai/cloud (RAT-292) + ADR-0014#84
Draft
kayraucklnc wants to merge 3 commits into
Draft
Conversation
…acy (Proposed) POST /api/v1/chats; content-hash chain dedup → pseudo-sessions with id-less prefix-probe inference; opt-in capture + cloud-side redaction; manual server-side extraction. Extends ADR-0013; core stays PII-free + network-free.
…/chats
recordMessages(conversationId, messages, opts?) and trackConversation(id)
ship conversation turns to POST {host}/api/v1/chats (ADR-0014), a second
endpoint beside /events on its own buffer — same batching, retry/backoff,
never-throws, and process-exit flush. Off by default; gated by captureChats
or RATEL_CAPTURE_CHATS and only ships with an api key (privacy). Wire body is
snake_case {conversation_id, messages:[{role,content,seq,occurred_at?}],
metadata?}; seq defaults to array index; v1 ships the full array, server dedups.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Should be merged after #82
Stacked on #82 (RAT-307).
POST /api/v1/chats, content-hash dedup → pseudo-sessions (id-less prefix-probe), opt-in capture + cloud-side redaction, manual server-side extraction. Extends ADR-0013; core stays PII-free + network-free.recordMessages()/trackConversation(), second endpoint + separate buffer, opt-in (captureChats/RATEL_CAPTURE_CHATS), server-only dedup, never throws. 24 cloud tests; @ratel-ai/sdk 68 unchanged. No Rust core change.Python parity DEFERRED to post-merge (needs #81's exporter + this TS work on one base).