@pushary/agent-hooks 1.9.47 → 1.9.49
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/dist/bin/pushary-bell-hook.js +25 -25
- package/dist/bin/pushary-bell.js +9 -9
- package/dist/bin/pushary-claude.js +24 -24
- package/dist/bin/pushary-clean.js +29 -29
- package/dist/bin/pushary-codex-bridge.js +18 -18
- package/dist/bin/pushary-codex-hook.js +30 -30
- package/dist/bin/pushary-codex-session.js +19 -18
- 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 +32 -32
- package/dist/bin/pushary-disconnect.js +24 -24
- package/dist/bin/pushary-doctor.js +34 -34
- 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 +24 -24
- 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 +62 -41
- 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-PHKISQPB.js → chunk-25SYEAW4.js} +3 -3
- package/dist/{chunk-DPF6WDCX.js → chunk-34AQAQKW.js} +4 -4
- package/dist/{chunk-KQDHOQRG.js → chunk-34RXPM5U.js} +3 -3
- package/dist/{chunk-6WFJCUWO.js → chunk-4PCJ6DYK.js} +2 -2
- package/dist/{chunk-X6ILS4XE.js → chunk-5Q2FRMPC.js} +4 -4
- package/dist/{chunk-GOTCSFLS.js → chunk-7RMSB4A2.js} +7 -7
- package/dist/{chunk-FY6ZTTDQ.js → chunk-ABMEBN2R.js} +3 -3
- package/dist/{chunk-YENJWLN4.js → chunk-APASKZ2I.js} +2 -2
- package/dist/{chunk-GLVPA4EK.js → chunk-AWMMABVB.js} +5 -5
- package/dist/{chunk-6W64IVG3.js → chunk-B7LV6W7U.js} +1 -1
- package/dist/{chunk-7JUISFZ7.js → chunk-BOVSUH4N.js} +2 -2
- package/dist/{chunk-UIPZSSBC.js → chunk-BXK6ZJVJ.js} +2 -2
- package/dist/{chunk-N6JNKOKJ.js → chunk-DH4BWFU7.js} +5 -5
- package/dist/{chunk-YCKGZOKV.js → chunk-EP6S6VY3.js} +6 -6
- package/dist/{chunk-P4RKBBHE.js → chunk-FPKQGWAF.js} +2 -2
- package/dist/{chunk-UFTPB3LZ.js → chunk-GDDXGBTM.js} +2 -2
- package/dist/{chunk-VVJUH4SV.js → chunk-HXRH7ZCK.js} +2 -2
- package/dist/{chunk-R7AMICLS.js → chunk-IF2UPWD2.js} +1 -1
- package/dist/{chunk-4MJ46JA7.js → chunk-JGNYCRB2.js} +1 -1
- package/dist/{chunk-FWQ2O5BI.js → chunk-K73CBZKW.js} +4 -4
- package/dist/{chunk-BS457P5Z.js → chunk-KBGKWB5T.js} +1 -1
- package/dist/{chunk-ADKWE35P.js → chunk-KEAIIVW3.js} +2 -2
- package/dist/{chunk-TSI25WVW.js → chunk-KIO2MZQC.js} +2 -2
- package/dist/{chunk-T3QKLW3M.js → chunk-KK2DIUVV.js} +1 -1
- package/dist/{chunk-3F3JHJPS.js → chunk-LLRYP5TR.js} +5 -5
- package/dist/{chunk-VQZ4FP6Z.js → chunk-LY3OJFBW.js} +1 -1
- package/dist/{chunk-6VFP72GX.js → chunk-LZYJMSOY.js} +3 -3
- package/dist/{chunk-DY5PQSQB.js → chunk-OR5F63C2.js} +6 -2
- package/dist/{chunk-MM472M4O.js → chunk-OW4DNSQ6.js} +1 -1
- package/dist/{chunk-M47U54AO.js → chunk-OWQHE2VV.js} +8 -2
- package/dist/{chunk-3RAWTKWW.js → chunk-OZLGTMIY.js} +2 -2
- package/dist/{chunk-3KSN65VJ.js → chunk-PA54A437.js} +1 -1
- package/dist/{chunk-OL7QCMQK.js → chunk-PXUNPXOX.js} +3 -3
- package/dist/{chunk-ROQSYB3T.js → chunk-QYBL4EHD.js} +6 -6
- package/dist/{chunk-MZQ5M6F6.js → chunk-SALUTWPX.js} +4 -4
- package/dist/{chunk-WHHNQA4C.js → chunk-SE4JFMLW.js} +11 -8
- package/dist/{chunk-AIDH46DC.js → chunk-TGCIFEDE.js} +10 -10
- package/dist/{chunk-K2KGB7TK.js → chunk-TYTIDEBW.js} +5 -5
- package/dist/{chunk-CVCOZWSB.js → chunk-UCF3EZZL.js} +8 -8
- package/dist/{chunk-J3CYUXGX.js → chunk-UHVD7BSV.js} +4 -4
- package/dist/{chunk-WOE46HSM.js → chunk-VCZN7NAB.js} +4 -4
- package/dist/{chunk-PRQMACC7.js → chunk-VUS6QGND.js} +1 -1
- package/dist/{chunk-FDDZEYGM.js → chunk-WEY5ZHDB.js} +5 -5
- package/dist/{chunk-K2YVKKYV.js → chunk-WLT6J3SB.js} +2 -2
- package/dist/{chunk-7VLY6RHG.js → chunk-X3RCIOIH.js} +1 -1
- package/dist/{chunk-S3657KK2.js → chunk-XH3F66VD.js} +3 -3
- package/dist/{chunk-DRQVZHWE.js → chunk-XNZB274I.js} +1 -1
- package/dist/{chunk-DDS472RO.js → chunk-XTVEW2NG.js} +1 -1
- package/dist/{chunk-TP5SLM2I.js → chunk-Y74IJ2IO.js} +4 -4
- package/dist/{chunk-LFMC5AE2.js → chunk-Y7WD72J7.js} +1 -1
- package/dist/{chunk-LQRPQXAG.js → chunk-YTYXFA5M.js} +1 -1
- package/dist/{chunk-ZR2EPWW4.js → chunk-YVO4HIHX.js} +8 -8
- package/dist/{chunk-RDVDW3WK.js → chunk-ZMYLVFXC.js} +5 -5
- package/dist/{chunk-VE4LQ23C.js → chunk-ZOKMGBPR.js} +1 -1
- package/dist/{chunk-ZHZTFA76.js → chunk-ZTTCYHOM.js} +5 -5
- package/dist/{chunk-MCL5IS6A.js → chunk-ZYYQJSIO.js} +4 -4
- package/dist/{global-upgrade-KHP36X27.js → global-upgrade-AIUSS2YH.js} +6 -6
- package/dist/{paths-63XAPFWJ.js → paths-RO34TYNM.js} +2 -2
- package/dist/{reapply-Y2EXWAWE.js → reapply-KTNPP4XE.js} +20 -20
- package/dist/src/index.js +19 -19
- package/dist/{upgrade-lock-RF3LR2HC.js → upgrade-lock-5UAGXIW7.js} +3 -3
- package/package.json +1 -1
|
@@ -8,10 +8,10 @@ import {
|
|
|
8
8
|
codexHooksJsonIn,
|
|
9
9
|
isPusharyCodexCommand,
|
|
10
10
|
resolvePathBinary
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-ZYYQJSIO.js";
|
|
12
12
|
import {
|
|
13
13
|
getPackageVersion
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-OR5F63C2.js";
|
|
15
15
|
|
|
16
16
|
// src/codex-app-server.ts
|
|
17
17
|
import { existsSync, realpathSync } from "fs";
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
compatibleConfigFile
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-Y74IJ2IO.js";
|
|
4
4
|
import {
|
|
5
5
|
hookOwnerOf,
|
|
6
6
|
hookOwnerOfCommands,
|
|
7
7
|
liveBridgeProbe,
|
|
8
8
|
resolveBridgeStub
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-WEY5ZHDB.js";
|
|
10
10
|
import {
|
|
11
11
|
AGENT_CHOICES
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-PA54A437.js";
|
|
13
13
|
import {
|
|
14
14
|
claudeSettings,
|
|
15
15
|
codexHooksJson,
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
guardedArgv,
|
|
19
19
|
pusharyDir,
|
|
20
20
|
vscodePluginDir
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-ZYYQJSIO.js";
|
|
22
22
|
import {
|
|
23
23
|
readJsonSafe
|
|
24
24
|
} from "./chunk-AQFEP65J.js";
|
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
OPENCODE_APPROVAL_EVENT,
|
|
30
30
|
hookCompatibleProfile,
|
|
31
31
|
isRecord
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-OR5F63C2.js";
|
|
33
33
|
|
|
34
34
|
// src/opencode-plugin.ts
|
|
35
35
|
var OPENCODE_PLUGIN_MARKER = "pushary-opencode-plugin w1";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
keyCheckFromResponse
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-34RXPM5U.js";
|
|
4
4
|
import {
|
|
5
5
|
installNetworkDefaults
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-ABMEBN2R.js";
|
|
7
7
|
import {
|
|
8
8
|
getBaseUrl
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-VUS6QGND.js";
|
|
10
10
|
|
|
11
11
|
// src/retry.ts
|
|
12
12
|
var isRetryable = (err) => {
|
|
@@ -1047,7 +1047,7 @@ var basenameOf = (token) => {
|
|
|
1047
1047
|
const slash = Math.max(token.lastIndexOf("/"), token.lastIndexOf("\\"));
|
|
1048
1048
|
return slash === -1 ? token : token.slice(slash + 1);
|
|
1049
1049
|
};
|
|
1050
|
-
var
|
|
1050
|
+
var TRUSTED_EXE_DIRECTORIES = [
|
|
1051
1051
|
"/bin/",
|
|
1052
1052
|
"/sbin/",
|
|
1053
1053
|
"/usr/bin/",
|
|
@@ -1055,10 +1055,11 @@ var TRUSTED_EXE_PREFIXES = [
|
|
|
1055
1055
|
"/usr/local/bin/",
|
|
1056
1056
|
"/opt/homebrew/bin/"
|
|
1057
1057
|
];
|
|
1058
|
+
var isDirectlyInside = (path, directory) => path === `${directory}${basenameOf(path)}`;
|
|
1058
1059
|
var isTrustedExecutable = (first) => {
|
|
1059
1060
|
if (!first.includes("/")) return true;
|
|
1060
1061
|
if (first.includes("..")) return false;
|
|
1061
|
-
return
|
|
1062
|
+
return TRUSTED_EXE_DIRECTORIES.some((directory) => isDirectlyInside(first, directory));
|
|
1062
1063
|
};
|
|
1063
1064
|
|
|
1064
1065
|
// ../contracts/src/powershell-analysis.ts
|
|
@@ -2585,6 +2586,8 @@ var SETUP_CONTROL_FAILURE_STAGES = [
|
|
|
2585
2586
|
"unsupported"
|
|
2586
2587
|
];
|
|
2587
2588
|
var isSetupControlFailureStage = (value) => typeof value === "string" && SETUP_CONTROL_FAILURE_STAGES.includes(value);
|
|
2589
|
+
var SETUP_CONTROL_PREREQUISITES = ["provider", "service-manager"];
|
|
2590
|
+
var isSetupControlPrerequisite = (value) => typeof value === "string" && SETUP_CONTROL_PREREQUISITES.includes(value);
|
|
2588
2591
|
var SETUP_CONNECT_OUTCOMES = ["answered", "delivered", "unreachable", "skipped"];
|
|
2589
2592
|
var isSetupConnectOutcome = (value) => typeof value === "string" && SETUP_CONNECT_OUTCOMES.includes(value);
|
|
2590
2593
|
var CLI_VERSION_MAX_LENGTH = 64;
|
|
@@ -2609,6 +2612,7 @@ var readSetupOutcomeProperties = (body) => {
|
|
|
2609
2612
|
skippedAgents: readSetupAgentChoices(body.skippedAgents),
|
|
2610
2613
|
closingReason: readOptional(body.closingReason, isSetupClosingReason),
|
|
2611
2614
|
controlFailureStage: readOptional(body.controlFailureStage, isSetupControlFailureStage),
|
|
2615
|
+
controlMissingPrerequisite: readOptional(body.controlMissingPrerequisite, isSetupControlPrerequisite),
|
|
2612
2616
|
connectMode: readOptional(body.connectMode, isSetupConnectMode),
|
|
2613
2617
|
connectOutcome: readOptional(body.connectOutcome, isSetupConnectOutcome),
|
|
2614
2618
|
keyCheck: readOptional(body.keyCheck, isSetupKeyCheck),
|
|
@@ -10,10 +10,10 @@ import {
|
|
|
10
10
|
resolvePackageVersionFromBinary,
|
|
11
11
|
resolvePathBinary,
|
|
12
12
|
resolvePathBinaryAsync
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-ZYYQJSIO.js";
|
|
14
14
|
import {
|
|
15
15
|
MANAGED_PROVIDERS
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-OR5F63C2.js";
|
|
17
17
|
|
|
18
18
|
// src/setup/codex-install.ts
|
|
19
19
|
var NATIVE_BINARY_MIN_BYTES = 20 * 1024 * 1024;
|
|
@@ -118,6 +118,11 @@ var resolveControlPolicy = (input) => {
|
|
|
118
118
|
if (input.providerAvailable && input.managerAvailable) return "enabled";
|
|
119
119
|
return input.servicePresent ? "legacy" : "unsupported";
|
|
120
120
|
};
|
|
121
|
+
var missingControlPrerequisite = (input) => {
|
|
122
|
+
if (!input.providerAvailable) return "provider";
|
|
123
|
+
if (!input.managerAvailable) return "service-manager";
|
|
124
|
+
return null;
|
|
125
|
+
};
|
|
121
126
|
var preferGlobalProviderBinary = (platform) => platform === "win32";
|
|
122
127
|
var resolveProviderBinary = (provider, platform = process.platform) => preferGlobalProviderBinary(platform) ? resolveGlobalBinary(provider) ?? resolvePathBinary(provider, platform) : resolvePathBinary(provider, platform) ?? resolveGlobalBinary(provider);
|
|
123
128
|
var codexBinaryIsBroken = (binary) => codexInstallHealthAt(binary).kind === "binary-missing";
|
|
@@ -189,6 +194,7 @@ export {
|
|
|
189
194
|
launchableProviders,
|
|
190
195
|
hasSpawnProvider,
|
|
191
196
|
resolveControlPolicy,
|
|
197
|
+
missingControlPrerequisite,
|
|
192
198
|
resolveProviderBinary,
|
|
193
199
|
codexBinaryIsBroken,
|
|
194
200
|
detectProviderLiveCapabilities,
|
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
} from "./chunk-AQFEP65J.js";
|
|
5
5
|
import {
|
|
6
6
|
configFilePath
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-VUS6QGND.js";
|
|
8
8
|
import {
|
|
9
9
|
readSetupOutcomeProperties
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-OR5F63C2.js";
|
|
11
11
|
|
|
12
12
|
// src/hooks-spec.ts
|
|
13
13
|
var CURSOR_GATE_SCRIPT = "pushary-gate.mjs";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SETUP_FLAGS
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-PA54A437.js";
|
|
4
4
|
import {
|
|
5
5
|
parseFlags
|
|
6
6
|
} from "./chunk-GMXKITVA.js";
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
} from "./chunk-7QLSKOSU.js";
|
|
10
10
|
import {
|
|
11
11
|
NPX_LATEST_COMMAND
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-ZOKMGBPR.js";
|
|
13
13
|
import {
|
|
14
14
|
CLAUDE_CONNECTOR_GUIDE,
|
|
15
15
|
CLAUDE_CONNECTOR_STEPS,
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
CLAUDE_CONNECTOR_URL,
|
|
18
18
|
COWORK_CONNECTOR_LIMIT,
|
|
19
19
|
COWORK_STANDING_INSTRUCTIONS
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-OR5F63C2.js";
|
|
21
21
|
|
|
22
22
|
// src/cli/cowork.ts
|
|
23
23
|
import { readFileSync } from "fs";
|
|
@@ -4,26 +4,26 @@ import {
|
|
|
4
4
|
hasDaemonServiceDefinition,
|
|
5
5
|
readDaemonNeedsLogin,
|
|
6
6
|
readDaemonStatus
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-ZMYLVFXC.js";
|
|
8
8
|
import {
|
|
9
9
|
readControlMode,
|
|
10
10
|
readKeySource
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-XH3F66VD.js";
|
|
12
12
|
import {
|
|
13
13
|
detectProviderLiveCapabilities,
|
|
14
14
|
expectedLaunchCapabilities,
|
|
15
15
|
hasSpawnProvider,
|
|
16
16
|
resolveControlPolicy
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-OWQHE2VV.js";
|
|
18
18
|
import {
|
|
19
19
|
getMachineId
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-LY3OJFBW.js";
|
|
21
21
|
import {
|
|
22
22
|
getBaseUrl
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-VUS6QGND.js";
|
|
24
24
|
import {
|
|
25
25
|
getPackageVersion
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-OR5F63C2.js";
|
|
27
27
|
|
|
28
28
|
// src/machines.ts
|
|
29
29
|
import { hostname } from "os";
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
registerTranscript
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-UCF3EZZL.js";
|
|
4
4
|
import {
|
|
5
5
|
namedEvent
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-Y74IJ2IO.js";
|
|
7
7
|
import {
|
|
8
8
|
writeDegraded
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-AWMMABVB.js";
|
|
10
10
|
import {
|
|
11
11
|
claudeShapedHookInput,
|
|
12
12
|
hookCompatibleProfileBySource,
|
|
13
13
|
isGrokHookPayload,
|
|
14
14
|
isGrokSessionEndStop
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-OR5F63C2.js";
|
|
16
16
|
|
|
17
17
|
// src/tool-hook-input.ts
|
|
18
18
|
var OPTIONAL_TEXT_FIELDS = ["hook_event_name", "session_id", "cwd", "transcript_path", "tool_use_id", "permission_mode"];
|
|
@@ -4,13 +4,13 @@ import {
|
|
|
4
4
|
postLiveSession,
|
|
5
5
|
postLiveSessionUntilAccepted,
|
|
6
6
|
startLiveSessionHeartbeat
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-BXK6ZJVJ.js";
|
|
8
8
|
import {
|
|
9
9
|
SESSION_IDLE_TIMEOUT_MS,
|
|
10
10
|
describeIdleWindow,
|
|
11
11
|
idleDeadlinePassed,
|
|
12
12
|
startProcessOwnership
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-FPKQGWAF.js";
|
|
14
14
|
import {
|
|
15
15
|
spawnClaude
|
|
16
16
|
} from "./chunk-XHKBHWLX.js";
|
|
@@ -21,11 +21,11 @@ import {
|
|
|
21
21
|
repoKeyFor,
|
|
22
22
|
withdrawQuestion,
|
|
23
23
|
writeDegraded
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-AWMMABVB.js";
|
|
25
25
|
import {
|
|
26
26
|
callMcpTool,
|
|
27
27
|
isRetryable
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-LZYJMSOY.js";
|
|
29
29
|
import {
|
|
30
30
|
AGENT_QUESTION_DESCRIPTION_MAX,
|
|
31
31
|
AGENT_QUESTION_HEADER_MAX,
|
|
@@ -46,7 +46,7 @@ import {
|
|
|
46
46
|
parseCodexQuestions,
|
|
47
47
|
planElicitationAsk,
|
|
48
48
|
readElicitationFields
|
|
49
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-OR5F63C2.js";
|
|
50
50
|
|
|
51
51
|
// src/codex-question-owner.ts
|
|
52
52
|
import { createHash } from "crypto";
|
|
@@ -332,6 +332,7 @@ var FAILURE_MESSAGE_MAX = 240;
|
|
|
332
332
|
var MAX_PENDING_RPC = 8;
|
|
333
333
|
var QUESTION_UNAVAILABLE = "Question unavailable";
|
|
334
334
|
var LOCAL_QUESTION_UNAVAILABLE = "Pushary handed this question to the current client, but this Codex bridge has no local question UI. Continue in an interactive Codex session, or choose a Pushary mode that permits remote questions.";
|
|
335
|
+
var isCodexQuestionLeftWithTheLocalClient = (error) => error instanceof Error && error.message === LOCAL_QUESTION_UNAVAILABLE;
|
|
335
336
|
var MAX_TRANSCRIPT_TEXT = 32 * 1024;
|
|
336
337
|
var MAX_MESSAGE_BUFFERS = 16;
|
|
337
338
|
var JsonRpcClient = class {
|
|
@@ -487,7 +488,7 @@ var JsonRpcClient = class {
|
|
|
487
488
|
if (dispatch) await reportOwnedQuestion(this.bridgeOptions, dispatch, "reply_queued");
|
|
488
489
|
},
|
|
489
490
|
(error) => {
|
|
490
|
-
if (!signal.aborted && !this.closed) this.write({ id, error: { code: -32e3, message: error
|
|
491
|
+
if (!signal.aborted && !this.closed) this.write({ id, error: { code: -32e3, message: isCodexQuestionLeftWithTheLocalClient(error) ? LOCAL_QUESTION_UNAVAILABLE : "No user answer was received through Pushary" } });
|
|
491
492
|
}
|
|
492
493
|
).catch(() => {
|
|
493
494
|
if (!signal.aborted && !this.closed) this.write({ id, error: { code: -32e3, message: "Question delivery is unconfirmed; no automatic retry" } });
|
|
@@ -667,8 +668,9 @@ var answerCodexElicitation = async (options, params, threadId, signal) => {
|
|
|
667
668
|
const content = codexElicitationContent(plan, result.answers);
|
|
668
669
|
if (!content) throw new Error("Invalid elicitation answer");
|
|
669
670
|
return { action: "accept", content };
|
|
670
|
-
} catch {
|
|
671
|
-
|
|
671
|
+
} catch (error) {
|
|
672
|
+
const sharedTerminalAnswersIt = options.shared === true && (signal.aborted || isCodexQuestionLeftWithTheLocalClient(error));
|
|
673
|
+
if (!sharedTerminalAnswersIt) writeDegraded("questions", { reason: "codex_elicitation_unanswered", fallback: "no form answer submitted", event: "mcpServer/elicitation/request" });
|
|
672
674
|
return { action: "cancel", content: null };
|
|
673
675
|
}
|
|
674
676
|
};
|
|
@@ -869,6 +871,7 @@ export {
|
|
|
869
871
|
claimOwnedQuestion,
|
|
870
872
|
reportOwnedQuestion,
|
|
871
873
|
planCodexElicitation,
|
|
874
|
+
isCodexQuestionLeftWithTheLocalClient,
|
|
872
875
|
answerCodexQuestions,
|
|
873
876
|
answerCodexElicitation,
|
|
874
877
|
runCodexBridge
|
|
@@ -4,19 +4,19 @@ import {
|
|
|
4
4
|
outcomeOfFailedAsk,
|
|
5
5
|
reportMachineDenial,
|
|
6
6
|
storedWaitDeadline
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-EP6S6VY3.js";
|
|
8
8
|
import {
|
|
9
9
|
isGatingMoment,
|
|
10
10
|
recordKeylessMoment
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-Y7WD72J7.js";
|
|
12
12
|
import {
|
|
13
13
|
isDeferAnswer,
|
|
14
14
|
oncePerSession
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-IF2UPWD2.js";
|
|
16
16
|
import {
|
|
17
17
|
activeHookSource,
|
|
18
18
|
activeIdentity
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-Y74IJ2IO.js";
|
|
20
20
|
import {
|
|
21
21
|
DEFAULT_SESSION,
|
|
22
22
|
UNNAMED_ACTION,
|
|
@@ -40,7 +40,7 @@ import {
|
|
|
40
40
|
reportEvent,
|
|
41
41
|
scopePathFor,
|
|
42
42
|
settleQuestionsForToolUse
|
|
43
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-YVO4HIHX.js";
|
|
44
44
|
import {
|
|
45
45
|
askUser,
|
|
46
46
|
cancelQuestion,
|
|
@@ -54,17 +54,17 @@ import {
|
|
|
54
54
|
sendNotification,
|
|
55
55
|
waitForQuestion,
|
|
56
56
|
waitsForThePhone
|
|
57
|
-
} from "./chunk-
|
|
57
|
+
} from "./chunk-AWMMABVB.js";
|
|
58
58
|
import {
|
|
59
59
|
getMachineId
|
|
60
|
-
} from "./chunk-
|
|
60
|
+
} from "./chunk-LY3OJFBW.js";
|
|
61
61
|
import {
|
|
62
62
|
getApiKey,
|
|
63
63
|
getBaseUrl
|
|
64
|
-
} from "./chunk-
|
|
64
|
+
} from "./chunk-VUS6QGND.js";
|
|
65
65
|
import {
|
|
66
66
|
NPX_LATEST_COMMAND
|
|
67
|
-
} from "./chunk-
|
|
67
|
+
} from "./chunk-ZOKMGBPR.js";
|
|
68
68
|
import {
|
|
69
69
|
AGENT_QUESTION_STRATEGY,
|
|
70
70
|
AGENT_QUESTION_TOOL,
|
|
@@ -109,7 +109,7 @@ import {
|
|
|
109
109
|
resolveGate,
|
|
110
110
|
timeoutActionWithoutLocalPrompt,
|
|
111
111
|
unansweredRefusalReason
|
|
112
|
-
} from "./chunk-
|
|
112
|
+
} from "./chunk-OR5F63C2.js";
|
|
113
113
|
|
|
114
114
|
// src/claude-permission-rules.ts
|
|
115
115
|
import { readFileSync, statSync } from "fs";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
APPROVAL_SETTINGS_PATH
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-5Q2FRMPC.js";
|
|
4
4
|
import {
|
|
5
5
|
readMacAppAgentKey
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-K73CBZKW.js";
|
|
7
7
|
import {
|
|
8
8
|
findExportedKeyLines,
|
|
9
9
|
isAdoptedMacAppKey,
|
|
@@ -13,13 +13,13 @@ import {
|
|
|
13
13
|
readConfigFileKey,
|
|
14
14
|
readKeySource,
|
|
15
15
|
readMacAppKeyPrefix
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-XH3F66VD.js";
|
|
17
17
|
import {
|
|
18
18
|
absoluteUrl
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-34RXPM5U.js";
|
|
20
20
|
import {
|
|
21
21
|
isValidApiKey
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-OR5F63C2.js";
|
|
23
23
|
|
|
24
24
|
// src/key-revocation.ts
|
|
25
25
|
var SELF_REVOKE_PATH = "/api/v1/server/keys/self/revoke";
|
|
@@ -6,38 +6,38 @@ import {
|
|
|
6
6
|
} from "./chunk-DWQYCOPI.js";
|
|
7
7
|
import {
|
|
8
8
|
ensureDaemonRunning
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-ZMYLVFXC.js";
|
|
10
10
|
import {
|
|
11
11
|
hookOwnerOf
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-WEY5ZHDB.js";
|
|
13
13
|
import {
|
|
14
14
|
transcriptEnvironmentPreference,
|
|
15
15
|
transcriptsEnabled
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-JGNYCRB2.js";
|
|
17
17
|
import {
|
|
18
18
|
readTranscriptPreference
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-XH3F66VD.js";
|
|
20
20
|
import {
|
|
21
21
|
buildTranscriptRecords,
|
|
22
22
|
decodePublicKey,
|
|
23
23
|
generateSessionKey,
|
|
24
24
|
wrapSessionKey
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-XNZB274I.js";
|
|
26
26
|
import {
|
|
27
27
|
fetchTranscriptRecipients,
|
|
28
28
|
uploadTranscriptRecords
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-KK2DIUVV.js";
|
|
30
30
|
import {
|
|
31
31
|
codexHome,
|
|
32
32
|
pusharyDir
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-ZYYQJSIO.js";
|
|
34
34
|
import {
|
|
35
35
|
writeJsonAtomic
|
|
36
36
|
} from "./chunk-AQFEP65J.js";
|
|
37
37
|
import {
|
|
38
38
|
getApiKey,
|
|
39
39
|
getBaseUrl
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-VUS6QGND.js";
|
|
41
41
|
|
|
42
42
|
// src/transcript-registration.ts
|
|
43
43
|
import { createHash } from "crypto";
|
|
@@ -14,19 +14,19 @@ import {
|
|
|
14
14
|
} from "./chunk-FO3MDD26.js";
|
|
15
15
|
import {
|
|
16
16
|
reportedInstallSource
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-KEAIIVW3.js";
|
|
18
18
|
import {
|
|
19
19
|
callMcpTool
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-LZYJMSOY.js";
|
|
21
21
|
import {
|
|
22
22
|
NPX_LATEST_COMMAND
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-ZOKMGBPR.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-OR5F63C2.js";
|
|
30
30
|
|
|
31
31
|
// src/reach.ts
|
|
32
32
|
var reachVerdict = (channels) => {
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
openCodeConfigDirFrom
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-LLRYP5TR.js";
|
|
4
4
|
import {
|
|
5
5
|
grokHome
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-Y74IJ2IO.js";
|
|
7
7
|
import {
|
|
8
8
|
codexHomeFrom,
|
|
9
9
|
resolvePathBinary
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-ZYYQJSIO.js";
|
|
11
11
|
import {
|
|
12
12
|
HOOK_COMPATIBLE_PROFILES
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-OR5F63C2.js";
|
|
14
14
|
|
|
15
15
|
// src/hermes-config.ts
|
|
16
16
|
import { execFileSync } from "child_process";
|
|
@@ -2,23 +2,23 @@ import {
|
|
|
2
2
|
CLAUDE_HOOK_EVENTS,
|
|
3
3
|
GEMINI_HOOK_EVENTS,
|
|
4
4
|
hasGeminiHooks
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-25SYEAW4.js";
|
|
6
6
|
import {
|
|
7
7
|
AGENT_CHOICES
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-PA54A437.js";
|
|
9
9
|
import {
|
|
10
10
|
BELL_HOOK_BINARY
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-XTVEW2NG.js";
|
|
12
12
|
import {
|
|
13
13
|
CODEX_HOOK_EVENTS,
|
|
14
14
|
hasCodexHooks,
|
|
15
15
|
holdBudgetOf
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-ZYYQJSIO.js";
|
|
17
17
|
import {
|
|
18
18
|
CURSOR_GATE_EVENTS,
|
|
19
19
|
HOOK_LOCATOR_BINARY,
|
|
20
20
|
hookCommandHoldBudget
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-OR5F63C2.js";
|
|
22
22
|
|
|
23
23
|
// src/diagnostics/bridge.ts
|
|
24
24
|
import { execFileSync } from "child_process";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
pusharyDir
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-ZYYQJSIO.js";
|
|
4
4
|
import {
|
|
5
5
|
readJsonSafe,
|
|
6
6
|
writeFileAtomic
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
serializeDeclinedAgents,
|
|
14
14
|
withDeclinedAgent,
|
|
15
15
|
withoutDeclinedAgent
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-OR5F63C2.js";
|
|
17
17
|
|
|
18
18
|
// src/declined-agents-file.ts
|
|
19
19
|
import { join } from "path";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
resolveInstallSourceFor
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-KEAIIVW3.js";
|
|
4
4
|
import {
|
|
5
5
|
backupFile,
|
|
6
6
|
readJsonSafe,
|
|
@@ -9,11 +9,11 @@ import {
|
|
|
9
9
|
} from "./chunk-AQFEP65J.js";
|
|
10
10
|
import {
|
|
11
11
|
configFilePath
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-VUS6QGND.js";
|
|
13
13
|
import {
|
|
14
14
|
API_KEY_PREFIX_PATTERN,
|
|
15
15
|
isRecord
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-OR5F63C2.js";
|
|
17
17
|
|
|
18
18
|
// src/shell-alias.ts
|
|
19
19
|
import { homedir } from "os";
|