pushary 1.9.97 → 1.9.100
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 +29 -0
- package/dist/{api-WH3DLHJB.js → api-H734WJ2V.js} +10 -10
- package/dist/bin/pushary-bell-hook.js +27 -26
- package/dist/bin/pushary-bell.js +10 -10
- package/dist/bin/pushary-claude.js +48 -33
- package/dist/bin/pushary-clean.js +34 -34
- package/dist/bin/pushary-codex-bridge.js +21 -21
- package/dist/bin/pushary-codex-hook.js +32 -31
- 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 +40 -39
- package/dist/bin/pushary-disconnect.js +26 -26
- package/dist/bin/pushary-display-hook.js +18 -17
- package/dist/bin/pushary-doctor.js +42 -42
- package/dist/bin/pushary-elicitation-hook.js +27 -26
- package/dist/bin/pushary-gemini-bridge.js +15 -15
- package/dist/bin/pushary-gemini-hook.js +29 -28
- package/dist/bin/pushary-hook.js +31 -30
- package/dist/bin/pushary-login.js +38 -20
- package/dist/bin/pushary-logout.js +25 -25
- package/dist/bin/pushary-mcp.js +11 -11
- package/dist/bin/pushary-mode.js +15 -15
- package/dist/bin/pushary-notification-hook.js +26 -25
- package/dist/bin/pushary-opencode-hook.js +28 -27
- package/dist/bin/pushary-permission-denied-hook.js +31 -30
- package/dist/bin/pushary-permission-hook.js +31 -30
- package/dist/bin/pushary-post-hook.js +26 -25
- package/dist/bin/pushary-prompt-hook.js +26 -25
- package/dist/bin/pushary-session-end-hook.js +28 -27
- package/dist/bin/pushary-session-start-hook.js +36 -35
- package/dist/bin/pushary-setup.js +103 -109
- package/dist/bin/pushary-stats.js +5 -5
- package/dist/bin/pushary-status.js +32 -32
- package/dist/bin/pushary-stop-hook.js +26 -25
- package/dist/bin/pushary-stopfailure-hook.js +26 -25
- package/dist/bin/pushary-suggestions.js +15 -15
- package/dist/bin/pushary-transcript-register.js +19 -18
- package/dist/bin/pushary-transcripts.js +27 -26
- package/dist/bin/pushary-upgrade.js +40 -40
- package/dist/bin/pushary-wait.js +15 -15
- package/dist/bin/pushary.js +7 -7
- package/dist/{chunk-TSSV3NBD.js → chunk-2SFVZ3IT.js} +2 -2
- package/dist/{chunk-FZQSUS3R.js → chunk-33YOO7FG.js} +14 -14
- package/dist/{chunk-CG3C2WL7.js → chunk-3BBJO25D.js} +14 -12
- package/dist/{chunk-UAUADSJX.js → chunk-3OIUMHHO.js} +2 -2
- package/dist/{chunk-5RNZP53C.js → chunk-43CU2HYQ.js} +6 -6
- package/dist/{chunk-WOFHN2IZ.js → chunk-4FAJQPFY.js} +256 -12
- package/dist/{chunk-QCEY7TSX.js → chunk-4JUQ74CG.js} +3 -3
- package/dist/{chunk-CB2RYMAO.js → chunk-4QO267OY.js} +1 -1
- package/dist/{chunk-R7D3PH2M.js → chunk-4TLE7CSQ.js} +6 -6
- package/dist/{chunk-RRA6POT5.js → chunk-4TVLPGJV.js} +1 -1
- package/dist/{chunk-ORVMA5KJ.js → chunk-5PW25NHB.js} +3 -3
- package/dist/{chunk-W5IW7NZE.js → chunk-5QB6P3I7.js} +104 -2
- package/dist/{chunk-GN2L5CYF.js → chunk-6VFN4XTI.js} +1 -1
- package/dist/{chunk-Z6O6CDTP.js → chunk-7ZHLBWOV.js} +5 -5
- package/dist/{chunk-IED5CTYP.js → chunk-A7JQJUGZ.js} +3 -3
- package/dist/{chunk-VVHNHETX.js → chunk-ACVL2MHG.js} +2 -2
- package/dist/{chunk-GEA6ZV2P.js → chunk-AFGMZZEB.js} +2 -2
- package/dist/{chunk-NDJ7H2WF.js → chunk-AHIAB7JQ.js} +1 -1
- package/dist/chunk-BBNMGXZA.js +45 -0
- package/dist/{chunk-TKOL7DJH.js → chunk-BFEY6FRZ.js} +2 -2
- package/dist/{chunk-RILJLDKG.js → chunk-BIUD3TAY.js} +5 -5
- package/dist/{chunk-KYX7VBEE.js → chunk-CC24CQ7P.js} +2 -2
- package/dist/{chunk-5WYXFKZV.js → chunk-CK6YJZEK.js} +1 -1
- package/dist/{chunk-ZFUSWR2P.js → chunk-DCYA2SW2.js} +2 -2
- package/dist/{chunk-SXX47FHL.js → chunk-DIWNHZ6I.js} +2 -2
- package/dist/{chunk-5WOO44TA.js → chunk-DPGG3AAG.js} +5 -5
- package/dist/{chunk-EAJT6RYP.js → chunk-E2YENQFD.js} +7 -7
- package/dist/{chunk-VHOGSWUF.js → chunk-E34NVKR7.js} +3 -3
- package/dist/{chunk-APFQBVQW.js → chunk-E4YZIS4C.js} +6 -6
- package/dist/{chunk-RSITUL2U.js → chunk-ERO2ERIE.js} +2 -2
- package/dist/{chunk-JA6GCOW2.js → chunk-FIKNFZ7Z.js} +7 -7
- package/dist/{chunk-VPT3RDTO.js → chunk-G66WIAST.js} +0 -43
- package/dist/{chunk-6CDA4R5L.js → chunk-GKNTNKVQ.js} +3 -3
- package/dist/{chunk-VAY5AJ6N.js → chunk-GSQZTDPZ.js} +4 -4
- package/dist/{chunk-AUZITE2H.js → chunk-GTUCRZRJ.js} +6 -6
- package/dist/{chunk-JR6FCHAQ.js → chunk-IGEY7ZFQ.js} +3 -3
- package/dist/{chunk-TZE2S3XP.js → chunk-IGIWULLQ.js} +3 -3
- package/dist/{chunk-OBB6VTSG.js → chunk-K6QZMKAP.js} +5 -5
- package/dist/{chunk-5OLBO5EB.js → chunk-KACD6W6J.js} +1 -1
- package/dist/{chunk-RZD7ULBJ.js → chunk-KOUB4ZLX.js} +1 -1
- package/dist/{chunk-VVP4CP4O.js → chunk-KUIJMRES.js} +11 -10
- package/dist/{chunk-ZDIQPYM2.js → chunk-MP3SEXXJ.js} +1 -1
- package/dist/{chunk-2ZAFA3XI.js → chunk-MY7NJM56.js} +3 -3
- package/dist/{chunk-NTCVGJFC.js → chunk-N6UPDKCI.js} +4 -4
- package/dist/{chunk-HXUE6IIP.js → chunk-NTTFATKG.js} +5 -5
- package/dist/{chunk-OW4WEO56.js → chunk-O35JKL4T.js} +3 -3
- package/dist/{chunk-RPY5XCGA.js → chunk-ODJQ5KFS.js} +2 -2
- package/dist/{chunk-HWEEBVS7.js → chunk-OUF7TX2C.js} +4 -4
- package/dist/{chunk-CMDIKFVL.js → chunk-PWGD5EP6.js} +1 -1
- package/dist/{chunk-32577NGL.js → chunk-QD57EL3I.js} +1 -1
- package/dist/{chunk-IFQKSIID.js → chunk-RAASN7OG.js} +3 -3
- package/dist/{chunk-KNVTKFDP.js → chunk-SGECX2RY.js} +2 -2
- package/dist/{chunk-MFJFN4DA.js → chunk-SJXNDL73.js} +3 -3
- package/dist/{chunk-X22LLKBY.js → chunk-SOBHT3J7.js} +3 -3
- package/dist/{chunk-GNFUPHPZ.js → chunk-SQSL6DVX.js} +10 -10
- package/dist/{chunk-W3OTAHLV.js → chunk-SSLEGJYI.js} +4 -4
- package/dist/{chunk-5U63KUP3.js → chunk-T72OMEHB.js} +1 -1
- package/dist/{chunk-HD7AURL6.js → chunk-THHVB46D.js} +52 -7
- package/dist/{chunk-MYKZPTAL.js → chunk-TLERJKSE.js} +1 -1
- package/dist/{chunk-NI3NSURQ.js → chunk-UPQE4YPM.js} +1 -1
- package/dist/{chunk-E5WUBHVH.js → chunk-VMXY3PAT.js} +4 -4
- package/dist/{chunk-QP3OSLKU.js → chunk-W44TA4CT.js} +5 -5
- package/dist/{chunk-MGYGWHG5.js → chunk-WPK2UWDU.js} +1 -1
- package/dist/{chunk-T35RHO3X.js → chunk-WRCQCJA7.js} +5 -5
- package/dist/{chunk-5YRDZE5F.js → chunk-WVAJSBI2.js} +1 -1
- package/dist/{chunk-KZTN6OXM.js → chunk-XEGKTXTC.js} +6 -6
- package/dist/{chunk-4D4USO5K.js → chunk-XJF4WX5C.js} +6 -6
- package/dist/{chunk-LKDAMWTZ.js → chunk-YVAFDGK2.js} +4 -4
- package/dist/{chunk-R7TVELKF.js → chunk-Z6HHEV7A.js} +1 -1
- package/dist/{chunk-6RGQIKAC.js → chunk-ZG6M5VQV.js} +3 -3
- package/dist/{chunk-CP72YEEA.js → chunk-ZNPUYLOY.js} +1 -1
- package/dist/{codex-app-cards-switch-DFZK6GPW.js → codex-app-cards-switch-JKKTCZNB.js} +11 -11
- package/dist/{codex-desktop-launch-7QGN7SL7.js → codex-desktop-launch-6BONFDHF.js} +1 -1
- package/dist/{codex-session-launch-OWMNCYAH.js → codex-session-launch-5FRL6UGU.js} +18 -18
- package/dist/{config-ITPE5M6M.js → config-A5EC37VZ.js} +3 -3
- package/dist/{global-upgrade-PYEFLMJA.js → global-upgrade-W4ZTLGUY.js} +10 -10
- package/dist/{identity-WTYTOLG3.js → identity-2LPVILX4.js} +4 -4
- package/dist/{live-capabilities-HZ42KLZS.js → live-capabilities-SWMCZORB.js} +5 -5
- package/dist/{paths-6JUJIM74.js → paths-4SVXADJ6.js} +3 -3
- package/dist/{reapply-5WV6IS5V.js → reapply-WEXL57SG.js} +28 -28
- package/dist/src/index.js +30 -29
- package/dist/{upgrade-lock-ENAQL63D.js → upgrade-lock-NZ2MBGYE.js} +4 -4
- package/dist/{usage-BO7LGOA3.js → usage-U6H5UFS2.js} +3 -3
- package/package.json +1 -1
|
@@ -7,9 +7,22 @@ import {
|
|
|
7
7
|
openSealedKey,
|
|
8
8
|
publicKeyFingerprint
|
|
9
9
|
} from "./chunk-3EGEA4KH.js";
|
|
10
|
+
import {
|
|
11
|
+
PLAN_CONFIGS,
|
|
12
|
+
PLAN_TYPES
|
|
13
|
+
} from "./chunk-G66WIAST.js";
|
|
14
|
+
import {
|
|
15
|
+
keyPrefix
|
|
16
|
+
} from "./chunk-THHVB46D.js";
|
|
10
17
|
import {
|
|
11
18
|
getBaseUrl
|
|
12
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-KOUB4ZLX.js";
|
|
20
|
+
import {
|
|
21
|
+
NPX_LATEST_COMMAND
|
|
22
|
+
} from "./chunk-PWGD5EP6.js";
|
|
23
|
+
import {
|
|
24
|
+
isValidApiKey
|
|
25
|
+
} from "./chunk-4FAJQPFY.js";
|
|
13
26
|
|
|
14
27
|
// src/cli/login-ui.ts
|
|
15
28
|
import { hostname } from "os";
|
|
@@ -222,6 +235,95 @@ var runBrowserLogin = async (ui, options, deps = {}) => {
|
|
|
222
235
|
}
|
|
223
236
|
};
|
|
224
237
|
|
|
238
|
+
// src/setup/key-account.ts
|
|
239
|
+
var isKeyHeldByMacApp = (key, holder) => holder.macAppInstalled && holder.macAppKey === key;
|
|
240
|
+
var agentConfigKeySource = (agentConfigKey, holder) => isKeyHeldByMacApp(agentConfigKey, holder) ? "mac-app" : "agent-settings";
|
|
241
|
+
var replacedShellKeyChoice = (facts) => {
|
|
242
|
+
if (!facts.shellKeyWasReplaced || !facts.shellKeyUsable || !facts.savedKeyFound) return "shell_key_not_replaced";
|
|
243
|
+
if (!facts.recordHonoured) return "keep_saved_key";
|
|
244
|
+
return facts.canAsk ? "ask_to_keep_saved_key" : "keep_saved_key_and_say_how_to_switch";
|
|
245
|
+
};
|
|
246
|
+
var keepsTheSavedKeyOverTheReplacedShellKey = (choice, reused, reuseAccepted) => choice !== "shell_key_not_replaced" && reuseAccepted && reused?.source === "stored";
|
|
247
|
+
var pickReusableKey = (candidates) => {
|
|
248
|
+
if (candidates.storedKey !== null && candidates.storedCheck !== null) {
|
|
249
|
+
return { source: "stored", key: candidates.storedKey, check: candidates.storedCheck };
|
|
250
|
+
}
|
|
251
|
+
if (candidates.envKey && candidates.envCheck !== null) {
|
|
252
|
+
return { source: "environment", key: candidates.envKey, check: candidates.envCheck };
|
|
253
|
+
}
|
|
254
|
+
if (candidates.agentConfigKey !== null && candidates.agentConfigCheck !== null) {
|
|
255
|
+
return { source: agentConfigKeySource(candidates.agentConfigKey, candidates), key: candidates.agentConfigKey, check: candidates.agentConfigCheck };
|
|
256
|
+
}
|
|
257
|
+
return null;
|
|
258
|
+
};
|
|
259
|
+
var REUSED_KEY_SOURCE_LABELS = {
|
|
260
|
+
stored: "the key saved on this machine",
|
|
261
|
+
environment: "the key in PUSHARY_API_KEY",
|
|
262
|
+
"mac-app": "the key Pushary for Mac is signed in with",
|
|
263
|
+
"agent-settings": "a key found in your agent settings"
|
|
264
|
+
};
|
|
265
|
+
var maskKey = (key) => `${key.slice(0, 8)}...${key.slice(-4)}`;
|
|
266
|
+
var describeFoundKey = (reusable) => `Found ${REUSED_KEY_SOURCE_LABELS[reusable.source]}: ${maskKey(reusable.key)}`;
|
|
267
|
+
var describeUsedKey = (reusable) => `Using ${REUSED_KEY_SOURCE_LABELS[reusable.source]}: ${maskKey(reusable.key)}`;
|
|
268
|
+
var canAskAtTheTerminal = (context) => context.stdoutIsTty && !context.nonInteractive && !context.dryRun;
|
|
269
|
+
var keyReuseConfirmation = (context) => canAskAtTheTerminal(context) && context.canPairWithApp ? "ask" : "announce";
|
|
270
|
+
var accountHandleOf = (identity) => identity.siteSlug ? `@${identity.siteSlug}` : identity.siteName || null;
|
|
271
|
+
var keyAccountHandle = (check) => check.kind === "ok" ? accountHandleOf(check.identity) : null;
|
|
272
|
+
var continueAsQuestion = (account) => account ? `Continue as ${account}?` : "Continue with this key?";
|
|
273
|
+
var keepSavedKeyQuestion = (savedAccount, shellAccount) => `${savedAccount ? `Continue as ${savedAccount}?` : "Continue with the saved key?"} This terminal still exports the key for ${shellAccount ?? "the workspace this computer left"}.`;
|
|
274
|
+
var switchBackToTheShellKeyLine = (shellAccount) => `Kept the saved key. To move this computer to ${shellAccount ?? "the key this terminal exports"} on purpose, run ${NPX_LATEST_COMMAND} login --force and choose it.`;
|
|
275
|
+
var WRONG_ACCOUNT_HINT = `Wrong account? Run ${NPX_LATEST_COMMAND} setup --connect app`;
|
|
276
|
+
var wrongAccountHintPlacement = (context) => {
|
|
277
|
+
if (!context.canPairWithApp) return "none";
|
|
278
|
+
if (context.planInactive && !context.dryRun) return "with-inactive-plan";
|
|
279
|
+
return context.reusedWithoutAsking ? "after-key-check" : "none";
|
|
280
|
+
};
|
|
281
|
+
var planNameOf = (plan) => {
|
|
282
|
+
const known = PLAN_TYPES.find((type) => type === plan);
|
|
283
|
+
return known ? PLAN_CONFIGS[known].name : null;
|
|
284
|
+
};
|
|
285
|
+
var withPlanName = (account, plan) => {
|
|
286
|
+
const planName = planNameOf(plan);
|
|
287
|
+
return planName ? `${account} (${planName} plan)` : account;
|
|
288
|
+
};
|
|
289
|
+
var describeSignedIn = (identity) => `Signed in to ${withPlanName(accountHandleOf(identity) ?? "your account", identity.plan)}`;
|
|
290
|
+
var describeKeyAccount = (check) => {
|
|
291
|
+
if (check.kind !== "ok") return null;
|
|
292
|
+
const account = accountHandleOf(check.identity);
|
|
293
|
+
return account ? withPlanName(account, check.identity.plan) : null;
|
|
294
|
+
};
|
|
295
|
+
var shownKeyPrefix = (key) => isValidApiKey(key) ? ` (${keyPrefix(key)})` : "";
|
|
296
|
+
var shellKeyLine = (shadow) => {
|
|
297
|
+
const held = `This terminal still has the old key in PUSHARY_API_KEY${shownKeyPrefix(shadow.shellKey)}`;
|
|
298
|
+
return shadow.shellAccount ? `${held}, for ${shadow.shellAccount}.` : `${held}.`;
|
|
299
|
+
};
|
|
300
|
+
var savedKeyLine = (shadow) => {
|
|
301
|
+
if (shadow.savedAccount === null) return shadow.newTerminalsUseSavedKey ? "New terminals use the saved key." : null;
|
|
302
|
+
const saved = `The saved key is for ${shadow.savedAccount}.`;
|
|
303
|
+
return shadow.newTerminalsUseSavedKey ? `${saved} New terminals use it.` : saved;
|
|
304
|
+
};
|
|
305
|
+
var leaveShellKeyLine = (shadow) => shadow.newTerminalsUseSavedKey ? "Open a new terminal, or run unset PUSHARY_API_KEY, before you start an agent here." : "If new terminals still get the old key, change PUSHARY_API_KEY where it is set, then open a new terminal before you start an agent.";
|
|
306
|
+
var describeShellKeyShadow = (shadow) => [shellKeyLine(shadow), savedKeyLine(shadow), leaveShellKeyLine(shadow)].filter((line) => line !== null);
|
|
307
|
+
var describeLockedKeyAccount = (key, account) => account ? `${account} has no active plan.` : `The key ${maskKey(key)} is on an account with no active plan.`;
|
|
308
|
+
|
|
225
309
|
export {
|
|
226
|
-
runBrowserLogin
|
|
310
|
+
runBrowserLogin,
|
|
311
|
+
isKeyHeldByMacApp,
|
|
312
|
+
replacedShellKeyChoice,
|
|
313
|
+
keepsTheSavedKeyOverTheReplacedShellKey,
|
|
314
|
+
pickReusableKey,
|
|
315
|
+
describeFoundKey,
|
|
316
|
+
describeUsedKey,
|
|
317
|
+
canAskAtTheTerminal,
|
|
318
|
+
keyReuseConfirmation,
|
|
319
|
+
keyAccountHandle,
|
|
320
|
+
continueAsQuestion,
|
|
321
|
+
keepSavedKeyQuestion,
|
|
322
|
+
switchBackToTheShellKeyLine,
|
|
323
|
+
WRONG_ACCOUNT_HINT,
|
|
324
|
+
wrongAccountHintPlacement,
|
|
325
|
+
describeSignedIn,
|
|
326
|
+
describeKeyAccount,
|
|
327
|
+
describeShellKeyShadow,
|
|
328
|
+
describeLockedKeyAccount
|
|
227
329
|
};
|
|
@@ -6,18 +6,18 @@ import {
|
|
|
6
6
|
McpToolError,
|
|
7
7
|
SubscriptionRequiredError,
|
|
8
8
|
callMcpTool
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-VMXY3PAT.js";
|
|
10
10
|
import {
|
|
11
11
|
installNetworkDefaults,
|
|
12
12
|
isNetworkFailure
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-ZG6M5VQV.js";
|
|
14
14
|
import {
|
|
15
15
|
clientReportClaims
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-SGECX2RY.js";
|
|
17
17
|
import {
|
|
18
18
|
getApiKey,
|
|
19
19
|
getBaseUrl
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-KOUB4ZLX.js";
|
|
21
21
|
import {
|
|
22
22
|
ASK_AGENT_NAME_MAX,
|
|
23
23
|
CLIENT_REPORT_PATH,
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
TOOL_FAILURE_CODES,
|
|
27
27
|
degradedLine,
|
|
28
28
|
truncateLine
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-4FAJQPFY.js";
|
|
30
30
|
|
|
31
31
|
// src/api.ts
|
|
32
32
|
import { randomUUID } from "crypto";
|
|
@@ -3,11 +3,11 @@ import {
|
|
|
3
3
|
} from "./chunk-POFBE6ZY.js";
|
|
4
4
|
import {
|
|
5
5
|
autoUpdateState
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-SGECX2RY.js";
|
|
7
7
|
import {
|
|
8
8
|
readJsonSafe,
|
|
9
9
|
writeJsonAtomic
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-GKNTNKVQ.js";
|
|
11
11
|
import {
|
|
12
12
|
CLI_PACKAGE_NAMES,
|
|
13
13
|
POSIX_GLOBAL_ROOT_SEGMENTS,
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
} from "./chunk-ZVU6WMMU.js";
|
|
18
18
|
import {
|
|
19
19
|
isAutoUpdateResult
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-4FAJQPFY.js";
|
|
21
21
|
|
|
22
22
|
// src/auto-update.ts
|
|
23
23
|
import { spawn } from "child_process";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
absoluteUrl
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-O35JKL4T.js";
|
|
4
4
|
import {
|
|
5
5
|
KEY_SCOPE
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-4FAJQPFY.js";
|
|
7
7
|
|
|
8
8
|
// src/cli/approval-settings-pages.ts
|
|
9
9
|
var API_KEYS_PATH = "/dashboard/agent/settings";
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import {
|
|
2
|
+
external_exports
|
|
3
|
+
} from "./chunk-XMSDA5WA.js";
|
|
4
|
+
import {
|
|
5
|
+
writeJsonAtomic
|
|
6
|
+
} from "./chunk-GKNTNKVQ.js";
|
|
7
|
+
|
|
8
|
+
// src/transcript-read-positions.ts
|
|
9
|
+
import { lstatSync, readFileSync } from "fs";
|
|
10
|
+
var OWNER_ONLY_FILE_MODE = 384;
|
|
11
|
+
var MAXIMUM_READ_POSITIONS_BYTES = 4 * 1024 * 1024;
|
|
12
|
+
var transcriptReadPositionSchema = external_exports.object({
|
|
13
|
+
identity: external_exports.string().nullable(),
|
|
14
|
+
offset: external_exports.number().int().nonnegative(),
|
|
15
|
+
startedBeforeEpoch: external_exports.boolean()
|
|
16
|
+
});
|
|
17
|
+
var savedReadPositionsSchema = external_exports.object({ positions: external_exports.record(external_exports.string(), transcriptReadPositionSchema) });
|
|
18
|
+
var ownedOnlyByThisUser = (info) => !process.getuid || info.uid === process.getuid() && (info.mode & 511) === OWNER_ONLY_FILE_MODE;
|
|
19
|
+
var readOwnerOnlyJson = (path, maximumBytes) => {
|
|
20
|
+
const info = lstatSync(path);
|
|
21
|
+
if (!info.isFile() || info.nlink !== 1 || !ownedOnlyByThisUser(info) || info.size > maximumBytes) return null;
|
|
22
|
+
return JSON.parse(readFileSync(path, "utf8"));
|
|
23
|
+
};
|
|
24
|
+
var savedTranscriptReadPositions = (file) => ({
|
|
25
|
+
load: () => {
|
|
26
|
+
try {
|
|
27
|
+
return new Map(Object.entries(savedReadPositionsSchema.parse(readOwnerOnlyJson(file, MAXIMUM_READ_POSITIONS_BYTES)).positions));
|
|
28
|
+
} catch {
|
|
29
|
+
return /* @__PURE__ */ new Map();
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
save: (positions) => {
|
|
33
|
+
try {
|
|
34
|
+
writeJsonAtomic(file, { positions: Object.fromEntries(positions) }, OWNER_ONLY_FILE_MODE);
|
|
35
|
+
} catch {
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
export {
|
|
42
|
+
transcriptReadPositionSchema,
|
|
43
|
+
readOwnerOnlyJson,
|
|
44
|
+
savedTranscriptReadPositions
|
|
45
|
+
};
|
|
@@ -521,7 +521,7 @@ var loadedOnce = (load) => {
|
|
|
521
521
|
};
|
|
522
522
|
|
|
523
523
|
// src/codex-desktop-proxy.ts
|
|
524
|
-
var loadThePhone = () => import("./api-
|
|
524
|
+
var loadThePhone = () => import("./api-H734WJ2V.js");
|
|
525
525
|
var theFirstCardLoadsAgain = () => {
|
|
526
526
|
};
|
|
527
527
|
var APP_SERVER_COMMAND = "app-server";
|
|
@@ -1062,7 +1062,7 @@ var codexDesktopCommand = async (args, entry, readAccount) => {
|
|
|
1062
1062
|
return runCodexDesktopProxy(engine2, args.slice(3), readAccount, { watchesForCards: layoutIsKnown });
|
|
1063
1063
|
}
|
|
1064
1064
|
if (args[0] === APP_CARDS_FLAG) {
|
|
1065
|
-
const { codexAppCardsCommandOnThisMac } = await import("./codex-app-cards-switch-
|
|
1065
|
+
const { codexAppCardsCommandOnThisMac } = await import("./codex-app-cards-switch-JKKTCZNB.js");
|
|
1066
1066
|
return codexAppCardsCommandOnThisMac(args.slice(1), entry, readAccount);
|
|
1067
1067
|
}
|
|
1068
1068
|
if (args.length > 2) throw new Error("Usage: pushary codex --desktop [path/to/Codex.app]");
|
|
@@ -3,24 +3,24 @@ import {
|
|
|
3
3
|
expectedLaunchCapabilities,
|
|
4
4
|
hasSpawnProvider,
|
|
5
5
|
resolveControlPolicy
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-YVAFDGK2.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-E4YZIS4C.js";
|
|
14
14
|
import {
|
|
15
15
|
readControlMode,
|
|
16
16
|
readKeySource
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-THHVB46D.js";
|
|
18
18
|
import {
|
|
19
19
|
getMachineId
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-DCYA2SW2.js";
|
|
21
21
|
import {
|
|
22
22
|
getBaseUrl
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-KOUB4ZLX.js";
|
|
24
24
|
import {
|
|
25
25
|
getPackageVersion
|
|
26
26
|
} from "./chunk-ZVU6WMMU.js";
|
|
@@ -7,10 +7,10 @@ import {
|
|
|
7
7
|
codexHome,
|
|
8
8
|
codexHooksJsonIn,
|
|
9
9
|
isPusharyCodexCommand
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-SGECX2RY.js";
|
|
11
11
|
import {
|
|
12
12
|
resolvePathBinary
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-GKNTNKVQ.js";
|
|
14
14
|
import {
|
|
15
15
|
getPackageVersion
|
|
16
16
|
} from "./chunk-ZVU6WMMU.js";
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import {
|
|
2
2
|
openCodeConfigDirFrom
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-XJF4WX5C.js";
|
|
4
4
|
import {
|
|
5
5
|
nativeClaudeInstallPath
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-UPQE4YPM.js";
|
|
7
7
|
import {
|
|
8
8
|
grokHome
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-NTTFATKG.js";
|
|
10
10
|
import {
|
|
11
11
|
claudeConfigDir,
|
|
12
12
|
clineDataDirectory,
|
|
13
13
|
codexHomeFrom
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-SGECX2RY.js";
|
|
15
15
|
import {
|
|
16
16
|
HOOK_COMPATIBLE_PROFILES
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-4FAJQPFY.js";
|
|
18
18
|
|
|
19
19
|
// src/vscode-config.ts
|
|
20
20
|
import { homedir } from "os";
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import {
|
|
2
2
|
registerTranscript
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-3BBJO25D.js";
|
|
4
4
|
import {
|
|
5
5
|
namedEvent
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-NTTFATKG.js";
|
|
7
7
|
import {
|
|
8
8
|
isBridgeLocator,
|
|
9
9
|
liveBridgeProbe,
|
|
10
10
|
pusharyHookExecutable,
|
|
11
11
|
resolveBridgeStub
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-OUF7TX2C.js";
|
|
13
13
|
import {
|
|
14
14
|
writeDegraded
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-7ZHLBWOV.js";
|
|
16
16
|
import {
|
|
17
17
|
cursorUserHooks
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-SGECX2RY.js";
|
|
19
19
|
import {
|
|
20
20
|
atLeast,
|
|
21
21
|
parseVersion
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-GKNTNKVQ.js";
|
|
23
23
|
import {
|
|
24
24
|
CURSOR_GATE_COVERAGE,
|
|
25
25
|
CURSOR_GATE_SCRIPT,
|
|
@@ -33,7 +33,7 @@ import {
|
|
|
33
33
|
isGrokSessionEndStop,
|
|
34
34
|
isRecord,
|
|
35
35
|
toolsCoveredByGateEntry
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-4FAJQPFY.js";
|
|
37
37
|
|
|
38
38
|
// src/tool-hook-input.ts
|
|
39
39
|
var OPTIONAL_TEXT_FIELDS = ["hook_event_name", "session_id", "cwd", "transcript_path", "tool_use_id", "permission_mode", "cursor_version"];
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
pusharyDir
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-SGECX2RY.js";
|
|
4
4
|
import {
|
|
5
5
|
readJsonSafe
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-GKNTNKVQ.js";
|
|
7
7
|
import {
|
|
8
8
|
isRecord
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-4FAJQPFY.js";
|
|
10
10
|
|
|
11
11
|
// src/process-ownership.ts
|
|
12
12
|
import { createHash, randomUUID } from "crypto";
|
|
@@ -4,23 +4,23 @@ import {
|
|
|
4
4
|
} from "./chunk-XHKBHWLX.js";
|
|
5
5
|
import {
|
|
6
6
|
readControlMode
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-THHVB46D.js";
|
|
8
8
|
import {
|
|
9
9
|
getMachineId
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-DCYA2SW2.js";
|
|
11
11
|
import {
|
|
12
12
|
pusharyDir
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-SGECX2RY.js";
|
|
14
14
|
import {
|
|
15
15
|
readJsonSafe,
|
|
16
16
|
resolveGlobalBinary,
|
|
17
17
|
writeFileAtomic,
|
|
18
18
|
writeJsonAtomic,
|
|
19
19
|
writeJsonAtomicDurable
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-GKNTNKVQ.js";
|
|
21
21
|
import {
|
|
22
22
|
getApiKey
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-KOUB4ZLX.js";
|
|
24
24
|
import {
|
|
25
25
|
CLI_PACKAGE_NAMES,
|
|
26
26
|
cmdShimScriptOf,
|
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
} from "./chunk-ZVU6WMMU.js";
|
|
31
31
|
import {
|
|
32
32
|
isRecord
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-4FAJQPFY.js";
|
|
34
34
|
|
|
35
35
|
// src/daemon-lifecycle.ts
|
|
36
36
|
import { dirname, join, win32 as win32Path } from "path";
|
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
import {
|
|
2
2
|
announceSubscriptionRequired,
|
|
3
3
|
isDeferAnswer
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-6VFN4XTI.js";
|
|
5
5
|
import {
|
|
6
6
|
AUTO_DECISION_WINDOW_MS,
|
|
7
7
|
DEFAULT_SESSION,
|
|
8
8
|
claimThrottle,
|
|
9
9
|
releaseThrottle,
|
|
10
10
|
reportEvent
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-KUIJMRES.js";
|
|
12
12
|
import {
|
|
13
13
|
deriveToolTarget,
|
|
14
14
|
permissionDeniedAction
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-MP3SEXXJ.js";
|
|
16
16
|
import {
|
|
17
17
|
askUser,
|
|
18
18
|
isDecisionStopped,
|
|
19
19
|
isQuestionLimitRefusal,
|
|
20
20
|
waitForQuestion
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-7ZHLBWOV.js";
|
|
22
22
|
import {
|
|
23
23
|
SubscriptionRequiredError
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-VMXY3PAT.js";
|
|
25
25
|
import {
|
|
26
26
|
getMachineId
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-DCYA2SW2.js";
|
|
28
28
|
import {
|
|
29
29
|
ASK_CONTEXT_MAX,
|
|
30
30
|
agentQuestionContext,
|
|
@@ -36,7 +36,7 @@ import {
|
|
|
36
36
|
questionsShownAsASet,
|
|
37
37
|
shouldDeferToNativeMode,
|
|
38
38
|
wireVerdictFor
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-4FAJQPFY.js";
|
|
40
40
|
|
|
41
41
|
// src/machine-decision-audit.ts
|
|
42
42
|
import { basename } from "path";
|
|
@@ -1,43 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
external_exports
|
|
3
|
-
} from "./chunk-XMSDA5WA.js";
|
|
4
|
-
import {
|
|
5
|
-
writeJsonAtomic
|
|
6
|
-
} from "./chunk-6CDA4R5L.js";
|
|
7
|
-
|
|
8
|
-
// src/transcript-read-positions.ts
|
|
9
|
-
import { lstatSync, readFileSync } from "fs";
|
|
10
|
-
var OWNER_ONLY_FILE_MODE = 384;
|
|
11
|
-
var MAXIMUM_READ_POSITIONS_BYTES = 4 * 1024 * 1024;
|
|
12
|
-
var transcriptReadPositionSchema = external_exports.object({
|
|
13
|
-
identity: external_exports.string().nullable(),
|
|
14
|
-
offset: external_exports.number().int().nonnegative(),
|
|
15
|
-
startedBeforeEpoch: external_exports.boolean()
|
|
16
|
-
});
|
|
17
|
-
var savedReadPositionsSchema = external_exports.object({ positions: external_exports.record(external_exports.string(), transcriptReadPositionSchema) });
|
|
18
|
-
var ownedOnlyByThisUser = (info) => !process.getuid || info.uid === process.getuid() && (info.mode & 511) === OWNER_ONLY_FILE_MODE;
|
|
19
|
-
var readOwnerOnlyJson = (path, maximumBytes) => {
|
|
20
|
-
const info = lstatSync(path);
|
|
21
|
-
if (!info.isFile() || info.nlink !== 1 || !ownedOnlyByThisUser(info) || info.size > maximumBytes) return null;
|
|
22
|
-
return JSON.parse(readFileSync(path, "utf8"));
|
|
23
|
-
};
|
|
24
|
-
var savedTranscriptReadPositions = (file) => ({
|
|
25
|
-
load: () => {
|
|
26
|
-
try {
|
|
27
|
-
return new Map(Object.entries(savedReadPositionsSchema.parse(readOwnerOnlyJson(file, MAXIMUM_READ_POSITIONS_BYTES)).positions));
|
|
28
|
-
} catch {
|
|
29
|
-
return /* @__PURE__ */ new Map();
|
|
30
|
-
}
|
|
31
|
-
},
|
|
32
|
-
save: (positions) => {
|
|
33
|
-
try {
|
|
34
|
-
writeJsonAtomic(file, { positions: Object.fromEntries(positions) }, OWNER_ONLY_FILE_MODE);
|
|
35
|
-
} catch {
|
|
36
|
-
return;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
});
|
|
40
|
-
|
|
41
1
|
// ../contracts/src/billing.ts
|
|
42
2
|
var PARTNER_SELF_SERVE_PLANS = ["partner_launch", "partner_growth", "partner_scale"];
|
|
43
3
|
var PARTNER_PLAN_TYPES = ["partner", ...PARTNER_SELF_SERVE_PLANS];
|
|
@@ -273,9 +233,6 @@ var PLAN_CONFIGS = {
|
|
|
273
233
|
};
|
|
274
234
|
|
|
275
235
|
export {
|
|
276
|
-
transcriptReadPositionSchema,
|
|
277
|
-
readOwnerOnlyJson,
|
|
278
|
-
savedTranscriptReadPositions,
|
|
279
236
|
PLAN_TYPES,
|
|
280
237
|
SESSION_HISTORY_RETENTION_DAYS,
|
|
281
238
|
PLAN_CONFIGS
|
|
@@ -471,9 +471,9 @@ var installGlobally = (options) => {
|
|
|
471
471
|
}
|
|
472
472
|
const started = (async () => {
|
|
473
473
|
if (!npmIsOnPath()) throw new NpmMissingError();
|
|
474
|
-
const { withUpgradeLock } = await import("./global-upgrade-
|
|
475
|
-
const { installWithUpgradeLock, ownsUpgradeLock } = await import("./upgrade-lock-
|
|
476
|
-
const { autoUpdateLock } = await import("./paths-
|
|
474
|
+
const { withUpgradeLock } = await import("./global-upgrade-W4ZTLGUY.js");
|
|
475
|
+
const { installWithUpgradeLock, ownsUpgradeLock } = await import("./upgrade-lock-NZ2MBGYE.js");
|
|
476
|
+
const { autoUpdateLock } = await import("./paths-4SVXADJ6.js");
|
|
477
477
|
let result = "skipped";
|
|
478
478
|
const install = async () => {
|
|
479
479
|
const platform = process.platform;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
compatibleConfigFile,
|
|
3
3
|
hasCompatibleHooks
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-NTTFATKG.js";
|
|
5
5
|
import {
|
|
6
6
|
pusharyHookExecutable
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-OUF7TX2C.js";
|
|
8
8
|
import {
|
|
9
9
|
isProtectedByScope,
|
|
10
10
|
registerHookEntry
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-SGECX2RY.js";
|
|
12
12
|
import {
|
|
13
13
|
isRecord
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-4FAJQPFY.js";
|
|
15
15
|
|
|
16
16
|
// src/cursor-config.ts
|
|
17
17
|
var hookCommandOf = (entry) => {
|