pushary 1.9.269 → 1.9.270
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 +4 -0
- package/dist/{api-ILQDGJL4.js → api-QRQC65E7.js} +12 -12
- package/dist/bin/pushary-audit.js +3 -3
- package/dist/bin/pushary-bell-hook.js +28 -28
- package/dist/bin/pushary-bell.js +11 -11
- package/dist/bin/pushary-calls.js +14 -14
- package/dist/bin/pushary-claude.js +25 -25
- package/dist/bin/pushary-clean.js +39 -39
- package/dist/bin/pushary-codex-bridge.js +22 -22
- 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 -46
- package/dist/bin/pushary-disconnect.js +30 -30
- package/dist/bin/pushary-display-hook.js +14 -0
- package/dist/bin/pushary-doctor.js +48 -48
- package/dist/bin/pushary-elicitation-hook.js +27 -27
- package/dist/bin/pushary-gemini-bridge.js +17 -17
- package/dist/bin/pushary-gemini-hook.js +31 -31
- package/dist/bin/pushary-hook.js +35 -35
- package/dist/bin/pushary-login.js +42 -42
- package/dist/bin/pushary-logout.js +31 -31
- package/dist/bin/pushary-mcp.js +12 -12
- package/dist/bin/pushary-mode.js +15 -15
- package/dist/bin/pushary-notification-hook.js +27 -27
- package/dist/bin/pushary-opencode-bridge.js +21 -21
- 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 +35 -35
- 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 -39
- package/dist/bin/pushary-sessions.js +12 -12
- package/dist/bin/pushary-setup.js +59 -59
- 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 +15 -15
- package/dist/bin/pushary-transcript-register.js +16 -16
- package/dist/bin/pushary-transcripts.js +25 -25
- package/dist/bin/pushary-upgrade.js +47 -47
- package/dist/bin/pushary-wait.js +16 -16
- package/dist/bin/pushary.js +7 -7
- package/dist/{chunk-AHYV7ZQE.js → chunk-2ABJ4VCG.js} +1 -1
- package/dist/{chunk-ZTQS2ZVJ.js → chunk-2C2XPI5Y.js} +1 -1
- package/dist/{chunk-XIWZX5YY.js → chunk-2GKTNETX.js} +5 -5
- package/dist/{chunk-43EYM5PY.js → chunk-3IHL4N2G.js} +6 -6
- package/dist/{chunk-3D6EDVCE.js → chunk-3P3GPF6O.js} +11 -11
- package/dist/{chunk-HV2DBLA2.js → chunk-3TN6OKJ2.js} +5 -5
- package/dist/{chunk-E274RVGY.js → chunk-3ZEKDHAX.js} +4 -4
- package/dist/{chunk-KGZSVBUD.js → chunk-4JXYINSC.js} +3 -3
- package/dist/{chunk-4R2BZ7ZV.js → chunk-4O2FHBHY.js} +1 -1
- package/dist/{chunk-4NBFRTVM.js → chunk-4ZISYOJF.js} +6 -6
- package/dist/{chunk-ALWSX6SA.js → chunk-5G6VZEDJ.js} +3 -3
- package/dist/{chunk-MPXY3I3M.js → chunk-65AS4TO4.js} +6 -6
- package/dist/{chunk-GFX5AAWT.js → chunk-67FOJA34.js} +7 -7
- package/dist/{chunk-KYCPYOKD.js → chunk-6Q2D4OON.js} +2 -2
- package/dist/{chunk-ZNQ5YZ2L.js → chunk-7JVJ4ZKU.js} +2 -2
- package/dist/{chunk-DBYHLVQ2.js → chunk-7TVCL4PI.js} +1 -1
- package/dist/{chunk-6LRUCUBE.js → chunk-A2AN2T5O.js} +5 -5
- package/dist/{chunk-NCHOWL5Y.js → chunk-AGK5KU7B.js} +2 -2
- package/dist/{chunk-TOHXHAFM.js → chunk-ARDNSSLS.js} +8 -8
- package/dist/{chunk-VIMAUIPP.js → chunk-B25EAOUY.js} +6 -6
- package/dist/{chunk-7CBU5D6G.js → chunk-BIJU6CPZ.js} +1 -1
- package/dist/{chunk-4JO5JG2P.js → chunk-BIY5PLF6.js} +5 -5
- package/dist/{chunk-EPQDQGVZ.js → chunk-BY4SOA5N.js} +1 -1
- package/dist/{chunk-XNYZBQCJ.js → chunk-CDGZIVNU.js} +1 -1
- package/dist/{chunk-MFQNYRKP.js → chunk-CGTPKZWB.js} +4 -4
- package/dist/{chunk-P2OVSHIW.js → chunk-COHRE67K.js} +3 -3
- package/dist/{chunk-U7WPURWA.js → chunk-DEMI4ZEH.js} +2 -2
- package/dist/{chunk-Q7VXJ634.js → chunk-DFN4FVB6.js} +4 -4
- package/dist/{chunk-UT7O4WQ6.js → chunk-DMAN3ZCW.js} +4 -4
- package/dist/{chunk-TDV2RONN.js → chunk-DQA3PMYT.js} +3 -3
- package/dist/{chunk-GCWAQMHF.js → chunk-DTGU4J77.js} +5 -5
- package/dist/{chunk-5EQYWIQ2.js → chunk-DXPE4F2K.js} +4 -4
- package/dist/{chunk-QFOMZSIU.js → chunk-EZ5HNO4L.js} +1 -1
- package/dist/{chunk-LKKOKKUX.js → chunk-FB25FA3O.js} +2 -2
- package/dist/{chunk-ZVSSHI6H.js → chunk-GA7L6ZHW.js} +5 -5
- package/dist/{chunk-AY37CFHF.js → chunk-GOSMCOHB.js} +6 -0
- package/dist/{chunk-RBZCLXTE.js → chunk-HBU5P5EC.js} +1 -1
- package/dist/{chunk-P3DV5JOE.js → chunk-HEBBPZDN.js} +7 -7
- package/dist/{chunk-FM73BOSO.js → chunk-HHOTW23E.js} +2 -2
- package/dist/{chunk-Z4XTXCRP.js → chunk-HLJDCM3Z.js} +1 -1
- package/dist/{chunk-PWP6NIWM.js → chunk-IJCWAVT7.js} +2 -2
- package/dist/{chunk-JGMEZV2Q.js → chunk-IU4M7QPA.js} +3 -3
- package/dist/{chunk-3K2HA65U.js → chunk-J35H5XWH.js} +4 -4
- package/dist/{chunk-RQCVHU7Q.js → chunk-JF6IHH5E.js} +1 -1
- package/dist/{chunk-Z26E6HSF.js → chunk-JL4REHDW.js} +5 -5
- package/dist/{chunk-WT2RG7RS.js → chunk-JRPOC47L.js} +1 -1
- package/dist/{chunk-Z7ZBH7RU.js → chunk-JTLHPORS.js} +10 -10
- package/dist/{chunk-ESH2IFRQ.js → chunk-KBT4OBJM.js} +3 -3
- package/dist/{chunk-AVST42GD.js → chunk-LATT2QB4.js} +1 -1
- package/dist/{chunk-THDJL37Z.js → chunk-MDD4MCQY.js} +1 -1
- package/dist/{chunk-7GFQHVKY.js → chunk-NJB2WPGE.js} +16 -16
- package/dist/{chunk-WUUVZEKA.js → chunk-O4ZFUVDI.js} +3 -3
- package/dist/{chunk-JYUIHUMK.js → chunk-O63L6PLB.js} +1 -1
- package/dist/{chunk-ULOJDRKP.js → chunk-O753NJME.js} +1 -1
- package/dist/{chunk-ZG6QJH5C.js → chunk-OW4AMHJV.js} +1 -1
- package/dist/{chunk-7O2OZQ6L.js → chunk-PFNWKGAN.js} +4 -4
- package/dist/{chunk-ESMAFA2J.js → chunk-PGXWER6L.js} +5 -5
- package/dist/{chunk-4VUQPSEP.js → chunk-PJDMIJG7.js} +1 -1
- package/dist/{chunk-D57LIC6X.js → chunk-PK5JMVGN.js} +1 -1
- package/dist/{chunk-J2PCHNZO.js → chunk-PWDSHCY4.js} +5 -5
- package/dist/{chunk-UXRP56HU.js → chunk-R6JRCEIX.js} +1 -1
- package/dist/{chunk-Y2DBHR2N.js → chunk-RFCTFMJS.js} +1 -1
- package/dist/{chunk-M3VS3PEK.js → chunk-RII5XZLB.js} +79 -18
- package/dist/{chunk-3YU4M3H6.js → chunk-RUWD6OFZ.js} +10 -10
- package/dist/{chunk-3QOTNFNM.js → chunk-TR5A6H2P.js} +3 -3
- package/dist/{chunk-DLMR45RP.js → chunk-TTU65I6T.js} +1 -1
- package/dist/{chunk-UVWYN2UR.js → chunk-TVNUXX5O.js} +4 -4
- package/dist/{chunk-PAKMLOFV.js → chunk-TZYJNKFN.js} +3 -3
- package/dist/{chunk-CNNEMTRD.js → chunk-UCK4UKBV.js} +4 -4
- package/dist/{chunk-XLJTD3PP.js → chunk-UMZ2VLLR.js} +6 -6
- package/dist/{chunk-WAZZ2JJ3.js → chunk-V4PD2R6X.js} +12 -12
- package/dist/{chunk-WQVKU4BI.js → chunk-VMIUZMAD.js} +3 -3
- package/dist/{chunk-KARQYZR3.js → chunk-VSKX62AG.js} +1 -1
- package/dist/{chunk-D6OF2TD3.js → chunk-VWXR34GR.js} +5 -5
- package/dist/{chunk-Z32D32PL.js → chunk-W2SZOATE.js} +4 -4
- package/dist/{chunk-ARWKVVKB.js → chunk-WS7Z6IJV.js} +1 -1
- package/dist/{chunk-L7GL5TJY.js → chunk-WXQA6JZO.js} +2 -2
- package/dist/{chunk-EY4XHT6G.js → chunk-X3DYMWPL.js} +2 -2
- package/dist/{chunk-QICIMORB.js → chunk-Y4DC5KRB.js} +2 -2
- package/dist/{chunk-O54TEHYJ.js → chunk-ZGVMX36I.js} +2 -2
- package/dist/{chunk-66EWTFIK.js → chunk-ZX2HQ25K.js} +1 -1
- package/dist/{chunk-TZ32ZFFG.js → chunk-ZXPNAYQC.js} +7 -7
- package/dist/{codex-app-cards-switch-ROGUHXKQ.js → codex-app-cards-switch-EULJQSJY.js} +11 -11
- package/dist/{codex-card-routing-CQX3C552.js → codex-card-routing-RWF7Q5NP.js} +2 -2
- package/dist/{codex-desktop-launch-U6XMY4AD.js → codex-desktop-launch-6FTCM3KC.js} +3 -3
- package/dist/{codex-session-launch-FFF7HWWT.js → codex-session-launch-7L5PTJTO.js} +21 -21
- package/dist/{config-J6IB5GWC.js → config-RUJK4OSC.js} +3 -3
- package/dist/{global-upgrade-W6O44GGK.js → global-upgrade-JASHEAL5.js} +9 -9
- package/dist/{identity-6W3NU4R3.js → identity-FKXV4DDS.js} +4 -4
- package/dist/{live-capabilities-XGYRPZB3.js → live-capabilities-M5ZFRYQR.js} +4 -4
- package/dist/{paths-BK42XGTR.js → paths-OWVAAP4Y.js} +3 -3
- package/dist/{reapply-WEEWFQOE.js → reapply-P7KARKEQ.js} +34 -34
- package/dist/src/index.js +33 -33
- package/dist/{upgrade-lock-AOHJCJIT.js → upgrade-lock-6H24K6S3.js} +10 -6
- package/dist/{usage-AG2GXZV6.js → usage-PENWECBI.js} +3 -3
- package/package.json +1 -1
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
} from "./chunk-CXQWDQCJ.js";
|
|
20
20
|
import {
|
|
21
21
|
redactSecretsFromContent
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-GOSMCOHB.js";
|
|
23
23
|
|
|
24
24
|
// src/shell-quote.ts
|
|
25
25
|
var shellDoubleQuoted = (text) => `"${text.replace(/(["\\$`])/g, "\\$1")}"`;
|
|
@@ -610,9 +610,9 @@ var installGlobally = (options) => {
|
|
|
610
610
|
}
|
|
611
611
|
const started = (async () => {
|
|
612
612
|
if (!npmIsOnPath()) throw new NpmMissingError();
|
|
613
|
-
const { withUpgradeLock } = await import("./global-upgrade-
|
|
614
|
-
const { canonicalLockPath, installWithUpgradeLock, leftAnUnfinishedInstallHere, ownsUpgradeLock } = await import("./upgrade-lock-
|
|
615
|
-
const { autoUpdateLock } = await import("./paths-
|
|
613
|
+
const { withUpgradeLock } = await import("./global-upgrade-JASHEAL5.js");
|
|
614
|
+
const { canonicalLockPath, installWithUpgradeLock, leftAnUnfinishedInstallHere, ownsUpgradeLock } = await import("./upgrade-lock-6H24K6S3.js");
|
|
615
|
+
const { autoUpdateLock } = await import("./paths-OWVAAP4Y.js");
|
|
616
616
|
const lockPath = options.lockPath ?? autoUpdateLock();
|
|
617
617
|
const lockFile = canonicalLockPath(lockPath);
|
|
618
618
|
const unfinishedHere = failuresThisProcessLeftUnfinished.get(lockFile);
|
|
@@ -5,13 +5,13 @@ import {
|
|
|
5
5
|
} from "./chunk-OYIN77HO.js";
|
|
6
6
|
import {
|
|
7
7
|
readMacAppAgentKey
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-DXPE4F2K.js";
|
|
9
9
|
import {
|
|
10
10
|
API_KEYS_PATH
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-6Q2D4OON.js";
|
|
12
12
|
import {
|
|
13
13
|
absoluteUrl
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-KBT4OBJM.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-7JVJ4ZKU.js";
|
|
25
25
|
import {
|
|
26
26
|
isValidApiKey
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-GOSMCOHB.js";
|
|
28
28
|
|
|
29
29
|
// src/cli/held-key-revocation.ts
|
|
30
30
|
var readCliHeldKeys = (profiles) => {
|
|
@@ -3,13 +3,13 @@ import {
|
|
|
3
3
|
} from "./chunk-WHB622LP.js";
|
|
4
4
|
import {
|
|
5
5
|
ensureDaemonRunning
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-65AS4TO4.js";
|
|
7
7
|
import {
|
|
8
8
|
hookOwnerOf
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-W2SZOATE.js";
|
|
10
10
|
import {
|
|
11
11
|
hookMeaning
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-TTU65I6T.js";
|
|
13
13
|
import {
|
|
14
14
|
buildTranscriptRecords,
|
|
15
15
|
changedRecipientsMessage,
|
|
@@ -24,11 +24,11 @@ import {
|
|
|
24
24
|
uploadTranscriptRecords,
|
|
25
25
|
verifyAnchoredRecipients,
|
|
26
26
|
wrapSessionKey
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-VMIUZMAD.js";
|
|
28
28
|
import {
|
|
29
29
|
transcriptEnvironmentPreference,
|
|
30
30
|
transcriptsEnabled
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-ZX2HQ25K.js";
|
|
32
32
|
import {
|
|
33
33
|
external_exports,
|
|
34
34
|
ownedOnlyByThisUser,
|
|
@@ -36,19 +36,19 @@ import {
|
|
|
36
36
|
} from "./chunk-P6DUWKAO.js";
|
|
37
37
|
import {
|
|
38
38
|
fetchAsCredential
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-LATT2QB4.js";
|
|
40
40
|
import {
|
|
41
41
|
readTranscriptPreference
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-7JVJ4ZKU.js";
|
|
43
43
|
import {
|
|
44
44
|
claudeConfigDir,
|
|
45
45
|
codexHome,
|
|
46
46
|
pusharyDir
|
|
47
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-ZGVMX36I.js";
|
|
48
48
|
import {
|
|
49
49
|
getApiKey,
|
|
50
50
|
getBaseUrl
|
|
51
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-DEMI4ZEH.js";
|
|
52
52
|
import {
|
|
53
53
|
writeJsonAtomic,
|
|
54
54
|
writeJsonAtomicDurable
|
|
@@ -61,7 +61,7 @@ import {
|
|
|
61
61
|
isHookSource,
|
|
62
62
|
isRecord,
|
|
63
63
|
redactSecretsFromContent
|
|
64
|
-
} from "./chunk-
|
|
64
|
+
} from "./chunk-GOSMCOHB.js";
|
|
65
65
|
|
|
66
66
|
// src/transcript-registration.ts
|
|
67
67
|
import { createHash as createHash4 } from "crypto";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
pusharyFetch
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-TR5A6H2P.js";
|
|
4
4
|
import {
|
|
5
5
|
getBaseUrl
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-DEMI4ZEH.js";
|
|
7
7
|
import {
|
|
8
8
|
NetworkError
|
|
9
9
|
} from "./chunk-CINBAX5G.js";
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
import {
|
|
14
14
|
isValidApiKey,
|
|
15
15
|
normalizeKeyScope
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-GOSMCOHB.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;
|
|
@@ -7,30 +7,30 @@ import {
|
|
|
7
7
|
restorePhoneApprovals,
|
|
8
8
|
setAsidePhoneApprovalsOfOtherCalls,
|
|
9
9
|
takePhoneApproval
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-HHOTW23E.js";
|
|
11
11
|
import {
|
|
12
12
|
claudeSettingsLocationFor,
|
|
13
13
|
readClaudePermissionRules
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-Y4DC5KRB.js";
|
|
15
15
|
import {
|
|
16
16
|
defersToNativeMode
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-HLJDCM3Z.js";
|
|
18
18
|
import {
|
|
19
19
|
reportMachineDenial
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-PFNWKGAN.js";
|
|
21
21
|
import {
|
|
22
22
|
isGatingMoment,
|
|
23
23
|
recordKeylessMoment
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-2C2XPI5Y.js";
|
|
25
25
|
import {
|
|
26
26
|
isAdmitted,
|
|
27
27
|
readAdmissionRules
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-A2AN2T5O.js";
|
|
29
29
|
import {
|
|
30
30
|
activeHookSource,
|
|
31
31
|
activeIdentity,
|
|
32
32
|
namedSource
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-3IHL4N2G.js";
|
|
34
34
|
import {
|
|
35
35
|
DEFAULT_SESSION,
|
|
36
36
|
allow,
|
|
@@ -72,7 +72,7 @@ import {
|
|
|
72
72
|
storedWaitDeadline,
|
|
73
73
|
sweepFilesOlderThan,
|
|
74
74
|
userScope
|
|
75
|
-
} from "./chunk-
|
|
75
|
+
} from "./chunk-3P3GPF6O.js";
|
|
76
76
|
import {
|
|
77
77
|
UNNAMED_ACTION,
|
|
78
78
|
deriveAction,
|
|
@@ -83,7 +83,7 @@ import {
|
|
|
83
83
|
patchDeletesFiles,
|
|
84
84
|
permissionDeniedAction,
|
|
85
85
|
scopePathFor
|
|
86
|
-
} from "./chunk-
|
|
86
|
+
} from "./chunk-TTU65I6T.js";
|
|
87
87
|
import {
|
|
88
88
|
askUser,
|
|
89
89
|
cancelQuestion,
|
|
@@ -97,30 +97,30 @@ import {
|
|
|
97
97
|
sendNotification,
|
|
98
98
|
waitForQuestion,
|
|
99
99
|
withdrawQuestion
|
|
100
|
-
} from "./chunk-
|
|
100
|
+
} from "./chunk-ZXPNAYQC.js";
|
|
101
101
|
import {
|
|
102
102
|
branchFor,
|
|
103
103
|
projectNameFor,
|
|
104
104
|
repoKeyFor,
|
|
105
105
|
repositoryScopeFor
|
|
106
|
-
} from "./chunk-
|
|
106
|
+
} from "./chunk-RFCTFMJS.js";
|
|
107
107
|
import {
|
|
108
108
|
getMachineId
|
|
109
|
-
} from "./chunk-
|
|
109
|
+
} from "./chunk-R6JRCEIX.js";
|
|
110
110
|
import {
|
|
111
111
|
POSTTOOLUSE_MIRRORED_TOOLS
|
|
112
|
-
} from "./chunk-
|
|
112
|
+
} from "./chunk-ZGVMX36I.js";
|
|
113
113
|
import {
|
|
114
114
|
getApiKey,
|
|
115
115
|
getBaseUrl,
|
|
116
116
|
isMalformedApiKeyError
|
|
117
|
-
} from "./chunk-
|
|
117
|
+
} from "./chunk-DEMI4ZEH.js";
|
|
118
118
|
import {
|
|
119
119
|
writeFileAtomic
|
|
120
120
|
} from "./chunk-PM2NRK6Y.js";
|
|
121
121
|
import {
|
|
122
122
|
NPX_LATEST_COMMAND
|
|
123
|
-
} from "./chunk-
|
|
123
|
+
} from "./chunk-O753NJME.js";
|
|
124
124
|
import {
|
|
125
125
|
AGENT_QUESTION_STRATEGY,
|
|
126
126
|
AGENT_QUESTION_TOOL,
|
|
@@ -192,7 +192,7 @@ import {
|
|
|
192
192
|
terminalStaysLiveForTheCall,
|
|
193
193
|
timeoutActionWithoutLocalPrompt,
|
|
194
194
|
unapprovedScopeReason
|
|
195
|
-
} from "./chunk-
|
|
195
|
+
} from "./chunk-GOSMCOHB.js";
|
|
196
196
|
|
|
197
197
|
// src/terminal-answer-watch.ts
|
|
198
198
|
import { closeSync, openSync, readSync, statSync } from "fs";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
pusharyHookExecutable
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-W2SZOATE.js";
|
|
4
4
|
import {
|
|
5
5
|
bridgeResolvesToApp,
|
|
6
6
|
cursorUserHooks,
|
|
7
7
|
executableFileName,
|
|
8
8
|
isBridgeLocator,
|
|
9
9
|
liveBridgeProbe
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-ZGVMX36I.js";
|
|
11
11
|
import {
|
|
12
12
|
atLeast,
|
|
13
13
|
parseVersion
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
isCursorHookPayload,
|
|
22
22
|
isRecord,
|
|
23
23
|
toolsCoveredByGateEntry
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-GOSMCOHB.js";
|
|
25
25
|
|
|
26
26
|
// src/cursor-gate-registration.ts
|
|
27
27
|
import { dirname, isAbsolute, join, resolve } from "path";
|
|
@@ -4,21 +4,21 @@ import {
|
|
|
4
4
|
claimThrottle,
|
|
5
5
|
releaseThrottle,
|
|
6
6
|
reportEvent
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-3P3GPF6O.js";
|
|
8
8
|
import {
|
|
9
9
|
deriveToolTarget,
|
|
10
10
|
permissionDeniedAction
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-TTU65I6T.js";
|
|
12
12
|
import {
|
|
13
13
|
projectNameFor
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-RFCTFMJS.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-GOSMCOHB.js";
|
|
22
22
|
|
|
23
23
|
// src/machine-decision-audit.ts
|
|
24
24
|
var MACHINE_DECISION_REPORT_TIMEOUT_MS = 800;
|
|
@@ -3,24 +3,24 @@ import {
|
|
|
3
3
|
expectedLaunchCapabilities,
|
|
4
4
|
hasSpawnProvider,
|
|
5
5
|
resolveControlPolicy
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-TZYJNKFN.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-65AS4TO4.js";
|
|
14
14
|
import {
|
|
15
15
|
getMachineId
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-R6JRCEIX.js";
|
|
17
17
|
import {
|
|
18
18
|
readControlMode,
|
|
19
19
|
readKeyInForce
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-7JVJ4ZKU.js";
|
|
21
21
|
import {
|
|
22
22
|
getBaseUrl
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-DEMI4ZEH.js";
|
|
24
24
|
import {
|
|
25
25
|
getPackageVersion
|
|
26
26
|
} from "./chunk-CXQWDQCJ.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
computerOsOfPlatform,
|
|
3
3
|
isComputerAgent
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-GOSMCOHB.js";
|
|
5
5
|
|
|
6
6
|
// src/setup/phone-check.ts
|
|
7
7
|
var NO_AGENT_CONNECTED_LINE = "Skipping the phone step: no agent was connected, so nothing could ask you anything on your phone yet.";
|
|
@@ -4,13 +4,13 @@ import {
|
|
|
4
4
|
configFailureKind,
|
|
5
5
|
retryAgentCommand,
|
|
6
6
|
writeSetupConfigFile
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-4JXYINSC.js";
|
|
8
8
|
import {
|
|
9
9
|
MCP_BRIDGE_BINARY
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-CGTPKZWB.js";
|
|
11
11
|
import {
|
|
12
12
|
KEY_FILE_MODE
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-7JVJ4ZKU.js";
|
|
14
14
|
import {
|
|
15
15
|
CLINE_SERVER_NAME_TAKEN,
|
|
16
16
|
CLINE_SETTINGS_REFUSALS,
|
|
@@ -32,10 +32,10 @@ import {
|
|
|
32
32
|
withClinePusharyServer,
|
|
33
33
|
withRefreshedClineKey,
|
|
34
34
|
withoutClinePusharyServer
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-ZGVMX36I.js";
|
|
36
36
|
import {
|
|
37
37
|
resolveGlobalBinary
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-J35H5XWH.js";
|
|
39
39
|
import {
|
|
40
40
|
readJsonSafe,
|
|
41
41
|
writeFileAtomic,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
autoUpdateLock
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-ZGVMX36I.js";
|
|
4
4
|
import {
|
|
5
5
|
installPackageGlobally,
|
|
6
6
|
npmErrorMessage,
|
|
7
7
|
throwIfNpmRefusesInstall
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-J35H5XWH.js";
|
|
9
9
|
import {
|
|
10
10
|
writeJsonAtomic
|
|
11
11
|
} from "./chunk-PM2NRK6Y.js";
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
} from "./chunk-CXQWDQCJ.js";
|
|
15
15
|
|
|
16
16
|
// src/upgrade-lock.ts
|
|
17
|
-
import { fork } from "child_process";
|
|
17
|
+
import { fork, spawnSync } from "child_process";
|
|
18
18
|
import { createHash } from "crypto";
|
|
19
19
|
import { existsSync, mkdirSync, readFileSync, realpathSync, statSync, unlinkSync } from "fs";
|
|
20
20
|
import { createServer, Server } from "net";
|
|
@@ -100,6 +100,9 @@ var runningCliInstallerIn = (processes, ownPid) => {
|
|
|
100
100
|
};
|
|
101
101
|
|
|
102
102
|
// src/upgrade-lock.ts
|
|
103
|
+
var rejectConnection = (socket) => {
|
|
104
|
+
socket.destroy();
|
|
105
|
+
};
|
|
103
106
|
var LOCK_HOST = "127.0.0.1";
|
|
104
107
|
var LOCK_PORT_START = 49152;
|
|
105
108
|
var LOCK_PORT_COUNT = 16384;
|
|
@@ -109,6 +112,12 @@ var LOCK_HANDLE = "pushary-upgrade-lock-handle";
|
|
|
109
112
|
var HANDOFF_TIMEOUT_MS = 1e4;
|
|
110
113
|
var FINISH_TIMEOUT_MS = 5 * 60 * 1e3;
|
|
111
114
|
var KERNEL_LOCK_FORMAT = "kernel-v1";
|
|
115
|
+
var LOCK_PORT_CANDIDATE_COUNT = 8;
|
|
116
|
+
var RESERVED_PORT_CODE = "EACCES";
|
|
117
|
+
var PORT_IN_USE_CODE = "EADDRINUSE";
|
|
118
|
+
var EXCLUDED_PORT_RANGES_COMMAND = ["int", "ipv4", "show", "excludedportrange", "protocol=tcp"];
|
|
119
|
+
var EXCLUDED_PORT_RANGES_TIMEOUT_MS = 5e3;
|
|
120
|
+
var windowsNetshPath = () => `${process.env.SystemRoot?.trim() || "C:\\Windows"}\\System32\\netsh.exe`;
|
|
112
121
|
var heldLocks = /* @__PURE__ */ new Map();
|
|
113
122
|
var PENDING_INSTALL_STALE_AFTER_MS = 60 * 6e4;
|
|
114
123
|
var PLATFORMS_WITH_PROCESS_TABLE = /* @__PURE__ */ new Set(["darwin", "linux"]);
|
|
@@ -116,7 +125,65 @@ var canonicalLockPath = (path) => {
|
|
|
116
125
|
mkdirSync(dirname(path), { recursive: true });
|
|
117
126
|
return join(realpathSync(dirname(path)), basename(path));
|
|
118
127
|
};
|
|
119
|
-
var
|
|
128
|
+
var hashedLockPort = (seed) => LOCK_PORT_START + createHash("sha256").update(seed).digest().readUInt32BE(0) % LOCK_PORT_COUNT;
|
|
129
|
+
var candidateSeed = (path, index) => index === 0 ? path : `${path}\0${index}`;
|
|
130
|
+
var upgradeLockPorts = (path) => [...new Set(Array.from({ length: LOCK_PORT_CANDIDATE_COUNT }, (_, index) => hashedLockPort(candidateSeed(path, index))))];
|
|
131
|
+
var errorCode = (error) => error instanceof Error && "code" in error && typeof error.code === "string" ? error.code : void 0;
|
|
132
|
+
var EXCLUDED_RANGE_ROW = /^\s*(\d+)\s+(\d+)(?:\s+\*)?\s*$/;
|
|
133
|
+
var EXCLUDED_RANGE_HEADER_RULE = /^\s*-+\s+-+\s*$/;
|
|
134
|
+
var parseExcludedPortRanges = (output) => {
|
|
135
|
+
const lines = output.split(/\r?\n/);
|
|
136
|
+
if (!lines.some((line) => EXCLUDED_RANGE_HEADER_RULE.test(line))) return void 0;
|
|
137
|
+
return lines.flatMap((line) => {
|
|
138
|
+
const row = EXCLUDED_RANGE_ROW.exec(line);
|
|
139
|
+
return row ? [{ start: Number(row[1]), end: Number(row[2]) }] : [];
|
|
140
|
+
});
|
|
141
|
+
};
|
|
142
|
+
var readExcludedPortRangesWithNetsh = () => {
|
|
143
|
+
const result = spawnSync(windowsNetshPath(), [...EXCLUDED_PORT_RANGES_COMMAND], { encoding: "utf8", timeout: EXCLUDED_PORT_RANGES_TIMEOUT_MS, windowsHide: true });
|
|
144
|
+
return result.status === 0 && typeof result.stdout === "string" ? result.stdout : void 0;
|
|
145
|
+
};
|
|
146
|
+
var listenExclusivelyOnLoopback = (port) => new Promise((resolve, reject) => {
|
|
147
|
+
const server = createServer(rejectConnection);
|
|
148
|
+
const failed = (error) => {
|
|
149
|
+
server.close();
|
|
150
|
+
reject(error);
|
|
151
|
+
};
|
|
152
|
+
server.once("error", failed);
|
|
153
|
+
server.listen({ host: LOCK_HOST, port, exclusive: true }, () => {
|
|
154
|
+
server.off("error", failed);
|
|
155
|
+
resolve(server);
|
|
156
|
+
});
|
|
157
|
+
});
|
|
158
|
+
var DEFAULT_PORT_ACCESS = {
|
|
159
|
+
listenOnLockPort: listenExclusivelyOnLoopback,
|
|
160
|
+
readExcludedPortRanges: readExcludedPortRangesWithNetsh
|
|
161
|
+
};
|
|
162
|
+
var portIsInRanges = (port, ranges) => ranges.some((range) => port >= range.start && port <= range.end);
|
|
163
|
+
var bindFirstUsableLockPort = async (path, platform, access) => {
|
|
164
|
+
const ports = upgradeLockPorts(path);
|
|
165
|
+
let excludedRanges;
|
|
166
|
+
let excludedRangesRead = false;
|
|
167
|
+
const windowsReserves = (port) => {
|
|
168
|
+
if (!excludedRangesRead) {
|
|
169
|
+
excludedRangesRead = true;
|
|
170
|
+
const output = access.readExcludedPortRanges();
|
|
171
|
+
excludedRanges = output === void 0 ? void 0 : parseExcludedPortRanges(output);
|
|
172
|
+
}
|
|
173
|
+
return excludedRanges !== void 0 && portIsInRanges(port, excludedRanges);
|
|
174
|
+
};
|
|
175
|
+
for (const port of ports) {
|
|
176
|
+
try {
|
|
177
|
+
return { kind: "bound", server: await access.listenOnLockPort(port) };
|
|
178
|
+
} catch (error) {
|
|
179
|
+
const code = errorCode(error);
|
|
180
|
+
if (code === PORT_IN_USE_CODE) return { kind: "in_use" };
|
|
181
|
+
if (platform !== "win32" || code !== RESERVED_PORT_CODE || !windowsReserves(port)) throw error;
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
return { kind: "every_port_reserved", ports };
|
|
185
|
+
};
|
|
186
|
+
var everyPortReservedReason = (ports) => `Windows reserves every loopback port the upgrade lock can use (${ports.join(", ")}). \`netsh int ipv4 show excludedportrange protocol=tcp\` lists the reserved ranges.`;
|
|
120
187
|
var readLockRecord = (path) => {
|
|
121
188
|
try {
|
|
122
189
|
const value = JSON.parse(readFileSync(path, "utf8"));
|
|
@@ -175,9 +242,6 @@ var pendingInstallReason = (pending, path) => {
|
|
|
175
242
|
return `${UNFINISHED_INSTALLATION}. To clear it, ${clearingSteps(path)}`;
|
|
176
243
|
}
|
|
177
244
|
};
|
|
178
|
-
var rejectConnection = (socket) => {
|
|
179
|
-
socket.destroy();
|
|
180
|
-
};
|
|
181
245
|
var inheritLock = (path) => new Promise((resolve) => {
|
|
182
246
|
const done = (claim) => {
|
|
183
247
|
clearTimeout(timer);
|
|
@@ -189,7 +253,7 @@ var inheritLock = (path) => new Promise((resolve) => {
|
|
|
189
253
|
const receive = (message, handle) => {
|
|
190
254
|
if (message !== LOCK_HANDLE || !(handle instanceof Server)) return;
|
|
191
255
|
const address = handle.address();
|
|
192
|
-
if (address === null || typeof address === "string" || address.port
|
|
256
|
+
if (address === null || typeof address === "string" || !upgradeLockPorts(path).includes(address.port) || address.address !== LOCK_HOST) {
|
|
193
257
|
handle.close();
|
|
194
258
|
done({ kind: "unavailable", reason: "Invalid inherited upgrade lock" });
|
|
195
259
|
return;
|
|
@@ -207,19 +271,17 @@ var inheritLock = (path) => new Promise((resolve) => {
|
|
|
207
271
|
if (error) disconnected();
|
|
208
272
|
});
|
|
209
273
|
});
|
|
210
|
-
var claimUpgradeLock = async (request = {}) => {
|
|
274
|
+
var claimUpgradeLock = async (request = {}, portAccess = DEFAULT_PORT_ACCESS) => {
|
|
211
275
|
let server;
|
|
212
276
|
try {
|
|
213
277
|
const path = canonicalLockPath(request.lockPath ?? autoUpdateLock());
|
|
214
278
|
const inheritedPath = process.env[INHERITED_LOCK_ENV];
|
|
215
279
|
delete process.env[INHERITED_LOCK_ENV];
|
|
216
280
|
if (inheritedPath === path && !heldLocks.has(path)) return await inheritLock(path);
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
listener.listen({ host: LOCK_HOST, port: lockPort(path), exclusive: true }, resolve);
|
|
222
|
-
});
|
|
281
|
+
const binding = await bindFirstUsableLockPort(path, request.platform ?? process.platform, portAccess);
|
|
282
|
+
if (binding.kind === "in_use") return { kind: "held", holderPid: readLockRecord(path).pid };
|
|
283
|
+
if (binding.kind === "every_port_reserved") return { kind: "unavailable", reason: everyPortReservedReason(binding.ports) };
|
|
284
|
+
server = binding.server;
|
|
223
285
|
const record = readLockRecord(path);
|
|
224
286
|
const isAlive = request.isAlive ?? isProcessAlive;
|
|
225
287
|
const pending = record.installationPending ? judgePendingInstall(path, record, request, isAlive) : ENDED;
|
|
@@ -236,9 +298,6 @@ var claimUpgradeLock = async (request = {}) => {
|
|
|
236
298
|
return { kind: "acquired" };
|
|
237
299
|
} catch (error) {
|
|
238
300
|
server?.close();
|
|
239
|
-
if (error instanceof Error && "code" in error && error.code === "EADDRINUSE") {
|
|
240
|
-
return { kind: "held", holderPid: readLockRecord(request.lockPath ?? autoUpdateLock()).pid };
|
|
241
|
-
}
|
|
242
301
|
return { kind: "unavailable", reason: npmErrorMessage(error) };
|
|
243
302
|
}
|
|
244
303
|
};
|
|
@@ -308,6 +367,8 @@ var installWithUpgradeLock = (request, lockPath = autoUpdateLock(), runNpm) => {
|
|
|
308
367
|
export {
|
|
309
368
|
PENDING_INSTALL_STALE_AFTER_MS,
|
|
310
369
|
canonicalLockPath,
|
|
370
|
+
upgradeLockPorts,
|
|
371
|
+
parseExcludedPortRanges,
|
|
311
372
|
claimUpgradeLock,
|
|
312
373
|
leftAnUnfinishedInstallHere,
|
|
313
374
|
ownsUpgradeLock,
|