@pushary/agent-hooks 1.7.2 → 1.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/README.md +13 -1
- package/data/cursor-plugin/CHANGELOG.md +1 -0
- package/data/cursor-plugin/scripts/pushary-gate.mjs +2 -21
- package/data/cursor-plugin/scripts/pushary-gate.test.mjs +23 -1
- package/data/cursor-plugin/scripts/redaction.mjs +51 -0
- package/data/vscode-plugin/CHANGELOG.md +1 -0
- package/data/vscode-plugin/scripts/pushary-gate.mjs +1 -21
- package/data/vscode-plugin/scripts/redaction.mjs +51 -0
- package/dist/bin/pushary-bell-hook.js +23 -23
- package/dist/bin/pushary-bell.js +9 -9
- package/dist/bin/pushary-claude.js +28 -28
- package/dist/bin/pushary-clean.js +91 -107
- package/dist/bin/pushary-codex-bridge.js +18 -18
- package/dist/bin/pushary-codex-hook.js +42 -43
- package/dist/bin/pushary-codex.js +13 -13
- package/dist/bin/pushary-connect.js +13 -13
- package/dist/bin/pushary-cowork.js +5 -5
- package/dist/bin/pushary-daemon.js +27 -27
- package/dist/bin/pushary-disconnect.js +18 -18
- package/dist/bin/pushary-doctor.js +85 -79
- package/dist/bin/pushary-elicitation-hook.js +25 -25
- package/dist/bin/pushary-gemini-bridge.js +12 -12
- package/dist/bin/pushary-gemini-hook.js +29 -30
- package/dist/bin/pushary-hook.js +32 -32
- package/dist/bin/pushary-login.js +12 -12
- package/dist/bin/pushary-logout.js +7 -7
- package/dist/bin/pushary-mcp.js +85 -28
- package/dist/bin/pushary-mode.js +9 -9
- package/dist/bin/pushary-notification-hook.js +28 -28
- package/dist/bin/pushary-opencode-hook.js +28 -29
- package/dist/bin/pushary-permission-denied-hook.js +32 -32
- package/dist/bin/pushary-permission-hook.js +31 -31
- package/dist/bin/pushary-post-hook.js +28 -28
- package/dist/bin/pushary-prompt-hook.js +28 -28
- package/dist/bin/pushary-session-end-hook.js +28 -28
- package/dist/bin/pushary-session-start-hook.js +32 -32
- package/dist/bin/pushary-setup.js +60 -127
- package/dist/bin/pushary-stats.js +5 -5
- package/dist/bin/pushary-status.js +15 -15
- package/dist/bin/pushary-stop-hook.js +28 -28
- package/dist/bin/pushary-stopfailure-hook.js +28 -28
- package/dist/bin/pushary-suggestions.js +4 -4
- package/dist/bin/pushary-transcript-register.js +19 -19
- package/dist/bin/pushary-transcripts.js +7 -7
- package/dist/bin/pushary-upgrade.js +231 -105
- package/dist/bin/pushary-wait.js +9 -9
- package/dist/bin/pushary.js +6 -6
- package/dist/{chunk-VQDJ6KB3.js → chunk-2ABTSGFT.js} +3 -3
- package/dist/{chunk-UFNBKYWT.js → chunk-2OY3ZZ5N.js} +3 -3
- package/dist/{chunk-A6WQF7FQ.js → chunk-3EVPNIBE.js} +3 -3
- package/dist/{chunk-L6IF4JOF.js → chunk-6J2JC2RT.js} +3 -3
- package/dist/{chunk-3NSRL5E7.js → chunk-7Z7Q4GGS.js} +2 -2
- package/dist/{chunk-NYBZJ44G.js → chunk-A2A2YTMG.js} +108 -25
- package/dist/{chunk-SKEW3TQX.js → chunk-AHV4LNB5.js} +1 -1
- package/dist/{chunk-KAJT6HPI.js → chunk-AXPCESYO.js} +3 -3
- package/dist/{chunk-JMSB6CJT.js → chunk-C2WCPBF7.js} +1 -1
- package/dist/chunk-CJVVKOSR.js +73 -0
- package/dist/{chunk-2B4XCMH6.js → chunk-CULUZTWQ.js} +283 -41
- package/dist/{chunk-6QZK4O36.js → chunk-CVQYGMSR.js} +4 -4
- package/dist/{chunk-SEIZQZEE.js → chunk-D2FX3EPW.js} +1 -1
- package/dist/{chunk-LI3C2IQY.js → chunk-DB3ONZB4.js} +2 -2
- package/dist/{chunk-YU54LNC6.js → chunk-DE4Y6TCC.js} +6 -6
- package/dist/{chunk-65RN6ZCO.js → chunk-E4FJTUH4.js} +1 -1
- package/dist/{chunk-RLRDPZG4.js → chunk-EPCXUP3P.js} +3 -1
- package/dist/{chunk-OXEF6JHD.js → chunk-EX3GAPA4.js} +1 -1
- package/dist/{chunk-E3PLF7YB.js → chunk-EYK3GSRH.js} +4 -4
- package/dist/{chunk-SJN64NJX.js → chunk-GPEGOGRJ.js} +1 -1
- package/dist/chunk-GU3EJCVV.js +43 -0
- package/dist/{chunk-YNJ2H2FD.js → chunk-HQ6G3B5R.js} +2 -2
- package/dist/{chunk-6NHXKTQU.js → chunk-HZVVNGEW.js} +2 -2
- package/dist/{chunk-ZUKZJQGR.js → chunk-IPVKH2ST.js} +1 -1
- package/dist/{chunk-T3PRPFDY.js → chunk-J5TIV3J6.js} +5 -5
- package/dist/{chunk-F6BMJOSW.js → chunk-JU6W3XAU.js} +1 -1
- package/dist/{chunk-AWZNDM3B.js → chunk-JYG4B33G.js} +1 -1
- package/dist/{chunk-ZMWX5SDA.js → chunk-JZTHGAPA.js} +8 -8
- package/dist/{chunk-3RO2UWJQ.js → chunk-KGDWDSNL.js} +2 -2
- package/dist/{chunk-MY3UZO5U.js → chunk-KVQBWI5T.js} +3 -3
- package/dist/{chunk-HOIGXMI7.js → chunk-LXQ5FBBD.js} +1 -1
- package/dist/{chunk-D4OGEWLH.js → chunk-M5ICYGHT.js} +3 -3
- package/dist/{chunk-YLCSKVQQ.js → chunk-M5JDZ45W.js} +4 -4
- package/dist/{chunk-SKMWPXGV.js → chunk-MDEPU45E.js} +183 -28
- package/dist/{chunk-R7ZETVNR.js → chunk-MPWXGONV.js} +3 -3
- package/dist/{chunk-2XOHXZRC.js → chunk-NGDD6TXY.js} +20 -5
- package/dist/{chunk-WWTLAZQA.js → chunk-NQTHFF4W.js} +178 -39
- package/dist/{chunk-KLXYMPTM.js → chunk-OKXS7WDZ.js} +1 -1
- package/dist/{chunk-Q7CDBJXU.js → chunk-OLQRRFBX.js} +1 -1
- package/dist/{chunk-VSGKQ3HI.js → chunk-P7WQEVWA.js} +2 -2
- package/dist/{chunk-UUTWHVSV.js → chunk-Q7E4I6UA.js} +28 -16
- package/dist/{chunk-WXIVUIXA.js → chunk-R7437YI3.js} +2 -2
- package/dist/{chunk-5GIBNUBD.js → chunk-RHR6NARM.js} +2 -2
- package/dist/{chunk-QSZ37ROP.js → chunk-SAXBC4AZ.js} +1 -1
- package/dist/{chunk-U3MS6D5X.js → chunk-SIFVFP6T.js} +1 -1
- package/dist/{chunk-TVJYGZXB.js → chunk-SLFABHW3.js} +40 -10
- package/dist/{chunk-M2JGLFFS.js → chunk-TY4JT7W3.js} +1 -1
- package/dist/{chunk-YU4222G2.js → chunk-UI36QSBI.js} +28 -16
- package/dist/{chunk-OJRB5QKN.js → chunk-VQKRG3AC.js} +6 -6
- package/dist/{chunk-4S7CCOXB.js → chunk-WE2J62NC.js} +31 -17
- package/dist/{chunk-PWNQGITG.js → chunk-ZSZSSJCV.js} +1 -1
- package/dist/{chunk-I7B2DNVU.js → chunk-ZVSKMPBZ.js} +1 -1
- package/dist/{reapply-D6RSDYCK.js → reapply-CW3MA66V.js} +9 -9
- package/dist/src/index.js +20 -20
- package/package.json +1 -1
- package/dist/chunk-INR3RVQ3.js +0 -92
- package/dist/chunk-IZVAVXHQ.js +0 -255
|
@@ -4,30 +4,19 @@ import {
|
|
|
4
4
|
PUSHARY_SKILL_SOURCE,
|
|
5
5
|
createGuards,
|
|
6
6
|
withoutPusharyCursorHooks
|
|
7
|
-
} from "../chunk-
|
|
7
|
+
} from "../chunk-KVQBWI5T.js";
|
|
8
8
|
import {
|
|
9
|
-
FX_PROFILE_REFUSALS,
|
|
10
|
-
FX_QUESTION_TOOL,
|
|
11
|
-
FX_SETTINGS_REFUSALS,
|
|
12
9
|
HERMES_PIP_PACKAGE,
|
|
13
|
-
|
|
14
|
-
fxSettingsText,
|
|
15
|
-
isFxQuestionRuleReceipt,
|
|
16
|
-
readFxFile,
|
|
17
|
-
readFxProfile,
|
|
18
|
-
readFxSettings,
|
|
10
|
+
planFxRemoval,
|
|
19
11
|
readHermesStatus,
|
|
20
12
|
removeInstructionBlock,
|
|
21
13
|
resolveHermesPython,
|
|
22
14
|
runHermesConfigScript,
|
|
23
15
|
shortenHome,
|
|
24
16
|
unregisterPluginLocation,
|
|
25
|
-
vscodeSettingsTargets
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
withoutQuestionsRoutedToPushary
|
|
29
|
-
} from "../chunk-SKMWPXGV.js";
|
|
30
|
-
import "../chunk-TVJYGZXB.js";
|
|
17
|
+
vscodeSettingsTargets
|
|
18
|
+
} from "../chunk-MDEPU45E.js";
|
|
19
|
+
import "../chunk-SLFABHW3.js";
|
|
31
20
|
import {
|
|
32
21
|
OPENCODE_PLUGIN_SIBLING,
|
|
33
22
|
OPENCODE_PLUGIN_SIBLING_CONTENTS,
|
|
@@ -39,7 +28,7 @@ import {
|
|
|
39
28
|
openCodePluginDir,
|
|
40
29
|
openCodePluginFile,
|
|
41
30
|
removeOpenCodeMcpServer
|
|
42
|
-
} from "../chunk-
|
|
31
|
+
} from "../chunk-AHV4LNB5.js";
|
|
43
32
|
import {
|
|
44
33
|
compatibleConfigFile,
|
|
45
34
|
compatibleInstructionsFile,
|
|
@@ -47,39 +36,39 @@ import {
|
|
|
47
36
|
compatiblePermissionRuleFile,
|
|
48
37
|
removeCompatibleHooks,
|
|
49
38
|
removeCompatibleMcpServer
|
|
50
|
-
} from "../chunk-
|
|
39
|
+
} from "../chunk-J5TIV3J6.js";
|
|
51
40
|
import {
|
|
52
41
|
isClaudeMcpSnapshot,
|
|
53
42
|
removeClaudeMcpServers,
|
|
54
43
|
removePusharySettings,
|
|
55
44
|
removePusharyToolPermissions,
|
|
56
45
|
restoreClaudeMcpServer
|
|
57
|
-
} from "../chunk-
|
|
46
|
+
} from "../chunk-AXPCESYO.js";
|
|
58
47
|
import {
|
|
59
48
|
hookOwnerOf,
|
|
60
49
|
isHookTakeoverReceipt,
|
|
61
50
|
restoreHookTakeover,
|
|
62
51
|
restoreMcpServer
|
|
63
|
-
} from "../chunk-
|
|
64
|
-
import "../chunk-
|
|
52
|
+
} from "../chunk-EYK3GSRH.js";
|
|
53
|
+
import "../chunk-ZVSKMPBZ.js";
|
|
65
54
|
import {
|
|
66
55
|
liveBridgeProbe,
|
|
67
56
|
resolveBridgeStub
|
|
68
|
-
} from "../chunk-
|
|
69
|
-
import "../chunk-
|
|
57
|
+
} from "../chunk-C2WCPBF7.js";
|
|
58
|
+
import "../chunk-6J2JC2RT.js";
|
|
70
59
|
import {
|
|
71
60
|
disableDaemonService
|
|
72
|
-
} from "../chunk-
|
|
61
|
+
} from "../chunk-WE2J62NC.js";
|
|
73
62
|
import {
|
|
74
63
|
removeGeminiSettings
|
|
75
|
-
} from "../chunk-
|
|
76
|
-
import "../chunk-
|
|
64
|
+
} from "../chunk-3EVPNIBE.js";
|
|
65
|
+
import "../chunk-OKXS7WDZ.js";
|
|
77
66
|
import "../chunk-XHKBHWLX.js";
|
|
78
|
-
import "../chunk-
|
|
67
|
+
import "../chunk-CULUZTWQ.js";
|
|
79
68
|
import "../chunk-N6IOSZOE.js";
|
|
80
|
-
import "../chunk-
|
|
81
|
-
import "../chunk-
|
|
82
|
-
import "../chunk-
|
|
69
|
+
import "../chunk-EPCXUP3P.js";
|
|
70
|
+
import "../chunk-NGDD6TXY.js";
|
|
71
|
+
import "../chunk-CVQYGMSR.js";
|
|
83
72
|
import "../chunk-POFBE6ZY.js";
|
|
84
73
|
import {
|
|
85
74
|
ansiPainter,
|
|
@@ -87,7 +76,7 @@ import {
|
|
|
87
76
|
} from "../chunk-U4TMAANR.js";
|
|
88
77
|
import {
|
|
89
78
|
exitOnHelpFlag
|
|
90
|
-
} from "../chunk-
|
|
79
|
+
} from "../chunk-HZVVNGEW.js";
|
|
91
80
|
import {
|
|
92
81
|
rejectUnknownFlags
|
|
93
82
|
} from "../chunk-GMXKITVA.js";
|
|
@@ -95,24 +84,24 @@ import {
|
|
|
95
84
|
CANDIDATE_RCS,
|
|
96
85
|
isDisabledExport,
|
|
97
86
|
removeClaudeAlias
|
|
98
|
-
} from "../chunk-
|
|
99
|
-
import "../chunk-
|
|
100
|
-
import "../chunk-
|
|
101
|
-
import "../chunk-
|
|
102
|
-
import "../chunk-
|
|
87
|
+
} from "../chunk-P7WQEVWA.js";
|
|
88
|
+
import "../chunk-M5ICYGHT.js";
|
|
89
|
+
import "../chunk-2ABTSGFT.js";
|
|
90
|
+
import "../chunk-2OY3ZZ5N.js";
|
|
91
|
+
import "../chunk-LXQ5FBBD.js";
|
|
103
92
|
import "../chunk-7QLSKOSU.js";
|
|
104
93
|
import {
|
|
105
94
|
EXIT
|
|
106
95
|
} from "../chunk-KZERVKTD.js";
|
|
107
|
-
import "../chunk-
|
|
96
|
+
import "../chunk-DB3ONZB4.js";
|
|
108
97
|
import {
|
|
109
|
-
AGENT_HOOKS_PACKAGE,
|
|
110
98
|
bridgeAgentKey,
|
|
111
99
|
claudeJson,
|
|
112
100
|
claudeMcpReceipt,
|
|
113
101
|
claudeSettings,
|
|
114
102
|
claudeSettingsLocal,
|
|
115
103
|
claudeSkillDir,
|
|
104
|
+
cleanNpmEnv,
|
|
116
105
|
codexAgentsMd,
|
|
117
106
|
codexConfigToml,
|
|
118
107
|
codexHookPositions,
|
|
@@ -121,7 +110,6 @@ import {
|
|
|
121
110
|
cursorPluginDir,
|
|
122
111
|
cursorUserHooks,
|
|
123
112
|
cursorUserMcp,
|
|
124
|
-
execNpm,
|
|
125
113
|
fxAgentsMd,
|
|
126
114
|
fxConfigDir,
|
|
127
115
|
fxMcpProfile,
|
|
@@ -136,23 +124,29 @@ import {
|
|
|
136
124
|
npmIsOnPath,
|
|
137
125
|
pusharyDir,
|
|
138
126
|
readCodexMcpAuth,
|
|
127
|
+
readGlobalFolder,
|
|
128
|
+
readGlobalPrefix,
|
|
139
129
|
removeCodexHookTrust,
|
|
140
130
|
removeCodexHooks,
|
|
141
131
|
restoreCodexHookTrust,
|
|
142
132
|
vscodePluginDir,
|
|
143
133
|
vscodePluginMcp
|
|
144
|
-
} from "../chunk-
|
|
134
|
+
} from "../chunk-A2A2YTMG.js";
|
|
145
135
|
import "../chunk-T7E75EKA.js";
|
|
146
|
-
import "../chunk-
|
|
147
|
-
import "../chunk-
|
|
136
|
+
import "../chunk-GPEGOGRJ.js";
|
|
137
|
+
import "../chunk-E4FJTUH4.js";
|
|
148
138
|
import {
|
|
139
|
+
CLI_PACKAGE_NAMES,
|
|
149
140
|
HOOK_COMPATIBLE_PROFILES,
|
|
150
141
|
HOOK_LOCATOR_BINARY,
|
|
151
142
|
SUPPORT_DISCORD,
|
|
152
143
|
SUPPORT_EMAIL,
|
|
144
|
+
globalPackageFolder,
|
|
145
|
+
globalPackagesToUninstall,
|
|
146
|
+
globalRootFor,
|
|
153
147
|
isValidApiKey,
|
|
154
148
|
redactSecrets
|
|
155
|
-
} from "../chunk-
|
|
149
|
+
} from "../chunk-NQTHFF4W.js";
|
|
156
150
|
|
|
157
151
|
// bin/pushary-clean.ts
|
|
158
152
|
import { existsSync as existsSync6, readFileSync as readFileSync4, copyFileSync, readdirSync as readdirSync4 } from "fs";
|
|
@@ -460,6 +454,43 @@ var claudeBackupRewrites = (receipt, home = homedir4()) => claudeJsonBackups(hom
|
|
|
460
454
|
` }] : [];
|
|
461
455
|
});
|
|
462
456
|
|
|
457
|
+
// src/cli/clean-global-package.ts
|
|
458
|
+
var UNINSTALL_TIMEOUT_MS = 3e4;
|
|
459
|
+
var readRemovalEvidence = (prefix, platform) => CLI_PACKAGE_NAMES.map((name) => ({
|
|
460
|
+
name,
|
|
461
|
+
listing: globalPackageState(name),
|
|
462
|
+
folder: prefix === void 0 ? "unseen" : readGlobalFolder(globalRootFor(prefix, platform), name, platform).kind
|
|
463
|
+
}));
|
|
464
|
+
var uninstallGlobalPackage = (guards2, name) => {
|
|
465
|
+
guards2.execFile(
|
|
466
|
+
`npm uninstall -g --no-workspaces ${name}`,
|
|
467
|
+
[],
|
|
468
|
+
{ stdio: "ignore", timeout: UNINSTALL_TIMEOUT_MS, env: cleanNpmEnv(), shell: true },
|
|
469
|
+
`npm uninstall -g ${name}`
|
|
470
|
+
);
|
|
471
|
+
};
|
|
472
|
+
var removeLeftoverFolders = (guards2, prefix, platform) => {
|
|
473
|
+
const root = globalRootFor(prefix, platform);
|
|
474
|
+
for (const name of CLI_PACKAGE_NAMES) {
|
|
475
|
+
if (readGlobalFolder(root, name, platform).kind === "ours") {
|
|
476
|
+
guards2.remove(globalPackageFolder(root, name, platform), { force: true });
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
};
|
|
480
|
+
var removeGlobalCliPackages = (guards2, request) => {
|
|
481
|
+
const platform = request.platform ?? process.platform;
|
|
482
|
+
const prefix = readGlobalPrefix();
|
|
483
|
+
const names = globalPackagesToUninstall(readRemovalEvidence(prefix, platform));
|
|
484
|
+
if (names.length === 0) return { kind: "not_installed" };
|
|
485
|
+
try {
|
|
486
|
+
for (const name of names) uninstallGlobalPackage(guards2, name);
|
|
487
|
+
if (!request.dryRun && prefix !== void 0) removeLeftoverFolders(guards2, prefix, platform);
|
|
488
|
+
return { kind: "removed", names };
|
|
489
|
+
} catch {
|
|
490
|
+
return { kind: "failed", names };
|
|
491
|
+
}
|
|
492
|
+
};
|
|
493
|
+
|
|
463
494
|
// src/cli/config-temp-leftovers.ts
|
|
464
495
|
import { lstatSync, readdirSync as readdirSync3 } from "fs";
|
|
465
496
|
import { join as join5 } from "path";
|
|
@@ -597,62 +628,18 @@ var guardedAliasRemoval = () => {
|
|
|
597
628
|
var writeJson = (path, data) => {
|
|
598
629
|
guardedWrite(path, JSON.stringify(data, null, 2) + "\n");
|
|
599
630
|
};
|
|
600
|
-
var
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
}
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
};
|
|
608
|
-
var removeFxMcpServer = () => {
|
|
609
|
-
const path = fxMcpProfile();
|
|
610
|
-
const read = readFxFile(path, readFxProfile);
|
|
611
|
-
if (read.kind === "missing") {
|
|
612
|
-
console.log(` ${skip} fx MCP ${dim("(not found)")}`);
|
|
613
|
-
} else if (read.kind === "unreadable") {
|
|
614
|
-
console.log(` ${skip} fx MCP ${dim(`(${path} could not be read; left untouched)`)}`);
|
|
615
|
-
} else if (read.kind === "refused") {
|
|
616
|
-
console.log(` ${skip} fx MCP ${dim(`(${path} ${FX_PROFILE_REFUSALS[read.reason]}; left untouched)`)}`);
|
|
617
|
-
} else {
|
|
618
|
-
const { profile, removed } = withoutFxPusharyServer(read.profile);
|
|
619
|
-
if (removed) {
|
|
620
|
-
writeFxText(path, fxProfileText(profile), "fx MCP");
|
|
631
|
+
var removeFxConfiguration = () => {
|
|
632
|
+
for (const action of planFxRemoval(fxMcpProfile(), fxSettings(), fxQuestionRuleReceipt())) {
|
|
633
|
+
if (action.kind === "write") {
|
|
634
|
+
guardedWrite(action.path, action.text);
|
|
635
|
+
console.log(` ${check} ${action.label} ${dim(did("removed"))}`);
|
|
636
|
+
} else if (action.kind === "remove-receipt") {
|
|
637
|
+
guardedRemove(action.path, { force: true });
|
|
621
638
|
} else {
|
|
622
|
-
console.log(` ${skip}
|
|
639
|
+
console.log(` ${skip} ${action.label} ${dim(`(${action.detail})`)}`);
|
|
623
640
|
}
|
|
624
641
|
}
|
|
625
642
|
};
|
|
626
|
-
var removeFxToolsRule = () => {
|
|
627
|
-
const path = fxSettings();
|
|
628
|
-
const read = readFxFile(path, readFxSettings);
|
|
629
|
-
if (read.kind === "refused") {
|
|
630
|
-
console.log(` ${skip} fx settings ${dim(`(${path} ${FX_SETTINGS_REFUSALS[read.reason]}; left untouched)`)}`);
|
|
631
|
-
return;
|
|
632
|
-
}
|
|
633
|
-
if (read.kind !== "settings") return;
|
|
634
|
-
const { settings, removed } = withoutPusharyToolsAllowed(read.settings);
|
|
635
|
-
if (removed) writeFxText(path, fxSettingsText(settings), "fx auto-allowed Pushary tools");
|
|
636
|
-
};
|
|
637
|
-
var FX_QUESTION_RULE_KEPT = {
|
|
638
|
-
"not-ours": "no setup record says Pushary added it, so it may be yours; left as it is",
|
|
639
|
-
"changed-after-setup": "changed after setup; left as it is"
|
|
640
|
-
};
|
|
641
|
-
var readFxQuestionRuleReceipt = () => {
|
|
642
|
-
const receipt = readJson(fxQuestionRuleReceipt());
|
|
643
|
-
return isFxQuestionRuleReceipt(receipt) ? receipt : null;
|
|
644
|
-
};
|
|
645
|
-
var removeFxQuestionRule = () => {
|
|
646
|
-
const path = fxSettings();
|
|
647
|
-
const read = readFxFile(path, readFxSettings);
|
|
648
|
-
if (read.kind === "refused" || read.kind === "unreadable") return;
|
|
649
|
-
if (read.kind === "settings") {
|
|
650
|
-
const { settings, outcome } = withoutQuestionsRoutedToPushary(read.settings, readFxQuestionRuleReceipt());
|
|
651
|
-
if (outcome === "removed") writeFxText(path, fxSettingsText(settings), "fx question rule");
|
|
652
|
-
else if (outcome !== "absent") console.log(` ${skip} fx question rule ${dim(`(${FX_QUESTION_TOOL} in ${path}: ${FX_QUESTION_RULE_KEPT[outcome]})`)}`);
|
|
653
|
-
}
|
|
654
|
-
if (existsSync6(fxQuestionRuleReceipt())) guardedRemove(fxQuestionRuleReceipt(), { force: true });
|
|
655
|
-
};
|
|
656
643
|
var removeFxInstructions = () => {
|
|
657
644
|
if (guardedInstructionBlockRemoval(fxAgentsMd())) {
|
|
658
645
|
console.log(` ${check} fx instructions ${dim(did("removed"))}`);
|
|
@@ -1127,9 +1114,7 @@ var main = async () => {
|
|
|
1127
1114
|
} else {
|
|
1128
1115
|
console.log(` ${skip} OpenCode AGENTS.md ${dim("(no pushary block)")}`);
|
|
1129
1116
|
}
|
|
1130
|
-
|
|
1131
|
-
removeFxToolsRule();
|
|
1132
|
-
removeFxQuestionRule();
|
|
1117
|
+
removeFxConfiguration();
|
|
1133
1118
|
removeFxInstructions();
|
|
1134
1119
|
const hermesPython = resolveHermesPython();
|
|
1135
1120
|
if (hermesPython) {
|
|
@@ -1264,17 +1249,16 @@ var main = async () => {
|
|
|
1264
1249
|
}
|
|
1265
1250
|
}
|
|
1266
1251
|
if (!npmIsOnPath()) {
|
|
1267
|
-
console.log(` ${skip} Global package ${dim(`(npm not found; remove ${
|
|
1268
|
-
} else if (globalPackageState(AGENT_HOOKS_PACKAGE) === "absent") {
|
|
1269
|
-
console.log(` ${skip} Global package ${dim("(not installed)")}`);
|
|
1252
|
+
console.log(` ${skip} Global package ${dim(`(npm not found; remove ${CLI_PACKAGE_NAMES.join(" or ")} with the tool that installed it)`)}`);
|
|
1270
1253
|
} else {
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1254
|
+
const removal = removeGlobalCliPackages(guards, { dryRun });
|
|
1255
|
+
if (removal.kind === "not_installed") {
|
|
1256
|
+
console.log(` ${skip} Global package ${dim("(not installed)")}`);
|
|
1257
|
+
} else if (removal.kind === "removed") {
|
|
1258
|
+
console.log(` ${check} Global package ${dim(did("uninstalled"))} ${dim(`(${removal.names.join(", ")})`)}`);
|
|
1259
|
+
} else {
|
|
1276
1260
|
incompleteClean = true;
|
|
1277
|
-
console.log(` ${cross} Global package ${dim(`(npm uninstall failed; run npm uninstall -g ${
|
|
1261
|
+
console.log(` ${cross} Global package ${dim(`(npm uninstall failed; run npm uninstall -g ${removal.names.join(" ")})`)}`);
|
|
1278
1262
|
}
|
|
1279
1263
|
}
|
|
1280
1264
|
console.log();
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import "../chunk-
|
|
2
|
+
import "../chunk-HQ6G3B5R.js";
|
|
3
3
|
import {
|
|
4
4
|
LiveTranscriptRelay,
|
|
5
5
|
liveSessionSleep,
|
|
6
6
|
postLiveSession,
|
|
7
7
|
postLiveSessionUntilAccepted,
|
|
8
8
|
startLiveSessionHeartbeat
|
|
9
|
-
} from "../chunk-
|
|
9
|
+
} from "../chunk-R7437YI3.js";
|
|
10
10
|
import {
|
|
11
11
|
SESSION_IDLE_TIMEOUT_MS,
|
|
12
12
|
describeIdleWindow,
|
|
13
13
|
idleDeadlinePassed,
|
|
14
14
|
startProcessOwnership,
|
|
15
15
|
withSpawnProcessOwnership
|
|
16
|
-
} from "../chunk-
|
|
17
|
-
import "../chunk-
|
|
18
|
-
import "../chunk-
|
|
16
|
+
} from "../chunk-ZSZSSJCV.js";
|
|
17
|
+
import "../chunk-MPWXGONV.js";
|
|
18
|
+
import "../chunk-SAXBC4AZ.js";
|
|
19
19
|
import {
|
|
20
20
|
transcriptsEnabled
|
|
21
|
-
} from "../chunk-
|
|
21
|
+
} from "../chunk-OLQRRFBX.js";
|
|
22
22
|
import {
|
|
23
23
|
spawnClaude
|
|
24
24
|
} from "../chunk-XHKBHWLX.js";
|
|
@@ -27,39 +27,39 @@ import {
|
|
|
27
27
|
isDecisionStopped,
|
|
28
28
|
isWaitForAnswerResponse,
|
|
29
29
|
withdrawQuestion
|
|
30
|
-
} from "../chunk-
|
|
30
|
+
} from "../chunk-NGDD6TXY.js";
|
|
31
31
|
import {
|
|
32
32
|
writeDegraded
|
|
33
|
-
} from "../chunk-
|
|
33
|
+
} from "../chunk-CVQYGMSR.js";
|
|
34
34
|
import "../chunk-POFBE6ZY.js";
|
|
35
|
-
import "../chunk-
|
|
35
|
+
import "../chunk-P7WQEVWA.js";
|
|
36
36
|
import {
|
|
37
37
|
callMcpTool
|
|
38
|
-
} from "../chunk-
|
|
39
|
-
import "../chunk-
|
|
40
|
-
import "../chunk-
|
|
38
|
+
} from "../chunk-M5ICYGHT.js";
|
|
39
|
+
import "../chunk-2ABTSGFT.js";
|
|
40
|
+
import "../chunk-2OY3ZZ5N.js";
|
|
41
41
|
import {
|
|
42
42
|
getMachineId
|
|
43
|
-
} from "../chunk-
|
|
43
|
+
} from "../chunk-LXQ5FBBD.js";
|
|
44
44
|
import "../chunk-7QLSKOSU.js";
|
|
45
45
|
import "../chunk-KZERVKTD.js";
|
|
46
|
-
import "../chunk-
|
|
46
|
+
import "../chunk-DB3ONZB4.js";
|
|
47
47
|
import {
|
|
48
48
|
resolveBinary
|
|
49
|
-
} from "../chunk-
|
|
49
|
+
} from "../chunk-A2A2YTMG.js";
|
|
50
50
|
import "../chunk-T7E75EKA.js";
|
|
51
51
|
import {
|
|
52
52
|
getApiKey,
|
|
53
53
|
getBaseUrl
|
|
54
|
-
} from "../chunk-
|
|
55
|
-
import "../chunk-
|
|
54
|
+
} from "../chunk-GPEGOGRJ.js";
|
|
55
|
+
import "../chunk-E4FJTUH4.js";
|
|
56
56
|
import {
|
|
57
57
|
elicitationContent,
|
|
58
58
|
parseAgentQuestion,
|
|
59
59
|
parseAgentQuestionAnswers,
|
|
60
60
|
planElicitationAsk,
|
|
61
61
|
readElicitationFields
|
|
62
|
-
} from "../chunk-
|
|
62
|
+
} from "../chunk-NQTHFF4W.js";
|
|
63
63
|
|
|
64
64
|
// bin/pushary-codex-bridge.ts
|
|
65
65
|
import { existsSync } from "fs";
|
|
@@ -1,60 +1,56 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
takeHookHoldBudget
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-D2FX3EPW.js";
|
|
5
5
|
import {
|
|
6
|
-
blockedActionFingerprint,
|
|
7
|
-
codexCallKey,
|
|
8
|
-
consumeCodexCallDecision,
|
|
9
6
|
defersToNativeMode,
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
recordBlockedActionHint,
|
|
13
|
-
recordCodexCallDecision,
|
|
14
|
-
reportMachineDenial,
|
|
15
|
-
userScope
|
|
16
|
-
} from "../chunk-IZVAVXHQ.js";
|
|
7
|
+
reportMachineDenial
|
|
8
|
+
} from "../chunk-CJVVKOSR.js";
|
|
17
9
|
import {
|
|
18
10
|
triggerAutoUpdate
|
|
19
|
-
} from "../chunk-
|
|
11
|
+
} from "../chunk-UI36QSBI.js";
|
|
20
12
|
import {
|
|
21
13
|
isGatingMoment,
|
|
22
14
|
recordKeylessMoment
|
|
23
|
-
} from "../chunk-
|
|
15
|
+
} from "../chunk-JU6W3XAU.js";
|
|
24
16
|
import {
|
|
25
17
|
readHookInput
|
|
26
|
-
} from "../chunk-
|
|
18
|
+
} from "../chunk-KGDWDSNL.js";
|
|
27
19
|
import {
|
|
28
20
|
announceSubscriptionRequired,
|
|
29
21
|
denyReasonFrom,
|
|
30
22
|
isDeferAnswer
|
|
31
23
|
} from "../chunk-5OP5MQI7.js";
|
|
32
|
-
import "../chunk-
|
|
24
|
+
import "../chunk-JZTHGAPA.js";
|
|
33
25
|
import "../chunk-SGZJ5LYH.js";
|
|
34
|
-
import "../chunk-
|
|
35
|
-
import "../chunk-
|
|
36
|
-
import "../chunk-
|
|
37
|
-
import "../chunk-
|
|
38
|
-
import "../chunk-
|
|
39
|
-
import "../chunk-
|
|
40
|
-
import "../chunk-
|
|
41
|
-
import "../chunk-
|
|
42
|
-
import "../chunk-
|
|
43
|
-
import "../chunk-
|
|
26
|
+
import "../chunk-EYK3GSRH.js";
|
|
27
|
+
import "../chunk-ZVSKMPBZ.js";
|
|
28
|
+
import "../chunk-C2WCPBF7.js";
|
|
29
|
+
import "../chunk-6J2JC2RT.js";
|
|
30
|
+
import "../chunk-WE2J62NC.js";
|
|
31
|
+
import "../chunk-3EVPNIBE.js";
|
|
32
|
+
import "../chunk-OKXS7WDZ.js";
|
|
33
|
+
import "../chunk-MPWXGONV.js";
|
|
34
|
+
import "../chunk-SAXBC4AZ.js";
|
|
35
|
+
import "../chunk-OLQRRFBX.js";
|
|
44
36
|
import "../chunk-XHKBHWLX.js";
|
|
45
37
|
import {
|
|
46
38
|
CODEX_AGENT,
|
|
47
39
|
UNNAMED_ACTION,
|
|
40
|
+
blockedActionFingerprint,
|
|
48
41
|
codexAllow,
|
|
42
|
+
codexCallKey,
|
|
49
43
|
codexDeny,
|
|
50
44
|
codexPass,
|
|
51
45
|
codexReviewerDenialsSince,
|
|
46
|
+
consumeCodexCallDecision,
|
|
52
47
|
deriveActionBody,
|
|
53
48
|
deriveBlocker,
|
|
54
49
|
deriveToolTarget,
|
|
55
50
|
describeApplyPatch,
|
|
56
51
|
describeToolCall,
|
|
57
52
|
fetchModeState,
|
|
53
|
+
forgetBlockedActionHint,
|
|
58
54
|
getPolicy,
|
|
59
55
|
handleCompaction,
|
|
60
56
|
handlePostToolUse,
|
|
@@ -62,12 +58,15 @@ import {
|
|
|
62
58
|
handleStop,
|
|
63
59
|
handleSubagentStop,
|
|
64
60
|
handleUserPrompt,
|
|
61
|
+
hasBlockedActionHint,
|
|
65
62
|
isCodexGuardianRolloutHead,
|
|
66
63
|
permissionTimeoutDecision,
|
|
67
64
|
policyRequestFor,
|
|
68
65
|
preToolUseTimeoutDecision,
|
|
69
66
|
readCodexTurnContext,
|
|
70
67
|
readLastPrompt,
|
|
68
|
+
recordBlockedActionHint,
|
|
69
|
+
recordCodexCallDecision,
|
|
71
70
|
repoKeyFor,
|
|
72
71
|
reportEvent,
|
|
73
72
|
scanCodexGuardianReviews,
|
|
@@ -75,12 +74,13 @@ import {
|
|
|
75
74
|
sessionIdentityOf,
|
|
76
75
|
toCodexWire,
|
|
77
76
|
toPolicyLookup,
|
|
78
|
-
toPolicyLookups
|
|
79
|
-
|
|
77
|
+
toPolicyLookups,
|
|
78
|
+
userScope
|
|
79
|
+
} from "../chunk-CULUZTWQ.js";
|
|
80
80
|
import {
|
|
81
81
|
DEFAULT_SESSION
|
|
82
82
|
} from "../chunk-N6IOSZOE.js";
|
|
83
|
-
import "../chunk-
|
|
83
|
+
import "../chunk-EPCXUP3P.js";
|
|
84
84
|
import {
|
|
85
85
|
DECISION_STOP_REASON,
|
|
86
86
|
UNVERIFIABLE_APPROVAL_REASON,
|
|
@@ -94,39 +94,38 @@ import {
|
|
|
94
94
|
sendNotification,
|
|
95
95
|
unavailableQuestionUnlessSubscriptionRequired,
|
|
96
96
|
waitForQuestion
|
|
97
|
-
} from "../chunk-
|
|
97
|
+
} from "../chunk-NGDD6TXY.js";
|
|
98
98
|
import {
|
|
99
99
|
exitAfterClientReports
|
|
100
|
-
} from "../chunk-
|
|
100
|
+
} from "../chunk-CVQYGMSR.js";
|
|
101
101
|
import "../chunk-POFBE6ZY.js";
|
|
102
102
|
import "../chunk-GMXKITVA.js";
|
|
103
|
-
import "../chunk-
|
|
103
|
+
import "../chunk-P7WQEVWA.js";
|
|
104
104
|
import {
|
|
105
105
|
SubscriptionRequiredError
|
|
106
|
-
} from "../chunk-
|
|
107
|
-
import "../chunk-
|
|
108
|
-
import "../chunk-
|
|
106
|
+
} from "../chunk-M5ICYGHT.js";
|
|
107
|
+
import "../chunk-2ABTSGFT.js";
|
|
108
|
+
import "../chunk-2OY3ZZ5N.js";
|
|
109
109
|
import {
|
|
110
110
|
getMachineId
|
|
111
|
-
} from "../chunk-
|
|
111
|
+
} from "../chunk-LXQ5FBBD.js";
|
|
112
112
|
import "../chunk-7QLSKOSU.js";
|
|
113
113
|
import {
|
|
114
114
|
EXIT
|
|
115
115
|
} from "../chunk-KZERVKTD.js";
|
|
116
|
-
import "../chunk-
|
|
116
|
+
import "../chunk-DB3ONZB4.js";
|
|
117
117
|
import {
|
|
118
118
|
canonicalJson
|
|
119
|
-
} from "../chunk-
|
|
119
|
+
} from "../chunk-A2A2YTMG.js";
|
|
120
120
|
import {
|
|
121
121
|
writeFileAtomic
|
|
122
122
|
} from "../chunk-T7E75EKA.js";
|
|
123
123
|
import {
|
|
124
124
|
getApiKey
|
|
125
|
-
} from "../chunk-
|
|
126
|
-
import "../chunk-
|
|
125
|
+
} from "../chunk-GPEGOGRJ.js";
|
|
126
|
+
import "../chunk-E4FJTUH4.js";
|
|
127
127
|
import {
|
|
128
128
|
CODEX_RESCUE_TOOL_NAME,
|
|
129
|
-
DECISION_LINE_MAX,
|
|
130
129
|
GATE_BLOCK_REASON_MAX_LENGTH,
|
|
131
130
|
GATE_WIRE,
|
|
132
131
|
KILL_REASON,
|
|
@@ -137,7 +136,7 @@ import {
|
|
|
137
136
|
hookWaitClamped,
|
|
138
137
|
hookWaitDeadline,
|
|
139
138
|
resolveGate
|
|
140
|
-
} from "../chunk-
|
|
139
|
+
} from "../chunk-NQTHFF4W.js";
|
|
141
140
|
|
|
142
141
|
// bin/pushary-codex-hook.ts
|
|
143
142
|
import { basename } from "path";
|
|
@@ -573,7 +572,7 @@ var pushQuestion = async (apiKey, input, lookup, waitSeconds, mode) => {
|
|
|
573
572
|
toolName: lookup.tool,
|
|
574
573
|
toolTarget: deriveToolTarget(lookup.tool, lookup.input),
|
|
575
574
|
intent: readLastPrompt(input.session_id || DEFAULT_SESSION),
|
|
576
|
-
action: description
|
|
575
|
+
action: description,
|
|
577
576
|
blocker: deriveBlocker(mode),
|
|
578
577
|
actionBody: deriveActionBody(input.tool_name ?? "", input.tool_input ?? {}),
|
|
579
578
|
repoKey: repoKeyFor(input.cwd),
|
|
@@ -764,7 +763,7 @@ var decidePreToolUse = async (input) => {
|
|
|
764
763
|
};
|
|
765
764
|
var repairCodexHoldsQuietly = async () => {
|
|
766
765
|
try {
|
|
767
|
-
const { repairCodexHolds } = await import("../reapply-
|
|
766
|
+
const { repairCodexHolds } = await import("../reapply-CW3MA66V.js");
|
|
768
767
|
repairCodexHolds();
|
|
769
768
|
} catch {
|
|
770
769
|
return;
|
|
@@ -1,34 +1,34 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
reportEvent
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-CULUZTWQ.js";
|
|
5
5
|
import "../chunk-N6IOSZOE.js";
|
|
6
|
-
import "../chunk-
|
|
6
|
+
import "../chunk-EPCXUP3P.js";
|
|
7
7
|
import {
|
|
8
8
|
askUser,
|
|
9
9
|
isDecisionStopped,
|
|
10
10
|
waitForAnswer
|
|
11
|
-
} from "../chunk-
|
|
12
|
-
import "../chunk-
|
|
11
|
+
} from "../chunk-NGDD6TXY.js";
|
|
12
|
+
import "../chunk-CVQYGMSR.js";
|
|
13
13
|
import "../chunk-POFBE6ZY.js";
|
|
14
|
-
import "../chunk-
|
|
15
|
-
import "../chunk-
|
|
16
|
-
import "../chunk-
|
|
14
|
+
import "../chunk-M5ICYGHT.js";
|
|
15
|
+
import "../chunk-2ABTSGFT.js";
|
|
16
|
+
import "../chunk-2OY3ZZ5N.js";
|
|
17
17
|
import {
|
|
18
18
|
getMachineId
|
|
19
|
-
} from "../chunk-
|
|
19
|
+
} from "../chunk-LXQ5FBBD.js";
|
|
20
20
|
import "../chunk-7QLSKOSU.js";
|
|
21
21
|
import "../chunk-KZERVKTD.js";
|
|
22
|
-
import "../chunk-
|
|
23
|
-
import "../chunk-
|
|
22
|
+
import "../chunk-DB3ONZB4.js";
|
|
23
|
+
import "../chunk-A2A2YTMG.js";
|
|
24
24
|
import "../chunk-T7E75EKA.js";
|
|
25
25
|
import {
|
|
26
26
|
getApiKey
|
|
27
|
-
} from "../chunk-
|
|
27
|
+
} from "../chunk-GPEGOGRJ.js";
|
|
28
28
|
import {
|
|
29
29
|
NPX_LATEST_COMMAND
|
|
30
|
-
} from "../chunk-
|
|
31
|
-
import "../chunk-
|
|
30
|
+
} from "../chunk-E4FJTUH4.js";
|
|
31
|
+
import "../chunk-NQTHFF4W.js";
|
|
32
32
|
|
|
33
33
|
// bin/pushary-codex.ts
|
|
34
34
|
import { basename } from "path";
|