@mutmutco/kilo-plugin 3.103.0 → 3.105.0
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 +1 -1
- package/scripts/hook-run.mjs +7 -1
package/package.json
CHANGED
package/scripts/hook-run.mjs
CHANGED
|
@@ -158,7 +158,13 @@ export function decisionEnvelope(stdout) {
|
|
|
158
158
|
}
|
|
159
159
|
|
|
160
160
|
function adaptOutput(surface, stdout) {
|
|
161
|
-
if (surface !== 'cursor'
|
|
161
|
+
if (surface !== 'cursor') return stdout;
|
|
162
|
+
// Jerv-PowerTools #4751: cursor's preToolUse entries carry failClosed:true, and cursor reads
|
|
163
|
+
// EMPTY stdout as a hook FAILURE — so the gates' clean-allow contract (exit 0, no envelope)
|
|
164
|
+
// denied every Shell and Write on the surface. `{}` is cursor's documented intentional no-op
|
|
165
|
+
// (staff guidance in the fail-closed report thread), and on cursor only `deny` overrides the
|
|
166
|
+
// host's own permission flow — so this defers exactly like empty stdout does on other surfaces.
|
|
167
|
+
if (!stdout.trim()) return '{}\n';
|
|
162
168
|
try {
|
|
163
169
|
const payload = JSON.parse(stdout);
|
|
164
170
|
const decision = payload?.hookSpecificOutput;
|