pushary 1.9.61 → 1.9.63
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 +14 -0
- package/README.md +1 -1
- package/dist/{api-LW3PJQYY.js → api-UHUUAONF.js} +14 -12
- package/dist/bin/pushary-bell-hook.js +27 -27
- package/dist/bin/pushary-bell.js +12 -12
- package/dist/bin/pushary-claude.js +35 -28
- package/dist/bin/pushary-clean.js +35 -34
- package/dist/bin/pushary-codex-bridge.js +21 -21
- package/dist/bin/pushary-codex-hook.js +51 -38
- package/dist/bin/pushary-codex-session.js +8 -8
- package/dist/bin/pushary-codex.js +14 -14
- package/dist/bin/pushary-connect.js +27 -27
- package/dist/bin/pushary-cowork.js +5 -5
- package/dist/bin/pushary-daemon.js +39 -38
- package/dist/bin/pushary-disconnect.js +30 -29
- package/dist/bin/pushary-doctor.js +46 -44
- package/dist/bin/pushary-elicitation-hook.js +30 -28
- package/dist/bin/pushary-gemini-bridge.js +15 -15
- package/dist/bin/pushary-gemini-hook.js +38 -30
- package/dist/bin/pushary-hook.js +32 -31
- package/dist/bin/pushary-login.js +27 -15
- package/dist/bin/pushary-logout.js +28 -28
- package/dist/bin/pushary-mcp.js +11 -11
- package/dist/bin/pushary-mode.js +14 -14
- package/dist/bin/pushary-notification-hook.js +26 -26
- package/dist/bin/pushary-opencode-hook.js +40 -31
- 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 +34 -33
- package/dist/bin/pushary-setup.js +115 -4205
- 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 +14 -14
- package/dist/bin/pushary-transcript-register.js +18 -18
- package/dist/bin/pushary-transcripts.js +62 -9
- package/dist/bin/pushary-upgrade.js +43 -41
- package/dist/bin/pushary-wait.js +14 -14
- package/dist/bin/pushary.js +7 -7
- package/dist/{chunk-ORX5BTV4.js → chunk-2MZ6ROWZ.js} +8 -6
- package/dist/{chunk-7BHI3PZN.js → chunk-3GVV7XVT.js} +1 -1
- package/dist/{chunk-GKFO5JLN.js → chunk-3QLFB2EY.js} +4 -4
- package/dist/{chunk-LBHJJEKT.js → chunk-4WFAP6QN.js} +10 -10
- package/dist/{chunk-PITQ5ZIQ.js → chunk-5JK3DQGZ.js} +2 -2
- package/dist/{chunk-CJ5TCFD4.js → chunk-5LOP4AVD.js} +3 -3
- package/dist/{chunk-ERK24P76.js → chunk-6Z2VR3BA.js} +4 -2
- package/dist/{chunk-K4MBKXAE.js → chunk-75ODMNOM.js} +1 -1
- package/dist/{chunk-YPD3MTFU.js → chunk-7GRQGXF4.js} +1 -1
- package/dist/{chunk-AXJLJJ3M.js → chunk-7NCLUA65.js} +99 -6
- package/dist/{chunk-YDR4BQ7R.js → chunk-AB3VAQ25.js} +3 -3
- package/dist/{chunk-2AELPDMT.js → chunk-BCVCUDFI.js} +16 -5
- package/dist/{chunk-RGSW36XH.js → chunk-BQFL2ECS.js} +3 -3
- package/dist/{chunk-BG4Y64FW.js → chunk-BUQU3OPX.js} +1 -1
- package/dist/{chunk-SHJVFW22.js → chunk-CLABCSZC.js} +4 -4
- package/dist/{chunk-4VRTSDGP.js → chunk-DMNLFWGY.js} +7 -108
- package/dist/{chunk-7MCCXE5Y.js → chunk-EHHTQURL.js} +5 -5
- package/dist/{chunk-XAO6EYGM.js → chunk-ELAK46NR.js} +26 -3
- package/dist/{chunk-JGQV4MDQ.js → chunk-EQ26IKZM.js} +6 -6
- package/dist/{chunk-VX2MJ4X7.js → chunk-FAF5AW3P.js} +9 -9
- package/dist/{chunk-XEJOPVCG.js → chunk-FEAGK25K.js} +1 -1
- package/dist/{chunk-GZCSWDAS.js → chunk-GNUARBRZ.js} +4 -4
- package/dist/{chunk-64S5PQBQ.js → chunk-GZS72NCF.js} +4 -4
- package/dist/{chunk-WFSGCFXQ.js → chunk-HAIXS4OX.js} +2 -6
- package/dist/{chunk-G36T5LAP.js → chunk-HOIO66DU.js} +3 -3
- package/dist/{chunk-ADR3KHOC.js → chunk-HZ72EMJE.js} +2 -2
- package/dist/{chunk-WN3RACVD.js → chunk-IOH2T3CB.js} +17 -3
- package/dist/chunk-KEPESIIR.js +4117 -0
- package/dist/{chunk-ZEWIMY63.js → chunk-KL76XWZ7.js} +1 -1
- package/dist/{chunk-IFPOHFDJ.js → chunk-KLZZI5TU.js} +1 -1
- package/dist/{chunk-ATKN4BJT.js → chunk-KUCL7ETL.js} +1 -1
- package/dist/{chunk-SFAP4AJY.js → chunk-L5CDGXPO.js} +3 -3
- package/dist/{chunk-GDKQUB52.js → chunk-LGZ545TA.js} +5 -5
- package/dist/{chunk-ZGU3NXL2.js → chunk-LTT54NOU.js} +8 -8
- package/dist/{chunk-MWLTTLPK.js → chunk-MK4USZYQ.js} +2 -2
- package/dist/{chunk-NKLNU577.js → chunk-MRCVYYPW.js} +3 -3
- package/dist/{chunk-7JXJJNQ5.js → chunk-OJEIS5L2.js} +1 -1
- package/dist/{chunk-ELLJPP6O.js → chunk-OP5IBEV7.js} +7 -3
- package/dist/{chunk-BQ2VV7LY.js → chunk-OU3BYBJ3.js} +2 -2
- package/dist/{chunk-6T5Z64KS.js → chunk-OW6VBXXI.js} +15 -15
- package/dist/{chunk-USE5IEEW.js → chunk-OY6Z4IKB.js} +1 -1
- package/dist/{chunk-O65F2IIN.js → chunk-P6RF4RQN.js} +6 -6
- package/dist/{chunk-4N5E4JNF.js → chunk-PIQ4HHA2.js} +5 -5
- package/dist/{chunk-7HDGH3Z2.js → chunk-PJ34FOIV.js} +4 -4
- package/dist/{chunk-DQLCFGHK.js → chunk-PXAOEFJZ.js} +17 -11
- package/dist/{chunk-P3VQH65N.js → chunk-QC2W42DE.js} +33 -20
- package/dist/{chunk-X3YKQJCZ.js → chunk-RAJ3QEIL.js} +1 -1
- package/dist/chunk-S2Z6VWHH.js +112 -0
- package/dist/{chunk-FUZ5VYWD.js → chunk-SARPHHTT.js} +1 -1
- package/dist/{chunk-BJTSKOH3.js → chunk-SKUSGWFK.js} +5 -5
- package/dist/{chunk-Y6Z7DA5Y.js → chunk-T3GHXR6N.js} +5 -5
- package/dist/{chunk-EUIPTDLX.js → chunk-T6XQNOZV.js} +22 -15
- package/dist/{chunk-RJHX66EY.js → chunk-TBKHQWIH.js} +16 -11
- package/dist/{chunk-CICLXLQN.js → chunk-TMGJAFSD.js} +4 -4
- package/dist/{chunk-Y5VKZNFN.js → chunk-V5W3CK7F.js} +2 -2
- package/dist/{chunk-GAMVAORR.js → chunk-V7N5NOZV.js} +4 -2
- package/dist/{chunk-33OOEVPG.js → chunk-VC3HFFMQ.js} +1 -1
- package/dist/{chunk-KPNZ7JUL.js → chunk-VDBXSUXP.js} +6 -6
- package/dist/{chunk-7BAO42UV.js → chunk-VFJSVPNL.js} +3 -3
- package/dist/{chunk-HUI4OE43.js → chunk-VHZAJ6IB.js} +3 -3
- package/dist/{chunk-QER5R7Z6.js → chunk-VN7XH6TU.js} +2 -2
- package/dist/{chunk-UADSXJZ4.js → chunk-WUOOZE5S.js} +2 -2
- package/dist/{chunk-LN7DE5LY.js → chunk-XBTWG2VL.js} +4 -4
- package/dist/{chunk-XV6S5PWW.js → chunk-XE5N352V.js} +1 -1
- package/dist/{chunk-SVQWHV65.js → chunk-XO3KAH7K.js} +1 -1
- package/dist/{chunk-BUZIEL7Y.js → chunk-YK6GR4GU.js} +2 -2
- package/dist/chunk-YMZOM6BD.js +216 -0
- package/dist/{codex-app-cards-switch-BD7LCI2I.js → codex-app-cards-switch-LXMAIOFB.js} +11 -11
- package/dist/{codex-desktop-launch-V5CASSBB.js → codex-desktop-launch-VE5RLFUU.js} +1 -1
- package/dist/{codex-session-launch-5PKFKUFD.js → codex-session-launch-XZZWXCPK.js} +18 -18
- package/dist/{config-AEKH7HGC.js → config-PPX25AV5.js} +3 -3
- package/dist/{global-upgrade-IUXJJDWF.js → global-upgrade-NRMHNLNU.js} +9 -9
- package/dist/{identity-YJIV2XTY.js → identity-ZFQR7JNW.js} +4 -4
- package/dist/{live-capabilities-QYFW5QAW.js → live-capabilities-SJRYRKNB.js} +4 -4
- package/dist/{paths-A5GAR5PL.js → paths-7VTVOQXJ.js} +3 -3
- package/dist/{reapply-BKJGICRJ.js → reapply-WOANOIRZ.js} +27 -26
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.js +21 -21
- package/dist/{upgrade-lock-DDB7WEWC.js → upgrade-lock-VAYJZVTB.js} +4 -4
- package/dist/{usage-HBDNFZ3O.js → usage-C4DIYUR6.js} +3 -3
- package/package.json +1 -1
- package/dist/chunk-6FJ6CK32.js +0 -126
package/dist/bin/pushary-wait.js
CHANGED
|
@@ -2,29 +2,29 @@
|
|
|
2
2
|
import {
|
|
3
3
|
waitResponse,
|
|
4
4
|
waitWindowResponse
|
|
5
|
-
} from "../chunk-
|
|
5
|
+
} from "../chunk-RAJ3QEIL.js";
|
|
6
6
|
import {
|
|
7
7
|
describeWaitLadder
|
|
8
8
|
} from "../chunk-CVWG2N3Y.js";
|
|
9
9
|
import {
|
|
10
10
|
exitOnFailedSettingsRequest
|
|
11
|
-
} from "../chunk-
|
|
12
|
-
import "../chunk-
|
|
11
|
+
} from "../chunk-GZS72NCF.js";
|
|
12
|
+
import "../chunk-HZ72EMJE.js";
|
|
13
13
|
import {
|
|
14
14
|
createIo
|
|
15
15
|
} from "../chunk-FO3MDD26.js";
|
|
16
16
|
import {
|
|
17
17
|
exitOnHelpFlag
|
|
18
|
-
} from "../chunk-
|
|
18
|
+
} from "../chunk-75ODMNOM.js";
|
|
19
19
|
import {
|
|
20
20
|
parseFlags
|
|
21
21
|
} from "../chunk-NMUI3ZWG.js";
|
|
22
|
-
import "../chunk-
|
|
23
|
-
import "../chunk-
|
|
22
|
+
import "../chunk-IOH2T3CB.js";
|
|
23
|
+
import "../chunk-AB3VAQ25.js";
|
|
24
24
|
import {
|
|
25
25
|
pusharyFetch
|
|
26
|
-
} from "../chunk-
|
|
27
|
-
import "../chunk-
|
|
26
|
+
} from "../chunk-VFJSVPNL.js";
|
|
27
|
+
import "../chunk-L5CDGXPO.js";
|
|
28
28
|
import {
|
|
29
29
|
UsageError,
|
|
30
30
|
exitCodeFor
|
|
@@ -32,17 +32,17 @@ import {
|
|
|
32
32
|
import {
|
|
33
33
|
EXIT
|
|
34
34
|
} from "../chunk-KZERVKTD.js";
|
|
35
|
-
import "../chunk-
|
|
36
|
-
import "../chunk-MWLTTLPK.js";
|
|
37
|
-
import "../chunk-CJ5TCFD4.js";
|
|
35
|
+
import "../chunk-V5W3CK7F.js";
|
|
38
36
|
import "../chunk-QENTGE75.js";
|
|
37
|
+
import "../chunk-MK4USZYQ.js";
|
|
38
|
+
import "../chunk-5LOP4AVD.js";
|
|
39
39
|
import {
|
|
40
40
|
getApiKey,
|
|
41
41
|
getBaseUrl
|
|
42
|
-
} from "../chunk-
|
|
43
|
-
import "../chunk-
|
|
42
|
+
} from "../chunk-BUQU3OPX.js";
|
|
43
|
+
import "../chunk-6Z2VR3BA.js";
|
|
44
44
|
import "../chunk-QTOLNRET.js";
|
|
45
|
-
import "../chunk-
|
|
45
|
+
import "../chunk-7NCLUA65.js";
|
|
46
46
|
import "../chunk-MLKGABMK.js";
|
|
47
47
|
|
|
48
48
|
// bin/pushary-wait.ts
|
package/dist/bin/pushary.js
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
installNetworkDefaults
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
4
|
+
} from "../chunk-VFJSVPNL.js";
|
|
5
|
+
import "../chunk-L5CDGXPO.js";
|
|
6
6
|
import "../chunk-PPY5N2E6.js";
|
|
7
7
|
import {
|
|
8
8
|
EXIT
|
|
9
9
|
} from "../chunk-KZERVKTD.js";
|
|
10
|
-
import "../chunk-MWLTTLPK.js";
|
|
11
|
-
import "../chunk-CJ5TCFD4.js";
|
|
12
10
|
import "../chunk-QENTGE75.js";
|
|
13
|
-
import "../chunk-
|
|
11
|
+
import "../chunk-MK4USZYQ.js";
|
|
12
|
+
import "../chunk-5LOP4AVD.js";
|
|
13
|
+
import "../chunk-BUQU3OPX.js";
|
|
14
14
|
import {
|
|
15
15
|
LISTED_COMMANDS,
|
|
16
16
|
renderHelp,
|
|
17
17
|
resolveCommandName
|
|
18
|
-
} from "../chunk-
|
|
18
|
+
} from "../chunk-6Z2VR3BA.js";
|
|
19
19
|
import {
|
|
20
20
|
getPackageVersion
|
|
21
21
|
} from "../chunk-QTOLNRET.js";
|
|
22
|
-
import "../chunk-
|
|
22
|
+
import "../chunk-7NCLUA65.js";
|
|
23
23
|
import "../chunk-MLKGABMK.js";
|
|
24
24
|
|
|
25
25
|
// src/cli/runtime.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
announceSubscriptionRequired,
|
|
3
3
|
isDeferAnswer
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-KL76XWZ7.js";
|
|
5
5
|
import {
|
|
6
6
|
AUTO_DECISION_WINDOW_MS,
|
|
7
7
|
DEFAULT_SESSION,
|
|
@@ -10,18 +10,19 @@ import {
|
|
|
10
10
|
permissionDeniedAction,
|
|
11
11
|
releaseThrottle,
|
|
12
12
|
reportEvent
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-PXAOEFJZ.js";
|
|
14
14
|
import {
|
|
15
15
|
askUser,
|
|
16
16
|
isDecisionStopped,
|
|
17
|
+
isQuestionLimitRefusal,
|
|
17
18
|
waitForQuestion
|
|
18
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-TBKHQWIH.js";
|
|
19
20
|
import {
|
|
20
21
|
SubscriptionRequiredError
|
|
21
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-ELAK46NR.js";
|
|
22
23
|
import {
|
|
23
24
|
getMachineId
|
|
24
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-L5CDGXPO.js";
|
|
25
26
|
import {
|
|
26
27
|
ASK_CONTEXT_MAX,
|
|
27
28
|
agentQuestionContext,
|
|
@@ -33,7 +34,7 @@ import {
|
|
|
33
34
|
questionsShownAsASet,
|
|
34
35
|
shouldDeferToNativeMode,
|
|
35
36
|
wireVerdictFor
|
|
36
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-7NCLUA65.js";
|
|
37
38
|
|
|
38
39
|
// src/machine-decision-audit.ts
|
|
39
40
|
import { basename } from "path";
|
|
@@ -103,6 +104,7 @@ var cardOf = (question) => {
|
|
|
103
104
|
};
|
|
104
105
|
};
|
|
105
106
|
var outcomeOfFailedAsk = (error, sessionId, failure) => {
|
|
107
|
+
if (isQuestionLimitRefusal(error)) return void 0;
|
|
106
108
|
if (!(error instanceof SubscriptionRequiredError)) return failure;
|
|
107
109
|
announceSubscriptionRequired(error.upgradeUrl, sessionId);
|
|
108
110
|
return void 0;
|
|
@@ -3,18 +3,18 @@ import {
|
|
|
3
3
|
addGeminiMcpServer,
|
|
4
4
|
removeGeminiMcpServer,
|
|
5
5
|
supportedClaudeEvents
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-BQFL2ECS.js";
|
|
7
7
|
import {
|
|
8
8
|
CLAUDE_CODE_AGENT,
|
|
9
9
|
compatibleToolLookup
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-PXAOEFJZ.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-MK4USZYQ.js";
|
|
18
18
|
import {
|
|
19
19
|
HOOK_COMPATIBLE_PROFILES,
|
|
20
20
|
HOOK_LOCATOR_BINARY,
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
pusharyMissingReason,
|
|
27
27
|
refusalOutput,
|
|
28
28
|
withHookHoldBudget
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-7NCLUA65.js";
|
|
30
30
|
|
|
31
31
|
// src/claude-config.ts
|
|
32
32
|
import { join } from "path";
|
|
@@ -4,25 +4,25 @@ import {
|
|
|
4
4
|
} from "./chunk-XHKBHWLX.js";
|
|
5
5
|
import {
|
|
6
6
|
readControlMode
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-IOH2T3CB.js";
|
|
8
8
|
import {
|
|
9
9
|
getMachineId
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import {
|
|
12
|
-
pusharyDir
|
|
13
|
-
} from "./chunk-MWLTTLPK.js";
|
|
14
|
-
import {
|
|
15
|
-
resolveGlobalBinary
|
|
16
|
-
} from "./chunk-CJ5TCFD4.js";
|
|
10
|
+
} from "./chunk-L5CDGXPO.js";
|
|
17
11
|
import {
|
|
18
12
|
readJsonSafe,
|
|
19
13
|
writeFileAtomic,
|
|
20
14
|
writeJsonAtomic,
|
|
21
15
|
writeJsonAtomicDurable
|
|
22
16
|
} from "./chunk-QENTGE75.js";
|
|
17
|
+
import {
|
|
18
|
+
pusharyDir
|
|
19
|
+
} from "./chunk-MK4USZYQ.js";
|
|
20
|
+
import {
|
|
21
|
+
resolveGlobalBinary
|
|
22
|
+
} from "./chunk-5LOP4AVD.js";
|
|
23
23
|
import {
|
|
24
24
|
getApiKey
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-BUQU3OPX.js";
|
|
26
26
|
import {
|
|
27
27
|
CLI_PACKAGE_NAMES,
|
|
28
28
|
cmdShimTarget,
|
|
@@ -32,7 +32,7 @@ import {
|
|
|
32
32
|
} from "./chunk-QTOLNRET.js";
|
|
33
33
|
import {
|
|
34
34
|
isRecord
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-7NCLUA65.js";
|
|
36
36
|
|
|
37
37
|
// src/daemon-lifecycle.ts
|
|
38
38
|
import { dirname, join, win32 as win32Path } from "path";
|
|
@@ -294,7 +294,7 @@ var loadedOnce = (load) => {
|
|
|
294
294
|
};
|
|
295
295
|
|
|
296
296
|
// src/codex-desktop-proxy.ts
|
|
297
|
-
var loadThePhone = () => import("./api-
|
|
297
|
+
var loadThePhone = () => import("./api-UHUUAONF.js");
|
|
298
298
|
var theFirstCardLoadsAgain = () => {
|
|
299
299
|
};
|
|
300
300
|
var APP_SERVER_COMMAND = "app-server";
|
|
@@ -827,7 +827,7 @@ var codexDesktopCommand = async (args, entry, readAccount) => {
|
|
|
827
827
|
return runCodexDesktopProxy(engine2, args.slice(3), readAccount, { watchesForCards: layoutIsKnown });
|
|
828
828
|
}
|
|
829
829
|
if (args[0] === APP_CARDS_FLAG) {
|
|
830
|
-
const { codexAppCardsCommandOnThisMac } = await import("./codex-app-cards-switch-
|
|
830
|
+
const { codexAppCardsCommandOnThisMac } = await import("./codex-app-cards-switch-LXMAIOFB.js");
|
|
831
831
|
return codexAppCardsCommandOnThisMac(args.slice(1), entry, readAccount);
|
|
832
832
|
}
|
|
833
833
|
if (args.length > 2) throw new Error("Usage: pushary codex --desktop [path/to/Codex.app]");
|
|
@@ -366,9 +366,9 @@ var installGlobally = (options) => {
|
|
|
366
366
|
}
|
|
367
367
|
const started = (async () => {
|
|
368
368
|
if (!npmIsOnPath()) throw new NpmMissingError();
|
|
369
|
-
const { withUpgradeLock } = await import("./global-upgrade-
|
|
370
|
-
const { installWithUpgradeLock, ownsUpgradeLock } = await import("./upgrade-lock-
|
|
371
|
-
const { autoUpdateLock } = await import("./paths-
|
|
369
|
+
const { withUpgradeLock } = await import("./global-upgrade-NRMHNLNU.js");
|
|
370
|
+
const { installWithUpgradeLock, ownsUpgradeLock } = await import("./upgrade-lock-VAYJZVTB.js");
|
|
371
|
+
const { autoUpdateLock } = await import("./paths-7VTVOQXJ.js");
|
|
372
372
|
let result = "skipped";
|
|
373
373
|
const install = async () => {
|
|
374
374
|
const platform = process.platform;
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
DISCONNECT_AGENT_IDS,
|
|
3
3
|
SETUP_AGENT_CHOICES,
|
|
4
4
|
isApprovalMode
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-7NCLUA65.js";
|
|
6
6
|
|
|
7
7
|
// src/cli/mode-request.ts
|
|
8
8
|
var parseDuration = (value) => {
|
|
@@ -127,7 +127,7 @@ var COMMAND_LIST = [
|
|
|
127
127
|
{
|
|
128
128
|
name: "transcripts",
|
|
129
129
|
module: "pushary-transcripts",
|
|
130
|
-
summary: "
|
|
130
|
+
summary: "Turn transcript sync on or off, or show and re-trust the keys it seals to",
|
|
131
131
|
detail: [
|
|
132
132
|
"Sync stops if the phone key or the compliance recovery key changes, because a",
|
|
133
133
|
"change is either your reinstall or a server handing itself a copy. Compare the",
|
|
@@ -168,6 +168,8 @@ var COMMAND_OPTIONS = {
|
|
|
168
168
|
["--yes", "Remove everything without asking"]
|
|
169
169
|
],
|
|
170
170
|
transcripts: [
|
|
171
|
+
["on", "Sync encrypted transcripts from this machine so your phone shows the conversation"],
|
|
172
|
+
["off", "Stop syncing transcripts from this machine"],
|
|
171
173
|
["status", "Show the pinned keys and their fingerprints (default)"],
|
|
172
174
|
["trust --rotate", "Accept the keys the server is offering now and resume syncing"]
|
|
173
175
|
],
|
|
@@ -168,7 +168,8 @@ var defaults = {
|
|
|
168
168
|
activationGuide: null,
|
|
169
169
|
enforcementDetail: "Cooperative. The agent chooses when to ask; no native permission interception.",
|
|
170
170
|
capabilityNote: "",
|
|
171
|
-
documented: true
|
|
171
|
+
documented: true,
|
|
172
|
+
keepsSessionHistory: false
|
|
172
173
|
};
|
|
173
174
|
var AGENTS = {
|
|
174
175
|
claude_code: {
|
|
@@ -184,7 +185,8 @@ var AGENTS = {
|
|
|
184
185
|
enforcement: "enforced",
|
|
185
186
|
connectVia: "Native hooks + MCP",
|
|
186
187
|
setupCommand: PUSHARY_SETUP_COMMAND,
|
|
187
|
-
enforcementDetail: "Shell, writes and edits, subject to Claude Code permission mode and explicit policy."
|
|
188
|
+
enforcementDetail: "Shell, writes and edits, subject to Claude Code permission mode and explicit policy.",
|
|
189
|
+
keepsSessionHistory: true
|
|
188
190
|
},
|
|
189
191
|
claude_chat: {
|
|
190
192
|
...defaults,
|
|
@@ -211,7 +213,8 @@ var AGENTS = {
|
|
|
211
213
|
enforcement: "enforced",
|
|
212
214
|
connectVia: "Native hooks + MCP",
|
|
213
215
|
setupCommand: PUSHARY_SETUP_COMMAND,
|
|
214
|
-
enforcementDetail: "Shell and apply_patch edits through native permission hooks; requires a compatible Codex runtime."
|
|
216
|
+
enforcementDetail: "Shell and apply_patch edits through native permission hooks; requires a compatible Codex runtime.",
|
|
217
|
+
keepsSessionHistory: true
|
|
215
218
|
},
|
|
216
219
|
chatgpt: {
|
|
217
220
|
...defaults,
|
|
@@ -231,7 +234,8 @@ var AGENTS = {
|
|
|
231
234
|
enforcement: "enforced",
|
|
232
235
|
connectVia: "Native hooks + MCP",
|
|
233
236
|
setupCommand: PUSHARY_SETUP_COMMAND,
|
|
234
|
-
enforcementDetail: "Shell, writes, edits and MCP calls through native BeforeTool hooks."
|
|
237
|
+
enforcementDetail: "Shell, writes, edits and MCP calls through native BeforeTool hooks.",
|
|
238
|
+
keepsSessionHistory: true
|
|
235
239
|
},
|
|
236
240
|
hermes: {
|
|
237
241
|
...defaults,
|
|
@@ -427,6 +431,9 @@ var POLICY_AGENTS = [...Object.values(AGENTS).flatMap((agent) => agent.policyAge
|
|
|
427
431
|
var AGENT_LABELS_BY_TYPE = Object.fromEntries(
|
|
428
432
|
Object.entries(AGENTS).flatMap(([id, agent]) => agent.hasStoredIdentity ? [[id, agent.label]] : [])
|
|
429
433
|
);
|
|
434
|
+
var SESSION_HISTORY_AGENT_TYPES = Object.freeze(
|
|
435
|
+
Object.entries(AGENTS).flatMap(([id, agent]) => agent.keepsSessionHistory ? [id] : [])
|
|
436
|
+
);
|
|
430
437
|
var DISCONNECTABLE_AGENTS = Object.freeze(Object.values(AGENTS).flatMap((agent) => agent.disconnectable && agent.hookSource !== null ? [agent.hookSource] : []));
|
|
431
438
|
var REPO_AWARE_AGENTS = Object.freeze(Object.values(AGENTS).flatMap((agent) => agent.repoAware ? [agent.policyAgent] : []));
|
|
432
439
|
var MANAGED_PROVIDERS = Object.freeze(Object.values(AGENTS).flatMap((agent) => agent.managedProvider ? [agent.hookSource] : []));
|
|
@@ -976,6 +983,40 @@ var redactSecrets = (text2) => applyRedactionRules(SECRET_REDACTION_RULES, text2
|
|
|
976
983
|
var redactSecretsFromContent = (text2) => applyRedactionRules(CUT_OFF_TEXT_REDACTION_RULES, text2);
|
|
977
984
|
var redactSecretsDeep = (text2) => redactSecrets(text2).replace(HIGH_ENTROPY_RULE.pattern, HIGH_ENTROPY_RULE.replacement);
|
|
978
985
|
|
|
986
|
+
// ../contracts/src/cursor.ts
|
|
987
|
+
var CURSOR_GATE_EVENTS = ["beforeShellExecution", "beforeMCPExecution", "preToolUse"];
|
|
988
|
+
var CURSOR_GATE_SCRIPT = "pushary-gate.mjs";
|
|
989
|
+
var CURSOR_SHELL_TOOL = "Shell";
|
|
990
|
+
var CURSOR_MCP_TOOL_PREFIX = "MCP:";
|
|
991
|
+
var CURSOR_FILE_GATE_TOOLS = ["Write", "Delete", "Edit"];
|
|
992
|
+
var CURSOR_GATE_COVERAGE = [
|
|
993
|
+
{ event: "beforeShellExecution", covers: { kind: "named", tools: [CURSOR_SHELL_TOOL] }, matcherNamesTools: false },
|
|
994
|
+
{ event: "beforeMCPExecution", covers: { kind: "prefix", prefix: CURSOR_MCP_TOOL_PREFIX }, matcherNamesTools: false },
|
|
995
|
+
{ event: "preToolUse", covers: { kind: "named", tools: CURSOR_FILE_GATE_TOOLS }, matcherNamesTools: true }
|
|
996
|
+
];
|
|
997
|
+
var isCursorHookPayload = (value) => isRecord(value) && typeof value.cursor_version === "string" && value.cursor_version.length > 0;
|
|
998
|
+
var NO_CURSOR_GATE = [];
|
|
999
|
+
var PLAIN_TOOL_NAME = /^[\w:]+$/;
|
|
1000
|
+
var matcherMatchesEveryCall = (matcher) => matcher === void 0 || matcher === "" || matcher === "*";
|
|
1001
|
+
var isPlainToolName = (name) => PLAIN_TOOL_NAME.test(name);
|
|
1002
|
+
var toolNamesInMatcher = (matcher) => {
|
|
1003
|
+
if (typeof matcher !== "string") return [];
|
|
1004
|
+
const names = matcher.split("|");
|
|
1005
|
+
return names.every(isPlainToolName) ? names : [];
|
|
1006
|
+
};
|
|
1007
|
+
var narrowedByMatcher = (covers, matcher) => {
|
|
1008
|
+
if (covers.kind !== "named") return null;
|
|
1009
|
+
const named = toolNamesInMatcher(matcher);
|
|
1010
|
+
const tools = covers.tools.filter((tool) => named.includes(tool));
|
|
1011
|
+
return tools.length > 0 ? { kind: "named", tools } : null;
|
|
1012
|
+
};
|
|
1013
|
+
var toolsCoveredByGateEntry = (coverage, matcher) => {
|
|
1014
|
+
if (matcherMatchesEveryCall(matcher)) return coverage.covers;
|
|
1015
|
+
return coverage.matcherNamesTools ? narrowedByMatcher(coverage.covers, matcher) : null;
|
|
1016
|
+
};
|
|
1017
|
+
var toolMatches = (match, toolName) => match.kind === "named" ? match.tools.includes(toolName) : toolName.startsWith(match.prefix);
|
|
1018
|
+
var cursorGateOwnsToolCall = (registration, toolName) => typeof toolName === "string" && registration.some((match) => toolMatches(match, toolName));
|
|
1019
|
+
|
|
979
1020
|
// ../contracts/src/shell-analysis.ts
|
|
980
1021
|
var SHELL_WORD_SEPARATOR = /[ \t\n]/;
|
|
981
1022
|
var ARITHMETIC_EVALUATING_EXPANSION = /\$[#+=~^]*(?:[A-Za-z_][A-Za-z0-9_]*|[0-9]+|[-?$!@*#])?\[/;
|
|
@@ -2612,6 +2653,23 @@ var AUTH_REJECTION_REASONS = [
|
|
|
2612
2653
|
"site_not_found",
|
|
2613
2654
|
...AGENT_SITE_REJECTION_REASONS
|
|
2614
2655
|
];
|
|
2656
|
+
var TOOL_FAILURE_META_KEY = "pushary/failure";
|
|
2657
|
+
var TOOL_FAILURE_CODES = {
|
|
2658
|
+
questionLimit: "question_limit",
|
|
2659
|
+
invalidRequest: "invalid_request"
|
|
2660
|
+
};
|
|
2661
|
+
var TOOL_FAILURE_CODE_VALUES = Object.values(TOOL_FAILURE_CODES);
|
|
2662
|
+
var isToolFailureCode = (value) => typeof value === "string" && TOOL_FAILURE_CODE_VALUES.includes(value);
|
|
2663
|
+
var isToolErrorResult = (result) => isRecord(result) && result.isError === true;
|
|
2664
|
+
var toolFailureMetaOf = (result) => {
|
|
2665
|
+
const meta = result._meta;
|
|
2666
|
+
return isRecord(meta) && Object.hasOwn(meta, TOOL_FAILURE_META_KEY) ? meta[TOOL_FAILURE_META_KEY] : void 0;
|
|
2667
|
+
};
|
|
2668
|
+
var toolFailureCodeOfResult = (result) => {
|
|
2669
|
+
if (!isToolErrorResult(result)) return null;
|
|
2670
|
+
const code = toolFailureMetaOf(result);
|
|
2671
|
+
return isToolFailureCode(code) ? code : null;
|
|
2672
|
+
};
|
|
2615
2673
|
|
|
2616
2674
|
// ../contracts/src/setup-wire.ts
|
|
2617
2675
|
var PAIR_TTL_SECONDS = 900;
|
|
@@ -2988,6 +3046,20 @@ var codexNativeApprovalResponse = (approval, answer) => {
|
|
|
2988
3046
|
return { decision: accepted ? "accept" : approval.negativeDecision };
|
|
2989
3047
|
};
|
|
2990
3048
|
|
|
3049
|
+
// ../contracts/src/transcript-record.ts
|
|
3050
|
+
var COMPRESSED_TRANSCRIPT_RECORD_MARKER = 1;
|
|
3051
|
+
var TRANSCRIPT_RECORD_MAX_INFLATED_BYTES = 1024 * 1024;
|
|
3052
|
+
var compressionShrinks = (raw, deflated) => deflated.length + 1 < raw.length;
|
|
3053
|
+
var compressTranscriptRecord = (raw, deflateRaw) => {
|
|
3054
|
+
if (raw.length > TRANSCRIPT_RECORD_MAX_INFLATED_BYTES) return raw;
|
|
3055
|
+
const deflated = deflateRaw(raw);
|
|
3056
|
+
if (!compressionShrinks(raw, deflated)) return raw;
|
|
3057
|
+
const record3 = new Uint8Array(deflated.length + 1);
|
|
3058
|
+
record3[0] = COMPRESSED_TRANSCRIPT_RECORD_MARKER;
|
|
3059
|
+
record3.set(deflated, 1);
|
|
3060
|
+
return record3;
|
|
3061
|
+
};
|
|
3062
|
+
|
|
2991
3063
|
// ../contracts/src/index.ts
|
|
2992
3064
|
var KEY_SCOPES = ["full_access", "agent", "connector", "bound"];
|
|
2993
3065
|
var normalizeKeyScope = (value) => typeof value === "string" && KEY_SCOPES.includes(value) ? value : null;
|
|
@@ -3112,10 +3184,10 @@ var hookWaitDeadline = (startMs, policyWaitSeconds, agent, nowMs) => {
|
|
|
3112
3184
|
var hookWaitClamped = (startMs, policyWaitSeconds, agent, nowMs) => startMs + hookMaxWaitSeconds(agent) * 1e3 < nowMs + Math.max(policyWaitSeconds, 0) * 1e3;
|
|
3113
3185
|
var effectiveWaitSeconds = (timeoutAction, policySeconds, agent) => timeoutAction === "wait" ? hookMaxWaitSeconds(agent) : policySeconds;
|
|
3114
3186
|
var OPENCODE_APPROVAL_EVENT = "permission.ask";
|
|
3115
|
-
var CURSOR_GATE_EVENTS = ["beforeShellExecution", "beforeMCPExecution", "preToolUse"];
|
|
3116
3187
|
var hasNativeApprovalPrompt = (source, event) => !(source === "cursor" && event === "preToolUse") && !(source === "antigravity" && event === "PreToolUse");
|
|
3117
3188
|
var SUPPORT_EMAIL = "business@pushary.com";
|
|
3118
3189
|
var SUPPORT_DISCORD = "https://discord.gg/9v3VvUByrr";
|
|
3190
|
+
var HOOK_VERSION_PATTERN = /^\d+\.\d+\.\d+$/;
|
|
3119
3191
|
var HOOK_LOCATOR_BINARY = "pushary-bridge";
|
|
3120
3192
|
var isTokenCount = (value) => typeof value === "number" && Number.isInteger(value) && value >= 0;
|
|
3121
3193
|
var reportableSessionId = (value) => typeof value === "string" && value.length > 0 && value.length <= SESSION_ID_MAX_LENGTH ? value : null;
|
|
@@ -5769,9 +5841,16 @@ var codexAskUnanswered = (ask) => ({ kind: "deny", reason: unansweredRefusalReas
|
|
|
5769
5841
|
var ruleApprovesAfterItsFullWindow = (ask) => ask.mode === "push_only" && ask.fullWindowServed && ask.timeoutAction === "approve";
|
|
5770
5842
|
var codexUnansweredPreToolUse = (ask) => ruleApprovesAfterItsFullWindow(ask) ? CODEX_ASK_PASSES : codexAskUnanswered(ask);
|
|
5771
5843
|
var HANDED_BACK_REASON = "Handling on your machine";
|
|
5844
|
+
var HAND_BACK_TO_THE_AGENTS_PROMPT = { kind: "agent_prompt" };
|
|
5772
5845
|
var HAND_BACK_WITHOUT_A_PROMPT = { kind: "refuse", reason: NO_AGENT_PROMPT_REASON };
|
|
5773
5846
|
var CODEX_HAND_BACK_REASON = "You chose to handle this on your machine, so it did not run. Ask Codex to run it again while you are at your computer, or run it yourself.";
|
|
5774
5847
|
var CODEX_PRE_TOOL_USE_HAND_BACK = { kind: "refuse", reason: CODEX_HAND_BACK_REASON };
|
|
5848
|
+
var QUESTION_LIMIT_REASON = "Pushary already has as many open questions in this session as it allows, so nobody was asked about this and it did not run. Wait until the person answers or cancels one before trying it again.";
|
|
5849
|
+
var QUESTION_LIMIT_PROMPT_REASON = "Pushary has too many open questions in this session, so this was not sent to the phone. Approve it here.";
|
|
5850
|
+
var QUESTION_LIMIT_REFUSAL = { kind: "refuse", reason: QUESTION_LIMIT_REASON };
|
|
5851
|
+
var questionLimitRefuses = ({ refusesUnanswered, agentPromptFollows }) => refusesUnanswered || !agentPromptFollows;
|
|
5852
|
+
var questionLimitHandBack = (facts) => questionLimitRefuses(facts) ? QUESTION_LIMIT_REFUSAL : HAND_BACK_TO_THE_AGENTS_PROMPT;
|
|
5853
|
+
var refusesWhenUnanswered = ({ mode, timeoutAction }) => mode === "push_only" && timeoutAction === "deny";
|
|
5775
5854
|
var codexDeferredPreToolUse = () => ({ kind: "deny", reason: CODEX_PRE_TOOL_USE_HAND_BACK.reason });
|
|
5776
5855
|
var isScopeReason = (scopeReason) => typeof scopeReason === "string" && scopeReason.length > 0;
|
|
5777
5856
|
var scopeBreachReasonOf = (verdict) => verdict.kind === "gate" && isScopeReason(verdict.scopeReason) ? verdict.scopeReason : void 0;
|
|
@@ -6239,6 +6318,13 @@ export {
|
|
|
6239
6318
|
redactSecrets,
|
|
6240
6319
|
redactSecretsFromContent,
|
|
6241
6320
|
redactSecretsDeep,
|
|
6321
|
+
CURSOR_GATE_EVENTS,
|
|
6322
|
+
CURSOR_GATE_SCRIPT,
|
|
6323
|
+
CURSOR_GATE_COVERAGE,
|
|
6324
|
+
isCursorHookPayload,
|
|
6325
|
+
NO_CURSOR_GATE,
|
|
6326
|
+
toolsCoveredByGateEntry,
|
|
6327
|
+
cursorGateOwnsToolCall,
|
|
6242
6328
|
degradedLine,
|
|
6243
6329
|
hookWritePath,
|
|
6244
6330
|
MAX_HOOK_ACTIVATION_EVIDENCE_ROWS,
|
|
@@ -6246,6 +6332,9 @@ export {
|
|
|
6246
6332
|
hookActivationResult,
|
|
6247
6333
|
CLIENT_REPORT_PATH,
|
|
6248
6334
|
clientContextHeaders,
|
|
6335
|
+
TOOL_FAILURE_CODES,
|
|
6336
|
+
isToolErrorResult,
|
|
6337
|
+
toolFailureCodeOfResult,
|
|
6249
6338
|
PAIR_TTL_SECONDS,
|
|
6250
6339
|
computerOsOfPlatform,
|
|
6251
6340
|
SETUP_AGENT_CHOICES,
|
|
@@ -6270,6 +6359,7 @@ export {
|
|
|
6270
6359
|
CODEX_NATIVE_APPROVAL_REPLIES,
|
|
6271
6360
|
parseCodexNativeApproval,
|
|
6272
6361
|
codexNativeApprovalResponse,
|
|
6362
|
+
compressTranscriptRecord,
|
|
6273
6363
|
normalizeKeyScope,
|
|
6274
6364
|
isApprovalMode,
|
|
6275
6365
|
approvalModeWithoutLocalPrompt,
|
|
@@ -6290,10 +6380,10 @@ export {
|
|
|
6290
6380
|
hookWaitClamped,
|
|
6291
6381
|
effectiveWaitSeconds,
|
|
6292
6382
|
OPENCODE_APPROVAL_EVENT,
|
|
6293
|
-
CURSOR_GATE_EVENTS,
|
|
6294
6383
|
hasNativeApprovalPrompt,
|
|
6295
6384
|
SUPPORT_EMAIL,
|
|
6296
6385
|
SUPPORT_DISCORD,
|
|
6386
|
+
HOOK_VERSION_PATTERN,
|
|
6297
6387
|
HOOK_LOCATOR_BINARY,
|
|
6298
6388
|
isTokenCount,
|
|
6299
6389
|
reportableSessionId,
|
|
@@ -6342,6 +6432,9 @@ export {
|
|
|
6342
6432
|
codexUnansweredPreToolUse,
|
|
6343
6433
|
HANDED_BACK_REASON,
|
|
6344
6434
|
HAND_BACK_WITHOUT_A_PROMPT,
|
|
6435
|
+
QUESTION_LIMIT_PROMPT_REASON,
|
|
6436
|
+
questionLimitHandBack,
|
|
6437
|
+
refusesWhenUnanswered,
|
|
6345
6438
|
codexDeferredPreToolUse,
|
|
6346
6439
|
scopeBreachReasonOf,
|
|
6347
6440
|
codexPreToolUseDelivery,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
pusharyFetch
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-VFJSVPNL.js";
|
|
4
4
|
import {
|
|
5
5
|
NetworkError
|
|
6
6
|
} from "./chunk-PPY5N2E6.js";
|
|
@@ -9,11 +9,11 @@ import {
|
|
|
9
9
|
} from "./chunk-KZERVKTD.js";
|
|
10
10
|
import {
|
|
11
11
|
getBaseUrl
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-BUQU3OPX.js";
|
|
13
13
|
import {
|
|
14
14
|
isValidApiKey,
|
|
15
15
|
normalizeKeyScope
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-7NCLUA65.js";
|
|
17
17
|
|
|
18
18
|
// src/session.ts
|
|
19
19
|
var samePusharyAccount = (left, right) => left.kind === "ok" && right.kind === "ok" && left.identity.workspaceId !== "" && left.identity.workspaceId === right.identity.workspaceId && left.identity.siteId === right.identity.siteId;
|
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
|
+
compressTranscriptRecord,
|
|
2
3
|
redactSecretsFromContent
|
|
3
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-7NCLUA65.js";
|
|
4
5
|
|
|
5
6
|
// src/crypto.ts
|
|
6
7
|
import nacl from "tweetnacl";
|
|
8
|
+
|
|
9
|
+
// ../contracts/src/transcript-record-node.ts
|
|
10
|
+
import { deflateRawSync, inflateRawSync } from "zlib";
|
|
11
|
+
var deflateRaw = (raw) => new Uint8Array(deflateRawSync(raw));
|
|
12
|
+
|
|
13
|
+
// src/crypto.ts
|
|
7
14
|
var EPH_PUB_LEN = nacl.box.publicKeyLength;
|
|
8
15
|
var BOX_NONCE_LEN = nacl.box.nonceLength;
|
|
9
16
|
var SECRETBOX_NONCE_LEN = nacl.secretbox.nonceLength;
|
|
@@ -23,14 +30,17 @@ var wrapSessionKey = (sessionKey, accountPublicKey) => {
|
|
|
23
30
|
bundle.set(box, EPH_PUB_LEN + BOX_NONCE_LEN);
|
|
24
31
|
return toBase64(bundle);
|
|
25
32
|
};
|
|
26
|
-
var
|
|
33
|
+
var sealRecordBytes = (plaintext, sessionKey) => {
|
|
27
34
|
const nonce = nacl.randomBytes(SECRETBOX_NONCE_LEN);
|
|
28
|
-
const box = nacl.secretbox(
|
|
35
|
+
const box = nacl.secretbox(plaintext, nonce, sessionKey);
|
|
29
36
|
const bundle = new Uint8Array(SECRETBOX_NONCE_LEN + box.length);
|
|
30
37
|
bundle.set(nonce, 0);
|
|
31
38
|
bundle.set(box, SECRETBOX_NONCE_LEN);
|
|
32
39
|
return toBase64(bundle);
|
|
33
40
|
};
|
|
41
|
+
var encryptRecord = (plaintext, sessionKey) => sealRecordBytes(utf8Encode(plaintext), sessionKey);
|
|
42
|
+
var encryptCompressedRecord = (plaintext, sessionKey) => sealRecordBytes(compressTranscriptRecord(utf8Encode(plaintext), deflateRaw), sessionKey);
|
|
43
|
+
var recordSealerFor = (compressRecords) => compressRecords ? encryptCompressedRecord : encryptRecord;
|
|
34
44
|
|
|
35
45
|
// src/transcript-capture.ts
|
|
36
46
|
import { createHmac } from "crypto";
|
|
@@ -123,7 +133,7 @@ var redactDeep = (value) => {
|
|
|
123
133
|
return value;
|
|
124
134
|
};
|
|
125
135
|
var localIdFor = (parsed, rawLine, sessionKey) => typeof parsed.uuid === "string" && parsed.uuid.length > 0 ? parsed.uuid : createHmac("sha256", sessionKey).update(rawLine).digest("hex").slice(0, 32);
|
|
126
|
-
var buildTranscriptRecords = (lines, sessionKey, seen = /* @__PURE__ */ new Set()) => {
|
|
136
|
+
var buildTranscriptRecords = (lines, sessionKey, seen = /* @__PURE__ */ new Set(), sealRecord = encryptRecord) => {
|
|
127
137
|
const records = [];
|
|
128
138
|
const nextSeen = new Set(seen);
|
|
129
139
|
for (const line of lines) {
|
|
@@ -142,7 +152,7 @@ var buildTranscriptRecords = (lines, sessionKey, seen = /* @__PURE__ */ new Set(
|
|
|
142
152
|
nextSeen.add(localId);
|
|
143
153
|
const redacted = redactDeep(parsed);
|
|
144
154
|
fitWithinPlaintextBudget(redacted);
|
|
145
|
-
const content =
|
|
155
|
+
const content = sealRecord(JSON.stringify(redacted), sessionKey);
|
|
146
156
|
records.push({ localId, content });
|
|
147
157
|
}
|
|
148
158
|
return { records, seen: nextSeen };
|
|
@@ -153,5 +163,6 @@ export {
|
|
|
153
163
|
generateSessionKey,
|
|
154
164
|
wrapSessionKey,
|
|
155
165
|
encryptRecord,
|
|
166
|
+
recordSealerFor,
|
|
156
167
|
buildTranscriptRecords
|
|
157
168
|
};
|
|
@@ -5,16 +5,16 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
NOTIFICATION_MATCHED_TYPES,
|
|
7
7
|
POSTTOOLUSE_MIRRORED_TOOLS
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-VC3HFFMQ.js";
|
|
9
9
|
import {
|
|
10
10
|
isProtectedByScope,
|
|
11
11
|
registerHookEntry
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-MK4USZYQ.js";
|
|
13
13
|
import {
|
|
14
14
|
CLAUDE_PRETOOLUSE_MATCHER,
|
|
15
15
|
HOOK_BUDGETS,
|
|
16
16
|
HOOK_LOCATOR_BINARY
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-7NCLUA65.js";
|
|
18
18
|
|
|
19
19
|
// src/gemini-config.ts
|
|
20
20
|
var GEMINI_HOOK_BINARY = "pushary-gemini-hook";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
pusharyDir
|
|
3
|
-
} from "./chunk-MWLTTLPK.js";
|
|
4
1
|
import {
|
|
5
2
|
readJsonSafe
|
|
6
3
|
} from "./chunk-QENTGE75.js";
|
|
4
|
+
import {
|
|
5
|
+
pusharyDir
|
|
6
|
+
} from "./chunk-MK4USZYQ.js";
|
|
7
7
|
import {
|
|
8
8
|
isRecord
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-7NCLUA65.js";
|
|
10
10
|
|
|
11
11
|
// src/process-ownership.ts
|
|
12
12
|
import { createHash, randomUUID } from "crypto";
|