pushary 1.9.234 → 1.9.236
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 +20 -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-M67GCEPF.js → api-ZRAS6XVR.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 +9 -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 +634 -118
- 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-VNEKDZRS.js → chunk-2H63TCPL.js} +8 -8
- package/dist/{chunk-T6KURDWS.js → chunk-2MB3FZAJ.js} +2 -2
- package/dist/{chunk-WMELBTKZ.js → chunk-35IY2SPK.js} +3 -3
- package/dist/{chunk-ADMVVNW2.js → chunk-37RAJAPB.js} +1 -1
- package/dist/{chunk-XW7UUCSM.js → chunk-3SEH5JU3.js} +6 -6
- package/dist/{chunk-U6HLDWKF.js → chunk-3W7UZY2B.js} +4 -4
- package/dist/{chunk-RGJ6YCGT.js → chunk-4CUOYT5O.js} +3 -3
- package/dist/{chunk-NDPIHRLT.js → chunk-4OHGEWKF.js} +5 -5
- package/dist/{chunk-2JM3H72Y.js → chunk-4OLECRWP.js} +1 -1
- package/dist/{chunk-TZDZ3QGG.js → chunk-5JRALQKT.js} +3 -3
- package/dist/{chunk-AS326WXH.js → chunk-5PWGMOHP.js} +115 -49
- package/dist/{chunk-4JJDUPF5.js → chunk-6LF7EQIZ.js} +7 -7
- package/dist/{chunk-ZGQCZKNY.js → chunk-74MBT2PL.js} +2 -2
- package/dist/{chunk-6XKHPCFW.js → chunk-7HKBGKLY.js} +2 -2
- package/dist/{chunk-KKVTBTX5.js → chunk-7TGJ6FPW.js} +5 -5
- package/dist/{chunk-YUBMSPWE.js → chunk-ABQRDSE5.js} +12 -34
- package/dist/{chunk-5ZTBYRTQ.js → chunk-B6GCLODI.js} +1 -1
- package/dist/{chunk-GRWWQNKA.js → chunk-BX3VDXXW.js} +3 -3
- package/dist/{chunk-DXB3WZQH.js → chunk-CFIZWE37.js} +1 -1
- package/dist/{chunk-7O766ACL.js → chunk-CG2YLNCB.js} +1 -1
- package/dist/{chunk-KAHKKD4R.js → chunk-D6O4XDS5.js} +2 -2
- package/dist/{chunk-BBPSHOSK.js → chunk-DEZKBMHO.js} +4 -4
- package/dist/{chunk-6RMGY4KP.js → chunk-DKFM2NSF.js} +4 -4
- package/dist/{chunk-EKCCDM3D.js → chunk-EZ4QXQNX.js} +5 -5
- package/dist/{chunk-746XV434.js → chunk-FIIRS53K.js} +3 -3
- package/dist/{chunk-OVM54QWV.js → chunk-GNCOGELX.js} +4 -3
- package/dist/{chunk-E7QTBSY2.js → chunk-GQGV7H6W.js} +2 -2
- package/dist/{chunk-2X7O2QE3.js → chunk-GS2SPPBB.js} +3 -3
- package/dist/{chunk-OI5PIRYC.js → chunk-HAZ72WZD.js} +16 -16
- package/dist/{chunk-EA6DCQMW.js → chunk-HB4BB66C.js} +6 -6
- package/dist/{chunk-MNVPOPER.js → chunk-HR7UASHX.js} +2 -2
- package/dist/{chunk-WOH6BCX7.js → chunk-HTDRJMP5.js} +4 -4
- package/dist/{chunk-J3LMHXHV.js → chunk-HY27YNME.js} +1 -1
- package/dist/{chunk-N5FLIE3B.js → chunk-J2JGO6SS.js} +1 -1
- package/dist/{chunk-Q3LFQVDS.js → chunk-J65WHWPK.js} +1 -1
- package/dist/{chunk-E4XS75YY.js → chunk-JZ272QIY.js} +1 -1
- package/dist/{chunk-256X3DP6.js → chunk-KVGQYML5.js} +2 -2
- package/dist/{chunk-BWGJWF7M.js → chunk-LZYSSSF3.js} +10 -10
- package/dist/{chunk-FQNL4HE7.js → chunk-M45REXUU.js} +4 -4
- package/dist/{chunk-A4QB2DOJ.js → chunk-NEQMXQZQ.js} +2 -2
- package/dist/{chunk-6MKKNXW6.js → chunk-NH4HBX7J.js} +1 -1
- package/dist/{chunk-NHKJDBKZ.js → chunk-NSUIUOE7.js} +1 -1
- package/dist/{chunk-AJCFOXEE.js → chunk-NVJQHRM3.js} +9 -9
- package/dist/{chunk-DECR2ASU.js → chunk-O3UOI6ML.js} +5 -5
- package/dist/{chunk-3ABPJTSC.js → chunk-OGFKB66L.js} +1 -1
- package/dist/{chunk-R3VB6IWK.js → chunk-OHMC3ZFE.js} +4 -4
- package/dist/{chunk-VWELQENE.js → chunk-OSRHNYI6.js} +1 -1
- package/dist/{chunk-FHMZFJJI.js → chunk-P3JLLHOO.js} +3 -3
- package/dist/{chunk-3JIMXIO5.js → chunk-P4ZXHSJX.js} +1 -1
- package/dist/{chunk-PIEQTKMS.js → chunk-PDIDI2JS.js} +6 -6
- package/dist/{chunk-WC4WLJ6L.js → chunk-QFP4D7BE.js} +1 -1
- package/dist/{chunk-PIEQVLWA.js → chunk-QKX4J66I.js} +6 -6
- package/dist/{chunk-V7DKNNN3.js → chunk-QNM5EW76.js} +5 -5
- package/dist/{chunk-A3V2JCN3.js → chunk-RHML34U3.js} +5 -5
- package/dist/{chunk-HXYZSB4U.js → chunk-RXFLVAIV.js} +3 -2
- package/dist/{chunk-BEEJ3QJP.js → chunk-SPGDOHHJ.js} +2 -2
- package/dist/{chunk-3FW2QYX2.js → chunk-SU3M242B.js} +11 -11
- package/dist/{chunk-HEOH4JH3.js → chunk-T5OA2WR7.js} +5 -5
- package/dist/{chunk-LT2X6GMR.js → chunk-TBHZAZPR.js} +3 -3
- package/dist/{chunk-DXLNLE7C.js → chunk-TJJEYS3S.js} +4 -4
- package/dist/{chunk-Z6VYPLVI.js → chunk-TKTZBQIL.js} +5 -5
- package/dist/{chunk-QU6OSEUV.js → chunk-U33VHYHK.js} +26 -0
- package/dist/{chunk-MCJGCJUQ.js → chunk-UBPTE3MH.js} +1 -1
- package/dist/{chunk-ZHPK2JGH.js → chunk-UKHFRW5M.js} +2 -2
- package/dist/{chunk-JMHS55ZS.js → chunk-UODLZ2D6.js} +3 -3
- package/dist/{chunk-JD67C7KL.js → chunk-UY6AOWQU.js} +162 -21
- package/dist/{chunk-2BSSRM5U.js → chunk-VQXWLHLD.js} +1 -1
- package/dist/{chunk-7KIEBY2I.js → chunk-VRV7MD3W.js} +1 -1
- package/dist/{chunk-VTCM3LRD.js → chunk-VSNFCUGH.js} +3 -3
- package/dist/{chunk-IPVZPZBT.js → chunk-W4F6RVN5.js} +5 -5
- package/dist/{chunk-BM4WXLS6.js → chunk-WFUWUWCT.js} +2 -2
- package/dist/{chunk-KNM3GFV5.js → chunk-X3SEEC4X.js} +7 -7
- package/dist/{chunk-ZATM23SV.js → chunk-XEXFRZS7.js} +1 -1
- package/dist/{chunk-IAUCVHGV.js → chunk-XX3Z4KQL.js} +1 -1
- package/dist/{chunk-J6CSPMZF.js → chunk-XYOB4W72.js} +4 -4
- package/dist/{chunk-E43Q5IZQ.js → chunk-Y4GEE5VA.js} +12 -12
- package/dist/{chunk-G6Y63AZ2.js → chunk-YKTCIWKY.js} +2 -2
- package/dist/{chunk-WXSWR2FG.js → chunk-Z3XPHDVP.js} +4 -4
- package/dist/{chunk-JCRH5R45.js → chunk-ZAKG5GGJ.js} +12 -4
- package/dist/{chunk-JO7YECNL.js → chunk-ZQ5NCJVO.js} +1 -1
- package/dist/{chunk-IX2DIIR5.js → chunk-ZT4PSGTB.js} +2 -2
- package/dist/{codex-app-cards-switch-FCF22YK6.js → codex-app-cards-switch-CEWQAZD2.js} +11 -11
- package/dist/{codex-card-routing-33FTWY2U.js → codex-card-routing-VRLWXQ4Z.js} +2 -2
- package/dist/{codex-desktop-launch-CMMBCQDF.js → codex-desktop-launch-EU5BXQFP.js} +3 -3
- package/dist/{codex-session-launch-VW4737L5.js → codex-session-launch-7PSWFAOC.js} +20 -20
- package/dist/{config-GPO476YL.js → config-UQOFNS26.js} +3 -3
- package/dist/{global-upgrade-6DOQCXZJ.js → global-upgrade-WO2MIUOJ.js} +9 -9
- package/dist/{identity-4OD6GQPB.js → identity-7UK4G6K7.js} +4 -4
- package/dist/{live-capabilities-X6O5HJCK.js → live-capabilities-HRJBL4FO.js} +4 -4
- package/dist/{paths-LYVFVRQM.js → paths-2FPNRZAX.js} +3 -3
- package/dist/{reapply-GKXG74LO.js → reapply-GH4LWS25.js} +34 -34
- package/dist/src/index.js +33 -33
- package/dist/{upgrade-lock-LZIWY4Q6.js → upgrade-lock-CA25EHHB.js} +4 -4
- package/dist/{usage-RN5ED6TT.js → usage-23UD3UL7.js} +3 -3
- package/package.json +1 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
questionWindowOf
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-SU3M242B.js";
|
|
4
4
|
import {
|
|
5
5
|
UNNAMED_ACTION
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-NSUIUOE7.js";
|
|
7
7
|
import {
|
|
8
8
|
ASK_USER_TIMEOUT_MS,
|
|
9
9
|
WAIT_END_TIMEOUT_MS,
|
|
@@ -12,10 +12,10 @@ import {
|
|
|
12
12
|
isLocalQuestionHandoff,
|
|
13
13
|
unavailableQuestionUnlessRefused,
|
|
14
14
|
waitForQuestion
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-HB4BB66C.js";
|
|
16
16
|
import {
|
|
17
17
|
getMachineId
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-HY27YNME.js";
|
|
19
19
|
import {
|
|
20
20
|
hookMaxWaitSeconds,
|
|
21
21
|
hookWaitClamped,
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
refusesWhenUnanswered,
|
|
25
25
|
ruleApprovesAfterItsFullWindow,
|
|
26
26
|
scopeBreachReasonOf
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-U33VHYHK.js";
|
|
28
28
|
|
|
29
29
|
// src/pushed-question.ts
|
|
30
30
|
var scopeQuestionOf = (verdict) => {
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
PUSHARY_CLI_LATEST_FOR_POWERSHELL,
|
|
9
9
|
SETUP_AGENT_CHOICES,
|
|
10
10
|
isApprovalMode
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-U33VHYHK.js";
|
|
12
12
|
|
|
13
13
|
// src/cli/mode-request.ts
|
|
14
14
|
var parseDuration = (value) => {
|
|
@@ -261,7 +261,7 @@ var SETUP_OPTIONS = [
|
|
|
261
261
|
["--key-stdin", "Read the API key from the first line of stdin, so it never appears in argv or shell history"],
|
|
262
262
|
["--agents <list>", 'Comma-separated agent ids, or "auto" for everything detected, or "none" to save the key only'],
|
|
263
263
|
["--yes, -y", "Accept every default and ask nothing. Implies --agents auto unless --agents is given"],
|
|
264
|
-
["--connect app", "
|
|
264
|
+
["--connect app", "Only pair the native Pushary app with a QR. By default setup offers browser sign-in first, with the QR below it"],
|
|
265
265
|
["--connect none", "Skip pairing a phone, same as --skip-phone"],
|
|
266
266
|
["--control auto|on|off", "Manage phone-start automatically (default), require it, or disable its background service"],
|
|
267
267
|
["--transcripts on|off", "Enable or disable encrypted transcript sync on this machine"],
|
|
@@ -272,6 +272,7 @@ var SETUP_OPTIONS = [
|
|
|
272
272
|
["--verify push", "Only prove a notification was delivered. Automatic when nobody is at the terminal"],
|
|
273
273
|
["--verify none", "Skip the final check entirely"],
|
|
274
274
|
["--dry-run", "Print what would be written and change nothing"],
|
|
275
|
+
["--verbose", "Print every step setup takes for each agent, not one line per agent"],
|
|
275
276
|
["--json", "Emit one machine-readable object instead of the human report"]
|
|
276
277
|
];
|
|
277
278
|
var AGENT_IDS = SETUP_AGENT_CHOICES.join(", ");
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
callDecisionStore,
|
|
3
3
|
identifyingToolInput
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-SU3M242B.js";
|
|
5
5
|
import {
|
|
6
6
|
canonicalJson
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-74MBT2PL.js";
|
|
8
8
|
|
|
9
9
|
// src/phone-approval.ts
|
|
10
10
|
import { createHash } from "crypto";
|
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
toolResultErrorText,
|
|
30
30
|
transcriptTokensIn,
|
|
31
31
|
transcriptUsageRequest
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-NSUIUOE7.js";
|
|
33
33
|
import {
|
|
34
34
|
askUser,
|
|
35
35
|
cancelQuestion,
|
|
@@ -48,37 +48,37 @@ import {
|
|
|
48
48
|
waitForQuestion,
|
|
49
49
|
waitsForThePhone,
|
|
50
50
|
writeDegraded
|
|
51
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-HB4BB66C.js";
|
|
52
52
|
import {
|
|
53
53
|
RETRY_ACK,
|
|
54
54
|
readCommandAck,
|
|
55
55
|
refusedReceiptMessage
|
|
56
|
-
} from "./chunk-
|
|
56
|
+
} from "./chunk-OGFKB66L.js";
|
|
57
57
|
import {
|
|
58
58
|
SubscriptionRequiredError,
|
|
59
59
|
isRetryable,
|
|
60
60
|
withRetry
|
|
61
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-7TGJ6FPW.js";
|
|
62
62
|
import {
|
|
63
63
|
fetchAsCredential
|
|
64
|
-
} from "./chunk-
|
|
64
|
+
} from "./chunk-J65WHWPK.js";
|
|
65
65
|
import {
|
|
66
66
|
branchFor,
|
|
67
67
|
projectNameFor,
|
|
68
68
|
repoKeyFor
|
|
69
|
-
} from "./chunk-
|
|
69
|
+
} from "./chunk-XX3Z4KQL.js";
|
|
70
70
|
import {
|
|
71
71
|
getMachineId
|
|
72
|
-
} from "./chunk-
|
|
72
|
+
} from "./chunk-HY27YNME.js";
|
|
73
73
|
import {
|
|
74
74
|
reportedInstallSource
|
|
75
|
-
} from "./chunk-
|
|
75
|
+
} from "./chunk-UKHFRW5M.js";
|
|
76
76
|
import {
|
|
77
77
|
IDLE_PROMPT_NOTIFICATION,
|
|
78
78
|
NOTIFICATION_PUSH_TYPES,
|
|
79
79
|
POSTTOOLUSE_MIRROR_ONLY_TOOLS,
|
|
80
80
|
claudeConfigDir
|
|
81
|
-
} from "./chunk-
|
|
81
|
+
} from "./chunk-74MBT2PL.js";
|
|
82
82
|
import {
|
|
83
83
|
compareVersion,
|
|
84
84
|
parseVersion
|
|
@@ -87,7 +87,7 @@ import {
|
|
|
87
87
|
getApiKey,
|
|
88
88
|
getBaseUrl,
|
|
89
89
|
isMalformedApiKeyError
|
|
90
|
-
} from "./chunk-
|
|
90
|
+
} from "./chunk-NEQMXQZQ.js";
|
|
91
91
|
import {
|
|
92
92
|
writeFileAtomic,
|
|
93
93
|
writeJsonAtomicDurable
|
|
@@ -145,7 +145,7 @@ import {
|
|
|
145
145
|
resolveAutoResolveOrigin,
|
|
146
146
|
resolvePolicy,
|
|
147
147
|
unansweredRefusalReason
|
|
148
|
-
} from "./chunk-
|
|
148
|
+
} from "./chunk-U33VHYHK.js";
|
|
149
149
|
|
|
150
150
|
// src/pending.ts
|
|
151
151
|
import { join } from "path";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
addGeminiMcpServer,
|
|
3
3
|
removeGeminiMcpServer
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-TJJEYS3S.js";
|
|
5
5
|
import {
|
|
6
6
|
CLAUDE_CODE_AGENT
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-SU3M242B.js";
|
|
8
8
|
import {
|
|
9
9
|
compatibleToolLookup
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-NSUIUOE7.js";
|
|
11
11
|
import {
|
|
12
12
|
CLAUDE_HOOK_EVENTS,
|
|
13
13
|
PUSHARY_MCP_URL,
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
isPusharyHook,
|
|
20
20
|
registerHookEntry,
|
|
21
21
|
removeClaudeMcpServers
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-74MBT2PL.js";
|
|
23
23
|
import {
|
|
24
24
|
AGENT_ENFORCEMENT,
|
|
25
25
|
HOOK_COMPATIBLE_PROFILES,
|
|
@@ -32,7 +32,7 @@ import {
|
|
|
32
32
|
pusharyMissingReason,
|
|
33
33
|
refusalOutput,
|
|
34
34
|
withHookHoldBudget
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-U33VHYHK.js";
|
|
36
36
|
|
|
37
37
|
// src/config-document.ts
|
|
38
38
|
import { parse, stringify } from "smol-toml";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
pusharyFetch
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-FIIRS53K.js";
|
|
4
4
|
import {
|
|
5
5
|
getBaseUrl
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-NEQMXQZQ.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-U33VHYHK.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,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AGENT_CHOICES
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-GNCOGELX.js";
|
|
4
4
|
import {
|
|
5
5
|
BELL_HOOK_BINARY
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-P4ZXHSJX.js";
|
|
7
7
|
import {
|
|
8
8
|
CLAUDE_HOOK_EVENTS,
|
|
9
9
|
CODEX_HOOK_EVENTS,
|
|
@@ -16,13 +16,13 @@ import {
|
|
|
16
16
|
isBridgeLocator,
|
|
17
17
|
isProtectedByScope,
|
|
18
18
|
registerHookEntry
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-74MBT2PL.js";
|
|
20
20
|
import {
|
|
21
21
|
CURSOR_GATE_EVENTS,
|
|
22
22
|
HOOK_BUDGETS,
|
|
23
23
|
HOOK_LOCATOR_BINARY,
|
|
24
24
|
hookCommandHoldBudget
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-U33VHYHK.js";
|
|
26
26
|
|
|
27
27
|
// src/gemini-config.ts
|
|
28
28
|
var GEMINI_HOOK_BINARY = "pushary-gemini-hook";
|
|
@@ -18,18 +18,18 @@ import {
|
|
|
18
18
|
settingSnapshot,
|
|
19
19
|
writeHermesSetting,
|
|
20
20
|
writeSetupReceipt
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-HTDRJMP5.js";
|
|
22
22
|
import {
|
|
23
23
|
OPENCLAW_MIN_VERSION,
|
|
24
24
|
OPENCLAW_PLUGIN_ID,
|
|
25
25
|
OPENCLAW_PLUGIN_PACKAGE
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-4CUOYT5O.js";
|
|
27
27
|
import {
|
|
28
28
|
retryAgentCommand
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-BX3VDXXW.js";
|
|
30
30
|
import {
|
|
31
31
|
configFilePath
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-NEQMXQZQ.js";
|
|
33
33
|
import {
|
|
34
34
|
readJsonSafe,
|
|
35
35
|
writeJsonAtomic
|
|
@@ -37,7 +37,7 @@ import {
|
|
|
37
37
|
import {
|
|
38
38
|
readSetupOutcomeProperties,
|
|
39
39
|
redactSecretsFromContent
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-U33VHYHK.js";
|
|
41
41
|
|
|
42
42
|
// src/hermes/shell-gate.ts
|
|
43
43
|
var readHermesShellGate = async (launcher) => {
|
|
@@ -4691,6 +4691,23 @@ var readSetupOutcomeProperties = (body) => {
|
|
|
4691
4691
|
os: readOptional(body.os, isComputerOs)
|
|
4692
4692
|
};
|
|
4693
4693
|
};
|
|
4694
|
+
var SETUP_STOPPED_PATH = "/api/agent/setup-stopped";
|
|
4695
|
+
|
|
4696
|
+
// ../contracts/src/cli-local-confirm.ts
|
|
4697
|
+
var CLI_LOCAL_TERMINAL_PATH = "/api/cli/auth/local";
|
|
4698
|
+
var CLI_LOCAL_BIND_PATH = "/api/cli/auth/bind";
|
|
4699
|
+
var LOCAL_CONFIRM_HOST = "127.0.0.1";
|
|
4700
|
+
var LOCAL_CONFIRM_PATH = "/confirm";
|
|
4701
|
+
var LOCAL_CONFIRM_STATE_PARAM = "state";
|
|
4702
|
+
var LOCAL_CONFIRM_NONCE_PARAM = "nonce";
|
|
4703
|
+
var LOCAL_TERMINAL_ENTRY_PARAM = "listener";
|
|
4704
|
+
var CONFIRMED_TERMINAL_PARAM = "terminal";
|
|
4705
|
+
var LOCAL_CONFIRM_TOKEN_PATTERN = /^[A-Za-z0-9_-]{32,64}$/;
|
|
4706
|
+
var isLocalConfirmToken = (value) => typeof value === "string" && LOCAL_CONFIRM_TOKEN_PATTERN.test(value);
|
|
4707
|
+
var LOCAL_TERMINAL_VALUE_SEPARATOR = ".";
|
|
4708
|
+
var localTerminalValue = (terminal) => `${terminal.port}${LOCAL_TERMINAL_VALUE_SEPARATOR}${terminal.state}`;
|
|
4709
|
+
var localTerminalEntryUrl = (baseUrl, terminal) => `${baseUrl.replace(/\/+$/, "")}${CLI_LOCAL_TERMINAL_PATH}?${LOCAL_TERMINAL_ENTRY_PARAM}=${localTerminalValue(terminal)}`;
|
|
4710
|
+
var confirmedTerminalUrl = (authorizeUrl, nonce) => `${authorizeUrl}?${new URLSearchParams({ [CONFIRMED_TERMINAL_PARAM]: nonce })}`;
|
|
4694
4711
|
|
|
4695
4712
|
// ../contracts/src/policy-capabilities.ts
|
|
4696
4713
|
var POLICY_REQUEST_CAPABILITIES_HEADER = "x-pushary-policy-capabilities";
|
|
@@ -11389,6 +11406,15 @@ export {
|
|
|
11389
11406
|
readSetupAgentFailures,
|
|
11390
11407
|
isSetupConnectMode,
|
|
11391
11408
|
readSetupOutcomeProperties,
|
|
11409
|
+
SETUP_STOPPED_PATH,
|
|
11410
|
+
CLI_LOCAL_BIND_PATH,
|
|
11411
|
+
LOCAL_CONFIRM_HOST,
|
|
11412
|
+
LOCAL_CONFIRM_PATH,
|
|
11413
|
+
LOCAL_CONFIRM_STATE_PARAM,
|
|
11414
|
+
LOCAL_CONFIRM_NONCE_PARAM,
|
|
11415
|
+
isLocalConfirmToken,
|
|
11416
|
+
localTerminalEntryUrl,
|
|
11417
|
+
confirmedTerminalUrl,
|
|
11392
11418
|
POLICY_REQUEST_CAPABILITIES_HEADER,
|
|
11393
11419
|
CLI_POLICY_REQUEST_CAPABILITIES,
|
|
11394
11420
|
policyRequestCapabilitiesHeaderValue,
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
pusharyHookExecutable
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-TJJEYS3S.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-74MBT2PL.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-U33VHYHK.js";
|
|
25
25
|
|
|
26
26
|
// src/cursor-gate-registration.ts
|
|
27
27
|
import { dirname, isAbsolute, join, resolve } from "path";
|
|
@@ -9,14 +9,96 @@ import {
|
|
|
9
9
|
} from "./chunk-3EGEA4KH.js";
|
|
10
10
|
import {
|
|
11
11
|
getBaseUrl
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-NEQMXQZQ.js";
|
|
13
|
+
import {
|
|
14
|
+
CLI_LOCAL_BIND_PATH,
|
|
15
|
+
LOCAL_CONFIRM_HOST,
|
|
16
|
+
LOCAL_CONFIRM_NONCE_PARAM,
|
|
17
|
+
LOCAL_CONFIRM_PATH,
|
|
18
|
+
LOCAL_CONFIRM_STATE_PARAM,
|
|
19
|
+
confirmedTerminalUrl,
|
|
20
|
+
isLocalConfirmToken,
|
|
21
|
+
localTerminalEntryUrl
|
|
22
|
+
} from "./chunk-U33VHYHK.js";
|
|
13
23
|
|
|
14
24
|
// src/cli/login-ui.ts
|
|
15
25
|
import { hostname } from "os";
|
|
16
26
|
|
|
27
|
+
// src/cli/local-confirm.ts
|
|
28
|
+
import { createHash, randomBytes, timingSafeEqual } from "crypto";
|
|
29
|
+
import { createServer } from "http";
|
|
30
|
+
var STATE_BYTES = 24;
|
|
31
|
+
var ANY_FREE_PORT = 0;
|
|
32
|
+
var newLocalConfirmState = () => randomBytes(STATE_BYTES).toString("base64url");
|
|
33
|
+
var localConfirmStateHash = (state) => createHash("sha256").update(state).digest("hex");
|
|
34
|
+
var sameState = (expected, given) => {
|
|
35
|
+
const expectedBytes = Buffer.from(expected);
|
|
36
|
+
const givenBytes = Buffer.from(given);
|
|
37
|
+
return expectedBytes.length === givenBytes.length && timingSafeEqual(expectedBytes, givenBytes);
|
|
38
|
+
};
|
|
39
|
+
var redirectTo = (response, location) => {
|
|
40
|
+
response.writeHead(302, { Location: location, "Cache-Control": "no-store", "Referrer-Policy": "no-referrer" });
|
|
41
|
+
response.end();
|
|
42
|
+
};
|
|
43
|
+
var confirmUrlOf = (request) => {
|
|
44
|
+
try {
|
|
45
|
+
return new URL(request.url ?? "/", `http://${LOCAL_CONFIRM_HOST}`);
|
|
46
|
+
} catch {
|
|
47
|
+
return null;
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
var notFound = (response) => {
|
|
51
|
+
response.writeHead(404, { "Cache-Control": "no-store" });
|
|
52
|
+
response.end();
|
|
53
|
+
};
|
|
54
|
+
var listenForLocalConfirm = (options) => new Promise((resolve) => {
|
|
55
|
+
const state = options.state;
|
|
56
|
+
let confirmed = false;
|
|
57
|
+
let binding = false;
|
|
58
|
+
let listeningOn = "";
|
|
59
|
+
const answer = async (request, response) => {
|
|
60
|
+
const url = confirmUrlOf(request);
|
|
61
|
+
if (url === null) return notFound(response);
|
|
62
|
+
if (request.method !== "GET" || url.pathname !== LOCAL_CONFIRM_PATH || request.headers.host !== listeningOn) return notFound(response);
|
|
63
|
+
const nonce = url.searchParams.get(LOCAL_CONFIRM_NONCE_PARAM);
|
|
64
|
+
if (!sameState(state, url.searchParams.get(LOCAL_CONFIRM_STATE_PARAM) ?? "")) return notFound(response);
|
|
65
|
+
if (confirmed || binding || !isLocalConfirmToken(nonce)) return redirectTo(response, options.authorizeUrl);
|
|
66
|
+
binding = true;
|
|
67
|
+
const bound = await options.bind(nonce).catch(() => false);
|
|
68
|
+
binding = false;
|
|
69
|
+
if (bound) confirmed = true;
|
|
70
|
+
redirectTo(response, bound ? confirmedTerminalUrl(options.authorizeUrl, nonce) : options.authorizeUrl);
|
|
71
|
+
};
|
|
72
|
+
const server = createServer((request, response) => {
|
|
73
|
+
answer(request, response).catch(() => {
|
|
74
|
+
if (!response.headersSent) notFound(response);
|
|
75
|
+
else response.end();
|
|
76
|
+
});
|
|
77
|
+
});
|
|
78
|
+
server.once("error", () => resolve(null));
|
|
79
|
+
server.listen(ANY_FREE_PORT, LOCAL_CONFIRM_HOST, () => {
|
|
80
|
+
const address = server.address();
|
|
81
|
+
if (address === null || typeof address === "string") {
|
|
82
|
+
server.close();
|
|
83
|
+
return resolve(null);
|
|
84
|
+
}
|
|
85
|
+
listeningOn = `${LOCAL_CONFIRM_HOST}:${address.port}`;
|
|
86
|
+
server.unref();
|
|
87
|
+
resolve({
|
|
88
|
+
terminal: { port: address.port, state },
|
|
89
|
+
confirmed: () => confirmed,
|
|
90
|
+
close: () => {
|
|
91
|
+
server.close();
|
|
92
|
+
server.closeAllConnections();
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
});
|
|
96
|
+
});
|
|
97
|
+
|
|
17
98
|
// src/cli/login.ts
|
|
18
99
|
var START_PATH = "/api/cli/auth/start";
|
|
19
100
|
var CLAIM_PATH = "/api/cli/auth/claim";
|
|
101
|
+
var LOGIN_COMMAND_REQUEST = { command: "login" };
|
|
20
102
|
var DEFAULT_TIMEOUT_MS = 1e4;
|
|
21
103
|
var post = async (url, body, fetchImpl) => fetchImpl(url, {
|
|
22
104
|
method: "POST",
|
|
@@ -26,15 +108,21 @@ var post = async (url, body, fetchImpl) => fetchImpl(url, {
|
|
|
26
108
|
});
|
|
27
109
|
var asString = (value) => typeof value === "string" && value ? value : null;
|
|
28
110
|
var asNumber = (value, fallback) => typeof value === "number" && Number.isFinite(value) ? value : fallback;
|
|
29
|
-
var startLogin = async (machineLabel, cliVersion, deps = {}) => {
|
|
111
|
+
var startLogin = async (machineLabel, cliVersion, deps = {}, request = LOGIN_COMMAND_REQUEST) => {
|
|
30
112
|
const fetchImpl = deps.fetchImpl ?? fetch;
|
|
31
113
|
const baseUrl = deps.baseUrl ?? getBaseUrl();
|
|
32
|
-
const keypair = generateKeypair();
|
|
114
|
+
const keypair = request.keypair ?? generateKeypair();
|
|
33
115
|
let response;
|
|
34
116
|
try {
|
|
35
117
|
response = await post(
|
|
36
118
|
`${baseUrl}${START_PATH}`,
|
|
37
|
-
{
|
|
119
|
+
{
|
|
120
|
+
cliPublicKey: keypair.publicKeyB64,
|
|
121
|
+
machineLabel,
|
|
122
|
+
cliVersion,
|
|
123
|
+
command: request.command,
|
|
124
|
+
...request.localConfirmStateHash === void 0 ? {} : { localConfirmStateHash: request.localConfirmStateHash }
|
|
125
|
+
},
|
|
38
126
|
fetchImpl
|
|
39
127
|
);
|
|
40
128
|
} catch (err) {
|
|
@@ -63,7 +151,8 @@ var startLogin = async (machineLabel, cliVersion, deps = {}) => {
|
|
|
63
151
|
intervalMs: Math.max(1, asNumber(body.interval, 2)) * 1e3,
|
|
64
152
|
expiresInSeconds: Math.max(1, asNumber(body.expiresInSeconds, 900)),
|
|
65
153
|
fingerprint: asString(body.fingerprint) ?? publicKeyFingerprint(keypair.publicKeyB64),
|
|
66
|
-
keypair
|
|
154
|
+
keypair,
|
|
155
|
+
localConfirm: request.localConfirmStateHash !== void 0 && body.localConfirm === true
|
|
67
156
|
}
|
|
68
157
|
};
|
|
69
158
|
};
|
|
@@ -112,6 +201,11 @@ var pollOnce = async (start, deps = {}) => {
|
|
|
112
201
|
return { kind: "pending", expiresInSeconds: asNumber(body.expiresInSeconds, 0) };
|
|
113
202
|
}
|
|
114
203
|
};
|
|
204
|
+
var settlesWhenAborted = (signal) => new Promise((resolve) => {
|
|
205
|
+
if (signal === void 0) return;
|
|
206
|
+
if (signal.aborted) return resolve();
|
|
207
|
+
signal.addEventListener("abort", () => resolve(), { once: true });
|
|
208
|
+
});
|
|
115
209
|
var waitForLogin = async (start, handlers = {}, deps = {}) => {
|
|
116
210
|
const now = deps.now ?? Date.now;
|
|
117
211
|
const sleep = deps.sleep ?? ((ms) => new Promise((resolve) => setTimeout(resolve, ms)));
|
|
@@ -119,7 +213,10 @@ var waitForLogin = async (start, handlers = {}, deps = {}) => {
|
|
|
119
213
|
let polls = 0;
|
|
120
214
|
let consecutiveFailures = 0;
|
|
121
215
|
const noticed = /* @__PURE__ */ new Set();
|
|
216
|
+
const aborted = settlesWhenAborted(handlers.signal);
|
|
217
|
+
const stopped = () => handlers.signal?.aborted === true;
|
|
122
218
|
while (now() < deadline) {
|
|
219
|
+
if (stopped()) return { state: { kind: "stopped" }, polls };
|
|
123
220
|
const state = await pollOnce(start, deps);
|
|
124
221
|
polls += 1;
|
|
125
222
|
if (state.kind === "authorized" || state.kind === "rejected" || state.kind === "expired") {
|
|
@@ -139,10 +236,24 @@ var waitForLogin = async (start, handlers = {}, deps = {}) => {
|
|
|
139
236
|
}
|
|
140
237
|
}
|
|
141
238
|
handlers.onTick?.(state, Math.max(0, Math.ceil((deadline - now()) / 1e3)));
|
|
142
|
-
await sleep(start.intervalMs);
|
|
239
|
+
await Promise.race([sleep(start.intervalMs), aborted]);
|
|
143
240
|
}
|
|
144
241
|
return { state: { kind: "expired" }, polls };
|
|
145
242
|
};
|
|
243
|
+
var bindLocalTerminal = async (start, nonce, deps = {}) => {
|
|
244
|
+
const fetchImpl = deps.fetchImpl ?? fetch;
|
|
245
|
+
const baseUrl = deps.baseUrl ?? getBaseUrl();
|
|
246
|
+
try {
|
|
247
|
+
const response = await post(
|
|
248
|
+
`${baseUrl}${CLI_LOCAL_BIND_PATH}`,
|
|
249
|
+
{ loginId: start.loginId, cliPublicKey: start.keypair.publicKeyB64, nonce },
|
|
250
|
+
fetchImpl
|
|
251
|
+
);
|
|
252
|
+
return response.ok;
|
|
253
|
+
} catch {
|
|
254
|
+
return false;
|
|
255
|
+
}
|
|
256
|
+
};
|
|
146
257
|
var cancelLogin = async (start, deps = {}) => {
|
|
147
258
|
const fetchImpl = deps.fetchImpl ?? fetch;
|
|
148
259
|
const baseUrl = deps.baseUrl ?? getBaseUrl();
|
|
@@ -158,8 +269,38 @@ var cancelLogin = async (start, deps = {}) => {
|
|
|
158
269
|
};
|
|
159
270
|
|
|
160
271
|
// src/cli/login-ui.ts
|
|
272
|
+
var printLoginNotice = (ui, state, mayOpenBrowser) => {
|
|
273
|
+
if (state.kind === "needs-workspace") {
|
|
274
|
+
ui.say(` ${ui.yellow("!")} Waiting on a workspace. Finish creating one in the browser and this continues on its own.`);
|
|
275
|
+
} else if (state.kind === "payment-required") {
|
|
276
|
+
ui.say(` ${ui.yellow("!")} A plan is needed before a key can be issued. Nothing was created yet.`);
|
|
277
|
+
ui.say(` ${ui.dim("Choose one at")} ${ui.cyan(state.checkoutUrl)}`);
|
|
278
|
+
ui.say(` ${ui.dim("Keep the browser tab open and this finishes on its own once the plan is active.")}`);
|
|
279
|
+
ui.say(` ${ui.dim("If you closed it, reopen the page and enter the same code again.")}`);
|
|
280
|
+
if (mayOpenBrowser) openInBrowser(state.checkoutUrl);
|
|
281
|
+
} else if (state.kind === "unreachable") {
|
|
282
|
+
ui.say(` ${ui.yellow("!")} Still trying. pushary.com is not answering ${ui.dim(`(${state.detail})`)}`);
|
|
283
|
+
}
|
|
284
|
+
};
|
|
285
|
+
var originOf = (url) => {
|
|
286
|
+
try {
|
|
287
|
+
return new URL(url).origin;
|
|
288
|
+
} catch {
|
|
289
|
+
return null;
|
|
290
|
+
}
|
|
291
|
+
};
|
|
292
|
+
var browserEntryUrl = (start, listener) => {
|
|
293
|
+
const origin = originOf(start.verificationUrl);
|
|
294
|
+
return listener === null || origin === null ? start.verificationUrl : localTerminalEntryUrl(origin, listener.terminal);
|
|
295
|
+
};
|
|
296
|
+
var listenForThisTerminal = async (start, state, deps) => start.localConfirm ? listenForLocalConfirm({ authorizeUrl: start.verificationUrl, state, bind: (nonce) => bindLocalTerminal(start, nonce, deps) }) : null;
|
|
161
297
|
var runBrowserLogin = async (ui, options, deps = {}) => {
|
|
162
|
-
const
|
|
298
|
+
const mayOpenBrowser = !options.noBrowser && canOpenBrowser();
|
|
299
|
+
const localState = newLocalConfirmState();
|
|
300
|
+
const started = await startLogin(hostname(), options.cliVersion, deps, {
|
|
301
|
+
command: options.command ?? "login",
|
|
302
|
+
...mayOpenBrowser ? { localConfirmStateHash: localConfirmStateHash(localState) } : {}
|
|
303
|
+
});
|
|
163
304
|
if (started.kind === "rate-limited") {
|
|
164
305
|
return { kind: "unavailable", detail: `too many attempts, retry in ${started.retryAfterSeconds}s` };
|
|
165
306
|
}
|
|
@@ -179,6 +320,7 @@ var runBrowserLogin = async (ui, options, deps = {}) => {
|
|
|
179
320
|
};
|
|
180
321
|
process.on("SIGINT", onSignal);
|
|
181
322
|
process.on("SIGHUP", onSignal);
|
|
323
|
+
let listener = null;
|
|
182
324
|
try {
|
|
183
325
|
ui.say("");
|
|
184
326
|
ui.say(` ${ui.bold("Sign in to Pushary")}`);
|
|
@@ -189,22 +331,11 @@ var runBrowserLogin = async (ui, options, deps = {}) => {
|
|
|
189
331
|
ui.say(` ${ui.dim(`This terminal shows fingerprint ${start.fingerprint}. The page shows the same one.`)}`);
|
|
190
332
|
ui.say(` ${ui.dim("The code is only on your screen. Nobody can send you a link that fills it in.")}`);
|
|
191
333
|
ui.say("");
|
|
192
|
-
|
|
334
|
+
listener = mayOpenBrowser ? await listenForThisTerminal(start, localState, deps) : null;
|
|
335
|
+
if (mayOpenBrowser && openInBrowser(browserEntryUrl(start, listener))) {
|
|
193
336
|
ui.say(` ${ui.dim("Opened your browser.")}`);
|
|
194
337
|
}
|
|
195
|
-
const notice = (state2) =>
|
|
196
|
-
if (state2.kind === "needs-workspace") {
|
|
197
|
-
ui.say(` ${ui.yellow("!")} Waiting on a workspace. Finish creating one in the browser and this continues on its own.`);
|
|
198
|
-
} else if (state2.kind === "payment-required") {
|
|
199
|
-
ui.say(` ${ui.yellow("!")} A plan is needed before a key can be issued. Nothing was created yet.`);
|
|
200
|
-
ui.say(` ${ui.dim("Choose one at")} ${ui.cyan(state2.checkoutUrl)}`);
|
|
201
|
-
ui.say(` ${ui.dim("Keep the browser tab open and this finishes on its own once the plan is active.")}`);
|
|
202
|
-
ui.say(` ${ui.dim("If you closed it, reopen the page and enter the same code again.")}`);
|
|
203
|
-
if (!options.noBrowser && canOpenBrowser()) openInBrowser(state2.checkoutUrl);
|
|
204
|
-
} else if (state2.kind === "unreachable") {
|
|
205
|
-
ui.say(` ${ui.yellow("!")} Still trying. pushary.com is not answering ${ui.dim(`(${state2.detail})`)}`);
|
|
206
|
-
}
|
|
207
|
-
};
|
|
338
|
+
const notice = (state2) => printLoginNotice(ui, state2, mayOpenBrowser);
|
|
208
339
|
const { state } = await waitForLogin(start, { onNotice: notice }, deps);
|
|
209
340
|
if (state.kind === "authorized") {
|
|
210
341
|
return {
|
|
@@ -217,11 +348,21 @@ var runBrowserLogin = async (ui, options, deps = {}) => {
|
|
|
217
348
|
if (state.kind === "rejected") return { kind: "rejected" };
|
|
218
349
|
return { kind: "expired" };
|
|
219
350
|
} finally {
|
|
351
|
+
listener?.close();
|
|
220
352
|
process.off("SIGINT", onSignal);
|
|
221
353
|
process.off("SIGHUP", onSignal);
|
|
222
354
|
}
|
|
223
355
|
};
|
|
224
356
|
|
|
225
357
|
export {
|
|
358
|
+
newLocalConfirmState,
|
|
359
|
+
localConfirmStateHash,
|
|
360
|
+
startLogin,
|
|
361
|
+
pollOnce,
|
|
362
|
+
waitForLogin,
|
|
363
|
+
cancelLogin,
|
|
364
|
+
printLoginNotice,
|
|
365
|
+
browserEntryUrl,
|
|
366
|
+
listenForThisTerminal,
|
|
226
367
|
runBrowserLogin
|
|
227
368
|
};
|
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
} from "./chunk-P6DUWKAO.js";
|
|
5
5
|
import {
|
|
6
6
|
fetchAsCredential
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-J65WHWPK.js";
|
|
8
8
|
import {
|
|
9
9
|
getBaseUrl
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-NEQMXQZQ.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-U33VHYHK.js";
|
|
19
19
|
|
|
20
20
|
// src/transcript-recipient-pin.ts
|
|
21
21
|
import { createHash } from "crypto";
|