pushary 1.9.77 → 1.9.79
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 +24 -0
- package/dist/{api-IGMCPM35.js → api-T6DRYZOD.js} +10 -10
- package/dist/bin/pushary-bell-hook.js +25 -25
- package/dist/bin/pushary-bell.js +10 -10
- package/dist/bin/pushary-claude.js +26 -26
- package/dist/bin/pushary-clean.js +34 -34
- package/dist/bin/pushary-codex-bridge.js +21 -21
- package/dist/bin/pushary-codex-hook.js +30 -30
- package/dist/bin/pushary-codex-session.js +8 -8
- package/dist/bin/pushary-codex.js +13 -13
- package/dist/bin/pushary-connect.js +26 -26
- package/dist/bin/pushary-cowork.js +5 -5
- package/dist/bin/pushary-daemon.js +45 -42
- package/dist/bin/pushary-disconnect.js +25 -25
- package/dist/bin/pushary-display-hook.js +16 -16
- package/dist/bin/pushary-doctor.js +42 -42
- package/dist/bin/pushary-elicitation-hook.js +25 -25
- package/dist/bin/pushary-gemini-bridge.js +15 -15
- package/dist/bin/pushary-gemini-hook.js +27 -27
- package/dist/bin/pushary-hook.js +29 -29
- package/dist/bin/pushary-login.js +20 -20
- package/dist/bin/pushary-logout.js +24 -24
- package/dist/bin/pushary-mcp.js +11 -11
- package/dist/bin/pushary-mode.js +15 -15
- package/dist/bin/pushary-notification-hook.js +24 -24
- package/dist/bin/pushary-opencode-hook.js +26 -26
- package/dist/bin/pushary-permission-denied-hook.js +29 -29
- package/dist/bin/pushary-permission-hook.js +29 -29
- package/dist/bin/pushary-post-hook.js +24 -24
- package/dist/bin/pushary-prompt-hook.js +24 -24
- package/dist/bin/pushary-session-end-hook.js +26 -26
- package/dist/bin/pushary-session-start-hook.js +34 -34
- package/dist/bin/pushary-setup.js +57 -54
- package/dist/bin/pushary-stats.js +5 -5
- package/dist/bin/pushary-status.js +31 -31
- package/dist/bin/pushary-stop-hook.js +24 -24
- package/dist/bin/pushary-stopfailure-hook.js +24 -24
- package/dist/bin/pushary-suggestions.js +15 -15
- package/dist/bin/pushary-transcript-register.js +16 -16
- package/dist/bin/pushary-transcripts.js +18 -18
- package/dist/bin/pushary-upgrade.js +40 -40
- package/dist/bin/pushary-wait.js +15 -15
- package/dist/bin/pushary.js +7 -7
- package/dist/{chunk-NHIEDRZR.js → chunk-236NGCTH.js} +27 -7
- package/dist/{chunk-2OWG667E.js → chunk-35M6YE6T.js} +1 -1
- package/dist/{chunk-QBCV27CM.js → chunk-3D3L4ULT.js} +3 -3
- package/dist/{chunk-KUI2KGRZ.js → chunk-3K67QTMR.js} +29 -20
- package/dist/{chunk-MRTGCXG4.js → chunk-4DSCZINL.js} +6 -6
- package/dist/{chunk-S2UHLCF5.js → chunk-4NRT3CEF.js} +3 -3
- package/dist/{chunk-LIEPMKTX.js → chunk-5HA42EV4.js} +1 -1
- package/dist/{chunk-GI3PX2JU.js → chunk-5HMSHKZT.js} +1 -1
- package/dist/{chunk-EFHCTIFT.js → chunk-5MKPJ3WR.js} +1 -1
- package/dist/{chunk-CS5PJXL7.js → chunk-5NWAWDRM.js} +6 -6
- package/dist/{chunk-PZWC3JXW.js → chunk-63JW566T.js} +5 -5
- package/dist/{chunk-6XOEYBWJ.js → chunk-7BALOMAV.js} +5 -3
- package/dist/{chunk-BUBC4R5J.js → chunk-7OSGGPBR.js} +2 -2
- package/dist/{chunk-XYNQA6YC.js → chunk-7R5ZKOQ4.js} +1 -1
- package/dist/{chunk-PGZFXNRJ.js → chunk-A2OAJ7CS.js} +1 -1
- package/dist/{chunk-IHT33GZN.js → chunk-AFCKBLEG.js} +1 -1
- package/dist/{chunk-CKUFXQUJ.js → chunk-AFNLCEHM.js} +3 -3
- package/dist/{chunk-OJ4EEE2B.js → chunk-ANNRW6VU.js} +6 -6
- package/dist/{chunk-CIMFZIGP.js → chunk-AVCPF3VS.js} +1 -1
- package/dist/{chunk-ESHMWZXX.js → chunk-BH7XLF5R.js} +5 -5
- package/dist/{chunk-EV47UGDK.js → chunk-BLG7OEX4.js} +1 -1
- package/dist/{chunk-TK3XMPG2.js → chunk-C7BK5C6K.js} +4 -4
- package/dist/{chunk-OXA2P5NJ.js → chunk-CB2Y4GEH.js} +14 -14
- package/dist/{chunk-4ZXFOT44.js → chunk-CH3CCVH4.js} +2 -2
- package/dist/{chunk-ABAWD6QM.js → chunk-CLE7EVOW.js} +3 -3
- package/dist/{chunk-NNV2XS3Y.js → chunk-CSJD7NN6.js} +6 -6
- package/dist/{chunk-QVP6F6BX.js → chunk-CX6EIW3N.js} +7 -7
- package/dist/{chunk-7HYNAA6B.js → chunk-DLPFYJ7G.js} +1 -1
- package/dist/{chunk-GV7FB5L3.js → chunk-EKVW5Y23.js} +4 -4
- package/dist/{chunk-PKHNZTHY.js → chunk-ERC6QW27.js} +3 -3
- package/dist/{chunk-K2MW33DG.js → chunk-GXW43S4A.js} +2 -2
- package/dist/{chunk-INBG473K.js → chunk-HGCUZQUL.js} +6 -3
- package/dist/{chunk-P7CGVHH5.js → chunk-IEJOZQ7N.js} +5 -5
- package/dist/{chunk-CU65AFT4.js → chunk-IPIJY4TI.js} +1 -1
- package/dist/{chunk-UUX6Q3CB.js → chunk-IYKY3ZAV.js} +2 -2
- package/dist/{chunk-LD5LSJ2B.js → chunk-J3QUMD2E.js} +2 -2
- package/dist/{chunk-RYDT6Y32.js → chunk-KLE2ZMSJ.js} +4 -4
- package/dist/{chunk-QS2IKPQW.js → chunk-L7FBI7N7.js} +4 -4
- package/dist/{chunk-GL34UITI.js → chunk-LTQJ2IMO.js} +3 -3
- package/dist/{chunk-FXQCSU4L.js → chunk-LXV53WHO.js} +3 -3
- package/dist/{chunk-PZXQUV3P.js → chunk-MVAP3NRX.js} +3 -3
- package/dist/{chunk-H4GOJIOK.js → chunk-NFRBLMM2.js} +4 -4
- package/dist/{chunk-FBLVK2WR.js → chunk-O7WSNZIR.js} +13 -13
- package/dist/{chunk-JLYVYHD2.js → chunk-OJS32QPK.js} +1 -1
- package/dist/{chunk-P4IFREOO.js → chunk-P2PPAW5E.js} +1 -1
- package/dist/{chunk-PAPUUZOP.js → chunk-PZ3OFAZ7.js} +14 -11
- package/dist/{chunk-JJPBWBAF.js → chunk-Q5J33E43.js} +6 -6
- package/dist/{chunk-7AQEWD2J.js → chunk-Q7J77QL2.js} +3 -3
- package/dist/{chunk-GOJO2OLP.js → chunk-QATBJHE6.js} +4 -4
- package/dist/{chunk-UU2CQFSJ.js → chunk-QZ5KIX6U.js} +2 -2
- package/dist/{chunk-D5NLXF72.js → chunk-RDXNJSXM.js} +3 -3
- package/dist/{chunk-SNHAXVCJ.js → chunk-RQOJ23I4.js} +1 -1
- package/dist/{chunk-UBQ3TG3B.js → chunk-SNQ5HQHE.js} +1 -1
- package/dist/{chunk-A3BF7SGM.js → chunk-TDW5LI6P.js} +3 -3
- package/dist/{chunk-SUOW4HJB.js → chunk-TRVJ6MS5.js} +5 -5
- package/dist/{chunk-DYDA77FS.js → chunk-UGP4FYMV.js} +4 -4
- package/dist/{chunk-J2NPFRDI.js → chunk-V3EN7LWU.js} +6 -6
- package/dist/{chunk-MQBQRXTN.js → chunk-VER45SAA.js} +5 -5
- package/dist/{chunk-HGVUTO67.js → chunk-WA4S6YAT.js} +3 -3
- package/dist/{chunk-2IOQHB3C.js → chunk-WB5PC4TL.js} +5 -5
- package/dist/{chunk-Y5YJLBML.js → chunk-WBC2ZXU7.js} +4 -4
- package/dist/{chunk-2YRNRYZW.js → chunk-WJVQOAZY.js} +1 -1
- package/dist/{chunk-QGOY3HNV.js → chunk-X7JGHARV.js} +6 -6
- package/dist/{chunk-7CU7OGWP.js → chunk-XKJYTP3G.js} +218 -159
- package/dist/{chunk-WFSE7NRM.js → chunk-XU2FL4B6.js} +2 -2
- package/dist/{chunk-3UYMJZXV.js → chunk-Z7AIEIM5.js} +2 -2
- package/dist/{chunk-PUF3BL6C.js → chunk-ZJGIJDWP.js} +1 -1
- package/dist/{chunk-ZZFYV26G.js → chunk-ZU7XS6PN.js} +2 -2
- package/dist/{codex-app-cards-switch-LTZCEFYB.js → codex-app-cards-switch-OWLU462R.js} +11 -11
- package/dist/{codex-desktop-launch-DBJBV66U.js → codex-desktop-launch-G37GNF4B.js} +1 -1
- package/dist/{codex-session-launch-6RTU73OP.js → codex-session-launch-AV2AL64X.js} +18 -18
- package/dist/{config-YREUMA6Z.js → config-PXISW4O5.js} +3 -3
- package/dist/{global-upgrade-EYLSJXXN.js → global-upgrade-JWI5XIZP.js} +10 -10
- package/dist/{identity-WIM6NVLP.js → identity-JAXJ3FOD.js} +4 -4
- package/dist/{live-capabilities-SU3BEP2Z.js → live-capabilities-7PPQ2HPU.js} +5 -5
- package/dist/{paths-XV3FXWOM.js → paths-YV3ZK5LT.js} +3 -3
- package/dist/{reapply-Q7QC3MWL.js → reapply-YHJHUTFY.js} +27 -27
- package/dist/src/index.d.ts +3 -0
- package/dist/src/index.js +28 -28
- package/dist/{upgrade-lock-A2ALHHUG.js → upgrade-lock-I4JPC4WG.js} +4 -4
- package/dist/{usage-UNEATRXG.js → usage-FZTPRQRP.js} +3 -3
- package/package.json +1 -1
package/dist/bin/pushary-wait.js
CHANGED
|
@@ -2,43 +2,43 @@
|
|
|
2
2
|
import {
|
|
3
3
|
waitResponse,
|
|
4
4
|
waitWindowResponse
|
|
5
|
-
} from "../chunk-
|
|
5
|
+
} from "../chunk-WJVQOAZY.js";
|
|
6
6
|
import {
|
|
7
7
|
exitOnFailedSettingsRequest
|
|
8
|
-
} from "../chunk-
|
|
8
|
+
} from "../chunk-5NWAWDRM.js";
|
|
9
9
|
import {
|
|
10
10
|
describeWaitLadder
|
|
11
11
|
} from "../chunk-CVWG2N3Y.js";
|
|
12
|
-
import "../chunk-
|
|
12
|
+
import "../chunk-CH3CCVH4.js";
|
|
13
13
|
import {
|
|
14
14
|
APPROVAL_RULES_PATH,
|
|
15
15
|
PUSH_WINDOW_COMMAND,
|
|
16
16
|
PUSH_WINDOW_RESET_COMMAND
|
|
17
|
-
} from "../chunk-
|
|
17
|
+
} from "../chunk-ZU7XS6PN.js";
|
|
18
18
|
import {
|
|
19
19
|
createIo
|
|
20
20
|
} from "../chunk-FO3MDD26.js";
|
|
21
21
|
import {
|
|
22
22
|
exitOnHelpFlag
|
|
23
|
-
} from "../chunk-
|
|
23
|
+
} from "../chunk-SNQ5HQHE.js";
|
|
24
24
|
import {
|
|
25
25
|
parseFlags
|
|
26
26
|
} from "../chunk-NMUI3ZWG.js";
|
|
27
|
-
import "../chunk-
|
|
27
|
+
import "../chunk-UGP4FYMV.js";
|
|
28
28
|
import {
|
|
29
29
|
absoluteUrl
|
|
30
|
-
} from "../chunk-
|
|
30
|
+
} from "../chunk-AFNLCEHM.js";
|
|
31
31
|
import {
|
|
32
32
|
pusharyFetch
|
|
33
|
-
} from "../chunk-
|
|
34
|
-
import "../chunk-
|
|
35
|
-
import "../chunk-
|
|
36
|
-
import "../chunk-
|
|
37
|
-
import "../chunk-
|
|
33
|
+
} from "../chunk-Q7J77QL2.js";
|
|
34
|
+
import "../chunk-J3QUMD2E.js";
|
|
35
|
+
import "../chunk-GXW43S4A.js";
|
|
36
|
+
import "../chunk-MVAP3NRX.js";
|
|
37
|
+
import "../chunk-CLE7EVOW.js";
|
|
38
38
|
import {
|
|
39
39
|
getApiKey,
|
|
40
40
|
getBaseUrl
|
|
41
|
-
} from "../chunk-
|
|
41
|
+
} from "../chunk-AFCKBLEG.js";
|
|
42
42
|
import {
|
|
43
43
|
UsageError,
|
|
44
44
|
exitCodeFor
|
|
@@ -46,9 +46,9 @@ import {
|
|
|
46
46
|
import {
|
|
47
47
|
EXIT
|
|
48
48
|
} from "../chunk-KZERVKTD.js";
|
|
49
|
-
import "../chunk-
|
|
49
|
+
import "../chunk-35M6YE6T.js";
|
|
50
50
|
import "../chunk-QTOLNRET.js";
|
|
51
|
-
import "../chunk-
|
|
51
|
+
import "../chunk-HGCUZQUL.js";
|
|
52
52
|
import "../chunk-MLKGABMK.js";
|
|
53
53
|
|
|
54
54
|
// bin/pushary-wait.ts
|
package/dist/bin/pushary.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
installNetworkDefaults
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
6
|
-
import "../chunk-
|
|
7
|
-
import "../chunk-
|
|
8
|
-
import "../chunk-
|
|
4
|
+
} from "../chunk-Q7J77QL2.js";
|
|
5
|
+
import "../chunk-J3QUMD2E.js";
|
|
6
|
+
import "../chunk-MVAP3NRX.js";
|
|
7
|
+
import "../chunk-CLE7EVOW.js";
|
|
8
|
+
import "../chunk-AFCKBLEG.js";
|
|
9
9
|
import "../chunk-PPY5N2E6.js";
|
|
10
10
|
import {
|
|
11
11
|
EXIT
|
|
@@ -14,11 +14,11 @@ import {
|
|
|
14
14
|
LISTED_COMMANDS,
|
|
15
15
|
renderHelp,
|
|
16
16
|
resolveCommandName
|
|
17
|
-
} from "../chunk-
|
|
17
|
+
} from "../chunk-35M6YE6T.js";
|
|
18
18
|
import {
|
|
19
19
|
getPackageVersion
|
|
20
20
|
} from "../chunk-QTOLNRET.js";
|
|
21
|
-
import "../chunk-
|
|
21
|
+
import "../chunk-HGCUZQUL.js";
|
|
22
22
|
import "../chunk-MLKGABMK.js";
|
|
23
23
|
|
|
24
24
|
// src/cli/runtime.ts
|
|
@@ -154,22 +154,38 @@ var probeCodexRuntime = (path) => new Promise((resolve2) => {
|
|
|
154
154
|
});
|
|
155
155
|
socket.on("close", () => finish(null));
|
|
156
156
|
});
|
|
157
|
-
var codexRuntimeProcesses = (output) => {
|
|
157
|
+
var codexRuntimeProcesses = (output, commands = "") => {
|
|
158
|
+
const commandLines = /* @__PURE__ */ new Map();
|
|
159
|
+
for (const line of commands.trim() ? commands.trim().split("\n") : []) {
|
|
160
|
+
const match = /^\s*(\d+)\s+(.+)$/.exec(line);
|
|
161
|
+
if (!match) return null;
|
|
162
|
+
const pid = Number(match[1]);
|
|
163
|
+
if (!Number.isSafeInteger(pid) || pid <= 0 || commandLines.has(pid)) return null;
|
|
164
|
+
commandLines.set(pid, match[2]);
|
|
165
|
+
}
|
|
158
166
|
const processes = [];
|
|
159
167
|
for (const line of output.trim().split("\n")) {
|
|
160
168
|
const match = /^\s*(\d+)\s+(\d+)\s+(.+)$/.exec(line);
|
|
161
169
|
if (!match) return null;
|
|
162
170
|
const pid = Number(match[1]), parent = Number(match[2]);
|
|
163
171
|
if (!Number.isSafeInteger(pid) || pid <= 0 || !Number.isSafeInteger(parent) || parent < 0 || processes.some((process2) => process2.pid === pid)) return null;
|
|
164
|
-
|
|
172
|
+
const commandLine = commandLines.get(pid);
|
|
173
|
+
processes.push({ pid, parent, executable: match[3], ...commandLine === void 0 ? {} : { commandLine } });
|
|
165
174
|
}
|
|
166
175
|
return processes;
|
|
167
176
|
};
|
|
177
|
+
var isCodexRuntimeEngine = (app, process2) => process2.executable.startsWith(`${app}/Contents/Resources/codex-cli/`) && process2.executable.endsWith("/codex");
|
|
178
|
+
var isCodexCloudExecServer = (process2) => {
|
|
179
|
+
const prefix = `${process2.executable} `;
|
|
180
|
+
if (!process2.commandLine?.startsWith(prefix)) return false;
|
|
181
|
+
const args = process2.commandLine.slice(prefix.length).trimStart();
|
|
182
|
+
return /^(?:(?:-c|--config)(?:\s+|=)forced_login_method=(?:"chatgpt"|'chatgpt'|chatgpt)\s+)*exec-server(?:\s+--remote(?:\s+|=)https?:\/\/[^\s'"]+)?(?:\s+--environment-id(?:\s+|=)[\w-]+)?\s*$/.test(args);
|
|
183
|
+
};
|
|
168
184
|
var codexRuntimeStatus = (app, processes, replies) => {
|
|
169
185
|
const byPid = new Map(processes.map((process2) => [process2.pid, process2]));
|
|
170
186
|
const desktops = new Set(processes.filter((process2) => process2.executable.startsWith(`${app}/Contents/MacOS/`)).map((process2) => process2.pid));
|
|
171
187
|
if (desktops.size === 0) return "closed";
|
|
172
|
-
const isEngine = (process2) =>
|
|
188
|
+
const isEngine = (process2) => isCodexRuntimeEngine(app, process2);
|
|
173
189
|
const owningDesktop = (engine) => {
|
|
174
190
|
const visited = /* @__PURE__ */ new Set([engine.pid]);
|
|
175
191
|
let parent = byPid.get(engine.parent);
|
|
@@ -181,7 +197,7 @@ var codexRuntimeStatus = (app, processes, replies) => {
|
|
|
181
197
|
}
|
|
182
198
|
return null;
|
|
183
199
|
};
|
|
184
|
-
const engines = processes.filter((process2) => isEngine(process2) && owningDesktop(process2) !== null);
|
|
200
|
+
const engines = processes.filter((process2) => isEngine(process2) && !isCodexCloudExecServer(process2) && owningDesktop(process2) !== null);
|
|
185
201
|
const owners = new Set(engines.map(owningDesktop));
|
|
186
202
|
if ([...desktops].some((pid) => !owners.has(pid))) return "unknown";
|
|
187
203
|
const observed = engines.map((engine) => replies.find((reply) => reply.enginePid === engine.pid && reply.pid === engine.parent));
|
|
@@ -193,7 +209,11 @@ var readCodexAppRuntime = async (app, directory = codexRuntimeDirectory()) => {
|
|
|
193
209
|
if (app === null || process.platform !== "darwin" || uid === void 0) return "unknown";
|
|
194
210
|
try {
|
|
195
211
|
const snapshot = execFileSync("/bin/ps", ["-U", String(uid), "-o", "pid=,ppid=,comm="], { encoding: "utf8", timeout: 1e3, maxBuffer: 2 * 1024 * 1024 });
|
|
196
|
-
const
|
|
212
|
+
const identities = codexRuntimeProcesses(snapshot);
|
|
213
|
+
if (identities === null) return "unknown";
|
|
214
|
+
const enginePids = identities.filter((process2) => isCodexRuntimeEngine(app, process2)).map((process2) => process2.pid);
|
|
215
|
+
const commands = enginePids.length === 0 ? "" : execFileSync("/bin/ps", ["-ww", "-p", enginePids.join(","), "-o", "pid=,args="], { encoding: "utf8", timeout: 1e3, maxBuffer: 2 * 1024 * 1024 });
|
|
216
|
+
const processes = codexRuntimeProcesses(snapshot, commands);
|
|
197
217
|
if (processes === null) return "unknown";
|
|
198
218
|
const livePids = new Set(processes.map((process2) => process2.pid));
|
|
199
219
|
const names = privateDirectory(directory) ? readdirSync(directory).filter((name) => {
|
|
@@ -501,7 +521,7 @@ var loadedOnce = (load) => {
|
|
|
501
521
|
};
|
|
502
522
|
|
|
503
523
|
// src/codex-desktop-proxy.ts
|
|
504
|
-
var loadThePhone = () => import("./api-
|
|
524
|
+
var loadThePhone = () => import("./api-T6DRYZOD.js");
|
|
505
525
|
var theFirstCardLoadsAgain = () => {
|
|
506
526
|
};
|
|
507
527
|
var APP_SERVER_COMMAND = "app-server";
|
|
@@ -1042,7 +1062,7 @@ var codexDesktopCommand = async (args, entry, readAccount) => {
|
|
|
1042
1062
|
return runCodexDesktopProxy(engine2, args.slice(3), readAccount, { watchesForCards: layoutIsKnown });
|
|
1043
1063
|
}
|
|
1044
1064
|
if (args[0] === APP_CARDS_FLAG) {
|
|
1045
|
-
const { codexAppCardsCommandOnThisMac } = await import("./codex-app-cards-switch-
|
|
1065
|
+
const { codexAppCardsCommandOnThisMac } = await import("./codex-app-cards-switch-OWLU462R.js");
|
|
1046
1066
|
return codexAppCardsCommandOnThisMac(args.slice(1), entry, readAccount);
|
|
1047
1067
|
}
|
|
1048
1068
|
if (args.length > 2) throw new Error("Usage: pushary codex --desktop [path/to/Codex.app]");
|
|
@@ -3,13 +3,13 @@ import {
|
|
|
3
3
|
NpmMissingError,
|
|
4
4
|
NpmPermissionError,
|
|
5
5
|
writeFileAtomic
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-CLE7EVOW.js";
|
|
7
7
|
import {
|
|
8
8
|
NPX_LATEST_COMMAND
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-35M6YE6T.js";
|
|
10
10
|
import {
|
|
11
11
|
readSetupAgentFailures
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-HGCUZQUL.js";
|
|
13
13
|
|
|
14
14
|
// src/setup/config-write.ts
|
|
15
15
|
var AgentConfigWriteError = class extends Error {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
repoKeyFor
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-7R5ZKOQ4.js";
|
|
4
4
|
import {
|
|
5
5
|
cancelQuestion,
|
|
6
6
|
clientErrorKindOf,
|
|
@@ -8,33 +8,33 @@ import {
|
|
|
8
8
|
reportClientError,
|
|
9
9
|
sendNotification,
|
|
10
10
|
waitForAnswer
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-BH7XLF5R.js";
|
|
12
12
|
import {
|
|
13
13
|
withRetry
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-EKVW5Y23.js";
|
|
15
15
|
import {
|
|
16
16
|
getMachineId
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-J3QUMD2E.js";
|
|
18
18
|
import {
|
|
19
19
|
reportedInstallSource
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-GXW43S4A.js";
|
|
21
21
|
import {
|
|
22
22
|
IDLE_PROMPT_NOTIFICATION,
|
|
23
23
|
NOTIFICATION_PUSH_TYPES,
|
|
24
24
|
POSTTOOLUSE_MIRROR_ONLY_TOOLS,
|
|
25
25
|
canonicalJson,
|
|
26
26
|
claudeConfigDir
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-MVAP3NRX.js";
|
|
28
28
|
import {
|
|
29
29
|
compareVersion,
|
|
30
30
|
parseVersion,
|
|
31
31
|
writeFileAtomic,
|
|
32
32
|
writeJsonAtomicDurable
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-CLE7EVOW.js";
|
|
34
34
|
import {
|
|
35
35
|
getApiKey,
|
|
36
36
|
getBaseUrl
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-AFCKBLEG.js";
|
|
38
38
|
import {
|
|
39
39
|
ACTION_BODY_MAX,
|
|
40
40
|
AGENTS,
|
|
@@ -59,6 +59,7 @@ import {
|
|
|
59
59
|
gateOutputFor,
|
|
60
60
|
hookCompatibleProfileBySource,
|
|
61
61
|
isAutoApprove,
|
|
62
|
+
isClaudeWakePrompt,
|
|
62
63
|
isRecord,
|
|
63
64
|
isTokenCount,
|
|
64
65
|
modeStateFromResponse,
|
|
@@ -75,7 +76,7 @@ import {
|
|
|
75
76
|
toToolLookup,
|
|
76
77
|
truncateLine,
|
|
77
78
|
unansweredRefusalReason
|
|
78
|
-
} from "./chunk-
|
|
79
|
+
} from "./chunk-HGCUZQUL.js";
|
|
79
80
|
|
|
80
81
|
// ../hook-mapping/src/describe.ts
|
|
81
82
|
import { isAbsolute, relative, resolve } from "path";
|
|
@@ -631,7 +632,7 @@ var compactionAction = (hookEvent, trigger) => {
|
|
|
631
632
|
};
|
|
632
633
|
var sessionStartAction = (source) => source === "resume" ? "Session resumed" : "Session started";
|
|
633
634
|
var sessionEndAction = (reason) => typeof reason === "string" && SESSION_END_ACTIONS[reason] || "Session ended";
|
|
634
|
-
var taskTitleFrom = (prompt) => typeof prompt === "string" ? conversationText(prompt).replace(/\s+/g, " ").trim().slice(0, TASK_TITLE_MAX_LENGTH) || void 0 : void 0;
|
|
635
|
+
var taskTitleFrom = (prompt) => typeof prompt === "string" && !isClaudeWakePrompt(prompt) ? conversationText(prompt).replace(/\s+/g, " ").trim().slice(0, TASK_TITLE_MAX_LENGTH) || void 0 : void 0;
|
|
635
636
|
var asString = (value) => typeof value === "string" && value.length > 0 ? value : void 0;
|
|
636
637
|
var NOTIFICATION_ACTION_MAX_LENGTH = 200;
|
|
637
638
|
var STOP_FAILURE_REASON_MAX_LENGTH = 300;
|
|
@@ -933,19 +934,25 @@ var readPendingCommand = (sessionId, namespace = "") => {
|
|
|
933
934
|
const commands = pruneExpiredCommands(commandDirFor(sessionId, namespace));
|
|
934
935
|
return commands.find((command) => !command.delivered && !command.failed && !command.attempted) ?? commands[0] ?? null;
|
|
935
936
|
};
|
|
937
|
+
var writeNewCommandFile = (file, contents) => {
|
|
938
|
+
const descriptor = openSync(file, "wx", 384);
|
|
939
|
+
try {
|
|
940
|
+
writeFileSync(descriptor, contents, "utf-8");
|
|
941
|
+
fsyncSync(descriptor);
|
|
942
|
+
} catch (error) {
|
|
943
|
+
closeSync(descriptor);
|
|
944
|
+
rmSync(file, { force: true });
|
|
945
|
+
throw error;
|
|
946
|
+
}
|
|
947
|
+
closeSync(descriptor);
|
|
948
|
+
};
|
|
936
949
|
var savePendingCommand = (sessionId, command, namespace = "") => {
|
|
937
950
|
const dir = commandDirFor(sessionId, namespace);
|
|
938
951
|
try {
|
|
939
952
|
mkdirSync(dir, { recursive: true, mode: 448 });
|
|
940
953
|
pruneExpiredCommandStore();
|
|
941
954
|
if (readPendingCommandById(sessionId, command.id, namespace)) return false;
|
|
942
|
-
|
|
943
|
-
const descriptor = openSync(commandFile(sessionId, command.id, namespace), "r");
|
|
944
|
-
try {
|
|
945
|
-
fsyncSync(descriptor);
|
|
946
|
-
} finally {
|
|
947
|
-
closeSync(descriptor);
|
|
948
|
-
}
|
|
955
|
+
writeNewCommandFile(commandFile(sessionId, command.id, namespace), JSON.stringify({ ...command, sessionId }));
|
|
949
956
|
if (process.platform !== "win32") {
|
|
950
957
|
const directory = openSync(dir, "r");
|
|
951
958
|
try {
|
|
@@ -1339,7 +1346,7 @@ var readLastUserPrompt = (transcriptPath) => {
|
|
|
1339
1346
|
}
|
|
1340
1347
|
if (parsed.type !== "user") continue;
|
|
1341
1348
|
const text = extractUserText(parsed.message?.content);
|
|
1342
|
-
if (text) return text.slice(0, USER_PROMPT_MAX);
|
|
1349
|
+
if (text && !isClaudeWakePrompt(text)) return text.slice(0, USER_PROMPT_MAX);
|
|
1343
1350
|
}
|
|
1344
1351
|
return void 0;
|
|
1345
1352
|
} catch {
|
|
@@ -2148,7 +2155,8 @@ var handleUserPrompt = async (input, agent = CLAUDE_CODE_AGENT) => {
|
|
|
2148
2155
|
const sessionKey = input.session_id || DEFAULT_SESSION;
|
|
2149
2156
|
const titlesEnabled = process.env.PUSHARY_TASK_TITLES !== "off";
|
|
2150
2157
|
const taskTitle = titlesEnabled ? taskTitleFrom(input.prompt) : void 0;
|
|
2151
|
-
|
|
2158
|
+
const wakeTurn = isClaudeWakePrompt(input.prompt);
|
|
2159
|
+
if (input.prompt && !wakeTurn) saveLastPrompt(sessionKey, input.prompt);
|
|
2152
2160
|
const late = await reconcilePendingQuestions(sessionKey, void 0, signal);
|
|
2153
2161
|
let additionalContext;
|
|
2154
2162
|
if (late.length > 0 && agent.type === CLAUDE_CODE_AGENT.type) {
|
|
@@ -2161,7 +2169,8 @@ var handleUserPrompt = async (input, agent = CLAUDE_CODE_AGENT) => {
|
|
|
2161
2169
|
agentType: agent.type,
|
|
2162
2170
|
agentName: `${agent.label} - ${projectName}`,
|
|
2163
2171
|
sessionId: input.session_id,
|
|
2164
|
-
taskTitle
|
|
2172
|
+
taskTitle,
|
|
2173
|
+
...wakeTurn ? { driver: PHONE_DRIVER } : {}
|
|
2165
2174
|
}, { maxAttempts: 1, budgetMs: Math.min(DRAINING_REPORT_BUDGET_MS, Math.max(0, deadline - Date.now())), signal })
|
|
2166
2175
|
]);
|
|
2167
2176
|
if (consumesActivityContext(agent.type)) {
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
postLiveSession,
|
|
5
5
|
postLiveSessionUntilAccepted,
|
|
6
6
|
startLiveSessionHeartbeat
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-5HA42EV4.js";
|
|
8
8
|
import {
|
|
9
9
|
CommandReceipts,
|
|
10
10
|
controllerCommandSchema
|
|
@@ -14,24 +14,24 @@ import {
|
|
|
14
14
|
describeIdleWindow,
|
|
15
15
|
idleDeadlinePassed,
|
|
16
16
|
startProcessOwnership
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-LXV53WHO.js";
|
|
18
18
|
import {
|
|
19
19
|
spawnClaude
|
|
20
20
|
} from "./chunk-XHKBHWLX.js";
|
|
21
21
|
import {
|
|
22
22
|
repoKeyFor
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-7R5ZKOQ4.js";
|
|
24
24
|
import {
|
|
25
25
|
isAskUserResponse,
|
|
26
26
|
isDecisionStopped,
|
|
27
27
|
isWaitForAnswerResponse,
|
|
28
28
|
withdrawQuestion,
|
|
29
29
|
writeDegraded
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-BH7XLF5R.js";
|
|
31
31
|
import {
|
|
32
32
|
callMcpTool,
|
|
33
33
|
isRetryable
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-EKVW5Y23.js";
|
|
35
35
|
import {
|
|
36
36
|
AGENT_QUESTION_DESCRIPTION_MAX,
|
|
37
37
|
AGENT_QUESTION_HEADER_MAX,
|
|
@@ -52,7 +52,7 @@ import {
|
|
|
52
52
|
parseCodexQuestions,
|
|
53
53
|
planElicitationAsk,
|
|
54
54
|
readElicitationFields
|
|
55
|
-
} from "./chunk-
|
|
55
|
+
} from "./chunk-HGCUZQUL.js";
|
|
56
56
|
|
|
57
57
|
// src/codex-question-owner.ts
|
|
58
58
|
import { createHash } from "crypto";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
readJsonSafe,
|
|
3
3
|
writeJsonAtomic
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-CLE7EVOW.js";
|
|
5
5
|
import {
|
|
6
6
|
configFilePath
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-AFCKBLEG.js";
|
|
8
8
|
import {
|
|
9
9
|
readSetupOutcomeProperties
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-HGCUZQUL.js";
|
|
11
11
|
|
|
12
12
|
// src/diagnostics/service-runtime.ts
|
|
13
13
|
var unescapeXml = (value) => value.replaceAll(""", '"').replaceAll("'", "'").replaceAll("<", "<").replaceAll(">", ">").replaceAll("&", "&");
|
|
@@ -2,31 +2,31 @@ import {
|
|
|
2
2
|
SIGNED_OUT_ON_MAC_MESSAGE,
|
|
3
3
|
describeSignedOutKey,
|
|
4
4
|
readSignedOutDiagnosis
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-CH3CCVH4.js";
|
|
6
6
|
import {
|
|
7
7
|
APPROVAL_RULES_PATH
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-ZU7XS6PN.js";
|
|
9
9
|
import {
|
|
10
10
|
createIo
|
|
11
11
|
} from "./chunk-FO3MDD26.js";
|
|
12
12
|
import {
|
|
13
13
|
readKeySource
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-UGP4FYMV.js";
|
|
15
15
|
import {
|
|
16
16
|
absoluteUrl,
|
|
17
17
|
checkApiKey,
|
|
18
18
|
describeKeyCheck,
|
|
19
19
|
keyCheckFromResponse
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-AFNLCEHM.js";
|
|
21
21
|
import {
|
|
22
22
|
getBaseUrl
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-AFCKBLEG.js";
|
|
24
24
|
import {
|
|
25
25
|
EXIT
|
|
26
26
|
} from "./chunk-KZERVKTD.js";
|
|
27
27
|
import {
|
|
28
28
|
KEY_SCOPE
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-HGCUZQUL.js";
|
|
30
30
|
|
|
31
31
|
// src/cli/report-key.ts
|
|
32
32
|
var { dim, yellow } = createIo();
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import {
|
|
2
2
|
openCodeConfigDirFrom
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-V3EN7LWU.js";
|
|
4
4
|
import {
|
|
5
5
|
nativeClaudeInstallPath
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-RQOJ23I4.js";
|
|
7
7
|
import {
|
|
8
8
|
grokHome
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-NFRBLMM2.js";
|
|
10
10
|
import {
|
|
11
11
|
claudeConfigDir,
|
|
12
12
|
clineDataDirectory,
|
|
13
13
|
codexHomeFrom
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-MVAP3NRX.js";
|
|
15
15
|
import {
|
|
16
16
|
HOOK_COMPATIBLE_PROFILES
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-HGCUZQUL.js";
|
|
18
18
|
|
|
19
19
|
// src/vscode-config.ts
|
|
20
20
|
import { homedir } from "os";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CODEX_HOOK_STATUS
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-QZ5KIX6U.js";
|
|
4
4
|
import {
|
|
5
5
|
retryAgentCommand
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-3D3L4ULT.js";
|
|
7
7
|
import {
|
|
8
8
|
NPX_LATEST_COMMAND
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-35M6YE6T.js";
|
|
10
10
|
|
|
11
11
|
// src/setup/codex-trust.ts
|
|
12
12
|
var CODEX_TRUST_TELEMETRY = {
|
|
@@ -79,6 +79,8 @@ var describeHermesInstallFailure = (reason, pluginDirectory, receiptPath) => {
|
|
|
79
79
|
return `${pluginDirectory} holds a pushary plugin that Pushary did not install. Remove that folder, then run setup again.`;
|
|
80
80
|
case "plugin_write_failed":
|
|
81
81
|
return `Could not write the Pushary plugin to ${pluginDirectory}.`;
|
|
82
|
+
case "plugin_load_timed_out":
|
|
83
|
+
return "Hermes did not finish loading the plugin in time, so it may be enabled without its tools. Run `hermes plugins disable pushary`, then run setup again.";
|
|
82
84
|
case "settings_failed":
|
|
83
85
|
return "The plugin is in place, but Hermes refused a settings change. Run `hermes plugins enable pushary`, then run setup again.";
|
|
84
86
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
autoUpdateLock
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-MVAP3NRX.js";
|
|
4
4
|
import {
|
|
5
5
|
installPackageGlobally,
|
|
6
6
|
npmErrorMessage,
|
|
7
7
|
writeJsonAtomic
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-CLE7EVOW.js";
|
|
9
9
|
|
|
10
10
|
// src/upgrade-lock.ts
|
|
11
11
|
import { fork } from "child_process";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
pusharyFetch
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-Q7J77QL2.js";
|
|
4
4
|
import {
|
|
5
5
|
getBaseUrl
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-AFCKBLEG.js";
|
|
7
7
|
import {
|
|
8
8
|
NetworkError
|
|
9
9
|
} from "./chunk-PPY5N2E6.js";
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
import {
|
|
14
14
|
isValidApiKey,
|
|
15
15
|
normalizeKeyScope
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-HGCUZQUL.js";
|
|
17
17
|
|
|
18
18
|
// src/session.ts
|
|
19
19
|
var samePusharyAccount = (left, right) => left.kind === "ok" && right.kind === "ok" && left.identity.workspaceId !== "" && left.identity.workspaceId === right.identity.workspaceId && left.identity.siteId === right.identity.siteId;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
announceSubscriptionRequired,
|
|
3
3
|
isDeferAnswer
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-5HMSHKZT.js";
|
|
5
5
|
import {
|
|
6
6
|
AUTO_DECISION_WINDOW_MS,
|
|
7
7
|
DEFAULT_SESSION,
|
|
@@ -10,19 +10,19 @@ import {
|
|
|
10
10
|
permissionDeniedAction,
|
|
11
11
|
releaseThrottle,
|
|
12
12
|
reportEvent
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-3K67QTMR.js";
|
|
14
14
|
import {
|
|
15
15
|
askUser,
|
|
16
16
|
isDecisionStopped,
|
|
17
17
|
isQuestionLimitRefusal,
|
|
18
18
|
waitForQuestion
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-BH7XLF5R.js";
|
|
20
20
|
import {
|
|
21
21
|
SubscriptionRequiredError
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-EKVW5Y23.js";
|
|
23
23
|
import {
|
|
24
24
|
getMachineId
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-J3QUMD2E.js";
|
|
26
26
|
import {
|
|
27
27
|
ASK_CONTEXT_MAX,
|
|
28
28
|
agentQuestionContext,
|
|
@@ -34,7 +34,7 @@ import {
|
|
|
34
34
|
questionsShownAsASet,
|
|
35
35
|
shouldDeferToNativeMode,
|
|
36
36
|
wireVerdictFor
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-HGCUZQUL.js";
|
|
38
38
|
|
|
39
39
|
// src/machine-decision-audit.ts
|
|
40
40
|
import { basename } from "path";
|