An opt-in gateway middleware for Codex Responses history after a provider or account switch. For a provider whose rule turns historyFilter on, it drops old reasoning items and items typed encrypted_content, removes the optional server id from message and tool items, and sets store false. It keeps text, tool arguments, results and call_id pairing. It rejects previous_response_id, conversation, item_reference, encrypted compaction and /responses/compact with a message, instead of dropping them silently. Every provider passes through unless configured. No network, file, env or child-process access. Run at the reviewed head 96881ead, merged with origin/main: - bun test packages/codex-history: 22 pass, 0 fail. - The same 22 cases.json cases through magpie's own engine (moejs, via internal/middleware Begin/Request in a throwaway test): 22 ran, all equal. - Broke it by hand (reasoning items kept): bun 4 fail, moejs 4 BAD; restored. - Whole repo: bun test 1606 pass, 0 fail; bun scripts/check.mjs exit 0.
20 lines
724 B
JSON
20 lines
724 B
JSON
{
|
|
"source": "https://github.com/unisong/codex-filter-manager",
|
|
"commit": "40f98308f364ca8533c30c11a2cede4ea00542f3",
|
|
"version": "v1.0.5",
|
|
"license": "MIT",
|
|
"files": {
|
|
"magpie-plugin/history-filter.mjs": {
|
|
"sha256": "45d969daf0a6185fba2cbf8b76910d7bcb63e012d4767c46863b520f17c80925"
|
|
},
|
|
"magpie-plugin/history.middleware.js": {
|
|
"sha256": "b4da0d27961861904ba8577633717c6e14c36e78508ff95074fa24fb98d76a06"
|
|
}
|
|
},
|
|
"changes": [
|
|
"Inlined the shared history algorithm and request hook into one import-free middleware file.",
|
|
"Removed helper exports; only onRequest is exported.",
|
|
"No model detection, guard, dashboard, proxy service or provider configuration is included."
|
|
]
|
|
}
|