@pushary/agent-hooks 1.9.45 → 1.9.47
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 +11 -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 +142 -76
- 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 +22 -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 +37 -30
- 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 +36 -36
- 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-YXGWG5PO.js → chunk-3F3JHJPS.js} +5 -5
- package/dist/{chunk-OHFC3GJY.js → chunk-3KSN65VJ.js} +1 -1
- package/dist/{chunk-R7ZQHAVL.js → chunk-3RAWTKWW.js} +2 -2
- package/dist/{chunk-7SGYCU5C.js → chunk-4MJ46JA7.js} +1 -1
- package/dist/{chunk-SFQSOBLM.js → chunk-6VFP72GX.js} +3 -3
- package/dist/{chunk-HHX6IRSH.js → chunk-6W64IVG3.js} +1 -1
- package/dist/{chunk-YWIFK2UB.js → chunk-6WFJCUWO.js} +2 -2
- package/dist/{chunk-ZSY6BWUD.js → chunk-7JUISFZ7.js} +2 -2
- package/dist/{chunk-335ZDJ7R.js → chunk-7VLY6RHG.js} +1 -1
- package/dist/{chunk-CFMCV6Z7.js → chunk-ADKWE35P.js} +2 -2
- package/dist/{chunk-WM76AN4X.js → chunk-AIDH46DC.js} +10 -10
- package/dist/{chunk-S6EGJBI5.js → chunk-BS457P5Z.js} +1 -1
- package/dist/{chunk-3PM62C2R.js → chunk-CVCOZWSB.js} +8 -8
- package/dist/{chunk-U45OINYS.js → chunk-DDS472RO.js} +1 -1
- package/dist/{chunk-DSGB5JLG.js → chunk-DPF6WDCX.js} +4 -4
- package/dist/{chunk-SIN7NJD7.js → chunk-DRQVZHWE.js} +1 -1
- package/dist/{chunk-K7EGWMDU.js → chunk-DY5PQSQB.js} +116 -31
- package/dist/{chunk-ASK2MSD2.js → chunk-FDDZEYGM.js} +5 -5
- package/dist/{chunk-FOUK4CBO.js → chunk-FWQ2O5BI.js} +4 -4
- package/dist/{chunk-6TYKZ4DN.js → chunk-FY6ZTTDQ.js} +3 -3
- package/dist/{chunk-CDERSTBO.js → chunk-GLVPA4EK.js} +5 -5
- package/dist/{chunk-KS7NA5CK.js → chunk-GOTCSFLS.js} +7 -7
- package/dist/{chunk-2FUHSKXH.js → chunk-J3CYUXGX.js} +4 -4
- package/dist/{chunk-N2K3BSCA.js → chunk-K2KGB7TK.js} +5 -5
- package/dist/{chunk-WDIX4XZH.js → chunk-K2YVKKYV.js} +2 -2
- package/dist/{chunk-PWUIPQ2I.js → chunk-KQDHOQRG.js} +3 -3
- package/dist/{chunk-46F4BRUQ.js → chunk-LFMC5AE2.js} +1 -1
- package/dist/{chunk-QQXP3CQA.js → chunk-LQRPQXAG.js} +1 -1
- package/dist/{chunk-WPPKXVV3.js → chunk-M47U54AO.js} +2 -2
- package/dist/{chunk-IOVJVGIT.js → chunk-MCL5IS6A.js} +4 -4
- package/dist/{chunk-7URSJMAB.js → chunk-MM472M4O.js} +1 -1
- package/dist/{chunk-EH5ZDG6V.js → chunk-MZQ5M6F6.js} +4 -4
- package/dist/{chunk-XFHISCJM.js → chunk-N6JNKOKJ.js} +5 -5
- package/dist/{chunk-VO6XI6AX.js → chunk-OL7QCMQK.js} +3 -3
- package/dist/{chunk-H4ODQD3Y.js → chunk-P4RKBBHE.js} +2 -2
- package/dist/{chunk-5DCZL3BC.js → chunk-PHKISQPB.js} +3 -3
- package/dist/{chunk-EWC4P4ZL.js → chunk-PRQMACC7.js} +1 -1
- package/dist/{chunk-ECFEYB6Z.js → chunk-R7AMICLS.js} +1 -1
- package/dist/{chunk-AUOSFZJ3.js → chunk-RDVDW3WK.js} +5 -5
- package/dist/{chunk-GQ5KCVGK.js → chunk-ROQSYB3T.js} +6 -6
- package/dist/{chunk-YK7FGPYS.js → chunk-S3657KK2.js} +3 -3
- package/dist/{chunk-RFQWB5ZV.js → chunk-T3QKLW3M.js} +1 -1
- package/dist/{chunk-RBJWPUI6.js → chunk-TP5SLM2I.js} +8 -4
- package/dist/{chunk-U6Z56IQS.js → chunk-TSI25WVW.js} +2 -2
- package/dist/{chunk-BT57FUMT.js → chunk-UFTPB3LZ.js} +2 -2
- package/dist/{chunk-EKGQEDQ4.js → chunk-UIPZSSBC.js} +2 -2
- package/dist/{chunk-57M4ERJK.js → chunk-VE4LQ23C.js} +1 -1
- package/dist/{chunk-4A6VUVXV.js → chunk-VQZ4FP6Z.js} +1 -1
- package/dist/{chunk-2DORVRDB.js → chunk-VVJUH4SV.js} +2 -2
- package/dist/{chunk-6JPDAUFP.js → chunk-WHHNQA4C.js} +19 -10
- package/dist/{chunk-NJN5NRHZ.js → chunk-WOE46HSM.js} +4 -4
- package/dist/{chunk-P2F3JUFX.js → chunk-X6ILS4XE.js} +4 -4
- package/dist/{chunk-IKYI63RF.js → chunk-YCKGZOKV.js} +6 -6
- package/dist/{chunk-IFT3GU7Y.js → chunk-YENJWLN4.js} +2 -2
- package/dist/{chunk-2SXXH6JY.js → chunk-ZHZTFA76.js} +5 -5
- package/dist/{chunk-GZSSAY6N.js → chunk-ZR2EPWW4.js} +9 -9
- package/dist/{global-upgrade-U6NWZA5W.js → global-upgrade-KHP36X27.js} +6 -6
- package/dist/{paths-IQTB3ZZI.js → paths-63XAPFWJ.js} +2 -2
- package/dist/{reapply-LILGWJO3.js → reapply-Y2EXWAWE.js} +20 -20
- package/dist/src/index.js +19 -19
- package/dist/{upgrade-lock-2BVFIDU4.js → upgrade-lock-RF3LR2HC.js} +3 -3
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SETUP_FLAGS
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-3KSN65VJ.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-VE4LQ23C.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-DY5PQSQB.js";
|
|
21
21
|
|
|
22
22
|
// src/cli/cowork.ts
|
|
23
23
|
import { readFileSync } from "fs";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
pusharyDir
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-MCL5IS6A.js";
|
|
4
4
|
import {
|
|
5
5
|
readJsonSafe
|
|
6
6
|
} from "./chunk-AQFEP65J.js";
|
|
7
7
|
import {
|
|
8
8
|
isRecord
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-DY5PQSQB.js";
|
|
10
10
|
|
|
11
11
|
// src/process-ownership.ts
|
|
12
12
|
import { createHash, randomUUID } from "crypto";
|
|
@@ -5,16 +5,16 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
NOTIFICATION_MATCHED_TYPES,
|
|
7
7
|
POSTTOOLUSE_MIRRORED_TOOLS
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-6W64IVG3.js";
|
|
9
9
|
import {
|
|
10
10
|
isProtectedByScope,
|
|
11
11
|
registerHookEntry
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-MCL5IS6A.js";
|
|
13
13
|
import {
|
|
14
14
|
CLAUDE_PRETOOLUSE_MATCHER,
|
|
15
15
|
HOOK_BUDGETS,
|
|
16
16
|
HOOK_LOCATOR_BINARY
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-DY5PQSQB.js";
|
|
18
18
|
|
|
19
19
|
// src/gemini-config.ts
|
|
20
20
|
var GEMINI_HOOK_BINARY = "pushary-gemini-hook";
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
readControlMode
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-S3657KK2.js";
|
|
4
4
|
import {
|
|
5
5
|
needsShell,
|
|
6
6
|
spawnClaude
|
|
7
7
|
} from "./chunk-XHKBHWLX.js";
|
|
8
8
|
import {
|
|
9
9
|
getMachineId
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-VQZ4FP6Z.js";
|
|
11
11
|
import {
|
|
12
12
|
pusharyDir,
|
|
13
13
|
resolveGlobalBinary
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-MCL5IS6A.js";
|
|
15
15
|
import {
|
|
16
16
|
readJsonSafe,
|
|
17
17
|
writeFileAtomic,
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
} from "./chunk-AQFEP65J.js";
|
|
21
21
|
import {
|
|
22
22
|
getApiKey
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-PRQMACC7.js";
|
|
24
24
|
import {
|
|
25
25
|
CLI_PACKAGE_NAMES,
|
|
26
26
|
cmdShimTarget,
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
globalPackageFolder,
|
|
29
29
|
globalRootFor,
|
|
30
30
|
isRecord
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-DY5PQSQB.js";
|
|
32
32
|
|
|
33
33
|
// src/daemon-lifecycle.ts
|
|
34
34
|
import { dirname, join, win32 as win32Path } from "path";
|
|
@@ -4,26 +4,26 @@ import {
|
|
|
4
4
|
hasDaemonServiceDefinition,
|
|
5
5
|
readDaemonNeedsLogin,
|
|
6
6
|
readDaemonStatus
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-RDVDW3WK.js";
|
|
8
8
|
import {
|
|
9
9
|
readControlMode,
|
|
10
10
|
readKeySource
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-S3657KK2.js";
|
|
12
12
|
import {
|
|
13
13
|
detectProviderLiveCapabilities,
|
|
14
14
|
expectedLaunchCapabilities,
|
|
15
15
|
hasSpawnProvider,
|
|
16
16
|
resolveControlPolicy
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-M47U54AO.js";
|
|
18
18
|
import {
|
|
19
19
|
getMachineId
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-VQZ4FP6Z.js";
|
|
21
21
|
import {
|
|
22
22
|
getBaseUrl
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-PRQMACC7.js";
|
|
24
24
|
import {
|
|
25
25
|
getPackageVersion
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-DY5PQSQB.js";
|
|
27
27
|
|
|
28
28
|
// src/machines.ts
|
|
29
29
|
import { hostname } from "os";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
resolveInstallSourceFor
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-ADKWE35P.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-PRQMACC7.js";
|
|
13
13
|
import {
|
|
14
14
|
API_KEY_PREFIX_PATTERN,
|
|
15
15
|
isRecord
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-DY5PQSQB.js";
|
|
17
17
|
|
|
18
18
|
// src/shell-alias.ts
|
|
19
19
|
import { homedir } from "os";
|
|
@@ -3,18 +3,18 @@ import {
|
|
|
3
3
|
addGeminiMcpServer,
|
|
4
4
|
removeGeminiMcpServer,
|
|
5
5
|
supportedClaudeEvents
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-PHKISQPB.js";
|
|
7
7
|
import {
|
|
8
8
|
CLAUDE_CODE_AGENT,
|
|
9
9
|
compatibleToolLookup
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-ZR2EPWW4.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-MCL5IS6A.js";
|
|
18
18
|
import {
|
|
19
19
|
HOOK_LOCATOR_BINARY,
|
|
20
20
|
PHONE_ANSWERED_TOOLS,
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
pusharyMissingReason,
|
|
26
26
|
refusalOutput,
|
|
27
27
|
withHookHoldBudget
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-DY5PQSQB.js";
|
|
29
29
|
|
|
30
30
|
// src/claude-config.ts
|
|
31
31
|
import { join } from "path";
|
|
@@ -284,6 +284,9 @@ var compatibleTargetPaths = (profile, home) => compatibleTargetFiles(profile).ma
|
|
|
284
284
|
var compatibleConfigFile = (profile, home) => compatibleFilePath(profile.configFile, home);
|
|
285
285
|
var compatibleMcpFile = (profile, home) => profile.mcp ? compatibleFilePath(profile.mcp.file, home) : null;
|
|
286
286
|
var compatibleInstructionsFile = (profile, home) => profile.instructions ? compatibleFilePath(profile.instructions.file, home) : null;
|
|
287
|
+
var PUSHARY_OWNED_FILE_STEM = "pushary";
|
|
288
|
+
var isPusharyOwnedFile = (file) => file.path.at(-1)?.split(".")[0] === PUSHARY_OWNED_FILE_STEM;
|
|
289
|
+
var isEmptiedPusharyOwnedDocument = (file, document) => isPusharyOwnedFile(file) && Object.keys(document).length === 0;
|
|
287
290
|
var asRecord2 = (value) => value && typeof value === "object" && !Array.isArray(value) ? value : void 0;
|
|
288
291
|
var ensureRecord2 = (target, key) => {
|
|
289
292
|
const existing = asRecord2(target[key]);
|
|
@@ -490,6 +493,7 @@ export {
|
|
|
490
493
|
compatibleConfigFile,
|
|
491
494
|
compatibleMcpFile,
|
|
492
495
|
compatibleInstructionsFile,
|
|
496
|
+
isEmptiedPusharyOwnedDocument,
|
|
493
497
|
compatibleHookEvents,
|
|
494
498
|
addCompatibleToolPermissions,
|
|
495
499
|
addCompatibleHooks,
|
|
@@ -8,10 +8,10 @@ import {
|
|
|
8
8
|
codexHooksJsonIn,
|
|
9
9
|
isPusharyCodexCommand,
|
|
10
10
|
resolvePathBinary
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-MCL5IS6A.js";
|
|
12
12
|
import {
|
|
13
13
|
getPackageVersion
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-DY5PQSQB.js";
|
|
15
15
|
|
|
16
16
|
// src/codex-app-server.ts
|
|
17
17
|
import { existsSync, realpathSync } from "fs";
|
|
@@ -3,11 +3,11 @@ import {
|
|
|
3
3
|
decodePublicKey,
|
|
4
4
|
generateSessionKey,
|
|
5
5
|
wrapSessionKey
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-DRQVZHWE.js";
|
|
7
7
|
import {
|
|
8
8
|
fetchTranscriptRecipients,
|
|
9
9
|
uploadTranscriptRecords
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-T3QKLW3M.js";
|
|
11
11
|
|
|
12
12
|
// src/live-session.ts
|
|
13
13
|
var MAX_TRANSCRIPT_QUEUE = 100;
|
|
@@ -4,13 +4,13 @@ import {
|
|
|
4
4
|
postLiveSession,
|
|
5
5
|
postLiveSessionUntilAccepted,
|
|
6
6
|
startLiveSessionHeartbeat
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-UIPZSSBC.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-P4RKBBHE.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-GLVPA4EK.js";
|
|
25
25
|
import {
|
|
26
26
|
callMcpTool,
|
|
27
27
|
isRetryable
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-6VFP72GX.js";
|
|
29
29
|
import {
|
|
30
30
|
AGENT_QUESTION_DESCRIPTION_MAX,
|
|
31
31
|
AGENT_QUESTION_HEADER_MAX,
|
|
@@ -33,7 +33,9 @@ import {
|
|
|
33
33
|
ASK_CONTEXT_MAX,
|
|
34
34
|
ASK_QUESTION_MAX,
|
|
35
35
|
CODEX_NATIVE_APPROVAL_CAPABILITY,
|
|
36
|
+
CODEX_NATIVE_APPROVAL_CHOICES,
|
|
36
37
|
CODEX_NATIVE_APPROVAL_METHODS,
|
|
38
|
+
CODEX_NATIVE_APPROVAL_REPLIES,
|
|
37
39
|
PERSONAL_QUESTION_CAPABILITY,
|
|
38
40
|
canonicalJsonText,
|
|
39
41
|
codexNativeApprovalResponse,
|
|
@@ -44,7 +46,7 @@ import {
|
|
|
44
46
|
parseCodexQuestions,
|
|
45
47
|
planElicitationAsk,
|
|
46
48
|
readElicitationFields
|
|
47
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-DY5PQSQB.js";
|
|
48
50
|
|
|
49
51
|
// src/codex-question-owner.ts
|
|
50
52
|
import { createHash } from "crypto";
|
|
@@ -164,7 +166,7 @@ var CodexNativeApprovals = class {
|
|
|
164
166
|
this.pending.delete(id);
|
|
165
167
|
this.retired.add(id);
|
|
166
168
|
if (!nativeClosed && !this.closed && !pending.replied && !this.options.shared) {
|
|
167
|
-
this.options.reply(id, codexNativeApprovalResponse(pending.approval,
|
|
169
|
+
this.options.reply(id, codexNativeApprovalResponse(pending.approval, CODEX_NATIVE_APPROVAL_CHOICES.deny));
|
|
168
170
|
pending.replied = true;
|
|
169
171
|
}
|
|
170
172
|
const task = this.cleanup(pending, nativeClosed).finally(() => {
|
|
@@ -181,6 +183,7 @@ var CodexNativeApprovals = class {
|
|
|
181
183
|
correlationId: pending.correlationId,
|
|
182
184
|
claimId: pending.claimId,
|
|
183
185
|
localSurfaceAvailable: this.options.shared,
|
|
186
|
+
acceptsAllowReply: true,
|
|
184
187
|
cwd: pending.cwd,
|
|
185
188
|
repoKey: pending.repoKey
|
|
186
189
|
});
|
|
@@ -213,12 +216,18 @@ var CodexNativeApprovals = class {
|
|
|
213
216
|
pending.creating = false;
|
|
214
217
|
}
|
|
215
218
|
if (signal.aborted) return;
|
|
216
|
-
if (created.kind ===
|
|
217
|
-
this.options.reply(pending.owner.requestId, codexNativeApprovalResponse(pending.approval,
|
|
219
|
+
if (created.kind === CODEX_NATIVE_APPROVAL_REPLIES.deny) {
|
|
220
|
+
this.options.reply(pending.owner.requestId, codexNativeApprovalResponse(pending.approval, CODEX_NATIVE_APPROVAL_CHOICES.deny));
|
|
218
221
|
pending.replied = true;
|
|
219
222
|
return;
|
|
220
223
|
}
|
|
221
|
-
if (created.kind
|
|
224
|
+
if (created.kind === CODEX_NATIVE_APPROVAL_REPLIES.allow && pending.approval.options.includes(CODEX_NATIVE_APPROVAL_CHOICES.once)) {
|
|
225
|
+
this.options.reply(pending.owner.requestId, codexNativeApprovalResponse(pending.approval, CODEX_NATIVE_APPROVAL_CHOICES.once));
|
|
226
|
+
pending.replied = true;
|
|
227
|
+
return;
|
|
228
|
+
}
|
|
229
|
+
if (created.kind === CODEX_NATIVE_APPROVAL_REPLIES.native && this.options.shared) return;
|
|
230
|
+
if (created.kind !== CODEX_NATIVE_APPROVAL_REPLIES.ask || !pending.correlationId) throw new Error("Native approval unavailable");
|
|
222
231
|
let answer = null;
|
|
223
232
|
while (!signal.aborted) {
|
|
224
233
|
const result = await callMcpTool(
|
|
@@ -245,7 +254,7 @@ var CodexNativeApprovals = class {
|
|
|
245
254
|
await this.post(pending, "reply_queued", AbortSignal.timeout(3e3));
|
|
246
255
|
} catch {
|
|
247
256
|
if (!pending.controller.signal.aborted && !this.options.signal.aborted && !this.closed && !this.options.shared && !pending.replied) {
|
|
248
|
-
this.options.reply(pending.owner.requestId, codexNativeApprovalResponse(pending.approval,
|
|
257
|
+
this.options.reply(pending.owner.requestId, codexNativeApprovalResponse(pending.approval, CODEX_NATIVE_APPROVAL_CHOICES.deny));
|
|
249
258
|
pending.replied = true;
|
|
250
259
|
}
|
|
251
260
|
if (!pending.controller.signal.aborted && !this.options.signal.aborted) writeDegraded("questions", { reason: "native_approval_unavailable", fallback: this.options.shared ? "native client" : "refused", event: pending.owner.method });
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
openCodeConfigDirFrom
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-3F3JHJPS.js";
|
|
4
4
|
import {
|
|
5
5
|
grokHome
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-TP5SLM2I.js";
|
|
7
7
|
import {
|
|
8
8
|
codexHomeFrom,
|
|
9
9
|
resolvePathBinary
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-MCL5IS6A.js";
|
|
11
11
|
import {
|
|
12
12
|
HOOK_COMPATIBLE_PROFILES
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-DY5PQSQB.js";
|
|
14
14
|
|
|
15
15
|
// src/hermes-config.ts
|
|
16
16
|
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-6WFJCUWO.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-S3657KK2.js";
|
|
12
12
|
import {
|
|
13
13
|
absoluteUrl,
|
|
14
14
|
checkApiKey,
|
|
15
15
|
describeKeyCheck,
|
|
16
16
|
keyCheckFromResponse
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-KQDHOQRG.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-PRQMACC7.js";
|
|
24
24
|
|
|
25
25
|
// src/cli/report-key.ts
|
|
26
26
|
var { dim, yellow } = createIo();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
announceSubscriptionRequired,
|
|
3
3
|
isDeferAnswer
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-R7AMICLS.js";
|
|
5
5
|
import {
|
|
6
6
|
AUTO_DECISION_WINDOW_MS,
|
|
7
7
|
DEFAULT_SESSION,
|
|
@@ -10,24 +10,24 @@ import {
|
|
|
10
10
|
permissionDeniedAction,
|
|
11
11
|
releaseThrottle,
|
|
12
12
|
reportEvent
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-ZR2EPWW4.js";
|
|
14
14
|
import {
|
|
15
15
|
askUser,
|
|
16
16
|
isDecisionStopped,
|
|
17
17
|
waitForQuestion
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-GLVPA4EK.js";
|
|
19
19
|
import {
|
|
20
20
|
SubscriptionRequiredError
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-6VFP72GX.js";
|
|
22
22
|
import {
|
|
23
23
|
getMachineId
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-VQZ4FP6Z.js";
|
|
25
25
|
import {
|
|
26
26
|
machineDecisionFor,
|
|
27
27
|
parseAgentQuestionAnswers,
|
|
28
28
|
shouldDeferToNativeMode,
|
|
29
29
|
wireVerdictFor
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-DY5PQSQB.js";
|
|
31
31
|
|
|
32
32
|
// src/machine-decision-audit.ts
|
|
33
33
|
import { basename } from "path";
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-POFBE6ZY.js";
|
|
4
4
|
import {
|
|
5
5
|
autoUpdateState
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-MCL5IS6A.js";
|
|
7
7
|
import {
|
|
8
8
|
readJsonSafe,
|
|
9
9
|
writeJsonAtomic
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
globalUpgradeEntry,
|
|
16
16
|
isAutoUpdateResult,
|
|
17
17
|
ownPackageRoot
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-DY5PQSQB.js";
|
|
19
19
|
|
|
20
20
|
// src/auto-update.ts
|
|
21
21
|
import { spawn } from "child_process";
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
forkFinishWithUpgradeLock,
|
|
5
5
|
installWithUpgradeLock,
|
|
6
6
|
releaseAutoUpdateLock
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-BS457P5Z.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-YENJWLN4.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-MCL5IS6A.js";
|
|
31
31
|
import {
|
|
32
32
|
NPX_LATEST_COMMAND
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-VE4LQ23C.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-DY5PQSQB.js";
|
|
43
43
|
|
|
44
44
|
// src/global-upgrade.ts
|
|
45
45
|
import { existsSync } from "fs";
|
|
@@ -2,10 +2,10 @@ import {
|
|
|
2
2
|
IDLE_PROMPT_NOTIFICATION,
|
|
3
3
|
NOTIFICATION_PUSH_TYPES,
|
|
4
4
|
POSTTOOLUSE_MIRROR_ONLY_TOOLS
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-6W64IVG3.js";
|
|
6
6
|
import {
|
|
7
7
|
reportedInstallSource
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-ADKWE35P.js";
|
|
9
9
|
import {
|
|
10
10
|
cancelQuestion,
|
|
11
11
|
clientErrorKindOf,
|
|
@@ -14,29 +14,30 @@ import {
|
|
|
14
14
|
reportClientError,
|
|
15
15
|
sendNotification,
|
|
16
16
|
waitForAnswer
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-GLVPA4EK.js";
|
|
18
18
|
import {
|
|
19
19
|
withRetry
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-6VFP72GX.js";
|
|
21
21
|
import {
|
|
22
22
|
getMachineId
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-VQZ4FP6Z.js";
|
|
24
24
|
import {
|
|
25
25
|
canonicalJson
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-MCL5IS6A.js";
|
|
27
27
|
import {
|
|
28
28
|
writeFileAtomic
|
|
29
29
|
} from "./chunk-AQFEP65J.js";
|
|
30
30
|
import {
|
|
31
31
|
getApiKey,
|
|
32
32
|
getBaseUrl
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-PRQMACC7.js";
|
|
34
34
|
import {
|
|
35
35
|
ACTION_BODY_MAX,
|
|
36
36
|
AGENTS,
|
|
37
37
|
AGENT_LABELS_BY_TYPE,
|
|
38
38
|
BLANK_TASK_INPUT_TOOL,
|
|
39
39
|
BLOCKED_ACTION_GRANT_TTL_SECONDS,
|
|
40
|
+
CODEX_SHELL_COMMAND_FLAGS,
|
|
40
41
|
DECISION_LINE_MAX,
|
|
41
42
|
FILE_TARGET_TOOLS,
|
|
42
43
|
GATE_MAX_TOOL_INPUTS,
|
|
@@ -63,7 +64,7 @@ import {
|
|
|
63
64
|
toToolLookup,
|
|
64
65
|
truncateLine,
|
|
65
66
|
unansweredRefusalReason
|
|
66
|
-
} from "./chunk-
|
|
67
|
+
} from "./chunk-DY5PQSQB.js";
|
|
67
68
|
|
|
68
69
|
// ../hook-mapping/src/describe.ts
|
|
69
70
|
import { isAbsolute, relative, resolve } from "path";
|
|
@@ -682,7 +683,6 @@ var CODEX_GUARDIAN_THREAD_SOURCE = "guardian_review";
|
|
|
682
683
|
var CODEX_PLANNED_ACTION_MARKER = "Planned action JSON:\n";
|
|
683
684
|
var CODEX_APPROVAL_REQUEST_END = ">>> APPROVAL REQUEST END";
|
|
684
685
|
var CODEX_SHELL_TOOL = "exec_command";
|
|
685
|
-
var CODEX_SHELL_COMMAND_FLAGS = ["-lc", "-c"];
|
|
686
686
|
var nonEmptyString = (value) => typeof value === "string" && value.length > 0 ? value : void 0;
|
|
687
687
|
var isTimestamp = (value) => typeof value === "string" && Number.isFinite(Date.parse(value));
|
|
688
688
|
var readCodexTurnContext = (line) => {
|
|
@@ -5,15 +5,15 @@ import {
|
|
|
5
5
|
readGlobalUpgradeSubject,
|
|
6
6
|
upgradeInstalledPackage,
|
|
7
7
|
withUpgradeLock
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-ZHZTFA76.js";
|
|
9
|
+
import "./chunk-BS457P5Z.js";
|
|
10
|
+
import "./chunk-YENJWLN4.js";
|
|
11
11
|
import "./chunk-POFBE6ZY.js";
|
|
12
12
|
import "./chunk-KZERVKTD.js";
|
|
13
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-MCL5IS6A.js";
|
|
14
14
|
import "./chunk-AQFEP65J.js";
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
15
|
+
import "./chunk-VE4LQ23C.js";
|
|
16
|
+
import "./chunk-DY5PQSQB.js";
|
|
17
17
|
export {
|
|
18
18
|
finishGlobalUpgrade,
|
|
19
19
|
finishUpgradeWithLock,
|