2026-05-10 20:49:41 +02:00
{
"name" : "context-mode" ,
2026-06-29 21:17:55 +03:00
"version" : "1.0.169" ,
2026-05-10 20:49:41 +02:00
"description" : "MCP server that saves 98% of your context window with session continuity. Sandboxed code execution in 11 languages, FTS5 knowledge base with BM25 ranking, and automatic state restore across compactions." ,
"author" : {
"name" : "Mert Koseoğlu" ,
"url" : "https://github.com/mksglu"
} ,
"homepage" : "https://github.com/mksglu/context-mode#readme" ,
"repository" : "https://github.com/mksglu/context-mode" ,
"license" : "Elastic-2.0" ,
"keywords" : [
"mcp" ,
"context-window" ,
"sandbox" ,
"code-execution" ,
"fts5" ,
"bm25" ,
"playwright" ,
"context7"
] ,
"mcpServers" : "./.codex-plugin/mcp.json" ,
fix(codex): harden plugin hook routing (#575)
* fix(claude-config): static-import detect to fix Node 22.5 require(esm) gate
CI run 25877550371 failed on all 3 OS with 12 silent-empty assertion
errors in tests/security.test.ts > cross-adapter deny-policy parity:
every per-adapter test returned `policies = []` instead of the seeded
deny pattern. Local Node 20.19.2 + Node 22.22.2 both pass the same
tests; only CI's Node 22.5 was broken.
Root cause: `resolveAdapterGlobalSettingsPaths` lazy-loaded
`../adapters/detect.js` via
createRequire(import.meta.url)("../adapters/detect.js")
Both files compile to ESM under `"type": "module"`. `require()` of an
ESM module is FLAG-GATED on Node 22.x before 22.12 — it needs
`--experimental-require-module`. CI's actions/setup-node@v4 install of
Node 22.5 does not pass that flag by default. The require throws
ERR_REQUIRE_ESM, the surrounding try/catch eats it silently, the
function returns `[claudeGlobalPath]` only, and the test's seeded
`<fakeHome>/.cursor/settings.json` is never read → empty policies →
assertion fails on every adapter (cursor, codex, qwen-code, gemini-cli,
jetbrains-copilot, vscode-copilot) × 2 patterns = 12 fails per OS.
Why Node 20 and 22.22.2 passed locally: 20.x has require(esm) under the
same flag but vitest's test runner sets it via NODE_OPTIONS in its node
import; 22.12+ has it default-on. Node 22.5 specifically lives in the
flag-gated window with no implicit enabler — which is exactly the
version CI hopped to in 1b7d7a7.
Fix: replace the lazy createRequire dance with a static ESM import of
the two pure functions (`detectPlatform`, `getSessionDirSegments`). The
original "cycle worry" comment was hypothetical — detect.ts only
imports node: builtins, `./types.js` (type-only), and `./client-map.js`
(pure data). It does NOT import claude-config back. No cycle. Static
import sidesteps the require(esm) flag entirely, so the same code path
works on every supported Node version (20, 22.5, 22.12+, 24+).
Verified locally on Node 20:
npx vitest run tests/security.test.ts
→ 94 passed (94)
npx vitest run (full suite)
→ 3327 passed | 29 skipped (3356) — 147 files
* fix(codex): harden plugin hook routing
Ship Codex plugin hooks, pin hook execution to the Codex platform, and route exec_command cmd payloads through Bash policy checks.
Co-authored-by: Codex <noreply@openai.com>
* fix(codex): harden plugin hook routing
Ship Codex plugin hooks, pin hook execution to the Codex platform, and route exec_command cmd payloads through Bash policy checks.
Co-authored-by: Codex <noreply@openai.com>
* test(codex): relax hook manifest assertions
Co-authored-by: Codex <noreply@openai.com>
---------
Co-authored-by: Mert Koseoglu <bm.ksglu@gmail.com>
Co-authored-by: Codex <noreply@openai.com>
2026-05-17 05:12:38 -04:00
"hooks" : "./.codex-plugin/hooks.json" ,
2026-05-10 20:49:41 +02:00
"skills" : "./skills/" ,
"interface" : {
"displayName" : "context-mode" ,
"shortDescription" : "98% context window savings via FTS5 + sandboxed execution" ,
"developerName" : "Mert Koseoğlu" ,
"category" : "Productivity"
}
}