{
  "hooks": {
    "SessionStart": [
      {
        "hooks": [
          {
            "type": "command",
            "name": "token-optimizer-session-guidance",
            "command": "node \"${extensionPath}${/}integrations${/}gemini${/}hooks${/}session-start.mjs\"",
            "timeout": 5000,
            "description": "Load token-optimizer guidance into the Gemini session."
          }
        ]
      }
    ],
    "BeforeTool": [
      {
        "matcher": "read_file|search_file_content|glob|replace|write_file|run_shell_command",
        "hooks": [
          {
            "type": "command",
            "name": "token-optimizer-route",
            "command": "node \"${extensionPath}${/}integrations${/}gemini${/}hooks${/}pre-tool.mjs\"",
            "timeout": 5000,
            "description": "Route expensive built-in operations to token-optimizer before they consume context."
          }
        ]
      }
    ],
    "AfterTool": [
      {
        "matcher": "replace|write_file|run_shell_command",
        "hooks": [
          {
            "type": "command",
            "name": "token-optimizer-capture",
            "command": "node \"${extensionPath}${/}integrations${/}gemini${/}hooks${/}post-tool.mjs\"",
            "timeout": 5000,
            "description": "Capture completed changes and inject relevant graph findings."
          }
        ]
      }
    ],
    "AfterAgent": [
      {
        "hooks": [
          {
            "type": "command",
            "name": "token-optimizer-semantic-harvest",
            "command": "node \"${extensionPath}${/}integrations${/}gemini${/}hooks${/}stop.mjs\"",
            "timeout": 5000,
            "description": "Let the active Gemini model record durable conclusions before finishing."
          }
        ]
      }
    ]
  }
}
