claude-cli-advanced-starter-pack 1.8.1 → 1.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -66,24 +66,34 @@ export async function runInstallPanelHook(options = {}) {
|
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
-
// Ensure hooks
|
|
69
|
+
// Ensure hooks object exists (new v2.x format)
|
|
70
70
|
if (!settings.hooks) {
|
|
71
|
-
settings.hooks =
|
|
71
|
+
settings.hooks = {};
|
|
72
72
|
}
|
|
73
73
|
|
|
74
|
-
//
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
};
|
|
74
|
+
// Ensure UserPromptSubmit array exists
|
|
75
|
+
if (!settings.hooks.UserPromptSubmit) {
|
|
76
|
+
settings.hooks.UserPromptSubmit = [];
|
|
77
|
+
}
|
|
79
78
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
h.command?.includes('panel-queue-reader')
|
|
79
|
+
// Check if hook already registered (new v2.x format)
|
|
80
|
+
const existingHook = settings.hooks.UserPromptSubmit.find(h =>
|
|
81
|
+
h.hooks?.some(hook => hook.command?.includes('panel-queue-reader'))
|
|
83
82
|
);
|
|
84
83
|
|
|
85
84
|
if (!existingHook) {
|
|
86
|
-
|
|
85
|
+
// New Claude Code v2.x hooks format
|
|
86
|
+
const hookConfig = {
|
|
87
|
+
matcher: '', // Empty string = match all (NOT empty object!)
|
|
88
|
+
hooks: [
|
|
89
|
+
{
|
|
90
|
+
type: 'command',
|
|
91
|
+
command: `node ${hookPath}`
|
|
92
|
+
}
|
|
93
|
+
]
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
settings.hooks.UserPromptSubmit.push(hookConfig);
|
|
87
97
|
|
|
88
98
|
// Ensure settings directory exists
|
|
89
99
|
const settingsDir = dirname(settingsPath);
|