ai-lens 0.8.95 → 0.8.96

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/.commithash CHANGED
@@ -1 +1 @@
1
- defcd78
1
+ 549ce90
package/CHANGELOG.md CHANGED
@@ -2,6 +2,9 @@
2
2
 
3
3
  History of changes to the `ai-lens` CLI package on npm. New entries go on top. Format: `## X.Y.Z — YYYY-MM-DD`, followed by user-facing bullets.
4
4
 
5
+ ## 0.8.96 — 2026-06-17
6
+ - fix: `ai-lens status` now reports a Windows Cursor (or Claude Code) hook that lacks the windowless `conhost.exe --headless` wrapper as outdated, so a normal re-run of `ai-lens init` (or `/setup`) upgrades it in place. Previously the console-flash fix from 0.8.95 only applied to brand-new installs; existing hooks were considered up-to-date and never rewritten. macOS/Linux, older Windows, and Codex hooks are unaffected
7
+
5
8
  ## 0.8.95 — 2026-06-17
6
9
  - fix: on Windows, Cursor hooks no longer flash a console window on every event (including new-session start) — the hook command is now wrapped in `conhost.exe --headless` (Windows 10 1809+), the same windowless form Claude Code hooks already use. Older Windows builds and macOS/Linux are unchanged. Re-run `ai-lens init` to apply
7
10
  - feat: `ai-lens init` now warns when the configured `projects` filter does not cover the workspace you're setting up — a stale filter silently drops all capture (hooks look configured but record nothing)
package/cli/hooks.js CHANGED
@@ -1088,9 +1088,26 @@ function isCurrentAiLensHook(entry, expected, opts = {}) {
1088
1088
  // Exception (allowPlatformRewrite, set for untracked/per-machine files): a
1089
1089
  // $CLAUDE_PROJECT_DIR/%CLAUDE_PROJECT_DIR% hook written for the OTHER OS won't
1090
1090
  // expand on this platform, so flag it outdated to let init rewrite it.
1091
+ //
1092
+ // Windowless exception (same allowPlatformRewrite gate): when the freshly
1093
+ // regenerated `expected` command carries the `conhost.exe --headless` wrapper
1094
+ // (Cursor/Claude on conhost-capable Windows) but the stored command does NOT,
1095
+ // flag it outdated so init upgrades it — otherwise a pre-conhost install stays
1096
+ // `current` forever and keeps flashing a console window on every event. We
1097
+ // compare ONLY the windowless dimension (not the whole command), so legitimate
1098
+ // path/node/install-mode variation never false-flags. `expected` already bakes
1099
+ // in tool+platform+conhost-support (makeCursorHookDefs/makeClaudeHookDefs pass
1100
+ // windowless:true; makeCodexHookDefs does not), so this self-scopes: Codex,
1101
+ // macOS, and old Windows produce a non-conhost `expected` and never trip it.
1102
+ // Committed (tracked) files are exempt via allowPlatformRewrite — they carry one
1103
+ // OS-agnostic syntax and can't bake a Windows-only wrapper; the per-machine
1104
+ // overlay provides the windowless path.
1091
1105
  const { platform = process.platform, allowPlatformRewrite = false } = opts;
1106
+ const expectedCmd = expected?.command ?? expected?.hooks?.[0]?.command ?? '';
1107
+ const expectedWindowless = isConhostHeadlessCommand(expectedCmd);
1092
1108
  const ok = (cmd) => isAcceptableHookCommand(cmd)
1093
- && !(allowPlatformRewrite && isWrongPlatformProjectDirCommand(cmd, platform));
1109
+ && !(allowPlatformRewrite && isWrongPlatformProjectDirCommand(cmd, platform))
1110
+ && !(allowPlatformRewrite && expectedWindowless && !isConhostHeadlessCommand(cmd));
1094
1111
  // Flat format (Cursor): single command per entry.
1095
1112
  if (entry?.command != null) {
1096
1113
  return ok(entry.command);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ai-lens",
3
- "version": "0.8.95",
3
+ "version": "0.8.96",
4
4
  "type": "module",
5
5
  "description": "Centralized session analytics for AI coding tools",
6
6
  "bin": {