pushary 1.9.23 → 1.9.25
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 +15 -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-GN6BJXC7.js → chunk-2CUE3XXS.js} +1 -1
- package/dist/{chunk-OH6OGEOY.js → chunk-2J2WFX7X.js} +4 -4
- package/dist/{chunk-QIODXPTP.js → chunk-2VQZC6DW.js} +4 -4
- package/dist/{chunk-SWQLZQE3.js → chunk-2XHBYMVN.js} +14 -13
- package/dist/{chunk-HXZG5WHU.js → chunk-3UYMOWX6.js} +2 -2
- package/dist/{chunk-R5C3QCVT.js → chunk-4KZP4YMV.js} +1 -1
- package/dist/{chunk-73HGV4R6.js → chunk-5ETE7F45.js} +2 -2
- package/dist/{chunk-OQPEHKH2.js → chunk-5Q2QJ2AL.js} +1 -1
- package/dist/{chunk-K2EYK5RL.js → chunk-5WTEKIAS.js} +4 -4
- package/dist/{chunk-AV5VX7OK.js → chunk-7UZD2F4Y.js} +8 -8
- package/dist/{chunk-E2LGKG75.js → chunk-7V6PJFDF.js} +3 -3
- package/dist/{chunk-KJA6IGOZ.js → chunk-A3QQWXIE.js} +1 -1
- package/dist/{chunk-GYP6DLA4.js → chunk-AXB4ABUD.js} +8 -8
- package/dist/{chunk-I46QTKYI.js → chunk-BGJDOHNF.js} +5 -5
- package/dist/{chunk-FBV2KS3Z.js → chunk-BHRMHDOO.js} +2 -2
- package/dist/{chunk-RN5NRRHX.js → chunk-EJJNZYDS.js} +2 -2
- package/dist/{chunk-6HT2TUZD.js → chunk-EJMXZH5E.js} +2 -2
- package/dist/{chunk-N4DMADJM.js → chunk-FCXYDR62.js} +1 -1
- package/dist/{chunk-ZGYO6OQE.js → chunk-FJKV64M7.js} +5 -5
- package/dist/{chunk-QFNY4KUQ.js → chunk-FLC4TVXH.js} +1 -1
- package/dist/{chunk-NHBPW6C4.js → chunk-G446AVR5.js} +2 -2
- package/dist/{chunk-AQ3TSQA2.js → chunk-GC5HJE3T.js} +21 -8
- package/dist/{chunk-CJTQNUUT.js → chunk-HEJMZVJI.js} +2 -2
- package/dist/{chunk-OH647UT3.js → chunk-KGSN2SOL.js} +793 -18
- package/dist/{chunk-7RGEJOQS.js → chunk-KM7AEGKF.js} +3 -3
- package/dist/{chunk-FIYCICHC.js → chunk-KP4BIZLP.js} +2 -2
- package/dist/{chunk-YXHVMZPR.js → chunk-KZLOVLA6.js} +4 -4
- package/dist/{chunk-AXSHPFU3.js → chunk-LDNKGG5G.js} +3 -3
- package/dist/{chunk-DKBPNHAI.js → chunk-N3ACK3YA.js} +4 -4
- package/dist/{chunk-4GKQDFH6.js → chunk-NFH2H7PD.js} +5 -5
- package/dist/{chunk-BY5EKA6W.js → chunk-OFHSTCXK.js} +3 -3
- package/dist/{chunk-LEQRIJ4H.js → chunk-OOKIWOMK.js} +3 -3
- package/dist/{chunk-7J2AX5T6.js → chunk-OWOSNGEQ.js} +2 -2
- package/dist/{chunk-SSWK2WYX.js → chunk-PAMW5M53.js} +5 -5
- package/dist/{chunk-JNKHCGHR.js → chunk-PM2WJSUH.js} +1 -1
- package/dist/{chunk-JCEUDLGW.js → chunk-PPGLIWOR.js} +1 -1
- package/dist/{chunk-PFB7P4F3.js → chunk-PSNF27BC.js} +6 -6
- package/dist/{chunk-2AUKCSLQ.js → chunk-Q37XFSPO.js} +4 -4
- package/dist/{chunk-S2R2U5W5.js → chunk-RSENVGBQ.js} +4 -4
- package/dist/{chunk-M7DCI44L.js → chunk-SGGR5MN2.js} +1 -1
- package/dist/{chunk-NSCETODW.js → chunk-TLUSUDRU.js} +1 -1
- package/dist/chunk-UJB6HHP4.js +166 -0
- package/dist/{chunk-YZPFJCFE.js → chunk-UK7OY3EJ.js} +1 -1
- package/dist/{chunk-ISAKLEKE.js → chunk-UUOC7A7M.js} +7 -7
- package/dist/{chunk-Z4UDB7EC.js → chunk-VEGS4NYF.js} +3 -3
- package/dist/{chunk-USUI4P63.js → chunk-VFF7ZBIS.js} +2 -2
- package/dist/{chunk-RHIKMNWJ.js → chunk-VN5Q4KOD.js} +2 -2
- package/dist/{chunk-6GHZAS7S.js → chunk-WEKXYS2F.js} +4 -4
- package/dist/{chunk-SLBO7PHS.js → chunk-WKEP4JAW.js} +2 -2
- package/dist/{chunk-M6R3SZZS.js → chunk-YD3DIFIU.js} +1 -1
- package/dist/{chunk-EDN4F6GX.js → chunk-ZLGCNHJG.js} +1 -1
- package/dist/{chunk-A5U62Q6K.js → chunk-ZLY7BHN4.js} +5 -5
- package/dist/{chunk-AFP3HZVK.js → chunk-ZNT4ZZXJ.js} +1 -1
- package/dist/{chunk-XBETSM5T.js → chunk-ZV3262AA.js} +3 -3
- package/dist/{global-upgrade-SKY7A3SI.js → global-upgrade-4M4TJKQR.js} +6 -6
- package/dist/{paths-XUUEK7OU.js → paths-6JY6J56N.js} +2 -2
- package/dist/{reapply-WQDP26EA.js → reapply-LFEQ5GF6.js} +20 -20
- package/dist/src/index.js +19 -19
- package/dist/{upgrade-lock-AYW3TB7X.js → upgrade-lock-CZRCHYVU.js} +3 -3
- package/package.json +1 -1
- package/dist/chunk-OYIN77HO.js +0 -72
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import {
|
|
2
2
|
defersToNativeMode,
|
|
3
3
|
reportMachineDenial
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-BHRMHDOO.js";
|
|
5
5
|
import {
|
|
6
6
|
isGatingMoment,
|
|
7
7
|
recordKeylessMoment
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-2CUE3XXS.js";
|
|
9
9
|
import {
|
|
10
10
|
announceSubscriptionRequired,
|
|
11
11
|
isDeferAnswer,
|
|
12
12
|
oncePerSession
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-SGGR5MN2.js";
|
|
14
14
|
import {
|
|
15
15
|
activeHookSource,
|
|
16
16
|
activeIdentity
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-5WTEKIAS.js";
|
|
18
18
|
import {
|
|
19
19
|
DEFAULT_SESSION,
|
|
20
20
|
UNNAMED_ACTION,
|
|
@@ -39,7 +39,7 @@ import {
|
|
|
39
39
|
reportEvent,
|
|
40
40
|
scopePathFor,
|
|
41
41
|
settleQuestionsForToolUse
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-AXB4ABUD.js";
|
|
43
43
|
import {
|
|
44
44
|
askUser,
|
|
45
45
|
cancelQuestion,
|
|
@@ -51,20 +51,20 @@ import {
|
|
|
51
51
|
sendNotification,
|
|
52
52
|
waitForQuestion,
|
|
53
53
|
waitsForThePhone
|
|
54
|
-
} from "./chunk-
|
|
54
|
+
} from "./chunk-NFH2H7PD.js";
|
|
55
55
|
import {
|
|
56
56
|
SubscriptionRequiredError
|
|
57
|
-
} from "./chunk-
|
|
57
|
+
} from "./chunk-7V6PJFDF.js";
|
|
58
58
|
import {
|
|
59
59
|
getMachineId
|
|
60
|
-
} from "./chunk-
|
|
60
|
+
} from "./chunk-ZLGCNHJG.js";
|
|
61
61
|
import {
|
|
62
62
|
getApiKey,
|
|
63
63
|
getBaseUrl
|
|
64
|
-
} from "./chunk-
|
|
64
|
+
} from "./chunk-5Q2QJ2AL.js";
|
|
65
65
|
import {
|
|
66
66
|
NPX_LATEST_COMMAND
|
|
67
|
-
} from "./chunk-
|
|
67
|
+
} from "./chunk-OOKIWOMK.js";
|
|
68
68
|
import {
|
|
69
69
|
AGENT_QUESTION_STRATEGY,
|
|
70
70
|
DECISION_STOP_REASON,
|
|
@@ -104,8 +104,9 @@ import {
|
|
|
104
104
|
parseAgentQuestionAnswers,
|
|
105
105
|
parseAgentQuestions,
|
|
106
106
|
questionHandedToTheTerminal,
|
|
107
|
-
resolveGate
|
|
108
|
-
|
|
107
|
+
resolveGate,
|
|
108
|
+
timeoutActionWithoutLocalPrompt
|
|
109
|
+
} from "./chunk-KGSN2SOL.js";
|
|
109
110
|
|
|
110
111
|
// src/claude-permission-rules.ts
|
|
111
112
|
import { readFileSync, statSync } from "fs";
|
|
@@ -345,7 +346,7 @@ var dispatchModeHandler = async (apiKey, input, toolPolicy, machineId, trainingC
|
|
|
345
346
|
const runHandler = () => {
|
|
346
347
|
switch (ownPrompt ? toolPolicy.mode : approvalModeWithoutLocalPrompt(toolPolicy.mode)) {
|
|
347
348
|
case "push_only":
|
|
348
|
-
return handlePushOnly(apiKey, description, projectName, toolPolicy.timeoutSeconds, toolPolicy.timeoutAction, sessionId, machineId, input.tool_name, toolTarget, decision, signals);
|
|
349
|
+
return handlePushOnly(apiKey, description, projectName, toolPolicy.timeoutSeconds, ownPrompt ? toolPolicy.timeoutAction : timeoutActionWithoutLocalPrompt(toolPolicy), sessionId, machineId, input.tool_name, toolTarget, decision, signals);
|
|
349
350
|
case "terminal_only":
|
|
350
351
|
return Promise.resolve(handleTerminalOnly());
|
|
351
352
|
case "push_first":
|
|
@@ -3,11 +3,11 @@ import {
|
|
|
3
3
|
decodePublicKey,
|
|
4
4
|
generateSessionKey,
|
|
5
5
|
wrapSessionKey
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-FCXYDR62.js";
|
|
7
7
|
import {
|
|
8
8
|
fetchTranscriptRecipients,
|
|
9
9
|
uploadTranscriptRecords
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-FLC4TVXH.js";
|
|
11
11
|
|
|
12
12
|
// src/live-session.ts
|
|
13
13
|
var MAX_TRANSCRIPT_QUEUE = 100;
|
|
@@ -3,18 +3,18 @@ import {
|
|
|
3
3
|
addGeminiMcpServer,
|
|
4
4
|
removeGeminiMcpServer,
|
|
5
5
|
supportedClaudeEvents
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-KM7AEGKF.js";
|
|
7
7
|
import {
|
|
8
8
|
CLAUDE_CODE_AGENT,
|
|
9
9
|
parseApplyPatchFiles
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-AXB4ABUD.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-2VQZC6DW.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-KGSN2SOL.js";
|
|
28
28
|
|
|
29
29
|
// src/claude-config.ts
|
|
30
30
|
import { join } from "path";
|
|
@@ -6,38 +6,38 @@ import {
|
|
|
6
6
|
} from "./chunk-VTR4VRL2.js";
|
|
7
7
|
import {
|
|
8
8
|
ensureDaemonRunning
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-PAMW5M53.js";
|
|
10
10
|
import {
|
|
11
11
|
buildTranscriptRecords,
|
|
12
12
|
decodePublicKey,
|
|
13
13
|
generateSessionKey,
|
|
14
14
|
wrapSessionKey
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-FCXYDR62.js";
|
|
16
16
|
import {
|
|
17
17
|
fetchTranscriptRecipients,
|
|
18
18
|
uploadTranscriptRecords
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-FLC4TVXH.js";
|
|
20
20
|
import {
|
|
21
21
|
transcriptEnvironmentPreference,
|
|
22
22
|
transcriptsEnabled
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-YD3DIFIU.js";
|
|
24
24
|
import {
|
|
25
25
|
hookOwnerOf
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-ZLY7BHN4.js";
|
|
27
27
|
import {
|
|
28
28
|
readTranscriptPreference
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-GC5HJE3T.js";
|
|
30
30
|
import {
|
|
31
31
|
codexHome,
|
|
32
32
|
pusharyDir
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-2VQZC6DW.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-5Q2QJ2AL.js";
|
|
41
41
|
|
|
42
42
|
// src/transcript-registration.ts
|
|
43
43
|
import { createHash } from "crypto";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
keyCheckFromResponse
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-VEGS4NYF.js";
|
|
4
4
|
import {
|
|
5
5
|
installNetworkDefaults
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-ZV3262AA.js";
|
|
7
7
|
import {
|
|
8
8
|
getBaseUrl
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-5Q2QJ2AL.js";
|
|
10
10
|
|
|
11
11
|
// src/retry.ts
|
|
12
12
|
var isRetryable = (err) => {
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
IDLE_PROMPT_NOTIFICATION,
|
|
3
3
|
NOTIFICATION_PUSH_TYPES,
|
|
4
4
|
POSTTOOLUSE_MIRROR_ONLY_TOOLS
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-A3QQWXIE.js";
|
|
6
6
|
import {
|
|
7
7
|
cancelQuestion,
|
|
8
8
|
clientErrorKindOf,
|
|
@@ -10,26 +10,26 @@ import {
|
|
|
10
10
|
reportClientError,
|
|
11
11
|
sendNotification,
|
|
12
12
|
waitForAnswer
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-NFH2H7PD.js";
|
|
14
14
|
import {
|
|
15
15
|
withRetry
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-7V6PJFDF.js";
|
|
17
17
|
import {
|
|
18
18
|
getMachineId
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-ZLGCNHJG.js";
|
|
20
20
|
import {
|
|
21
21
|
reportedInstallSource
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-EJMXZH5E.js";
|
|
23
23
|
import {
|
|
24
24
|
canonicalJson
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-2VQZC6DW.js";
|
|
26
26
|
import {
|
|
27
27
|
writeFileAtomic
|
|
28
28
|
} from "./chunk-AQFEP65J.js";
|
|
29
29
|
import {
|
|
30
30
|
getApiKey,
|
|
31
31
|
getBaseUrl
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-5Q2QJ2AL.js";
|
|
33
33
|
import {
|
|
34
34
|
ACTION_BODY_MAX,
|
|
35
35
|
AGENT_LABELS_BY_TYPE,
|
|
@@ -60,7 +60,7 @@ import {
|
|
|
60
60
|
resolvePolicy,
|
|
61
61
|
toToolLookup,
|
|
62
62
|
truncateLine
|
|
63
|
-
} from "./chunk-
|
|
63
|
+
} from "./chunk-KGSN2SOL.js";
|
|
64
64
|
|
|
65
65
|
// ../hook-mapping/src/describe.ts
|
|
66
66
|
import { isAbsolute, relative, resolve } from "path";
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
forkFinishWithUpgradeLock,
|
|
5
5
|
installWithUpgradeLock,
|
|
6
6
|
releaseAutoUpdateLock
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-PPGLIWOR.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-VFF7ZBIS.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-2VQZC6DW.js";
|
|
31
31
|
import {
|
|
32
32
|
NPX_LATEST_COMMAND
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-OOKIWOMK.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-KGSN2SOL.js";
|
|
43
43
|
|
|
44
44
|
// src/global-upgrade.ts
|
|
45
45
|
import { existsSync } from "fs";
|
|
@@ -6,12 +6,12 @@ import {
|
|
|
6
6
|
permissionDeniedAction,
|
|
7
7
|
releaseThrottle,
|
|
8
8
|
reportEvent
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-AXB4ABUD.js";
|
|
10
10
|
import {
|
|
11
11
|
machineDecisionFor,
|
|
12
12
|
shouldDeferToNativeMode,
|
|
13
13
|
wireVerdictFor
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-KGSN2SOL.js";
|
|
15
15
|
|
|
16
16
|
// src/machine-decision-audit.ts
|
|
17
17
|
import { basename } from "path";
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
compatibleConfigFile
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-5WTEKIAS.js";
|
|
4
4
|
import {
|
|
5
5
|
hookOwnerOf,
|
|
6
6
|
hookOwnerOfCommands,
|
|
7
7
|
liveBridgeProbe,
|
|
8
8
|
resolveBridgeStub
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-ZLY7BHN4.js";
|
|
10
10
|
import {
|
|
11
11
|
AGENT_CHOICES
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-4KZP4YMV.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-2VQZC6DW.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-KGSN2SOL.js";
|
|
33
33
|
|
|
34
34
|
// src/opencode-plugin.ts
|
|
35
35
|
var OPENCODE_PLUGIN_MARKER = "pushary-opencode-plugin w1";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
pusharyDir
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-2VQZC6DW.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-KGSN2SOL.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-EJMXZH5E.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-5Q2QJ2AL.js";
|
|
13
13
|
import {
|
|
14
14
|
API_KEY_PREFIX_PATTERN,
|
|
15
15
|
isRecord
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-KGSN2SOL.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,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
pusharyDir
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-2VQZC6DW.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-KGSN2SOL.js";
|
|
10
10
|
|
|
11
11
|
// src/process-ownership.ts
|
|
12
12
|
import { createHash, randomUUID } from "crypto";
|