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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-cli-advanced-starter-pack",
3
- "version": "1.8.1",
3
+ "version": "1.8.2",
4
4
  "description": "Advanced Claude Code CLI toolkit - agents, hooks, skills, MCP servers, phased development, and GitHub integration",
5
5
  "main": "src/index.js",
6
6
  "bin": {
@@ -66,24 +66,34 @@ export async function runInstallPanelHook(options = {}) {
66
66
  }
67
67
  }
68
68
 
69
- // Ensure hooks array exists
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
- // Check if hook already registered
75
- const hookConfig = {
76
- event: 'UserPromptSubmit',
77
- command: `node ${hookPath}`
78
- };
74
+ // Ensure UserPromptSubmit array exists
75
+ if (!settings.hooks.UserPromptSubmit) {
76
+ settings.hooks.UserPromptSubmit = [];
77
+ }
79
78
 
80
- const existingHook = settings.hooks.find(h =>
81
- h.event === 'UserPromptSubmit' &&
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
- settings.hooks.push(hookConfig);
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);