pushary 1.9.235 → 1.9.237
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 +12 -0
- package/data/cursor-plugin/.cursor-plugin/plugin.json +1 -1
- package/data/cursor-plugin/CHANGELOG.md +4 -0
- package/data/cursor-plugin/scripts/redaction.mjs +2 -0
- package/data/openclaw-plugin/dist/redaction.js +2 -0
- package/data/vscode-plugin/.claude-plugin/plugin.json +1 -1
- package/data/vscode-plugin/CHANGELOG.md +4 -0
- package/data/vscode-plugin/scripts/redaction.mjs +2 -0
- package/dist/{api-UVFEVNJD.js → api-HJSGVYQY.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 +26 -26
- package/dist/bin/pushary-clean.js +39 -39
- package/dist/bin/pushary-codex-bridge.js +23 -23
- 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 +16 -0
- package/dist/bin/pushary-doctor.js +47 -47
- package/dist/bin/pushary-elicitation-hook.js +27 -27
- package/dist/bin/pushary-gemini-bridge.js +18 -18
- package/dist/bin/pushary-gemini-hook.js +31 -31
- package/dist/bin/pushary-hook.js +35 -35
- package/dist/bin/pushary-login.js +23 -23
- package/dist/bin/pushary-logout.js +31 -31
- 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 +22 -22
- 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 +555 -70
- 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 +17 -17
- package/dist/bin/pushary-transcripts.js +26 -26
- 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-7MRK2WXT.js → chunk-3BNYU7LA.js} +2 -2
- package/dist/{chunk-4UIVOCDT.js → chunk-3XEOKKCT.js} +1 -1
- package/dist/{chunk-WY2UKKLD.js → chunk-47UJLOWC.js} +1 -1
- package/dist/{chunk-DW7ZQX7L.js → chunk-4QFQH4DE.js} +1 -1
- package/dist/{chunk-NDXTGRZG.js → chunk-56ZVNO4C.js} +1 -1
- package/dist/{chunk-HPFGXE6Y.js → chunk-5V2X63OJ.js} +6 -6
- package/dist/{chunk-XGW4PJPO.js → chunk-5Y5FFPNI.js} +2 -2
- package/dist/{chunk-3C2XMGXE.js → chunk-66KEOAAB.js} +3 -3
- package/dist/{chunk-BBZ3BBZC.js → chunk-6SSWRXJ3.js} +4 -4
- package/dist/{chunk-XYRXKL3V.js → chunk-74Z7L2LQ.js} +1 -1
- package/dist/{chunk-MHZSIN5K.js → chunk-77FFXRKW.js} +3 -3
- package/dist/{chunk-JF4VX754.js → chunk-7BRTSKYT.js} +1 -1
- package/dist/{chunk-FKX7SWNT.js → chunk-7RMOKXHS.js} +7 -7
- package/dist/{chunk-7B2DHU32.js → chunk-A636SGRV.js} +16 -16
- package/dist/{chunk-LDX3KQMJ.js → chunk-BQS4RV3T.js} +2 -2
- package/dist/{chunk-3B5FQ542.js → chunk-BUFXSMY6.js} +2 -2
- package/dist/{chunk-X4G5G2ZN.js → chunk-BWYM4X2Z.js} +2 -2
- package/dist/{chunk-HI3LOBT5.js → chunk-BZ2LBE2K.js} +116 -49
- package/dist/{chunk-A2GO3G2I.js → chunk-CKBAQUE3.js} +6 -6
- package/dist/{chunk-E6IFBGZF.js → chunk-CLDEQACG.js} +2 -2
- package/dist/{chunk-MQSO2S3H.js → chunk-CWZCWIQT.js} +1 -1
- package/dist/{chunk-H5TBR4BB.js → chunk-DF6TLBHZ.js} +5 -5
- package/dist/{chunk-2QUYUFYQ.js → chunk-DFHMD7G7.js} +4 -4
- package/dist/{chunk-V7ULGI7U.js → chunk-DHU22BBS.js} +4 -4
- package/dist/{chunk-TAXOI6AK.js → chunk-DJ67SBPF.js} +4 -4
- package/dist/{chunk-DN6HPGCI.js → chunk-DK4BKL43.js} +5 -5
- package/dist/{chunk-Z7LAWFZ7.js → chunk-DZJ4WO7T.js} +1 -1
- package/dist/{chunk-52PIW2SN.js → chunk-E7RUE3HG.js} +3 -3
- package/dist/{chunk-OSDIFFSP.js → chunk-EFYTCLOR.js} +3 -3
- package/dist/{chunk-ZPQPTIIY.js → chunk-FMU5CMVS.js} +2 -2
- package/dist/{chunk-JPKOYDQJ.js → chunk-GEEQ5JLH.js} +6 -6
- package/dist/{chunk-WMCF6PR5.js → chunk-GM4YH5PP.js} +3 -3
- package/dist/{chunk-5QLIXOVT.js → chunk-HBB2B6YX.js} +1 -1
- package/dist/{chunk-KTJHZVCD.js → chunk-HMIFIDPC.js} +3 -3
- package/dist/{chunk-JYFMVOML.js → chunk-HSLZ2ZJI.js} +1 -1
- package/dist/{chunk-3QQY5USW.js → chunk-HYE5ARRS.js} +4 -4
- package/dist/{chunk-FMWG4X3D.js → chunk-I3OCBCNT.js} +5 -5
- package/dist/{chunk-7XCL66ON.js → chunk-I4RKTMEX.js} +2 -2
- package/dist/{chunk-TWACA7ER.js → chunk-IBIKEGDF.js} +9 -9
- package/dist/{chunk-WVJFHP75.js → chunk-ITDN4EH5.js} +1 -1
- package/dist/{chunk-JM6EAV42.js → chunk-JN23XJFF.js} +5 -5
- package/dist/{chunk-5DRTR5FC.js → chunk-JOQ4H6NH.js} +5 -5
- package/dist/{chunk-EINN22XV.js → chunk-JVAMUEHS.js} +2 -2
- package/dist/{chunk-TGM2WHUG.js → chunk-JWRCNFPM.js} +2 -2
- package/dist/{chunk-FZN7TKSM.js → chunk-JX5R7WCL.js} +1 -1
- package/dist/{chunk-G5OTSL26.js → chunk-KJ2WZOHD.js} +3 -3
- package/dist/{chunk-ICLT2KA5.js → chunk-KJJTE4HC.js} +1 -1
- package/dist/{chunk-GPD4BB76.js → chunk-LVSQJNUN.js} +1 -1
- package/dist/{chunk-UIBQDALO.js → chunk-M6CLKAF6.js} +3 -3
- package/dist/{chunk-GSB62GNT.js → chunk-MODLPJPU.js} +4 -4
- package/dist/{chunk-4CEGJAEB.js → chunk-MSTQIKS4.js} +176 -23
- package/dist/{chunk-HJSW3MH2.js → chunk-N3IM3JEH.js} +2 -2
- package/dist/{chunk-6H3RBEHP.js → chunk-NBTUSWX2.js} +1 -1
- package/dist/{chunk-OV2XD2UY.js → chunk-OOPL7BL2.js} +1 -1
- package/dist/{chunk-VPG6QENY.js → chunk-ORCSR77N.js} +10 -10
- package/dist/{chunk-URDT623B.js → chunk-OTRVJVKS.js} +1 -1
- package/dist/{chunk-4QQ3HXGR.js → chunk-PJHG34QL.js} +3 -3
- package/dist/{chunk-FEVQDABQ.js → chunk-PMJKR7WR.js} +2 -2
- package/dist/{chunk-CSXA4HMV.js → chunk-PNLG2FXX.js} +2 -2
- package/dist/{chunk-JFXYGMV5.js → chunk-Q43WP2LP.js} +4 -4
- package/dist/{chunk-ELP65DFC.js → chunk-Q6F3FM5A.js} +1 -1
- package/dist/{chunk-K6PBTBLO.js → chunk-Q6KONQHQ.js} +4 -4
- package/dist/{chunk-FCQ52N4E.js → chunk-QIWVSIK2.js} +8 -8
- package/dist/{chunk-ULDUDSTW.js → chunk-QXIDU6YJ.js} +33 -0
- package/dist/{chunk-JF3ONE4H.js → chunk-RZANH42A.js} +2 -2
- package/dist/{chunk-3K2S4OW7.js → chunk-T5WMBVKG.js} +7 -6
- package/dist/{chunk-LIYQSMYK.js → chunk-TOAPYOT6.js} +4 -4
- package/dist/{chunk-HDD23XYP.js → chunk-U7HEUEZQ.js} +11 -11
- package/dist/{chunk-RV5LIW3K.js → chunk-UEZLE5S5.js} +12 -12
- package/dist/{chunk-BJRPBKE7.js → chunk-UN7PMXBY.js} +4 -4
- package/dist/{chunk-TMN7LKDC.js → chunk-US4WGPDI.js} +7 -7
- package/dist/{chunk-V4ZQBKI6.js → chunk-USOOH77B.js} +1 -1
- package/dist/{chunk-MN6DXDJR.js → chunk-UX62CHEU.js} +6 -6
- package/dist/{chunk-G5EKU4RB.js → chunk-V2P2NUCI.js} +3 -3
- package/dist/{chunk-AA54OZM2.js → chunk-VC4EBXGF.js} +5 -5
- package/dist/{chunk-H4364HR3.js → chunk-VJTMLOV4.js} +5 -5
- package/dist/{chunk-M64A2Z2F.js → chunk-VO4VXPCH.js} +1 -1
- package/dist/{chunk-Q5SVRCFU.js → chunk-XIMXQ4OB.js} +1 -1
- package/dist/{chunk-SFIYMKWT.js → chunk-XKWYE3ZY.js} +5 -5
- package/dist/{chunk-Z5EWWGD2.js → chunk-XWL2QPIG.js} +5 -5
- package/dist/{chunk-FUJZW3R5.js → chunk-Z5SJDN5J.js} +1 -1
- package/dist/{codex-app-cards-switch-DBFQJU3Y.js → codex-app-cards-switch-FY5HJYZR.js} +11 -11
- package/dist/{codex-card-routing-TKG7LOP4.js → codex-card-routing-3TVI3V2W.js} +2 -2
- package/dist/{codex-desktop-launch-UXMYKS5C.js → codex-desktop-launch-OOSA2UHI.js} +3 -3
- package/dist/{codex-session-launch-5NOJKDWN.js → codex-session-launch-6BNQDMCH.js} +20 -20
- package/dist/{config-HHUSXJZE.js → config-WOG7M4P2.js} +3 -3
- package/dist/{global-upgrade-J2NB62DV.js → global-upgrade-QGWLB3XX.js} +9 -9
- package/dist/{identity-7O3ZBVUY.js → identity-DSZ5C7LA.js} +4 -4
- package/dist/{live-capabilities-773SVQWH.js → live-capabilities-ARZLZCZC.js} +4 -4
- package/dist/{paths-VZXMX35O.js → paths-6QS77FBA.js} +3 -3
- package/dist/{reapply-7MIBK2WB.js → reapply-TXPOSMJF.js} +34 -34
- package/dist/src/index.js +33 -33
- package/dist/{upgrade-lock-WWTTPOIZ.js → upgrade-lock-6777RDS5.js} +4 -4
- package/dist/{usage-PHTLHFL2.js → usage-4EOFN3X4.js} +3 -3
- package/package.json +1 -1
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
installedCodexApp,
|
|
10
10
|
readCodexAppRuntime,
|
|
11
11
|
shellQuoted
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-TOAPYOT6.js";
|
|
13
13
|
import {
|
|
14
14
|
CODEX_APP_LAUNCH_AT_LOGIN_VERB,
|
|
15
15
|
CODEX_APP_LAUNCH_VARIABLE
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
} from "./chunk-QCGNGEGE.js";
|
|
20
20
|
import {
|
|
21
21
|
xml
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-GEEQ5JLH.js";
|
|
23
23
|
import {
|
|
24
24
|
writeFileAtomic
|
|
25
25
|
} from "./chunk-PM2NRK6Y.js";
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
reachVerdict,
|
|
15
15
|
reachesYou,
|
|
16
16
|
verifyDelivery
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-UX62CHEU.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-JX5R7WCL.js";
|
|
33
33
|
import {
|
|
34
34
|
checkApiKey
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-KJ2WZOHD.js";
|
|
36
36
|
import {
|
|
37
37
|
reportedInstallSource
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-BWYM4X2Z.js";
|
|
39
39
|
import {
|
|
40
40
|
NPX_LATEST_COMMAND
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-3BNYU7LA.js";
|
|
42
42
|
import {
|
|
43
43
|
NO_PAIRING_COMPUTER,
|
|
44
44
|
PAIR_TTL_SECONDS
|
|
45
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-QXIDU6YJ.js";
|
|
46
46
|
|
|
47
47
|
// src/onboarding.ts
|
|
48
48
|
import qrcodeTerminal from "qrcode-terminal";
|
|
@@ -474,13 +474,26 @@ var pairWaitingLabel = (elapsedMs, minutesLeft) => {
|
|
|
474
474
|
var PAIR_GET_APP_LINE = "No app yet? Get it at pushary.com/download. Pairing keeps waiting.";
|
|
475
475
|
var PAIRING_ESCAPE_KEY_COMMAND = `${NPX_LATEST_COMMAND} setup --key pk_...`;
|
|
476
476
|
var PAIRING_ESCAPE_KEY_PAGE = "pushary.com/dashboard/agent/settings";
|
|
477
|
-
var
|
|
478
|
-
`${yellow("!")} No app yet? Get it at ${cyan(PUSHARY_APP_DOWNLOAD_URL)}, then run setup again.`,
|
|
479
|
-
"",
|
|
477
|
+
var keyEscapeLines = () => [
|
|
480
478
|
` ${dim("Already have a key? Use it instead:")}`,
|
|
481
479
|
` ${cyan(PAIRING_ESCAPE_KEY_COMMAND)}`,
|
|
482
480
|
` ${dim("Find it at")} ${cyan(PAIRING_ESCAPE_KEY_PAGE)}`
|
|
483
481
|
];
|
|
482
|
+
var describePairingEscape = () => [
|
|
483
|
+
`${yellow("!")} No app yet? Get it at ${cyan(PUSHARY_APP_DOWNLOAD_URL)}, then run setup again.`,
|
|
484
|
+
"",
|
|
485
|
+
...keyEscapeLines()
|
|
486
|
+
];
|
|
487
|
+
var describeSignInEscape = () => [
|
|
488
|
+
`${dim("Run")} ${cyan(`${NPX_LATEST_COMMAND} setup`)} ${dim("to sign in again.")}`,
|
|
489
|
+
"",
|
|
490
|
+
...keyEscapeLines()
|
|
491
|
+
];
|
|
492
|
+
var SIGN_IN_KEEP_RUNNING_LINES = [
|
|
493
|
+
"This command has to keep running until you sign in.",
|
|
494
|
+
"Run the same command again in the background, keep it running, and wait for it to finish."
|
|
495
|
+
];
|
|
496
|
+
var describeCancelledSignIn = (exitCode) => exitCode === EXIT_TERMINATED ? SIGN_IN_KEEP_RUNNING_LINES.map((line) => dim(line)) : describeSignInEscape();
|
|
484
497
|
var PAIRING_CANCELLED_LABEL = "Cancelled";
|
|
485
498
|
var PAIRING_STOPPED_LABEL = "Stopped before your phone approved. The pairing code was cancelled.";
|
|
486
499
|
var PAIRING_KEEP_RUNNING_LINES = [
|
|
@@ -599,6 +612,45 @@ var PAIR_TIMEOUT_MINUTES = Math.ceil(PAIR_TIMEOUT_MS / 6e4);
|
|
|
599
612
|
var PAIRING_KEEPS_RUNNING_NOTICE = `This keeps running until your phone approves, for up to ${PAIR_TIMEOUT_MINUTES} minutes. Run it in the background and keep it running.`;
|
|
600
613
|
var heldUntilTheSignalExits = () => new Promise(() => {
|
|
601
614
|
});
|
|
615
|
+
var pollAppPairing = async (options) => {
|
|
616
|
+
let consecutiveFailures = 0;
|
|
617
|
+
while (options.clock.now() < options.deadline) {
|
|
618
|
+
if (options.stopped()) return { kind: "stopped" };
|
|
619
|
+
options.beforeEachPoll?.();
|
|
620
|
+
const claim = await claimPairing(options.pairId);
|
|
621
|
+
if (options.stopped()) return { kind: "stopped" };
|
|
622
|
+
if (claim === null) {
|
|
623
|
+
consecutiveFailures += 1;
|
|
624
|
+
if (consecutiveFailures >= PAIR_MAX_CONSECUTIVE_FAILURES) return { kind: "unreachable" };
|
|
625
|
+
await options.clock.sleep(PAIR_POLL_INTERVAL_MS);
|
|
626
|
+
continue;
|
|
627
|
+
}
|
|
628
|
+
consecutiveFailures = 0;
|
|
629
|
+
if (claim?.status === "authorized") {
|
|
630
|
+
let apiKey;
|
|
631
|
+
try {
|
|
632
|
+
apiKey = openSealedKey(claim.sealed, options.keypair);
|
|
633
|
+
} catch {
|
|
634
|
+
return { kind: "decrypt" };
|
|
635
|
+
}
|
|
636
|
+
await ackPairing(options.pairId);
|
|
637
|
+
return { kind: "paired", apiKey, handle: claim.siteSlug };
|
|
638
|
+
}
|
|
639
|
+
if (claim?.status === "expired") return { kind: "expired" };
|
|
640
|
+
if (claim?.status === "failed") return { kind: "failed", reason: claim.reason };
|
|
641
|
+
await options.clock.sleep(PAIR_POLL_INTERVAL_MS);
|
|
642
|
+
}
|
|
643
|
+
return { kind: "timeout" };
|
|
644
|
+
};
|
|
645
|
+
var keyLeftInPairing = async (pairId, keypair) => {
|
|
646
|
+
const claim = await claimPairing(pairId);
|
|
647
|
+
if (claim?.status !== "authorized") return null;
|
|
648
|
+
try {
|
|
649
|
+
return openSealedKey(claim.sealed, keypair);
|
|
650
|
+
} catch {
|
|
651
|
+
return null;
|
|
652
|
+
}
|
|
653
|
+
};
|
|
602
654
|
var connectViaAppPairing = async (options) => {
|
|
603
655
|
const clock = options.clock ?? SYSTEM_PAIR_CLOCK;
|
|
604
656
|
const keypair = generateKeypair();
|
|
@@ -650,50 +702,40 @@ var connectViaAppPairing = async (options) => {
|
|
|
650
702
|
};
|
|
651
703
|
const stop = startSpinner(() => advisesInTheLabel ? pairWaitingLabel(elapsed(), minutesLeft()) : pairCountdownLabel(elapsed(), minutesLeft()));
|
|
652
704
|
stopSpinner = stop;
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
}
|
|
666
|
-
await
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
apiKey = openSealedKey(claim.sealed, keypair);
|
|
674
|
-
} catch {
|
|
675
|
-
stop(yellow("!"), `Pairing failed to decrypt. Re-run ${rerun} to try again.`);
|
|
676
|
-
await cancelPairing(pairId);
|
|
677
|
-
return unlessSignalled(pairFailed("decrypt"));
|
|
678
|
-
}
|
|
679
|
-
await ackPairing(pairId);
|
|
705
|
+
const polled = await pollAppPairing({
|
|
706
|
+
pairId,
|
|
707
|
+
keypair,
|
|
708
|
+
deadline,
|
|
709
|
+
clock,
|
|
710
|
+
stopped: () => cancelled,
|
|
711
|
+
beforeEachPoll: advisesInTheLabel ? void 0 : writeAdviceThatFellDue
|
|
712
|
+
});
|
|
713
|
+
switch (polled.kind) {
|
|
714
|
+
case "stopped":
|
|
715
|
+
return heldUntilTheSignalExits();
|
|
716
|
+
case "unreachable":
|
|
717
|
+
stop(yellow("!"), `Can't reach pushary.com to finish pairing. Check your connection, then run ${rerun} again.`);
|
|
718
|
+
await cancelPairing(pairId);
|
|
719
|
+
return unlessSignalled(pairFailed("unreachable"));
|
|
720
|
+
case "decrypt":
|
|
721
|
+
stop(yellow("!"), `Pairing failed to decrypt. Re-run ${rerun} to try again.`);
|
|
722
|
+
await cancelPairing(pairId);
|
|
723
|
+
return unlessSignalled(pairFailed("decrypt"));
|
|
724
|
+
case "paired":
|
|
680
725
|
if (cancelled) return heldUntilTheSignalExits();
|
|
681
726
|
stop(check, "App connected");
|
|
682
|
-
return { kind: "paired", apiKey, handle:
|
|
683
|
-
|
|
684
|
-
if (claim?.status === "expired") {
|
|
727
|
+
return { kind: "paired", apiKey: polled.apiKey, handle: polled.handle };
|
|
728
|
+
case "expired":
|
|
685
729
|
stop(yellow("!"), `Pairing expired. Re-run ${rerun} to try again.`);
|
|
686
730
|
return pairFailed("expired");
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
stop(yellow("!"), describePairFailure(claim.reason, options.command));
|
|
731
|
+
case "failed":
|
|
732
|
+
stop(yellow("!"), describePairFailure(polled.reason, options.command));
|
|
690
733
|
return pairFailed("rejected");
|
|
691
|
-
|
|
692
|
-
|
|
734
|
+
case "timeout":
|
|
735
|
+
stop(yellow("!"), "Timed out waiting for the app");
|
|
736
|
+
await cancelPairing(pairId);
|
|
737
|
+
return unlessSignalled(pairFailed("timeout"));
|
|
693
738
|
}
|
|
694
|
-
stop(yellow("!"), "Timed out waiting for the app");
|
|
695
|
-
await cancelPairing(pairId);
|
|
696
|
-
return unlessSignalled(pairFailed("timeout"));
|
|
697
739
|
} catch (err) {
|
|
698
740
|
finishWaitLine(yellow("!"), `Pairing error ${dim(`(${err instanceof Error ? err.message : "network"})`)}`);
|
|
699
741
|
await cancelPairing(pairId);
|
|
@@ -728,6 +770,8 @@ var watchSkip = (listener) => {
|
|
|
728
770
|
};
|
|
729
771
|
var PHONE_WAIT_REPAIR_LINE = `Open the Pushary app, sign in with the same account, and allow notifications. Then run ${NPX_LATEST_COMMAND} doctor --roundtrip. Your agent configuration is saved; no reinstall is needed.`;
|
|
730
772
|
var phoneWaitRepair = (verdict) => verdict.kind === "nobody" ? [PHONE_WAIT_REPAIR_LINE] : describeAppRepair(verdict) ?? [];
|
|
773
|
+
var PHONE_WAIT_SKIPPED = "skipped_at_the_terminal";
|
|
774
|
+
var phoneWaitWasSkipped = (phone) => phone?.detail === PHONE_WAIT_SKIPPED;
|
|
731
775
|
var pollForYourPhone = async (apiKey, firstSeen, options) => {
|
|
732
776
|
const clock = options.clock ?? SYSTEM_PAIR_CLOCK;
|
|
733
777
|
const deadline = clock.now() + PHONE_WAIT_TIMEOUT_MS;
|
|
@@ -755,7 +799,11 @@ var pollForYourPhone = async (apiKey, firstSeen, options) => {
|
|
|
755
799
|
}
|
|
756
800
|
await Promise.race([clock.sleep(CONNECT_POLL_INTERVAL_MS), skip.woken]);
|
|
757
801
|
}
|
|
758
|
-
|
|
802
|
+
if (skip.skipped()) {
|
|
803
|
+
stop(yellow("!"), "Skipped the phone check");
|
|
804
|
+
return { kind: "skipped" };
|
|
805
|
+
}
|
|
806
|
+
stop(yellow("!"), "No phone connected yet");
|
|
759
807
|
return { kind: "not_yet", lastSeen };
|
|
760
808
|
} finally {
|
|
761
809
|
skip.stop();
|
|
@@ -769,11 +817,13 @@ var waitForYourPhone = async (apiKey, options = {}) => {
|
|
|
769
817
|
return sendAndConfirm(apiKey, probe.status);
|
|
770
818
|
}
|
|
771
819
|
console.log();
|
|
772
|
-
|
|
820
|
+
if (options.intro) await options.intro();
|
|
821
|
+
else for (const line of describePhoneWait(options.skip !== void 0)) console.log(` ${line}`);
|
|
773
822
|
console.log();
|
|
774
823
|
const waited = await pollForYourPhone(apiKey, probe.status, options);
|
|
775
824
|
if (waited.kind === "connected") return sendAndConfirm(apiKey, waited.channels);
|
|
776
825
|
if (waited.kind === "unauthorized" || waited.kind === "locked") return describeProbeFailure(waited);
|
|
826
|
+
if (waited.kind === "skipped") return phoneFailure(PHONE_WAIT_SKIPPED);
|
|
777
827
|
const repair = phoneWaitRepair(reachVerdict(waited.lastSeen));
|
|
778
828
|
for (const line of repair) console.log(` ${dim(line)}`);
|
|
779
829
|
return phoneFailure("no_device", repair);
|
|
@@ -855,7 +905,11 @@ var pairAppWithThisComputer = async (apiKey, options) => {
|
|
|
855
905
|
};
|
|
856
906
|
|
|
857
907
|
export {
|
|
908
|
+
EXIT_ABORTED,
|
|
909
|
+
EXIT_TERMINATED,
|
|
858
910
|
fetchChannels,
|
|
911
|
+
writeStatusLine,
|
|
912
|
+
printQr,
|
|
859
913
|
canShowPairingQr,
|
|
860
914
|
connectDevice,
|
|
861
915
|
confirmAppConnection,
|
|
@@ -863,12 +917,25 @@ export {
|
|
|
863
917
|
pairingAgainHelps,
|
|
864
918
|
checkPhoneWithoutPairing,
|
|
865
919
|
printConnectInstructions,
|
|
920
|
+
PAIR_TIMEOUT_MS,
|
|
866
921
|
describePairingEscape,
|
|
922
|
+
describeSignInEscape,
|
|
923
|
+
describeCancelledSignIn,
|
|
867
924
|
describePairCommandEscape,
|
|
868
925
|
describeCancelledPairing,
|
|
926
|
+
SYSTEM_PAIR_CLOCK,
|
|
927
|
+
startPairing,
|
|
928
|
+
describePairFailure,
|
|
929
|
+
cancelPairing,
|
|
869
930
|
pairingEscapeApplies,
|
|
931
|
+
buildPairLinks,
|
|
932
|
+
heldUntilTheSignalExits,
|
|
933
|
+
pollAppPairing,
|
|
934
|
+
keyLeftInPairing,
|
|
870
935
|
connectViaAppPairing,
|
|
871
936
|
PHONE_WAIT_SKIP_KEY,
|
|
937
|
+
PHONE_WAIT_SKIP_LINE,
|
|
938
|
+
phoneWaitWasSkipped,
|
|
872
939
|
waitForYourPhone,
|
|
873
940
|
pairAppWithThisComputer
|
|
874
941
|
};
|
|
@@ -8,21 +8,21 @@ import {
|
|
|
8
8
|
SubscriptionRequiredError,
|
|
9
9
|
callMcpTool,
|
|
10
10
|
isRetryable
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-VJTMLOV4.js";
|
|
12
12
|
import {
|
|
13
13
|
fetchAsCredential
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-56ZVNO4C.js";
|
|
15
15
|
import {
|
|
16
16
|
installNetworkDefaults,
|
|
17
17
|
isNetworkFailure
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-EFYTCLOR.js";
|
|
19
19
|
import {
|
|
20
20
|
clientReportClaims
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-PMJKR7WR.js";
|
|
22
22
|
import {
|
|
23
23
|
getApiKey,
|
|
24
24
|
getBaseUrl
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-5Y5FFPNI.js";
|
|
26
26
|
import {
|
|
27
27
|
ASK_AGENT_NAME_MAX,
|
|
28
28
|
CLIENT_REPORT_PATH,
|
|
@@ -38,7 +38,7 @@ import {
|
|
|
38
38
|
isRecord,
|
|
39
39
|
truncateLine,
|
|
40
40
|
waitEndAnswered
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-QXIDU6YJ.js";
|
|
42
42
|
|
|
43
43
|
// src/api.ts
|
|
44
44
|
import { randomUUID } from "crypto";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
autoUpdateLock
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-PMJKR7WR.js";
|
|
4
4
|
import {
|
|
5
5
|
installPackageGlobally,
|
|
6
6
|
npmErrorMessage,
|
|
7
7
|
throwIfNpmRefusesInstall
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-Q43WP2LP.js";
|
|
9
9
|
import {
|
|
10
10
|
writeJsonAtomic
|
|
11
11
|
} from "./chunk-PM2NRK6Y.js";
|
|
@@ -5,13 +5,13 @@ import {
|
|
|
5
5
|
} from "./chunk-OYIN77HO.js";
|
|
6
6
|
import {
|
|
7
7
|
readMacAppAgentKey
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-6SSWRXJ3.js";
|
|
9
9
|
import {
|
|
10
10
|
API_KEYS_PATH
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-FMU5CMVS.js";
|
|
12
12
|
import {
|
|
13
13
|
absoluteUrl
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-KJ2WZOHD.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-GM4YH5PP.js";
|
|
25
25
|
import {
|
|
26
26
|
isValidApiKey
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-QXIDU6YJ.js";
|
|
28
28
|
|
|
29
29
|
// src/cli/held-key-revocation.ts
|
|
30
30
|
var readCliHeldKeys = (profiles) => {
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
uninstallOpenClawPlugin,
|
|
14
14
|
unsetOpenClawEntry,
|
|
15
15
|
writeOpenClawEntry
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-PJHG34QL.js";
|
|
17
17
|
import {
|
|
18
18
|
needsShell
|
|
19
19
|
} from "./chunk-3PSNUHC5.js";
|
|
@@ -25,10 +25,10 @@ import {
|
|
|
25
25
|
openClawDirectoriesToLookIn,
|
|
26
26
|
openClawPluginFolder,
|
|
27
27
|
openClawSetupReceiptDirectory
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-PMJKR7WR.js";
|
|
29
29
|
import {
|
|
30
30
|
resolvePathBinary
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-Q43WP2LP.js";
|
|
32
32
|
import {
|
|
33
33
|
readJsonSafe,
|
|
34
34
|
writeJsonAtomic
|
|
@@ -39,7 +39,7 @@ import {
|
|
|
39
39
|
} from "./chunk-CXQWDQCJ.js";
|
|
40
40
|
import {
|
|
41
41
|
isRecord
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-QXIDU6YJ.js";
|
|
43
43
|
|
|
44
44
|
// src/hermes/plugin-payload.ts
|
|
45
45
|
import { createHash } from "crypto";
|
|
@@ -4,21 +4,21 @@ import {
|
|
|
4
4
|
claimThrottle,
|
|
5
5
|
releaseThrottle,
|
|
6
6
|
reportEvent
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-U7HEUEZQ.js";
|
|
8
8
|
import {
|
|
9
9
|
deriveToolTarget,
|
|
10
10
|
permissionDeniedAction
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-ITDN4EH5.js";
|
|
12
12
|
import {
|
|
13
13
|
projectNameFor
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-3XEOKKCT.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-QXIDU6YJ.js";
|
|
22
22
|
|
|
23
23
|
// src/machine-decision-audit.ts
|
|
24
24
|
var MACHINE_DECISION_REPORT_TIMEOUT_MS = 800;
|
|
@@ -4,16 +4,16 @@ import {
|
|
|
4
4
|
} from "./chunk-WHB622LP.js";
|
|
5
5
|
import {
|
|
6
6
|
keyPrefix
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-GM4YH5PP.js";
|
|
8
8
|
import {
|
|
9
9
|
keyPrefixToShow
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-5Y5FFPNI.js";
|
|
11
11
|
import {
|
|
12
12
|
NPX_LATEST_COMMAND
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-3BNYU7LA.js";
|
|
14
14
|
import {
|
|
15
15
|
isValidApiKey
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-QXIDU6YJ.js";
|
|
17
17
|
|
|
18
18
|
// src/setup/key-account.ts
|
|
19
19
|
var isKeyHeldByMacApp = (key, holder) => holder.macAppInstalled && holder.macAppKey === key;
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import {
|
|
2
2
|
cursorGateOwnsClaudeCall,
|
|
3
3
|
readCursorGateRegistration
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-M6CLKAF6.js";
|
|
5
5
|
import {
|
|
6
6
|
registerTranscript
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-ORCSR77N.js";
|
|
8
8
|
import {
|
|
9
9
|
namedEvent
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-I3OCBCNT.js";
|
|
11
11
|
import {
|
|
12
12
|
writeDegraded
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-CKBAQUE3.js";
|
|
14
14
|
import {
|
|
15
15
|
claudeShapedHookInput,
|
|
16
16
|
hookCompatibleProfileBySource,
|
|
17
17
|
isGrokHookPayload,
|
|
18
18
|
isGrokSessionEndStop
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-QXIDU6YJ.js";
|
|
20
20
|
|
|
21
21
|
// src/tool-hook-input.ts
|
|
22
22
|
var OPTIONAL_TEXT_FIELDS = ["hook_event_name", "session_id", "cwd", "transcript_path", "tool_use_id", "permission_mode", "cursor_version"];
|
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
} from "./chunk-P6DUWKAO.js";
|
|
5
5
|
import {
|
|
6
6
|
fetchAsCredential
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-56ZVNO4C.js";
|
|
8
8
|
import {
|
|
9
9
|
getBaseUrl
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-5Y5FFPNI.js";
|
|
11
11
|
import {
|
|
12
12
|
writeJsonAtomicDurable
|
|
13
13
|
} from "./chunk-PM2NRK6Y.js";
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
compressTranscriptRecord,
|
|
16
16
|
redactSecretsFromContent,
|
|
17
17
|
transcriptRecordPlaintext
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-QXIDU6YJ.js";
|
|
19
19
|
|
|
20
20
|
// src/transcript-recipient-pin.ts
|
|
21
21
|
import { createHash } from "crypto";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
readExistingMachineId
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-OOPL7BL2.js";
|
|
4
4
|
import {
|
|
5
5
|
getBaseUrl
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-5Y5FFPNI.js";
|
|
7
7
|
import {
|
|
8
8
|
NetworkError
|
|
9
9
|
} from "./chunk-CINBAX5G.js";
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
import {
|
|
14
14
|
clientContextHeaders,
|
|
15
15
|
redactSecretsFromContent
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-QXIDU6YJ.js";
|
|
17
17
|
|
|
18
18
|
// src/cli/net.ts
|
|
19
19
|
import { createRequire } from "module";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
absoluteUrl
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-KJ2WZOHD.js";
|
|
4
4
|
import {
|
|
5
5
|
KEY_SCOPE
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-QXIDU6YJ.js";
|
|
7
7
|
|
|
8
8
|
// src/cli/approval-settings-pages.ts
|
|
9
9
|
var API_KEYS_PATH = "/dashboard/agent/settings";
|
|
@@ -4,20 +4,20 @@ import {
|
|
|
4
4
|
} from "./chunk-3PSNUHC5.js";
|
|
5
5
|
import {
|
|
6
6
|
getMachineId
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-OOPL7BL2.js";
|
|
8
8
|
import {
|
|
9
9
|
readControlMode
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-GM4YH5PP.js";
|
|
11
11
|
import {
|
|
12
12
|
pusharyDir
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-PMJKR7WR.js";
|
|
14
14
|
import {
|
|
15
15
|
resolveGlobalBinary,
|
|
16
16
|
withoutNpmInstallConsent
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-Q43WP2LP.js";
|
|
18
18
|
import {
|
|
19
19
|
getApiKey
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-5Y5FFPNI.js";
|
|
21
21
|
import {
|
|
22
22
|
readJsonSafe,
|
|
23
23
|
writeFileAtomic,
|
|
@@ -33,7 +33,7 @@ import {
|
|
|
33
33
|
} from "./chunk-CXQWDQCJ.js";
|
|
34
34
|
import {
|
|
35
35
|
isRecord
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-QXIDU6YJ.js";
|
|
37
37
|
|
|
38
38
|
// src/daemon-entry-guard.ts
|
|
39
39
|
import { mkdirSync, readFileSync } from "fs";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
resolveInstallSourceFor
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-BWYM4X2Z.js";
|
|
4
4
|
import {
|
|
5
5
|
apiKeyInForce,
|
|
6
6
|
configFilePath,
|
|
7
7
|
keyPrefixToShow
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-5Y5FFPNI.js";
|
|
9
9
|
import {
|
|
10
10
|
backupFile,
|
|
11
11
|
backupFileInto,
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
API_KEY_PREFIX_PATTERN,
|
|
18
18
|
isRecord,
|
|
19
19
|
isValidApiKey
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-QXIDU6YJ.js";
|
|
21
21
|
|
|
22
22
|
// src/shell-alias.ts
|
|
23
23
|
import { homedir } from "os";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
serviceNodeFor
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-GEEQ5JLH.js";
|
|
4
4
|
import {
|
|
5
5
|
OWNER_ONLY_FILE_MODE,
|
|
6
6
|
readOwnerOnlyJson
|
|
@@ -14,14 +14,14 @@ import {
|
|
|
14
14
|
codexHome,
|
|
15
15
|
codexHooksJsonIn,
|
|
16
16
|
isPusharyCodexCommand
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-PMJKR7WR.js";
|
|
18
18
|
import {
|
|
19
19
|
DEFAULT_WINDOWS_PATHEXT,
|
|
20
20
|
DIRECTLY_STARTABLE_EXTENSIONS,
|
|
21
21
|
plannedGlobalPackage,
|
|
22
22
|
readGlobalPrefix,
|
|
23
23
|
resolvePathBinary
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-Q43WP2LP.js";
|
|
25
25
|
import {
|
|
26
26
|
getPackageVersion,
|
|
27
27
|
globalTranscriptRegisterEntry
|