Skip to content

fix(hooks): run TypeScript hooks directly via Bun instead of compiled JS - #514

Merged
baleen37 merged 1 commit into
mainfrom
fix/hooks-bunx
Feb 20, 2026
Merged

fix(hooks): run TypeScript hooks directly via Bun instead of compiled JS#514
baleen37 merged 1 commit into
mainfrom
fix/hooks-bunx

Conversation

@baleen37

@baleen37 baleen37 commented Feb 20, 2026

Copy link
Copy Markdown
Owner

Summary

Replace dist/session-start.js and dist/auto-compact.js hook references with direct TypeScript execution via Bun (src/suggest-compacting/*.ts), eliminating the need for a build step.

Changes

  • hooks/hooks.json: Point hooks to .ts source files instead of compiled .js in dist/

Test plan

  • bun src/suggest-compacting/session-start.ts executes without errors with mock JSON input
  • bun src/suggest-compacting/auto-compact.ts executes and outputs compact suggestion correctly
  • All 290 BATS unit tests pass
  • All integration, skills, performance, and me tests pass on push

Summary by CodeRabbit

  • Chores
    • Updated hook command references to use TypeScript source files instead of compiled JavaScript.

- Replace dist/session-start.js and dist/auto-compact.js references with
  src/suggest-compacting/*.ts for direct Bun execution
- Add auto-branch creation from main/master in create-pr skill
@baleen37
baleen37 enabled auto-merge (squash) February 20, 2026 14:31
@coderabbitai

coderabbitai Bot commented Feb 20, 2026

Copy link
Copy Markdown

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Walkthrough

The hooks configuration file is updated to reference TypeScript source files directly under src/suggest-compacting instead of compiled JavaScript files under dist, affecting the SessionStart and PreToolUse hook commands.

Changes

Cohort / File(s) Summary
Hook Configuration
hooks/hooks.json
Updated hook commands to reference TypeScript source files (src/suggest-compacting/session-start.ts and src/suggest-compacting/auto-compact.ts) instead of compiled JavaScript files in the dist directory.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

  • baleen37/everything-agent#513: Modifies the TypeScript source files (session-start.ts and auto-compact.ts) that are now directly referenced by these hook commands, including interface/export cleanup.

Poem

🐰 Hooks hop straight to source, no compile delay,
TypeScript streams in the light of day,
From dist to src, a direct embrace,
Faster paths win the race!

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/hooks-bunx

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@baleen37
baleen37 merged commit 699cbb6 into main Feb 20, 2026
4 of 5 checks passed
@baleen37
baleen37 deleted the fix/hooks-bunx branch February 20, 2026 14:32
baleen-release-app Bot pushed a commit that referenced this pull request Feb 20, 2026
## [5.29.7](v5.29.6...v5.29.7) (2026-02-20)

### Bug Fixes

* **hooks:** run TypeScript hooks directly via Bun instead of compiled JS ([#514](#514)) ([699cbb6](699cbb6))
@coderabbitai coderabbitai Bot mentioned this pull request Feb 24, 2026
4 tasks
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