commit f485df6be59d16e72ea140252d01f5ce5d468ea1 Author: Zhongwei Li Date: Sun Nov 30 08:46:03 2025 +0800 Initial commit diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json new file mode 100644 index 0000000..b9e9667 --- /dev/null +++ b/.claude-plugin/plugin.json @@ -0,0 +1,11 @@ +{ + "name": "metrics", + "description": "Anonymous metrics usage for ai-helpers", + "version": "0.0.1", + "author": { + "name": "openshift" + }, + "hooks": [ + "./hooks" + ] +} \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..27970ee --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# metrics + +Anonymous metrics usage for ai-helpers diff --git a/hooks/hooks.json b/hooks/hooks.json new file mode 100644 index 0000000..a4fd090 --- /dev/null +++ b/hooks/hooks.json @@ -0,0 +1,39 @@ +{ + "description": "Anonymous Usage Metric Collection", + "hooks": { + "UserPromptSubmit": [ + { + "hooks": [ + { + "type": "command", + "command": "${CLAUDE_PLUGIN_ROOT}/scripts/send_metrics.py", + "timeout": 30 + } + ] + } + ], + "PreToolUse": [ + { + "matcher": "Skill", + "hooks": [ + { + "type": "command", + "command": "${CLAUDE_PLUGIN_ROOT}/scripts/send_metrics.py", + "timeout": 30 + } + ] + } + ], + "SessionEnd": [ + { + "hooks": [ + { + "type": "command", + "command": "${CLAUDE_PLUGIN_ROOT}/scripts/send_session_metrics.py", + "timeout": 30 + } + ] + } + ] + } +} diff --git a/plugin.lock.json b/plugin.lock.json new file mode 100644 index 0000000..8564951 --- /dev/null +++ b/plugin.lock.json @@ -0,0 +1,45 @@ +{ + "$schema": "internal://schemas/plugin.lock.v1.json", + "pluginId": "gh:openshift-eng/ai-helpers:plugins/metrics", + "normalized": { + "repo": null, + "ref": "refs/tags/v20251128.0", + "commit": "bcbcc82859a1c818bacc8b325d865d760bcee0b7", + "treeHash": "91810af58cf1dd4c65dfecd564cfddb023217e06e095d5e8b7aef39439bdf1d9", + "generatedAt": "2025-11-28T10:27:30.937517Z", + "toolVersion": "publish_plugins.py@0.2.0" + }, + "origin": { + "remote": "git@github.com:zhongweili/42plugin-data.git", + "branch": "master", + "commit": "aa1497ed0949fd50e99e70d6324a29c5b34f9390", + "repoRoot": "/Users/zhongweili/projects/openmind/42plugin-data" + }, + "manifest": { + "name": "metrics", + "description": "Anonymous metrics usage for ai-helpers", + "version": "0.0.1" + }, + "content": { + "files": [ + { + "path": "README.md", + "sha256": "2345a0b32f58d417a6def0661a28e2eb06947d59bf2c0805eeced5a43fc8dd8c" + }, + { + "path": "hooks/hooks.json", + "sha256": "346c65fb24655ffaa47a07b846d246b5953b41724f7d5ef856e5c83807dbfee8" + }, + { + "path": ".claude-plugin/plugin.json", + "sha256": "79e6818d577c4bffec3f00b33b24c8d1663d75bd5344902f551f06ad435aa2cf" + } + ], + "dirSha256": "91810af58cf1dd4c65dfecd564cfddb023217e06e095d5e8b7aef39439bdf1d9" + }, + "security": { + "scannedAt": null, + "scannerVersion": null, + "flags": [] + } +} \ No newline at end of file