4 Commits

Author SHA1 Message Date
Maximilian Roos
6e4bcf6931 worktrunk: run Claude Code hooks through wt config plugins claude hook
The module wrote its own command for each Claude Code hook, copied from
Worktrunk's plugin before the plugin moved every hook to one command that
reads the event from the hook payload. The copies have since drifted:
WorktreeCreate always passes --create, so reopening a kept worktree fails;
activity markers follow the shell's cwd instead of CLAUDE_PROJECT_DIR; and
an EnterWorktree into a Worktrunk worktree isn't approved.

Each hook now runs `wt config plugins claude hook`, the command the plugin
registers for every event, so hook behavior follows the installed `wt`.
This drops the jq dependency and needs worktrunk 0.81.0 or later.
2026-11-17 13:44:35 -06:00
Zexin Yuan
603fbca129 worktrunk: fix skills path after installAgentSkills migration
nixpkgs#558216 switched the worktrunk package to the installAgentSkills
hook, moving the bundled skills from $out/skills/ to
$out/share/skills/worktrunk/.

Assisted-by: Claude-Code:GLM-5.3
Co-authored-by: Austin Horstman <khaneliman12@gmail.com>
2026-09-30 13:15:22 -05:00
Zexin Yuan
937d0571b0 worktrunk: add shell and Claude Code integrations
Build on the existing programs.worktrunk module:

- add bash/zsh/fish/nushell shell integrations, enabled by default via
  the corresponding home.shell.enable<SHELL>Integration options,
- add an opt-in programs.worktrunk.claudeCodeIntegration, which wires
  worktrunk into programs.claude-code: a statusLine, WorktreeCreate/
  WorktreeRemove hooks (so agent isolation routes through wt), activity
  state-marker hooks (🤖/💬 in wt list), and skills. Of the skills,
  /wt-switch-create is on by default while /worktrunk is off by default,
  since settings already manages the config it would help edit.

Both integrations need the wt binary, so they are inert when package is
set to null.

Follow-up to #9226, recreating the integration part of #9788.

Assisted-by: Claude-Code:GLM-5.3
2026-09-12 23:01:51 -05:00
eveeifyeve
df044b78fd worktrunk: add module
Co-authored-by: Willi Carlsen <carlsenwilli@gmail.com>
Co-authored-by: Robert Helgesson <robert@rycee.net>
2026-09-09 23:02:07 -05:00