Initial commit
This commit is contained in:
11
.claude-plugin/plugin.json
Normal file
11
.claude-plugin/plugin.json
Normal file
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"name": "test-plugin",
|
||||
"description": "Minimal test plugin to reproduce hook output capture bug",
|
||||
"version": "1.0.0",
|
||||
"author": {
|
||||
"name": "Test"
|
||||
},
|
||||
"hooks": [
|
||||
"./hooks"
|
||||
]
|
||||
}
|
||||
3
README.md
Normal file
3
README.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# test-plugin
|
||||
|
||||
Minimal test plugin to reproduce hook output capture bug
|
||||
20
hooks/entrypoints/stop.sh
Executable file
20
hooks/entrypoints/stop.sh
Executable file
@@ -0,0 +1,20 @@
|
||||
#!/bin/bash
|
||||
# Simple Stop hook that blocks (forces continuation) - PLUGIN VERSION
|
||||
|
||||
# Read input from STDIN (Claude Code passes hook data as JSON)
|
||||
read -r input
|
||||
|
||||
# Check if stop hook is already active (prevents infinite loop)
|
||||
stop_hook_active=$(echo "$input" | jq -r '.stop_hook_active // false')
|
||||
|
||||
if [ "$stop_hook_active" = "true" ]; then
|
||||
# Already triggered once, allow normal stop
|
||||
echo '{"continue":true,"stopReason":"","suppressOutput":true}' >&1
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Output valid JSON response to STDERR (required when exit code is 2)
|
||||
echo '{"continue":true,"stopReason":"","suppressOutput":true,"decision":"block","reason":"I notice I just used a reflexive agreement phrase. Let me provide a more substantive response:\n\nInstead of simply agreeing, let me analyze your point with specific technical reasoning, consider potential edge cases or alternative approaches, and offer constructive insights that build collaboratively on your observation."}' >&2
|
||||
|
||||
# Exit with code 2 to force continuation
|
||||
exit 2
|
||||
15
hooks/hooks.json
Normal file
15
hooks/hooks.json
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"description": "Minimal test hook configuration to reproduce output capture bug",
|
||||
"hooks": {
|
||||
"Stop": [
|
||||
{
|
||||
"hooks": [
|
||||
{
|
||||
"type": "command",
|
||||
"command": "${CLAUDE_PLUGIN_ROOT}/hooks/entrypoints/stop.sh"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
49
plugin.lock.json
Normal file
49
plugin.lock.json
Normal file
@@ -0,0 +1,49 @@
|
||||
{
|
||||
"$schema": "internal://schemas/plugin.lock.v1.json",
|
||||
"pluginId": "gh:kylesnowschwartz/plugin-hook-debug:plugins/test-plugin",
|
||||
"normalized": {
|
||||
"repo": null,
|
||||
"ref": "refs/tags/v20251128.0",
|
||||
"commit": "5c72c29791246372a286f32eba9391d63bf634a5",
|
||||
"treeHash": "db6ac4a14eddbb6a5fc4e7e3dd3d71be95a91bfe1f47dcdbe57201f663e08a54",
|
||||
"generatedAt": "2025-11-28T10:20:02.408966Z",
|
||||
"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": "test-plugin",
|
||||
"description": "Minimal test plugin to reproduce hook output capture bug",
|
||||
"version": "1.0.0"
|
||||
},
|
||||
"content": {
|
||||
"files": [
|
||||
{
|
||||
"path": "README.md",
|
||||
"sha256": "3c5a529b7cbfc5b9c3ec4a663f2e2afdc6d1c39f91bf75176351320a95cb812d"
|
||||
},
|
||||
{
|
||||
"path": "hooks/hooks.json",
|
||||
"sha256": "de8e63ae139943ad092bd3994d627e23ef0de4c5462703d6b9a82fdf2b3e065f"
|
||||
},
|
||||
{
|
||||
"path": "hooks/entrypoints/stop.sh",
|
||||
"sha256": "5b61b38c86addf3aea582b61b91d757f21673b68abc963cc93730e77a2f76946"
|
||||
},
|
||||
{
|
||||
"path": ".claude-plugin/plugin.json",
|
||||
"sha256": "369f896c55c9676c85778fb60151c0fd4be78ebed9e77fa206bd9aca04640e9a"
|
||||
}
|
||||
],
|
||||
"dirSha256": "db6ac4a14eddbb6a5fc4e7e3dd3d71be95a91bfe1f47dcdbe57201f663e08a54"
|
||||
},
|
||||
"security": {
|
||||
"scannedAt": null,
|
||||
"scannerVersion": null,
|
||||
"flags": []
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user