start-vibing 2.0.22 → 2.0.24

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": "start-vibing",
3
- "version": "2.0.22",
3
+ "version": "2.0.24",
4
4
  "description": "Setup Claude Code agents, skills, and hooks in your project. Smart copy that preserves your custom domains and configurations.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -133,7 +133,9 @@ async function runHook(hookName: string, stdinData: string): Promise<void> {
133
133
  process.stdout.write(result.output);
134
134
  process.exit(0);
135
135
  } else if (result.exitCode === 2) {
136
- // Blocking error - stderr goes to Claude for action
136
+ // Blocking error - for Stop hooks, JSON is in stdout
137
+ // Pass through both stdout (JSON response) and stderr (debug logs)
138
+ process.stdout.write(result.output);
137
139
  if (result.error) {
138
140
  process.stderr.write(result.error);
139
141
  }
@@ -1134,10 +1134,17 @@ async function main(): Promise<void> {
1134
1134
  prompt: 'Fix the validation error',
1135
1135
  };
1136
1136
 
1137
- const output = `
1138
- ################################################################################
1139
- # STOP VALIDATOR - BLOCKED #
1140
- ################################################################################
1137
+ const blockReason = `
1138
+ ================================================================================
1139
+ STOP VALIDATOR - BLOCKED (1 issue to fix)
1140
+ ================================================================================
1141
+
1142
+ **MANDATORY**: After fixing this issue, you MUST attempt to complete the task
1143
+ again so this hook can re-validate. DO NOT consider the task done until the
1144
+ stop hook returns "ALL CHECKS PASSED". Keep fixing issues one by one until
1145
+ all validations pass.
1146
+
1147
+ --------------------------------------------------------------------------------
1141
1148
 
1142
1149
  ERROR: ${error.type}
1143
1150
 
@@ -1151,15 +1158,16 @@ REQUIRED ACTION: Launch the following subagent to fix this issue
1151
1158
 
1152
1159
  Task(subagent_type="${subagentInfo.agent}", prompt="${subagentInfo.prompt}")
1153
1160
 
1154
- After fixing this issue, the stop hook will run again to check for remaining issues.
1155
-
1156
- ################################################################################
1161
+ --------------------------------------------------------------------------------
1162
+ AFTER FIXING: You MUST try to complete the task again to trigger re-validation.
1163
+ The stop hook will check for remaining issues. Repeat until ALL CHECKS PASSED.
1164
+ ================================================================================
1157
1165
  `;
1158
1166
 
1159
- // Write block reason to stderr (Claude sees this)
1160
- process.stderr.write(output);
1161
-
1162
- // Exit with code 2 = blocking error, stderr goes to Claude
1167
+ // Stop hooks MUST return JSON with decision field
1168
+ // Exit code 2 signals blocking, but the JSON format is required for Stop hooks
1169
+ const result: HookResult = { decision: 'block', reason: blockReason.trim() };
1170
+ console.log(JSON.stringify(result));
1163
1171
  process.exit(2);
1164
1172
  }
1165
1173