@pushary/agent-hooks 0.88.0 → 0.89.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/CHANGELOG.md +44 -0
- package/data/cursor-plugin/scripts/pushary-gate.mjs +63 -7
- package/data/vscode-plugin/scripts/pushary-gate.mjs +56 -18
- package/dist/bin/pushary-bell-hook.js +4 -4
- package/dist/bin/pushary-bell.js +7 -7
- package/dist/bin/pushary-claude.js +9 -9
- package/dist/bin/pushary-clean.js +11 -13
- package/dist/bin/pushary-codex-bridge.js +6 -6
- package/dist/bin/pushary-codex-hook.js +5 -5
- package/dist/bin/pushary-codex.js +4 -4
- package/dist/bin/pushary-connect.js +6 -6
- package/dist/bin/pushary-daemon.js +5 -5
- package/dist/bin/pushary-disconnect.js +9 -11
- package/dist/bin/pushary-doctor.js +15 -15
- package/dist/bin/pushary-elicitation-hook.js +7 -120
- package/dist/bin/pushary-gemini-bridge.js +6 -6
- package/dist/bin/pushary-gemini-hook.js +5 -5
- package/dist/bin/pushary-hook.js +6 -6
- package/dist/bin/pushary-login.js +4 -4
- package/dist/bin/pushary-logout.js +4 -4
- package/dist/bin/pushary-mode.js +3 -3
- package/dist/bin/pushary-notification-hook.js +4 -4
- package/dist/bin/pushary-opencode-hook.js +5 -5
- package/dist/bin/pushary-permission-denied-hook.js +6 -6
- package/dist/bin/pushary-permission-hook.js +6 -6
- package/dist/bin/pushary-post-hook.js +4 -4
- package/dist/bin/pushary-prompt-hook.js +4 -4
- package/dist/bin/pushary-session-end-hook.js +4 -4
- package/dist/bin/pushary-session-start-hook.js +4 -4
- package/dist/bin/pushary-setup.js +32 -29
- package/dist/bin/pushary-stats.js +2 -2
- package/dist/bin/pushary-status.js +5 -5
- package/dist/bin/pushary-stop-hook.js +4 -4
- package/dist/bin/pushary-stopfailure-hook.js +4 -4
- package/dist/bin/pushary-upgrade.js +10 -12
- package/dist/bin/pushary-wait.js +3 -3
- package/dist/{chunk-OULRSHFB.js → chunk-4FANZF2L.js} +2 -2
- package/dist/{chunk-DSTZ2RBU.js → chunk-4KMWTOBK.js} +4 -1
- package/dist/{chunk-LEYXXXRN.js → chunk-6GBQDZ7K.js} +1 -1
- package/dist/{chunk-B7ZBHWOW.js → chunk-AIGDBRIJ.js} +1 -1
- package/dist/{chunk-VSCSZ2LI.js → chunk-AJ4EMW5D.js} +1 -1
- package/dist/{chunk-DXBUFXPL.js → chunk-DLI5IXSD.js} +1 -1
- package/dist/{chunk-67TNJVJW.js → chunk-EKNFTIKO.js} +1 -1
- package/dist/{chunk-MY5A4EPQ.js → chunk-F3ZDPL6O.js} +187 -60
- package/dist/{chunk-VHHVGVFQ.js → chunk-FRH2QIMY.js} +1 -1
- package/dist/{chunk-XFHMGVMX.js → chunk-LNAQWWBP.js} +1 -1
- package/dist/{chunk-F5W3AY6L.js → chunk-LXTX5CT7.js} +1 -1
- package/dist/{chunk-T2XZH7D5.js → chunk-O7P7O4VY.js} +2 -2
- package/dist/{chunk-MNXG6IIM.js → chunk-OSE7X44J.js} +3 -3
- package/dist/{chunk-4VYELDAH.js → chunk-PXEFENML.js} +1 -1
- package/dist/{chunk-3JL64GVE.js → chunk-Q6MK2YKV.js} +120 -1
- package/dist/{chunk-ESARAYRI.js → chunk-SHVW5KFR.js} +1 -1
- package/dist/{chunk-RSUBLTMP.js → chunk-SUZF64M4.js} +2 -2
- package/dist/{chunk-3B3PYTKH.js → chunk-U44C3ULB.js} +1 -1
- package/dist/{chunk-UTQCV46U.js → chunk-U65EIMUJ.js} +4 -4
- package/dist/{chunk-6BOE5NJZ.js → chunk-WFFPWJN6.js} +1 -1
- package/dist/{chunk-WXCHB6BO.js → chunk-WPDMGNQR.js} +1 -1
- package/dist/{chunk-3PSEZOC4.js → chunk-ZPRF4YLA.js} +1 -1
- package/dist/src/index.js +6 -6
- package/package.json +1 -1
- package/dist/chunk-U6HRYNHC.js +0 -137
- /package/dist/{chunk-VT4IVERX.js → chunk-PZA7G4CN.js} +0 -0
|
@@ -4,17 +4,17 @@ import {
|
|
|
4
4
|
} from "../chunk-6CUUA7HO.js";
|
|
5
5
|
import {
|
|
6
6
|
handleSessionEnd
|
|
7
|
-
} from "../chunk-
|
|
7
|
+
} from "../chunk-OSE7X44J.js";
|
|
8
8
|
import "../chunk-J3YDT4HM.js";
|
|
9
|
-
import "../chunk-
|
|
9
|
+
import "../chunk-LXTX5CT7.js";
|
|
10
10
|
import "../chunk-RN3NOEJF.js";
|
|
11
11
|
import "../chunk-BSZYIAZL.js";
|
|
12
12
|
import "../chunk-SAF6HGAA.js";
|
|
13
|
-
import "../chunk-
|
|
13
|
+
import "../chunk-AJ4EMW5D.js";
|
|
14
14
|
import "../chunk-7QLSKOSU.js";
|
|
15
15
|
import "../chunk-KZERVKTD.js";
|
|
16
16
|
import "../chunk-2UMNXADU.js";
|
|
17
|
-
import "../chunk-
|
|
17
|
+
import "../chunk-Q6MK2YKV.js";
|
|
18
18
|
|
|
19
19
|
// bin/pushary-session-end-hook.ts
|
|
20
20
|
var main = async () => {
|
|
@@ -4,17 +4,17 @@ import {
|
|
|
4
4
|
} from "../chunk-6CUUA7HO.js";
|
|
5
5
|
import {
|
|
6
6
|
handleSessionStart
|
|
7
|
-
} from "../chunk-
|
|
7
|
+
} from "../chunk-OSE7X44J.js";
|
|
8
8
|
import "../chunk-J3YDT4HM.js";
|
|
9
|
-
import "../chunk-
|
|
9
|
+
import "../chunk-LXTX5CT7.js";
|
|
10
10
|
import "../chunk-RN3NOEJF.js";
|
|
11
11
|
import "../chunk-BSZYIAZL.js";
|
|
12
12
|
import "../chunk-SAF6HGAA.js";
|
|
13
|
-
import "../chunk-
|
|
13
|
+
import "../chunk-AJ4EMW5D.js";
|
|
14
14
|
import "../chunk-7QLSKOSU.js";
|
|
15
15
|
import "../chunk-KZERVKTD.js";
|
|
16
16
|
import "../chunk-2UMNXADU.js";
|
|
17
|
-
import "../chunk-
|
|
17
|
+
import "../chunk-Q6MK2YKV.js";
|
|
18
18
|
|
|
19
19
|
// bin/pushary-session-start-hook.ts
|
|
20
20
|
var main = async () => {
|
|
@@ -1,23 +1,18 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
detectClaudeVersion
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-DLI5IXSD.js";
|
|
5
5
|
import {
|
|
6
6
|
claudeWired,
|
|
7
7
|
codexWired,
|
|
8
8
|
geminiWired
|
|
9
|
-
} from "../chunk-
|
|
9
|
+
} from "../chunk-SUZF64M4.js";
|
|
10
10
|
import {
|
|
11
11
|
runBrowserLogin
|
|
12
12
|
} from "../chunk-Z3Z4VK5F.js";
|
|
13
13
|
import {
|
|
14
14
|
ensureDaemonRunning
|
|
15
|
-
} from "../chunk-
|
|
16
|
-
import {
|
|
17
|
-
addClaudeMcpServer,
|
|
18
|
-
addPusharyHooks,
|
|
19
|
-
addPusharyToolPermissions
|
|
20
|
-
} from "../chunk-U6HRYNHC.js";
|
|
15
|
+
} from "../chunk-4FANZF2L.js";
|
|
21
16
|
import {
|
|
22
17
|
describeDetection,
|
|
23
18
|
detectAllAgents,
|
|
@@ -29,37 +24,41 @@ import {
|
|
|
29
24
|
shortenHome,
|
|
30
25
|
vscodeSettingsTargets,
|
|
31
26
|
writeInstructionBlock
|
|
32
|
-
} from "../chunk-
|
|
27
|
+
} from "../chunk-O7P7O4VY.js";
|
|
33
28
|
import {
|
|
34
29
|
OPENCODE_HOOK_BINARY,
|
|
35
30
|
addOpenCodeMcpServer,
|
|
36
31
|
installOpenCodePlugin,
|
|
37
32
|
openCodeConfigDir,
|
|
38
33
|
openCodeConfigFile,
|
|
34
|
+
openCodeInstructionsFile,
|
|
39
35
|
openCodePluginDir,
|
|
40
36
|
openCodePluginFile,
|
|
41
37
|
openCodeWired
|
|
42
|
-
} from "../chunk-
|
|
38
|
+
} from "../chunk-4KMWTOBK.js";
|
|
43
39
|
import {
|
|
44
40
|
GEMINI_HOOK_BINARY,
|
|
41
|
+
addClaudeMcpServer,
|
|
45
42
|
addGeminiHooks,
|
|
46
43
|
addGeminiMcpServer,
|
|
44
|
+
addPusharyHooks,
|
|
45
|
+
addPusharyToolPermissions,
|
|
47
46
|
compareVersion,
|
|
48
47
|
parseVersion
|
|
49
|
-
} from "../chunk-
|
|
48
|
+
} from "../chunk-F3ZDPL6O.js";
|
|
50
49
|
import "../chunk-ATBKJNWS.js";
|
|
51
50
|
import {
|
|
52
51
|
guardBinary,
|
|
53
52
|
guardNodeScript,
|
|
54
53
|
guardedArgv
|
|
55
|
-
} from "../chunk-
|
|
54
|
+
} from "../chunk-AIGDBRIJ.js";
|
|
56
55
|
import "../chunk-XHKBHWLX.js";
|
|
57
56
|
import {
|
|
58
57
|
installGlobally,
|
|
59
58
|
npmErrorMessage,
|
|
60
59
|
resolveGlobalBinDir,
|
|
61
60
|
resolveGlobalBinary
|
|
62
|
-
} from "../chunk-
|
|
61
|
+
} from "../chunk-PZA7G4CN.js";
|
|
63
62
|
import {
|
|
64
63
|
addCodexHookTrust,
|
|
65
64
|
addCodexHooks,
|
|
@@ -79,13 +78,13 @@ import {
|
|
|
79
78
|
geminiSettings,
|
|
80
79
|
pusharyConfigFile,
|
|
81
80
|
vscodePluginDir
|
|
82
|
-
} from "../chunk-
|
|
81
|
+
} from "../chunk-FRH2QIMY.js";
|
|
83
82
|
import "../chunk-GIRT7677.js";
|
|
84
83
|
import {
|
|
85
84
|
reportEvent
|
|
86
|
-
} from "../chunk-
|
|
85
|
+
} from "../chunk-OSE7X44J.js";
|
|
87
86
|
import "../chunk-J3YDT4HM.js";
|
|
88
|
-
import "../chunk-
|
|
87
|
+
import "../chunk-LXTX5CT7.js";
|
|
89
88
|
import "../chunk-RN3NOEJF.js";
|
|
90
89
|
import {
|
|
91
90
|
confirmAppConnection,
|
|
@@ -95,12 +94,12 @@ import {
|
|
|
95
94
|
printConnectInstructions,
|
|
96
95
|
setHumanStream,
|
|
97
96
|
verifyRoundTrip
|
|
98
|
-
} from "../chunk-
|
|
97
|
+
} from "../chunk-SHVW5KFR.js";
|
|
99
98
|
import "../chunk-3EGEA4KH.js";
|
|
100
99
|
import {
|
|
101
100
|
checkApiKey,
|
|
102
101
|
describeKeyCheck
|
|
103
|
-
} from "../chunk-
|
|
102
|
+
} from "../chunk-WFFPWJN6.js";
|
|
104
103
|
import {
|
|
105
104
|
useColor
|
|
106
105
|
} from "../chunk-5RUIFDTP.js";
|
|
@@ -111,7 +110,7 @@ import {
|
|
|
111
110
|
readConfigFileKey,
|
|
112
111
|
readKeySource,
|
|
113
112
|
writeKey
|
|
114
|
-
} from "../chunk-
|
|
113
|
+
} from "../chunk-EKNFTIKO.js";
|
|
115
114
|
import {
|
|
116
115
|
parseFlags
|
|
117
116
|
} from "../chunk-GMXKITVA.js";
|
|
@@ -134,7 +133,7 @@ import {
|
|
|
134
133
|
} from "../chunk-6MTNS63X.js";
|
|
135
134
|
import "../chunk-BSZYIAZL.js";
|
|
136
135
|
import "../chunk-SAF6HGAA.js";
|
|
137
|
-
import "../chunk-
|
|
136
|
+
import "../chunk-AJ4EMW5D.js";
|
|
138
137
|
import {
|
|
139
138
|
UsageError
|
|
140
139
|
} from "../chunk-7QLSKOSU.js";
|
|
@@ -145,7 +144,7 @@ import "../chunk-2UMNXADU.js";
|
|
|
145
144
|
import {
|
|
146
145
|
CURSOR_GATE_EVENTS,
|
|
147
146
|
isValidApiKey
|
|
148
|
-
} from "../chunk-
|
|
147
|
+
} from "../chunk-Q6MK2YKV.js";
|
|
149
148
|
|
|
150
149
|
// bin/pushary-setup.ts
|
|
151
150
|
import { existsSync, readFileSync, writeFileSync, mkdirSync, cpSync, rmSync, renameSync, realpathSync, readdirSync, statSync, openSync, readSync, closeSync } from "fs";
|
|
@@ -156,6 +155,9 @@ import { checkbox, input, confirm } from "@inquirer/prompts";
|
|
|
156
155
|
import { fileURLToPath } from "url";
|
|
157
156
|
import { parse as parseTOML, stringify as stringifyTOML } from "smol-toml";
|
|
158
157
|
|
|
158
|
+
// src/cli/exit.ts
|
|
159
|
+
var isExitPromptError = (err) => err instanceof Error && (err.name === "ExitPromptError" || err.message.includes("User force closed") || /force closed the prompt/i.test(err.message));
|
|
160
|
+
|
|
159
161
|
// src/setup/closing.ts
|
|
160
162
|
var ACTIVITY_URL = "pushary.com/dashboard/agent/activity";
|
|
161
163
|
var COMMAND_SURFACE = [
|
|
@@ -662,7 +664,6 @@ var readAgentToml = (filePath) => {
|
|
|
662
664
|
);
|
|
663
665
|
}
|
|
664
666
|
};
|
|
665
|
-
var isCancellation = (err) => err instanceof Error && (err.name === "ExitPromptError" || /force closed the prompt/i.test(err.message));
|
|
666
667
|
var formatError = (err) => {
|
|
667
668
|
if (err instanceof Error) {
|
|
668
669
|
const errWithSignal = err;
|
|
@@ -806,7 +807,7 @@ var ensurePip = (python) => {
|
|
|
806
807
|
}
|
|
807
808
|
};
|
|
808
809
|
var enablePusharyPlugin = (python) => {
|
|
809
|
-
const snippet = 'from hermes_cli.config import load_config, save_config; c = load_config(); p = c.get("plugins") if isinstance(c.get("plugins"), dict) else {}; e = p.get("enabled") if isinstance(p.get("enabled"), list) else []; p["enabled"] = (e + ["pushary"]) if "pushary" not in e else e; c["plugins"] = p; a = c.get("agent") if isinstance(c.get("agent"), dict) else {}; d = a.get("disabled_toolsets") if isinstance(a.get("disabled_toolsets"), list) else []; a["disabled_toolsets"] = (d + ["clarify"]) if "clarify" not in d else d; c["agent"] = a; save_config(c)';
|
|
810
|
+
const snippet = 'from hermes_cli.config import load_config, save_config; c = load_config(); s = c.get("security") if isinstance(c.get("security"), dict) else {}; ap = s.get("approval") if isinstance(s.get("approval"), dict) else {}; ap["transport"] = "pushary"; ap["transport_fallback"] = "builtin"; s["approval"] = ap; c["security"] = s; p = c.get("plugins") if isinstance(c.get("plugins"), dict) else {}; e = p.get("enabled") if isinstance(p.get("enabled"), list) else []; p["enabled"] = (e + ["pushary"]) if "pushary" not in e else e; c["plugins"] = p; a = c.get("agent") if isinstance(c.get("agent"), dict) else {}; d = a.get("disabled_toolsets") if isinstance(a.get("disabled_toolsets"), list) else []; a["disabled_toolsets"] = (d + ["clarify"]) if "clarify" not in d else d; c["agent"] = a; save_config(c)';
|
|
810
811
|
const scriptPath = join3(tmpdir(), `pushary-hermes-${process.pid}.py`);
|
|
811
812
|
try {
|
|
812
813
|
writeFileSync(scriptPath, snippet.split("; ").join("\n"), "utf-8");
|
|
@@ -846,15 +847,17 @@ var setupHermes = async (_apiKey) => {
|
|
|
846
847
|
});
|
|
847
848
|
if (!pluginEnabled) {
|
|
848
849
|
console.log(` ${yellow("!")} Installed the plugin, but could not edit Hermes' config.`);
|
|
849
|
-
noteManual('Add "pushary" to plugins.enabled in ~/.hermes/config.yaml,
|
|
850
|
+
noteManual('Add "pushary" to plugins.enabled and set security.approval.transport to "pushary" (with transport_fallback "builtin") in ~/.hermes/config.yaml, plus "clarify" in agent.disabled_toolsets');
|
|
850
851
|
}
|
|
851
852
|
console.log();
|
|
852
853
|
console.log(` ${dim("What this configured:")}`);
|
|
853
|
-
console.log(` ${dim("\u2022")} Native tools: pushary_notify, pushary_ask, pushary_wait, pushary_cancel`);
|
|
854
|
+
console.log(` ${dim("\u2022")} Native tools: pushary_notify, pushary_ask, pushary_wait, pushary_cancel, pushary_propose_scope`);
|
|
855
|
+
console.log(` ${dim("\u2022")} Approvals: Hermes' dangerous-command prompts go to your phone with allow once / this session / always / deny`);
|
|
856
|
+
console.log(` ${dim("\u2022")} Falls back to the terminal prompt when no device is connected, so work never blocks on us`);
|
|
854
857
|
console.log(` ${dim("\u2022")} Questions go to your phone: Hermes' terminal ${bold("clarify")} tool is disabled, so pushary_ask handles every question`);
|
|
855
858
|
console.log(` ${dim("\u2022")} Auto-notifications: push alert when tools return errors`);
|
|
856
|
-
console.log(` ${dim("
|
|
857
|
-
console.log(` ${dim("To re-enable terminal
|
|
859
|
+
console.log(` ${dim("To send approvals back to the terminal:")} remove ${bold("security.approval.transport")} from ~/.hermes/config.yaml`);
|
|
860
|
+
console.log(` ${dim("To re-enable terminal questions:")} remove ${bold("clarify")} from ${dim("agent.disabled_toolsets")}`);
|
|
858
861
|
};
|
|
859
862
|
var CODEX_HOOKS_JSON = join3(CODEX_HOME, "hooks.json");
|
|
860
863
|
var CODEX_HOOKS_MIN_VERSION = [0, 122, 0];
|
|
@@ -1414,7 +1417,7 @@ var setupGemini = async (apiKey) => {
|
|
|
1414
1417
|
console.log(` ${dim("Restart Gemini CLI to load the new config.")}`);
|
|
1415
1418
|
noteManual("Restart Gemini CLI to load the new config.");
|
|
1416
1419
|
};
|
|
1417
|
-
var OPENCODE_INSTRUCTIONS =
|
|
1420
|
+
var OPENCODE_INSTRUCTIONS = openCodeInstructionsFile;
|
|
1418
1421
|
var setupOpenCode = async (apiKey) => {
|
|
1419
1422
|
console.log(`
|
|
1420
1423
|
${bold("Setting up OpenCode")}
|
|
@@ -2081,7 +2084,7 @@ main().catch(async (err) => {
|
|
|
2081
2084
|
console.log();
|
|
2082
2085
|
process.exit(EXIT.USAGE);
|
|
2083
2086
|
}
|
|
2084
|
-
if (
|
|
2087
|
+
if (isExitPromptError(err)) {
|
|
2085
2088
|
console.log();
|
|
2086
2089
|
console.log(` ${dim("Cancelled. Nothing further was changed.")}`);
|
|
2087
2090
|
console.log();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
readLedgerSummary
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-PXEFENML.js";
|
|
5
5
|
import {
|
|
6
6
|
exitOnHelpFlag
|
|
7
7
|
} from "../chunk-SQOFGPNX.js";
|
|
@@ -11,7 +11,7 @@ import "../chunk-KZERVKTD.js";
|
|
|
11
11
|
import {
|
|
12
12
|
getApiKey
|
|
13
13
|
} from "../chunk-2UMNXADU.js";
|
|
14
|
-
import "../chunk-
|
|
14
|
+
import "../chunk-Q6MK2YKV.js";
|
|
15
15
|
|
|
16
16
|
// bin/pushary-stats.ts
|
|
17
17
|
exitOnHelpFlag("stats");
|
|
@@ -8,18 +8,18 @@ import {
|
|
|
8
8
|
describeReach,
|
|
9
9
|
fetchChannels,
|
|
10
10
|
reachVerdict
|
|
11
|
-
} from "../chunk-
|
|
11
|
+
} from "../chunk-SHVW5KFR.js";
|
|
12
12
|
import "../chunk-3EGEA4KH.js";
|
|
13
13
|
import {
|
|
14
14
|
checkApiKey,
|
|
15
15
|
describeKeyCheck
|
|
16
|
-
} from "../chunk-
|
|
16
|
+
} from "../chunk-WFFPWJN6.js";
|
|
17
17
|
import {
|
|
18
18
|
createIo
|
|
19
19
|
} from "../chunk-5RUIFDTP.js";
|
|
20
20
|
import {
|
|
21
21
|
readKeySource
|
|
22
|
-
} from "../chunk-
|
|
22
|
+
} from "../chunk-EKNFTIKO.js";
|
|
23
23
|
import {
|
|
24
24
|
rejectUnknownFlags
|
|
25
25
|
} from "../chunk-GMXKITVA.js";
|
|
@@ -32,7 +32,7 @@ import "../chunk-DINDL2CF.js";
|
|
|
32
32
|
import "../chunk-6MTNS63X.js";
|
|
33
33
|
import "../chunk-BSZYIAZL.js";
|
|
34
34
|
import "../chunk-SAF6HGAA.js";
|
|
35
|
-
import "../chunk-
|
|
35
|
+
import "../chunk-AJ4EMW5D.js";
|
|
36
36
|
import {
|
|
37
37
|
UsageError
|
|
38
38
|
} from "../chunk-7QLSKOSU.js";
|
|
@@ -40,7 +40,7 @@ import {
|
|
|
40
40
|
EXIT
|
|
41
41
|
} from "../chunk-KZERVKTD.js";
|
|
42
42
|
import "../chunk-2UMNXADU.js";
|
|
43
|
-
import "../chunk-
|
|
43
|
+
import "../chunk-Q6MK2YKV.js";
|
|
44
44
|
|
|
45
45
|
// src/status.ts
|
|
46
46
|
var keySourceLine = (source) => {
|
|
@@ -4,17 +4,17 @@ import {
|
|
|
4
4
|
} from "../chunk-6CUUA7HO.js";
|
|
5
5
|
import {
|
|
6
6
|
handleStop
|
|
7
|
-
} from "../chunk-
|
|
7
|
+
} from "../chunk-OSE7X44J.js";
|
|
8
8
|
import "../chunk-J3YDT4HM.js";
|
|
9
|
-
import "../chunk-
|
|
9
|
+
import "../chunk-LXTX5CT7.js";
|
|
10
10
|
import "../chunk-RN3NOEJF.js";
|
|
11
11
|
import "../chunk-BSZYIAZL.js";
|
|
12
12
|
import "../chunk-SAF6HGAA.js";
|
|
13
|
-
import "../chunk-
|
|
13
|
+
import "../chunk-AJ4EMW5D.js";
|
|
14
14
|
import "../chunk-7QLSKOSU.js";
|
|
15
15
|
import "../chunk-KZERVKTD.js";
|
|
16
16
|
import "../chunk-2UMNXADU.js";
|
|
17
|
-
import "../chunk-
|
|
17
|
+
import "../chunk-Q6MK2YKV.js";
|
|
18
18
|
|
|
19
19
|
// bin/pushary-stop-hook.ts
|
|
20
20
|
var main = async () => {
|
|
@@ -4,17 +4,17 @@ import {
|
|
|
4
4
|
} from "../chunk-6CUUA7HO.js";
|
|
5
5
|
import {
|
|
6
6
|
handleStopFailure
|
|
7
|
-
} from "../chunk-
|
|
7
|
+
} from "../chunk-OSE7X44J.js";
|
|
8
8
|
import "../chunk-J3YDT4HM.js";
|
|
9
|
-
import "../chunk-
|
|
9
|
+
import "../chunk-LXTX5CT7.js";
|
|
10
10
|
import "../chunk-RN3NOEJF.js";
|
|
11
11
|
import "../chunk-BSZYIAZL.js";
|
|
12
12
|
import "../chunk-SAF6HGAA.js";
|
|
13
|
-
import "../chunk-
|
|
13
|
+
import "../chunk-AJ4EMW5D.js";
|
|
14
14
|
import "../chunk-7QLSKOSU.js";
|
|
15
15
|
import "../chunk-KZERVKTD.js";
|
|
16
16
|
import "../chunk-2UMNXADU.js";
|
|
17
|
-
import "../chunk-
|
|
17
|
+
import "../chunk-Q6MK2YKV.js";
|
|
18
18
|
|
|
19
19
|
// bin/pushary-stopfailure-hook.ts
|
|
20
20
|
var main = async () => {
|
|
@@ -1,28 +1,26 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
detectClaudeVersion
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import {
|
|
6
|
-
addClaudeMcpServer,
|
|
7
|
-
addPusharyHooks,
|
|
8
|
-
addPusharyToolPermissions
|
|
9
|
-
} from "../chunk-U6HRYNHC.js";
|
|
4
|
+
} from "../chunk-DLI5IXSD.js";
|
|
10
5
|
import {
|
|
11
6
|
GEMINI_HOOK_BINARY,
|
|
7
|
+
addClaudeMcpServer,
|
|
12
8
|
addGeminiHooks,
|
|
13
9
|
addGeminiMcpServer,
|
|
10
|
+
addPusharyHooks,
|
|
11
|
+
addPusharyToolPermissions,
|
|
14
12
|
hasGeminiHooks
|
|
15
|
-
} from "../chunk-
|
|
13
|
+
} from "../chunk-F3ZDPL6O.js";
|
|
16
14
|
import "../chunk-ATBKJNWS.js";
|
|
17
15
|
import {
|
|
18
16
|
guardBinary
|
|
19
|
-
} from "../chunk-
|
|
17
|
+
} from "../chunk-AIGDBRIJ.js";
|
|
20
18
|
import {
|
|
21
19
|
execNpm,
|
|
22
20
|
npmErrorMessage,
|
|
23
21
|
resolveGlobalBinDir,
|
|
24
22
|
resolveGlobalBinary
|
|
25
|
-
} from "../chunk-
|
|
23
|
+
} from "../chunk-PZA7G4CN.js";
|
|
26
24
|
import {
|
|
27
25
|
CODEX_HOOK_BINARY,
|
|
28
26
|
addCodexHookTrust,
|
|
@@ -37,7 +35,7 @@ import {
|
|
|
37
35
|
hasCodexHooks,
|
|
38
36
|
vscodePluginDir,
|
|
39
37
|
vscodePluginMcp
|
|
40
|
-
} from "../chunk-
|
|
38
|
+
} from "../chunk-FRH2QIMY.js";
|
|
41
39
|
import "../chunk-GIRT7677.js";
|
|
42
40
|
import {
|
|
43
41
|
exitOnHelpFlag
|
|
@@ -53,7 +51,7 @@ import "../chunk-KZERVKTD.js";
|
|
|
53
51
|
import {
|
|
54
52
|
getApiKey
|
|
55
53
|
} from "../chunk-2UMNXADU.js";
|
|
56
|
-
import "../chunk-
|
|
54
|
+
import "../chunk-Q6MK2YKV.js";
|
|
57
55
|
|
|
58
56
|
// bin/pushary-upgrade.ts
|
|
59
57
|
import { existsSync as existsSync2 } from "fs";
|
|
@@ -240,7 +238,7 @@ var detectInstallModes = () => {
|
|
|
240
238
|
},
|
|
241
239
|
{
|
|
242
240
|
label: "Hermes plugin (pip)",
|
|
243
|
-
upgrade: "
|
|
241
|
+
upgrade: "npx @pushary/agent-hooks@latest setup --agents hermes",
|
|
244
242
|
present: existsSync2(join2(homedir2(), ".hermes"))
|
|
245
243
|
}
|
|
246
244
|
];
|
package/dist/bin/pushary-wait.js
CHANGED
|
@@ -4,8 +4,8 @@ import {
|
|
|
4
4
|
} from "../chunk-IIENZE2J.js";
|
|
5
5
|
import {
|
|
6
6
|
exitOnFailedResponse
|
|
7
|
-
} from "../chunk-
|
|
8
|
-
import "../chunk-
|
|
7
|
+
} from "../chunk-ZPRF4YLA.js";
|
|
8
|
+
import "../chunk-WFFPWJN6.js";
|
|
9
9
|
import {
|
|
10
10
|
createIo
|
|
11
11
|
} from "../chunk-5RUIFDTP.js";
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
getApiKey,
|
|
29
29
|
getBaseUrl
|
|
30
30
|
} from "../chunk-2UMNXADU.js";
|
|
31
|
-
import "../chunk-
|
|
31
|
+
import "../chunk-Q6MK2YKV.js";
|
|
32
32
|
|
|
33
33
|
// bin/pushary-wait.ts
|
|
34
34
|
exitOnHelpFlag("wait");
|
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
} from "./chunk-XHKBHWLX.js";
|
|
5
5
|
import {
|
|
6
6
|
resolveGlobalBinary
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-PZA7G4CN.js";
|
|
8
8
|
import {
|
|
9
9
|
pusharyDir
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-FRH2QIMY.js";
|
|
11
11
|
import {
|
|
12
12
|
getMachineId
|
|
13
13
|
} from "./chunk-RN3NOEJF.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
HOOK_BUDGETS,
|
|
3
3
|
OPENCODE_APPROVAL_EVENT
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-Q6MK2YKV.js";
|
|
5
5
|
|
|
6
6
|
// src/opencode-plugin.ts
|
|
7
7
|
var OPENCODE_PLUGIN_MARKER = "pushary-opencode-plugin w1";
|
|
@@ -333,6 +333,8 @@ var openCodeWired = (dir = openCodePluginDir()) => {
|
|
|
333
333
|
var OPENCODE_MCP_URL = "https://pushary.com/api/mcp/mcp";
|
|
334
334
|
var OPENCODE_CONFIG_FILE = "opencode.json";
|
|
335
335
|
var openCodeConfigFile = () => join(openCodeConfigDir(), OPENCODE_CONFIG_FILE);
|
|
336
|
+
var OPENCODE_INSTRUCTIONS_FILE = "AGENTS.md";
|
|
337
|
+
var openCodeInstructionsFile = () => join(openCodeConfigDir(), OPENCODE_INSTRUCTIONS_FILE);
|
|
336
338
|
var asRecord = (value) => value && typeof value === "object" && !Array.isArray(value) ? value : void 0;
|
|
337
339
|
var addOpenCodeMcpServer = (config, apiKey) => {
|
|
338
340
|
const servers = asRecord(config.mcp) ?? {};
|
|
@@ -366,6 +368,7 @@ export {
|
|
|
366
368
|
installOpenCodePlugin,
|
|
367
369
|
openCodeWired,
|
|
368
370
|
openCodeConfigFile,
|
|
371
|
+
openCodeInstructionsFile,
|
|
369
372
|
addOpenCodeMcpServer,
|
|
370
373
|
removeOpenCodeMcpServer
|
|
371
374
|
};
|