1 # Example siGit Code settings with hooks configured
2 # Place this at ~/.config/sigit/settings.toml
3
4 # Whether to use on-device inference (true) or cloud (false)
5 local_inference = true
6
7 # Tool permission policy
8 [permissions]
9 # Default permission mode: allow, ask, or deny
10 default = "ask"
11
12 # Per-tool overrides
13 [permissions.tools]
14 edit_file = "ask"
15 run_command = "ask"
16
17 # Argument-level allow/deny rules
18 [permissions.rules]
19 allow = ["run_command(cargo *)"]
20 deny = ["run_command(rm -rf *)"]
21
22 # Extensibility hooks for session and tool lifecycle
23 [hooks]
24
25 # SessionStart hooks run when a session begins (new/load/fork)
26 # Available variables: {cwd}, {session_id}
27 session_start = [
28 "echo 'Starting siGit session in {cwd}'",
29 # Uncomment to build on session start:
30 # "cd {cwd} && cargo build",
31 ]
32
33 # PreToolUse hooks run before a tool is executed
34 # Available variables: {tool_name}, {tool_args_len}, {cwd}
35 pre_tool_use = [
36 # Log tool usage
37 "echo '[TOOL] {tool_name}' >> /tmp/sigit-tool-log.txt",
38 # Uncomment to show which tools run:
39 # "echo 'About to run: {tool_name} ({tool_args_len} bytes of args)'",
40 ]
41
42 # PostToolUse hooks run after a tool is executed
43 # Available variables: {tool_name}, {tool_result_len}, {cwd}
44 post_tool_use = [
45 # Log result size
46 "echo '[RESULT] {tool_name}: {tool_result_len} bytes' >> /tmp/sigit-tool-log.txt",
47 # Uncomment to track metrics:
48 # "echo {tool_result_len} >> /tmp/sigit-result-sizes.log",
49 ]