@pushary/agent-hooks 1.9.56 → 1.9.58
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 +19 -0
- package/dist/{api-JHBUZ7CV.js → api-WVXBM4MR.js} +10 -10
- package/dist/bin/pushary-bell-hook.js +27 -27
- package/dist/bin/pushary-bell.js +10 -10
- package/dist/bin/pushary-claude.js +26 -26
- package/dist/bin/pushary-clean.js +49 -46
- package/dist/bin/pushary-codex-bridge.js +21 -21
- package/dist/bin/pushary-codex-hook.js +32 -32
- package/dist/bin/pushary-codex-session.js +10 -8
- package/dist/bin/pushary-codex.js +14 -14
- package/dist/bin/pushary-connect.js +27 -26
- package/dist/bin/pushary-cowork.js +5 -5
- package/dist/bin/pushary-daemon.js +37 -37
- package/dist/bin/pushary-disconnect.js +26 -26
- package/dist/bin/pushary-doctor.js +41 -39
- package/dist/bin/pushary-elicitation-hook.js +27 -27
- package/dist/bin/pushary-gemini-bridge.js +15 -15
- package/dist/bin/pushary-gemini-hook.js +29 -29
- package/dist/bin/pushary-hook.js +31 -31
- package/dist/bin/pushary-login.js +13 -13
- package/dist/bin/pushary-logout.js +26 -26
- package/dist/bin/pushary-mcp.js +11 -11
- package/dist/bin/pushary-mode.js +13 -13
- package/dist/bin/pushary-notification-hook.js +26 -26
- package/dist/bin/pushary-opencode-hook.js +28 -28
- package/dist/bin/pushary-permission-denied-hook.js +31 -31
- package/dist/bin/pushary-permission-hook.js +30 -30
- package/dist/bin/pushary-post-hook.js +26 -26
- package/dist/bin/pushary-prompt-hook.js +26 -26
- package/dist/bin/pushary-session-end-hook.js +26 -26
- package/dist/bin/pushary-session-start-hook.js +33 -33
- package/dist/bin/pushary-setup.js +65 -268
- package/dist/bin/pushary-stats.js +5 -5
- package/dist/bin/pushary-status.js +32 -30
- package/dist/bin/pushary-stop-hook.js +26 -26
- package/dist/bin/pushary-stopfailure-hook.js +26 -26
- package/dist/bin/pushary-suggestions.js +13 -13
- package/dist/bin/pushary-transcript-register.js +18 -18
- package/dist/bin/pushary-transcripts.js +7 -7
- package/dist/bin/pushary-upgrade.js +107 -58
- package/dist/bin/pushary-wait.js +13 -13
- package/dist/bin/pushary.js +7 -7
- package/dist/{chunk-DWV3LTUH.js → chunk-3KOPY2UQ.js} +3 -3
- package/dist/{chunk-X5FHQMUL.js → chunk-3TJLPABQ.js} +3 -3
- package/dist/{chunk-OCYOOGXW.js → chunk-3WNOO7BM.js} +4 -4
- package/dist/{chunk-FJ7ZMR4N.js → chunk-4JJ3T7IE.js} +94 -15
- package/dist/{chunk-LTCNAIY2.js → chunk-4LUPZ347.js} +2 -2
- package/dist/{chunk-V2AMLVMD.js → chunk-4YNNAF53.js} +2 -2
- package/dist/{chunk-32MSOGMD.js → chunk-5DZHKNBU.js} +3 -3
- package/dist/{chunk-T4IAMIX4.js → chunk-5SFM6XB4.js} +1 -1
- package/dist/{chunk-WW266XKU.js → chunk-7RZO6VWD.js} +2 -2
- package/dist/{chunk-VZ3YPEMG.js → chunk-ATUZX4K7.js} +3 -3
- package/dist/{chunk-4US3BCQJ.js → chunk-C3IWX6KU.js} +1 -1
- package/dist/{chunk-AKFTQT7P.js → chunk-CK5BCFQF.js} +2 -2
- package/dist/{chunk-ILQARYXK.js → chunk-CSQJCXPX.js} +5 -5
- package/dist/chunk-CZULJ647.js +378 -0
- package/dist/{chunk-J5HQNZXQ.js → chunk-DQ565WFA.js} +5 -5
- package/dist/{chunk-ZMRO6ESW.js → chunk-ECJJKDP7.js} +1 -1
- package/dist/chunk-FAGDOPQI.js +266 -0
- package/dist/{chunk-WACFIQYA.js → chunk-GZL3KEPC.js} +51 -25
- package/dist/{chunk-MVW5WS6F.js → chunk-HRHAZ3GE.js} +36 -28
- package/dist/{chunk-GWQ6T6JV.js → chunk-HUWLEVL2.js} +5 -5
- package/dist/{chunk-5HMYW5W2.js → chunk-I43PY5G3.js} +1 -1
- package/dist/{chunk-SMMDQXI2.js → chunk-IJ6XKKQW.js} +1 -1
- package/dist/{chunk-YBE2KH2U.js → chunk-IRZ5FVWG.js} +3 -3
- package/dist/{chunk-M6DTXZQK.js → chunk-IUOUNRLH.js} +2 -2
- package/dist/{chunk-FXW3FW4A.js → chunk-JSQOHMNJ.js} +1 -1
- package/dist/{chunk-FLUKEZMH.js → chunk-JYXIARGW.js} +1 -1
- package/dist/{chunk-QWUWQBIJ.js → chunk-JZKEC4XJ.js} +5 -2
- package/dist/{chunk-6PUHW2FP.js → chunk-K5CAURU5.js} +4 -4
- package/dist/{chunk-FBFPQLJG.js → chunk-KIH5BDH5.js} +2 -7
- package/dist/{chunk-74DKFWU2.js → chunk-KSVCCSAO.js} +5 -5
- package/dist/{chunk-ECQNBLPS.js → chunk-KW6EYFZV.js} +14 -369
- package/dist/{chunk-MWBFB7WA.js → chunk-LVDC3RUE.js} +1 -1
- package/dist/{chunk-7QAL23TB.js → chunk-LVWXRXT7.js} +1 -1
- package/dist/{chunk-L66VPBS5.js → chunk-M7NX25ZA.js} +1 -1
- package/dist/{chunk-KWAOOXSD.js → chunk-MCHOBQHE.js} +5 -5
- package/dist/{chunk-57EOP757.js → chunk-MYBCXDIL.js} +4 -2
- package/dist/{chunk-LW4ZEC3A.js → chunk-N3NSWWNU.js} +1 -1
- package/dist/{chunk-HR3DJWP2.js → chunk-OHD35NPC.js} +2 -2
- package/dist/{chunk-PI2WWZQQ.js → chunk-PZOFPAPG.js} +2 -2
- package/dist/{chunk-4OXULVUA.js → chunk-QDFLBTUP.js} +1 -1
- package/dist/{chunk-DUACX6E3.js → chunk-QP3XPS5U.js} +11 -7
- package/dist/{chunk-G63LBV4Y.js → chunk-QTCFEKLJ.js} +1 -1
- package/dist/{chunk-724266XT.js → chunk-RF74KBF5.js} +9 -9
- package/dist/{chunk-JPTFFZWY.js → chunk-RGQEULXD.js} +11 -11
- package/dist/{chunk-5HRXOANL.js → chunk-S54YLXWW.js} +3 -3
- package/dist/{chunk-M7ZXKMVX.js → chunk-S5LX25XE.js} +1 -1
- package/dist/{chunk-JTQHC3RV.js → chunk-T2AC5VFQ.js} +5 -5
- package/dist/{chunk-VRPDHJGB.js → chunk-T2BEIPK2.js} +4 -4
- package/dist/{chunk-FFGW45DJ.js → chunk-TN74MUMB.js} +8 -8
- package/dist/{chunk-6U3L4K57.js → chunk-UMVVQXAC.js} +2 -2
- package/dist/{chunk-DFZTZRKL.js → chunk-VLJ5C6IT.js} +4 -4
- package/dist/{chunk-SM2DT5KP.js → chunk-VPZ5K72D.js} +1 -1
- package/dist/{chunk-T6GEEMVC.js → chunk-WVP6UQG3.js} +3 -3
- package/dist/{chunk-JSS5RG65.js → chunk-WXZN5CS3.js} +2 -2
- package/dist/{chunk-I6OGFHJT.js → chunk-X6F4BQEE.js} +5 -5
- package/dist/{chunk-HTN7SMKB.js → chunk-XEJV3QSS.js} +76 -29
- package/dist/{chunk-AKBFNTJF.js → chunk-XFUKCBPU.js} +10 -10
- package/dist/{chunk-OX5EYBOC.js → chunk-XTZHUIGJ.js} +1 -1
- package/dist/{chunk-WNVQPGLH.js → chunk-XWY4UW62.js} +4 -4
- package/dist/{chunk-S3CQBNUU.js → chunk-XXNT4FGA.js} +1 -1
- package/dist/{chunk-MW3DD3S5.js → chunk-ZEHUWE3X.js} +6 -6
- package/dist/{chunk-RZF2GIPI.js → chunk-ZJNU32VE.js} +21 -6
- package/dist/{chunk-WCPN3GVW.js → chunk-ZL3UR6M5.js} +3 -3
- package/dist/{codex-app-cards-switch-7UIGMEUE.js → codex-app-cards-switch-TVKXJWXE.js} +21 -19
- package/dist/{codex-desktop-launch-66LZ6R4Y.js → codex-desktop-launch-ROTJEEGF.js} +3 -1
- package/dist/{codex-session-launch-3TGHFR7R.js → codex-session-launch-VL6ZQA3N.js} +18 -18
- package/dist/{config-OBDZ2CL3.js → config-SYLUYZQE.js} +3 -3
- package/dist/global-upgrade-IPWV5PTM.js +34 -0
- package/dist/{identity-WJUPU3AK.js → identity-ARPAUNGN.js} +4 -4
- package/dist/{live-capabilities-GACO2VB6.js → live-capabilities-EWTRY2HA.js} +4 -4
- package/dist/{paths-5PWAQF63.js → paths-IZTNMJAQ.js} +5 -3
- package/dist/{reapply-EYPT5EP2.js → reapply-ILKOYYKA.js} +26 -26
- package/dist/src/index.js +21 -21
- package/dist/{upgrade-lock-G2ZPV7ZO.js → upgrade-lock-ML73QXIG.js} +4 -6
- package/dist/{usage-PXBMEKSA.js → usage-OUV76AIY.js} +3 -3
- package/package.json +1 -1
- package/dist/global-upgrade-6M2UXUUL.js +0 -26
package/dist/bin/pushary-wait.js
CHANGED
|
@@ -4,38 +4,38 @@ import {
|
|
|
4
4
|
} from "../chunk-CVWG2N3Y.js";
|
|
5
5
|
import {
|
|
6
6
|
exitOnFailedSettingsRequest
|
|
7
|
-
} from "../chunk-
|
|
8
|
-
import "../chunk-
|
|
7
|
+
} from "../chunk-VLJ5C6IT.js";
|
|
8
|
+
import "../chunk-4YNNAF53.js";
|
|
9
9
|
import {
|
|
10
10
|
createIo
|
|
11
11
|
} from "../chunk-FO3MDD26.js";
|
|
12
12
|
import {
|
|
13
13
|
exitOnHelpFlag
|
|
14
|
-
} from "../chunk-
|
|
14
|
+
} from "../chunk-M7NX25ZA.js";
|
|
15
15
|
import {
|
|
16
16
|
rejectUnknownFlags
|
|
17
17
|
} from "../chunk-GMXKITVA.js";
|
|
18
|
-
import "../chunk-
|
|
19
|
-
import "../chunk-
|
|
20
|
-
import "../chunk-
|
|
21
|
-
import "../chunk-
|
|
18
|
+
import "../chunk-IRZ5FVWG.js";
|
|
19
|
+
import "../chunk-S54YLXWW.js";
|
|
20
|
+
import "../chunk-5DZHKNBU.js";
|
|
21
|
+
import "../chunk-IJ6XKKQW.js";
|
|
22
22
|
import {
|
|
23
23
|
UsageError
|
|
24
24
|
} from "../chunk-7QLSKOSU.js";
|
|
25
25
|
import {
|
|
26
26
|
EXIT
|
|
27
27
|
} from "../chunk-KZERVKTD.js";
|
|
28
|
-
import "../chunk-
|
|
29
|
-
import "../chunk-
|
|
30
|
-
import "../chunk-
|
|
28
|
+
import "../chunk-7RZO6VWD.js";
|
|
29
|
+
import "../chunk-MYBCXDIL.js";
|
|
30
|
+
import "../chunk-WVP6UQG3.js";
|
|
31
31
|
import "../chunk-QENTGE75.js";
|
|
32
32
|
import {
|
|
33
33
|
getApiKey,
|
|
34
34
|
getBaseUrl
|
|
35
|
-
} from "../chunk-
|
|
36
|
-
import "../chunk-
|
|
35
|
+
} from "../chunk-LVDC3RUE.js";
|
|
36
|
+
import "../chunk-5SFM6XB4.js";
|
|
37
37
|
import "../chunk-QTOLNRET.js";
|
|
38
|
-
import "../chunk-
|
|
38
|
+
import "../chunk-GZL3KEPC.js";
|
|
39
39
|
|
|
40
40
|
// bin/pushary-wait.ts
|
|
41
41
|
exitOnHelpFlag("wait");
|
package/dist/bin/pushary.js
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
installNetworkDefaults
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
4
|
+
} from "../chunk-5DZHKNBU.js";
|
|
5
|
+
import "../chunk-IJ6XKKQW.js";
|
|
6
6
|
import "../chunk-7QLSKOSU.js";
|
|
7
7
|
import {
|
|
8
8
|
EXIT
|
|
9
9
|
} from "../chunk-KZERVKTD.js";
|
|
10
|
-
import "../chunk-
|
|
11
|
-
import "../chunk-
|
|
10
|
+
import "../chunk-MYBCXDIL.js";
|
|
11
|
+
import "../chunk-WVP6UQG3.js";
|
|
12
12
|
import "../chunk-QENTGE75.js";
|
|
13
|
-
import "../chunk-
|
|
13
|
+
import "../chunk-LVDC3RUE.js";
|
|
14
14
|
import {
|
|
15
15
|
LISTED_COMMANDS,
|
|
16
16
|
renderHelp,
|
|
17
17
|
resolveCommandName
|
|
18
|
-
} from "../chunk-
|
|
18
|
+
} from "../chunk-5SFM6XB4.js";
|
|
19
19
|
import {
|
|
20
20
|
getPackageVersion
|
|
21
21
|
} from "../chunk-QTOLNRET.js";
|
|
22
|
-
import "../chunk-
|
|
22
|
+
import "../chunk-GZL3KEPC.js";
|
|
23
23
|
|
|
24
24
|
// src/cli/runtime.ts
|
|
25
25
|
var supportsRuntime = (version) => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
realpath
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-LVWXRXT7.js";
|
|
4
4
|
import {
|
|
5
5
|
findNativeClaudeInstall
|
|
6
6
|
} from "./chunk-VUFHYMSP.js";
|
|
@@ -13,10 +13,10 @@ import {
|
|
|
13
13
|
resolvePackageVersionFromBinary,
|
|
14
14
|
resolvePathBinary,
|
|
15
15
|
resolvePathBinaryAsync
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-WVP6UQG3.js";
|
|
17
17
|
import {
|
|
18
18
|
MANAGED_PROVIDERS
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-GZL3KEPC.js";
|
|
20
20
|
|
|
21
21
|
// src/live-capabilities.ts
|
|
22
22
|
import { homedir } from "os";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SETUP_FLAGS
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-ECJJKDP7.js";
|
|
4
4
|
import {
|
|
5
5
|
parseFlags
|
|
6
6
|
} from "./chunk-GMXKITVA.js";
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
} from "./chunk-7QLSKOSU.js";
|
|
10
10
|
import {
|
|
11
11
|
NPX_LATEST_COMMAND
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-5SFM6XB4.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-GZL3KEPC.js";
|
|
21
21
|
|
|
22
22
|
// src/cli/cowork.ts
|
|
23
23
|
import { readFileSync } from "fs";
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
compatibleConfigFile,
|
|
3
3
|
hasCompatibleHooks
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-XWY4UW62.js";
|
|
5
5
|
import {
|
|
6
6
|
pusharyHookExecutable
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-KSVCCSAO.js";
|
|
8
8
|
import {
|
|
9
9
|
isProtectedByScope,
|
|
10
10
|
registerHookEntry
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-MYBCXDIL.js";
|
|
12
12
|
import {
|
|
13
13
|
isRecord
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-GZL3KEPC.js";
|
|
15
15
|
|
|
16
16
|
// src/cursor-config.ts
|
|
17
17
|
var hookCommandOf = (entry) => {
|
|
@@ -1,20 +1,24 @@
|
|
|
1
1
|
import {
|
|
2
2
|
claimUpgradeLock,
|
|
3
|
-
finishWithUpgradeLock,
|
|
4
3
|
forkFinishWithUpgradeLock,
|
|
5
4
|
installWithUpgradeLock,
|
|
6
5
|
releaseAutoUpdateLock
|
|
7
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-KIH5BDH5.js";
|
|
7
|
+
import {
|
|
8
|
+
phoneStartIsRequired
|
|
9
|
+
} from "./chunk-3KOPY2UQ.js";
|
|
8
10
|
import {
|
|
9
11
|
describeAutoUpdateCheck,
|
|
10
12
|
globalInstallLocation,
|
|
11
13
|
hasRetryableUpgradeFinish,
|
|
12
14
|
hasSettledUpgradeFinish,
|
|
15
|
+
holdsUnfinishedFinish,
|
|
13
16
|
nextFinishAttempt,
|
|
17
|
+
pendingAutoUpdateAnnouncement,
|
|
14
18
|
readAutoUpdateState,
|
|
15
19
|
updateAutoUpdateState,
|
|
16
20
|
upgradeEntryFor
|
|
17
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-JZKEC4XJ.js";
|
|
18
22
|
import {
|
|
19
23
|
EXIT
|
|
20
24
|
} from "./chunk-KZERVKTD.js";
|
|
@@ -22,17 +26,17 @@ import {
|
|
|
22
26
|
autoUpdateLock,
|
|
23
27
|
autoUpdateLog,
|
|
24
28
|
autoUpdateState
|
|
25
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-MYBCXDIL.js";
|
|
26
30
|
import {
|
|
27
31
|
execNpm,
|
|
28
32
|
fetchLatestPublishedVersion,
|
|
29
33
|
npmErrorMessage,
|
|
30
34
|
readGlobalCliInstallAt,
|
|
31
35
|
readGlobalPrefix
|
|
32
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-WVP6UQG3.js";
|
|
33
37
|
import {
|
|
34
38
|
NPX_LATEST_COMMAND
|
|
35
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-5SFM6XB4.js";
|
|
36
40
|
import {
|
|
37
41
|
commandsPackage,
|
|
38
42
|
globalUpgradeEntry,
|
|
@@ -75,8 +79,29 @@ var instructionsLeftNoteOf = (agent) => {
|
|
|
75
79
|
var RETRYABLE_UPGRADE_FINISH = { kind: "retryable" };
|
|
76
80
|
var SETTLED_UPGRADE_FINISH = { kind: "settled" };
|
|
77
81
|
var controlWaitsOnThePerson = (readings) => readings.controlPolicy === "legacy" || readings.controlMode === "on" && readings.controlPolicy === "unsupported";
|
|
82
|
+
var serviceStartFellShort = (start) => start === "did_not_start" || start === "started_unverified";
|
|
83
|
+
var aRunningServiceDidNotComeBack = (readings) => readings.serviceWasRunning && readings.serviceStart === "did_not_start";
|
|
84
|
+
var phoneStartFellShortWithoutFailing = (readings) => serviceStartFellShort(readings.serviceStart) && !aRunningServiceDidNotComeBack(readings) && !phoneStartIsRequired({ mode: readings.controlMode, policy: readings.controlPolicy, lifecycleFailed: false });
|
|
85
|
+
var serviceCameBack = (start) => start === "verified" || start === "started_unverified";
|
|
86
|
+
var serviceStaysOwedBack = (readings, owedBefore) => readings.controlPolicy !== "disabled" && !serviceCameBack(readings.serviceStart) && (owedBefore || aRunningServiceDidNotComeBack(readings));
|
|
87
|
+
var phoneStartServiceAfter = (start) => start === "started_unverified" ? "running_unverified" : "not_running";
|
|
88
|
+
var DISABLED_SERVICE_NOT_REMOVED = "Upgrade installed, but the disabled background service could not be fully removed. Re-run setup with --control off.";
|
|
89
|
+
var LEGACY_SERVICE_NOT_ADOPTED = "Upgrade installed and the legacy background service was stopped, but it cannot be safely adopted. Run setup with --control off, or restore its provider and native service manager.";
|
|
90
|
+
var NO_KEY_FOR_PHONE_START = "Upgrade installed, but phone-start could not be reconciled because no API key was readable. Re-run setup.";
|
|
91
|
+
var PHONE_START_CANNOT_RUN_HERE = "Upgrade installed, but phone-start is required on this computer and cannot run here yet. Run pushary doctor to see what it needs.";
|
|
92
|
+
var SERVICE_STARTED_UNVERIFIED = "Upgrade installed, and the background service started, but it was not verified in time. Check it with: pushary doctor";
|
|
93
|
+
var SERVICE_DID_NOT_START = "Upgrade installed, but the background service did not start. Run: pushary daemon install";
|
|
94
|
+
var describeLegacyService = (stopFailure) => stopFailure ? `Upgrade installed, but the legacy background service could not be stopped: ${stopFailure}. Run setup with --control off.` : LEGACY_SERVICE_NOT_ADOPTED;
|
|
95
|
+
var describeUnreadyService = (service) => {
|
|
96
|
+
if (service.controlPolicy === "disabled") return DISABLED_SERVICE_NOT_REMOVED;
|
|
97
|
+
if (service.controlPolicy === "legacy") return describeLegacyService(service.legacyStopFailure);
|
|
98
|
+
if (service.controlPolicy === "enabled" && !service.keyReadable) return NO_KEY_FOR_PHONE_START;
|
|
99
|
+
if (service.controlPolicy === "unsupported") return PHONE_START_CANNOT_RUN_HERE;
|
|
100
|
+
return service.serviceStart === "started_unverified" ? SERVICE_STARTED_UNVERIFIED : SERVICE_DID_NOT_START;
|
|
101
|
+
};
|
|
102
|
+
var serviceFailedTheFinish = (readings) => !readings.daemonReady && !phoneStartFellShortWithoutFailing(readings);
|
|
78
103
|
var upgradeFinishOutcome = (readings) => {
|
|
79
|
-
if (
|
|
104
|
+
if (serviceFailedTheFinish(readings)) return controlWaitsOnThePerson(readings) ? SETTLED_UPGRADE_FINISH : RETRYABLE_UPGRADE_FINISH;
|
|
80
105
|
return readings.failedRefreshCount > 0 ? SETTLED_UPGRADE_FINISH : FINISHED_UPGRADE;
|
|
81
106
|
};
|
|
82
107
|
var UPGRADE_FINISH_EXIT_CODES = {
|
|
@@ -244,15 +269,19 @@ var readGlobalUpgradeSubject = (platform = process.platform) => {
|
|
|
244
269
|
const prefix = readGlobalPrefix();
|
|
245
270
|
return globalUpgradeSubject(prefix, prefix === void 0 ? { kind: "unavailable" } : readGlobalCliInstallAt(prefix, platform));
|
|
246
271
|
};
|
|
247
|
-
var finishWithThisNode = (entry) =>
|
|
272
|
+
var finishWithThisNode = async (entry) => (await forkFinishWithUpgradeLock({ entry, args: [FINISH_UPGRADE_FLAG] })).code;
|
|
273
|
+
var NEVER_RAN = { kind: "failed", waitsOnThePerson: false };
|
|
274
|
+
var finishOutcomeOfExit = (code) => {
|
|
275
|
+
const outcome = upgradeFinishOutcomeOfExit(code);
|
|
276
|
+
return outcome.kind === "finished" ? { kind: "finished" } : { kind: "failed", waitsOnThePerson: outcome.kind === "settled" };
|
|
277
|
+
};
|
|
248
278
|
var finishGlobalUpgrade = async (subject, platform = process.platform, runFinish = finishWithThisNode) => {
|
|
249
279
|
const entry = globalUpgradeEntry(subject.prefix, subject.name, platform);
|
|
250
280
|
if (!existsSync(entry)) return { kind: "entry_missing", entry };
|
|
251
281
|
try {
|
|
252
|
-
await runFinish(entry);
|
|
253
|
-
return { kind: "finished" };
|
|
282
|
+
return finishOutcomeOfExit(await runFinish(entry));
|
|
254
283
|
} catch {
|
|
255
|
-
return
|
|
284
|
+
return NEVER_RAN;
|
|
256
285
|
}
|
|
257
286
|
};
|
|
258
287
|
var describeHeldUpgradeLock = (holderPid) => `Another Pushary upgrade is already running${holderPid === void 0 ? "" : ` (pid ${holderPid})`}. Try again when it has finished.`;
|
|
@@ -267,21 +296,62 @@ var withUpgradeLock = async (run, request = {}) => {
|
|
|
267
296
|
}
|
|
268
297
|
return { kind: "ran" };
|
|
269
298
|
};
|
|
299
|
+
var upgradeOnRecordIsStillThisOne = (earlier, installedVersion) => earlier.to === installedVersion && (holdsUnfinishedFinish(earlier) || pendingAutoUpdateAnnouncement(earlier) !== null);
|
|
300
|
+
var startOfTheUpgradeOnRecord = (statePath, installedVersion) => {
|
|
301
|
+
const earlier = readAutoUpdateState(statePath);
|
|
302
|
+
return upgradeOnRecordIsStillThisOne(earlier, installedVersion) ? earlier.from : void 0;
|
|
303
|
+
};
|
|
270
304
|
var finishUpgradeWithLock = async (run, request) => {
|
|
271
305
|
const outcome = await withUpgradeLock(run, request);
|
|
272
306
|
if (outcome.kind === "refused") {
|
|
273
|
-
updateAutoUpdateState(request.statePath, {
|
|
307
|
+
updateAutoUpdateState(request.statePath, {
|
|
308
|
+
lastResult: "finish_pending",
|
|
309
|
+
from: startOfTheUpgradeOnRecord(request.statePath, request.installedVersion),
|
|
310
|
+
to: request.installedVersion,
|
|
311
|
+
detail: outcome.message
|
|
312
|
+
});
|
|
274
313
|
}
|
|
275
314
|
return outcome;
|
|
276
315
|
};
|
|
316
|
+
var FINISH_DID_NOT_FINISH_DETAIL = "installed, but refreshing the agent configs did not finish; run pushary upgrade again";
|
|
317
|
+
var FINISH_WAITS_ON_THE_PERSON_DETAIL = "installed, but refreshing the agent configs needs a change only you can make; make it, then run pushary upgrade again";
|
|
318
|
+
var waitsOnThePerson = (unfinished) => unfinished.kind === "failed" && unfinished.waitsOnThePerson;
|
|
319
|
+
var recordUnfinishedUpgrade = (record, unfinished) => {
|
|
320
|
+
if (record.installed.kind !== "installed") return;
|
|
321
|
+
const settled = waitsOnThePerson(unfinished);
|
|
322
|
+
updateAutoUpdateState(record.statePath, {
|
|
323
|
+
lastCheckAt: record.at,
|
|
324
|
+
lastResult: settled ? "finish_blocked" : "finish_pending",
|
|
325
|
+
from: startOfTheUpgradeOnRecord(record.statePath, record.installed.version),
|
|
326
|
+
to: record.installed.version,
|
|
327
|
+
at: record.at,
|
|
328
|
+
detail: settled ? FINISH_WAITS_ON_THE_PERSON_DETAIL : FINISH_DID_NOT_FINISH_DETAIL,
|
|
329
|
+
finishAttempts: void 0
|
|
330
|
+
});
|
|
331
|
+
};
|
|
332
|
+
var forgetUnfinishedUpgrade = (record, upgradedFrom) => {
|
|
333
|
+
if (record.installed.kind !== "installed" || !holdsUnfinishedFinish(readAutoUpdateState(record.statePath))) return;
|
|
334
|
+
updateAutoUpdateState(record.statePath, {
|
|
335
|
+
lastResult: "updated",
|
|
336
|
+
from: upgradedFrom,
|
|
337
|
+
to: record.installed.version,
|
|
338
|
+
at: record.at,
|
|
339
|
+
detail: void 0,
|
|
340
|
+
announced: true,
|
|
341
|
+
finishAttempts: void 0
|
|
342
|
+
});
|
|
343
|
+
};
|
|
277
344
|
var describeUpgradeStart = (subject, latest) => `Upgrading ${subject.name} ${subject.version} -> ${latest ?? "latest"}`;
|
|
278
345
|
var upgradeInstalledPackage = async (subject, effects) => {
|
|
279
346
|
const pendingFinish = effects.hasPendingFinish(subject.version);
|
|
280
347
|
const latest = await effects.fetchLatest(subject.name);
|
|
281
348
|
const newerPublished = latest !== void 0 && isNewerVersion(latest, subject.version);
|
|
282
349
|
if (pendingFinish && !newerPublished) {
|
|
283
|
-
const
|
|
284
|
-
if (
|
|
350
|
+
const finish2 = await effects.finish(subject);
|
|
351
|
+
if (finish2.kind !== "finished") {
|
|
352
|
+
effects.recordUnfinished(finish2);
|
|
353
|
+
return { kind: "pending_finish_failed", finish: finish2 };
|
|
354
|
+
}
|
|
285
355
|
effects.recordFinished();
|
|
286
356
|
}
|
|
287
357
|
if (latest !== void 0 && !newerPublished) return { kind: "current", version: subject.version };
|
|
@@ -291,13 +361,20 @@ var upgradeInstalledPackage = async (subject, effects) => {
|
|
|
291
361
|
} catch (error) {
|
|
292
362
|
return { kind: "install_failed", detail: npmErrorMessage(error) };
|
|
293
363
|
}
|
|
294
|
-
|
|
364
|
+
const finish = await effects.finish(subject);
|
|
365
|
+
if (finish.kind === "finished") effects.forgetUnfinished();
|
|
366
|
+
else effects.recordUnfinished(finish);
|
|
367
|
+
return { kind: "installed", finish };
|
|
295
368
|
};
|
|
296
369
|
|
|
297
370
|
export {
|
|
298
371
|
refreshedPartsOf,
|
|
299
372
|
wasRefreshed,
|
|
300
373
|
instructionsLeftNoteOf,
|
|
374
|
+
phoneStartFellShortWithoutFailing,
|
|
375
|
+
serviceStaysOwedBack,
|
|
376
|
+
phoneStartServiceAfter,
|
|
377
|
+
describeUnreadyService,
|
|
301
378
|
upgradeFinishOutcome,
|
|
302
379
|
upgradeFinishExitCode,
|
|
303
380
|
FINISH_UPGRADE_FLAG,
|
|
@@ -307,5 +384,7 @@ export {
|
|
|
307
384
|
finishGlobalUpgrade,
|
|
308
385
|
withUpgradeLock,
|
|
309
386
|
finishUpgradeWithLock,
|
|
387
|
+
recordUnfinishedUpgrade,
|
|
388
|
+
forgetUnfinishedUpgrade,
|
|
310
389
|
upgradeInstalledPackage
|
|
311
390
|
};
|
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
keyPrefix,
|
|
5
5
|
readConfigFileKey,
|
|
6
6
|
readMacAppKeyPrefix
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-IRZ5FVWG.js";
|
|
8
8
|
import {
|
|
9
9
|
NPX_LATEST_COMMAND
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-5SFM6XB4.js";
|
|
11
11
|
|
|
12
12
|
// src/key-signed-out.ts
|
|
13
13
|
var VERDICT_BY_CHECK = {
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
readExistingMachineId
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-IJ6XKKQW.js";
|
|
4
4
|
import {
|
|
5
5
|
NetworkError
|
|
6
6
|
} from "./chunk-7QLSKOSU.js";
|
|
7
7
|
import {
|
|
8
8
|
getBaseUrl
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-LVDC3RUE.js";
|
|
10
10
|
import {
|
|
11
11
|
getPackageVersion
|
|
12
12
|
} from "./chunk-QTOLNRET.js";
|
|
13
13
|
import {
|
|
14
14
|
clientContextHeaders
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-GZL3KEPC.js";
|
|
16
16
|
|
|
17
17
|
// src/cli/net.ts
|
|
18
18
|
import { createRequire } from "module";
|
|
@@ -5,16 +5,16 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
NOTIFICATION_MATCHED_TYPES,
|
|
7
7
|
POSTTOOLUSE_MIRRORED_TOOLS
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-QTCFEKLJ.js";
|
|
9
9
|
import {
|
|
10
10
|
isProtectedByScope,
|
|
11
11
|
registerHookEntry
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-MYBCXDIL.js";
|
|
13
13
|
import {
|
|
14
14
|
CLAUDE_PRETOOLUSE_MATCHER,
|
|
15
15
|
HOOK_BUDGETS,
|
|
16
16
|
HOOK_LOCATOR_BINARY
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-GZL3KEPC.js";
|
|
18
18
|
|
|
19
19
|
// src/gemini-config.ts
|
|
20
20
|
var GEMINI_HOOK_BINARY = "pushary-gemini-hook";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
pusharyDir
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-MYBCXDIL.js";
|
|
4
4
|
import {
|
|
5
5
|
readJsonSafe
|
|
6
6
|
} from "./chunk-QENTGE75.js";
|
|
7
7
|
import {
|
|
8
8
|
isRecord
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-GZL3KEPC.js";
|
|
10
10
|
|
|
11
11
|
// src/process-ownership.ts
|
|
12
12
|
import { createHash, randomUUID } from "crypto";
|
|
@@ -3,24 +3,24 @@ import {
|
|
|
3
3
|
expectedLaunchCapabilities,
|
|
4
4
|
hasSpawnProvider,
|
|
5
5
|
resolveControlPolicy
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-3KOPY2UQ.js";
|
|
7
7
|
import {
|
|
8
8
|
daemonHasRemoteProof,
|
|
9
9
|
daemonServiceManagerAvailable,
|
|
10
10
|
hasDaemonServiceDefinition,
|
|
11
11
|
readDaemonNeedsLogin,
|
|
12
12
|
readDaemonStatus
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-QP3XPS5U.js";
|
|
14
14
|
import {
|
|
15
15
|
readControlMode,
|
|
16
16
|
readKeySource
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-IRZ5FVWG.js";
|
|
18
18
|
import {
|
|
19
19
|
getMachineId
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-IJ6XKKQW.js";
|
|
21
21
|
import {
|
|
22
22
|
getBaseUrl
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-LVDC3RUE.js";
|
|
24
24
|
import {
|
|
25
25
|
getPackageVersion
|
|
26
26
|
} from "./chunk-QTOLNRET.js";
|