start-vibing 2.0.24 → 2.0.25
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
|
@@ -932,6 +932,7 @@ interface HookInput {
|
|
|
932
932
|
}
|
|
933
933
|
|
|
934
934
|
interface HookResult {
|
|
935
|
+
continue: boolean;
|
|
935
936
|
decision: 'approve' | 'block';
|
|
936
937
|
reason: string;
|
|
937
938
|
}
|
|
@@ -1099,6 +1100,7 @@ async function main(): Promise<void> {
|
|
|
1099
1100
|
// Prevent infinite loops
|
|
1100
1101
|
if (hookInput.stop_hook_active) {
|
|
1101
1102
|
const result: HookResult = {
|
|
1103
|
+
continue: false,
|
|
1102
1104
|
decision: 'approve',
|
|
1103
1105
|
reason: 'Stop hook cycle detected, allowing exit',
|
|
1104
1106
|
};
|
|
@@ -1166,7 +1168,8 @@ The stop hook will check for remaining issues. Repeat until ALL CHECKS PASSED.
|
|
|
1166
1168
|
|
|
1167
1169
|
// Stop hooks MUST return JSON with decision field
|
|
1168
1170
|
// Exit code 2 signals blocking, but the JSON format is required for Stop hooks
|
|
1169
|
-
|
|
1171
|
+
// continue: true tells Claude to KEEP WORKING after receiving this block
|
|
1172
|
+
const result: HookResult = { continue: true, decision: 'block', reason: blockReason.trim() };
|
|
1170
1173
|
console.log(JSON.stringify(result));
|
|
1171
1174
|
process.exit(2);
|
|
1172
1175
|
}
|
|
@@ -1185,7 +1188,8 @@ All validations passed. Task may complete.
|
|
|
1185
1188
|
################################################################################
|
|
1186
1189
|
`;
|
|
1187
1190
|
|
|
1188
|
-
|
|
1191
|
+
// continue: false tells Claude the task is DONE and can stop
|
|
1192
|
+
const result: HookResult = { continue: false, decision: 'approve', reason: successOutput.trim() };
|
|
1189
1193
|
console.log(JSON.stringify(result));
|
|
1190
1194
|
process.exit(0);
|
|
1191
1195
|
}
|
|
@@ -1193,7 +1197,7 @@ All validations passed. Task may complete.
|
|
|
1193
1197
|
main().catch((err) => {
|
|
1194
1198
|
console.error('Hook error:', err);
|
|
1195
1199
|
// On error, allow to continue to not block user
|
|
1196
|
-
const result: HookResult = { decision: 'approve', reason: 'Hook error, allowing by default' };
|
|
1200
|
+
const result: HookResult = { continue: false, decision: 'approve', reason: 'Hook error, allowing by default' };
|
|
1197
1201
|
console.log(JSON.stringify(result));
|
|
1198
1202
|
process.exit(0);
|
|
1199
1203
|
});
|