Commit Graph
11 Commits
Author SHA1 Message Date
Clovis 3f8b31dcb8 fix: also fix hook_event_name env-var bug found by pre-merge review; sanitize session_id
Same class of bug as the session_id fix, one field over, found by code-reviewer
before merge: CLAUDE_HOOK_EVENT_NAME is never set for hook subprocesses either
(currently a harmless no-op since the dispatcher only ever calls this hook under
PostToolUse, but a real latent bug if that wiring ever changes). Also runs the
stdin-derived session_id through sanitizeSessionId(), matching the established
pattern already used in cost-tracker.js, ecc-context-monitor.js,
ecc-metrics-bridge.js, and gateguard-fact-force.js.
2026-09-05 17:08:47 -07:00
Clovis cfca5c8153 fix: session-activity-tracker never records (CLAUDE_SESSION_ID unset)
session-activity-tracker.js is correctly registered in
posttooluse-dispatcher.js's SYNC_HOOKS and fires on every tool call --
but buildActivityRow() only ever read the session id from
ECC_SESSION_ID/CLAUDE_SESSION_ID environment variables, which Claude
Code does not actually set for hook subprocesses. Every row silently
came back null and nothing was ever written to
~/.claude/metrics/tool-usage.jsonl, with no error anywhere.

The session id is available in the hook's own stdin JSON payload
(input.session_id) in real invocations. This prefers that, keeping the
env vars as a fallback. New test added; all 18 existing + new tests
pass.

Also adds a live Activity view to the capabilities dashboard
(scripts/dashboard-web.js) reading that same metrics file, so Skill
vs. Agent vs. raw-tool usage is visible in real time instead of
requiring a manual tail+jq -- verified live against a real session
before this commit. Documents the loopback-only, no-auth design and
the standard SSH-port-forwarding pattern for viewing it from another
device you control.
2026-09-05 16:58:17 -07:00
Affaan MustafaandGitHub 2b09308224 Merge pull request #1384 from KeWang0622/fix/lint-md028-eqeqeq
fix: resolve markdownlint MD028 + ESLint eqeqeq lint failures
2026-04-12 23:03:19 -07:00
Affaan MustafaandGitHub fc5921a521 fix: detach ecc2 background session runners (#1387)
* fix: detach ecc2 background session runners

* fix: stabilize windows ci portability

* fix: persist detached runner startup stderr

* fix: prefer repo-relative hook file paths

* fix: make npm pack test shell-safe on windows
2026-04-12 22:29:05 -07:00
Ke Wang 6a247d4c43 fix: resolve markdownlint MD028 and ESLint eqeqeq warnings
Fix two lint issues that cause `npm run lint` to exit non-zero:

1. README.md (MD028): Two consecutive blockquotes separated by a bare
   blank line. Markdownlint treats this as one blockquote with an
   illegal blank line inside. Replace the blank line with a `>`
   continuation so both paragraphs stay in the same blockquote.

2. session-activity-tracker.js (eqeqeq): Three instances of `== null`
   replaced with explicit `=== null || === undefined` guards to satisfy
   the repo's `eqeqeq: warn` ESLint rule.

Closes #1366
2026-04-12 16:00:55 -05:00
Affaan Mustafa b01a300c31 feat(ecc2): persist tool log params and trigger context 2026-04-09 08:04:18 -07:00
Affaan Mustafa 31f672275e feat(ecc2): infer tracked write modifications 2026-04-09 07:48:29 -07:00
Affaan Mustafa eee9768cd8 feat(ecc2): persist file activity patch previews 2026-04-09 07:45:37 -07:00
Affaan Mustafa c395b42d2c feat(ecc2): persist file activity diff previews 2026-04-09 07:40:28 -07:00
Affaan Mustafa edd027edd4 feat(ecc2): classify typed file activity 2026-04-09 07:33:42 -07:00
Affaan Mustafa 48fd68115e feat(ecc2): sync hook activity into session metrics 2026-04-09 07:02:24 -07:00