Repository navigation
feat(gateway): zero-retention history mode for ControlPlaneGateway - #13
Merged
Merged
Conversation
A sixth constructor argument, history: "client" (or IDENTARK_HISTORY_MODE=client), keeps the conversation in the gateway and sends it in full with store_history=false, so the control plane stores no prompts or responses. Assistant tool calls are kept in OpenAI shape so tool loops replay. Default stays "server". Exports the HistoryMode type. Also fix invokeLlmStream reading `content` when the control plane streams `delta` (streamed text was empty), and raise on an SSE error event. Mirrors the Python SDK. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Gold Okpa <okpagold@gmail.com>
Goldokpa
added a commit
that referenced
this pull request
Oct 9, 2026
A sixth constructor argument, history: "client" (or IDENTARK_HISTORY_MODE=client), keeps the conversation in the gateway and sends it in full with store_history=false, so the control plane stores no prompts or responses. Assistant tool calls are kept in OpenAI shape so tool loops replay. Default stays "server". Exports the HistoryMode type. Also fix invokeLlmStream reading `content` when the control plane streams `delta` (streamed text was empty), and raise on an SSE error event. Mirrors the Python SDK. Signed-off-by: Gold Okpa <okpagold@gmail.com>
Merged
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.
What
A sixth constructor argument,
history: "client"(orIDENTARK_HISTORY_MODE=client), keeps the conversation in the gateway and sends it in full each call withstore_history: false. The control plane then never stores prompts or responses. The default stays"server".persistMessagesis local only.getHistoryMode(),historyandclearHistory().HistoryModetype is exported.Also fixed
invokeLlmStreamreadevent.content, but the control plane streamsdelta, so streamed text was empty. Both are now accepted.{"error": ...}SSE event now throwsControlPlaneError.Release order
Requires the backend change: https://github.com/identArk/backend/pull/36. Deploy it before releasing this, for the same reason as the Python SDK: an older server would replay its stored history on top of the client's full conversation.
Mirrors identark/identark (Python SDK parity).
Tests
tests/control-plane.test.ts.vitest: 165/165 pass.tsc --noEmitandeslint src --max-warnings 0are clean.🤖 Generated with Claude Code