@pushary/agent-hooks 0.56.0 → 0.57.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/dist/bin/pushary-claude.js +1 -1
- package/dist/bin/pushary-codex-hook.js +1 -1
- package/dist/bin/pushary-codex.js +1 -1
- package/dist/bin/pushary-gemini-hook.js +1 -1
- package/dist/bin/pushary-hook.js +2 -2
- package/dist/bin/pushary-notification-hook.js +1 -1
- package/dist/bin/pushary-permission-denied-hook.js +2 -2
- package/dist/bin/pushary-permission-hook.js +2 -2
- package/dist/bin/pushary-post-hook.js +1 -1
- package/dist/bin/pushary-prompt-hook.js +1 -1
- package/dist/bin/pushary-session-end-hook.js +1 -1
- package/dist/bin/pushary-session-start-hook.js +1 -1
- package/dist/bin/pushary-setup.js +1 -1
- package/dist/bin/pushary-stop-hook.js +1 -1
- package/dist/bin/pushary-stopfailure-hook.js +1 -1
- package/dist/{chunk-3EOK3M44.js → chunk-LEWSYLHL.js} +11 -1
- package/dist/{chunk-GQPIOJA3.js → chunk-NPYANTRC.js} +1 -1
- package/dist/src/index.js +2 -2
- package/package.json +1 -1
package/dist/bin/pushary-hook.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
handlePreToolUse
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-NPYANTRC.js";
|
|
5
5
|
import "../chunk-QYQO6RHJ.js";
|
|
6
6
|
import "../chunk-YHG74UFF.js";
|
|
7
|
-
import "../chunk-
|
|
7
|
+
import "../chunk-LEWSYLHL.js";
|
|
8
8
|
import "../chunk-RN3NOEJF.js";
|
|
9
9
|
import "../chunk-5TECIV6T.js";
|
|
10
10
|
import "../chunk-DWED7BS3.js";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
handlePermissionDenied
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-NPYANTRC.js";
|
|
5
5
|
import "../chunk-QYQO6RHJ.js";
|
|
6
6
|
import "../chunk-YHG74UFF.js";
|
|
7
|
-
import "../chunk-
|
|
7
|
+
import "../chunk-LEWSYLHL.js";
|
|
8
8
|
import "../chunk-RN3NOEJF.js";
|
|
9
9
|
import "../chunk-5TECIV6T.js";
|
|
10
10
|
import "../chunk-DWED7BS3.js";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
handlePermissionRequest
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-NPYANTRC.js";
|
|
5
5
|
import "../chunk-QYQO6RHJ.js";
|
|
6
6
|
import "../chunk-YHG74UFF.js";
|
|
7
|
-
import "../chunk-
|
|
7
|
+
import "../chunk-LEWSYLHL.js";
|
|
8
8
|
import "../chunk-RN3NOEJF.js";
|
|
9
9
|
import "../chunk-5TECIV6T.js";
|
|
10
10
|
import "../chunk-DWED7BS3.js";
|
|
@@ -284,6 +284,16 @@ var deriveToolTarget = (toolName, toolInput) => {
|
|
|
284
284
|
}
|
|
285
285
|
return void 0;
|
|
286
286
|
};
|
|
287
|
+
var SCRIPT_RUNNERS = /* @__PURE__ */ new Set(["npm", "pnpm", "yarn", "bun", "npx", "deno", "rake", "make", "just", "task", "turbo"]);
|
|
288
|
+
var RUN_SUBCOMMANDS = /* @__PURE__ */ new Set(["run", "run-script", "exec", "task"]);
|
|
289
|
+
var deriveReceiptCommandHead = (command) => {
|
|
290
|
+
if (typeof command !== "string") return void 0;
|
|
291
|
+
const tokens = command.trim().split(/\s+/);
|
|
292
|
+
const [first, second] = tokens;
|
|
293
|
+
const keep = first && second && SCRIPT_RUNNERS.has(first.toLowerCase()) && RUN_SUBCOMMANDS.has(second.toLowerCase()) ? 3 : 2;
|
|
294
|
+
const head = tokens.slice(0, keep).join(" ");
|
|
295
|
+
return head ? head.slice(0, TOOL_TARGET_MAX_LENGTH) : void 0;
|
|
296
|
+
};
|
|
287
297
|
var RECEIPT_TARGET_MAX_LENGTH = 256;
|
|
288
298
|
var isToolResultError = (toolResult) => {
|
|
289
299
|
try {
|
|
@@ -309,7 +319,7 @@ var deriveReceiptMeta = (toolName, toolInput, toolResult, cwd) => {
|
|
|
309
319
|
};
|
|
310
320
|
}
|
|
311
321
|
if (toolName === "Bash" || toolName === "PowerShell" || toolName === "Monitor") {
|
|
312
|
-
const head =
|
|
322
|
+
const head = deriveReceiptCommandHead(toolInput.command);
|
|
313
323
|
if (!head) return void 0;
|
|
314
324
|
return {
|
|
315
325
|
kind: head === "git commit" ? "commit" : "bash",
|
package/dist/src/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
handlePreToolUse
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-NPYANTRC.js";
|
|
4
4
|
import "../chunk-QYQO6RHJ.js";
|
|
5
5
|
import "../chunk-YHG74UFF.js";
|
|
6
6
|
import {
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
reportEvent,
|
|
16
16
|
resolvePolicy,
|
|
17
17
|
waitForAnswer
|
|
18
|
-
} from "../chunk-
|
|
18
|
+
} from "../chunk-LEWSYLHL.js";
|
|
19
19
|
import "../chunk-RN3NOEJF.js";
|
|
20
20
|
import "../chunk-5TECIV6T.js";
|
|
21
21
|
import "../chunk-DWED7BS3.js";
|