@pushary/agent-hooks 1.9.17 → 1.9.19
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 +49 -17
- package/data/SKILL.md +1 -1
- package/data/cursor-plugin/.cursor-plugin/plugin.json +1 -1
- package/data/cursor-plugin/CHANGELOG.md +5 -0
- package/data/cursor-plugin/skills/pushary/SKILL.md +1 -1
- package/data/vscode-plugin/skills/pushary/SKILL.md +1 -1
- package/dist/bin/pushary-bell-hook.js +27 -27
- package/dist/bin/pushary-bell.js +10 -10
- package/dist/bin/pushary-claude.js +28 -27
- package/dist/bin/pushary-clean.js +29 -29
- package/dist/bin/pushary-codex-bridge.js +18 -18
- package/dist/bin/pushary-codex-hook.js +32 -32
- package/dist/bin/pushary-codex.js +13 -13
- package/dist/bin/pushary-connect.js +25 -25
- package/dist/bin/pushary-cowork.js +5 -5
- package/dist/bin/pushary-daemon.js +33 -33
- package/dist/bin/pushary-disconnect.js +42 -37
- package/dist/bin/pushary-doctor.js +34 -34
- package/dist/bin/pushary-elicitation-hook.js +27 -27
- package/dist/bin/pushary-gemini-bridge.js +14 -14
- package/dist/bin/pushary-gemini-hook.js +29 -29
- package/dist/bin/pushary-hook.js +31 -31
- package/dist/bin/pushary-login.js +13 -13
- package/dist/bin/pushary-logout.js +11 -11
- package/dist/bin/pushary-mcp.js +10 -10
- package/dist/bin/pushary-mode.js +13 -13
- package/dist/bin/pushary-notification-hook.js +26 -26
- package/dist/bin/pushary-opencode-hook.js +28 -28
- package/dist/bin/pushary-permission-denied-hook.js +31 -31
- package/dist/bin/pushary-permission-hook.js +30 -30
- package/dist/bin/pushary-post-hook.js +26 -26
- package/dist/bin/pushary-prompt-hook.js +26 -26
- package/dist/bin/pushary-session-end-hook.js +26 -26
- package/dist/bin/pushary-session-start-hook.js +30 -30
- package/dist/bin/pushary-setup.js +37 -37
- package/dist/bin/pushary-stats.js +5 -5
- package/dist/bin/pushary-status.js +27 -27
- package/dist/bin/pushary-stop-hook.js +26 -26
- package/dist/bin/pushary-stopfailure-hook.js +26 -26
- package/dist/bin/pushary-suggestions.js +13 -13
- package/dist/bin/pushary-transcript-register.js +19 -19
- package/dist/bin/pushary-transcripts.js +9 -9
- package/dist/bin/pushary-upgrade.js +31 -31
- package/dist/bin/pushary-wait.js +13 -13
- package/dist/bin/pushary.js +7 -7
- package/dist/{chunk-BHBTPKYT.js → chunk-23QKUOEV.js} +2 -2
- package/dist/{chunk-D45B4GNL.js → chunk-2V2CCTGQ.js} +1 -1
- package/dist/{chunk-B4WI4UOX.js → chunk-2YAHQ763.js} +2 -2
- package/dist/{chunk-PJCNX4AA.js → chunk-3FG2VCH3.js} +7 -7
- package/dist/{chunk-TEWUZ3MT.js → chunk-4ABHSCFJ.js} +3 -3
- package/dist/{chunk-UM7CBQS5.js → chunk-5C2GFTWE.js} +1 -1
- package/dist/{chunk-YJCNFRKV.js → chunk-5LQRUBFB.js} +1 -1
- package/dist/{chunk-B45C755V.js → chunk-5PYLU6OS.js} +4 -4
- package/dist/{chunk-DCPJNJN3.js → chunk-5RMD75P2.js} +5 -5
- package/dist/{chunk-35USDKDL.js → chunk-6GQDOO5P.js} +6 -6
- package/dist/{chunk-PYKF2DUY.js → chunk-6TQLZP7F.js} +3 -3
- package/dist/{chunk-SGZJ5LYH.js → chunk-6WEC3KZP.js} +1 -1
- package/dist/{chunk-H3OSAPDD.js → chunk-736I6CBY.js} +1 -1
- package/dist/{chunk-D2ZPTCAL.js → chunk-7TSL3JCX.js} +1 -1
- package/dist/{chunk-SRK4O45T.js → chunk-A6U4RRFM.js} +2 -2
- package/dist/{chunk-IJOITMKQ.js → chunk-ATDOYZXC.js} +1 -1
- package/dist/{chunk-CSKEQDLX.js → chunk-AXG5QMRM.js} +3 -3
- package/dist/{chunk-KWMZDPUJ.js → chunk-B4OS2OVD.js} +3 -3
- package/dist/{chunk-LBUKSO4N.js → chunk-BIQF3C4H.js} +1 -1
- package/dist/{chunk-UJTQCOYP.js → chunk-CRW4P7JU.js} +1 -1
- package/dist/{chunk-P76XTT2Y.js → chunk-DKFAJHLI.js} +6 -6
- package/dist/{chunk-Z4M66PI6.js → chunk-DVLQ4TVD.js} +11 -8
- package/dist/{chunk-73NUMFZG.js → chunk-E2RXTRM2.js} +4 -4
- package/dist/{chunk-GFW4NSYW.js → chunk-FEKP3NJR.js} +4 -4
- package/dist/{chunk-GYLRXSZW.js → chunk-FRZS7XQF.js} +3 -3
- package/dist/{chunk-T7E75EKA.js → chunk-FT7UNIS3.js} +9 -0
- package/dist/{chunk-PILHK3P5.js → chunk-HYPSYXP4.js} +5 -5
- package/dist/{chunk-YCBXYOPI.js → chunk-KRDQQL2X.js} +2 -2
- package/dist/{chunk-AVNOQUNA.js → chunk-KT36OCRW.js} +2 -2
- package/dist/{chunk-YVDFJ6VV.js → chunk-LHGB64O2.js} +1 -1
- package/dist/{chunk-TY2OTJFK.js → chunk-LXYNKZFP.js} +2 -2
- package/dist/{chunk-5DVWWQ7H.js → chunk-MGW26CW7.js} +1 -1
- package/dist/{chunk-NHJUNVMB.js → chunk-MHYXM43K.js} +2 -2
- package/dist/{chunk-UNO3UEDW.js → chunk-MID7BURF.js} +2 -2
- package/dist/{chunk-AEWPTGG2.js → chunk-NILVJ7HV.js} +9 -9
- package/dist/{chunk-5Y4PJEBJ.js → chunk-OWUDBHXW.js} +2 -2
- package/dist/{chunk-2V4NKFHD.js → chunk-QDRDDVLH.js} +4 -4
- package/dist/{chunk-PM7XZ5GJ.js → chunk-QLG6UKIB.js} +5 -5
- package/dist/{chunk-VZA4GGXL.js → chunk-SEZUF33H.js} +5 -5
- package/dist/{chunk-ENR7TJSA.js → chunk-SIOYJRL4.js} +2 -2
- package/dist/{chunk-CUW5CPJJ.js → chunk-SXVXANPI.js} +3 -3
- package/dist/{chunk-5SHOKE4K.js → chunk-T27NT7LJ.js} +4 -4
- package/dist/{chunk-EBABFMC7.js → chunk-TBTCBAQC.js} +15 -14
- package/dist/{chunk-OQTTGULW.js → chunk-TNZYTGAJ.js} +6 -6
- package/dist/{chunk-Z7LEZQSY.js → chunk-UAA4BEYM.js} +3 -3
- package/dist/{chunk-3FBU6HUW.js → chunk-VCLDXVR3.js} +3 -3
- package/dist/{chunk-3LRUBMNK.js → chunk-W4TZAKOD.js} +2 -2
- package/dist/{chunk-QWO5UBVP.js → chunk-XGHXQUDG.js} +1 -1
- package/dist/{chunk-KRSBK5BE.js → chunk-XQ4HTTBB.js} +1 -1
- package/dist/{chunk-XTVOEEZ5.js → chunk-XUUE6MYM.js} +10 -10
- package/dist/{chunk-E755IUIH.js → chunk-YAU4JCYI.js} +3 -3
- package/dist/{chunk-MRMXB6Z6.js → chunk-YONHM5BQ.js} +1 -1
- package/dist/{chunk-PMKC4ZYP.js → chunk-YXYSPMD3.js} +2 -2
- package/dist/{chunk-XGRZU6J4.js → chunk-Z4YQ7ZMO.js} +3 -3
- package/dist/{global-upgrade-MYSWPDKE.js → global-upgrade-XEMENBZA.js} +7 -7
- package/dist/{paths-JFXSQQBD.js → paths-VW5CI5KS.js} +2 -2
- package/dist/{reapply-E3JKAGNS.js → reapply-7KPSIO4L.js} +21 -21
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.js +20 -20
- package/dist/{upgrade-lock-DO5TUCXB.js → upgrade-lock-VT6XMQMB.js} +4 -4
- package/package.json +1 -1
- /package/dist/{chunk-OG5HVCVG.js → chunk-6HMCOGKJ.js} +0 -0
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
compatibleConfigFile
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-E2RXTRM2.js";
|
|
4
4
|
import {
|
|
5
5
|
hookOwnerOf,
|
|
6
6
|
hookOwnerOfCommands,
|
|
7
7
|
liveBridgeProbe,
|
|
8
8
|
resolveBridgeStub
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-SEZUF33H.js";
|
|
10
10
|
import {
|
|
11
11
|
AGENT_CHOICES
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-YONHM5BQ.js";
|
|
13
13
|
import {
|
|
14
14
|
claudeSettings,
|
|
15
15
|
codexHooksJson,
|
|
@@ -18,17 +18,17 @@ import {
|
|
|
18
18
|
guardedArgv,
|
|
19
19
|
pusharyDir,
|
|
20
20
|
vscodePluginDir
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-FEKP3NJR.js";
|
|
22
22
|
import {
|
|
23
23
|
readJsonSafe
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-FT7UNIS3.js";
|
|
25
25
|
import {
|
|
26
26
|
HOOK_BUDGETS,
|
|
27
27
|
HOOK_COMPATIBLE_PROFILES,
|
|
28
28
|
HOOK_LOCATOR_BINARY,
|
|
29
29
|
OPENCODE_APPROVAL_EVENT,
|
|
30
30
|
hookCompatibleProfile
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-6HMCOGKJ.js";
|
|
32
32
|
|
|
33
33
|
// src/opencode-plugin.ts
|
|
34
34
|
var OPENCODE_PLUGIN_MARKER = "pushary-opencode-plugin w1";
|
|
@@ -5,18 +5,18 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
SubscriptionRequiredError,
|
|
7
7
|
callMcpTool
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-SXVXANPI.js";
|
|
9
9
|
import {
|
|
10
10
|
installNetworkDefaults,
|
|
11
11
|
isNetworkFailure
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-B4OS2OVD.js";
|
|
13
13
|
import {
|
|
14
14
|
clientReportClaims
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-FEKP3NJR.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,18 +3,18 @@ import {
|
|
|
3
3
|
addGeminiMcpServer,
|
|
4
4
|
removeGeminiMcpServer,
|
|
5
5
|
supportedClaudeEvents
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-YAU4JCYI.js";
|
|
7
7
|
import {
|
|
8
8
|
CLAUDE_CODE_AGENT,
|
|
9
9
|
parseApplyPatchFiles
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-NILVJ7HV.js";
|
|
11
11
|
import {
|
|
12
12
|
guardBinary,
|
|
13
13
|
guardBinaryRefusing,
|
|
14
14
|
holdBudgetOf,
|
|
15
15
|
isProtectedByScope,
|
|
16
16
|
registerHookEntry
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-FEKP3NJR.js";
|
|
18
18
|
import {
|
|
19
19
|
HOOK_LOCATOR_BINARY,
|
|
20
20
|
PHONE_ANSWERED_TOOLS,
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
refusalOutput,
|
|
25
25
|
toToolLookup,
|
|
26
26
|
withHookHoldBudget
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-6HMCOGKJ.js";
|
|
28
28
|
|
|
29
29
|
// src/claude-config.ts
|
|
30
30
|
import { join } from "path";
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
isReleaseVersion,
|
|
14
14
|
ownPackageName,
|
|
15
15
|
withHookHoldBudget
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-6HMCOGKJ.js";
|
|
17
17
|
|
|
18
18
|
// src/setup/paths.ts
|
|
19
19
|
import { homedir as homedir2 } from "os";
|
|
@@ -382,9 +382,9 @@ var installGlobally = (options) => {
|
|
|
382
382
|
}
|
|
383
383
|
const started = (async () => {
|
|
384
384
|
if (!npmIsOnPath()) throw new NpmMissingError();
|
|
385
|
-
const { withUpgradeLock } = await import("./global-upgrade-
|
|
386
|
-
const { installWithUpgradeLock, ownsUpgradeLock } = await import("./upgrade-lock-
|
|
387
|
-
const { autoUpdateLock: autoUpdateLock2 } = await import("./paths-
|
|
385
|
+
const { withUpgradeLock } = await import("./global-upgrade-XEMENBZA.js");
|
|
386
|
+
const { installWithUpgradeLock, ownsUpgradeLock } = await import("./upgrade-lock-VT6XMQMB.js");
|
|
387
|
+
const { autoUpdateLock: autoUpdateLock2 } = await import("./paths-VW5CI5KS.js");
|
|
388
388
|
let result = "skipped";
|
|
389
389
|
const install = async () => {
|
|
390
390
|
const platform = process.platform;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
compatibleConfigFile,
|
|
3
3
|
hasCompatibleHooks
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-E2RXTRM2.js";
|
|
5
5
|
import {
|
|
6
6
|
pusharyHookExecutable
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-SEZUF33H.js";
|
|
8
8
|
import {
|
|
9
9
|
isProtectedByScope,
|
|
10
10
|
registerHookEntry
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-FEKP3NJR.js";
|
|
12
12
|
|
|
13
13
|
// src/cursor-config.ts
|
|
14
14
|
var hookCommandOf = (entry) => {
|
|
@@ -17,6 +17,14 @@ var readJsonSafe = (filePath) => {
|
|
|
17
17
|
return { kind: "unparseable", error: err, raw };
|
|
18
18
|
}
|
|
19
19
|
};
|
|
20
|
+
var readFileOrMissing = (path) => {
|
|
21
|
+
try {
|
|
22
|
+
return readFileSync(path, "utf-8");
|
|
23
|
+
} catch (error) {
|
|
24
|
+
if (error instanceof Error && "code" in error && error.code === "ENOENT") return null;
|
|
25
|
+
throw error;
|
|
26
|
+
}
|
|
27
|
+
};
|
|
20
28
|
var stamp = () => (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-");
|
|
21
29
|
var backupFile = (filePath) => {
|
|
22
30
|
const target = `${filePath}.pushary-backup-${stamp()}`;
|
|
@@ -60,6 +68,7 @@ var writeJsonAtomicDurable = (filePath, data, mode) => {
|
|
|
60
68
|
|
|
61
69
|
export {
|
|
62
70
|
readJsonSafe,
|
|
71
|
+
readFileOrMissing,
|
|
63
72
|
backupFile,
|
|
64
73
|
writeFileAtomic,
|
|
65
74
|
writeJsonAtomic,
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
macAppBridgeAvailable
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-DKFAJHLI.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-FEKP3NJR.js";
|
|
10
10
|
import {
|
|
11
11
|
readJsonSafe
|
|
12
|
-
} from "./chunk-
|
|
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;
|
|
@@ -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) => {
|
|
@@ -2,10 +2,10 @@ import {
|
|
|
2
2
|
autoUpdateLock,
|
|
3
3
|
installPackageGlobally,
|
|
4
4
|
npmErrorMessage
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-FEKP3NJR.js";
|
|
6
6
|
import {
|
|
7
7
|
writeJsonAtomic
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-FT7UNIS3.js";
|
|
9
9
|
|
|
10
10
|
// src/upgrade-lock.ts
|
|
11
11
|
import { fork } from "child_process";
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
IDLE_PROMPT_NOTIFICATION,
|
|
3
3
|
NOTIFICATION_PUSH_TYPES,
|
|
4
4
|
POSTTOOLUSE_MIRROR_ONLY_TOOLS
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-CRW4P7JU.js";
|
|
6
6
|
import {
|
|
7
7
|
cancelQuestion,
|
|
8
8
|
clientErrorKindOf,
|
|
@@ -10,26 +10,26 @@ import {
|
|
|
10
10
|
reportClientError,
|
|
11
11
|
sendNotification,
|
|
12
12
|
waitForAnswer
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-DVLQ4TVD.js";
|
|
14
14
|
import {
|
|
15
15
|
withRetry
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-SXVXANPI.js";
|
|
17
17
|
import {
|
|
18
18
|
getMachineId
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-KRDQQL2X.js";
|
|
20
20
|
import {
|
|
21
21
|
reportedInstallSource
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-MID7BURF.js";
|
|
23
23
|
import {
|
|
24
24
|
canonicalJson
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-FEKP3NJR.js";
|
|
26
26
|
import {
|
|
27
27
|
writeFileAtomic
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-FT7UNIS3.js";
|
|
29
29
|
import {
|
|
30
30
|
getApiKey,
|
|
31
31
|
getBaseUrl
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-XQ4HTTBB.js";
|
|
33
33
|
import {
|
|
34
34
|
ACTION_BODY_MAX,
|
|
35
35
|
AGENT_LABELS_BY_TYPE,
|
|
@@ -60,7 +60,7 @@ import {
|
|
|
60
60
|
resolvePolicy,
|
|
61
61
|
toToolLookup,
|
|
62
62
|
truncateLine
|
|
63
|
-
} from "./chunk-
|
|
63
|
+
} from "./chunk-6HMCOGKJ.js";
|
|
64
64
|
|
|
65
65
|
// ../hook-mapping/src/describe.ts
|
|
66
66
|
import { isAbsolute, relative, resolve } from "path";
|
|
@@ -10,10 +10,10 @@ import {
|
|
|
10
10
|
resolvePackageVersionFromBinary,
|
|
11
11
|
resolvePathBinary,
|
|
12
12
|
resolvePathBinaryAsync
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-FEKP3NJR.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;
|
|
@@ -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-UAA4BEYM.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();
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
forkFinishWithUpgradeLock,
|
|
5
5
|
installWithUpgradeLock,
|
|
6
6
|
releaseAutoUpdateLock
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-MHYXM43K.js";
|
|
8
8
|
import {
|
|
9
9
|
describeAutoUpdateCheck,
|
|
10
10
|
globalInstallLocation,
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
readAutoUpdateState,
|
|
15
15
|
updateAutoUpdateState,
|
|
16
16
|
upgradeEntryFor
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-VCLDXVR3.js";
|
|
18
18
|
import {
|
|
19
19
|
EXIT
|
|
20
20
|
} from "./chunk-KZERVKTD.js";
|
|
@@ -27,10 +27,10 @@ import {
|
|
|
27
27
|
npmErrorMessage,
|
|
28
28
|
readGlobalCliInstallAt,
|
|
29
29
|
readGlobalPrefix
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-FEKP3NJR.js";
|
|
31
31
|
import {
|
|
32
32
|
NPX_LATEST_COMMAND
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-LHGB64O2.js";
|
|
34
34
|
import {
|
|
35
35
|
commandsPackage,
|
|
36
36
|
globalUpgradeEntry,
|
|
@@ -39,7 +39,7 @@ import {
|
|
|
39
39
|
isSameMajorVersion,
|
|
40
40
|
ownPackageRoot,
|
|
41
41
|
packageVersionAt
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-6HMCOGKJ.js";
|
|
43
43
|
|
|
44
44
|
// src/global-upgrade.ts
|
|
45
45
|
import { existsSync } from "fs";
|
|
@@ -2,23 +2,23 @@ import {
|
|
|
2
2
|
CLAUDE_HOOK_EVENTS,
|
|
3
3
|
GEMINI_HOOK_EVENTS,
|
|
4
4
|
hasGeminiHooks
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-YAU4JCYI.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-7TSL3JCX.js";
|
|
12
12
|
import {
|
|
13
13
|
CODEX_HOOK_EVENTS,
|
|
14
14
|
hasCodexHooks,
|
|
15
15
|
holdBudgetOf
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-FEKP3NJR.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";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
keyCheckFromResponse
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-UAA4BEYM.js";
|
|
4
4
|
import {
|
|
5
5
|
installNetworkDefaults
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-B4OS2OVD.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) => {
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
registerTranscript
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-XUUE6MYM.js";
|
|
4
4
|
import {
|
|
5
5
|
namedEvent
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-E2RXTRM2.js";
|
|
7
7
|
import {
|
|
8
8
|
writeDegraded
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-DVLQ4TVD.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"];
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import {
|
|
2
2
|
defersToNativeMode,
|
|
3
3
|
reportMachineDenial
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-23QKUOEV.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-5LQRUBFB.js";
|
|
15
15
|
import {
|
|
16
16
|
activeHookSource,
|
|
17
17
|
activeIdentity
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-E2RXTRM2.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-NILVJ7HV.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-DVLQ4TVD.js";
|
|
55
56
|
import {
|
|
56
57
|
SubscriptionRequiredError
|
|
57
|
-
} from "./chunk-
|
|
58
|
+
} from "./chunk-SXVXANPI.js";
|
|
58
59
|
import {
|
|
59
60
|
getMachineId
|
|
60
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-KRDQQL2X.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);
|
|
@@ -3,27 +3,27 @@ import {
|
|
|
3
3
|
expectedLaunchCapabilities,
|
|
4
4
|
hasSpawnProvider,
|
|
5
5
|
resolveControlPolicy
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-OWUDBHXW.js";
|
|
7
7
|
import {
|
|
8
8
|
daemonHasRemoteProof,
|
|
9
9
|
daemonServiceManagerAvailable,
|
|
10
10
|
hasDaemonServiceDefinition,
|
|
11
11
|
readDaemonNeedsLogin,
|
|
12
12
|
readDaemonStatus
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-6GQDOO5P.js";
|
|
14
14
|
import {
|
|
15
15
|
readControlMode,
|
|
16
16
|
readKeySource
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-4ABHSCFJ.js";
|
|
18
18
|
import {
|
|
19
19
|
getMachineId
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-KRDQQL2X.js";
|
|
21
21
|
import {
|
|
22
22
|
getBaseUrl
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-XQ4HTTBB.js";
|
|
24
24
|
import {
|
|
25
25
|
getPackageVersion
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-6HMCOGKJ.js";
|
|
27
27
|
|
|
28
28
|
// src/machines.ts
|
|
29
29
|
import { hostname } from "os";
|