pushary 1.9.212 → 1.9.214
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 +8 -0
- package/dist/{api-SNFXRUBO.js → api-4PUPB24W.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 +28 -28
- package/dist/bin/pushary-clean.js +39 -39
- package/dist/bin/pushary-codex-bridge.js +24 -24
- package/dist/bin/pushary-codex-hook.js +34 -34
- 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 +84 -2
- package/dist/bin/pushary-doctor.js +48 -47
- package/dist/bin/pushary-elicitation-hook.js +27 -27
- package/dist/bin/pushary-gemini-bridge.js +19 -19
- package/dist/bin/pushary-gemini-hook.js +31 -31
- package/dist/bin/pushary-hook.js +34 -34
- 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 +32 -32
- package/dist/bin/pushary-permission-denied-hook.js +34 -34
- package/dist/bin/pushary-permission-hook.js +34 -34
- 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 +62 -64
- 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-NCPBMIR5.js → chunk-27AOD6AJ.js} +4 -4
- package/dist/{chunk-KQRWWJLF.js → chunk-2WKMK3MA.js} +1 -1
- package/dist/{chunk-WXWWCODY.js → chunk-3NS3MQID.js} +1 -1
- package/dist/{chunk-A4I6XOX3.js → chunk-3RMKNFAK.js} +3 -3
- package/dist/{chunk-ID7W4YBQ.js → chunk-3ZJWAE7Y.js} +1 -1
- package/dist/{chunk-ARTOOCLW.js → chunk-4IASS2L5.js} +1 -1
- package/dist/{chunk-GDWAKBBT.js → chunk-4TTCW5NU.js} +6 -4
- package/dist/{chunk-RE5KA47K.js → chunk-67DK2CIW.js} +3 -3
- package/dist/{chunk-UXQI33VO.js → chunk-6CD5QFP6.js} +6 -6
- package/dist/{chunk-PRRJZZAF.js → chunk-6PMNHW55.js} +3 -3
- package/dist/{chunk-5E7QI7VP.js → chunk-6UG6HV4Y.js} +9 -9
- package/dist/{chunk-6FN7NPOE.js → chunk-7JG5HH7Z.js} +2 -2
- package/dist/{chunk-7H6BFJU5.js → chunk-7OBWD2XH.js} +1 -1
- package/dist/{chunk-ZXQNUTK3.js → chunk-A3PPXX6R.js} +8 -8
- package/dist/{chunk-5B5PPHJH.js → chunk-ACYVHNR2.js} +1 -1
- package/dist/{chunk-Y3OHWGZV.js → chunk-AWDT7VQI.js} +2 -2
- package/dist/{chunk-LWFFQJ3Y.js → chunk-B7W3VGWO.js} +3 -3
- package/dist/{chunk-FYAEQIYF.js → chunk-BOAESLW5.js} +4 -4
- package/dist/{chunk-W2LDJTM6.js → chunk-BQTO3K5X.js} +5 -5
- package/dist/{chunk-D347AAH7.js → chunk-BW74KYAH.js} +30 -10
- package/dist/{chunk-NYJXBV6G.js → chunk-CSY3KGUK.js} +5 -5
- package/dist/{chunk-NDYH6TS3.js → chunk-D7IVASAJ.js} +2 -2
- package/dist/{chunk-7TROI3WY.js → chunk-DA2VDGD4.js} +3 -3
- package/dist/{chunk-65QMCTQ3.js → chunk-DXGH7C47.js} +2 -2
- package/dist/{chunk-KSAE6TKK.js → chunk-E3XVIY5H.js} +5 -5
- package/dist/{chunk-PSKPKVM6.js → chunk-FB5CFFNH.js} +1 -1
- package/dist/{chunk-V3QWU2WK.js → chunk-FFJKZYQA.js} +4 -4
- package/dist/{chunk-O3375GQ5.js → chunk-FKREGRCQ.js} +2 -2
- package/dist/{chunk-NMG6GB3W.js → chunk-FWCMADJS.js} +5 -5
- package/dist/{chunk-LLCNGORA.js → chunk-GE6BQL5V.js} +3 -3
- package/dist/{chunk-ZYXC6ZEQ.js → chunk-GHMNWVIT.js} +1 -1
- package/dist/{chunk-GJ5XTWNZ.js → chunk-GX7NST6J.js} +1 -1
- package/dist/{chunk-BLQ2JF2F.js → chunk-HIYWW2EL.js} +1 -1
- package/dist/{chunk-E5BZJAJ7.js → chunk-HY2DPLMM.js} +7 -7
- package/dist/{chunk-DOPDHW6I.js → chunk-IAAARTZD.js} +141 -7
- package/dist/{chunk-V2R6Y4ES.js → chunk-IALNFQJX.js} +2 -2
- package/dist/{chunk-HCILDIRX.js → chunk-JBP6KADX.js} +2 -2
- package/dist/{chunk-VLV34V6X.js → chunk-JZOKFZ27.js} +15 -17
- package/dist/{chunk-CVZMRD73.js → chunk-KG6AOJOA.js} +4 -4
- package/dist/{chunk-SGOP6D4K.js → chunk-KMT24TVI.js} +1 -1
- package/dist/{chunk-UQQN6ST3.js → chunk-L5EZLYKM.js} +7 -4
- package/dist/{chunk-AINVDTY2.js → chunk-LBN3RGJS.js} +4 -4
- package/dist/{chunk-3KADQBEQ.js → chunk-LD7QJLE6.js} +5 -5
- package/dist/{chunk-4NJBLOER.js → chunk-LUR57S72.js} +2 -2
- package/dist/{chunk-7MPVFAYZ.js → chunk-M6I2EQ7J.js} +1 -1
- package/dist/{chunk-VKGJ4XY5.js → chunk-MEONDMJP.js} +1 -1
- package/dist/{chunk-Q73RI245.js → chunk-MPP7EEJJ.js} +5 -5
- package/dist/{chunk-RIGWC5YP.js → chunk-MWMN5LUH.js} +2 -2
- package/dist/{chunk-AUDKOK2X.js → chunk-O5CC4CF6.js} +6 -6
- package/dist/{chunk-FUZSKAEQ.js → chunk-OF6AUDV5.js} +3 -3
- package/dist/{chunk-RS6WYORY.js → chunk-OIGBUSHM.js} +5 -5
- package/dist/{chunk-QLKIY3FD.js → chunk-OXTKCSQH.js} +1 -1
- package/dist/{chunk-NETM5KD2.js → chunk-P2HYWAEX.js} +2 -2
- package/dist/{chunk-ZNF5ATIQ.js → chunk-P6BE3IE6.js} +12 -12
- package/dist/{chunk-I2ZILRS4.js → chunk-PIZ2VDOF.js} +6 -6
- package/dist/{chunk-HVBMU7HP.js → chunk-PUNSO7UP.js} +6 -6
- package/dist/{chunk-74RTPZ2B.js → chunk-Q2F7H5AO.js} +16 -16
- package/dist/{chunk-POXHWH73.js → chunk-Q4CX35CK.js} +138 -43
- package/dist/{chunk-Z5OUGH4K.js → chunk-QDW4H4BE.js} +23 -13
- package/dist/{chunk-N4D5YYO2.js → chunk-R2ZVMZRM.js} +2 -2
- package/dist/{chunk-FCIJEVDH.js → chunk-S33W45N6.js} +1 -1
- package/dist/{chunk-CR5X46JQ.js → chunk-SQRYZMBT.js} +1 -1
- package/dist/{chunk-HTLG7JIU.js → chunk-SW3YNO4E.js} +1 -1
- package/dist/{chunk-2FFSF562.js → chunk-T56AUJS3.js} +5 -5
- package/dist/{chunk-PIXOAUE6.js → chunk-TFN65TCT.js} +6 -6
- package/dist/{chunk-PKDU2BY4.js → chunk-UCEHVBFY.js} +3 -3
- package/dist/{chunk-3NEKVCP2.js → chunk-US2O2BCI.js} +4 -4
- package/dist/{chunk-LMQDIQI4.js → chunk-UXQADKBJ.js} +5 -5
- package/dist/{chunk-GWDAFH4B.js → chunk-V7BM5U5N.js} +2 -2
- package/dist/{chunk-I7KUHNSA.js → chunk-VCZQZJIX.js} +3 -3
- package/dist/{chunk-R4BUYRSV.js → chunk-WAXSCVF3.js} +5 -5
- package/dist/{chunk-7KTLZJGF.js → chunk-XATTYXWT.js} +3 -3
- package/dist/{chunk-GKTQXPUM.js → chunk-XTHQV6DP.js} +1 -1
- package/dist/{chunk-HCBPEZXH.js → chunk-YOOH4XZM.js} +7 -7
- package/dist/{chunk-HFDNWC2K.js → chunk-ZKTFWYT4.js} +1 -1
- package/dist/{chunk-ZJYSZDFR.js → chunk-ZMEZWQ7O.js} +1 -1
- package/dist/{chunk-VY7UHIPW.js → chunk-ZOT4PHSL.js} +2 -2
- package/dist/{chunk-ZWT4WF2W.js → chunk-ZPUSBUTT.js} +9 -6
- package/dist/{chunk-QQEJDPYK.js → chunk-ZSIVPFCH.js} +1 -1
- package/dist/{codex-app-cards-switch-3TCXMVNB.js → codex-app-cards-switch-T7UULQ5T.js} +11 -11
- package/dist/{codex-card-routing-SYP6VQTQ.js → codex-card-routing-TTRI27CG.js} +2 -2
- package/dist/{codex-desktop-launch-4JX7HA66.js → codex-desktop-launch-W34FG52F.js} +1 -1
- package/dist/{codex-session-launch-ITEGM77S.js → codex-session-launch-ZMWMRTP5.js} +20 -20
- package/dist/{config-KVGNGI6J.js → config-5EIPFQTD.js} +3 -3
- package/dist/{global-upgrade-SSWKV5NF.js → global-upgrade-BW22HRDL.js} +9 -9
- package/dist/{identity-BMEZY3ST.js → identity-URZS4PNH.js} +4 -4
- package/dist/{live-capabilities-AXVWZKBK.js → live-capabilities-IPUVJWHV.js} +4 -4
- package/dist/{paths-EFJCRBNQ.js → paths-M7UGQE4K.js} +3 -3
- package/dist/reapply-423JE23N.js +74 -0
- package/dist/src/index.js +33 -33
- package/dist/{upgrade-lock-FCKMP6W2.js → upgrade-lock-GMEQWSHI.js} +4 -4
- package/dist/{usage-NCJLUCAW.js → usage-SHIUXLVP.js} +3 -3
- package/package.json +1 -1
- package/dist/chunk-UP2JWLPI.js +0 -78
- package/dist/reapply-S26S7GHW.js +0 -75
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
import {
|
|
2
|
+
serviceNodeFor
|
|
3
|
+
} from "./chunk-6CD5QFP6.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-FKREGRCQ.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-4TTCW5NU.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,
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
pusharyDir
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-FKREGRCQ.js";
|
|
4
4
|
import {
|
|
5
5
|
readJsonSafe
|
|
6
6
|
} from "./chunk-PM2NRK6Y.js";
|
|
7
7
|
import {
|
|
8
8
|
isRecord
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-Q4CX35CK.js";
|
|
10
10
|
|
|
11
11
|
// src/process-ownership.ts
|
|
12
12
|
import { createHash, randomUUID } from "crypto";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
claudeConfigDir
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-FKREGRCQ.js";
|
|
4
4
|
import {
|
|
5
5
|
claudePermissionRulesFromSettings
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-Q4CX35CK.js";
|
|
7
7
|
|
|
8
8
|
// src/claude-permission-rules.ts
|
|
9
9
|
import { readFileSync, statSync } from "fs";
|
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
hermesHistoryNeedsTheCliHelper,
|
|
3
|
-
recordInstalledHermesHistoryHelper
|
|
4
|
-
} from "./chunk-UP2JWLPI.js";
|
|
5
1
|
import {
|
|
6
2
|
macAppHistoryDecision
|
|
7
3
|
} from "./chunk-TWWOQKXK.js";
|
|
8
4
|
import {
|
|
9
|
-
ensureCodexTrustsPusharyHooks
|
|
10
|
-
|
|
5
|
+
ensureCodexTrustsPusharyHooks,
|
|
6
|
+
hermesHistoryNeedsTheCliHelper,
|
|
7
|
+
recordInstalledHermesHistoryHelper
|
|
8
|
+
} from "./chunk-IAAARTZD.js";
|
|
11
9
|
import {
|
|
12
10
|
hermesReceiptPaths,
|
|
13
11
|
hermesSetupPredatesThePluginFolder,
|
|
@@ -16,7 +14,7 @@ import {
|
|
|
16
14
|
refreshHermesPluginFiles,
|
|
17
15
|
refreshOpenClawPlugin,
|
|
18
16
|
shippedHermesPlugin
|
|
19
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-BW74KYAH.js";
|
|
20
18
|
import {
|
|
21
19
|
fxIgnoresInstructionsFile,
|
|
22
20
|
fxInstructionsBody,
|
|
@@ -25,7 +23,7 @@ import {
|
|
|
25
23
|
macAppFxBridge,
|
|
26
24
|
refreshClineKey,
|
|
27
25
|
switchFxHttpEntryToBridge
|
|
28
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-UXQADKBJ.js";
|
|
29
27
|
import {
|
|
30
28
|
OPENCODE_HOOK_BINARY,
|
|
31
29
|
agentHookOwner,
|
|
@@ -38,16 +36,16 @@ import {
|
|
|
38
36
|
openCodePluginDir,
|
|
39
37
|
openCodeWired,
|
|
40
38
|
withOpenCodeAskRules
|
|
41
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-HY2DPLMM.js";
|
|
42
40
|
import {
|
|
43
41
|
detectClaudeVersion
|
|
44
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-V7BM5U5N.js";
|
|
45
43
|
import {
|
|
46
44
|
addCompatibleHooks,
|
|
47
45
|
compatibleConfigFile,
|
|
48
46
|
compatibleInstructionsFile,
|
|
49
47
|
hasCompatibleHooks
|
|
50
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-BQTO3K5X.js";
|
|
51
49
|
import {
|
|
52
50
|
GEMINI_HOOK_BINARY,
|
|
53
51
|
addGeminiHooks,
|
|
@@ -59,13 +57,13 @@ import {
|
|
|
59
57
|
geminiWired,
|
|
60
58
|
hasGeminiHooks,
|
|
61
59
|
planHooks
|
|
62
|
-
} from "./chunk-
|
|
60
|
+
} from "./chunk-27AOD6AJ.js";
|
|
63
61
|
import {
|
|
64
62
|
transcriptsEnabled
|
|
65
|
-
} from "./chunk-
|
|
63
|
+
} from "./chunk-GX7NST6J.js";
|
|
66
64
|
import {
|
|
67
65
|
KEY_FILE_MODE
|
|
68
|
-
} from "./chunk-
|
|
66
|
+
} from "./chunk-UCEHVBFY.js";
|
|
69
67
|
import {
|
|
70
68
|
CLAUDE_CODE_PUSHARY_PERMISSION_RULES,
|
|
71
69
|
CLAUDE_HOOK_BINARY,
|
|
@@ -112,13 +110,13 @@ import {
|
|
|
112
110
|
renderAgentInstructions,
|
|
113
111
|
supportedClaudeEvents,
|
|
114
112
|
vscodePluginMcp
|
|
115
|
-
} from "./chunk-
|
|
113
|
+
} from "./chunk-FKREGRCQ.js";
|
|
116
114
|
import {
|
|
117
115
|
formatVersion,
|
|
118
116
|
hookCommandsUseBareNames,
|
|
119
117
|
resolveGlobalBinDir,
|
|
120
118
|
resolveGlobalBinary
|
|
121
|
-
} from "./chunk-
|
|
119
|
+
} from "./chunk-4TTCW5NU.js";
|
|
122
120
|
import {
|
|
123
121
|
readJsonSafe,
|
|
124
122
|
writeFileAtomic,
|
|
@@ -128,7 +126,7 @@ import {
|
|
|
128
126
|
HOOK_COMPATIBLE_PROFILES,
|
|
129
127
|
isCompatibleAgentType,
|
|
130
128
|
isRecord
|
|
131
|
-
} from "./chunk-
|
|
129
|
+
} from "./chunk-Q4CX35CK.js";
|
|
132
130
|
|
|
133
131
|
// src/reapply.ts
|
|
134
132
|
import { dirname, join } from "path";
|
|
@@ -4,21 +4,21 @@ import {
|
|
|
4
4
|
claimThrottle,
|
|
5
5
|
releaseThrottle,
|
|
6
6
|
reportEvent
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-P6BE3IE6.js";
|
|
8
8
|
import {
|
|
9
9
|
deriveToolTarget,
|
|
10
10
|
permissionDeniedAction
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-L5EZLYKM.js";
|
|
12
12
|
import {
|
|
13
13
|
projectNameFor
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-OXTKCSQH.js";
|
|
15
15
|
import {
|
|
16
16
|
PERMISSION_ALLOWED_EVENT,
|
|
17
17
|
PERMISSION_DENIED_EVENT,
|
|
18
18
|
machineApprovalFor,
|
|
19
19
|
machineDecisionFor,
|
|
20
20
|
wireVerdictFor
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-Q4CX35CK.js";
|
|
22
22
|
|
|
23
23
|
// src/machine-decision-audit.ts
|
|
24
24
|
var MACHINE_DECISION_REPORT_TIMEOUT_MS = 800;
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
reportableSessionId,
|
|
27
27
|
toToolLookup,
|
|
28
28
|
truncateLine
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-Q4CX35CK.js";
|
|
30
30
|
|
|
31
31
|
// ../hook-mapping/src/commit-receipt.ts
|
|
32
32
|
var COMMIT_OUTPUT_MAX_LENGTH = 65536;
|
|
@@ -459,15 +459,18 @@ var rawActionBody = (toolName, toolInput) => {
|
|
|
459
459
|
if (toolName === "write_stdin" || toolName === "request_permissions") return JSON.stringify(toolInput, null, 2);
|
|
460
460
|
return firstString(toolInput.url, toolInput.href);
|
|
461
461
|
};
|
|
462
|
-
var
|
|
462
|
+
var deriveFullActionBody = (toolName, toolInput) => {
|
|
463
463
|
try {
|
|
464
464
|
const raw = rawActionBody(toolName, toolInput);
|
|
465
|
-
|
|
466
|
-
return capActionBody(redactSecretsDeep(raw));
|
|
465
|
+
return raw ? redactSecretsDeep(raw) : void 0;
|
|
467
466
|
} catch {
|
|
468
467
|
return void 0;
|
|
469
468
|
}
|
|
470
469
|
};
|
|
470
|
+
var deriveActionBody = (toolName, toolInput) => {
|
|
471
|
+
const full = deriveFullActionBody(toolName, toolInput);
|
|
472
|
+
return full === void 0 ? void 0 : capActionBody(full);
|
|
473
|
+
};
|
|
471
474
|
var deriveAction = (toolName, toolInput) => truncateLine(describeToolCall(toolName, toolInput, "hook"), DECISION_LINE_MAX);
|
|
472
475
|
var BLOCKER_BY_MODE = {
|
|
473
476
|
push_only: "Approval required before this runs",
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
compatibleConfigFile,
|
|
3
3
|
hasCompatibleHooks
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-BQTO3K5X.js";
|
|
5
5
|
import {
|
|
6
6
|
pusharyHookExecutable
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-27AOD6AJ.js";
|
|
8
8
|
import {
|
|
9
9
|
isProtectedByScope,
|
|
10
10
|
registerHookEntry
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-FKREGRCQ.js";
|
|
12
12
|
import {
|
|
13
13
|
isRecord
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-Q4CX35CK.js";
|
|
15
15
|
|
|
16
16
|
// src/cursor-config.ts
|
|
17
17
|
var hookCommandOf = (entry) => {
|
|
@@ -5,13 +5,13 @@ import {
|
|
|
5
5
|
} from "./chunk-OYIN77HO.js";
|
|
6
6
|
import {
|
|
7
7
|
readMacAppAgentKey
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-US2O2BCI.js";
|
|
9
9
|
import {
|
|
10
10
|
API_KEYS_PATH
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-R2ZVMZRM.js";
|
|
12
12
|
import {
|
|
13
13
|
absoluteUrl
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-DA2VDGD4.js";
|
|
15
15
|
import {
|
|
16
16
|
findExportedKeyLines,
|
|
17
17
|
isAdoptedMacAppKey,
|
|
@@ -21,10 +21,10 @@ import {
|
|
|
21
21
|
readConfigFileKey,
|
|
22
22
|
readKeySource,
|
|
23
23
|
readMacAppKeyPrefix
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-UCEHVBFY.js";
|
|
25
25
|
import {
|
|
26
26
|
isValidApiKey
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-Q4CX35CK.js";
|
|
28
28
|
|
|
29
29
|
// src/cli/held-key-revocation.ts
|
|
30
30
|
var readCliHeldKeys = (profiles) => {
|
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
keyPrefix,
|
|
5
5
|
readConfigFileKey,
|
|
6
6
|
readMacAppKeyPrefix
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-UCEHVBFY.js";
|
|
8
8
|
import {
|
|
9
9
|
NPX_LATEST_COMMAND
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-2WKMK3MA.js";
|
|
11
11
|
|
|
12
12
|
// src/key-signed-out.ts
|
|
13
13
|
var VERDICT_BY_CHECK = {
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import {
|
|
2
2
|
fetchAsCredential
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-ZKTFWYT4.js";
|
|
4
4
|
import {
|
|
5
5
|
keyCheckFromResponse
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-DA2VDGD4.js";
|
|
7
7
|
import {
|
|
8
8
|
installNetworkDefaults
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-GE6BQL5V.js";
|
|
10
10
|
import {
|
|
11
11
|
getBaseUrl
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-ZMEZWQ7O.js";
|
|
13
13
|
import {
|
|
14
14
|
isRecord,
|
|
15
15
|
isToolErrorResult,
|
|
16
16
|
toolFailureCodeOfResult
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-Q4CX35CK.js";
|
|
18
18
|
|
|
19
19
|
// src/retry.ts
|
|
20
20
|
var isRetryable = (err) => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
pusharyDir
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-FKREGRCQ.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-Q4CX35CK.js";
|
|
17
17
|
|
|
18
18
|
// src/declined-agents-file.ts
|
|
19
19
|
import { join } from "path";
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
reachVerdict,
|
|
15
15
|
reachesYou,
|
|
16
16
|
verifyDelivery
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-TFN65TCT.js";
|
|
18
18
|
import {
|
|
19
19
|
describeRevokeAttempt,
|
|
20
20
|
keyNoLongerAccepted,
|
|
@@ -29,20 +29,20 @@ import {
|
|
|
29
29
|
isCI,
|
|
30
30
|
terminalColumns,
|
|
31
31
|
useColor
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-GHMNWVIT.js";
|
|
33
33
|
import {
|
|
34
34
|
checkApiKey
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-DA2VDGD4.js";
|
|
36
36
|
import {
|
|
37
37
|
reportedInstallSource
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-AWDT7VQI.js";
|
|
39
39
|
import {
|
|
40
40
|
NPX_LATEST_COMMAND
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-2WKMK3MA.js";
|
|
42
42
|
import {
|
|
43
43
|
NO_PAIRING_COMPUTER,
|
|
44
44
|
PAIR_TTL_SECONDS
|
|
45
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-Q4CX35CK.js";
|
|
46
46
|
|
|
47
47
|
// src/onboarding.ts
|
|
48
48
|
import qrcodeTerminal from "qrcode-terminal";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SETUP_FLAGS
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-MEONDMJP.js";
|
|
4
4
|
import {
|
|
5
5
|
parseFlags
|
|
6
6
|
} from "./chunk-BZIBNSQE.js";
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
} from "./chunk-CINBAX5G.js";
|
|
10
10
|
import {
|
|
11
11
|
NPX_LATEST_COMMAND
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-2WKMK3MA.js";
|
|
13
13
|
import {
|
|
14
14
|
CLAUDE_CONNECTOR_GUIDE,
|
|
15
15
|
CLAUDE_CONNECTOR_STEPS,
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
CLAUDE_CONNECTOR_URL,
|
|
18
18
|
COWORK_CONNECTOR_LIMIT,
|
|
19
19
|
COWORK_STANDING_INSTRUCTIONS
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-Q4CX35CK.js";
|
|
21
21
|
|
|
22
22
|
// src/cli/cowork.ts
|
|
23
23
|
import { readFileSync } from "fs";
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
notificationAnswerStep
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-TFN65TCT.js";
|
|
4
4
|
import {
|
|
5
5
|
matchMacAccountStep,
|
|
6
6
|
retryAgentCommand
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-B7W3VGWO.js";
|
|
8
8
|
import {
|
|
9
9
|
canChangeApprovalSettings
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-R2ZVMZRM.js";
|
|
11
11
|
import {
|
|
12
12
|
NPX_LATEST_COMMAND,
|
|
13
13
|
npmExecSetupCommandFor
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-2WKMK3MA.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-Q4CX35CK.js";
|
|
25
25
|
|
|
26
26
|
// src/setup/closing.ts
|
|
27
27
|
var ACTIVITY_URL = "pushary.com/dashboard/agent/activity";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
autoUpdateLock
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-FKREGRCQ.js";
|
|
4
4
|
import {
|
|
5
5
|
installPackageGlobally,
|
|
6
6
|
npmErrorMessage,
|
|
7
7
|
throwIfNpmRefusesInstall
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-4TTCW5NU.js";
|
|
9
9
|
import {
|
|
10
10
|
writeJsonAtomic
|
|
11
11
|
} from "./chunk-PM2NRK6Y.js";
|