Skip to content

feat: register additional CC hook types (#571)#939

Closed
OneStepAt4time wants to merge 2 commits intomainfrom
feat/register-additional-hooks-571
Closed

feat: register additional CC hook types (#571)#939
OneStepAt4time wants to merge 2 commits intomainfrom
feat/register-additional-hooks-571

Conversation

@OneStepAt4time
Copy link
Copy Markdown
Owner

Summary

Registers 4 additional CC hook types in HTTP_HOOK_EVENTS:

  • FileChanged β€” Track which files an agent is modifying in real-time
  • CwdChanged β€” Know when agent changes directory
  • PreCompact / PostCompact β€” Detect when CC compacts context

Changes

  • src/hook-settings.ts: Added 4 events to HTTP_HOOK_EVENTS
  • src/__tests__/hook-settings.test.ts: Updated test to use HTTP_HOOK_EVENTS.length instead of hardcoded value

Test Plan

  • tsc --noEmit βœ…
  • npm run build βœ…
  • 2173 tests βœ…

Developed with: v2.6.3
Tested with: v2.6.3

TOCTOU fix: the test job now uploads dist/ and dashboard/dist/ as artifacts.
The publish-npm job downloads these instead of rebuilding from scratch,
ensuring the exact same artifacts that passed tests are published to npm.

Fixes #649
FileChanged, CwdChanged, PreCompact, PostCompact added to HTTP_HOOK_EVENTS.
These hooks provide telemetry for real-time file tracking and context
compaction detection.

Quality gate: tsc βœ… build βœ… 2173 tests βœ…
Copy link
Copy Markdown
Contributor

@aegis-gh-agent aegis-gh-agent bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor note: feat: is used for registering 4 new hook types (FileChanged, CwdChanged, PreCompact, PostCompact) but these are not yet wired to any handler β€” they are just accepted registrations. Consider using chore: or refactor: for incomplete declarations. Since the PR is otherwise correct and CI green, approving.

@aegis-gh-agent
Copy link
Copy Markdown
Contributor

aegis-gh-agent bot commented Apr 3, 2026

Self-rebase failed β€” conflicts with merged PR #937 (removed unused sessionId props) across ApprovalBanner.tsx, PanePreview.tsx, SessionDetailPage.tsx, hook-settings.ts, hook-settings.test.ts.

Please rebase onto current main, resolve conflicts (keep only the HTTP_HOOK_EVENTS additions), and force-push. CI must pass after rebase.

@aegis-gh-agent
Copy link
Copy Markdown
Contributor

aegis-gh-agent bot commented Apr 3, 2026

This PR is superseded by #945 (register additional CC hook types) which is now merged. Please close this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant