🧬 v1.0.158 — seed-parity envelope + classified events
7 commits since v1.0.157. Per-event enrichment lands the error/command/duration classifiers, plus a session-level rollup that gives analytics-opt-in users seed-parity coverage. Windows test hardening folded in to keep CI green across all 3 OSes.
✨ Highlights
- 🧬 Seed-parity envelope (
d4c3647) — every event now ships enriched with per-event facts (error category, file paths, session origin, blocker status) plus a session-level rollup snapshot (12 aggregate fields stamped onto every outgoing event). Analytics-opt-in users see seed-grade event payloads on every hook fire. - 🏷️ Error / command / duration classifiers (
1d7affa) —classifyError10-category lookup (auth,network,permission,not_found,syntax, …), Bash command verb classification, and PreToolUse-marker-based duration capture. Drives downstream pattern surfaces likeerror_recovery_lagandtool_latency_outlier. - 🪟 Windows test hardening (
platform-bridgetest suite ×4) — explicitAPPDATA/XDG_CONFIG_HOMEoverrides, drop/bin/bashfromexecSynccalls (Windows incompatibility), platform-aware config-path construction. Brings the bridge test suite to fully cross-platform green.
🐞 Bug Fixes
Hooks & enrichment
feat(hooks): seed-parity envelope — per-event enrichment + session rollup(d4c3647) —enrichEventForPlatformderives per-event facts;getSessionRollupaggregates 12 session-level signals; every outbound event payload merges both before crossing the bridge wire.
Classifiers (new)
feat(hooks): classifiers for error/command/duration metadata(1d7affa) —src/session/error-classifier.ts(new, 10 categories),deriveBashMetadata(canonical verbs),readLatencyMs(PreToolUse → PostToolUse marker delta). All ride existing event envelope.
Cross-platform tests
- 4 platform-bridge test hardening commits — Windows runner was leaking real
APPDATAinto fake config paths, andexecSynccalls used/bin/bashshell explicitly (POSIX-only). Tests now use platform-aware paths via the runtime resolver, no explicit shell.
🎨 Features
SessionDB.getSessionRollup— 12-field aggregate (event_count,error_count,unique_files_edited,max_file_edits,has_commit,commit_message,total_duration_ms,session_origin, …) stamped on every outbound event so downstream analytics doesn't need to JOIN.src/session/error-classifier.ts— 10-category error lookup mirrors seed data:auth,network,permission,not_found,syntax,dependency,timeout,crash,validation,unknown.deriveBashMetadata— algorithmic canonical-verb extraction (no regex) from Bash commands. Powersbash_verbstamping.
⚡ Performance
- Rollup computed once per batch —
getSessionRollupruns as a single SQL aggregate oversession_eventsand spreads onto every event in the batch via{...enriched, ...rollup}. No per-event SQL.
📦 Install / upgrade
# Fresh install (Claude Code plugin marketplace)
/plugin add https://github.com/mksglu/context-mode
# npm global
npm install -g context-mode@1.0.158
# Existing install — in-place upgrade
context-mode upgradeThen restart your MCP session (or run /reload-plugins in Claude Code).
🔗 Full changelog
🤖 Release notes retroactively rewritten in v1.0.152 style — the original body's "broader session-level context" framing hid the actual shipping work (3 new classifier subsystems + cross-platform test green-up).