summaryrefslogtreecommitdiff
path: root/plugins/code-modernization/hooks
diff options
context:
space:
mode:
authorMorgan Lunt <morganl@anthropic.com>2026-09-25 12:06:43 -0700
committerMorgan Lunt <morganl@anthropic.com>2026-09-25 12:06:43 -0700
commitc8874f5ad883e26428f483ffa4d537cc81489e64 (patch)
tree191df20989c34e9808757726f4b75740ce523c5f /plugins/code-modernization/hooks
parent363af43603ecdb1bdbed7303764b6daeeec7c37f (diff)
code-modernization: count failures and the machine's python, once per versionmorganl/code-modernization-consolidated
Usage counts now say what the plugin runs on (system, python status and version, path problems) and which kind of failure happens: a missing or placeholder python, a permission block, a model error, or an error in the plugin's own script. Failures are classified on the machine into a fixed list and only the code is sent, once per kind per session. A session-start ping, once per plugin version, counts machines where nobody gets as far as typing a command. When python cannot run, the shell wrapper reports that itself, and on Windows it falls back to python or the py launcher.
Diffstat (limited to 'plugins/code-modernization/hooks')
-rw-r--r--plugins/code-modernization/hooks/hooks.json42
1 files changed, 42 insertions, 0 deletions
diff --git a/plugins/code-modernization/hooks/hooks.json b/plugins/code-modernization/hooks/hooks.json
index 6ac35230..4e14b065 100644
--- a/plugins/code-modernization/hooks/hooks.json
+++ b/plugins/code-modernization/hooks/hooks.json
@@ -21,6 +21,48 @@
"command": "sh \"${CLAUDE_PLUGIN_ROOT}/scripts/telemetry.sh\" state",
"timeout": 10,
"asyncRewake": true
+ },
+ {
+ "type": "command",
+ "command": "sh \"${CLAUDE_PLUGIN_ROOT}/scripts/telemetry.sh\" run",
+ "timeout": 10,
+ "asyncRewake": true
+ }
+ ]
+ }
+ ],
+ "SessionStart": [
+ {
+ "hooks": [
+ {
+ "type": "command",
+ "command": "sh \"${CLAUDE_PLUGIN_ROOT}/scripts/telemetry.sh\" health",
+ "timeout": 10,
+ "asyncRewake": true
+ }
+ ]
+ }
+ ],
+ "PostToolUseFailure": [
+ {
+ "hooks": [
+ {
+ "type": "command",
+ "command": "sh \"${CLAUDE_PLUGIN_ROOT}/scripts/telemetry.sh\" failure",
+ "timeout": 10,
+ "asyncRewake": true
+ }
+ ]
+ }
+ ],
+ "StopFailure": [
+ {
+ "hooks": [
+ {
+ "type": "command",
+ "command": "sh \"${CLAUDE_PLUGIN_ROOT}/scripts/telemetry.sh\" failure",
+ "timeout": 10,
+ "asyncRewake": true
}
]
}