feat: add autoRecallFormat config with safer plain default#150
feat: add autoRecallFormat config with safer plain default#150eisen0419 wants to merge 1 commit intoCortexReach:masterfrom
Conversation
Introduce autoRecallFormat option ('plain' | 'xml', default 'plain')
to reduce verbatim echo of injected memory context by the model.
- plain format uses [memory-context-start/end] markers with anti-leak
instructions instead of XML <relevant-memories> tags
- xml format preserves legacy behavior for backward compatibility
- Updated shouldCapture, strip, and skip functions to handle both formats
Closes CortexReach#85
|
Codex static review summary: I think this should be fix-then-merge. The direction is good, but there are a few meaningful issues in the current shape:
Suggested merge criteria:
My conclusion: fix-then-merge. |
Summary
The legacy
<relevant-memories>XML wrapper used for autoRecall injection can be echoed back verbatim by the model. This PR introduces a safer default format.Changes
autoRecallFormat("plain"|"xml", default"plain")[memory-context-start/end]markers with explicit anti-leak instructions<relevant-memories>behavior for backward compatibilityshouldCapture,stripAutoCaptureInjectedPrefix, andshouldSkipReflectionMessagenow handle both formatsautoRecallFormatinparsePluginConfigMigration
No action needed — the default changes from XML to plain automatically. Users who prefer the old format can set:
{ "autoRecallFormat": "xml" }Test plan
"plain""xml"explicitlyplugin-manifest-regressionfailure is a pre-existing version mismatch onmasterCloses #85