pushary 1.9.210 → 1.9.213
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 +22 -0
- package/dist/{api-GBK5CCGM.js → api-XXA3DBK5.js} +11 -11
- package/dist/bin/pushary-audit.js +3 -3
- package/dist/bin/pushary-bell-hook.js +28 -28
- package/dist/bin/pushary-bell.js +12 -12
- package/dist/bin/pushary-calls.js +15 -15
- package/dist/bin/pushary-claude.js +36 -35
- package/dist/bin/pushary-clean.js +39 -39
- package/dist/bin/pushary-codex-bridge.js +24 -24
- package/dist/bin/pushary-codex-hook.js +38 -42
- package/dist/bin/pushary-codex-session.js +8 -8
- package/dist/bin/pushary-codex.js +16 -16
- package/dist/bin/pushary-connect.js +35 -35
- package/dist/bin/pushary-cowork.js +5 -5
- package/dist/bin/pushary-daemon.js +46 -47
- package/dist/bin/pushary-disconnect.js +30 -30
- package/dist/bin/pushary-display-hook.js +1 -0
- package/dist/bin/pushary-doctor.js +48 -47
- package/dist/bin/pushary-elicitation-hook.js +28 -29
- package/dist/bin/pushary-gemini-bridge.js +19 -19
- package/dist/bin/pushary-gemini-hook.js +33 -35
- package/dist/bin/pushary-hook.js +34 -36
- package/dist/bin/pushary-login.js +22 -22
- package/dist/bin/pushary-logout.js +30 -30
- package/dist/bin/pushary-mcp.js +12 -12
- package/dist/bin/pushary-mode.js +16 -16
- package/dist/bin/pushary-notification-hook.js +27 -27
- package/dist/bin/pushary-opencode-bridge.js +24 -24
- package/dist/bin/pushary-opencode-hook.js +35 -39
- package/dist/bin/pushary-permission-denied-hook.js +34 -36
- package/dist/bin/pushary-permission-hook.js +34 -36
- package/dist/bin/pushary-post-hook.js +28 -28
- package/dist/bin/pushary-prompt-hook.js +27 -27
- package/dist/bin/pushary-session-end-hook.js +27 -27
- package/dist/bin/pushary-session-start-hook.js +39 -40
- package/dist/bin/pushary-sessions.js +14 -14
- package/dist/bin/pushary-setup.js +63 -65
- package/dist/bin/pushary-stats.js +5 -5
- package/dist/bin/pushary-status.js +36 -36
- package/dist/bin/pushary-stop-hook.js +27 -27
- package/dist/bin/pushary-stopfailure-hook.js +27 -27
- package/dist/bin/pushary-suggestions.js +16 -16
- package/dist/bin/pushary-transcript-register.js +22 -20
- package/dist/bin/pushary-transcripts.js +26 -26
- package/dist/bin/pushary-upgrade.js +49 -50
- package/dist/bin/pushary-wait.js +16 -16
- package/dist/bin/pushary.js +7 -7
- package/dist/{chunk-ULDH35EQ.js → chunk-2BKMZ2CZ.js} +5 -5
- package/dist/{chunk-HFDMGCBY.js → chunk-2DNM6F7C.js} +5 -5
- package/dist/{chunk-FZDIXPVK.js → chunk-2OREQ7MI.js} +2 -2
- package/dist/{chunk-DVCYIK56.js → chunk-2WCI5BY6.js} +2 -2
- package/dist/{chunk-M2PWMMXD.js → chunk-3T7KADQO.js} +422 -71
- package/dist/{chunk-73TR7RU4.js → chunk-3USB6JEH.js} +3 -3
- package/dist/{chunk-JJB34JRR.js → chunk-47G72ONB.js} +3 -3
- package/dist/{chunk-52MSHZYI.js → chunk-4DXHNWUY.js} +6 -6
- package/dist/{chunk-672F6V2L.js → chunk-4NJBLOER.js} +2 -2
- package/dist/{chunk-JMKJHN6U.js → chunk-53PLSLF5.js} +45 -167
- package/dist/{chunk-GS4RR3LH.js → chunk-5B5PPHJH.js} +1 -1
- package/dist/{chunk-37HOIRPC.js → chunk-5ML6PZ4U.js} +15 -17
- package/dist/{chunk-7AYZRIII.js → chunk-5XBZABC5.js} +2 -2
- package/dist/{chunk-6EPBLKBZ.js → chunk-6D54GFZC.js} +5 -5
- package/dist/{chunk-XE47DXLF.js → chunk-6FLCKWIH.js} +5 -5
- package/dist/{chunk-JWPOZFT6.js → chunk-6FN7NPOE.js} +2 -2
- package/dist/{chunk-TGYDKCOB.js → chunk-6N73T3G2.js} +2 -2
- package/dist/{chunk-LSUB2RBM.js → chunk-7H6BFJU5.js} +1 -1
- package/dist/{chunk-2L6RQHDJ.js → chunk-7MPVFAYZ.js} +1 -1
- package/dist/{chunk-JFSAQQO2.js → chunk-ARTOOCLW.js} +1 -1
- package/dist/{chunk-5AY2STJB.js → chunk-BKTWGQLC.js} +30 -10
- package/dist/{chunk-FGYQI6YP.js → chunk-CJRHVIUJ.js} +1 -1
- package/dist/{chunk-GAJ5BULC.js → chunk-CR5X46JQ.js} +1 -1
- package/dist/{chunk-SWUBCXOZ.js → chunk-CXLHBAN4.js} +3 -3
- package/dist/{chunk-NQAET7YS.js → chunk-FBDVDCMC.js} +9 -6
- package/dist/{chunk-SK65JVE3.js → chunk-FCIJEVDH.js} +1 -1
- package/dist/{chunk-NQQDBWMM.js → chunk-FJJRXIZC.js} +7 -7
- package/dist/{chunk-AYITBDTL.js → chunk-FUZSKAEQ.js} +3 -3
- package/dist/{chunk-X6KWCU54.js → chunk-FYAEQIYF.js} +4 -4
- package/dist/{chunk-QMXE2YQO.js → chunk-G4UCXWJX.js} +6 -6
- package/dist/{chunk-5SGCCWNR.js → chunk-GJ5XTWNZ.js} +1 -1
- package/dist/{chunk-ERVRBZNI.js → chunk-GKMSHV5D.js} +2 -2
- package/dist/{chunk-XRURBIKQ.js → chunk-GKTQXPUM.js} +1 -1
- package/dist/{chunk-TC6DWKY5.js → chunk-HFDNWC2K.js} +1 -1
- package/dist/{chunk-RYK2DXDF.js → chunk-HT4WO7V6.js} +7 -7
- package/dist/{chunk-TFCNGH7V.js → chunk-ID7W4YBQ.js} +1 -1
- package/dist/{chunk-BV74A4Q3.js → chunk-IHG2TFXZ.js} +3 -3
- package/dist/{chunk-VM6WBORP.js → chunk-JKM7YRYV.js} +141 -7
- package/dist/{chunk-Q2NOGE3Y.js → chunk-JYDVDSBM.js} +8 -13
- package/dist/{chunk-CJAHB4QY.js → chunk-K3HFMX5R.js} +6 -6
- package/dist/{chunk-7WVGOW6O.js → chunk-K5IPDN4D.js} +5 -5
- package/dist/{chunk-VUUC2V3L.js → chunk-KJA5JZXV.js} +2 -2
- package/dist/{chunk-VIKKRYII.js → chunk-KQRWWJLF.js} +1 -1
- package/dist/{chunk-BPEYHTXU.js → chunk-LBPGPPHU.js} +2 -2
- package/dist/{chunk-TSUPVKMX.js → chunk-NTNEBBYW.js} +10 -10
- package/dist/{chunk-52CYFOP4.js → chunk-O372NWUI.js} +5 -5
- package/dist/{chunk-SA634ZQS.js → chunk-ODF2RMXP.js} +4 -4
- package/dist/{chunk-ADNPGA5K.js → chunk-OLD2IPCZ.js} +6 -6
- package/dist/{chunk-5QEFRYVG.js → chunk-OV7W5JYC.js} +9 -9
- package/dist/{chunk-YOM5NVDW.js → chunk-PKDU2BY4.js} +3 -3
- package/dist/{chunk-JF3IB3QX.js → chunk-POXHWH73.js} +14 -3
- package/dist/{chunk-JSTAZSTC.js → chunk-PSKPKVM6.js} +1 -1
- package/dist/{chunk-HUDP6NKM.js → chunk-QEMU3P55.js} +3 -3
- package/dist/{chunk-7V4ZAQNO.js → chunk-QLKIY3FD.js} +1 -1
- package/dist/{chunk-XELCQFDJ.js → chunk-QQEJDPYK.js} +1 -1
- package/dist/{chunk-3MO2JND5.js → chunk-RDWNFNDW.js} +4 -4
- package/dist/{chunk-NPYCMOFC.js → chunk-RE5KA47K.js} +3 -3
- package/dist/{chunk-E2WCYHXF.js → chunk-RN2PB5JJ.js} +5 -5
- package/dist/{chunk-TAKPXBNF.js → chunk-RZISUO3M.js} +23 -13
- package/dist/{chunk-VXXWVOKF.js → chunk-SGOP6D4K.js} +1 -1
- package/dist/{chunk-EH6ATZZU.js → chunk-SK6242SK.js} +2 -2
- package/dist/{chunk-GTNSTDUB.js → chunk-SR3FOAJE.js} +2 -2
- package/dist/{chunk-LEOHGIZ5.js → chunk-T63XZCBU.js} +5 -5
- package/dist/{chunk-GTHM6XOG.js → chunk-TBCV2U6Y.js} +1 -1
- package/dist/{chunk-GXGJYRAN.js → chunk-UPZHYN4N.js} +4 -4
- package/dist/{chunk-V3PYEJRY.js → chunk-UQQN6ST3.js} +1 -1
- package/dist/{chunk-IYGEE7XO.js → chunk-VKGJ4XY5.js} +1 -1
- package/dist/{chunk-JA6DFYFJ.js → chunk-VUCXVBDQ.js} +3 -3
- package/dist/{chunk-AJV7HEGB.js → chunk-VZD4SLJE.js} +15 -13
- package/dist/{chunk-XMZEG5QB.js → chunk-W6PL3FPJ.js} +4 -4
- package/dist/{chunk-W7EUKTEI.js → chunk-W7Z4GJZI.js} +3 -3
- package/dist/{chunk-GC64OIDA.js → chunk-WIWFIQL4.js} +2 -2
- package/dist/{chunk-VQLAGEHH.js → chunk-WXWWCODY.js} +1 -1
- package/dist/{chunk-SOMSKUI6.js → chunk-Y3OHWGZV.js} +2 -2
- package/dist/{chunk-E4AOJK33.js → chunk-YN4Q3ZXZ.js} +6 -4
- package/dist/{chunk-SW33W47V.js → chunk-Z6QGSQEN.js} +4 -4
- package/dist/{chunk-7Y4AMZG3.js → chunk-ZJYSZDFR.js} +1 -1
- package/dist/{chunk-GILLSUOE.js → chunk-ZRDDV7QK.js} +5 -5
- package/dist/{chunk-RMASRYS4.js → chunk-ZYXC6ZEQ.js} +1 -1
- package/dist/{codex-app-cards-switch-VSNLHN5H.js → codex-app-cards-switch-3A5N6T77.js} +11 -11
- package/dist/{codex-card-routing-EBLLT4JN.js → codex-card-routing-SYP6VQTQ.js} +2 -2
- package/dist/{codex-desktop-launch-XGXKINN5.js → codex-desktop-launch-XFYCWMO6.js} +1 -1
- package/dist/{codex-session-launch-YQNK4MEM.js → codex-session-launch-O4ZB2CTG.js} +20 -20
- package/dist/{config-QTON6UUP.js → config-KVGNGI6J.js} +3 -3
- package/dist/{global-upgrade-AOZNS5TM.js → global-upgrade-MRY3EP7V.js} +9 -9
- package/dist/{identity-TILIXUYO.js → identity-PSFVJNH5.js} +4 -4
- package/dist/{live-capabilities-BE7NSCFI.js → live-capabilities-VBKANCXF.js} +4 -4
- package/dist/{paths-MIWMKITN.js → paths-JPEMX4YI.js} +3 -3
- package/dist/reapply-TBGC63MP.js +74 -0
- package/dist/src/index.d.ts +2 -21
- package/dist/src/index.js +33 -35
- package/dist/{upgrade-lock-N75TGVFZ.js → upgrade-lock-RW44O57U.js} +4 -4
- package/dist/{usage-IH2QUEKB.js → usage-NCJLUCAW.js} +3 -3
- package/package.json +1 -1
- package/dist/chunk-BXFI56J5.js +0 -78
- package/dist/chunk-ELY55B2S.js +0 -162
- package/dist/chunk-SHK2PLZC.js +0 -39
- package/dist/reapply-NBOQ7UO2.js +0 -75
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
import {
|
|
2
|
+
serviceNodeFor
|
|
3
|
+
} from "./chunk-4DXHNWUY.js";
|
|
4
|
+
import {
|
|
5
|
+
OWNER_ONLY_FILE_MODE,
|
|
6
|
+
readOwnerOnlyJson
|
|
7
|
+
} from "./chunk-P6DUWKAO.js";
|
|
1
8
|
import {
|
|
2
9
|
spawnClaude
|
|
3
10
|
} from "./chunk-3PSNUHC5.js";
|
|
@@ -7,17 +14,139 @@ import {
|
|
|
7
14
|
codexHome,
|
|
8
15
|
codexHooksJsonIn,
|
|
9
16
|
isPusharyCodexCommand
|
|
10
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-SR3FOAJE.js";
|
|
11
18
|
import {
|
|
19
|
+
DEFAULT_WINDOWS_PATHEXT,
|
|
20
|
+
DIRECTLY_STARTABLE_EXTENSIONS,
|
|
21
|
+
plannedGlobalPackage,
|
|
22
|
+
readGlobalPrefix,
|
|
12
23
|
resolvePathBinary
|
|
13
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-YN4Q3ZXZ.js";
|
|
14
25
|
import {
|
|
15
|
-
getPackageVersion
|
|
26
|
+
getPackageVersion,
|
|
27
|
+
globalTranscriptRegisterEntry
|
|
16
28
|
} from "./chunk-CXQWDQCJ.js";
|
|
17
29
|
|
|
30
|
+
// src/hermes/history-helper.ts
|
|
31
|
+
import { chmodSync, existsSync, mkdirSync, realpathSync, renameSync, rmSync, statSync, writeFileSync } from "fs";
|
|
32
|
+
import { dirname, join, win32 } from "path";
|
|
33
|
+
var HERMES_HISTORY_HELPER_RECORD_FILE = "hermes-history-helper.json";
|
|
34
|
+
var HERMES_HISTORY_HELPER_RECORD_VERSION = 1;
|
|
35
|
+
var HERMES_HISTORY_HELPER_RECORD_MAX_BYTES = 8192;
|
|
36
|
+
var PUSHARY_DIRECTORY_MODE = 448;
|
|
37
|
+
var HERMES_HISTORY_HELPER_COMMAND = "pushary-transcript-register";
|
|
38
|
+
var WINDOWS_NPM_SHIM_EXTENSION = ".cmd";
|
|
39
|
+
var WINDOWS_DEFAULT_EXEC_PATH = ".;C:\\bin";
|
|
40
|
+
var hermesHistoryNeedsTheCliHelper = (facts) => facts.sessionHistory && facts.macAppHistory === "none";
|
|
41
|
+
var hermesHistoryHelperRecordPath = (pusharyDirectory) => join(pusharyDirectory, HERMES_HISTORY_HELPER_RECORD_FILE);
|
|
42
|
+
var hermesHistoryHelperRecordFor = (runtime, entry) => ({
|
|
43
|
+
version: HERMES_HISTORY_HELPER_RECORD_VERSION,
|
|
44
|
+
command: [runtime, entry]
|
|
45
|
+
});
|
|
46
|
+
var hermesHistoryHelperRecordFailed = (outcome) => outcome.kind === "helper_not_installed" || outcome.kind === "write_failed" || outcome.kind === "not_on_path";
|
|
47
|
+
var serializedRecord = (record) => `${JSON.stringify(record, null, 2)}
|
|
48
|
+
`;
|
|
49
|
+
var recordIsAlreadyInPlace = (record, path) => {
|
|
50
|
+
try {
|
|
51
|
+
return JSON.stringify(readOwnerOnlyJson(path, HERMES_HISTORY_HELPER_RECORD_MAX_BYTES)) === JSON.stringify(record);
|
|
52
|
+
} catch {
|
|
53
|
+
return false;
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
var discardStagedRecord = (staged) => {
|
|
57
|
+
try {
|
|
58
|
+
rmSync(staged, { force: true });
|
|
59
|
+
} catch {
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
var writeHermesHistoryHelperRecord = (record, path) => {
|
|
64
|
+
if (record === null || !record.command.every((part) => existsSync(part))) return { kind: "helper_not_installed" };
|
|
65
|
+
if (recordIsAlreadyInPlace(record, path)) return { kind: "unchanged", path };
|
|
66
|
+
const staged = `${path}.${process.pid}.tmp`;
|
|
67
|
+
try {
|
|
68
|
+
mkdirSync(dirname(path), { recursive: true, mode: PUSHARY_DIRECTORY_MODE });
|
|
69
|
+
writeFileSync(staged, serializedRecord(record), { mode: OWNER_ONLY_FILE_MODE });
|
|
70
|
+
chmodSync(staged, OWNER_ONLY_FILE_MODE);
|
|
71
|
+
renameSync(staged, path);
|
|
72
|
+
return { kind: "written", path };
|
|
73
|
+
} catch {
|
|
74
|
+
discardStagedRecord(staged);
|
|
75
|
+
return { kind: "write_failed", path };
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
var installedHermesHistoryHelper = (execPath) => {
|
|
79
|
+
const prefix = readGlobalPrefix();
|
|
80
|
+
if (prefix === void 0) return null;
|
|
81
|
+
const entry = globalTranscriptRegisterEntry(prefix, plannedGlobalPackage(), process.platform);
|
|
82
|
+
return hermesHistoryHelperRecordFor(serviceNodeFor(execPath, existsSync), entry);
|
|
83
|
+
};
|
|
84
|
+
var isRootedWindowsDirectory = (entry) => win32.isAbsolute(entry) && win32.parse(entry).root.length > 1;
|
|
85
|
+
var ONE_COMMAND_BIN_FOLDER = ["node_modules", ".bin"];
|
|
86
|
+
var NPM_PATH_MARKER = ["@npmcli", "run-script", "lib", "node-gyp-bin"];
|
|
87
|
+
var lowerCaseSegmentsOf = (entry) => win32.normalize(entry).split(win32.sep).filter((segment) => segment.length > 0).map((segment) => segment.toLowerCase());
|
|
88
|
+
var endsWithSegments = (entry, tail) => {
|
|
89
|
+
const segments = lowerCaseSegmentsOf(entry);
|
|
90
|
+
return tail.every((segment, index) => segments.at(index - tail.length) === segment);
|
|
91
|
+
};
|
|
92
|
+
var isFolderAddedForOneCommand = (entry) => endsWithSegments(entry, ONE_COMMAND_BIN_FOLDER);
|
|
93
|
+
var isNpmPathMarker = (entry) => endsWithSegments(entry, NPM_PATH_MARKER);
|
|
94
|
+
var pathBeforeNpmChangedIt = (entries) => entries.slice(entries.map(isNpmPathMarker).lastIndexOf(true) + 1);
|
|
95
|
+
var isPathFolderHermesShares = (entry) => isRootedWindowsDirectory(entry) && !isFolderAddedForOneCommand(entry);
|
|
96
|
+
var pluginSearchExtensions = (pathExt) => (pathExt ?? DEFAULT_WINDOWS_PATHEXT).split(";").filter((extension) => DIRECTLY_STARTABLE_EXTENSIONS.has(extension.toLowerCase()));
|
|
97
|
+
var windowsHermesHistoryHelperOnPath = (search) => {
|
|
98
|
+
const extensions = pluginSearchExtensions(search.pathExt);
|
|
99
|
+
for (const directory of pathBeforeNpmChangedIt((search.pathValue ?? WINDOWS_DEFAULT_EXEC_PATH).split(win32.delimiter)).filter(isPathFolderHermesShares)) {
|
|
100
|
+
const found = extensions.map((extension) => win32.join(directory, `${HERMES_HISTORY_HELPER_COMMAND}${extension}`)).find(search.exists);
|
|
101
|
+
if (found !== void 0) return found;
|
|
102
|
+
}
|
|
103
|
+
return void 0;
|
|
104
|
+
};
|
|
105
|
+
var windowsHermesHistoryHelperOutcome = (facts) => {
|
|
106
|
+
if (!facts.installedInPrefix) return { kind: "helper_not_installed" };
|
|
107
|
+
if (facts.firstOnPath === void 0 || !facts.firstOnPath.isTheInstall) return { kind: "not_on_path", directory: facts.prefix };
|
|
108
|
+
return { kind: "on_path", directory: win32.dirname(facts.firstOnPath.path) };
|
|
109
|
+
};
|
|
110
|
+
var isFileAt = (path) => {
|
|
111
|
+
try {
|
|
112
|
+
return statSync(path, { throwIfNoEntry: false })?.isFile() === true;
|
|
113
|
+
} catch {
|
|
114
|
+
return false;
|
|
115
|
+
}
|
|
116
|
+
};
|
|
117
|
+
var windowsSpellingKey = (path) => win32.resolve(path).toLowerCase();
|
|
118
|
+
var resolvedWindowsFileKey = (path) => {
|
|
119
|
+
try {
|
|
120
|
+
return realpathSync.native(path).toLowerCase();
|
|
121
|
+
} catch {
|
|
122
|
+
return void 0;
|
|
123
|
+
}
|
|
124
|
+
};
|
|
125
|
+
var isTheSameWindowsFile = (left, right) => {
|
|
126
|
+
if (windowsSpellingKey(left) === windowsSpellingKey(right)) return true;
|
|
127
|
+
const resolved = resolvedWindowsFileKey(left);
|
|
128
|
+
return resolved !== void 0 && resolved === resolvedWindowsFileKey(right);
|
|
129
|
+
};
|
|
130
|
+
var windowsNpmShimIn = (prefix) => win32.join(prefix, `${HERMES_HISTORY_HELPER_COMMAND}${WINDOWS_NPM_SHIM_EXTENSION}`);
|
|
131
|
+
var windowsHermesHistoryHelperIsInstalledIn = (prefix) => [windowsNpmShimIn(prefix), globalTranscriptRegisterEntry(prefix, plannedGlobalPackage(), "win32")].every(isFileAt);
|
|
132
|
+
var installedWindowsHermesHistoryHelper = (pathValue, pathExt) => {
|
|
133
|
+
const prefix = readGlobalPrefix();
|
|
134
|
+
if (prefix === void 0 || !windowsHermesHistoryHelperIsInstalledIn(prefix)) return windowsHermesHistoryHelperOutcome({ installedInPrefix: false });
|
|
135
|
+
const onPath = windowsHermesHistoryHelperOnPath({ pathValue, pathExt, exists: isFileAt });
|
|
136
|
+
return windowsHermesHistoryHelperOutcome({
|
|
137
|
+
installedInPrefix: true,
|
|
138
|
+
prefix,
|
|
139
|
+
firstOnPath: onPath === void 0 ? void 0 : { path: onPath, isTheInstall: isTheSameWindowsFile(onPath, windowsNpmShimIn(prefix)) }
|
|
140
|
+
});
|
|
141
|
+
};
|
|
142
|
+
var recordInstalledHermesHistoryHelper = (pusharyDirectory, execPath = process.execPath, platform = process.platform, pathValue = process.env.PATH, pathExt = process.env.PATHEXT) => {
|
|
143
|
+
if (platform === "win32") return installedWindowsHermesHistoryHelper(pathValue, pathExt);
|
|
144
|
+
return writeHermesHistoryHelperRecord(installedHermesHistoryHelper(execPath), hermesHistoryHelperRecordPath(pusharyDirectory));
|
|
145
|
+
};
|
|
146
|
+
|
|
18
147
|
// src/codex-app-server.ts
|
|
19
|
-
import { existsSync, realpathSync } from "fs";
|
|
20
|
-
import { join } from "path";
|
|
148
|
+
import { existsSync as existsSync2, realpathSync as realpathSync2 } from "fs";
|
|
149
|
+
import { join as join2 } from "path";
|
|
21
150
|
var CODEX_HOOK_STATUS = {
|
|
22
151
|
trusted: "trusted",
|
|
23
152
|
untrusted: "untrusted",
|
|
@@ -151,7 +280,7 @@ var mayAskCodex = (conditions) => {
|
|
|
151
280
|
};
|
|
152
281
|
var canonicalPath = (path) => {
|
|
153
282
|
try {
|
|
154
|
-
return
|
|
283
|
+
return realpathSync2(path);
|
|
155
284
|
} catch {
|
|
156
285
|
return path;
|
|
157
286
|
}
|
|
@@ -269,7 +398,7 @@ var launchOf = (options) => {
|
|
|
269
398
|
const decision = mayAskCodex({
|
|
270
399
|
interactive: options.interactive ?? process.stdout.isTTY === true,
|
|
271
400
|
codexOnPath: binary ? canonicalPath(binary) : null,
|
|
272
|
-
codexOpenedBefore:
|
|
401
|
+
codexOpenedBefore: existsSync2(join2(home, CODEX_INSTALLATION_ID_FILE))
|
|
273
402
|
});
|
|
274
403
|
if (decision.kind === "skipped") return decision;
|
|
275
404
|
return { binary: decision.binary, codexHome: home, timeoutMs: options.timeoutMs ?? CODEX_APP_SERVER_TIMEOUT_MS };
|
|
@@ -329,6 +458,11 @@ var readCodexTrustForPusharyHooks = async (options = {}) => {
|
|
|
329
458
|
};
|
|
330
459
|
|
|
331
460
|
export {
|
|
461
|
+
HERMES_HISTORY_HELPER_COMMAND,
|
|
462
|
+
hermesHistoryNeedsTheCliHelper,
|
|
463
|
+
hermesHistoryHelperRecordPath,
|
|
464
|
+
hermesHistoryHelperRecordFailed,
|
|
465
|
+
recordInstalledHermesHistoryHelper,
|
|
332
466
|
CODEX_HOOK_STATUS,
|
|
333
467
|
assessCodexHookTrust,
|
|
334
468
|
ensureCodexTrustsPusharyHooks,
|
|
@@ -8,21 +8,21 @@ import {
|
|
|
8
8
|
SubscriptionRequiredError,
|
|
9
9
|
callMcpTool,
|
|
10
10
|
isRetryable
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-2DNM6F7C.js";
|
|
12
12
|
import {
|
|
13
13
|
fetchAsCredential
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-HFDNWC2K.js";
|
|
15
15
|
import {
|
|
16
16
|
installNetworkDefaults,
|
|
17
17
|
isNetworkFailure
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-3USB6JEH.js";
|
|
19
19
|
import {
|
|
20
20
|
clientReportClaims
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-SR3FOAJE.js";
|
|
22
22
|
import {
|
|
23
23
|
getApiKey,
|
|
24
24
|
getBaseUrl
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-ZJYSZDFR.js";
|
|
26
26
|
import {
|
|
27
27
|
ASK_AGENT_NAME_MAX,
|
|
28
28
|
CLIENT_REPORT_PATH,
|
|
@@ -33,11 +33,12 @@ import {
|
|
|
33
33
|
WAIT_END_OPEN,
|
|
34
34
|
WAIT_END_PATH,
|
|
35
35
|
degradedLine,
|
|
36
|
+
isAskUserReply,
|
|
36
37
|
isDecisionStoppedReply,
|
|
37
38
|
isRecord,
|
|
38
39
|
truncateLine,
|
|
39
40
|
waitEndAnswered
|
|
40
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-POXHWH73.js";
|
|
41
42
|
|
|
42
43
|
// src/api.ts
|
|
43
44
|
import { randomUUID } from "crypto";
|
|
@@ -48,11 +49,6 @@ var isPolicyConfig = (data) => {
|
|
|
48
49
|
const d = data;
|
|
49
50
|
return (d.resolvedAgent === void 0 || typeof d.resolvedAgent === "string") && Array.isArray(d.policies) && typeof d.defaultTimeoutSeconds === "number" && typeof d.defaultTimeoutAction === "string";
|
|
50
51
|
};
|
|
51
|
-
var isAskUserResponse = (data) => {
|
|
52
|
-
if (!data || typeof data !== "object") return false;
|
|
53
|
-
const d = data;
|
|
54
|
-
return typeof d.correlationId === "string" && typeof d.status === "string" && (d.typedAnswer === void 0 || d.typedAnswer === true) && (d.answered === void 0 || typeof d.answered === "boolean") && (d.value === void 0 || typeof d.value === "string") && (d.note === void 0 || typeof d.note === "string") && (d.waitEndsAt === void 0 || typeof d.waitEndsAt === "string");
|
|
55
|
-
};
|
|
56
52
|
var isWaitForAnswerResponse = (data) => {
|
|
57
53
|
if (!data || typeof data !== "object") return false;
|
|
58
54
|
const d = data;
|
|
@@ -272,7 +268,7 @@ var ASK_USER_TIMEOUT_MS = 15e3;
|
|
|
272
268
|
var askUser = async (apiKey, params, timeoutMs = ASK_USER_TIMEOUT_MS, baseUrl, signal) => {
|
|
273
269
|
const identified = params.toolUseId || params.requestId ? params : { ...params, requestId: randomUUID() };
|
|
274
270
|
const result = await callMcpTool(apiKey, "ask_user", { ...withinAskUserLimits(identified), pausedAware: true, wait: false }, { maxRetries: 3, timeoutMs, baseUrl, signal });
|
|
275
|
-
if (!
|
|
271
|
+
if (!isAskUserReply(result)) throw new Error("Invalid ask_user response");
|
|
276
272
|
return result;
|
|
277
273
|
};
|
|
278
274
|
var waitForAnswer = async (apiKey, correlationId, timeoutMs = 3e4, signal, baseUrl) => {
|
|
@@ -508,7 +504,6 @@ export {
|
|
|
508
504
|
clientErrorKindOf,
|
|
509
505
|
writeDegraded,
|
|
510
506
|
isPolicyConfig,
|
|
511
|
-
isAskUserResponse,
|
|
512
507
|
isWaitForAnswerResponse,
|
|
513
508
|
isThePersonsStop,
|
|
514
509
|
askingProcessWaits,
|
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
forkFinishWithUpgradeLock,
|
|
4
4
|
installWithUpgradeLock,
|
|
5
5
|
releaseAutoUpdateLock
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-5XBZABC5.js";
|
|
7
7
|
import {
|
|
8
8
|
phoneStartIsRequired
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-VUCXVBDQ.js";
|
|
10
10
|
import {
|
|
11
11
|
describeAutoUpdateCheck,
|
|
12
12
|
globalInstallLocation,
|
|
@@ -18,12 +18,12 @@ import {
|
|
|
18
18
|
readAutoUpdateState,
|
|
19
19
|
updateAutoUpdateState,
|
|
20
20
|
upgradeEntryFor
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-WIWFIQL4.js";
|
|
22
22
|
import {
|
|
23
23
|
autoUpdateLock,
|
|
24
24
|
autoUpdateLog,
|
|
25
25
|
autoUpdateState
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-SR3FOAJE.js";
|
|
27
27
|
import {
|
|
28
28
|
describeReleaseNpmHolds,
|
|
29
29
|
execNpm,
|
|
@@ -33,10 +33,10 @@ import {
|
|
|
33
33
|
npmExitedOnReleaseAge,
|
|
34
34
|
readGlobalCliInstallAt,
|
|
35
35
|
readGlobalPrefix
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-YN4Q3ZXZ.js";
|
|
37
37
|
import {
|
|
38
38
|
NPX_LATEST_COMMAND
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-KQRWWJLF.js";
|
|
40
40
|
import {
|
|
41
41
|
EXIT
|
|
42
42
|
} from "./chunk-BG4HHB7E.js";
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
notificationAnswerStep
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-OLD2IPCZ.js";
|
|
4
4
|
import {
|
|
5
5
|
matchMacAccountStep,
|
|
6
6
|
retryAgentCommand
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-CXLHBAN4.js";
|
|
8
8
|
import {
|
|
9
9
|
canChangeApprovalSettings
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-KJA5JZXV.js";
|
|
11
11
|
import {
|
|
12
12
|
NPX_LATEST_COMMAND,
|
|
13
13
|
npmExecSetupCommandFor
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-KQRWWJLF.js";
|
|
15
15
|
import {
|
|
16
16
|
EXIT
|
|
17
17
|
} from "./chunk-BG4HHB7E.js";
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
import {
|
|
22
22
|
compatibleProfileFor,
|
|
23
23
|
isCompatibleAgentType
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-POXHWH73.js";
|
|
25
25
|
|
|
26
26
|
// src/setup/closing.ts
|
|
27
27
|
var ACTIVITY_URL = "pushary.com/dashboard/agent/activity";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
absoluteUrl
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-47G72ONB.js";
|
|
4
4
|
import {
|
|
5
5
|
KEY_SCOPE
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-POXHWH73.js";
|
|
7
7
|
|
|
8
8
|
// src/cli/approval-settings-pages.ts
|
|
9
9
|
var API_KEYS_PATH = "/dashboard/agent/settings";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
pusharyDir
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-SR3FOAJE.js";
|
|
4
4
|
import {
|
|
5
5
|
readRegularJsonFile,
|
|
6
6
|
writeFileAtomic
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
serializeDeclinedAgents,
|
|
14
14
|
withDeclinedAgent,
|
|
15
15
|
withoutDeclinedAgent
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-POXHWH73.js";
|
|
17
17
|
|
|
18
18
|
// src/declined-agents-file.ts
|
|
19
19
|
import { join } from "path";
|
|
@@ -6,38 +6,37 @@ import {
|
|
|
6
6
|
postLiveSession,
|
|
7
7
|
postLiveSessionUntilAccepted,
|
|
8
8
|
startLiveSessionHeartbeat
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-5B5PPHJH.js";
|
|
10
10
|
import {
|
|
11
11
|
CommandReceipts,
|
|
12
12
|
controllerCommandSchema
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-FCIJEVDH.js";
|
|
14
14
|
import {
|
|
15
15
|
SESSION_IDLE_TIMEOUT_MS,
|
|
16
16
|
describeIdleWindow,
|
|
17
17
|
idleDeadlinePassed,
|
|
18
18
|
startProcessOwnership
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-6N73T3G2.js";
|
|
20
20
|
import {
|
|
21
21
|
spawnClaude
|
|
22
22
|
} from "./chunk-3PSNUHC5.js";
|
|
23
23
|
import {
|
|
24
|
-
isAskUserResponse,
|
|
25
24
|
isDecisionStopped,
|
|
26
25
|
isWaitForAnswerResponse,
|
|
27
26
|
withdrawQuestion,
|
|
28
27
|
writeDegraded
|
|
29
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-JYDVDSBM.js";
|
|
30
29
|
import {
|
|
31
30
|
readCommandAck
|
|
32
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-ID7W4YBQ.js";
|
|
33
32
|
import {
|
|
34
33
|
callMcpTool,
|
|
35
34
|
isRetryable
|
|
36
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-2DNM6F7C.js";
|
|
37
36
|
import {
|
|
38
37
|
projectNameFor,
|
|
39
38
|
repositoryScopeFor
|
|
40
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-QLKIY3FD.js";
|
|
41
40
|
import {
|
|
42
41
|
AGENT_QUESTION_DESCRIPTION_MAX,
|
|
43
42
|
AGENT_QUESTION_HEADER_MAX,
|
|
@@ -52,13 +51,14 @@ import {
|
|
|
52
51
|
canonicalJsonText,
|
|
53
52
|
codexNativeApprovalResponse,
|
|
54
53
|
elicitationContent,
|
|
54
|
+
isAskUserReply,
|
|
55
55
|
isQuestionOwner,
|
|
56
56
|
parseAgentQuestionAnswers,
|
|
57
57
|
parseCodexNativeApproval,
|
|
58
58
|
parseCodexQuestions,
|
|
59
59
|
planElicitationAsk,
|
|
60
60
|
readElicitationFields
|
|
61
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-POXHWH73.js";
|
|
62
62
|
|
|
63
63
|
// src/codex-question-owner.ts
|
|
64
64
|
import { createHash } from "crypto";
|
|
@@ -620,7 +620,7 @@ var answerCodexQuestions = async (options, params, signal, toolName = "request_u
|
|
|
620
620
|
localSurfaceAvailable: options.shared ?? false
|
|
621
621
|
}, createTimeout, options.shared ? AbortSignal.timeout(createTimeout) : signal);
|
|
622
622
|
correlationId = string(object(result)?.correlationId);
|
|
623
|
-
if (!
|
|
623
|
+
if (!isAskUserReply(result)) throw new Error("Invalid ask_user response");
|
|
624
624
|
if (correlationId && dispatch) dispatch.correlationIds.push(correlationId);
|
|
625
625
|
while (!result.answered) {
|
|
626
626
|
if (result.status === "terminal" || result.status === "notified" || result.suppressed || result.mode === "terminal_only" || result.mode === "notify_only") {
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import {
|
|
2
2
|
cursorGateOwnsClaudeCall,
|
|
3
3
|
readCursorGateRegistration
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-W6PL3FPJ.js";
|
|
5
5
|
import {
|
|
6
6
|
registerTranscript
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-RZISUO3M.js";
|
|
8
8
|
import {
|
|
9
9
|
namedEvent
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-RN2PB5JJ.js";
|
|
11
11
|
import {
|
|
12
12
|
writeDegraded
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-JYDVDSBM.js";
|
|
14
14
|
import {
|
|
15
15
|
claudeShapedHookInput,
|
|
16
16
|
hookCompatibleProfileBySource,
|
|
17
17
|
isGrokHookPayload,
|
|
18
18
|
isGrokSessionEndStop
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-POXHWH73.js";
|
|
20
20
|
|
|
21
21
|
// src/tool-hook-input.ts
|
|
22
22
|
var OPTIONAL_TEXT_FIELDS = ["hook_event_name", "session_id", "cwd", "transcript_path", "tool_use_id", "permission_mode", "cursor_version"];
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
compatibleConfigFile,
|
|
3
3
|
hasCompatibleHooks
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-RN2PB5JJ.js";
|
|
5
5
|
import {
|
|
6
6
|
pusharyHookExecutable
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-Z6QGSQEN.js";
|
|
8
8
|
import {
|
|
9
9
|
isProtectedByScope,
|
|
10
10
|
registerHookEntry
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-SR3FOAJE.js";
|
|
12
12
|
import {
|
|
13
13
|
isRecord
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-POXHWH73.js";
|
|
15
15
|
|
|
16
16
|
// src/cursor-config.ts
|
|
17
17
|
var hookCommandOf = (entry) => {
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import {
|
|
2
2
|
APPROVAL_RULES_PATH,
|
|
3
3
|
canChangeApprovalSettings
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-KJA5JZXV.js";
|
|
5
5
|
import {
|
|
6
6
|
callMcpTool
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-2DNM6F7C.js";
|
|
8
8
|
import {
|
|
9
9
|
absoluteUrl
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-47G72ONB.js";
|
|
11
11
|
import {
|
|
12
12
|
getBaseUrl
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-ZJYSZDFR.js";
|
|
14
14
|
import {
|
|
15
15
|
NPX_LATEST_COMMAND
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-KQRWWJLF.js";
|
|
17
17
|
import {
|
|
18
18
|
AGENT_STOP_DEFAULT_SECONDS,
|
|
19
19
|
APPROVAL_MODE_META,
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
classifyConfirmResponse,
|
|
22
22
|
isAnswerSource,
|
|
23
23
|
roundTripAsk
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-POXHWH73.js";
|
|
25
25
|
|
|
26
26
|
// src/reach.ts
|
|
27
27
|
var PUSHARY_APP_DOWNLOAD_URL = "https://pushary.com/download";
|
|
@@ -1,33 +1,33 @@
|
|
|
1
1
|
import {
|
|
2
2
|
MANAGED_CLAUDE_SETTINGS_BY_PLATFORM
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-2OREQ7MI.js";
|
|
4
4
|
import {
|
|
5
5
|
declinedAgentsFile,
|
|
6
6
|
readDeclinedAgents
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-LBPGPPHU.js";
|
|
8
8
|
import {
|
|
9
9
|
OPENCODE_HOOK_BINARY,
|
|
10
10
|
openCodeConfigDir,
|
|
11
11
|
openCodePluginFile
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-FJJRXIZC.js";
|
|
13
13
|
import {
|
|
14
14
|
openCodePluginArgv
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-QQEJDPYK.js";
|
|
16
16
|
import {
|
|
17
17
|
liveCursorGateCoverage
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-W6PL3FPJ.js";
|
|
19
19
|
import {
|
|
20
20
|
compatibleConfigFile,
|
|
21
21
|
compatibleHookEvents,
|
|
22
22
|
grokHome,
|
|
23
23
|
parseConfigDocument
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-RN2PB5JJ.js";
|
|
25
25
|
import {
|
|
26
26
|
DEFAULT_HOOKS_KEY_PATH,
|
|
27
27
|
GEMINI_HOOK_BINARY,
|
|
28
28
|
GEMINI_HOOK_EVENTS,
|
|
29
29
|
hooksAt
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-Z6QGSQEN.js";
|
|
31
31
|
import {
|
|
32
32
|
CODEX_EARLIER_APPROVAL_MATCHERS,
|
|
33
33
|
CODEX_HOOK_BINARY,
|
|
@@ -55,7 +55,7 @@ import {
|
|
|
55
55
|
parseHookArgv,
|
|
56
56
|
parseHookCommand,
|
|
57
57
|
supportedClaudeEvents
|
|
58
|
-
} from "./chunk-
|
|
58
|
+
} from "./chunk-SR3FOAJE.js";
|
|
59
59
|
import {
|
|
60
60
|
readRegularJsonFile,
|
|
61
61
|
readRegularTextFile
|
|
@@ -69,7 +69,7 @@ import {
|
|
|
69
69
|
OPENCODE_APPROVAL_EVENT,
|
|
70
70
|
isRecord,
|
|
71
71
|
matcherMatchesEveryCall
|
|
72
|
-
} from "./chunk-
|
|
72
|
+
} from "./chunk-POXHWH73.js";
|
|
73
73
|
|
|
74
74
|
// src/hook-wiring.ts
|
|
75
75
|
import { createHash } from "crypto";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
resolveInstallSourceFor
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-Y3OHWGZV.js";
|
|
4
4
|
import {
|
|
5
5
|
configFilePath
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-ZJYSZDFR.js";
|
|
7
7
|
import {
|
|
8
8
|
backupFile,
|
|
9
9
|
backupFileInto,
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
API_KEY_PREFIX_PATTERN,
|
|
16
16
|
isRecord,
|
|
17
17
|
isValidApiKey
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-POXHWH73.js";
|
|
19
19
|
|
|
20
20
|
// src/shell-alias.ts
|
|
21
21
|
import { homedir } from "os";
|