@pushary/agent-hooks 1.9.6 → 1.9.7
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 +8 -0
- package/dist/bin/pushary-bell-hook.js +23 -23
- package/dist/bin/pushary-bell.js +9 -9
- package/dist/bin/pushary-claude.js +26 -26
- package/dist/bin/pushary-clean.js +35 -35
- package/dist/bin/pushary-codex-bridge.js +18 -18
- package/dist/bin/pushary-codex-hook.js +31 -31
- 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 -26
- package/dist/bin/pushary-disconnect.js +24 -24
- package/dist/bin/pushary-doctor.js +42 -39
- package/dist/bin/pushary-elicitation-hook.js +25 -25
- package/dist/bin/pushary-gemini-bridge.js +13 -13
- package/dist/bin/pushary-gemini-hook.js +28 -28
- 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 +9 -9
- package/dist/bin/pushary-mode.js +9 -9
- package/dist/bin/pushary-notification-hook.js +28 -28
- package/dist/bin/pushary-opencode-hook.js +27 -27
- 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 -31
- package/dist/bin/pushary-setup.js +57 -55
- 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 +34 -28
- package/dist/bin/pushary-wait.js +9 -9
- package/dist/bin/pushary.js +6 -6
- package/dist/{chunk-BVCHY4OY.js → chunk-3GNUXXDZ.js} +2 -2
- package/dist/{chunk-PYZC54KA.js → chunk-3PVDOCFI.js} +61 -17
- package/dist/{chunk-75CA37FZ.js → chunk-4D2AYNSE.js} +2 -2
- package/dist/{chunk-7JTVYR5B.js → chunk-4FK6RZVJ.js} +1 -1
- package/dist/{chunk-D7SOOVHX.js → chunk-4YO4T5FV.js} +3 -3
- package/dist/{chunk-DJ4BB264.js → chunk-6DJTDHBI.js} +1 -1
- package/dist/{chunk-Q23MMVTD.js → chunk-7264S5HZ.js} +1 -1
- package/dist/{chunk-CBVDW2N6.js → chunk-7OIWWZAD.js} +3 -3
- package/dist/{chunk-5BHROGRB.js → chunk-ADSQDYYG.js} +2 -2
- package/dist/{chunk-IR5FRUPQ.js → chunk-ANEAA37E.js} +3 -3
- package/dist/{chunk-DGQTJDSJ.js → chunk-AQ55ZSSS.js} +1 -1
- package/dist/{chunk-5AXCOTIT.js → chunk-AUUXS44H.js} +1 -1
- package/dist/{chunk-DA4FTGTK.js → chunk-AVNKVF7N.js} +4 -4
- package/dist/{chunk-VRT3EEZN.js → chunk-BTQGAXZ3.js} +8 -8
- package/dist/{chunk-GQHZIBAZ.js → chunk-CBQACHKY.js} +1 -1
- package/dist/{chunk-WN6WYUCV.js → chunk-D6S5EKXA.js} +5 -5
- package/dist/{chunk-6GERGJHF.js → chunk-EB4XGVBG.js} +2 -2
- package/dist/{chunk-F56SB65Y.js → chunk-GKI6LFAV.js} +2 -2
- package/dist/{chunk-LBLCFD5K.js → chunk-H37L7TT3.js} +1 -1
- package/dist/{chunk-IMGJYFCX.js → chunk-H7MMU64M.js} +3 -2
- package/dist/{chunk-KK54WQ74.js → chunk-HPRZJKRO.js} +1 -1
- package/dist/{chunk-UKNKYTTY.js → chunk-JCWZ23MJ.js} +3 -3
- package/dist/chunk-JWKBDSPF.js +69 -0
- package/dist/{chunk-RDK7FX5F.js → chunk-JWQZSYCK.js} +1 -1
- package/dist/{chunk-W4Q7NFXU.js → chunk-JXISQ7DT.js} +3 -3
- package/dist/{chunk-4QKM44N6.js → chunk-KFKL3FHS.js} +3 -3
- package/dist/{chunk-EVFY3VE6.js → chunk-KT5E2RLS.js} +1 -1
- package/dist/{chunk-3BUAEQCY.js → chunk-KYO45G5L.js} +1 -1
- package/dist/{chunk-ZPW4MJOV.js → chunk-L76HTPU6.js} +3 -3
- package/dist/{chunk-SVTHEMM3.js → chunk-MBK7N46B.js} +6 -6
- package/dist/{chunk-SJN22ADZ.js → chunk-MNWRUGMH.js} +1 -1
- package/dist/{chunk-TE5M6GGK.js → chunk-MZPXVH4A.js} +5 -5
- package/dist/{chunk-YPXUD6DW.js → chunk-N4EUSDKX.js} +4 -4
- package/dist/{chunk-2I23NFVT.js → chunk-NIBFSARF.js} +25 -6
- package/dist/{chunk-CCDVL63C.js → chunk-QFEM7R6T.js} +9 -9
- package/dist/{chunk-5PMTC2CB.js → chunk-QQ4HBXZC.js} +6 -6
- package/dist/{chunk-Q4E56K4X.js → chunk-QR6VE5ME.js} +20 -0
- package/dist/{chunk-SNJ3BOCP.js → chunk-QTO6HEZD.js} +27 -8
- package/dist/{chunk-BSZ7VBVT.js → chunk-R3YW55MY.js} +10 -10
- package/dist/{chunk-EZAFBC2C.js → chunk-RQGODFQN.js} +8 -4
- package/dist/{chunk-HT3WMM6Q.js → chunk-RQSOEB4S.js} +1 -1
- package/dist/{chunk-SPXBXN23.js → chunk-SBLPHUEB.js} +1 -1
- package/dist/{chunk-NVGDMTX3.js → chunk-SD3272LS.js} +4 -4
- package/dist/{chunk-L6USMDTW.js → chunk-STQRUH3S.js} +1 -1
- package/dist/{chunk-MKJ3RTUS.js → chunk-T7Y5EADL.js} +2 -2
- package/dist/{chunk-FBD3QGVJ.js → chunk-UFVGSEWH.js} +2 -2
- package/dist/{chunk-ZC3TF4LR.js → chunk-VXRXFU6Q.js} +9 -7
- package/dist/{chunk-WUKUXICK.js → chunk-W2KI5KPD.js} +2 -2
- package/dist/{chunk-RIC6OOJX.js → chunk-X5NXPCIC.js} +7 -1
- package/dist/{chunk-HWQNQVY6.js → chunk-XWAYAO3V.js} +2 -2
- package/dist/{chunk-2QRE6QH2.js → chunk-Z6HPS67T.js} +1 -1
- package/dist/{chunk-HJXZJF6O.js → chunk-ZUTU43FT.js} +4 -4
- package/dist/{global-upgrade-7F5RP45B.js → global-upgrade-E2HUEB4B.js} +6 -6
- package/dist/{paths-MELXIVBO.js → paths-QVTEGNZV.js} +2 -2
- package/dist/{reapply-NOB2Q6C4.js → reapply-5QVKM6LA.js} +11 -8
- package/dist/src/index.js +20 -20
- package/dist/{upgrade-lock-AHRBA66K.js → upgrade-lock-JCIDZMHF.js} +5 -3
- package/package.json +1 -1
- package/dist/chunk-JUFKJCZG.js +0 -38
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import {
|
|
2
2
|
clientErrorKindOf,
|
|
3
3
|
reportClientError
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-AVNKVF7N.js";
|
|
5
5
|
import {
|
|
6
6
|
SubscriptionRequiredError,
|
|
7
7
|
callMcpTool
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-L76HTPU6.js";
|
|
9
9
|
import {
|
|
10
10
|
installNetworkDefaults
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-JXISQ7DT.js";
|
|
12
12
|
import {
|
|
13
13
|
getBaseUrl
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-Z6HPS67T.js";
|
|
15
15
|
import {
|
|
16
16
|
ASK_AGENT_NAME_MAX,
|
|
17
17
|
ASK_QUESTION_MAX,
|
|
18
18
|
DECISION_LINE_MAX,
|
|
19
19
|
truncateLine
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-QR6VE5ME.js";
|
|
21
21
|
|
|
22
22
|
// src/api.ts
|
|
23
23
|
import { randomUUID } from "crypto";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
pusharyHookExecutable
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-4YO4T5FV.js";
|
|
4
4
|
import {
|
|
5
5
|
isProtectedByScope,
|
|
6
6
|
registerHookEntry
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-ZUTU43FT.js";
|
|
8
8
|
|
|
9
9
|
// src/skills-cli.ts
|
|
10
10
|
import { execSync } from "child_process";
|
|
@@ -3,11 +3,11 @@ import {
|
|
|
3
3
|
decodePublicKey,
|
|
4
4
|
generateSessionKey,
|
|
5
5
|
wrapSessionKey
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-AUUXS44H.js";
|
|
7
7
|
import {
|
|
8
8
|
fetchTranscriptRecipients,
|
|
9
9
|
uploadTranscriptRecords
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-4FK6RZVJ.js";
|
|
11
11
|
|
|
12
12
|
// src/live-session.ts
|
|
13
13
|
var MAX_TRANSCRIPT_QUEUE = 100;
|
|
@@ -8,10 +8,10 @@ import {
|
|
|
8
8
|
codexHooksJsonIn,
|
|
9
9
|
isPusharyCodexCommand,
|
|
10
10
|
resolvePathBinary
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-ZUTU43FT.js";
|
|
12
12
|
import {
|
|
13
13
|
getPackageVersion
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-QR6VE5ME.js";
|
|
15
15
|
|
|
16
16
|
// src/codex-app-server.ts
|
|
17
17
|
import { existsSync, realpathSync } from "fs";
|
|
@@ -327,6 +327,7 @@ var readCodexTrustForPusharyHooks = async (options = {}) => {
|
|
|
327
327
|
};
|
|
328
328
|
|
|
329
329
|
export {
|
|
330
|
+
CODEX_HOOK_STATUS,
|
|
330
331
|
assessCodexHookTrust,
|
|
331
332
|
ensureCodexTrustsPusharyHooks,
|
|
332
333
|
readCodexTrustForPusharyHooks
|
|
@@ -5,16 +5,16 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
NOTIFICATION_MATCHED_TYPES,
|
|
7
7
|
POSTTOOLUSE_MIRRORED_TOOLS
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-6DJTDHBI.js";
|
|
9
9
|
import {
|
|
10
10
|
isProtectedByScope,
|
|
11
11
|
registerHookEntry
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-ZUTU43FT.js";
|
|
13
13
|
import {
|
|
14
14
|
CLAUDE_PRETOOLUSE_MATCHER,
|
|
15
15
|
HOOK_BUDGETS,
|
|
16
16
|
HOOK_LOCATOR_BINARY
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-QR6VE5ME.js";
|
|
18
18
|
|
|
19
19
|
// src/gemini-config.ts
|
|
20
20
|
var GEMINI_HOOK_BINARY = "pushary-gemini-hook";
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import {
|
|
2
|
+
CODEX_HOOK_STATUS
|
|
3
|
+
} from "./chunk-H7MMU64M.js";
|
|
4
|
+
import {
|
|
5
|
+
NPX_LATEST_COMMAND
|
|
6
|
+
} from "./chunk-STQRUH3S.js";
|
|
7
|
+
|
|
8
|
+
// src/setup/codex-trust.ts
|
|
9
|
+
var CODEX_TRUST_TELEMETRY = {
|
|
10
|
+
verified: "verified",
|
|
11
|
+
refused: "manual",
|
|
12
|
+
unlisted: "manual",
|
|
13
|
+
skipped: "unverified",
|
|
14
|
+
unavailable: "unverified"
|
|
15
|
+
};
|
|
16
|
+
var isUnanswered = (confirmation) => confirmation.kind === "skipped" || confirmation.kind === "unavailable";
|
|
17
|
+
var codexTrustOutcome = (confirmation, portedTrustWritten) => isUnanswered(confirmation) && !portedTrustWritten ? "manual" : CODEX_TRUST_TELEMETRY[confirmation.kind];
|
|
18
|
+
var CODEX_TRUST_REFUSED = "Codex did not accept the trust Pushary asked for, so its hooks are not trusted yet. Open Codex, run /hooks, and choose Trust for the Pushary hooks.";
|
|
19
|
+
var CODEX_HOOK_REMEDY = {
|
|
20
|
+
asynchronous: "re-run setup to restore blocking permission hooks",
|
|
21
|
+
missing: "re-run setup to register the permission hooks",
|
|
22
|
+
disabled: "type /hooks in Codex to enable the permission hooks",
|
|
23
|
+
untrusted: "type /hooks in Codex and trust them, once"
|
|
24
|
+
};
|
|
25
|
+
var CODEX_HOOK_REPAIRS = [
|
|
26
|
+
["asynchronous", CODEX_HOOK_STATUS.asynchronous],
|
|
27
|
+
["missing", CODEX_HOOK_STATUS.notListed],
|
|
28
|
+
["disabled", CODEX_HOOK_STATUS.disabled]
|
|
29
|
+
];
|
|
30
|
+
var eventsReporting = (readings, status) => readings.filter((reading) => reading.status === status).map((reading) => reading.event);
|
|
31
|
+
var codexHookRemedy = (readings) => {
|
|
32
|
+
for (const [kind, status] of CODEX_HOOK_REPAIRS) {
|
|
33
|
+
const events = eventsReporting(readings, status);
|
|
34
|
+
if (events.length > 0) return { kind, events };
|
|
35
|
+
}
|
|
36
|
+
return { kind: "trust" };
|
|
37
|
+
};
|
|
38
|
+
var needsCodexTrustStep = (confirmation) => confirmation.kind !== "refused" || codexHookRemedy(confirmation.hooks).kind === "trust";
|
|
39
|
+
var describeCodexHookRepair = (kind, events) => `Codex reports the Pushary hooks ${kind} (${events.join(", ")}). To fix it, ${CODEX_HOOK_REMEDY[kind]}.`;
|
|
40
|
+
var describeRefusedCodexTrust = (readings, writeError) => {
|
|
41
|
+
const remedy = codexHookRemedy(readings);
|
|
42
|
+
if (remedy.kind !== "trust") return describeCodexHookRepair(remedy.kind, remedy.events);
|
|
43
|
+
return writeError ? `${CODEX_TRUST_REFUSED} Codex said: ${writeError}` : CODEX_TRUST_REFUSED;
|
|
44
|
+
};
|
|
45
|
+
var describeUnlistedCodexHooks = (warnings) => {
|
|
46
|
+
const said = warnings[0] ? ` Codex said: ${warnings[0]}` : "";
|
|
47
|
+
return `Codex does not list the Pushary hooks, so it will not run them.${said} Run ${NPX_LATEST_COMMAND} doctor for details.`;
|
|
48
|
+
};
|
|
49
|
+
var describeCodexTrustConfirmation = (confirmation) => {
|
|
50
|
+
switch (confirmation.kind) {
|
|
51
|
+
case "verified":
|
|
52
|
+
return confirmation.wrote ? "Codex trusted the Pushary hooks when asked, and confirmed it." : "Codex confirms the Pushary hooks are trusted.";
|
|
53
|
+
case "refused":
|
|
54
|
+
return describeRefusedCodexTrust(confirmation.hooks, confirmation.writeError);
|
|
55
|
+
case "unlisted":
|
|
56
|
+
return describeUnlistedCodexHooks(confirmation.warnings);
|
|
57
|
+
case "skipped":
|
|
58
|
+
return `Pushary did not ask Codex to confirm the trust: ${confirmation.reason}.`;
|
|
59
|
+
case "unavailable":
|
|
60
|
+
return `Codex could not be asked to confirm the Pushary hooks are trusted (${confirmation.reason}).`;
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
export {
|
|
65
|
+
codexTrustOutcome,
|
|
66
|
+
CODEX_HOOK_REMEDY,
|
|
67
|
+
needsCodexTrustStep,
|
|
68
|
+
describeCodexTrustConfirmation
|
|
69
|
+
};
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
readExistingMachineId
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-KYO45G5L.js";
|
|
4
4
|
import {
|
|
5
5
|
NetworkError
|
|
6
6
|
} from "./chunk-7QLSKOSU.js";
|
|
7
7
|
import {
|
|
8
8
|
getBaseUrl
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-Z6HPS67T.js";
|
|
10
10
|
import {
|
|
11
11
|
clientContextHeaders,
|
|
12
12
|
getPackageVersion
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-QR6VE5ME.js";
|
|
14
14
|
|
|
15
15
|
// src/cli/net.ts
|
|
16
16
|
import { createRequire } from "module";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
pusharyFetch
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-JXISQ7DT.js";
|
|
4
4
|
import {
|
|
5
5
|
NetworkError
|
|
6
6
|
} from "./chunk-7QLSKOSU.js";
|
|
@@ -9,11 +9,11 @@ import {
|
|
|
9
9
|
} from "./chunk-KZERVKTD.js";
|
|
10
10
|
import {
|
|
11
11
|
getBaseUrl
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-Z6HPS67T.js";
|
|
13
13
|
import {
|
|
14
14
|
isValidApiKey,
|
|
15
15
|
normalizeKeyScope
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-QR6VE5ME.js";
|
|
17
17
|
|
|
18
18
|
// src/session.ts
|
|
19
19
|
var samePusharyAccount = (left, right) => left.kind === "ok" && right.kind === "ok" && left.identity.workspaceId !== "" && left.identity.workspaceId === right.identity.workspaceId && left.identity.siteId === right.identity.siteId;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
keyCheckFromResponse
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-KFKL3FHS.js";
|
|
4
4
|
import {
|
|
5
5
|
installNetworkDefaults
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-JXISQ7DT.js";
|
|
7
7
|
import {
|
|
8
8
|
getBaseUrl
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-Z6HPS67T.js";
|
|
10
10
|
|
|
11
11
|
// src/retry.ts
|
|
12
12
|
var isRetryable = (err) => {
|
|
@@ -3,27 +3,27 @@ import {
|
|
|
3
3
|
expectedLaunchCapabilities,
|
|
4
4
|
hasSpawnProvider,
|
|
5
5
|
resolveControlPolicy
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-T7Y5EADL.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-VXRXFU6Q.js";
|
|
14
14
|
import {
|
|
15
15
|
readControlMode,
|
|
16
16
|
readKeySource
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-ADSQDYYG.js";
|
|
18
18
|
import {
|
|
19
19
|
getMachineId
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-KYO45G5L.js";
|
|
21
21
|
import {
|
|
22
22
|
getBaseUrl
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-Z6HPS67T.js";
|
|
24
24
|
import {
|
|
25
25
|
getPackageVersion
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-QR6VE5ME.js";
|
|
27
27
|
|
|
28
28
|
// src/machines.ts
|
|
29
29
|
import { hostname } from "os";
|
|
@@ -3,28 +3,28 @@ import {
|
|
|
3
3
|
addPusharyToolPermissions,
|
|
4
4
|
isPusharyHook,
|
|
5
5
|
removeClaudeMcpServers
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-ANEAA37E.js";
|
|
7
7
|
import {
|
|
8
8
|
CLAUDE_HOOK_EVENTS,
|
|
9
9
|
addGeminiMcpServer,
|
|
10
10
|
removeGeminiMcpServer
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-JCWZ23MJ.js";
|
|
12
12
|
import {
|
|
13
13
|
CLAUDE_CODE_AGENT,
|
|
14
14
|
parseApplyPatchFiles
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-QFEM7R6T.js";
|
|
16
16
|
import {
|
|
17
17
|
guardBinary,
|
|
18
18
|
holdBudgetOf,
|
|
19
19
|
registerHookEntry
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-ZUTU43FT.js";
|
|
21
21
|
import {
|
|
22
22
|
PHONE_ANSWERED_TOOLS,
|
|
23
23
|
hookCompatibleProfile,
|
|
24
24
|
hookCompatibleProfileBySource,
|
|
25
25
|
toToolLookup,
|
|
26
26
|
withHookHoldBudget
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-QR6VE5ME.js";
|
|
28
28
|
|
|
29
29
|
// src/compatible-config.ts
|
|
30
30
|
import { homedir } from "os";
|
|
@@ -14,19 +14,19 @@ import {
|
|
|
14
14
|
} from "./chunk-U4TMAANR.js";
|
|
15
15
|
import {
|
|
16
16
|
callMcpTool
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-L76HTPU6.js";
|
|
18
18
|
import {
|
|
19
19
|
reportedInstallSource
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-4D2AYNSE.js";
|
|
21
21
|
import {
|
|
22
22
|
NPX_LATEST_COMMAND
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-STQRUH3S.js";
|
|
24
24
|
import {
|
|
25
25
|
NO_PAIRING_COMPUTER,
|
|
26
26
|
PAIR_TTL_SECONDS,
|
|
27
27
|
classifyConfirmResponse,
|
|
28
28
|
isAnswerSource
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-QR6VE5ME.js";
|
|
30
30
|
|
|
31
31
|
// src/reach.ts
|
|
32
32
|
var reachVerdict = (channels) => {
|
|
@@ -1,11 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ensureCodexTrustsPusharyHooks
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-H7MMU64M.js";
|
|
4
|
+
import {
|
|
5
|
+
OPENCODE_HOOK_BINARY,
|
|
6
|
+
installOpenCodePlugin,
|
|
7
|
+
openCodeHookArgv,
|
|
8
|
+
openCodePluginDir,
|
|
9
|
+
openCodeWired
|
|
10
|
+
} from "./chunk-X5NXPCIC.js";
|
|
4
11
|
import {
|
|
5
12
|
addClaudeMcpServer,
|
|
6
13
|
addPusharyHooks,
|
|
7
14
|
addPusharyToolPermissions
|
|
8
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-ANEAA37E.js";
|
|
9
16
|
import {
|
|
10
17
|
detectClaudeVersion
|
|
11
18
|
} from "./chunk-RIVNNBEK.js";
|
|
@@ -15,7 +22,7 @@ import {
|
|
|
15
22
|
codexUnprovenHolds,
|
|
16
23
|
codexWired,
|
|
17
24
|
geminiWired
|
|
18
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-4YO4T5FV.js";
|
|
19
26
|
import {
|
|
20
27
|
CLAUDE_HOOK_BINARY,
|
|
21
28
|
CLAUDE_HOOK_EVENTS,
|
|
@@ -26,7 +33,7 @@ import {
|
|
|
26
33
|
needsReregistration,
|
|
27
34
|
registrationSignatures,
|
|
28
35
|
supportedClaudeEvents
|
|
29
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-JCWZ23MJ.js";
|
|
30
37
|
import {
|
|
31
38
|
formatVersion
|
|
32
39
|
} from "./chunk-6ICPEJY5.js";
|
|
@@ -49,7 +56,7 @@ import {
|
|
|
49
56
|
registrationHolderOf,
|
|
50
57
|
resolveGlobalBinary,
|
|
51
58
|
vscodePluginMcp
|
|
52
|
-
} from "./chunk-
|
|
59
|
+
} from "./chunk-ZUTU43FT.js";
|
|
53
60
|
import {
|
|
54
61
|
readJsonSafe,
|
|
55
62
|
writeFileAtomic,
|
|
@@ -305,13 +312,24 @@ var reapplyCursorPlugin = (apiKey, paths = {}) => reapplyPluginMcp(
|
|
|
305
312
|
apiKey
|
|
306
313
|
);
|
|
307
314
|
var reapplyVsCodePlugin = (apiKey, paths = {}) => reapplyPluginMcp(paths.pluginMcpPath ?? vscodePluginMcp(), apiKey);
|
|
315
|
+
var reapplyOpenCodePlugin = (paths = {}) => {
|
|
316
|
+
const pluginDir = paths.pluginDir ?? openCodePluginDir();
|
|
317
|
+
if (!openCodeWired(pluginDir)) return { configured: false, reapplied: false, hooks: false, mcp: false };
|
|
318
|
+
try {
|
|
319
|
+
installOpenCodePlugin(openCodeHookArgv((paths.resolveBinary ?? resolveGlobalBinary)(OPENCODE_HOOK_BINARY)), pluginDir);
|
|
320
|
+
return { configured: true, reapplied: true, hooks: true, mcp: false };
|
|
321
|
+
} catch {
|
|
322
|
+
return { configured: true, reapplied: false, hooks: false, mcp: false, failed: true };
|
|
323
|
+
}
|
|
324
|
+
};
|
|
308
325
|
var reapplyAllAgents = (apiKey) => {
|
|
309
326
|
const runners = [
|
|
310
327
|
{ id: "claude", label: "Claude Code", run: () => reapplyClaudeSettings(apiKey) },
|
|
311
328
|
{ id: "codex", label: "Codex", run: () => reapplyCodexSettings(apiKey) },
|
|
312
329
|
{ id: "gemini", label: "Gemini CLI", run: () => reapplyGeminiSettings(apiKey) },
|
|
313
330
|
{ id: "cursor", label: "Cursor", run: () => reapplyCursorPlugin(apiKey) },
|
|
314
|
-
{ id: "vscode", label: "VS Code", run: () => reapplyVsCodePlugin(apiKey) }
|
|
331
|
+
{ id: "vscode", label: "VS Code", run: () => reapplyVsCodePlugin(apiKey) },
|
|
332
|
+
{ id: "opencode", label: "OpenCode", run: () => reapplyOpenCodePlugin() }
|
|
315
333
|
];
|
|
316
334
|
const done = [];
|
|
317
335
|
for (const runner of runners) {
|
|
@@ -336,6 +354,7 @@ export {
|
|
|
336
354
|
reapplyGeminiSettings,
|
|
337
355
|
reapplyCursorPlugin,
|
|
338
356
|
reapplyVsCodePlugin,
|
|
357
|
+
reapplyOpenCodePlugin,
|
|
339
358
|
reapplyAllAgents,
|
|
340
359
|
ensureCodexTrustAfterReapply
|
|
341
360
|
};
|
|
@@ -14,36 +14,36 @@ import {
|
|
|
14
14
|
IDLE_PROMPT_NOTIFICATION,
|
|
15
15
|
NOTIFICATION_PUSH_TYPES,
|
|
16
16
|
POSTTOOLUSE_MIRROR_ONLY_TOOLS
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-6DJTDHBI.js";
|
|
18
18
|
import {
|
|
19
19
|
cancelQuestion,
|
|
20
20
|
isPolicyConfig,
|
|
21
21
|
sendNotification,
|
|
22
22
|
waitForAnswer
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-D6S5EKXA.js";
|
|
24
24
|
import {
|
|
25
25
|
clientErrorKindOf,
|
|
26
26
|
reportClientError
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-AVNKVF7N.js";
|
|
28
28
|
import {
|
|
29
29
|
withRetry
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-L76HTPU6.js";
|
|
31
31
|
import {
|
|
32
32
|
getMachineId
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-KYO45G5L.js";
|
|
34
34
|
import {
|
|
35
35
|
reportedInstallSource
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-4D2AYNSE.js";
|
|
37
37
|
import {
|
|
38
38
|
canonicalJson
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-ZUTU43FT.js";
|
|
40
40
|
import {
|
|
41
41
|
writeFileAtomic
|
|
42
42
|
} from "./chunk-T7E75EKA.js";
|
|
43
43
|
import {
|
|
44
44
|
getApiKey,
|
|
45
45
|
getBaseUrl
|
|
46
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-Z6HPS67T.js";
|
|
47
47
|
import {
|
|
48
48
|
ACTION_BODY_MAX,
|
|
49
49
|
AGENT_LABELS_BY_TYPE,
|
|
@@ -70,7 +70,7 @@ import {
|
|
|
70
70
|
resolvePolicy,
|
|
71
71
|
toToolLookup,
|
|
72
72
|
truncateLine
|
|
73
|
-
} from "./chunk-
|
|
73
|
+
} from "./chunk-QR6VE5ME.js";
|
|
74
74
|
|
|
75
75
|
// src/policy.ts
|
|
76
76
|
import { createHash } from "crypto";
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
MCP_BRIDGE_BINARY
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-W2KI5KPD.js";
|
|
4
4
|
import {
|
|
5
5
|
openCodeConfigDirFrom
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-X5NXPCIC.js";
|
|
7
7
|
import {
|
|
8
8
|
KEY_FILE_MODE
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-ADSQDYYG.js";
|
|
10
10
|
import {
|
|
11
11
|
NpmMissingError,
|
|
12
12
|
codexHomeFrom,
|
|
13
13
|
resolvePathBinary
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-ZUTU43FT.js";
|
|
15
15
|
import {
|
|
16
16
|
readJsonSafe,
|
|
17
17
|
writeFileAtomic,
|
|
@@ -19,10 +19,10 @@ import {
|
|
|
19
19
|
} from "./chunk-T7E75EKA.js";
|
|
20
20
|
import {
|
|
21
21
|
NPX_LATEST_COMMAND
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-STQRUH3S.js";
|
|
23
23
|
import {
|
|
24
24
|
HOOK_COMPATIBLE_PROFILES
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-QR6VE5ME.js";
|
|
26
26
|
|
|
27
27
|
// src/hermes-config.ts
|
|
28
28
|
import { execFileSync } from "child_process";
|
|
@@ -697,6 +697,26 @@ var clientContextHeaders = (source) => {
|
|
|
697
697
|
if (isClientPlatform(source.platform)) headers[CLIENT_CONTEXT_HEADERS.platform] = source.platform;
|
|
698
698
|
return headers;
|
|
699
699
|
};
|
|
700
|
+
var AGENT_SITE_REJECTION_REASONS = [
|
|
701
|
+
"pairing_user_blank",
|
|
702
|
+
"pairing_user_mismatch",
|
|
703
|
+
"site_header_blank",
|
|
704
|
+
"device_token_blank",
|
|
705
|
+
"device_token_too_long",
|
|
706
|
+
"device_not_found",
|
|
707
|
+
"not_site_member",
|
|
708
|
+
"sandbox_site",
|
|
709
|
+
"no_current_site"
|
|
710
|
+
];
|
|
711
|
+
var AUTH_REJECTION_REASONS = [
|
|
712
|
+
"malformed_key",
|
|
713
|
+
"unknown_key",
|
|
714
|
+
"expired_key",
|
|
715
|
+
"scope_denied",
|
|
716
|
+
"oauth_rejected",
|
|
717
|
+
"site_not_found",
|
|
718
|
+
...AGENT_SITE_REJECTION_REASONS
|
|
719
|
+
];
|
|
700
720
|
|
|
701
721
|
// ../contracts/src/index.ts
|
|
702
722
|
var KEY_SCOPES = ["full_access", "agent", "connector", "bound"];
|