pushary 1.9.117 → 1.9.119
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/dist/{api-OXKVQGTP.js → api-WWB7ZOLK.js} +11 -11
- package/dist/bin/pushary-audit.js +3 -3
- package/dist/bin/pushary-bell-hook.js +27 -27
- package/dist/bin/pushary-bell.js +10 -10
- package/dist/bin/pushary-claude.js +35 -40
- package/dist/bin/pushary-clean.js +43 -43
- package/dist/bin/pushary-codex-bridge.js +21 -21
- package/dist/bin/pushary-codex-hook.js +64 -75
- package/dist/bin/pushary-codex-session.js +8 -8
- package/dist/bin/pushary-codex.js +15 -15
- package/dist/bin/pushary-connect.js +28 -28
- package/dist/bin/pushary-cowork.js +5 -5
- package/dist/bin/pushary-daemon.js +44 -44
- package/dist/bin/pushary-disconnect.js +27 -27
- package/dist/bin/pushary-display-hook.js +17 -17
- package/dist/bin/pushary-doctor.js +47 -47
- package/dist/bin/pushary-elicitation-hook.js +27 -27
- package/dist/bin/pushary-gemini-bridge.js +15 -15
- package/dist/bin/pushary-gemini-hook.js +93 -90
- package/dist/bin/pushary-hook.js +33 -32
- package/dist/bin/pushary-login.js +22 -22
- package/dist/bin/pushary-logout.js +26 -26
- package/dist/bin/pushary-mcp.js +12 -12
- package/dist/bin/pushary-mode.js +15 -15
- package/dist/bin/pushary-notification-hook.js +26 -26
- package/dist/bin/pushary-opencode-hook.js +93 -75
- package/dist/bin/pushary-permission-denied-hook.js +33 -32
- package/dist/bin/pushary-permission-hook.js +33 -32
- 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 +35 -35
- package/dist/bin/pushary-setup.js +90 -90
- package/dist/bin/pushary-stats.js +5 -5
- package/dist/bin/pushary-status.js +32 -32
- package/dist/bin/pushary-stop-hook.js +26 -26
- package/dist/bin/pushary-stopfailure-hook.js +26 -26
- package/dist/bin/pushary-suggestions.js +15 -15
- package/dist/bin/pushary-transcript-register.js +17 -17
- package/dist/bin/pushary-transcripts.js +25 -25
- package/dist/bin/pushary-upgrade.js +43 -43
- package/dist/bin/pushary-wait.js +17 -17
- package/dist/bin/pushary.js +7 -7
- package/dist/{chunk-3ZQT5LQ3.js → chunk-2C45MJGK.js} +9 -6
- package/dist/{chunk-H5RGOO3B.js → chunk-2UE2NDCX.js} +1 -1
- package/dist/{chunk-NSCLVG7M.js → chunk-3B7S2H4R.js} +1 -1
- package/dist/{chunk-EXWJBUL5.js → chunk-3IESC326.js} +3 -3
- package/dist/{chunk-PHCZ26TZ.js → chunk-4D23TNCL.js} +4 -4
- package/dist/{chunk-DH23XX7X.js → chunk-4HDX77ND.js} +3 -3
- package/dist/{chunk-NI5KTEVM.js → chunk-4SZM2HRA.js} +6 -6
- package/dist/{chunk-XIJ4ADBX.js → chunk-5HKU4VUL.js} +3 -3
- package/dist/{chunk-EBL6XYOI.js → chunk-5T5T4YXM.js} +1 -1
- package/dist/{chunk-LN6LLUY7.js → chunk-67I7QRQB.js} +1 -1
- package/dist/{chunk-2NN5ODYJ.js → chunk-6KX2H4I5.js} +3 -3
- package/dist/{chunk-BSSD6UWJ.js → chunk-6YLVNFQZ.js} +3 -3
- package/dist/{chunk-U2AB2ZUZ.js → chunk-7CJ7W2RH.js} +4 -4
- package/dist/{chunk-MKTZZPWV.js → chunk-AGXOTZID.js} +5 -5
- package/dist/{chunk-MYSBGQU6.js → chunk-B7BOENW7.js} +1 -1
- package/dist/{chunk-SUMWA5VN.js → chunk-BQ673OOD.js} +2 -2
- package/dist/{chunk-ARRXCME5.js → chunk-CBLFIWPI.js} +2 -2
- package/dist/{chunk-7VPA5PXJ.js → chunk-COXNQUDP.js} +4 -4
- package/dist/{chunk-PHDPS5C7.js → chunk-CXIYGD33.js} +2 -2
- package/dist/{chunk-YEV6CIQZ.js → chunk-DXJUASTS.js} +2 -2
- package/dist/{chunk-X2JY437V.js → chunk-EFFH2FYG.js} +2 -2
- package/dist/{chunk-BJ7FGYF7.js → chunk-EISUEJDT.js} +6 -6
- package/dist/{chunk-4UGNMAQ2.js → chunk-EP6I3MQY.js} +4 -4
- package/dist/{chunk-IUPEFEBH.js → chunk-FPG7X2GS.js} +4 -4
- package/dist/{chunk-5TVOBKRE.js → chunk-G4OVFWU4.js} +20 -14
- package/dist/{chunk-4BV525QE.js → chunk-G5FQU2XF.js} +6 -6
- package/dist/{chunk-NZFYK75R.js → chunk-GAOUWLYN.js} +3 -3
- package/dist/{chunk-2KYPNVRC.js → chunk-GBVTVTDF.js} +1 -1
- package/dist/{chunk-BE6JIWTM.js → chunk-GW3PE52Q.js} +1 -1
- package/dist/{chunk-PPNJ3INA.js → chunk-HYTDNEXV.js} +1 -1
- package/dist/{chunk-K54Y2QFA.js → chunk-ISVHV2DP.js} +1 -1
- package/dist/{chunk-RVYREG7X.js → chunk-JJNF6QU4.js} +1 -1
- package/dist/{chunk-F3Z7UWM6.js → chunk-JKS4MN47.js} +6 -6
- package/dist/{chunk-S5MQA774.js → chunk-K5WTTEIQ.js} +5 -5
- package/dist/{chunk-FKH3KT4U.js → chunk-KILSIJTF.js} +31 -21
- package/dist/{chunk-XU4DUX7K.js → chunk-KOZBVXXC.js} +3 -3
- package/dist/{chunk-TKTNQORW.js → chunk-KVDN4U6W.js} +10 -10
- package/dist/{chunk-RYAWSPAR.js → chunk-L3MCQSES.js} +5 -5
- package/dist/{chunk-MHU7CW7T.js → chunk-MEPYLTWF.js} +10 -10
- package/dist/{chunk-FRIQ4LQ5.js → chunk-MYNLU6DV.js} +2 -2
- package/dist/{chunk-N74WJAL6.js → chunk-NASQPMXW.js} +9 -9
- package/dist/{chunk-XJC6PG7J.js → chunk-NVV3YUTX.js} +2 -2
- package/dist/{chunk-T3UOM443.js → chunk-PDAOZ2NF.js} +10 -10
- package/dist/{chunk-R5ZMI6BM.js → chunk-PJSFKKZ5.js} +1 -1
- package/dist/{chunk-4SI3CUWN.js → chunk-PNSIMPC7.js} +6 -6
- package/dist/{chunk-N4DQDFEP.js → chunk-R3RTISDD.js} +1 -1
- package/dist/{chunk-GJNWZWMA.js → chunk-R67NTMBY.js} +8 -8
- package/dist/{chunk-3OVRAD25.js → chunk-RGXFBS56.js} +3 -3
- package/dist/{chunk-UJGA7WL5.js → chunk-RIAELZYW.js} +2 -2
- package/dist/{chunk-74MC5LRW.js → chunk-SE7P5BBK.js} +1 -1
- package/dist/{chunk-2UYYX6VC.js → chunk-SNKC2IQZ.js} +2 -2
- package/dist/{chunk-DE6ZYZZZ.js → chunk-SQRS4IF2.js} +3 -3
- package/dist/{chunk-G5EB7GAR.js → chunk-SSBETUYZ.js} +3 -3
- package/dist/{chunk-C2NKILG3.js → chunk-TLCJCP5R.js} +1 -1
- package/dist/{chunk-KYWTX4R2.js → chunk-TRDHHF3A.js} +337 -37
- package/dist/{chunk-RCCISH7T.js → chunk-TZYVXTLN.js} +1 -1
- package/dist/{chunk-6ICAZ33G.js → chunk-U32N5JZO.js} +1 -1
- package/dist/{chunk-BL7ESWIQ.js → chunk-UHAUC7EO.js} +2 -2
- package/dist/{chunk-C32IT2TR.js → chunk-V52J2THT.js} +1 -1
- package/dist/chunk-VFZ2PE6U.js +60 -0
- package/dist/{chunk-DZI6MSR4.js → chunk-VMM6JCNQ.js} +2 -2
- package/dist/{chunk-MI56IIXG.js → chunk-VRZOUCIK.js} +2 -2
- package/dist/{chunk-2JQZFGIF.js → chunk-W5ZUDPKV.js} +5 -5
- package/dist/{chunk-ZJKH3CTN.js → chunk-W6LKC5YD.js} +5 -5
- package/dist/{chunk-J3PBLQUD.js → chunk-XBH6OKHD.js} +3 -3
- package/dist/{chunk-SE62HPB7.js → chunk-XNCKBVZX.js} +6 -61
- package/dist/{chunk-SQLXC4PM.js → chunk-YCCLWG7G.js} +6 -6
- package/dist/{chunk-YU3LDR5W.js → chunk-YZ7V2LVG.js} +3 -3
- package/dist/{chunk-MA4KQLCT.js → chunk-YZESBU7F.js} +5 -5
- package/dist/{chunk-FW2SOQ5J.js → chunk-Z3OG44Z4.js} +4 -4
- package/dist/chunk-ZLUAXGAA.js +121 -0
- package/dist/{chunk-6GZU4IYU.js → chunk-ZTVBM3EZ.js} +4 -4
- package/dist/{codex-app-cards-switch-ANBV6CA6.js → codex-app-cards-switch-J6EULXO5.js} +12 -12
- package/dist/{codex-card-routing-POEBILLG.js → codex-card-routing-XNJB6573.js} +2 -2
- package/dist/{codex-desktop-launch-Z4HXKBYP.js → codex-desktop-launch-46ELENBQ.js} +1 -1
- package/dist/{codex-session-launch-XA6BMIVU.js → codex-session-launch-R5FHFWAG.js} +18 -18
- package/dist/{config-ATKVK4QQ.js → config-RKWDMDRY.js} +3 -3
- package/dist/{global-upgrade-BJKCVYJU.js → global-upgrade-E65GJQS6.js} +9 -9
- package/dist/{identity-X3FI7ZYE.js → identity-JRGY2KS6.js} +4 -4
- package/dist/{live-capabilities-6OV363JK.js → live-capabilities-SOO6PD7Y.js} +4 -4
- package/dist/{paths-U67N2RPP.js → paths-G7NZODAY.js} +3 -3
- package/dist/{reapply-L3KVM3ZO.js → reapply-YKN5BKIP.js} +28 -28
- package/dist/src/index.js +32 -31
- package/dist/{upgrade-lock-ZIPY7I2T.js → upgrade-lock-YKAZI3BH.js} +4 -4
- package/dist/{usage-RAJPNVE5.js → usage-QWYNOIU6.js} +3 -3
- package/package.json +2 -2
|
@@ -27,11 +27,11 @@ import {
|
|
|
27
27
|
toolResultErrorText,
|
|
28
28
|
transcriptTokensIn,
|
|
29
29
|
transcriptUsageRequest
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-GW3PE52Q.js";
|
|
31
31
|
import {
|
|
32
32
|
branchFor,
|
|
33
33
|
repoKeyFor
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-SE7P5BBK.js";
|
|
35
35
|
import {
|
|
36
36
|
cancelQuestion,
|
|
37
37
|
clientErrorKindOf,
|
|
@@ -39,34 +39,34 @@ import {
|
|
|
39
39
|
reportClientError,
|
|
40
40
|
sendNotification,
|
|
41
41
|
waitForAnswer
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-NASQPMXW.js";
|
|
43
43
|
import {
|
|
44
44
|
withRetry
|
|
45
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-W6LKC5YD.js";
|
|
46
46
|
import {
|
|
47
47
|
fetchAsCredential
|
|
48
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-U32N5JZO.js";
|
|
49
49
|
import {
|
|
50
50
|
getMachineId
|
|
51
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-TZYVXTLN.js";
|
|
52
52
|
import {
|
|
53
53
|
reportedInstallSource
|
|
54
|
-
} from "./chunk-
|
|
54
|
+
} from "./chunk-VMM6JCNQ.js";
|
|
55
55
|
import {
|
|
56
56
|
IDLE_PROMPT_NOTIFICATION,
|
|
57
57
|
NOTIFICATION_PUSH_TYPES,
|
|
58
58
|
POSTTOOLUSE_MIRROR_ONLY_TOOLS,
|
|
59
59
|
canonicalJson,
|
|
60
60
|
claudeConfigDir
|
|
61
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-CBLFIWPI.js";
|
|
62
62
|
import {
|
|
63
63
|
compareVersion,
|
|
64
64
|
parseVersion
|
|
65
|
-
} from "./chunk-
|
|
65
|
+
} from "./chunk-KOZBVXXC.js";
|
|
66
66
|
import {
|
|
67
67
|
getApiKey,
|
|
68
68
|
getBaseUrl
|
|
69
|
-
} from "./chunk-
|
|
69
|
+
} from "./chunk-R3RTISDD.js";
|
|
70
70
|
import {
|
|
71
71
|
writeFileAtomic,
|
|
72
72
|
writeJsonAtomicDurable
|
|
@@ -84,6 +84,7 @@ import {
|
|
|
84
84
|
gateOutputFor,
|
|
85
85
|
isAutoApprove,
|
|
86
86
|
isClaudeWakePrompt,
|
|
87
|
+
isProvenModeResponse,
|
|
87
88
|
isRecord,
|
|
88
89
|
modeStateFromResponse,
|
|
89
90
|
nativeRecord,
|
|
@@ -94,7 +95,7 @@ import {
|
|
|
94
95
|
resolveAutoResolveOrigin,
|
|
95
96
|
resolvePolicy,
|
|
96
97
|
unansweredRefusalReason
|
|
97
|
-
} from "./chunk-
|
|
98
|
+
} from "./chunk-TRDHHF3A.js";
|
|
98
99
|
|
|
99
100
|
// src/pending.ts
|
|
100
101
|
import { join } from "path";
|
|
@@ -368,7 +369,7 @@ var policyRequestFor = (agentType) => ({
|
|
|
368
369
|
agent: agentType,
|
|
369
370
|
repoAware: REPO_AWARE_AGENTS.includes(agentType)
|
|
370
371
|
});
|
|
371
|
-
var POLICY_CACHE_FORMAT = "
|
|
372
|
+
var POLICY_CACHE_FORMAT = "v3";
|
|
372
373
|
var policyCacheFile = (apiKey, agent, repoAware = false) => {
|
|
373
374
|
const parts = [apiKey, agent, repoAware ? "repoAware" : void 0, "sessionToolAware"].filter(Boolean);
|
|
374
375
|
const hash = createHash2("sha256").update(parts.join(":")).digest("hex").slice(0, 12);
|
|
@@ -413,7 +414,7 @@ var getPolicy = async (apiKey, expectedVersion, agent, repoAware = false, sessio
|
|
|
413
414
|
if (ttlFresh && !versionStale && !sessionStale) {
|
|
414
415
|
return cached;
|
|
415
416
|
}
|
|
416
|
-
if (!sessionStale && age < STALE_CACHE_MAX_MS) staleCache = cached;
|
|
417
|
+
if (!sessionStale && age < STALE_CACHE_MAX_MS) staleCache = versionStale ? { ...cached, knownSuperseded: true } : cached;
|
|
417
418
|
} catch {
|
|
418
419
|
}
|
|
419
420
|
}
|
|
@@ -503,7 +504,12 @@ var fetchModeState = async (apiKey, sessionId, reuseWithinMs = 0, signal) => {
|
|
|
503
504
|
void reportClientError({ kind: "http_status", code: `mode_http_${response.status}` });
|
|
504
505
|
return degradedFallback(apiKey, response.status === 401 || response.status === 403);
|
|
505
506
|
}
|
|
506
|
-
const
|
|
507
|
+
const body = await response.json();
|
|
508
|
+
if (!isProvenModeResponse(body)) {
|
|
509
|
+
void reportClientError({ kind: "invalid_response", code: "mode_response_unproven" });
|
|
510
|
+
return degradedFallback(apiKey);
|
|
511
|
+
}
|
|
512
|
+
const state = modeStateFromResponse(body);
|
|
507
513
|
writeLastGoodMode(apiKey, state, sessionId);
|
|
508
514
|
return state;
|
|
509
515
|
} catch (error) {
|
|
@@ -9,20 +9,20 @@ import {
|
|
|
9
9
|
installedCodexApp,
|
|
10
10
|
readCodexAppRuntime,
|
|
11
11
|
shellQuoted
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-GAOUWLYN.js";
|
|
13
|
+
import {
|
|
14
|
+
CODEX_APP_LAUNCH_AT_LOGIN_VERB,
|
|
15
|
+
CODEX_APP_LAUNCH_VARIABLE
|
|
16
|
+
} from "./chunk-E46NE7FB.js";
|
|
13
17
|
import {
|
|
14
18
|
writeHuman
|
|
15
19
|
} from "./chunk-QCGNGEGE.js";
|
|
16
20
|
import {
|
|
17
21
|
xml
|
|
18
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-EISUEJDT.js";
|
|
19
23
|
import {
|
|
20
24
|
writeFileAtomic
|
|
21
25
|
} from "./chunk-T5I4PKOQ.js";
|
|
22
|
-
import {
|
|
23
|
-
CODEX_APP_LAUNCH_AT_LOGIN_VERB,
|
|
24
|
-
CODEX_APP_LAUNCH_VARIABLE
|
|
25
|
-
} from "./chunk-E46NE7FB.js";
|
|
26
26
|
|
|
27
27
|
// src/codex-app-cards-switch.ts
|
|
28
28
|
import { execFileSync as execFileSync2 } from "child_process";
|
|
@@ -531,8 +531,8 @@ var loadedOnce = (load) => {
|
|
|
531
531
|
};
|
|
532
532
|
|
|
533
533
|
// src/codex-desktop-proxy.ts
|
|
534
|
-
var loadThePhone = () => import("./api-
|
|
535
|
-
var loadTheCardRouting = () => import("./codex-card-routing-
|
|
534
|
+
var loadThePhone = () => import("./api-WWB7ZOLK.js");
|
|
535
|
+
var loadTheCardRouting = () => import("./codex-card-routing-XNJB6573.js");
|
|
536
536
|
var theFirstCardLoadsAgain = () => {
|
|
537
537
|
};
|
|
538
538
|
var ASKS_WITHOUT_ROUTING = {};
|
|
@@ -1085,7 +1085,7 @@ var codexDesktopCommand = async (args, entry, readAccount) => {
|
|
|
1085
1085
|
return runCodexDesktopProxy(engine2, args.slice(3), readAccount, { watchesForCards: layoutIsKnown });
|
|
1086
1086
|
}
|
|
1087
1087
|
if (args[0] === APP_CARDS_FLAG) {
|
|
1088
|
-
const { codexAppCardsCommandOnThisMac } = await import("./codex-app-cards-switch-
|
|
1088
|
+
const { codexAppCardsCommandOnThisMac } = await import("./codex-app-cards-switch-J6EULXO5.js");
|
|
1089
1089
|
return codexAppCardsCommandOnThisMac(args.slice(1), entry, readAccount);
|
|
1090
1090
|
}
|
|
1091
1091
|
if (args.length > 2) throw new Error("Usage: pushary codex --desktop [path/to/Codex.app]");
|
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
forkFinishWithUpgradeLock,
|
|
4
4
|
installWithUpgradeLock,
|
|
5
5
|
releaseAutoUpdateLock
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-EFFH2FYG.js";
|
|
7
7
|
import {
|
|
8
8
|
phoneStartIsRequired
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-SSBETUYZ.js";
|
|
10
10
|
import {
|
|
11
11
|
describeAutoUpdateCheck,
|
|
12
12
|
globalInstallLocation,
|
|
@@ -18,25 +18,25 @@ import {
|
|
|
18
18
|
readAutoUpdateState,
|
|
19
19
|
updateAutoUpdateState,
|
|
20
20
|
upgradeEntryFor
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-MYNLU6DV.js";
|
|
22
22
|
import {
|
|
23
23
|
autoUpdateLock,
|
|
24
24
|
autoUpdateLog,
|
|
25
25
|
autoUpdateState
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-CBLFIWPI.js";
|
|
27
27
|
import {
|
|
28
28
|
execNpm,
|
|
29
29
|
fetchLatestPublishedVersion,
|
|
30
30
|
npmErrorMessage,
|
|
31
31
|
readGlobalCliInstallAt,
|
|
32
32
|
readGlobalPrefix
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-KOZBVXXC.js";
|
|
34
34
|
import {
|
|
35
35
|
EXIT
|
|
36
36
|
} from "./chunk-BG4HHB7E.js";
|
|
37
37
|
import {
|
|
38
38
|
NPX_LATEST_COMMAND
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-PJSFKKZ5.js";
|
|
40
40
|
import {
|
|
41
41
|
commandsPackage,
|
|
42
42
|
globalUpgradeEntry,
|
|
@@ -4,13 +4,13 @@ import {
|
|
|
4
4
|
configFailureKind,
|
|
5
5
|
retryAgentCommand,
|
|
6
6
|
writeSetupConfigFile
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-XBH6OKHD.js";
|
|
8
8
|
import {
|
|
9
9
|
MCP_BRIDGE_BINARY
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-6KX2H4I5.js";
|
|
11
11
|
import {
|
|
12
12
|
KEY_FILE_MODE
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-YZ7V2LVG.js";
|
|
14
14
|
import {
|
|
15
15
|
CLINE_SERVER_NAME_TAKEN,
|
|
16
16
|
CLINE_SETTINGS_REFUSALS,
|
|
@@ -32,10 +32,10 @@ import {
|
|
|
32
32
|
withClinePusharyServer,
|
|
33
33
|
withRefreshedClineKey,
|
|
34
34
|
withoutClinePusharyServer
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-CBLFIWPI.js";
|
|
36
36
|
import {
|
|
37
37
|
resolveGlobalBinary
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-KOZBVXXC.js";
|
|
39
39
|
import {
|
|
40
40
|
readJsonSafe,
|
|
41
41
|
writeFileAtomic,
|
|
@@ -1,31 +1,33 @@
|
|
|
1
1
|
import {
|
|
2
2
|
claudeSettingsLocationFor,
|
|
3
3
|
readClaudePermissionRules
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-DXJUASTS.js";
|
|
5
5
|
import {
|
|
6
6
|
askAgentQuestions,
|
|
7
7
|
defersToNativeMode,
|
|
8
8
|
outcomeOfFailedAsk,
|
|
9
|
-
reportMachineDenial,
|
|
10
9
|
storedWaitDeadline
|
|
11
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-XNCKBVZX.js";
|
|
11
|
+
import {
|
|
12
|
+
reportMachineDenial
|
|
13
|
+
} from "./chunk-VFZ2PE6U.js";
|
|
12
14
|
import {
|
|
13
15
|
isGatingMoment,
|
|
14
16
|
recordKeylessMoment
|
|
15
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-ISVHV2DP.js";
|
|
16
18
|
import {
|
|
17
19
|
isAdmitted,
|
|
18
20
|
readAdmissionRules
|
|
19
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-2C45MJGK.js";
|
|
20
22
|
import {
|
|
21
23
|
isDeferAnswer,
|
|
22
24
|
oncePerSession
|
|
23
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-GBVTVTDF.js";
|
|
24
26
|
import {
|
|
25
27
|
activeHookSource,
|
|
26
28
|
activeIdentity,
|
|
27
29
|
namedSource
|
|
28
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-YZESBU7F.js";
|
|
29
31
|
import {
|
|
30
32
|
DEFAULT_SESSION,
|
|
31
33
|
approvalAwaitingRetry,
|
|
@@ -44,7 +46,7 @@ import {
|
|
|
44
46
|
settleQuestionsForToolUse,
|
|
45
47
|
sweepFilesOlderThan,
|
|
46
48
|
userScope
|
|
47
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-G4OVFWU4.js";
|
|
48
50
|
import {
|
|
49
51
|
UNNAMED_ACTION,
|
|
50
52
|
deriveAction,
|
|
@@ -55,12 +57,12 @@ import {
|
|
|
55
57
|
patchDeletesFiles,
|
|
56
58
|
permissionDeniedAction,
|
|
57
59
|
scopePathFor
|
|
58
|
-
} from "./chunk-
|
|
60
|
+
} from "./chunk-GW3PE52Q.js";
|
|
59
61
|
import {
|
|
60
62
|
branchFor,
|
|
61
63
|
repoKeyFor,
|
|
62
64
|
repositoryScopeFor
|
|
63
|
-
} from "./chunk-
|
|
65
|
+
} from "./chunk-SE7P5BBK.js";
|
|
64
66
|
import {
|
|
65
67
|
askUser,
|
|
66
68
|
cancelQuestion,
|
|
@@ -77,20 +79,20 @@ import {
|
|
|
77
79
|
waitForQuestion,
|
|
78
80
|
waitsForThePhone,
|
|
79
81
|
withdrawQuestion
|
|
80
|
-
} from "./chunk-
|
|
82
|
+
} from "./chunk-NASQPMXW.js";
|
|
81
83
|
import {
|
|
82
84
|
getMachineId
|
|
83
|
-
} from "./chunk-
|
|
85
|
+
} from "./chunk-TZYVXTLN.js";
|
|
84
86
|
import {
|
|
85
87
|
getApiKey,
|
|
86
88
|
getBaseUrl
|
|
87
|
-
} from "./chunk-
|
|
89
|
+
} from "./chunk-R3RTISDD.js";
|
|
88
90
|
import {
|
|
89
91
|
writeFileAtomic
|
|
90
92
|
} from "./chunk-T5I4PKOQ.js";
|
|
91
93
|
import {
|
|
92
94
|
NPX_LATEST_COMMAND
|
|
93
|
-
} from "./chunk-
|
|
95
|
+
} from "./chunk-PJSFKKZ5.js";
|
|
94
96
|
import {
|
|
95
97
|
AGENT_QUESTION_STRATEGY,
|
|
96
98
|
AGENT_QUESTION_TOOL,
|
|
@@ -131,6 +133,7 @@ import {
|
|
|
131
133
|
hasNativeApprovalPrompt,
|
|
132
134
|
hookCompatibleProfileBySource,
|
|
133
135
|
hookHoldWindowMs,
|
|
136
|
+
hookMaxWaitSeconds,
|
|
134
137
|
hookWaitClamped,
|
|
135
138
|
hookWaitDeadline,
|
|
136
139
|
hookWritePath,
|
|
@@ -152,8 +155,9 @@ import {
|
|
|
152
155
|
terminalLiveWait,
|
|
153
156
|
terminalStaysLiveForTheCall,
|
|
154
157
|
timeoutActionWithoutLocalPrompt,
|
|
155
|
-
unansweredRefusalReason
|
|
156
|
-
|
|
158
|
+
unansweredRefusalReason,
|
|
159
|
+
unapprovedScopeReason
|
|
160
|
+
} from "./chunk-TRDHHF3A.js";
|
|
157
161
|
|
|
158
162
|
// src/terminal-answer-watch.ts
|
|
159
163
|
import { closeSync, openSync, readSync, statSync } from "fs";
|
|
@@ -551,6 +555,9 @@ var dispatchModeHandler = async (apiKey, input, toolPolicy, machineId, trainingC
|
|
|
551
555
|
const toolTarget = deriveToolTarget(input.tool_name, input.tool_input);
|
|
552
556
|
const ownPrompt = hasItsOwnApprovalPrompt(ACTIVE_SOURCE);
|
|
553
557
|
const agentPromptFollows = ownPrompt && !isCursorHookPayload(input);
|
|
558
|
+
const scopeQuestionHasNoPrompt = scopeReason !== void 0 && !agentPromptFollows;
|
|
559
|
+
const deliveredWithoutAPrompt = !ownPrompt || scopeQuestionHasNoPrompt;
|
|
560
|
+
const scopeQuestionFromCursor = scopeReason !== void 0 && isCursorHookPayload(input);
|
|
554
561
|
const intent = readLastPrompt(sessionId ?? DEFAULT_SESSION) ?? (input.transcript_path ? readLastUserPrompt(input.transcript_path) : void 0);
|
|
555
562
|
const decision = {
|
|
556
563
|
toolPath: hookWritePath(input.tool_name, input.tool_input),
|
|
@@ -568,7 +575,7 @@ var dispatchModeHandler = async (apiKey, input, toolPolicy, machineId, trainingC
|
|
|
568
575
|
// creates a fresh decision exactly as before.
|
|
569
576
|
toolUseId: input.tool_use_id,
|
|
570
577
|
sessionToolAware: true,
|
|
571
|
-
...
|
|
578
|
+
...deliveredWithoutAPrompt ? { localSurfaceAvailable: false } : {},
|
|
572
579
|
permissionMode: input.permission_mode
|
|
573
580
|
};
|
|
574
581
|
const signals = {};
|
|
@@ -587,29 +594,32 @@ var dispatchModeHandler = async (apiKey, input, toolPolicy, machineId, trainingC
|
|
|
587
594
|
announceWait
|
|
588
595
|
};
|
|
589
596
|
const runHandler = () => {
|
|
590
|
-
const mode =
|
|
597
|
+
const mode = deliveredWithoutAPrompt ? approvalModeWithoutLocalPrompt(toolPolicy.mode) : toolPolicy.mode;
|
|
591
598
|
if (terminalLive && pushesToThePhone(mode)) {
|
|
592
599
|
return handleTerminalLive(apiKey, input, description, projectName, { ...toolPolicy, mode }, terminalLive.holdBudgetSeconds, machineId, toolTarget, decision, signals);
|
|
593
600
|
}
|
|
594
601
|
switch (mode) {
|
|
595
602
|
case "push_only":
|
|
596
|
-
return handlePushOnly(apiKey, permissionAsk, toolPolicy.timeoutSeconds,
|
|
603
|
+
return scopeQuestionFromCursor ? handlePushOnly(apiKey, permissionAsk, cursorScopeWaitSeconds(toolPolicy), CURSOR_SCOPE_TIMEOUT_ACTION, signals) : handlePushOnly(apiKey, permissionAsk, toolPolicy.timeoutSeconds, deliveredWithoutAPrompt ? timeoutActionWithoutLocalPrompt(toolPolicy) : toolPolicy.timeoutAction, signals);
|
|
597
604
|
case "terminal_only":
|
|
598
605
|
return Promise.resolve(handleTerminalOnly());
|
|
599
606
|
case "push_first":
|
|
600
607
|
return handlePushFirst(apiKey, permissionAsk, toolPolicy.pushFirstSeconds, signals);
|
|
601
608
|
case "notify_only":
|
|
602
|
-
return handleNotifyOnly(apiKey, description, projectName, sessionId, machineId);
|
|
609
|
+
return scopeQuestionHasNoPrompt ? Promise.resolve(deny(unapprovedScopeReason(scopeReason))) : handleNotifyOnly(apiKey, description, projectName, sessionId, machineId);
|
|
603
610
|
default:
|
|
604
611
|
return handlePushFirst(apiKey, permissionAsk, toolPolicy.pushFirstSeconds, signals);
|
|
605
612
|
}
|
|
606
613
|
};
|
|
607
|
-
const
|
|
614
|
+
const handled = await runHandler();
|
|
615
|
+
const result = scopeQuestionHasNoPrompt && handled?.hookSpecificOutput?.permissionDecision === "ask" ? deny(unapprovedScopeReason(scopeReason)) : handled;
|
|
608
616
|
if (trainingConsent && signals.humanDecision) {
|
|
609
617
|
emitDecisionEpisode(apiKey, input, toolPolicy, machineId, toolTarget, decision, result);
|
|
610
618
|
}
|
|
611
619
|
return result;
|
|
612
620
|
};
|
|
621
|
+
var CURSOR_SCOPE_TIMEOUT_ACTION = "escalate";
|
|
622
|
+
var cursorScopeWaitSeconds = ({ timeoutSeconds, timeoutAction }) => Math.min(effectiveWaitSeconds(timeoutAction, timeoutSeconds, "cursor"), hookMaxWaitSeconds("cursor"));
|
|
613
623
|
var hasItsOwnApprovalPrompt = (source) => source === null || hasNativeApprovalPrompt(source, "PreToolUse");
|
|
614
624
|
var phoneWaitHandoff = (source, waitSeconds) => {
|
|
615
625
|
if (waitSeconds <= 0) return "Waiting for your answer.";
|
|
@@ -399,9 +399,9 @@ var installGlobally = (options) => {
|
|
|
399
399
|
}
|
|
400
400
|
const started = (async () => {
|
|
401
401
|
if (!npmIsOnPath()) throw new NpmMissingError();
|
|
402
|
-
const { withUpgradeLock } = await import("./global-upgrade-
|
|
403
|
-
const { installWithUpgradeLock, ownsUpgradeLock } = await import("./upgrade-lock-
|
|
404
|
-
const { autoUpdateLock } = await import("./paths-
|
|
402
|
+
const { withUpgradeLock } = await import("./global-upgrade-E65GJQS6.js");
|
|
403
|
+
const { installWithUpgradeLock, ownsUpgradeLock } = await import("./upgrade-lock-YKAZI3BH.js");
|
|
404
|
+
const { autoUpdateLock } = await import("./paths-G7NZODAY.js");
|
|
405
405
|
let result = "skipped";
|
|
406
406
|
const install = async () => {
|
|
407
407
|
const platform = process.platform;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ensureCodexTrustsPusharyHooks
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-NVV3YUTX.js";
|
|
4
4
|
import {
|
|
5
5
|
hermesReceiptPaths,
|
|
6
6
|
hermesSetupPredatesThePluginFolder,
|
|
7
7
|
installHermesPlugin,
|
|
8
8
|
refreshHermesPluginFiles,
|
|
9
9
|
shippedHermesPlugin
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-5HKU4VUL.js";
|
|
11
11
|
import {
|
|
12
12
|
fxIgnoresInstructionsFile,
|
|
13
13
|
fxInstructionsBody,
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
macAppFxBridge,
|
|
17
17
|
refreshClineKey,
|
|
18
18
|
switchFxHttpEntryToBridge
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-K5WTTEIQ.js";
|
|
20
20
|
import {
|
|
21
21
|
OPENCODE_HOOK_BINARY,
|
|
22
22
|
agentHookOwner,
|
|
@@ -28,16 +28,16 @@ import {
|
|
|
28
28
|
openCodePluginDir,
|
|
29
29
|
openCodeWired,
|
|
30
30
|
withOpenCodeAskRules
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-AGXOTZID.js";
|
|
32
32
|
import {
|
|
33
33
|
detectClaudeVersion
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-CXIYGD33.js";
|
|
35
35
|
import {
|
|
36
36
|
addCompatibleHooks,
|
|
37
37
|
compatibleConfigFile,
|
|
38
38
|
compatibleInstructionsFile,
|
|
39
39
|
hasCompatibleHooks
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-YZESBU7F.js";
|
|
41
41
|
import {
|
|
42
42
|
GEMINI_HOOK_BINARY,
|
|
43
43
|
addGeminiHooks,
|
|
@@ -49,7 +49,7 @@ import {
|
|
|
49
49
|
geminiWired,
|
|
50
50
|
hasGeminiHooks,
|
|
51
51
|
planHooks
|
|
52
|
-
} from "./chunk-
|
|
52
|
+
} from "./chunk-COXNQUDP.js";
|
|
53
53
|
import {
|
|
54
54
|
CLAUDE_HOOK_BINARY,
|
|
55
55
|
CLAUDE_HOOK_EVENTS,
|
|
@@ -95,13 +95,13 @@ import {
|
|
|
95
95
|
renderAgentInstructions,
|
|
96
96
|
supportedClaudeEvents,
|
|
97
97
|
vscodePluginMcp
|
|
98
|
-
} from "./chunk-
|
|
98
|
+
} from "./chunk-CBLFIWPI.js";
|
|
99
99
|
import {
|
|
100
100
|
formatVersion,
|
|
101
101
|
hookCommandsUseBareNames,
|
|
102
102
|
resolveGlobalBinDir,
|
|
103
103
|
resolveGlobalBinary
|
|
104
|
-
} from "./chunk-
|
|
104
|
+
} from "./chunk-KOZBVXXC.js";
|
|
105
105
|
import {
|
|
106
106
|
readJsonSafe,
|
|
107
107
|
writeFileAtomic,
|
|
@@ -111,7 +111,7 @@ import {
|
|
|
111
111
|
HOOK_COMPATIBLE_PROFILES,
|
|
112
112
|
isCompatibleAgentType,
|
|
113
113
|
isRecord
|
|
114
|
-
} from "./chunk-
|
|
114
|
+
} from "./chunk-TRDHHF3A.js";
|
|
115
115
|
|
|
116
116
|
// src/reapply.ts
|
|
117
117
|
import { dirname, join } from "path";
|
|
@@ -3,24 +3,24 @@ import {
|
|
|
3
3
|
expectedLaunchCapabilities,
|
|
4
4
|
hasSpawnProvider,
|
|
5
5
|
resolveControlPolicy
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-SSBETUYZ.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-EISUEJDT.js";
|
|
14
14
|
import {
|
|
15
15
|
getMachineId
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-TZYVXTLN.js";
|
|
17
17
|
import {
|
|
18
18
|
readControlMode,
|
|
19
19
|
readKeySource
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-YZ7V2LVG.js";
|
|
21
21
|
import {
|
|
22
22
|
getBaseUrl
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-R3RTISDD.js";
|
|
24
24
|
import {
|
|
25
25
|
getPackageVersion
|
|
26
26
|
} from "./chunk-ZVU6WMMU.js";
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import {
|
|
2
|
-
MANAGED_CLAUDE_SETTINGS_BY_PLATFORM
|
|
3
|
-
} from "./chunk-YEV6CIQZ.js";
|
|
4
1
|
import {
|
|
5
2
|
declinedAgentsFile,
|
|
6
3
|
readDeclinedAgents
|
|
7
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-VRZOUCIK.js";
|
|
5
|
+
import {
|
|
6
|
+
MANAGED_CLAUDE_SETTINGS_BY_PLATFORM
|
|
7
|
+
} from "./chunk-DXJUASTS.js";
|
|
8
8
|
import {
|
|
9
9
|
OPENCODE_HOOK_BINARY,
|
|
10
10
|
openCodeConfigDir,
|
|
11
11
|
openCodePluginArgv,
|
|
12
12
|
openCodePluginFile
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-AGXOTZID.js";
|
|
14
14
|
import {
|
|
15
15
|
liveCursorGateCoverage
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-EP6I3MQY.js";
|
|
17
17
|
import {
|
|
18
18
|
compatibleConfigFile,
|
|
19
19
|
compatibleHookEvents,
|
|
20
20
|
grokHome,
|
|
21
21
|
parseConfigDocument
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-YZESBU7F.js";
|
|
23
23
|
import {
|
|
24
24
|
DEFAULT_HOOKS_KEY_PATH,
|
|
25
25
|
GEMINI_HOOK_BINARY,
|
|
26
26
|
GEMINI_HOOK_EVENTS,
|
|
27
27
|
hooksAt
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-COXNQUDP.js";
|
|
29
29
|
import {
|
|
30
30
|
CODEX_EARLIER_APPROVAL_MATCHERS,
|
|
31
31
|
CODEX_HOOK_BINARY,
|
|
@@ -53,7 +53,7 @@ import {
|
|
|
53
53
|
parseHookArgv,
|
|
54
54
|
parseHookCommand,
|
|
55
55
|
supportedClaudeEvents
|
|
56
|
-
} from "./chunk-
|
|
56
|
+
} from "./chunk-CBLFIWPI.js";
|
|
57
57
|
import {
|
|
58
58
|
readRegularJsonFile,
|
|
59
59
|
readRegularTextFile
|
|
@@ -67,7 +67,7 @@ import {
|
|
|
67
67
|
OPENCODE_APPROVAL_EVENT,
|
|
68
68
|
isRecord,
|
|
69
69
|
matcherMatchesEveryCall
|
|
70
|
-
} from "./chunk-
|
|
70
|
+
} from "./chunk-TRDHHF3A.js";
|
|
71
71
|
|
|
72
72
|
// src/hook-wiring.ts
|
|
73
73
|
import { createHash } from "crypto";
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-POFBE6ZY.js";
|
|
4
4
|
import {
|
|
5
5
|
autoUpdateState
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-CBLFIWPI.js";
|
|
7
7
|
import {
|
|
8
8
|
readJsonSafe,
|
|
9
9
|
writeJsonAtomic
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
} from "./chunk-ZVU6WMMU.js";
|
|
18
18
|
import {
|
|
19
19
|
isAutoUpdateResult
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-TRDHHF3A.js";
|
|
21
21
|
|
|
22
22
|
// src/auto-update.ts
|
|
23
23
|
import { spawn } from "child_process";
|