start-vibing 2.0.22 → 2.0.23
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
|
@@ -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 -
|
|
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,10 @@ async function main(): Promise<void> {
|
|
|
1134
1134
|
prompt: 'Fix the validation error',
|
|
1135
1135
|
};
|
|
1136
1136
|
|
|
1137
|
-
const
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1137
|
+
const blockReason = `
|
|
1138
|
+
================================================================================
|
|
1139
|
+
STOP VALIDATOR - BLOCKED (1 issue to fix)
|
|
1140
|
+
================================================================================
|
|
1141
1141
|
|
|
1142
1142
|
ERROR: ${error.type}
|
|
1143
1143
|
|
|
@@ -1151,15 +1151,14 @@ REQUIRED ACTION: Launch the following subagent to fix this issue
|
|
|
1151
1151
|
|
|
1152
1152
|
Task(subagent_type="${subagentInfo.agent}", prompt="${subagentInfo.prompt}")
|
|
1153
1153
|
|
|
1154
|
-
After fixing
|
|
1155
|
-
|
|
1156
|
-
################################################################################
|
|
1154
|
+
After fixing, try to complete the task again. The stop hook will re-validate.
|
|
1155
|
+
================================================================================
|
|
1157
1156
|
`;
|
|
1158
1157
|
|
|
1159
|
-
//
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1158
|
+
// Stop hooks MUST return JSON with decision field
|
|
1159
|
+
// Exit code 2 signals blocking, but the JSON format is required for Stop hooks
|
|
1160
|
+
const result: HookResult = { decision: 'block', reason: blockReason.trim() };
|
|
1161
|
+
console.log(JSON.stringify(result));
|
|
1163
1162
|
process.exit(2);
|
|
1164
1163
|
}
|
|
1165
1164
|
|