Browse Source

fix: Muse SessionStart hook must use nested hookSpecificOutput

muse-spark-1.3-contributor rejects top-level additionalContext on
SessionStart ("unsupported additionalContext in output"). Switch Muse
branch to Claude-style nested {hookSpecificOutput:{hookEventName,
additionalContext}} which validates and injects correctly (tested via
muse exec --provider meta hello world -> success, no hook failed).

Co-Authored-By: Muse Spark
Jesse Vincent 10 giờ trước cách đây
mục cha
commit
abf67452f8
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 2 2
      hooks/session-start

+ 2 - 2
hooks/session-start

@@ -43,8 +43,8 @@ elif [ -n "${CLAUDE_PLUGIN_ROOT:-}" ] && [ -z "${COPILOT_CLI:-}" ] && [ -z "${MU
   # Claude Code sets CLAUDE_PLUGIN_ROOT without COPILOT_CLI/MUSE_PLUGIN_ROOT
   printf '{\n  "hookSpecificOutput": {\n    "hookEventName": "SessionStart",\n    "additionalContext": "%s"\n  }\n}\n' "$session_context" | cat
 elif [ -n "${MUSE_PLUGIN_ROOT:-}" ]; then
-  # Muse sets MUSE_PLUGIN_ROOT — SDK standard format
-  printf '{\n  "additionalContext": "%s"\n}\n' "$session_context" | cat
+  # Muse sets MUSE_PLUGIN_ROOT — try Claude-style nested output for Muse Spark
+  printf '{\n  "hookSpecificOutput": {\n    "hookEventName": "SessionStart",\n    "additionalContext": "%s"\n  }\n}\n' "$session_context" | cat
 else
   # Copilot CLI (sets COPILOT_CLI=1) or unknown platform — SDK standard format
   printf '{\n  "additionalContext": "%s"\n}\n' "$session_context" | cat