pushary 1.9.23 → 1.9.24
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 +7 -0
- package/data/cursor-plugin/.cursor-plugin/plugin.json +1 -1
- package/data/cursor-plugin/CHANGELOG.md +4 -0
- package/data/cursor-plugin/scripts/pushary-gate.mjs +4 -2
- package/data/cursor-plugin/scripts/pushary-gate.test.mjs +14 -1
- package/dist/bin/pushary-bell-hook.js +25 -25
- package/dist/bin/pushary-bell.js +9 -9
- package/dist/bin/pushary-claude.js +27 -26
- package/dist/bin/pushary-clean.js +41 -93
- package/dist/bin/pushary-codex-bridge.js +17 -17
- package/dist/bin/pushary-codex-hook.js +30 -30
- 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 +31 -31
- package/dist/bin/pushary-disconnect.js +24 -24
- package/dist/bin/pushary-doctor.js +33 -33
- 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 +16 -16
- package/dist/bin/pushary-logout.js +77 -26
- 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 +41 -38
- 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-FIYCICHC.js → chunk-264EOGIK.js} +2 -2
- package/dist/{chunk-XBETSM5T.js → chunk-2E6AWHV7.js} +3 -3
- package/dist/{chunk-YZPFJCFE.js → chunk-2F6UQ3YD.js} +1 -1
- package/dist/{chunk-6GHZAS7S.js → chunk-2JTJZ7VI.js} +4 -4
- package/dist/{chunk-CJTQNUUT.js → chunk-35U2QHH2.js} +2 -2
- package/dist/{chunk-QFNY4KUQ.js → chunk-3WRJU7KN.js} +1 -1
- package/dist/{chunk-HXZG5WHU.js → chunk-7JHYWFY6.js} +2 -2
- package/dist/{chunk-NHBPW6C4.js → chunk-7Z2DLAEE.js} +2 -2
- package/dist/{chunk-FBV2KS3Z.js → chunk-CLVU24OZ.js} +2 -2
- package/dist/{chunk-SLBO7PHS.js → chunk-CYGIJXAP.js} +2 -2
- package/dist/{chunk-M7DCI44L.js → chunk-E4B7TXVS.js} +1 -1
- package/dist/{chunk-S2R2U5W5.js → chunk-EE357RIP.js} +4 -4
- package/dist/{chunk-I46QTKYI.js → chunk-EKPAV33G.js} +5 -5
- package/dist/{chunk-SWQLZQE3.js → chunk-G6GFNKF7.js} +14 -13
- package/dist/{chunk-GN6BJXC7.js → chunk-GBD6G4TA.js} +1 -1
- package/dist/{chunk-OH647UT3.js → chunk-GM2IFDVF.js} +24 -1
- package/dist/{chunk-6HT2TUZD.js → chunk-GXQVOKHJ.js} +2 -2
- package/dist/{chunk-Z4UDB7EC.js → chunk-H2RD5EMR.js} +3 -3
- package/dist/{chunk-SSWK2WYX.js → chunk-HBR6ZZHN.js} +5 -5
- package/dist/{chunk-2AUKCSLQ.js → chunk-HLXGEOX3.js} +4 -4
- package/dist/{chunk-ISAKLEKE.js → chunk-IO5ZDIHY.js} +7 -7
- package/dist/{chunk-EDN4F6GX.js → chunk-IS737HST.js} +1 -1
- package/dist/{chunk-M6R3SZZS.js → chunk-JDWOK6PE.js} +1 -1
- package/dist/{chunk-GYP6DLA4.js → chunk-KT5BH6GC.js} +8 -8
- package/dist/{chunk-7J2AX5T6.js → chunk-KX776UXN.js} +2 -2
- package/dist/chunk-L5MCJNSI.js +166 -0
- package/dist/{chunk-RHIKMNWJ.js → chunk-LHFK5F3T.js} +2 -2
- package/dist/{chunk-K2EYK5RL.js → chunk-LOERK6N3.js} +4 -4
- package/dist/{chunk-R5C3QCVT.js → chunk-NJK4MGXL.js} +1 -1
- package/dist/{chunk-QIODXPTP.js → chunk-NQICO3ES.js} +4 -4
- package/dist/{chunk-ZGYO6OQE.js → chunk-O3RRQTTV.js} +5 -5
- package/dist/{chunk-PFB7P4F3.js → chunk-OLWKCDK4.js} +6 -6
- package/dist/{chunk-A5U62Q6K.js → chunk-OSOCONIE.js} +5 -5
- package/dist/{chunk-OQPEHKH2.js → chunk-OY6NJWDD.js} +1 -1
- package/dist/{chunk-NSCETODW.js → chunk-P447F2RB.js} +1 -1
- package/dist/{chunk-RN5NRRHX.js → chunk-Q7IEFI7V.js} +2 -2
- package/dist/{chunk-LEQRIJ4H.js → chunk-QDKNLNCA.js} +3 -3
- package/dist/{chunk-KJA6IGOZ.js → chunk-RFK2WN6S.js} +1 -1
- package/dist/{chunk-N4DMADJM.js → chunk-RIBIEQHU.js} +1 -1
- package/dist/{chunk-E2LGKG75.js → chunk-RK7TDMQT.js} +3 -3
- package/dist/{chunk-DKBPNHAI.js → chunk-SBQCRQIP.js} +4 -4
- package/dist/{chunk-AXSHPFU3.js → chunk-SH2KK2ED.js} +3 -3
- package/dist/{chunk-OH6OGEOY.js → chunk-T5KM7J75.js} +4 -4
- package/dist/{chunk-73HGV4R6.js → chunk-T6TJA4RF.js} +2 -2
- package/dist/{chunk-AQ3TSQA2.js → chunk-U23XTMBF.js} +21 -8
- package/dist/{chunk-BY5EKA6W.js → chunk-URCSJZNU.js} +3 -3
- package/dist/{chunk-7RGEJOQS.js → chunk-VFIZFKZY.js} +3 -3
- package/dist/{chunk-AFP3HZVK.js → chunk-VICG46JC.js} +1 -1
- package/dist/{chunk-AV5VX7OK.js → chunk-W5NHIA4Y.js} +8 -8
- package/dist/{chunk-JCEUDLGW.js → chunk-WYLA6J43.js} +1 -1
- package/dist/{chunk-YXHVMZPR.js → chunk-XA2RGGNR.js} +4 -4
- package/dist/{chunk-USUI4P63.js → chunk-XQROISQB.js} +2 -2
- package/dist/{chunk-JNKHCGHR.js → chunk-Z5L4NQHC.js} +1 -1
- package/dist/{chunk-4GKQDFH6.js → chunk-ZVON5PCF.js} +5 -5
- package/dist/{global-upgrade-SKY7A3SI.js → global-upgrade-DZGLAARJ.js} +6 -6
- package/dist/{paths-XUUEK7OU.js → paths-JATF66FP.js} +2 -2
- package/dist/{reapply-WQDP26EA.js → reapply-7TDCFXNF.js} +20 -20
- package/dist/src/index.js +19 -19
- package/dist/{upgrade-lock-AYW3TB7X.js → upgrade-lock-LPIDFQEH.js} +3 -3
- package/package.json +1 -1
- package/dist/chunk-OYIN77HO.js +0 -72
|
@@ -8,10 +8,10 @@ import {
|
|
|
8
8
|
codexHooksJsonIn,
|
|
9
9
|
isPusharyCodexCommand,
|
|
10
10
|
resolvePathBinary
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-NQICO3ES.js";
|
|
12
12
|
import {
|
|
13
13
|
getPackageVersion
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-GM2IFDVF.js";
|
|
15
15
|
|
|
16
16
|
// src/codex-app-server.ts
|
|
17
17
|
import { existsSync, realpathSync } from "fs";
|
|
@@ -3,18 +3,18 @@ import {
|
|
|
3
3
|
addGeminiMcpServer,
|
|
4
4
|
removeGeminiMcpServer,
|
|
5
5
|
supportedClaudeEvents
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-VFIZFKZY.js";
|
|
7
7
|
import {
|
|
8
8
|
CLAUDE_CODE_AGENT,
|
|
9
9
|
parseApplyPatchFiles
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-KT5BH6GC.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-NQICO3ES.js";
|
|
18
18
|
import {
|
|
19
19
|
HOOK_LOCATOR_BINARY,
|
|
20
20
|
PHONE_ANSWERED_TOOLS,
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
refusalOutput,
|
|
25
25
|
toToolLookup,
|
|
26
26
|
withHookHoldBudget
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-GM2IFDVF.js";
|
|
28
28
|
|
|
29
29
|
// src/claude-config.ts
|
|
30
30
|
import { join } from "path";
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
isReleaseVersion,
|
|
14
14
|
ownPackageName,
|
|
15
15
|
withHookHoldBudget
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-GM2IFDVF.js";
|
|
17
17
|
|
|
18
18
|
// src/setup/paths.ts
|
|
19
19
|
import { homedir as homedir2 } from "os";
|
|
@@ -395,9 +395,9 @@ var installGlobally = (options) => {
|
|
|
395
395
|
}
|
|
396
396
|
const started = (async () => {
|
|
397
397
|
if (!npmIsOnPath()) throw new NpmMissingError();
|
|
398
|
-
const { withUpgradeLock } = await import("./global-upgrade-
|
|
399
|
-
const { installWithUpgradeLock, ownsUpgradeLock } = await import("./upgrade-lock-
|
|
400
|
-
const { autoUpdateLock: autoUpdateLock2 } = await import("./paths-
|
|
398
|
+
const { withUpgradeLock } = await import("./global-upgrade-DZGLAARJ.js");
|
|
399
|
+
const { installWithUpgradeLock, ownsUpgradeLock } = await import("./upgrade-lock-LPIDFQEH.js");
|
|
400
|
+
const { autoUpdateLock: autoUpdateLock2 } = await import("./paths-JATF66FP.js");
|
|
401
401
|
let result = "skipped";
|
|
402
402
|
const install = async () => {
|
|
403
403
|
const platform = process.platform;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
compatibleConfigFile
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-LOERK6N3.js";
|
|
4
4
|
import {
|
|
5
5
|
hookOwnerOf,
|
|
6
6
|
hookOwnerOfCommands,
|
|
7
7
|
liveBridgeProbe,
|
|
8
8
|
resolveBridgeStub
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-OSOCONIE.js";
|
|
10
10
|
import {
|
|
11
11
|
AGENT_CHOICES
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-NJK4MGXL.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-NQICO3ES.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-GM2IFDVF.js";
|
|
33
33
|
|
|
34
34
|
// src/opencode-plugin.ts
|
|
35
35
|
var OPENCODE_PLUGIN_MARKER = "pushary-opencode-plugin w1";
|
|
@@ -3,27 +3,27 @@ import {
|
|
|
3
3
|
expectedLaunchCapabilities,
|
|
4
4
|
hasSpawnProvider,
|
|
5
5
|
resolveControlPolicy
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-KX776UXN.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-HBR6ZZHN.js";
|
|
14
14
|
import {
|
|
15
15
|
readControlMode,
|
|
16
16
|
readKeySource
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-U23XTMBF.js";
|
|
18
18
|
import {
|
|
19
19
|
getMachineId
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-IS737HST.js";
|
|
21
21
|
import {
|
|
22
22
|
getBaseUrl
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-OY6NJWDD.js";
|
|
24
24
|
import {
|
|
25
25
|
getPackageVersion
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-GM2IFDVF.js";
|
|
27
27
|
|
|
28
28
|
// src/machines.ts
|
|
29
29
|
import { hostname } from "os";
|
|
@@ -2,23 +2,23 @@ import {
|
|
|
2
2
|
CLAUDE_HOOK_EVENTS,
|
|
3
3
|
GEMINI_HOOK_EVENTS,
|
|
4
4
|
hasGeminiHooks
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-VFIZFKZY.js";
|
|
6
6
|
import {
|
|
7
7
|
AGENT_CHOICES
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-NJK4MGXL.js";
|
|
9
9
|
import {
|
|
10
10
|
BELL_HOOK_BINARY
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-VICG46JC.js";
|
|
12
12
|
import {
|
|
13
13
|
CODEX_HOOK_EVENTS,
|
|
14
14
|
hasCodexHooks,
|
|
15
15
|
holdBudgetOf
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-NQICO3ES.js";
|
|
17
17
|
import {
|
|
18
18
|
CURSOR_GATE_EVENTS,
|
|
19
19
|
HOOK_LOCATOR_BINARY,
|
|
20
20
|
hookCommandHoldBudget
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-GM2IFDVF.js";
|
|
22
22
|
|
|
23
23
|
// src/diagnostics/bridge.ts
|
|
24
24
|
import { execFileSync } from "child_process";
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
DISCONNECT_AGENT_IDS,
|
|
3
3
|
SETUP_AGENT_CHOICES,
|
|
4
4
|
isApprovalMode
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-GM2IFDVF.js";
|
|
6
6
|
|
|
7
7
|
// src/cli/mode-request.ts
|
|
8
8
|
var parseDuration = (value) => {
|
|
@@ -142,7 +142,7 @@ var COMMAND_OPTIONS = {
|
|
|
142
142
|
],
|
|
143
143
|
clean: [
|
|
144
144
|
["--dry-run", "List everything it would remove and change nothing"],
|
|
145
|
-
["--everything", "Also revoke the
|
|
145
|
+
["--everything", "Also revoke the key this CLI created (any other key is only removed) and remove what the Mac app set up: quits it, then its keychain items, local state and editor extension"],
|
|
146
146
|
["--yes", "Remove everything without asking"]
|
|
147
147
|
],
|
|
148
148
|
transcripts: [
|
|
@@ -165,7 +165,7 @@ var COMMAND_OPTIONS = {
|
|
|
165
165
|
["--devices", "Also list the machines registered to this site"]
|
|
166
166
|
],
|
|
167
167
|
"sign-out": [
|
|
168
|
-
["--revoke", "Also
|
|
168
|
+
["--revoke", "Also revoke the key server-side if this CLI created it; any other key is only removed"],
|
|
169
169
|
["--json", "Emit the result as one object instead of the screen"]
|
|
170
170
|
],
|
|
171
171
|
doctor: [
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
keyCheckFromResponse
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-H2RD5EMR.js";
|
|
4
4
|
import {
|
|
5
5
|
installNetworkDefaults
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-2E6AWHV7.js";
|
|
7
7
|
import {
|
|
8
8
|
getBaseUrl
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-OY6NJWDD.js";
|
|
10
10
|
|
|
11
11
|
// src/retry.ts
|
|
12
12
|
var isRetryable = (err) => {
|
|
@@ -14,19 +14,19 @@ import {
|
|
|
14
14
|
} from "./chunk-FO3MDD26.js";
|
|
15
15
|
import {
|
|
16
16
|
callMcpTool
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-RK7TDMQT.js";
|
|
18
18
|
import {
|
|
19
19
|
reportedInstallSource
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-GXQVOKHJ.js";
|
|
21
21
|
import {
|
|
22
22
|
NPX_LATEST_COMMAND
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-QDKNLNCA.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-GM2IFDVF.js";
|
|
30
30
|
|
|
31
31
|
// src/reach.ts
|
|
32
32
|
var reachVerdict = (channels) => {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
openCodeConfigDirFrom
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-O3RRQTTV.js";
|
|
4
4
|
import {
|
|
5
5
|
codexHomeFrom,
|
|
6
6
|
resolvePathBinary
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-NQICO3ES.js";
|
|
8
8
|
import {
|
|
9
9
|
HOOK_COMPATIBLE_PROFILES
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-GM2IFDVF.js";
|
|
11
11
|
|
|
12
12
|
// src/hermes-config.ts
|
|
13
13
|
import { execFileSync } from "child_process";
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
registerTranscript
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-W5NHIA4Y.js";
|
|
4
4
|
import {
|
|
5
5
|
namedEvent
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-LOERK6N3.js";
|
|
7
7
|
import {
|
|
8
8
|
writeDegraded
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-ZVON5PCF.js";
|
|
10
10
|
import {
|
|
11
11
|
claudeShapedHookInput,
|
|
12
12
|
hookCompatibleProfileBySource
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-GM2IFDVF.js";
|
|
14
14
|
|
|
15
15
|
// src/tool-hook-input.ts
|
|
16
16
|
var OPTIONAL_TEXT_FIELDS = ["hook_event_name", "session_id", "cwd", "transcript_path", "tool_use_id", "permission_mode"];
|
|
@@ -3,11 +3,11 @@ import {
|
|
|
3
3
|
decodePublicKey,
|
|
4
4
|
generateSessionKey,
|
|
5
5
|
wrapSessionKey
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-RIBIEQHU.js";
|
|
7
7
|
import {
|
|
8
8
|
fetchTranscriptRecipients,
|
|
9
9
|
uploadTranscriptRecords
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-3WRJU7KN.js";
|
|
11
11
|
|
|
12
12
|
// src/live-session.ts
|
|
13
13
|
var MAX_TRANSCRIPT_QUEUE = 100;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
resolveInstallSourceFor
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-GXQVOKHJ.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-OY6NJWDD.js";
|
|
13
13
|
import {
|
|
14
14
|
API_KEY_PREFIX_PATTERN,
|
|
15
15
|
isRecord
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-GM2IFDVF.js";
|
|
17
17
|
|
|
18
18
|
// src/shell-alias.ts
|
|
19
19
|
import { homedir } from "os";
|
|
@@ -115,6 +115,8 @@ var isDisabledExport = (line) => {
|
|
|
115
115
|
};
|
|
116
116
|
var keyPrefix = (key) => key.split(".")[0] ?? key;
|
|
117
117
|
var MAC_APP_KEY_PREFIX_FIELD = "macAppKeyPrefix";
|
|
118
|
+
var CLI_CREATED_KEY_PREFIX_FIELD = "cliCreatedKeyPrefix";
|
|
119
|
+
var isCliCreatedKey = (key, createdPrefix) => keyPrefix(key) === createdPrefix;
|
|
118
120
|
var findKeyExport = (contents) => {
|
|
119
121
|
const lines = contents.split("\n");
|
|
120
122
|
for (const [index, line] of lines.entries()) {
|
|
@@ -131,6 +133,11 @@ var keepMacAppKeyPrefix = (current, apiKey) => {
|
|
|
131
133
|
const { [MAC_APP_KEY_PREFIX_FIELD]: recorded, ...rest } = current;
|
|
132
134
|
return recorded === keyPrefix(apiKey) ? { ...rest, [MAC_APP_KEY_PREFIX_FIELD]: recorded } : rest;
|
|
133
135
|
};
|
|
136
|
+
var savedKeyIsCliCreated = (current, apiKey, origin) => origin === "created_by_this_cli" || current[CLI_CREATED_KEY_PREFIX_FIELD] === keyPrefix(apiKey);
|
|
137
|
+
var withKeyRecords = (current, apiKey, origin) => {
|
|
138
|
+
const { [CLI_CREATED_KEY_PREFIX_FIELD]: _previous, ...rest } = keepMacAppKeyPrefix(current, apiKey);
|
|
139
|
+
return savedKeyIsCliCreated(current, apiKey, origin) ? { ...rest, [CLI_CREATED_KEY_PREFIX_FIELD]: keyPrefix(apiKey) } : rest;
|
|
140
|
+
};
|
|
134
141
|
var manualKeyStepFor = (kind, platform) => kind === "no-rc" || platform === "win32" ? "config-only" : "paste-export";
|
|
135
142
|
var rcResult = (kind, over = {}) => ({
|
|
136
143
|
kind,
|
|
@@ -211,7 +218,7 @@ var resolveRcTarget = () => {
|
|
|
211
218
|
const fallback = FALLBACK_RCS.map((name) => join2(homedir2(), name)).find(existsSync2);
|
|
212
219
|
return fallback ? { path: fallback, shell: null } : null;
|
|
213
220
|
};
|
|
214
|
-
var writeKey = (apiKey, options = {}) => {
|
|
221
|
+
var writeKey = (apiKey, origin, options = {}) => {
|
|
215
222
|
const configPath = configFilePath();
|
|
216
223
|
const existing = readJsonSafe(configPath);
|
|
217
224
|
let current = {};
|
|
@@ -229,7 +236,7 @@ var writeKey = (apiKey, options = {}) => {
|
|
|
229
236
|
writeJsonAtomic(
|
|
230
237
|
configPath,
|
|
231
238
|
{
|
|
232
|
-
...
|
|
239
|
+
...withKeyRecords(current, apiKey, origin),
|
|
233
240
|
apiKey,
|
|
234
241
|
installSource: resolveInstallSourceFor(current),
|
|
235
242
|
...options.controlMode ? { controlMode: options.controlMode } : {},
|
|
@@ -248,7 +255,7 @@ var clearKey = (options = {}) => {
|
|
|
248
255
|
const existing = readConfigRecord(configPath);
|
|
249
256
|
let removedFromConfig = false;
|
|
250
257
|
if (existing !== null && typeof existing.apiKey === "string") {
|
|
251
|
-
const { apiKey: _dropped, [MAC_APP_KEY_PREFIX_FIELD]: _adopted, ...rest } = existing;
|
|
258
|
+
const { apiKey: _dropped, [MAC_APP_KEY_PREFIX_FIELD]: _adopted, [CLI_CREATED_KEY_PREFIX_FIELD]: _created, ...rest } = existing;
|
|
252
259
|
writeJsonAtomic(configPath, rest, KEY_FILE_MODE);
|
|
253
260
|
restrictFile(configPath);
|
|
254
261
|
removedFromConfig = true;
|
|
@@ -306,11 +313,13 @@ var readKeySource = () => {
|
|
|
306
313
|
if (fileKey) return { kind: "config", key: fileKey, origin: configPath, drift: null };
|
|
307
314
|
return { kind: "none", key: null, origin: null, drift: null };
|
|
308
315
|
};
|
|
309
|
-
var
|
|
310
|
-
const recorded = readConfigRecord(configPath)?.[
|
|
316
|
+
var readRecordedKeyPrefix = (configPath, field) => {
|
|
317
|
+
const recorded = readConfigRecord(configPath)?.[field];
|
|
311
318
|
return typeof recorded === "string" && API_KEY_PREFIX_PATTERN.test(recorded) ? recorded : null;
|
|
312
319
|
};
|
|
320
|
+
var readMacAppKeyPrefix = (configPath = configFilePath()) => readRecordedKeyPrefix(configPath, MAC_APP_KEY_PREFIX_FIELD);
|
|
313
321
|
var isAdoptedMacAppKey = (key, adoptedPrefix) => keyPrefix(key) === adoptedPrefix;
|
|
322
|
+
var readCliCreatedKeyPrefix = (configPath = configFilePath()) => readRecordedKeyPrefix(configPath, CLI_CREATED_KEY_PREFIX_FIELD);
|
|
314
323
|
var recordMacAppKeyPrefix = (apiKey, configPath = configFilePath()) => {
|
|
315
324
|
const config = readConfigRecord(configPath);
|
|
316
325
|
if (config === null || config.apiKey !== apiKey) return false;
|
|
@@ -348,7 +357,9 @@ export {
|
|
|
348
357
|
exportLine,
|
|
349
358
|
isDisabledExport,
|
|
350
359
|
keyPrefix,
|
|
360
|
+
isCliCreatedKey,
|
|
351
361
|
manualKeyStepFor,
|
|
362
|
+
resolveRcTarget,
|
|
352
363
|
writeKey,
|
|
353
364
|
clearKey,
|
|
354
365
|
readConfigFileKey,
|
|
@@ -357,7 +368,9 @@ export {
|
|
|
357
368
|
readKeySource,
|
|
358
369
|
readMacAppKeyPrefix,
|
|
359
370
|
isAdoptedMacAppKey,
|
|
371
|
+
readCliCreatedKeyPrefix,
|
|
360
372
|
recordMacAppKeyPrefix,
|
|
373
|
+
shellProfileCandidates,
|
|
361
374
|
findExportedKeyLines,
|
|
362
375
|
findExportedKeyLine
|
|
363
376
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SETUP_FLAGS
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-NJK4MGXL.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-QDKNLNCA.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-GM2IFDVF.js";
|
|
21
21
|
|
|
22
22
|
// src/cli/cowork.ts
|
|
23
23
|
import { readFileSync } from "fs";
|
|
@@ -5,16 +5,16 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
NOTIFICATION_MATCHED_TYPES,
|
|
7
7
|
POSTTOOLUSE_MIRRORED_TOOLS
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-RFK2WN6S.js";
|
|
9
9
|
import {
|
|
10
10
|
isProtectedByScope,
|
|
11
11
|
registerHookEntry
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-NQICO3ES.js";
|
|
13
13
|
import {
|
|
14
14
|
CLAUDE_PRETOOLUSE_MATCHER,
|
|
15
15
|
HOOK_BUDGETS,
|
|
16
16
|
HOOK_LOCATOR_BINARY
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-GM2IFDVF.js";
|
|
18
18
|
|
|
19
19
|
// src/gemini-config.ts
|
|
20
20
|
var GEMINI_HOOK_BINARY = "pushary-gemini-hook";
|
|
@@ -6,38 +6,38 @@ import {
|
|
|
6
6
|
} from "./chunk-VTR4VRL2.js";
|
|
7
7
|
import {
|
|
8
8
|
ensureDaemonRunning
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-HBR6ZZHN.js";
|
|
10
10
|
import {
|
|
11
11
|
buildTranscriptRecords,
|
|
12
12
|
decodePublicKey,
|
|
13
13
|
generateSessionKey,
|
|
14
14
|
wrapSessionKey
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-RIBIEQHU.js";
|
|
16
16
|
import {
|
|
17
17
|
fetchTranscriptRecipients,
|
|
18
18
|
uploadTranscriptRecords
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-3WRJU7KN.js";
|
|
20
20
|
import {
|
|
21
21
|
transcriptEnvironmentPreference,
|
|
22
22
|
transcriptsEnabled
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-JDWOK6PE.js";
|
|
24
24
|
import {
|
|
25
25
|
hookOwnerOf
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-OSOCONIE.js";
|
|
27
27
|
import {
|
|
28
28
|
readTranscriptPreference
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-U23XTMBF.js";
|
|
30
30
|
import {
|
|
31
31
|
codexHome,
|
|
32
32
|
pusharyDir
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-NQICO3ES.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-OY6NJWDD.js";
|
|
41
41
|
|
|
42
42
|
// src/transcript-registration.ts
|
|
43
43
|
import { createHash } from "crypto";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
MCP_BRIDGE_BINARY
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-Q7IEFI7V.js";
|
|
4
4
|
import {
|
|
5
5
|
KEY_FILE_MODE
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-U23XTMBF.js";
|
|
7
7
|
import {
|
|
8
8
|
NpmMissingError,
|
|
9
9
|
NpmPermissionError
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-NQICO3ES.js";
|
|
11
11
|
import {
|
|
12
12
|
readJsonSafe,
|
|
13
13
|
writeFileAtomic,
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
} from "./chunk-AQFEP65J.js";
|
|
16
16
|
import {
|
|
17
17
|
NPX_LATEST_COMMAND
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-QDKNLNCA.js";
|
|
19
19
|
|
|
20
20
|
// src/instruction-file.ts
|
|
21
21
|
import { existsSync, readFileSync, writeFileSync, mkdirSync, rmSync } from "fs";
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-POFBE6ZY.js";
|
|
4
4
|
import {
|
|
5
5
|
autoUpdateState
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-NQICO3ES.js";
|
|
7
7
|
import {
|
|
8
8
|
readJsonSafe,
|
|
9
9
|
writeJsonAtomic
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
cliPackagePathSegments,
|
|
15
15
|
globalUpgradeEntry,
|
|
16
16
|
ownPackageRoot
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-GM2IFDVF.js";
|
|
18
18
|
|
|
19
19
|
// src/auto-update.ts
|
|
20
20
|
import { spawn } from "child_process";
|
|
@@ -5,18 +5,18 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
SubscriptionRequiredError,
|
|
7
7
|
callMcpTool
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-RK7TDMQT.js";
|
|
9
9
|
import {
|
|
10
10
|
installNetworkDefaults,
|
|
11
11
|
isNetworkFailure
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-2E6AWHV7.js";
|
|
13
13
|
import {
|
|
14
14
|
clientReportClaims
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-NQICO3ES.js";
|
|
16
16
|
import {
|
|
17
17
|
getApiKey,
|
|
18
18
|
getBaseUrl
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-OY6NJWDD.js";
|
|
20
20
|
import {
|
|
21
21
|
ASK_AGENT_NAME_MAX,
|
|
22
22
|
ASK_QUESTION_MAX,
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
GATE_PERMISSION_MODE_MAX_LENGTH,
|
|
26
26
|
degradedLine,
|
|
27
27
|
truncateLine
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-GM2IFDVF.js";
|
|
29
29
|
|
|
30
30
|
// src/client-report-claim.ts
|
|
31
31
|
import { createHash } from "crypto";
|