|
|
@@ -32,13 +32,18 @@ escape_for_json() {
|
|
|
|
|
|
using_superpowers_escaped=$(escape_for_json "$using_superpowers_content")
|
|
|
warning_escaped=$(escape_for_json "$warning_message")
|
|
|
+session_context="<EXTREMELY_IMPORTANT>\nYou have superpowers.\n\n**Below is the full content of your 'superpowers:using-superpowers' skill - your introduction to using skills. For all other skills, use the 'Skill' tool:**\n\n${using_superpowers_escaped}\n\n${warning_escaped}\n</EXTREMELY_IMPORTANT>"
|
|
|
|
|
|
-# Output context injection as JSON
|
|
|
+# Output context injection as JSON.
|
|
|
+# Keep both shapes for compatibility:
|
|
|
+# - Cursor hooks expect additional_context.
|
|
|
+# - Claude hooks expect hookSpecificOutput.additionalContext.
|
|
|
cat <<EOF
|
|
|
{
|
|
|
+ "additional_context": "${session_context}",
|
|
|
"hookSpecificOutput": {
|
|
|
"hookEventName": "SessionStart",
|
|
|
- "additionalContext": "<EXTREMELY_IMPORTANT>\nYou have superpowers.\n\n**Below is the full content of your 'superpowers:using-superpowers' skill - your introduction to using skills. For all other skills, use the 'Skill' tool:**\n\n${using_superpowers_escaped}\n\n${warning_escaped}\n</EXTREMELY_IMPORTANT>"
|
|
|
+ "additionalContext": "${session_context}"
|
|
|
}
|
|
|
}
|
|
|
EOF
|