Context window optimization for AI coding agents. Sandboxes tool output, 98% reduction. 15 platforms
languages detected by GitHub · % code
every merged PR, grouped by type, newest first
Adds mcp-only `OMPAdapter` with `sessionDirSegments=['.omp']` registered in `getAdapter()` at src/adapters/base.ts, routing session DB, stats and content index to `~/.omp/context-mode/` instead of Claude fallback.
Adds `tier2-e2e-smoke.yml` workflow (pi/claude-code/opencode matrix, dispatch-only, 15min timeout), `run-pi-smoke.sh` forcing `ctx_index`+`ctx_search`+`ctx_execute`, and `assert-stats.mjs` failing if `tokens_saved` not positive.
Adds `skills/.ignore` listing `UPSTREAM-CREDITS.md` because package.json `files` overrides `.npmignore`, while Pi's loader honors `.ignore` via `IGNORE_FILE_NAMES` in `dist/core/skills.js:13`.
In `src/adapters/pi/extension.ts`, `before_agent_start` now awaits `_mcpBridgeReady` before returning, preventing Pi subagents (`--mode json -p --no-session`) from starting their first prompt with an empty `ctx_*` tool registry.
Adds `isStructurallyBounded()` that short-circuits the PreToolUse Bash nudge when the first token matches an allowlist (`pwd`, `git status`, `ls` without `-R`, `git log -<N>`, `--version`) AND no shell control operator (`|`, `&&`, `;`, `$()`) appears.
Adds `src/pi-mcp-bridge.ts` spawning `server.bundle.mjs` over stdio, runs MCP handshake then maps `tools/list` into `pi.registerTool()`; fire-and-forget bootstrap in `pi-extension.ts` plus SIGTERM on `session_shutdown`.
Adds 5s `HELPER_SPAWN_TIMEOUT_MS` cap on openBrowserSync/killProcessOnPort spawnSync and swaps the `state==="LISTENING"` predicate for a remote-column anchor (`0.0.0.0:0`/`[::]:0`), fixing netstat on non-EN Windows.
Adds `nodeSqliteHasFts5()` in `src/db-base.ts` probing `CREATE VIRTUAL TABLE USING fts5` on an in-memory `DatabaseSync`; falls back to `better-sqlite3` when missing instead of crashing `ctx_search`.
In `hooks/ensure-deps.mjs` and `scripts/postinstall.mjs`, resolves `prebuild-install/bin` via `createRequire` anchored on better-sqlite3 and spawns it with `process.execPath`, bypassing cmd.exe PATH and node-gyp/MSVC.
Wires `getLifetimeStats({sessionsDir})` into `persistStats()` with a 30s cache and shared `TOKENS_PER_EVENT=256` constant, so `bin/statusline.mjs` finally reads a non-zero `dollars_saved_lifetime` from the JSON sidecar.
Replaces `content ?? readFileSync(path)` in `ContentStore.index()` (src/store.ts:730) with `hasContent = typeof content === 'string' && content.length > 0` guard, aligning with boundary check at `src/server.ts:1074`.
Replaces plaintext `process.stdout.write` in `hooks/gemini-cli/sessionstart.mjs` with `console.log(JSON.stringify({ hookSpecificOutput: { hookEventName, additionalContext } }))`, matching Ora Studio and VS Code Copilot SessionStart hooks.
Replaces the `context-mode-guidance-<ppid>` marker with `s-<sessionId>` in `guidanceOnce()`/`routePreToolUse` of `hooks/core/routing.mjs`; on Git Bash Windows each hook spawned a fresh PID so the throttle never fired.
Adds readGrandparentPpidImpl() in src/lifecycle.ts running `ps -o ppid= -p $PPID` to detect start.mjs death when npm exec keeps the direct ppid alive.