@pushary/agent-hooks 1.9.158 → 1.9.161
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 +22 -0
- package/README.md +1 -0
- package/dist/{api-MRFKFDVV.js → api-WHTSBK74.js} +15 -13
- package/dist/bin/pushary-audit.js +7 -7
- package/dist/bin/pushary-bell-hook.js +31 -31
- package/dist/bin/pushary-bell.js +16 -16
- package/dist/bin/pushary-calls.d.ts +1 -0
- package/dist/bin/pushary-calls.js +287 -0
- package/dist/bin/pushary-claude.js +37 -37
- package/dist/bin/pushary-clean.js +47 -45
- package/dist/bin/pushary-codex-bridge.js +27 -27
- package/dist/bin/pushary-codex-hook.js +46 -44
- package/dist/bin/pushary-codex-session.js +8 -8
- package/dist/bin/pushary-codex.js +19 -19
- package/dist/bin/pushary-connect.js +41 -40
- package/dist/bin/pushary-cowork.js +6 -6
- package/dist/bin/pushary-daemon.js +52 -51
- package/dist/bin/pushary-disconnect.js +39 -37
- package/dist/bin/pushary-display-hook.js +20 -1
- package/dist/bin/pushary-doctor.js +61 -59
- package/dist/bin/pushary-elicitation-hook.js +32 -32
- package/dist/bin/pushary-gemini-bridge.js +19 -19
- package/dist/bin/pushary-gemini-hook.js +36 -36
- package/dist/bin/pushary-hook.js +39 -38
- package/dist/bin/pushary-login.js +28 -28
- package/dist/bin/pushary-logout.js +34 -33
- package/dist/bin/pushary-mcp.js +15 -15
- package/dist/bin/pushary-mode.js +21 -21
- package/dist/bin/pushary-notification-hook.js +30 -30
- package/dist/bin/pushary-opencode-hook.js +399 -45
- package/dist/bin/pushary-permission-denied-hook.js +39 -38
- package/dist/bin/pushary-permission-hook.js +39 -38
- package/dist/bin/pushary-post-hook.js +31 -31
- package/dist/bin/pushary-prompt-hook.js +30 -30
- package/dist/bin/pushary-session-end-hook.js +30 -30
- package/dist/bin/pushary-session-start-hook.js +41 -40
- package/dist/bin/pushary-setup.js +73 -72
- package/dist/bin/pushary-stats.js +6 -6
- package/dist/bin/pushary-status.js +40 -39
- package/dist/bin/pushary-stop-hook.js +30 -30
- package/dist/bin/pushary-stopfailure-hook.js +30 -30
- package/dist/bin/pushary-suggestions.js +21 -21
- package/dist/bin/pushary-transcript-register.js +21 -21
- package/dist/bin/pushary-transcripts.js +32 -32
- package/dist/bin/pushary-upgrade.js +50 -49
- package/dist/bin/pushary-wait.js +23 -23
- package/dist/bin/pushary.js +10 -9
- package/dist/{chunk-IKC33YKC.js → chunk-26GVUJMR.js} +5 -2
- package/dist/{chunk-Q7WCDUFV.js → chunk-2ABUBECK.js} +6 -6
- package/dist/{chunk-V36P4KS4.js → chunk-2PY5DJTC.js} +1 -1
- package/dist/{chunk-J7HSUQK2.js → chunk-3F6HE5AK.js} +3 -3
- package/dist/{chunk-AZZNHW3R.js → chunk-4ZNZS6FM.js} +8 -5
- package/dist/{chunk-HA2SRYYP.js → chunk-55AHQF63.js} +92 -0
- package/dist/{chunk-UPI3JDHZ.js → chunk-5S66DHJS.js} +3 -3
- package/dist/{chunk-4I2SHNEU.js → chunk-5UBV26GO.js} +3 -3
- package/dist/{chunk-ALQWZCUT.js → chunk-6NWESDKK.js} +4 -4
- package/dist/{chunk-DHI3X5WK.js → chunk-6OSE2IRG.js} +2 -2
- package/dist/{chunk-NW63PGKF.js → chunk-7AQTKVA6.js} +12 -7
- package/dist/{chunk-FTTSQAF4.js → chunk-7IHVTLHK.js} +1 -1
- package/dist/{chunk-GTYVNVBZ.js → chunk-7VXHWU7A.js} +4 -4
- package/dist/{chunk-B3BOAYRO.js → chunk-7WLKE7QN.js} +3 -3
- package/dist/{chunk-QVVBU2JU.js → chunk-ANYLSZN3.js} +24 -9
- package/dist/{chunk-6GGK3T24.js → chunk-AT5ZLKMQ.js} +5 -5
- package/dist/{chunk-CCKY3JDB.js → chunk-ATI5XO3E.js} +4 -4
- package/dist/{chunk-CAMFNSJS.js → chunk-AVGYUZVK.js} +6 -6
- package/dist/{chunk-FGVBFDNV.js → chunk-AVRRD6AY.js} +1 -1
- package/dist/{chunk-ORQ7THNZ.js → chunk-BGU56XCS.js} +1 -1
- package/dist/{chunk-K3OCYJPK.js → chunk-BTYHDCAP.js} +3 -3
- package/dist/{chunk-YPFOTFEG.js → chunk-DHUWAUVL.js} +1 -1
- package/dist/{chunk-IOKJJ2SY.js → chunk-DHX5JZSH.js} +4 -4
- package/dist/{chunk-XNJ2HOEL.js → chunk-DLZ6RK2P.js} +3 -3
- package/dist/{chunk-TSR3FPGL.js → chunk-DWMQZM52.js} +1 -1
- package/dist/{chunk-N3CFEMLS.js → chunk-E7K6YCWY.js} +6 -6
- package/dist/{chunk-3QU4WXAH.js → chunk-EGEZKJHX.js} +5 -5
- package/dist/{chunk-3UNZ7HRN.js → chunk-F5NJUDGA.js} +20 -18
- package/dist/{chunk-UDLWNOXX.js → chunk-FZCEPG6J.js} +2 -2
- package/dist/{chunk-N5SSADNW.js → chunk-G44FOBHN.js} +4 -4
- package/dist/{chunk-TKBCLK4B.js → chunk-GJA3KQ3T.js} +5 -5
- package/dist/{chunk-CSZWWPNS.js → chunk-GNHXDRO6.js} +1 -1
- package/dist/{chunk-AMIUB22C.js → chunk-HHNC6FWO.js} +1 -1
- package/dist/{chunk-PND5IGC7.js → chunk-HKCJZGAJ.js} +6 -6
- package/dist/{chunk-IIK3CZXJ.js → chunk-HKI4RMZF.js} +8 -7
- package/dist/{chunk-PBPQRJ2T.js → chunk-I5HXAELM.js} +5 -5
- package/dist/{chunk-T3PZQNIK.js → chunk-IGSSDODQ.js} +2 -2
- package/dist/{chunk-CS4Z44F5.js → chunk-IHYKSPWH.js} +85 -8
- package/dist/chunk-J36DDPJV.js +18 -0
- package/dist/{chunk-ANQBLZAE.js → chunk-KDHLOPSO.js} +1 -1
- package/dist/{chunk-4B5K6YIP.js → chunk-KKDKPWGM.js} +1 -1
- package/dist/{chunk-XHCX6DOY.js → chunk-L2ADRR62.js} +5 -5
- package/dist/{chunk-RRVFN432.js → chunk-LRTRIDOC.js} +1 -1
- package/dist/{chunk-MTITL2IG.js → chunk-LVGRSC44.js} +5 -5
- package/dist/{chunk-C6PAIHLP.js → chunk-MGOBIHXH.js} +10 -10
- package/dist/{chunk-EHRWEXRN.js → chunk-MPYQW4IV.js} +2 -2
- package/dist/{chunk-QP3TCKRZ.js → chunk-N4OKAE65.js} +15 -15
- package/dist/{chunk-SZMDRBNK.js → chunk-ONMAG5BF.js} +2 -2
- package/dist/{chunk-TMWXWBFP.js → chunk-OOODAKCC.js} +6 -6
- package/dist/chunk-OQAIMSHQ.js +885 -0
- package/dist/{chunk-TZJR5ESF.js → chunk-OSCZ4MNE.js} +7 -7
- package/dist/{chunk-X254TRBU.js → chunk-OXZ75E2Y.js} +4 -4
- package/dist/{chunk-OCWXE4PR.js → chunk-OZK75SFS.js} +11 -9
- package/dist/{chunk-RL5JLDRE.js → chunk-PXLWR4TG.js} +2 -2
- package/dist/{chunk-4WL2MINE.js → chunk-QLEFFGCN.js} +1 -1
- package/dist/{chunk-4NHQAMSK.js → chunk-R7NAG65X.js} +4 -4
- package/dist/{chunk-UVWKMFLQ.js → chunk-R7RN3Z2T.js} +2 -2
- package/dist/{chunk-AOP55JR2.js → chunk-RZBCXPOV.js} +14 -3
- package/dist/{chunk-SNQOEDZ2.js → chunk-S6ARXVVZ.js} +1 -1
- package/dist/{chunk-TYBVQ33X.js → chunk-TYB2QGJD.js} +6 -6
- package/dist/{chunk-XSIZKQ2C.js → chunk-U36COV3Z.js} +11 -11
- package/dist/{chunk-PI3BOI3A.js → chunk-U3FVVMB3.js} +1 -1
- package/dist/{chunk-AGYD6XNI.js → chunk-UH7GJHOO.js} +3 -3
- package/dist/chunk-UJT32RSQ.js +242 -0
- package/dist/{chunk-WIIMW5YO.js → chunk-UQTQ6HPO.js} +2 -0
- package/dist/{chunk-JKRQL2BL.js → chunk-UZTGEACF.js} +5 -5
- package/dist/{chunk-MHYX5Q3F.js → chunk-VIS3EVRH.js} +1 -1
- package/dist/{chunk-4SN4FHFZ.js → chunk-VYNC7EYV.js} +2 -2
- package/dist/{chunk-EGBI4GRS.js → chunk-W6FCSBTM.js} +2 -2
- package/dist/{chunk-IVOELLUK.js → chunk-WAFJGQSE.js} +39 -8
- package/dist/{chunk-LVZBLKAU.js → chunk-WCXVPYSD.js} +1 -1
- package/dist/{chunk-K3I2NMEF.js → chunk-WNIDBPT2.js} +8 -8
- package/dist/{chunk-CIAJ55EQ.js → chunk-WTWBHE2Y.js} +42 -34
- package/dist/{chunk-GHHVXARK.js → chunk-XWCLKWKP.js} +1 -1
- package/dist/{chunk-ZYDE6QRW.js → chunk-Y23YO46U.js} +3 -3
- package/dist/{chunk-2L52USKM.js → chunk-Y553AEQU.js} +3 -3
- package/dist/{chunk-H6CL3T2S.js → chunk-Y6ILCLKE.js} +1 -1
- package/dist/{chunk-APCJZFTJ.js → chunk-YD45WNVQ.js} +1 -1
- package/dist/{chunk-MLPPQ556.js → chunk-YEB7YWW7.js} +13 -13
- package/dist/{chunk-TPLTB256.js → chunk-YGHHDDIM.js} +4 -4
- package/dist/{chunk-N2LWKWNY.js → chunk-Z5DOTAFI.js} +3 -3
- package/dist/{chunk-2MPT7YQK.js → chunk-ZIKSHD5M.js} +5 -3
- package/dist/{codex-app-cards-switch-CXXDGH7R.js → codex-app-cards-switch-DPCGWQSX.js} +14 -14
- package/dist/{codex-card-routing-WP4IHJFN.js → codex-card-routing-NFIEH66Q.js} +2 -2
- package/dist/{codex-desktop-launch-EN7ACHC6.js → codex-desktop-launch-MARNBY23.js} +1 -1
- package/dist/{codex-session-launch-7BV4VTJW.js → codex-session-launch-LSNU7CUV.js} +23 -23
- package/dist/{config-SZMMBOJV.js → config-5D34OAYM.js} +4 -4
- package/dist/{global-upgrade-I5J6BDHA.js → global-upgrade-5XBO6FYU.js} +11 -11
- package/dist/{identity-GLJNTNHW.js → identity-6QEFK7PW.js} +5 -5
- package/dist/{live-capabilities-AYO7FOHS.js → live-capabilities-6KOGY6KM.js} +5 -5
- package/dist/{paths-NRBEF3T2.js → paths-7M6V62NO.js} +4 -4
- package/dist/reapply-ZECM5JRX.js +69 -0
- package/dist/src/index.js +39 -38
- package/dist/{upgrade-lock-H6SU7MJR.js → upgrade-lock-DI4JY2CU.js} +5 -5
- package/dist/usage-X4BIHYR5.js +11 -0
- package/package.json +2 -1
- package/dist/chunk-GLDSXDRV.js +0 -593
- package/dist/reapply-J2QUV7J2.js +0 -68
- package/dist/usage-MY3DIFBG.js +0 -11
|
@@ -18,18 +18,18 @@ import {
|
|
|
18
18
|
settingSnapshot,
|
|
19
19
|
writeHermesSetting,
|
|
20
20
|
writeSetupReceipt
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-2ABUBECK.js";
|
|
22
22
|
import {
|
|
23
23
|
OPENCLAW_MIN_VERSION,
|
|
24
24
|
OPENCLAW_PLUGIN_ID,
|
|
25
25
|
OPENCLAW_PLUGIN_PACKAGE
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-ATI5XO3E.js";
|
|
27
27
|
import {
|
|
28
28
|
retryAgentCommand
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-Y553AEQU.js";
|
|
30
30
|
import {
|
|
31
31
|
configFilePath
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-7IHVTLHK.js";
|
|
33
33
|
import {
|
|
34
34
|
readJsonSafe,
|
|
35
35
|
writeJsonAtomic
|
|
@@ -37,7 +37,7 @@ import {
|
|
|
37
37
|
import {
|
|
38
38
|
readSetupOutcomeProperties,
|
|
39
39
|
redactSecretsFromContent
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-55AHQF63.js";
|
|
41
41
|
|
|
42
42
|
// src/hermes/shell-gate.ts
|
|
43
43
|
var readHermesShellGate = async (launcher) => {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
callDecisionStore,
|
|
3
3
|
identifyingToolInput
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-N4OKAE65.js";
|
|
5
5
|
import {
|
|
6
6
|
canonicalJson
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-7WLKE7QN.js";
|
|
8
8
|
|
|
9
9
|
// src/phone-approval.ts
|
|
10
10
|
import { createHash } from "crypto";
|
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
} from "./chunk-CYTPQDQY.js";
|
|
4
4
|
import {
|
|
5
5
|
parseVersion
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-WAFJGQSE.js";
|
|
7
7
|
import {
|
|
8
8
|
isRecord
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-55AHQF63.js";
|
|
10
10
|
|
|
11
11
|
// src/setup/agent-probe.ts
|
|
12
12
|
import { execSync } from "child_process";
|
|
@@ -11,10 +11,10 @@ import {
|
|
|
11
11
|
isNewerVersion,
|
|
12
12
|
isReleaseVersion,
|
|
13
13
|
ownPackageName
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-UQTQ6HPO.js";
|
|
15
15
|
import {
|
|
16
16
|
redactSecretsFromContent
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-55AHQF63.js";
|
|
18
18
|
|
|
19
19
|
// src/shell-quote.ts
|
|
20
20
|
var shellDoubleQuoted = (text) => `"${text.replace(/(["\\$`])/g, "\\$1")}"`;
|
|
@@ -398,10 +398,39 @@ var fetchLatestPublishedVersion = async (request) => {
|
|
|
398
398
|
};
|
|
399
399
|
var POSIX_SHELL_WORD = /^[\w@%+=:,./-]+$/;
|
|
400
400
|
var quoteForPosixShell = (value) => POSIX_SHELL_WORD.test(value) ? value : `'${value.replaceAll("'", `'\\''`)}'`;
|
|
401
|
+
var prefixFlagOf = (request) => request.prefix === void 0 ? "" : ` --prefix ${quoteForPosixShell(request.prefix)}`;
|
|
402
|
+
var packageSpecOf = (request) => quoteForPosixShell(`${request.packageName}@${request.version}`);
|
|
401
403
|
var installPackageGlobally = (request, runNpm = execNpm) => {
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
404
|
+
runNpm(`install -g --no-workspaces${prefixFlagOf(request)} ${packageSpecOf(request)}`, { timeout: request.timeoutMs });
|
|
405
|
+
};
|
|
406
|
+
var PREVIEW_TIMEOUT_MS = 3e4;
|
|
407
|
+
var UNAVAILABLE_PREVIEW = { kind: "unavailable" };
|
|
408
|
+
var npmOutputText = (output) => typeof output === "string" ? output : Buffer.isBuffer(output) ? output.toString() : "";
|
|
409
|
+
var packedVersionOf = (entry, packageName) => {
|
|
410
|
+
if (typeof entry !== "object" || entry === null || Reflect.get(entry, "name") !== packageName) return void 0;
|
|
411
|
+
const version = Reflect.get(entry, "version");
|
|
412
|
+
return typeof version === "string" && isReleaseVersion(version) ? version : void 0;
|
|
413
|
+
};
|
|
414
|
+
var packedPackageVersionIn = (output, packageName) => {
|
|
415
|
+
try {
|
|
416
|
+
const packed = JSON.parse(output);
|
|
417
|
+
return Array.isArray(packed) ? packed.map((entry) => packedVersionOf(entry, packageName)).find((version) => version !== void 0) : void 0;
|
|
418
|
+
} catch {
|
|
419
|
+
return void 0;
|
|
420
|
+
}
|
|
421
|
+
};
|
|
422
|
+
var previewGlobalInstall = (request, runNpm = execNpm) => {
|
|
423
|
+
try {
|
|
424
|
+
const output = runNpm(`pack --global --dry-run --json --ignore-scripts --no-workspaces${prefixFlagOf(request)} ${packageSpecOf(request)}`, { timeout: Math.min(request.timeoutMs, PREVIEW_TIMEOUT_MS) });
|
|
425
|
+
const version = packedPackageVersionIn(npmOutputText(output), request.packageName);
|
|
426
|
+
return version === void 0 ? UNAVAILABLE_PREVIEW : { kind: "resolved", version };
|
|
427
|
+
} catch (error) {
|
|
428
|
+
return npmExitedOnReleaseAge(error) ? { kind: "refused_for_release_age", refusal: error } : UNAVAILABLE_PREVIEW;
|
|
429
|
+
}
|
|
430
|
+
};
|
|
431
|
+
var throwIfNpmPolicyRefuses = (request, runNpm = execNpm) => {
|
|
432
|
+
const preview = previewGlobalInstall(request, runNpm);
|
|
433
|
+
if (preview.kind === "refused_for_release_age") throw preview.refusal;
|
|
405
434
|
};
|
|
406
435
|
var needsGlobalInstall = (requested, installed, binaryPresent) => requested !== installed || !binaryPresent;
|
|
407
436
|
var setupWouldDowngrade = (requested, installed) => installed !== void 0 && isReleaseVersion(installed) && isReleaseVersion(requested) && isNewerVersion(installed, requested);
|
|
@@ -426,9 +455,9 @@ var installGlobally = (options) => {
|
|
|
426
455
|
}
|
|
427
456
|
const started = (async () => {
|
|
428
457
|
if (!npmIsOnPath()) throw new NpmMissingError();
|
|
429
|
-
const { withUpgradeLock } = await import("./global-upgrade-
|
|
430
|
-
const { installWithUpgradeLock, ownsUpgradeLock } = await import("./upgrade-lock-
|
|
431
|
-
const { autoUpdateLock } = await import("./paths-
|
|
458
|
+
const { withUpgradeLock } = await import("./global-upgrade-5XBO6FYU.js");
|
|
459
|
+
const { installWithUpgradeLock, ownsUpgradeLock } = await import("./upgrade-lock-DI4JY2CU.js");
|
|
460
|
+
const { autoUpdateLock } = await import("./paths-7M6V62NO.js");
|
|
432
461
|
let result = "skipped";
|
|
433
462
|
const install = async () => {
|
|
434
463
|
const platform = process.platform;
|
|
@@ -509,6 +538,8 @@ export {
|
|
|
509
538
|
quoteIfNeeded,
|
|
510
539
|
fetchLatestPublishedVersion,
|
|
511
540
|
installPackageGlobally,
|
|
541
|
+
previewGlobalInstall,
|
|
542
|
+
throwIfNpmPolicyRefuses,
|
|
512
543
|
plannedGlobalPackage,
|
|
513
544
|
installGlobally
|
|
514
545
|
};
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import {
|
|
2
2
|
needsShell,
|
|
3
3
|
spawnClaude
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-Y6ILCLKE.js";
|
|
5
5
|
import {
|
|
6
6
|
getMachineId
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-VIS3EVRH.js";
|
|
8
8
|
import {
|
|
9
9
|
readControlMode
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-Y23YO46U.js";
|
|
11
11
|
import {
|
|
12
12
|
pusharyDir
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-7WLKE7QN.js";
|
|
14
14
|
import {
|
|
15
15
|
resolveGlobalBinary
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-WAFJGQSE.js";
|
|
17
17
|
import {
|
|
18
18
|
getApiKey
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-7IHVTLHK.js";
|
|
20
20
|
import {
|
|
21
21
|
readJsonSafe,
|
|
22
22
|
writeFileAtomic,
|
|
@@ -29,10 +29,10 @@ import {
|
|
|
29
29
|
getPackageVersion,
|
|
30
30
|
globalPackageFolder,
|
|
31
31
|
globalRootFor
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-UQTQ6HPO.js";
|
|
33
33
|
import {
|
|
34
34
|
isRecord
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-55AHQF63.js";
|
|
36
36
|
|
|
37
37
|
// src/daemon-entry-guard.ts
|
|
38
38
|
import { mkdirSync, readFileSync } from "fs";
|
|
@@ -1,19 +1,21 @@
|
|
|
1
1
|
import {
|
|
2
2
|
announceSubscriptionRequired,
|
|
3
3
|
isDeferAnswer
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-DHUWAUVL.js";
|
|
5
5
|
import {
|
|
6
6
|
askUser,
|
|
7
7
|
isDecisionStopped,
|
|
8
8
|
isQuestionLimitRefusal,
|
|
9
|
+
isThePersonsStop,
|
|
10
|
+
waitForOpenQuestion,
|
|
9
11
|
waitForQuestion
|
|
10
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-IHYKSPWH.js";
|
|
11
13
|
import {
|
|
12
14
|
SubscriptionRequiredError
|
|
13
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-OSCZ4MNE.js";
|
|
14
16
|
import {
|
|
15
17
|
getMachineId
|
|
16
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-VIS3EVRH.js";
|
|
17
19
|
import {
|
|
18
20
|
ASK_CONTEXT_MAX,
|
|
19
21
|
agentQuestionContext,
|
|
@@ -21,20 +23,8 @@ import {
|
|
|
21
23
|
isTypedAnswerQuestion,
|
|
22
24
|
parseAgentQuestionAnswers,
|
|
23
25
|
plainAskOf,
|
|
24
|
-
questionsShownAsASet
|
|
25
|
-
|
|
26
|
-
} from "./chunk-HA2SRYYP.js";
|
|
27
|
-
|
|
28
|
-
// src/native-defer.ts
|
|
29
|
-
var nativeDeferOptions = () => {
|
|
30
|
-
const respect = process.env.PUSHARY_RESPECT_PERMISSION_MODE;
|
|
31
|
-
const bypass = process.env.PUSHARY_DEFER_BYPASS;
|
|
32
|
-
return {
|
|
33
|
-
respectPermissionMode: !(respect === "0" || respect === "false"),
|
|
34
|
-
deferBypass: bypass === "1" || bypass === "true"
|
|
35
|
-
};
|
|
36
|
-
};
|
|
37
|
-
var defersToNativeMode = (permissionMode, toolName) => shouldDeferToNativeMode(permissionMode, toolName, nativeDeferOptions());
|
|
26
|
+
questionsShownAsASet
|
|
27
|
+
} from "./chunk-55AHQF63.js";
|
|
38
28
|
|
|
39
29
|
// src/agent-question-ask.ts
|
|
40
30
|
var STOPPED = { kind: "stopped" };
|
|
@@ -69,31 +59,48 @@ var questionContext = (question, index, total, project) => {
|
|
|
69
59
|
var legacyAnswerMap = (question, value) => JSON.stringify({ [question.question]: question.multiSelect ? JSON.stringify([value]) : value });
|
|
70
60
|
var answerInTheEarlierForm = (question, value) => isTypedAnswerQuestion(question) ? null : parseAgentQuestionAnswers([question], legacyAnswerMap(question, value));
|
|
71
61
|
var answersOnOneCard = (question, value) => answersToQuestionsAsAsked([question], value) ?? answerInTheEarlierForm(question, value);
|
|
62
|
+
var oneCardAsk = (call, only) => ({
|
|
63
|
+
question: only.question,
|
|
64
|
+
...cardOf(only),
|
|
65
|
+
context: questionContext(only, 0, 1, call.projectName),
|
|
66
|
+
agentName: call.agentName,
|
|
67
|
+
sessionId: call.sessionId,
|
|
68
|
+
machineId: getMachineId(),
|
|
69
|
+
toolName: call.toolName,
|
|
70
|
+
toolUseId: call.toolUseId
|
|
71
|
+
});
|
|
72
|
+
var outcomeOfOneCardAnswer = (only, answer) => {
|
|
73
|
+
const values = answer.answered && answer.value ? answersToQuestionsAsAsked([only], answer.value) : null;
|
|
74
|
+
if (!values || isDeferAnswer(answer.value)) {
|
|
75
|
+
return UNANSWERED;
|
|
76
|
+
}
|
|
77
|
+
return answeredWith(values);
|
|
78
|
+
};
|
|
72
79
|
var askAsOneCard = async (apiKey, call, only) => {
|
|
73
80
|
let result;
|
|
74
81
|
try {
|
|
75
|
-
result = await askUser(apiKey, {
|
|
76
|
-
question: only.question,
|
|
77
|
-
...cardOf(only),
|
|
78
|
-
context: questionContext(only, 0, 1, call.projectName),
|
|
79
|
-
agentName: call.agentName,
|
|
80
|
-
sessionId: call.sessionId,
|
|
81
|
-
machineId: getMachineId(),
|
|
82
|
-
toolName: call.toolName,
|
|
83
|
-
toolUseId: call.toolUseId,
|
|
84
|
-
waitEndsAt: new Date(call.deadline).toISOString()
|
|
85
|
-
});
|
|
82
|
+
result = await askUser(apiKey, { ...oneCardAsk(call, only), waitEndsAt: new Date(call.deadline).toISOString() });
|
|
86
83
|
} catch (error) {
|
|
87
84
|
return failedAskOutcome(error, call.sessionId);
|
|
88
85
|
}
|
|
89
86
|
if (isDecisionStopped(result)) return STOPPED;
|
|
87
|
+
call.onQuestionCreated?.(result.correlationId);
|
|
90
88
|
const answer = await waitForQuestion(apiKey, result, storedWaitDeadline(result, call.deadline));
|
|
91
89
|
if (isDecisionStopped(answer)) return STOPPED;
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
90
|
+
return outcomeOfOneCardAnswer(only, answer);
|
|
91
|
+
};
|
|
92
|
+
var askAgentQuestionWhileOpen = async (apiKey, call, only, askerStillWaits) => {
|
|
93
|
+
let result;
|
|
94
|
+
try {
|
|
95
|
+
result = await askUser(apiKey, oneCardAsk(call, only));
|
|
96
|
+
} catch (error) {
|
|
97
|
+
return failedAskOutcome(error, call.sessionId);
|
|
95
98
|
}
|
|
96
|
-
|
|
99
|
+
if (isThePersonsStop(result)) return STOPPED;
|
|
100
|
+
call.onQuestionCreated?.(result.correlationId);
|
|
101
|
+
const answer = await waitForOpenQuestion(apiKey, result, askerStillWaits);
|
|
102
|
+
if (isThePersonsStop(answer)) return STOPPED;
|
|
103
|
+
return outcomeOfOneCardAnswer(only, answer);
|
|
97
104
|
};
|
|
98
105
|
var askQuestionByQuestion = async (apiKey, call, questions) => {
|
|
99
106
|
const answers = {};
|
|
@@ -115,6 +122,7 @@ var askQuestionByQuestion = async (apiKey, call, questions) => {
|
|
|
115
122
|
return failedAskOutcome(error, call.sessionId);
|
|
116
123
|
}
|
|
117
124
|
if (isDecisionStopped(result)) return STOPPED;
|
|
125
|
+
call.onQuestionCreated?.(result.correlationId);
|
|
118
126
|
const answer = await waitForQuestion(apiKey, result, storedWaitDeadline(result, call.deadline));
|
|
119
127
|
if (isDecisionStopped(answer)) return STOPPED;
|
|
120
128
|
const legacyValue = answer.answered ? answer.value?.trim() : void 0;
|
|
@@ -134,8 +142,8 @@ var askAgentQuestions = (apiKey, call, questions) => {
|
|
|
134
142
|
};
|
|
135
143
|
|
|
136
144
|
export {
|
|
137
|
-
defersToNativeMode,
|
|
138
145
|
outcomeOfFailedAsk,
|
|
139
146
|
storedWaitDeadline,
|
|
147
|
+
askAgentQuestionWhileOpen,
|
|
140
148
|
askAgentQuestions
|
|
141
149
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
resolveInstallSourceFor
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-FZCEPG6J.js";
|
|
4
4
|
import {
|
|
5
5
|
configFilePath
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-7IHVTLHK.js";
|
|
7
7
|
import {
|
|
8
8
|
backupFile,
|
|
9
9
|
readJsonSafe,
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
API_KEY_PREFIX_PATTERN,
|
|
15
15
|
isRecord,
|
|
16
16
|
isValidApiKey
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-55AHQF63.js";
|
|
18
18
|
|
|
19
19
|
// src/shell-alias.ts
|
|
20
20
|
import { homedir } from "os";
|
|
@@ -3,16 +3,16 @@ import {
|
|
|
3
3
|
NpmMissingError,
|
|
4
4
|
NpmPermissionError,
|
|
5
5
|
NpmReleaseAgeError
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-WAFJGQSE.js";
|
|
7
7
|
import {
|
|
8
8
|
writeFileAtomic
|
|
9
9
|
} from "./chunk-TODDEIYG.js";
|
|
10
10
|
import {
|
|
11
11
|
NPX_LATEST_COMMAND
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-RZBCXPOV.js";
|
|
13
13
|
import {
|
|
14
14
|
readSetupAgentFailures
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-55AHQF63.js";
|
|
16
16
|
|
|
17
17
|
// src/setup/config-write.ts
|
|
18
18
|
var AgentConfigWriteError = class extends Error {
|
|
@@ -4,37 +4,37 @@ import {
|
|
|
4
4
|
postLiveSession,
|
|
5
5
|
postLiveSessionUntilAccepted,
|
|
6
6
|
startLiveSessionHeartbeat
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-S6ARXVVZ.js";
|
|
8
8
|
import {
|
|
9
9
|
CommandReceipts,
|
|
10
10
|
controllerCommandSchema
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-U3FVVMB3.js";
|
|
12
12
|
import {
|
|
13
13
|
SESSION_IDLE_TIMEOUT_MS,
|
|
14
14
|
describeIdleWindow,
|
|
15
15
|
idleDeadlinePassed,
|
|
16
16
|
startProcessOwnership
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-MPYQW4IV.js";
|
|
18
|
+
import {
|
|
19
|
+
spawnClaude
|
|
20
|
+
} from "./chunk-Y6ILCLKE.js";
|
|
18
21
|
import {
|
|
19
22
|
repositoryScopeFor
|
|
20
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-QLEFFGCN.js";
|
|
21
24
|
import {
|
|
22
25
|
isAskUserResponse,
|
|
23
26
|
isDecisionStopped,
|
|
24
27
|
isWaitForAnswerResponse,
|
|
25
28
|
withdrawQuestion,
|
|
26
29
|
writeDegraded
|
|
27
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-IHYKSPWH.js";
|
|
31
|
+
import {
|
|
32
|
+
readCommandAck
|
|
33
|
+
} from "./chunk-KDHLOPSO.js";
|
|
28
34
|
import {
|
|
29
35
|
callMcpTool,
|
|
30
36
|
isRetryable
|
|
31
|
-
} from "./chunk-
|
|
32
|
-
import {
|
|
33
|
-
spawnClaude
|
|
34
|
-
} from "./chunk-H6CL3T2S.js";
|
|
35
|
-
import {
|
|
36
|
-
readCommandAck
|
|
37
|
-
} from "./chunk-ANQBLZAE.js";
|
|
37
|
+
} from "./chunk-OSCZ4MNE.js";
|
|
38
38
|
import {
|
|
39
39
|
AGENT_QUESTION_DESCRIPTION_MAX,
|
|
40
40
|
AGENT_QUESTION_HEADER_MAX,
|
|
@@ -55,7 +55,7 @@ import {
|
|
|
55
55
|
parseCodexQuestions,
|
|
56
56
|
planElicitationAsk,
|
|
57
57
|
readElicitationFields
|
|
58
|
-
} from "./chunk-
|
|
58
|
+
} from "./chunk-55AHQF63.js";
|
|
59
59
|
|
|
60
60
|
// src/codex-question-owner.ts
|
|
61
61
|
import { createHash } from "crypto";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AGENT_CHOICES
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-AVRRD6AY.js";
|
|
4
4
|
import {
|
|
5
5
|
BELL_HOOK_BINARY
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-2PY5DJTC.js";
|
|
7
7
|
import {
|
|
8
8
|
CLAUDE_HOOK_EVENTS,
|
|
9
9
|
CODEX_HOOK_EVENTS,
|
|
@@ -16,13 +16,13 @@ import {
|
|
|
16
16
|
isBridgeLocator,
|
|
17
17
|
isProtectedByScope,
|
|
18
18
|
registerHookEntry
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-7WLKE7QN.js";
|
|
20
20
|
import {
|
|
21
21
|
CURSOR_GATE_EVENTS,
|
|
22
22
|
HOOK_BUDGETS,
|
|
23
23
|
HOOK_LOCATOR_BINARY,
|
|
24
24
|
hookCommandHoldBudget
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-55AHQF63.js";
|
|
26
26
|
|
|
27
27
|
// src/gemini-config.ts
|
|
28
28
|
var GEMINI_HOOK_BINARY = "pushary-gemini-hook";
|
|
@@ -536,8 +536,8 @@ var loadedOnce = (load) => {
|
|
|
536
536
|
};
|
|
537
537
|
|
|
538
538
|
// src/codex-desktop-proxy.ts
|
|
539
|
-
var loadThePhone = () => import("./api-
|
|
540
|
-
var loadTheCardRouting = () => import("./codex-card-routing-
|
|
539
|
+
var loadThePhone = () => import("./api-WHTSBK74.js");
|
|
540
|
+
var loadTheCardRouting = () => import("./codex-card-routing-NFIEH66Q.js");
|
|
541
541
|
var theFirstCardLoadsAgain = () => {
|
|
542
542
|
};
|
|
543
543
|
var ASKS_WITHOUT_ROUTING = {};
|
|
@@ -1097,7 +1097,7 @@ var codexDesktopCommand = async (args, entry, readAccount) => {
|
|
|
1097
1097
|
return runCodexDesktopProxy(engine2, args.slice(3), readAccount, { watchesForCards: layoutIsKnown });
|
|
1098
1098
|
}
|
|
1099
1099
|
if (args[0] === APP_CARDS_FLAG) {
|
|
1100
|
-
const { codexAppCardsCommandOnThisMac } = await import("./codex-app-cards-switch-
|
|
1100
|
+
const { codexAppCardsCommandOnThisMac } = await import("./codex-app-cards-switch-DPCGWQSX.js");
|
|
1101
1101
|
return codexAppCardsCommandOnThisMac(args.slice(1), entry, readAccount);
|
|
1102
1102
|
}
|
|
1103
1103
|
if (args.length > 2) throw new Error("Usage: pushary codex --desktop [path/to/Codex.app]");
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
autoUpdateLock
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-7WLKE7QN.js";
|
|
4
4
|
import {
|
|
5
5
|
installPackageGlobally,
|
|
6
|
-
npmErrorMessage
|
|
7
|
-
|
|
6
|
+
npmErrorMessage,
|
|
7
|
+
throwIfNpmPolicyRefuses
|
|
8
|
+
} from "./chunk-WAFJGQSE.js";
|
|
8
9
|
import {
|
|
9
10
|
writeJsonAtomic
|
|
10
11
|
} from "./chunk-TODDEIYG.js";
|
|
@@ -165,6 +166,7 @@ var writeSettledLockRecord = (path) => writeJsonAtomic(path, { pid: process.pid,
|
|
|
165
166
|
var installWithUpgradeLock = (request, lockPath = autoUpdateLock(), runNpm) => {
|
|
166
167
|
const path = canonicalLockPath(lockPath);
|
|
167
168
|
if (!heldLocks.has(path)) throw new Error("Cannot install an upgrade without its lock");
|
|
169
|
+
throwIfNpmPolicyRefuses(request, runNpm);
|
|
168
170
|
writeJsonAtomic(path, { pid: process.pid, format: KERNEL_LOCK_FORMAT, installationPending: true }, 384);
|
|
169
171
|
installPackageGlobally(request, runNpm);
|
|
170
172
|
writeSettledLockRecord(path);
|
|
@@ -22,23 +22,23 @@ import {
|
|
|
22
22
|
turnCodexAppCardsOff,
|
|
23
23
|
turnCodexAppCardsOn,
|
|
24
24
|
whyLaunchctlFailed
|
|
25
|
-
} from "./chunk-
|
|
26
|
-
import "./chunk-
|
|
25
|
+
} from "./chunk-E7K6YCWY.js";
|
|
26
|
+
import "./chunk-Z5DOTAFI.js";
|
|
27
27
|
import "./chunk-XCEN33UP.js";
|
|
28
|
+
import "./chunk-U4P4NDVB.js";
|
|
28
29
|
import "./chunk-QCGNGEGE.js";
|
|
29
|
-
import "./chunk-
|
|
30
|
-
import "./chunk-
|
|
31
|
-
import "./chunk-
|
|
32
|
-
import "./chunk-
|
|
33
|
-
import "./chunk-
|
|
34
|
-
import "./chunk-
|
|
35
|
-
import "./chunk-
|
|
36
|
-
import "./chunk-
|
|
30
|
+
import "./chunk-WNIDBPT2.js";
|
|
31
|
+
import "./chunk-Y6ILCLKE.js";
|
|
32
|
+
import "./chunk-VIS3EVRH.js";
|
|
33
|
+
import "./chunk-Y23YO46U.js";
|
|
34
|
+
import "./chunk-FZCEPG6J.js";
|
|
35
|
+
import "./chunk-7WLKE7QN.js";
|
|
36
|
+
import "./chunk-WAFJGQSE.js";
|
|
37
|
+
import "./chunk-7IHVTLHK.js";
|
|
37
38
|
import "./chunk-TODDEIYG.js";
|
|
38
|
-
import "./chunk-
|
|
39
|
-
import "./chunk-
|
|
40
|
-
import "./chunk-
|
|
41
|
-
import "./chunk-U4P4NDVB.js";
|
|
39
|
+
import "./chunk-RZBCXPOV.js";
|
|
40
|
+
import "./chunk-UQTQ6HPO.js";
|
|
41
|
+
import "./chunk-55AHQF63.js";
|
|
42
42
|
import "./chunk-MLKGABMK.js";
|
|
43
43
|
export {
|
|
44
44
|
CODEX_APP_CARDS_DIRECTORY,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
deriveToolTarget
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-26GVUJMR.js";
|
|
4
4
|
import {
|
|
5
5
|
TOOL_NAME_MAX_LENGTH,
|
|
6
6
|
codexElicitationToolName
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-55AHQF63.js";
|
|
8
8
|
import "./chunk-MLKGABMK.js";
|
|
9
9
|
|
|
10
10
|
// src/codex-card-routing.ts
|
|
@@ -11,38 +11,38 @@ import {
|
|
|
11
11
|
isCodexQuestionLeftWithTheLocalClient,
|
|
12
12
|
planCodexElicitation,
|
|
13
13
|
reportOwnedQuestion
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
14
|
+
} from "./chunk-YEB7YWW7.js";
|
|
15
|
+
import "./chunk-S6ARXVVZ.js";
|
|
16
|
+
import "./chunk-UH7GJHOO.js";
|
|
17
|
+
import "./chunk-W6FCSBTM.js";
|
|
18
|
+
import "./chunk-U3FVVMB3.js";
|
|
19
|
+
import "./chunk-MPYQW4IV.js";
|
|
20
20
|
import "./chunk-CYTPQDQY.js";
|
|
21
|
-
import "./chunk-
|
|
21
|
+
import "./chunk-5UBV26GO.js";
|
|
22
22
|
import "./chunk-352FIVVH.js";
|
|
23
|
-
import "./chunk-
|
|
23
|
+
import "./chunk-Y6ILCLKE.js";
|
|
24
|
+
import "./chunk-QLEFFGCN.js";
|
|
24
25
|
import {
|
|
25
26
|
writeDegraded
|
|
26
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-IHYKSPWH.js";
|
|
28
|
+
import "./chunk-KDHLOPSO.js";
|
|
27
29
|
import "./chunk-POFBE6ZY.js";
|
|
28
|
-
import "./chunk-
|
|
29
|
-
import "./chunk-
|
|
30
|
-
import "./chunk-
|
|
31
|
-
import "./chunk-
|
|
32
|
-
import "./chunk-
|
|
33
|
-
import "./chunk-
|
|
34
|
-
import "./chunk-
|
|
30
|
+
import "./chunk-OSCZ4MNE.js";
|
|
31
|
+
import "./chunk-DWMQZM52.js";
|
|
32
|
+
import "./chunk-I5HXAELM.js";
|
|
33
|
+
import "./chunk-HKCJZGAJ.js";
|
|
34
|
+
import "./chunk-VIS3EVRH.js";
|
|
35
|
+
import "./chunk-7WLKE7QN.js";
|
|
36
|
+
import "./chunk-WAFJGQSE.js";
|
|
37
|
+
import "./chunk-7IHVTLHK.js";
|
|
35
38
|
import "./chunk-YU2EUD7O.js";
|
|
36
|
-
import "./chunk-B3BOAYRO.js";
|
|
37
|
-
import "./chunk-IVOELLUK.js";
|
|
38
|
-
import "./chunk-FTTSQAF4.js";
|
|
39
|
-
import "./chunk-BG4HHB7E.js";
|
|
40
39
|
import "./chunk-TODDEIYG.js";
|
|
41
|
-
import "./chunk-
|
|
42
|
-
import "./chunk-
|
|
40
|
+
import "./chunk-BG4HHB7E.js";
|
|
41
|
+
import "./chunk-RZBCXPOV.js";
|
|
42
|
+
import "./chunk-UQTQ6HPO.js";
|
|
43
43
|
import {
|
|
44
44
|
canonicalJsonText
|
|
45
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-55AHQF63.js";
|
|
46
46
|
import "./chunk-MLKGABMK.js";
|
|
47
47
|
|
|
48
48
|
// src/codex-session-launch.ts
|