greprag 5.42.0 → 5.42.1
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.
|
@@ -35,6 +35,28 @@ export interface WrapDecision {
|
|
|
35
35
|
* single quotes). Appending a suffix to a command with unbalanced quotes
|
|
36
36
|
* would land the suffix inside a string literal. */
|
|
37
37
|
export declare function quotesBalanced(cmd: string): boolean;
|
|
38
|
+
/** Detect a TERMINAL pure-truncation stage — `| tail -3`, `| head -n 20`,
|
|
39
|
+
* `| tail`, `| head --lines=5` — and return the command without it, or null
|
|
40
|
+
* when there is no such stage.
|
|
41
|
+
*
|
|
42
|
+
* Rationale: agents habitually pre-truncate noisy output by hand
|
|
43
|
+
* (`npm test | tail -3`), which is LOSSY (an error above the window is gone)
|
|
44
|
+
* and used to defeat the wrap entirely (pipes are structurally unsafe to
|
|
45
|
+
* append to). A terminal line-truncation stage carries no semantics worth
|
|
46
|
+
* preserving over crush — the agent asked for "less of this output," and
|
|
47
|
+
* crush answers that strictly better (keeps all errors + summary, original
|
|
48
|
+
* recoverable). So we strip it and let the BASE command classify; the
|
|
49
|
+
* rewrite then replaces hand-truncation with crush. The base must still
|
|
50
|
+
* pass every structural gate and positively classify — `git log | head -5`
|
|
51
|
+
* survives untouched because `git log` is not a crushable type.
|
|
52
|
+
*
|
|
53
|
+
* Default-deny within the stage itself: ONLY line-count forms qualify.
|
|
54
|
+
* `-f`/`-F`/`--follow` (follow), `-n +N` (skip-from — different semantics),
|
|
55
|
+
* `-c`/`--bytes` (byte counts), `--pid`, filenames, or any unrecognized
|
|
56
|
+
* token disqualify the stage and the command stays untouched. A non-terminal
|
|
57
|
+
* truncation (`| tail -3 | wc`) never matches — the stage must end the
|
|
58
|
+
* command. */
|
|
59
|
+
export declare function stripTrailingTruncation(command: string): string | null;
|
|
38
60
|
/** First non-flag token = the search pattern, sanitized into a crush
|
|
39
61
|
* `--query` hint: strip quotes, keep word chars/space/dot/dash only
|
|
40
62
|
* (safe inside double quotes), collapse whitespace, cap at 80 chars. */
|
|
@@ -60,6 +60,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
60
60
|
})();
|
|
61
61
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
62
62
|
exports.quotesBalanced = quotesBalanced;
|
|
63
|
+
exports.stripTrailingTruncation = stripTrailingTruncation;
|
|
63
64
|
exports.extractSearchQuery = extractSearchQuery;
|
|
64
65
|
exports.classifyCommand = classifyCommand;
|
|
65
66
|
exports.rewriteCommand = rewriteCommand;
|
|
@@ -115,6 +116,54 @@ function structurallySafe(cmd) {
|
|
|
115
116
|
return false;
|
|
116
117
|
return true;
|
|
117
118
|
}
|
|
119
|
+
// ---------- Truncation-pipe stripper (pure) ----------------------------------
|
|
120
|
+
/** Detect a TERMINAL pure-truncation stage — `| tail -3`, `| head -n 20`,
|
|
121
|
+
* `| tail`, `| head --lines=5` — and return the command without it, or null
|
|
122
|
+
* when there is no such stage.
|
|
123
|
+
*
|
|
124
|
+
* Rationale: agents habitually pre-truncate noisy output by hand
|
|
125
|
+
* (`npm test | tail -3`), which is LOSSY (an error above the window is gone)
|
|
126
|
+
* and used to defeat the wrap entirely (pipes are structurally unsafe to
|
|
127
|
+
* append to). A terminal line-truncation stage carries no semantics worth
|
|
128
|
+
* preserving over crush — the agent asked for "less of this output," and
|
|
129
|
+
* crush answers that strictly better (keeps all errors + summary, original
|
|
130
|
+
* recoverable). So we strip it and let the BASE command classify; the
|
|
131
|
+
* rewrite then replaces hand-truncation with crush. The base must still
|
|
132
|
+
* pass every structural gate and positively classify — `git log | head -5`
|
|
133
|
+
* survives untouched because `git log` is not a crushable type.
|
|
134
|
+
*
|
|
135
|
+
* Default-deny within the stage itself: ONLY line-count forms qualify.
|
|
136
|
+
* `-f`/`-F`/`--follow` (follow), `-n +N` (skip-from — different semantics),
|
|
137
|
+
* `-c`/`--bytes` (byte counts), `--pid`, filenames, or any unrecognized
|
|
138
|
+
* token disqualify the stage and the command stays untouched. A non-terminal
|
|
139
|
+
* truncation (`| tail -3 | wc`) never matches — the stage must end the
|
|
140
|
+
* command. */
|
|
141
|
+
function stripTrailingTruncation(command) {
|
|
142
|
+
const m = command.match(/^(.*?)\|\s*(head|tail)\b([^|]*)$/);
|
|
143
|
+
if (!m)
|
|
144
|
+
return null;
|
|
145
|
+
const [, base, , rawArgs] = m;
|
|
146
|
+
// Validate every token of the truncation stage; line-count forms only.
|
|
147
|
+
const tokens = rawArgs.trim() === '' ? [] : rawArgs.trim().split(/\s+/);
|
|
148
|
+
for (let i = 0; i < tokens.length; i++) {
|
|
149
|
+
const tok = tokens[i];
|
|
150
|
+
if (/^-\d+$/.test(tok))
|
|
151
|
+
continue; // -3
|
|
152
|
+
if (/^-n\d+$/.test(tok))
|
|
153
|
+
continue; // -n3
|
|
154
|
+
if (tok === '-n' || tok === '--lines') { // -n 3 / --lines 3
|
|
155
|
+
const next = tokens[++i];
|
|
156
|
+
if (next === undefined || !/^\d+$/.test(next))
|
|
157
|
+
return null;
|
|
158
|
+
continue;
|
|
159
|
+
}
|
|
160
|
+
if (/^--lines=\d+$/.test(tok))
|
|
161
|
+
continue; // --lines=3
|
|
162
|
+
return null; // anything else: -f, -c, +N, files, flags we don't know
|
|
163
|
+
}
|
|
164
|
+
const trimmed = base.trim();
|
|
165
|
+
return trimmed === '' ? null : trimmed;
|
|
166
|
+
}
|
|
118
167
|
// ---------- Classifier (pure) ------------------------------------------------
|
|
119
168
|
/** grep/rg/ag flag clusters that switch output away from match lines
|
|
120
169
|
* (file lists, counts, JSON events, bare matches). */
|
|
@@ -207,7 +256,9 @@ function classifyCommand(command) {
|
|
|
207
256
|
* (`greprag retrieve <hash>`); --stats feeds ~/.greprag/crush-stats.jsonl
|
|
208
257
|
* so `greprag crush stats` can validate real savings. */
|
|
209
258
|
function rewriteCommand(command, decision) {
|
|
210
|
-
|
|
259
|
+
// A stripped-truncation base may already end in `2>&1` — don't double it.
|
|
260
|
+
const redirect = /2>&1\s*$/.test(command) ? '' : ' 2>&1';
|
|
261
|
+
let suffix = `${redirect} | greprag crush --type ${decision.type} --ccr --stats`;
|
|
211
262
|
if (decision.query)
|
|
212
263
|
suffix += ` --query "${decision.query}"`;
|
|
213
264
|
return command + suffix;
|
|
@@ -242,13 +293,31 @@ function runPipeWrap(input) {
|
|
|
242
293
|
return null;
|
|
243
294
|
if (!readPipeWrapConfig(input.cwd || process.cwd()).enabled)
|
|
244
295
|
return null;
|
|
245
|
-
|
|
296
|
+
// Plain path: the command itself qualifies.
|
|
297
|
+
let target = command;
|
|
298
|
+
let decision = classifyCommand(command);
|
|
299
|
+
// Truncation path: `<crushable> | tail -N` — strip the hand-truncation and
|
|
300
|
+
// wrap the base instead (crush replaces tail/head as the truncator). The
|
|
301
|
+
// base must independently clear EVERY gate (structure, recursion, nocrush)
|
|
302
|
+
// via classifyCommand; non-crushable bases (`git log | head -5`) fall
|
|
303
|
+
// through untouched. The nocrush hatch is honored on the ORIGINAL too,
|
|
304
|
+
// since stripping can drop a trailing comment.
|
|
305
|
+
if (!decision && !command.includes('# nocrush')) {
|
|
306
|
+
const base = stripTrailingTruncation(command);
|
|
307
|
+
if (base) {
|
|
308
|
+
const baseDecision = classifyCommand(base);
|
|
309
|
+
if (baseDecision) {
|
|
310
|
+
target = base;
|
|
311
|
+
decision = baseDecision;
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
}
|
|
246
315
|
if (!decision)
|
|
247
316
|
return null;
|
|
248
317
|
return {
|
|
249
318
|
hookSpecificOutput: {
|
|
250
319
|
hookEventName: 'PreToolUse',
|
|
251
|
-
updatedInput: { command: rewriteCommand(
|
|
320
|
+
updatedInput: { command: rewriteCommand(target, decision) },
|
|
252
321
|
},
|
|
253
322
|
};
|
|
254
323
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pipe-wrap.js","sourceRoot":"","sources":["../../src/commands/pipe-wrap.ts"],"names":[],"mappings":";AAAA,6BAA6B;AAC7B;;;;;;;;;;;;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