@pushary/agent-hooks 1.9.18 → 1.9.20
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 +53 -18
- package/data/cursor-plugin/.cursor-plugin/plugin.json +1 -1
- package/data/cursor-plugin/CHANGELOG.md +5 -0
- package/dist/bin/pushary-bell-hook.js +25 -25
- package/dist/bin/pushary-bell.js +9 -9
- package/dist/bin/pushary-claude.js +26 -25
- package/dist/bin/pushary-clean.js +28 -28
- package/dist/bin/pushary-codex-bridge.js +17 -17
- package/dist/bin/pushary-codex-hook.js +30 -30
- package/dist/bin/pushary-codex.js +12 -12
- package/dist/bin/pushary-connect.js +24 -24
- package/dist/bin/pushary-cowork.js +5 -5
- package/dist/bin/pushary-daemon.js +31 -31
- package/dist/bin/pushary-disconnect.js +24 -24
- package/dist/bin/pushary-doctor.js +33 -33
- package/dist/bin/pushary-elicitation-hook.js +25 -25
- package/dist/bin/pushary-gemini-bridge.js +13 -13
- package/dist/bin/pushary-gemini-hook.js +27 -27
- package/dist/bin/pushary-hook.js +29 -29
- package/dist/bin/pushary-login.js +12 -12
- package/dist/bin/pushary-logout.js +10 -10
- package/dist/bin/pushary-mcp.js +9 -9
- package/dist/bin/pushary-mode.js +12 -12
- package/dist/bin/pushary-notification-hook.js +24 -24
- package/dist/bin/pushary-opencode-hook.js +26 -26
- package/dist/bin/pushary-permission-denied-hook.js +29 -29
- package/dist/bin/pushary-permission-hook.js +28 -28
- package/dist/bin/pushary-post-hook.js +24 -24
- package/dist/bin/pushary-prompt-hook.js +24 -24
- package/dist/bin/pushary-session-end-hook.js +24 -24
- package/dist/bin/pushary-session-start-hook.js +28 -28
- package/dist/bin/pushary-setup.js +60 -40
- package/dist/bin/pushary-stats.js +5 -5
- package/dist/bin/pushary-status.js +26 -26
- package/dist/bin/pushary-stop-hook.js +24 -24
- package/dist/bin/pushary-stopfailure-hook.js +24 -24
- package/dist/bin/pushary-suggestions.js +12 -12
- package/dist/bin/pushary-transcript-register.js +17 -17
- package/dist/bin/pushary-transcripts.js +7 -7
- package/dist/bin/pushary-upgrade.js +30 -30
- package/dist/bin/pushary-wait.js +12 -12
- package/dist/bin/pushary.js +6 -6
- package/dist/{chunk-W3IBC4FG.js → chunk-2V2CCTGQ.js} +1 -1
- package/dist/{chunk-LDLMAGTK.js → chunk-2YAHQ763.js} +2 -2
- package/dist/{chunk-VPGJBKWU.js → chunk-422Z3LBB.js} +3 -3
- package/dist/{chunk-OD6ZMBFA.js → chunk-4ABHSCFJ.js} +2 -2
- package/dist/{chunk-EYQBTAC6.js → chunk-5C2GFTWE.js} +1 -1
- package/dist/{chunk-RN2HEOY2.js → chunk-6I4D3XZ3.js} +1 -1
- package/dist/{chunk-VM3WSNG4.js → chunk-6W6UY4AJ.js} +5 -5
- package/dist/{chunk-5SR5F4LH.js → chunk-736I6CBY.js} +1 -1
- package/dist/{chunk-AFFFTDUS.js → chunk-7YTJOWYI.js} +1 -1
- package/dist/{chunk-TE4M3E2M.js → chunk-A6U4RRFM.js} +2 -2
- package/dist/{chunk-AELYA5BM.js → chunk-AESHOWIB.js} +3 -3
- package/dist/{chunk-AYQREIJA.js → chunk-ANPECDYL.js} +2 -2
- package/dist/{chunk-U4X3GQR2.js → chunk-ATDOYZXC.js} +1 -1
- package/dist/{chunk-XLQAB5US.js → chunk-BIQF3C4H.js} +1 -1
- package/dist/{chunk-M3OVAMTR.js → chunk-CRW4P7JU.js} +1 -1
- package/dist/{chunk-LM2IY7OH.js → chunk-CW4CF7NU.js} +8 -8
- package/dist/{chunk-XCOFZVQ3.js → chunk-DBEJIFJD.js} +2 -2
- package/dist/{chunk-JN2PBSLX.js → chunk-DF2FSJ7B.js} +4 -4
- package/dist/{chunk-LF36VLSO.js → chunk-DNSYWI7D.js} +15 -14
- package/dist/{chunk-KLMAOQR4.js → chunk-DQTBQHB5.js} +2 -2
- package/dist/{chunk-P34IFAIC.js → chunk-EP6FWWBY.js} +6 -6
- package/dist/{chunk-6JTEGLQY.js → chunk-HILWD7WM.js} +3 -3
- package/dist/{chunk-JCVGBUCZ.js → chunk-HPMP6QQD.js} +5 -5
- package/dist/{chunk-3E6SMCCH.js → chunk-K5PUP76V.js} +11 -8
- package/dist/{chunk-X5WZOZJY.js → chunk-LB4HVID5.js} +2 -2
- package/dist/{chunk-SFUVP6RK.js → chunk-LHGB64O2.js} +1 -1
- package/dist/{chunk-JRAQENMR.js → chunk-LU7JPQKL.js} +4 -4
- package/dist/{chunk-JCQURRHV.js → chunk-LXYNKZFP.js} +2 -2
- package/dist/{chunk-L6TIDQNU.js → chunk-MGW26CW7.js} +1 -1
- package/dist/{chunk-PZ2CZIP4.js → chunk-MID7BURF.js} +2 -2
- package/dist/{chunk-IB3WIIFC.js → chunk-MMIN6VNU.js} +1 -1
- package/dist/{chunk-IDVBDHSX.js → chunk-N5K5H2AQ.js} +9 -5
- package/dist/{chunk-ZS3JF5WZ.js → chunk-NESTNKCA.js} +3 -3
- package/dist/{chunk-I67Z6COJ.js → chunk-OLJ4GIRP.js} +2 -2
- package/dist/{chunk-ERAUU54Q.js → chunk-OZOD37XK.js} +4 -4
- package/dist/{chunk-CPO4GI6S.js → chunk-P77EIWBJ.js} +1 -1
- package/dist/{chunk-EXHTATWA.js → chunk-PPAMIQOV.js} +8 -8
- package/dist/{chunk-TGEOVHWA.js → chunk-Q4EQHBA7.js} +5 -5
- package/dist/{chunk-O43I5GBC.js → chunk-R7SSVBHX.js} +4 -4
- package/dist/{chunk-7UTH3KQV.js → chunk-RGSG2GYV.js} +7 -6
- package/dist/{chunk-6A6BXMNK.js → chunk-RZCTGLUJ.js} +3 -3
- package/dist/{chunk-LCRYCE5F.js → chunk-UVEIBBTR.js} +2 -2
- package/dist/{chunk-IHBVOC2Q.js → chunk-VOIN2NZW.js} +3 -3
- package/dist/{chunk-BZH6SJAR.js → chunk-XDKZZSU6.js} +2 -2
- package/dist/{chunk-K4UPPZK4.js → chunk-XGHXQUDG.js} +1 -1
- package/dist/{chunk-BK2CBKUC.js → chunk-XJGGGDHX.js} +1 -1
- package/dist/{chunk-PKMZSKF5.js → chunk-XQ4HTTBB.js} +1 -1
- package/dist/{chunk-5MCHXYBH.js → chunk-XVNZHIVF.js} +5 -5
- package/dist/{chunk-HCCYXFX3.js → chunk-YJWEQZJC.js} +21 -8
- package/dist/{chunk-JSD26D6B.js → chunk-YONHM5BQ.js} +1 -1
- package/dist/{chunk-B3RNX2E7.js → chunk-Z4YQ7ZMO.js} +3 -3
- package/dist/{chunk-2YXGQINX.js → chunk-ZNFARGEY.js} +6 -6
- package/dist/{global-upgrade-WSUIPBIP.js → global-upgrade-EELV2YEK.js} +6 -6
- package/dist/{paths-PTDVSCCX.js → paths-MDOKPY7A.js} +2 -2
- package/dist/{reapply-Q3VLHRQS.js → reapply-22C75UEY.js} +20 -20
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.js +19 -19
- package/dist/{upgrade-lock-DJ3T5HPL.js → upgrade-lock-VPL5AYPQ.js} +3 -3
- package/package.json +1 -1
- /package/dist/{chunk-VERKRKUN.js → chunk-6HMCOGKJ.js} +0 -0
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import {
|
|
2
2
|
defersToNativeMode,
|
|
3
3
|
reportMachineDenial
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-DBEJIFJD.js";
|
|
5
5
|
import {
|
|
6
6
|
isGatingMoment,
|
|
7
7
|
recordKeylessMoment
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-736I6CBY.js";
|
|
9
9
|
import {
|
|
10
10
|
announceSubscriptionRequired,
|
|
11
11
|
denyReasonFrom,
|
|
12
12
|
isDeferAnswer,
|
|
13
13
|
oncePerSession
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-6I4D3XZ3.js";
|
|
15
15
|
import {
|
|
16
16
|
activeHookSource,
|
|
17
17
|
activeIdentity
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-DF2FSJ7B.js";
|
|
19
19
|
import {
|
|
20
20
|
DEFAULT_SESSION,
|
|
21
21
|
UNNAMED_ACTION,
|
|
@@ -40,7 +40,7 @@ import {
|
|
|
40
40
|
reportEvent,
|
|
41
41
|
scopePathFor,
|
|
42
42
|
settleQuestionsForToolUse
|
|
43
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-CW4CF7NU.js";
|
|
44
44
|
import {
|
|
45
45
|
askUser,
|
|
46
46
|
cancelQuestion,
|
|
@@ -50,21 +50,22 @@ import {
|
|
|
50
50
|
pollForAnswer,
|
|
51
51
|
requestGate,
|
|
52
52
|
sendNotification,
|
|
53
|
-
waitForQuestion
|
|
54
|
-
|
|
53
|
+
waitForQuestion,
|
|
54
|
+
waitsForThePhone
|
|
55
|
+
} from "./chunk-K5PUP76V.js";
|
|
55
56
|
import {
|
|
56
57
|
SubscriptionRequiredError
|
|
57
|
-
} from "./chunk-
|
|
58
|
+
} from "./chunk-HILWD7WM.js";
|
|
58
59
|
import {
|
|
59
60
|
getMachineId
|
|
60
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-XJGGGDHX.js";
|
|
61
62
|
import {
|
|
62
63
|
getApiKey,
|
|
63
64
|
getBaseUrl
|
|
64
|
-
} from "./chunk-
|
|
65
|
+
} from "./chunk-XQ4HTTBB.js";
|
|
65
66
|
import {
|
|
66
67
|
NPX_LATEST_COMMAND
|
|
67
|
-
} from "./chunk-
|
|
68
|
+
} from "./chunk-LHGB64O2.js";
|
|
68
69
|
import {
|
|
69
70
|
AGENT_QUESTION_STRATEGY,
|
|
70
71
|
DECISION_STOP_REASON,
|
|
@@ -103,7 +104,7 @@ import {
|
|
|
103
104
|
parseAgentQuestions,
|
|
104
105
|
questionHandedToTheTerminal,
|
|
105
106
|
resolveGate
|
|
106
|
-
} from "./chunk-
|
|
107
|
+
} from "./chunk-6HMCOGKJ.js";
|
|
107
108
|
|
|
108
109
|
// src/claude-permission-rules.ts
|
|
109
110
|
import { readFileSync, statSync } from "fs";
|
|
@@ -217,7 +218,7 @@ var handlePushOnly = async (apiKey, description, projectName, timeoutSeconds, ti
|
|
|
217
218
|
}
|
|
218
219
|
if (isDecisionStopped(result)) return halted(DECISION_STOP_REASON);
|
|
219
220
|
const deadline = storedWaitDeadline(result, requestedDeadline);
|
|
220
|
-
if (
|
|
221
|
+
if (waitsForThePhone(result)) announceWait(effectiveWait, result.answerUrl, sessionId);
|
|
221
222
|
const answer = await waitForQuestion(apiKey, result, deadline);
|
|
222
223
|
if (isDecisionStopped(answer)) return halted(DECISION_STOP_REASON);
|
|
223
224
|
if (!answer.answered && isLocalQuestionHandoff(result)) return ask("Approve in the current client.");
|
|
@@ -261,7 +262,7 @@ var handlePushFirst = async (apiKey, description, projectName, pushFirstSeconds,
|
|
|
261
262
|
return outcomeOfFailedAsk(error, sessionId, halted(UNVERIFIABLE_APPROVAL_REASON));
|
|
262
263
|
}
|
|
263
264
|
if (isDecisionStopped(result)) return halted(DECISION_STOP_REASON);
|
|
264
|
-
if (
|
|
265
|
+
if (waitsForThePhone(result)) announceWait(pushFirstSeconds, result.answerUrl, sessionId);
|
|
265
266
|
const deadline = storedWaitDeadline(result, requestedDeadline);
|
|
266
267
|
const answer = await waitForQuestion(apiKey, result, deadline, 1500);
|
|
267
268
|
if (isDecisionStopped(answer)) return halted(DECISION_STOP_REASON);
|
|
@@ -10,10 +10,10 @@ import {
|
|
|
10
10
|
resolvePackageVersionFromBinary,
|
|
11
11
|
resolvePathBinary,
|
|
12
12
|
resolvePathBinaryAsync
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-YJWEQZJC.js";
|
|
14
14
|
import {
|
|
15
15
|
MANAGED_PROVIDERS
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-6HMCOGKJ.js";
|
|
17
17
|
|
|
18
18
|
// src/setup/codex-install.ts
|
|
19
19
|
var NATIVE_BINARY_MIN_BYTES = 20 * 1024 * 1024;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ensureCodexTrustsPusharyHooks
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-XDKZZSU6.js";
|
|
4
4
|
import {
|
|
5
5
|
detectClaudeVersion
|
|
6
6
|
} from "./chunk-RIVNNBEK.js";
|
|
@@ -12,12 +12,12 @@ import {
|
|
|
12
12
|
openCodeHookArgv,
|
|
13
13
|
openCodePluginDir,
|
|
14
14
|
openCodeWired
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-XVNZHIVF.js";
|
|
16
16
|
import {
|
|
17
17
|
addClaudeMcpServer,
|
|
18
18
|
addPusharyHooks,
|
|
19
19
|
addPusharyToolPermissions
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-DF2FSJ7B.js";
|
|
21
21
|
import {
|
|
22
22
|
claudeUnprovenHolds,
|
|
23
23
|
claudeWired,
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
codexWired,
|
|
26
26
|
geminiWired,
|
|
27
27
|
planHooks
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-Q4EQHBA7.js";
|
|
29
29
|
import {
|
|
30
30
|
CLAUDE_HOOK_BINARY,
|
|
31
31
|
CLAUDE_HOOK_EVENTS,
|
|
@@ -36,7 +36,7 @@ import {
|
|
|
36
36
|
needsReregistration,
|
|
37
37
|
registrationSignatures,
|
|
38
38
|
supportedClaudeEvents
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-VOIN2NZW.js";
|
|
40
40
|
import {
|
|
41
41
|
formatVersion
|
|
42
42
|
} from "./chunk-6ICPEJY5.js";
|
|
@@ -59,7 +59,7 @@ import {
|
|
|
59
59
|
registrationHolderOf,
|
|
60
60
|
resolveGlobalBinary,
|
|
61
61
|
vscodePluginMcp
|
|
62
|
-
} from "./chunk-
|
|
62
|
+
} from "./chunk-YJWEQZJC.js";
|
|
63
63
|
import {
|
|
64
64
|
readJsonSafe,
|
|
65
65
|
writeFileAtomic,
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
keyCheckFromResponse
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-NESTNKCA.js";
|
|
4
4
|
import {
|
|
5
5
|
installNetworkDefaults
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-RZCTGLUJ.js";
|
|
7
7
|
import {
|
|
8
8
|
getBaseUrl
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-XQ4HTTBB.js";
|
|
10
10
|
|
|
11
11
|
// src/retry.ts
|
|
12
12
|
var isRetryable = (err) => {
|
|
@@ -4,14 +4,14 @@ import {
|
|
|
4
4
|
} from "./chunk-XHKBHWLX.js";
|
|
5
5
|
import {
|
|
6
6
|
readControlMode
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-4ABHSCFJ.js";
|
|
8
8
|
import {
|
|
9
9
|
getMachineId
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-XJGGGDHX.js";
|
|
11
11
|
import {
|
|
12
12
|
pusharyDir,
|
|
13
13
|
resolveGlobalBinary
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-YJWEQZJC.js";
|
|
15
15
|
import {
|
|
16
16
|
readJsonSafe,
|
|
17
17
|
writeFileAtomic,
|
|
@@ -20,14 +20,14 @@ import {
|
|
|
20
20
|
} from "./chunk-FT7UNIS3.js";
|
|
21
21
|
import {
|
|
22
22
|
getApiKey
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-XQ4HTTBB.js";
|
|
24
24
|
import {
|
|
25
25
|
CLI_PACKAGE_NAMES,
|
|
26
26
|
cmdShimTarget,
|
|
27
27
|
getPackageVersion,
|
|
28
28
|
globalPackageFolder,
|
|
29
29
|
globalRootFor
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-6HMCOGKJ.js";
|
|
31
31
|
|
|
32
32
|
// src/daemon-lifecycle.ts
|
|
33
33
|
import { dirname, join, win32 as win32Path } from "path";
|
|
@@ -5,18 +5,18 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
SubscriptionRequiredError,
|
|
7
7
|
callMcpTool
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-HILWD7WM.js";
|
|
9
9
|
import {
|
|
10
10
|
installNetworkDefaults,
|
|
11
11
|
isNetworkFailure
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-RZCTGLUJ.js";
|
|
13
13
|
import {
|
|
14
14
|
clientReportClaims
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-YJWEQZJC.js";
|
|
16
16
|
import {
|
|
17
17
|
getApiKey,
|
|
18
18
|
getBaseUrl
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-XQ4HTTBB.js";
|
|
20
20
|
import {
|
|
21
21
|
ASK_AGENT_NAME_MAX,
|
|
22
22
|
ASK_QUESTION_MAX,
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
DECISION_LINE_MAX,
|
|
25
25
|
degradedLine,
|
|
26
26
|
truncateLine
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-6HMCOGKJ.js";
|
|
28
28
|
|
|
29
29
|
// src/client-report-claim.ts
|
|
30
30
|
import { createHash } from "crypto";
|
|
@@ -181,7 +181,9 @@ var isBlockedActionClaim = (data) => {
|
|
|
181
181
|
// src/api.ts
|
|
182
182
|
installNetworkDefaults();
|
|
183
183
|
var isDecisionStopped = (result) => result.handoffAction === "stop" || ["cancelled", "unavailable", "stopped", "missing"].includes(result.status ?? "");
|
|
184
|
-
var
|
|
184
|
+
var isAwayPaused = (result) => result.paused === true;
|
|
185
|
+
var isLocalQuestionHandoff = (result) => !isAwayPaused(result) && (result.suppressed === true || result.noDevices === true || result.status === "terminal" || result.status === "notified");
|
|
186
|
+
var waitsForThePhone = (result) => result.answered !== true && !isAwayPaused(result) && !isLocalQuestionHandoff(result);
|
|
185
187
|
var STOPPED = { answered: false, handoffAction: "stop" };
|
|
186
188
|
var unavailableQuestionUnlessSubscriptionRequired = (error) => {
|
|
187
189
|
if (error instanceof SubscriptionRequiredError) throw error;
|
|
@@ -198,7 +200,7 @@ var withinAskUserLimits = (params) => ({
|
|
|
198
200
|
});
|
|
199
201
|
var askUser = async (apiKey, params, timeoutMs = 15e3) => {
|
|
200
202
|
const identified = params.toolUseId || params.requestId ? params : { ...params, requestId: randomUUID() };
|
|
201
|
-
const result = await callMcpTool(apiKey, "ask_user", { ...withinAskUserLimits(identified), wait: false }, { maxRetries: 3, timeoutMs });
|
|
203
|
+
const result = await callMcpTool(apiKey, "ask_user", { ...withinAskUserLimits(identified), pausedAware: true, wait: false }, { maxRetries: 3, timeoutMs });
|
|
202
204
|
if (!isAskUserResponse(result)) throw new Error("Invalid ask_user response");
|
|
203
205
|
return result;
|
|
204
206
|
};
|
|
@@ -256,7 +258,7 @@ var withdrawQuestion = async (apiKey, correlationId, transport = { cancelQuestio
|
|
|
256
258
|
var waitForQuestion = async (apiKey, question, deadlineMs, pollInterval = 2e3) => {
|
|
257
259
|
if (isDecisionStopped(question) || question.answered) return { ...question, answered: !!question.answered };
|
|
258
260
|
if (question.status === "expired") return STOPPED;
|
|
259
|
-
return isLocalQuestionHandoff(question) ? withdrawQuestion(apiKey, question.correlationId) : pollForAnswer(apiKey, question.correlationId, deadlineMs, pollInterval);
|
|
261
|
+
return isAwayPaused(question) || isLocalQuestionHandoff(question) ? withdrawQuestion(apiKey, question.correlationId) : pollForAnswer(apiKey, question.correlationId, deadlineMs, pollInterval);
|
|
260
262
|
};
|
|
261
263
|
var sendNotification = async (apiKey, params, timeoutMs = 15e3, signal) => {
|
|
262
264
|
await callMcpTool(apiKey, "send_notification", { ...params }, { maxRetries: signal ? 1 : 3, timeoutMs, signal });
|
|
@@ -302,6 +304,7 @@ export {
|
|
|
302
304
|
isWaitForAnswerResponse,
|
|
303
305
|
isDecisionStopped,
|
|
304
306
|
isLocalQuestionHandoff,
|
|
307
|
+
waitsForThePhone,
|
|
305
308
|
unavailableQuestionUnlessSubscriptionRequired,
|
|
306
309
|
askUser,
|
|
307
310
|
waitForAnswer,
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-POFBE6ZY.js";
|
|
4
4
|
import {
|
|
5
5
|
autoUpdateState
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-YJWEQZJC.js";
|
|
7
7
|
import {
|
|
8
8
|
readJsonSafe,
|
|
9
9
|
writeJsonAtomic
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
cliPackagePathSegments,
|
|
15
15
|
globalUpgradeEntry,
|
|
16
16
|
ownPackageRoot
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-6HMCOGKJ.js";
|
|
18
18
|
|
|
19
19
|
// src/auto-update.ts
|
|
20
20
|
import { spawn } from "child_process";
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
registerTranscript
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-PPAMIQOV.js";
|
|
4
4
|
import {
|
|
5
5
|
namedEvent
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-DF2FSJ7B.js";
|
|
7
7
|
import {
|
|
8
8
|
writeDegraded
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-K5PUP76V.js";
|
|
10
10
|
import {
|
|
11
11
|
claudeShapedHookInput,
|
|
12
12
|
hookCompatibleProfileBySource
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-6HMCOGKJ.js";
|
|
14
14
|
|
|
15
15
|
// src/tool-hook-input.ts
|
|
16
16
|
var OPTIONAL_TEXT_FIELDS = ["hook_event_name", "session_id", "cwd", "transcript_path", "tool_use_id", "permission_mode"];
|
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
} from "./chunk-KZERVKTD.js";
|
|
4
4
|
import {
|
|
5
5
|
renderCommandHelp
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-LHGB64O2.js";
|
|
7
7
|
import {
|
|
8
8
|
getPackageVersion
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-6HMCOGKJ.js";
|
|
10
10
|
|
|
11
11
|
// src/cli/usage.ts
|
|
12
12
|
var exitOnHelpFlag = (command) => {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
MCP_BRIDGE_BINARY
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-UVEIBBTR.js";
|
|
4
4
|
import {
|
|
5
5
|
KEY_FILE_MODE
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-4ABHSCFJ.js";
|
|
7
7
|
import {
|
|
8
8
|
NpmMissingError,
|
|
9
9
|
NpmPermissionError
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-YJWEQZJC.js";
|
|
11
11
|
import {
|
|
12
12
|
readJsonSafe,
|
|
13
13
|
writeFileAtomic,
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
} from "./chunk-FT7UNIS3.js";
|
|
16
16
|
import {
|
|
17
17
|
NPX_LATEST_COMMAND
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-LHGB64O2.js";
|
|
19
19
|
|
|
20
20
|
// src/instruction-file.ts
|
|
21
21
|
import { existsSync, readFileSync, writeFileSync, mkdirSync, rmSync } from "fs";
|
|
@@ -485,9 +485,13 @@ var describedAgentFailure = (agent, kind) => ({
|
|
|
485
485
|
detail: AGENT_FAILURE_DETAILS[kind],
|
|
486
486
|
remedy: DESCRIBED_FAILURE_REMEDIES[kind]
|
|
487
487
|
});
|
|
488
|
+
var NPM_PERMISSION_REMEDIES = {
|
|
489
|
+
"global-prefix": "fix-npm-prefix",
|
|
490
|
+
"file-in-use": "close-node-programs"
|
|
491
|
+
};
|
|
488
492
|
var remedyForError = (error) => {
|
|
489
493
|
if (error instanceof NpmMissingError) return "install-node";
|
|
490
|
-
if (error instanceof NpmPermissionError) return
|
|
494
|
+
if (error instanceof NpmPermissionError) return NPM_PERMISSION_REMEDIES[error.kind];
|
|
491
495
|
return "retry-agent";
|
|
492
496
|
};
|
|
493
497
|
var agentFailureFromError = (agent, error, describeError) => ({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
pusharyFetch
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-RZCTGLUJ.js";
|
|
4
4
|
import {
|
|
5
5
|
NetworkError
|
|
6
6
|
} from "./chunk-7QLSKOSU.js";
|
|
@@ -9,11 +9,11 @@ import {
|
|
|
9
9
|
} from "./chunk-KZERVKTD.js";
|
|
10
10
|
import {
|
|
11
11
|
getBaseUrl
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-XQ4HTTBB.js";
|
|
13
13
|
import {
|
|
14
14
|
isValidApiKey,
|
|
15
15
|
normalizeKeyScope
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-6HMCOGKJ.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,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
macAppBridgeAvailable
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-XVNZHIVF.js";
|
|
4
4
|
import {
|
|
5
5
|
keyPrefix
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-4ABHSCFJ.js";
|
|
7
7
|
import {
|
|
8
8
|
bridgeAgentKey
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-YJWEQZJC.js";
|
|
10
10
|
import {
|
|
11
11
|
readJsonSafe
|
|
12
12
|
} from "./chunk-FT7UNIS3.js";
|
|
13
13
|
import {
|
|
14
14
|
isValidApiKey
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-6HMCOGKJ.js";
|
|
16
16
|
|
|
17
17
|
// src/shared-mcp-key.ts
|
|
18
18
|
var asRecord = (value) => value !== null && typeof value === "object" && !Array.isArray(value) ? value : void 0;
|
|
@@ -6,38 +6,38 @@ import {
|
|
|
6
6
|
} from "./chunk-6WEC3KZP.js";
|
|
7
7
|
import {
|
|
8
8
|
ensureDaemonRunning
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-HPMP6QQD.js";
|
|
10
10
|
import {
|
|
11
11
|
buildTranscriptRecords,
|
|
12
12
|
decodePublicKey,
|
|
13
13
|
generateSessionKey,
|
|
14
14
|
wrapSessionKey
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-XGHXQUDG.js";
|
|
16
16
|
import {
|
|
17
17
|
fetchTranscriptRecipients,
|
|
18
18
|
uploadTranscriptRecords
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-ATDOYZXC.js";
|
|
20
20
|
import {
|
|
21
21
|
transcriptEnvironmentPreference,
|
|
22
22
|
transcriptsEnabled
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-2V2CCTGQ.js";
|
|
24
24
|
import {
|
|
25
25
|
hookOwnerOf
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-Q4EQHBA7.js";
|
|
27
27
|
import {
|
|
28
28
|
readTranscriptPreference
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-4ABHSCFJ.js";
|
|
30
30
|
import {
|
|
31
31
|
codexHome,
|
|
32
32
|
pusharyDir
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-YJWEQZJC.js";
|
|
34
34
|
import {
|
|
35
35
|
writeJsonAtomic
|
|
36
36
|
} from "./chunk-FT7UNIS3.js";
|
|
37
37
|
import {
|
|
38
38
|
getApiKey,
|
|
39
39
|
getBaseUrl
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-XQ4HTTBB.js";
|
|
41
41
|
|
|
42
42
|
// src/transcript-registration.ts
|
|
43
43
|
import { createHash } from "crypto";
|
|
@@ -2,23 +2,23 @@ import {
|
|
|
2
2
|
CLAUDE_HOOK_EVENTS,
|
|
3
3
|
GEMINI_HOOK_EVENTS,
|
|
4
4
|
hasGeminiHooks
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-VOIN2NZW.js";
|
|
6
6
|
import {
|
|
7
7
|
AGENT_CHOICES
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-YONHM5BQ.js";
|
|
9
9
|
import {
|
|
10
10
|
BELL_HOOK_BINARY
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-MMIN6VNU.js";
|
|
12
12
|
import {
|
|
13
13
|
CODEX_HOOK_EVENTS,
|
|
14
14
|
hasCodexHooks,
|
|
15
15
|
holdBudgetOf
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-YJWEQZJC.js";
|
|
17
17
|
import {
|
|
18
18
|
CURSOR_GATE_EVENTS,
|
|
19
19
|
HOOK_LOCATOR_BINARY,
|
|
20
20
|
hookCommandHoldBudget
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-6HMCOGKJ.js";
|
|
22
22
|
|
|
23
23
|
// src/diagnostics/bridge.ts
|
|
24
24
|
import { execFileSync } from "child_process";
|
|
@@ -2,25 +2,25 @@ import {
|
|
|
2
2
|
SIGNED_OUT_ON_MAC_MESSAGE,
|
|
3
3
|
describeSignedOutKey,
|
|
4
4
|
readSignedOutDiagnosis
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-2YAHQ763.js";
|
|
6
6
|
import {
|
|
7
7
|
createIo
|
|
8
8
|
} from "./chunk-FO3MDD26.js";
|
|
9
9
|
import {
|
|
10
10
|
readKeySource
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-4ABHSCFJ.js";
|
|
12
12
|
import {
|
|
13
13
|
absoluteUrl,
|
|
14
14
|
checkApiKey,
|
|
15
15
|
describeKeyCheck,
|
|
16
16
|
keyCheckFromResponse
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-NESTNKCA.js";
|
|
18
18
|
import {
|
|
19
19
|
EXIT
|
|
20
20
|
} from "./chunk-KZERVKTD.js";
|
|
21
21
|
import {
|
|
22
22
|
getBaseUrl
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-XQ4HTTBB.js";
|
|
24
24
|
|
|
25
25
|
// src/cli/report-key.ts
|
|
26
26
|
var { dim, yellow } = createIo();
|
|
@@ -14,19 +14,19 @@ import {
|
|
|
14
14
|
} from "./chunk-FO3MDD26.js";
|
|
15
15
|
import {
|
|
16
16
|
callMcpTool
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-HILWD7WM.js";
|
|
18
18
|
import {
|
|
19
19
|
reportedInstallSource
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-MID7BURF.js";
|
|
21
21
|
import {
|
|
22
22
|
NPX_LATEST_COMMAND
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-LHGB64O2.js";
|
|
24
24
|
import {
|
|
25
25
|
NO_PAIRING_COMPUTER,
|
|
26
26
|
PAIR_TTL_SECONDS,
|
|
27
27
|
classifyConfirmResponse,
|
|
28
28
|
isAnswerSource
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-6HMCOGKJ.js";
|
|
30
30
|
|
|
31
31
|
// src/reach.ts
|
|
32
32
|
var reachVerdict = (channels) => {
|
|
@@ -746,10 +746,10 @@ var describePairingScreen = (screen) => [
|
|
|
746
746
|
bold("Connect your phone"),
|
|
747
747
|
"Scan this with your phone's camera or the Pushary app.",
|
|
748
748
|
`${dim("Or open on your phone:")} ${cyan(screen.universalLink)}`,
|
|
749
|
-
`Your phone will show ${cyan(screen.fingerprint)}. Check it matches.`,
|
|
750
749
|
`${dim("Already have the app and it opened a browser? Use")} ${cyan(screen.deepLink)}`,
|
|
751
750
|
dim(PAIR_GET_APP_LINE)
|
|
752
751
|
];
|
|
752
|
+
var describePairingFingerprint = (fingerprint) => `Your phone will show ${cyan(fingerprint)}. Check it matches.`;
|
|
753
753
|
var SYSTEM_PAIR_CLOCK = { now: () => Date.now(), sleep };
|
|
754
754
|
var startPairing = async (cliPublicKey, computer) => {
|
|
755
755
|
try {
|
|
@@ -853,10 +853,11 @@ var connectViaAppPairing = async (options = {}) => {
|
|
|
853
853
|
}
|
|
854
854
|
const { pairId, code } = started;
|
|
855
855
|
const { qrLink, universalLink, deepLink } = buildPairLinks(pairId, keypair.publicKeyB64, apiBase(), code);
|
|
856
|
-
for (const line of describePairingScreen({ universalLink,
|
|
856
|
+
for (const line of describePairingScreen({ universalLink, deepLink })) {
|
|
857
857
|
console.log(` ${line}`);
|
|
858
858
|
}
|
|
859
859
|
await printQr(qrLink);
|
|
860
|
+
console.log(` ${describePairingFingerprint(publicKeyFingerprint(keypair.publicKeyB64))}`);
|
|
860
861
|
const startedAt = clock.now();
|
|
861
862
|
const deadline = requestedAt + PAIR_TIMEOUT_MS;
|
|
862
863
|
let hintShown = false;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
readExistingMachineId
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-XJGGGDHX.js";
|
|
4
4
|
import {
|
|
5
5
|
NetworkError
|
|
6
6
|
} from "./chunk-7QLSKOSU.js";
|
|
7
7
|
import {
|
|
8
8
|
getBaseUrl
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-XQ4HTTBB.js";
|
|
10
10
|
import {
|
|
11
11
|
clientContextHeaders,
|
|
12
12
|
getPackageVersion
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-6HMCOGKJ.js";
|
|
14
14
|
|
|
15
15
|
// src/cli/net.ts
|
|
16
16
|
import { createRequire } from "module";
|