Files
plugins/packages/codex-history/package.json
T
unisong 7687314d07 codex-history: opt-in Codex Responses history filter middleware (#152)
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.
2026-10-16 15:11:17 +08:00

33 lines
708 B
JSON

{
"name": "@magpie-community/middleware-codex-history",
"version": "0.1.0",
"description": "Opt-in, per-provider Codex Responses history compatibility for Magpie",
"type": "module",
"license": "MIT",
"files": [
"codex-history.middleware.js",
"README.md",
"LICENSE",
"PROVENANCE.json"
],
"keywords": [
"magpie",
"magpie-middleware",
"codex",
"responses",
"history"
],
"repository": {
"type": "git",
"url": "git+https://github.com/magpie-community/plugins.git",
"directory": "packages/codex-history"
},
"magpie": {
"middleware": "./codex-history.middleware.js",
"options": {
"providers": {},
"aliases": {}
}
}
}