atagen

roundabout

public
Star0
Watch0
4e5ca2e2040139a56cdd8bc50993e0f82ceab09a
1
ssh://brewery@pls.lobotomise.me:33/atagen/roundabout.git
nix/codex-hooks.nixNix21 lines531 B
1
{ lib, roundabout }:
2
3
let
4
  hook = event: {
5
    type = "command";
6
    command = "${lib.getExe roundabout} hook codex-${event}";
7
  };
8
in
9
{
10
  PreToolUse = [
11
    {
12
      matcher = "Bash";
13
      hooks = [ (hook "pre-tool-use") ];
14
    }
15
  ];
16
  PostToolUse = [ { hooks = [ (hook "post-tool-use") ]; } ];
17
  UserPromptSubmit = [ { hooks = [ (hook "prompt-submit") ]; } ];
18
  Stop = [ { hooks = [ (hook "stop") ]; } ];
19
  SubagentStop = [ { hooks = [ (hook "subagent-stop") ]; } ];
20
  SessionEnd = [ { hooks = [ (hook "session-end") ]; } ];
21
}