@ev-ai/agent-hook 1.2.8 → 1.3.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.
- package/COLLECTED-DATA.md +13 -5
- package/dist/cli.mjs +39 -38
- package/dist/hook.mjs +34 -33
- package/dist/managed-hooks-snippet.cjs +4 -3
- package/dist/managed-hooks-snippet.mjs +4 -3
- package/dist/plugin-hooks.mjs +20 -6
- package/package.json +1 -1
|
@@ -52,8 +52,7 @@ var HOOK_INPUT_ALLOWLIST_MAX_BYTES = 4 * 1024;
|
|
|
52
52
|
var HOOK_INPUT_FULL_MAX_BYTES = 256 * 1024;
|
|
53
53
|
var HOOK_INPUT_MCP_MAX_BYTES = 4 * 1024;
|
|
54
54
|
var GZIP_MIN_BYTES = 32 * 1024;
|
|
55
|
-
var
|
|
56
|
-
var PACKAGE_VERSION = "1.2.8";
|
|
55
|
+
var PACKAGE_VERSION = "1.3.1";
|
|
57
56
|
var NPX_PACKAGE_SPEC = `@ev-ai/agent-hook@${PACKAGE_VERSION}`;
|
|
58
57
|
var HOOK_STATUS_MESSAGE = "ev-ai runtime report";
|
|
59
58
|
|
|
@@ -128,7 +127,9 @@ function desiredCodexHookGroups(command) {
|
|
|
128
127
|
UserPromptSubmit: [commandHook()],
|
|
129
128
|
PreToolUse: [commandHook()],
|
|
130
129
|
PostToolUse: [commandHook()],
|
|
131
|
-
Stop: [commandHook()]
|
|
130
|
+
Stop: [commandHook()],
|
|
131
|
+
SubagentStart: [commandHook()],
|
|
132
|
+
SubagentStop: [commandHook()]
|
|
132
133
|
};
|
|
133
134
|
}
|
|
134
135
|
var CURSOR_WIRED_HOOK_EVENTS = [
|
|
@@ -25,8 +25,7 @@ var HOOK_INPUT_ALLOWLIST_MAX_BYTES = 4 * 1024;
|
|
|
25
25
|
var HOOK_INPUT_FULL_MAX_BYTES = 256 * 1024;
|
|
26
26
|
var HOOK_INPUT_MCP_MAX_BYTES = 4 * 1024;
|
|
27
27
|
var GZIP_MIN_BYTES = 32 * 1024;
|
|
28
|
-
var
|
|
29
|
-
var PACKAGE_VERSION = "1.2.8";
|
|
28
|
+
var PACKAGE_VERSION = "1.3.1";
|
|
30
29
|
var NPX_PACKAGE_SPEC = `@ev-ai/agent-hook@${PACKAGE_VERSION}`;
|
|
31
30
|
var HOOK_STATUS_MESSAGE = "ev-ai runtime report";
|
|
32
31
|
|
|
@@ -101,7 +100,9 @@ function desiredCodexHookGroups(command) {
|
|
|
101
100
|
UserPromptSubmit: [commandHook()],
|
|
102
101
|
PreToolUse: [commandHook()],
|
|
103
102
|
PostToolUse: [commandHook()],
|
|
104
|
-
Stop: [commandHook()]
|
|
103
|
+
Stop: [commandHook()],
|
|
104
|
+
SubagentStart: [commandHook()],
|
|
105
|
+
SubagentStop: [commandHook()]
|
|
105
106
|
};
|
|
106
107
|
}
|
|
107
108
|
var CURSOR_WIRED_HOOK_EVENTS = [
|
package/dist/plugin-hooks.mjs
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
import { createRequire as __createRequire } from 'node:module';
|
|
2
|
+
const require = __createRequire(import.meta.url);
|
|
3
|
+
|
|
4
|
+
|
|
1
5
|
// src/install/plugin-hooks.ts
|
|
2
6
|
import { chmodSync, copyFileSync, existsSync, mkdirSync, writeFileSync } from "node:fs";
|
|
3
7
|
import { dirname, join } from "node:path";
|
|
@@ -23,8 +27,7 @@ var HOOK_INPUT_ALLOWLIST_MAX_BYTES = 4 * 1024;
|
|
|
23
27
|
var HOOK_INPUT_FULL_MAX_BYTES = 256 * 1024;
|
|
24
28
|
var HOOK_INPUT_MCP_MAX_BYTES = 4 * 1024;
|
|
25
29
|
var GZIP_MIN_BYTES = 32 * 1024;
|
|
26
|
-
var
|
|
27
|
-
var PACKAGE_VERSION = "1.2.8";
|
|
30
|
+
var PACKAGE_VERSION = "1.3.1";
|
|
28
31
|
var NPX_PACKAGE_SPEC = `@ev-ai/agent-hook@${PACKAGE_VERSION}`;
|
|
29
32
|
var HOOK_STATUS_MESSAGE = "ev-ai runtime report";
|
|
30
33
|
|
|
@@ -86,7 +89,9 @@ function desiredCodexHookGroups(command) {
|
|
|
86
89
|
UserPromptSubmit: [commandHook()],
|
|
87
90
|
PreToolUse: [commandHook()],
|
|
88
91
|
PostToolUse: [commandHook()],
|
|
89
|
-
Stop: [commandHook()]
|
|
92
|
+
Stop: [commandHook()],
|
|
93
|
+
SubagentStart: [commandHook()],
|
|
94
|
+
SubagentStop: [commandHook()]
|
|
90
95
|
};
|
|
91
96
|
}
|
|
92
97
|
var CURSOR_WIRED_HOOK_EVENTS = [
|
|
@@ -122,10 +127,17 @@ function pluginLauncherPowerShellCommand(runner) {
|
|
|
122
127
|
function pluginLauncherCommands(runner) {
|
|
123
128
|
return [pluginLauncherPosixCommand(runner), pluginLauncherPowerShellCommand(runner)];
|
|
124
129
|
}
|
|
130
|
+
function claudePluginCommand() {
|
|
131
|
+
return pluginLauncherPosixCommand("claude");
|
|
132
|
+
}
|
|
133
|
+
function pluginLauncherCodexWindowsCommand() {
|
|
134
|
+
const variable = PLUGIN_ROOT_VARIABLE.codex;
|
|
135
|
+
return `node (Join-Path (Get-Item Env:${variable}).Value '${PLUGIN_HOOK_PAYLOAD}') --runner codex; exit 0`;
|
|
136
|
+
}
|
|
125
137
|
function pluginLauncherCodexCommand() {
|
|
126
138
|
return {
|
|
127
139
|
command: `sh -c 'node "\${PLUGIN_ROOT}/${PLUGIN_HOOK_PAYLOAD}" --runner codex; exit 0'`,
|
|
128
|
-
commandWindows:
|
|
140
|
+
commandWindows: pluginLauncherCodexWindowsCommand()
|
|
129
141
|
};
|
|
130
142
|
}
|
|
131
143
|
function buildClaudePluginHooks(command) {
|
|
@@ -177,7 +189,7 @@ function writeJson(path, value) {
|
|
|
177
189
|
}
|
|
178
190
|
function writeMarketplacePluginHooks(marketplaceRoot) {
|
|
179
191
|
const paths = marketplacePluginHookPaths(marketplaceRoot);
|
|
180
|
-
writeJson(paths.claude, buildClaudePluginHooks(
|
|
192
|
+
writeJson(paths.claude, buildClaudePluginHooks(claudePluginCommand()));
|
|
181
193
|
writeJson(paths.cursor, buildCursorPluginHooks(pluginLauncherCommands("cursor")));
|
|
182
194
|
writeJson(paths.codex, buildCodexPluginHooks(pluginLauncherCodexCommand()));
|
|
183
195
|
return paths;
|
|
@@ -213,7 +225,7 @@ function copyMarketplacePluginPayload(marketplaceRoot, packageRoot) {
|
|
|
213
225
|
}
|
|
214
226
|
function expectedMarketplacePluginHooks() {
|
|
215
227
|
return {
|
|
216
|
-
claude: buildClaudePluginHooks(
|
|
228
|
+
claude: buildClaudePluginHooks(claudePluginCommand()),
|
|
217
229
|
cursor: buildCursorPluginHooks(pluginLauncherCommands("cursor")),
|
|
218
230
|
codex: buildCodexPluginHooks(pluginLauncherCodexCommand())
|
|
219
231
|
};
|
|
@@ -231,10 +243,12 @@ export {
|
|
|
231
243
|
buildClaudePluginHooks,
|
|
232
244
|
buildCodexPluginHooks,
|
|
233
245
|
buildCursorPluginHooks,
|
|
246
|
+
claudePluginCommand,
|
|
234
247
|
copyMarketplacePluginPayload,
|
|
235
248
|
expectedMarketplacePluginHooks,
|
|
236
249
|
marketplacePluginHookPaths,
|
|
237
250
|
pluginLauncherCodexCommand,
|
|
251
|
+
pluginLauncherCodexWindowsCommand,
|
|
238
252
|
pluginLauncherCommands,
|
|
239
253
|
pluginLauncherPosixCommand,
|
|
240
254
|
pluginLauncherPowerShellCommand,
|