pushary 1.9.247 → 1.9.249
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/data/openclaw-plugin/dist/json-record.js +1 -0
- package/dist/{api-AP7ZKAC4.js → api-NCCKFLNT.js} +11 -11
- package/dist/bin/pushary-audit.js +3 -3
- package/dist/bin/pushary-bell-hook.js +28 -28
- package/dist/bin/pushary-bell.js +12 -12
- package/dist/bin/pushary-calls.js +15 -15
- package/dist/bin/pushary-claude.js +26 -26
- package/dist/bin/pushary-clean.js +67 -57
- package/dist/bin/pushary-codex-bridge.js +23 -23
- package/dist/bin/pushary-codex-hook.js +34 -34
- package/dist/bin/pushary-codex-session.js +8 -8
- package/dist/bin/pushary-codex.js +16 -16
- package/dist/bin/pushary-connect.js +35 -35
- package/dist/bin/pushary-cowork.js +5 -5
- package/dist/bin/pushary-daemon.js +46 -46
- package/dist/bin/pushary-disconnect.js +30 -30
- package/dist/bin/pushary-display-hook.js +21 -10
- package/dist/bin/pushary-doctor.js +47 -47
- package/dist/bin/pushary-elicitation-hook.js +27 -27
- package/dist/bin/pushary-gemini-bridge.js +18 -18
- package/dist/bin/pushary-gemini-hook.js +31 -31
- package/dist/bin/pushary-hook.js +35 -35
- package/dist/bin/pushary-login.js +23 -23
- package/dist/bin/pushary-logout.js +31 -31
- package/dist/bin/pushary-mcp.js +12 -12
- package/dist/bin/pushary-mode.js +16 -16
- package/dist/bin/pushary-notification-hook.js +27 -27
- package/dist/bin/pushary-opencode-bridge.js +22 -22
- package/dist/bin/pushary-opencode-hook.js +32 -32
- package/dist/bin/pushary-permission-denied-hook.js +34 -34
- package/dist/bin/pushary-permission-hook.js +35 -35
- package/dist/bin/pushary-post-hook.js +28 -28
- package/dist/bin/pushary-prompt-hook.js +27 -27
- package/dist/bin/pushary-session-end-hook.js +27 -27
- package/dist/bin/pushary-session-start-hook.js +39 -39
- package/dist/bin/pushary-sessions.js +12 -12
- package/dist/bin/pushary-setup.js +69 -60
- package/dist/bin/pushary-stats.js +5 -5
- package/dist/bin/pushary-status.js +36 -36
- package/dist/bin/pushary-stop-hook.js +27 -27
- package/dist/bin/pushary-stopfailure-hook.js +27 -27
- package/dist/bin/pushary-suggestions.js +16 -16
- package/dist/bin/pushary-transcript-register.js +17 -17
- package/dist/bin/pushary-transcripts.js +26 -26
- package/dist/bin/pushary-upgrade.js +47 -47
- package/dist/bin/pushary-wait.js +16 -16
- package/dist/bin/pushary.js +7 -7
- package/dist/{chunk-7KQL5NR6.js → chunk-2E23LSLT.js} +1 -1
- package/dist/{chunk-O5OPPV2S.js → chunk-2R2LXG6H.js} +11 -11
- package/dist/{chunk-46IJNC36.js → chunk-33IFGELL.js} +1 -1
- package/dist/{chunk-4HYHQYHX.js → chunk-3BFJF63Q.js} +5 -5
- package/dist/{chunk-7MZQVWYF.js → chunk-3DGOI6YH.js} +5 -5
- package/dist/{chunk-AAM62GRJ.js → chunk-3PWAFQCI.js} +1 -1
- package/dist/{chunk-QCYZY7SM.js → chunk-3S4OKDZR.js} +1 -1
- package/dist/{chunk-TIGMJWTH.js → chunk-4E3KK4PH.js} +3 -3
- package/dist/{chunk-AABRXBIY.js → chunk-4QTDUXS5.js} +1 -1
- package/dist/{chunk-S4N5VZRJ.js → chunk-5L7YJPS2.js} +1 -1
- package/dist/{chunk-HGWBXD3A.js → chunk-5Y7CYSQO.js} +2 -2
- package/dist/{chunk-XF6LGULK.js → chunk-7SIC6DRK.js} +6 -6
- package/dist/{chunk-L5YCMEOV.js → chunk-ACG4HJ27.js} +1 -1
- package/dist/{chunk-2MHP66YE.js → chunk-AKGJQEGR.js} +1 -1
- package/dist/{chunk-534LSPWP.js → chunk-AKT3UR6S.js} +2 -2
- package/dist/{chunk-KO3VP7KV.js → chunk-AV5QS5FQ.js} +4 -4
- package/dist/{chunk-6LNSHFHD.js → chunk-BDMNQBP4.js} +22 -22
- package/dist/{chunk-PCSUSVPL.js → chunk-BMVNMKVL.js} +3 -3
- package/dist/{chunk-5JLTTZ4A.js → chunk-BZJ22MT6.js} +1 -1
- package/dist/{chunk-GZBAWH5W.js → chunk-DIGV5AQW.js} +4 -4
- package/dist/{chunk-TIT3JTG2.js → chunk-DRLY2ELW.js} +2 -2
- package/dist/{chunk-C22UGPRX.js → chunk-DT6NJLC3.js} +1 -1
- package/dist/{chunk-BXY5XZEI.js → chunk-FJBU6OWM.js} +2 -2
- package/dist/{chunk-GA6CXG7J.js → chunk-FM7FNY5J.js} +4 -1
- package/dist/{chunk-R7ZFEHXE.js → chunk-FS4VJTFC.js} +1 -1
- package/dist/{chunk-ZHQ5GDGT.js → chunk-FZBLNBFS.js} +6 -6
- package/dist/{chunk-UP4JGKLJ.js → chunk-G76IPLDX.js} +1 -1
- package/dist/{chunk-23J7UISJ.js → chunk-GFGSIDHQ.js} +41 -35
- package/dist/{chunk-64QB6LAZ.js → chunk-GISC7J7K.js} +1 -1
- package/dist/{chunk-SI642PQX.js → chunk-GPGUGAO7.js} +1 -1
- package/dist/{chunk-RJKX4FJJ.js → chunk-IA44JTLJ.js} +2 -2
- package/dist/{chunk-LHKIMBJO.js → chunk-IR6ZNTDK.js} +10 -10
- package/dist/{chunk-OXKDOZH5.js → chunk-JZCSXMWF.js} +4 -4
- package/dist/{chunk-2BZECJVP.js → chunk-K63QVFSB.js} +27 -6
- package/dist/{chunk-3WVNDX5O.js → chunk-KFRYGJS5.js} +4 -4
- package/dist/{chunk-GVGLZBOG.js → chunk-KIYUQ2XZ.js} +3 -3
- package/dist/{chunk-D5PK3FCS.js → chunk-KT7COQH2.js} +3 -3
- package/dist/{chunk-DVM22JGJ.js → chunk-LRCWZNYY.js} +5 -5
- package/dist/{chunk-OQ4MBJEK.js → chunk-MAXV4AZR.js} +2 -2
- package/dist/{chunk-JJTKHAVD.js → chunk-MGKF5FLQ.js} +13 -3
- package/dist/{chunk-UTOND6JN.js → chunk-MQGFUEYG.js} +1 -1
- package/dist/{chunk-VX54TD6Y.js → chunk-NC24UL7K.js} +1 -1
- package/dist/{chunk-YTGHV5F3.js → chunk-NFYD5TJK.js} +2 -2
- package/dist/{chunk-A7OIGKCQ.js → chunk-NLAT5MMY.js} +15 -5
- package/dist/{chunk-NMBUEXCN.js → chunk-NLHVEM3C.js} +7 -7
- package/dist/{chunk-Y7I5JUKB.js → chunk-NQ6KV722.js} +53 -25
- package/dist/{chunk-5ZV4OJLQ.js → chunk-OD2I3DD6.js} +3 -3
- package/dist/{chunk-VYGQZDXZ.js → chunk-PFN76FSF.js} +1 -1
- package/dist/{chunk-CN7P65IZ.js → chunk-PNZPLFKE.js} +41 -5
- package/dist/{chunk-33D2NTVD.js → chunk-QLHSLYOR.js} +5 -5
- package/dist/{chunk-URI4M2Y7.js → chunk-QLKUYP7Z.js} +1 -1
- package/dist/{chunk-6L7SVCL7.js → chunk-QR2OSVGC.js} +12 -2
- package/dist/{chunk-XRKK7REL.js → chunk-QTXUETWK.js} +9 -9
- package/dist/{chunk-MOOSK3D3.js → chunk-RRUZZQ74.js} +5 -5
- package/dist/{chunk-DIVCBKJX.js → chunk-S5VZAJZC.js} +2 -2
- package/dist/{chunk-MJI2OVQQ.js → chunk-S7CJ2L7L.js} +12 -12
- package/dist/{chunk-UYI7GNRI.js → chunk-SVHLXOER.js} +4 -4
- package/dist/{chunk-RGY5D5KQ.js → chunk-SYYPELYT.js} +2 -2
- package/dist/{chunk-GRF3ROE7.js → chunk-TM3WECNP.js} +5 -5
- package/dist/{chunk-B236OY5Z.js → chunk-TTUKVQTQ.js} +6 -3
- package/dist/{chunk-FGDWDPRQ.js → chunk-UE5QZNZO.js} +7 -7
- package/dist/{chunk-ZEYB3PCY.js → chunk-UNATZHHI.js} +5 -5
- package/dist/{chunk-MNYCJISM.js → chunk-USMEX5WO.js} +1 -1
- package/dist/{chunk-U4SM4755.js → chunk-UWVA7YWR.js} +10 -5
- package/dist/{chunk-WSNBD56T.js → chunk-UXXYHW6B.js} +2 -2
- package/dist/{chunk-44K7GQQF.js → chunk-V4DMA2GT.js} +1 -1
- package/dist/{chunk-AXCLC72D.js → chunk-VSPTVHE2.js} +8 -8
- package/dist/{chunk-SNO4Q74P.js → chunk-VUDAFOQU.js} +16 -16
- package/dist/{chunk-GRI3QUPX.js → chunk-WE7TYQVB.js} +3 -3
- package/dist/{chunk-ZPXFKXHV.js → chunk-WGZFBSXM.js} +3 -3
- package/dist/{chunk-FFFNHVN6.js → chunk-WILH4LFK.js} +6 -6
- package/dist/{chunk-4JT2BY7S.js → chunk-WYIJA2GH.js} +4 -4
- package/dist/{chunk-ABEAPF3L.js → chunk-X37REV7T.js} +1 -1
- package/dist/{chunk-F5F7S2JJ.js → chunk-XJR2JCWQ.js} +6 -6
- package/dist/{chunk-K3KHHIKW.js → chunk-Y4R3NQQG.js} +4 -4
- package/dist/{chunk-WDW4F5RB.js → chunk-YONUK2EY.js} +1 -1
- package/dist/{chunk-I5EO46FK.js → chunk-YRIECI5K.js} +4 -4
- package/dist/{chunk-MZAW27UT.js → chunk-ZCRO6HW2.js} +3 -3
- package/dist/{chunk-JS3LOMRQ.js → chunk-ZGA2LFVD.js} +3 -3
- package/dist/{chunk-4CU2JKVB.js → chunk-ZPSLQQ4F.js} +6 -6
- package/dist/{chunk-NFCYFGGB.js → chunk-ZQYYPDFT.js} +5 -5
- package/dist/{codex-app-cards-switch-LSUHIBWH.js → codex-app-cards-switch-J3AR3LN3.js} +13 -11
- package/dist/{codex-card-routing-UALNWUT7.js → codex-card-routing-K6LLM4TA.js} +2 -2
- package/dist/{codex-desktop-launch-NJJP3LOL.js → codex-desktop-launch-FK53DJ36.js} +3 -3
- package/dist/{codex-session-launch-SV3UAIQN.js → codex-session-launch-PY52DUMW.js} +20 -20
- package/dist/{config-DIUV6RBG.js → config-2NISBOJX.js} +3 -3
- package/dist/{global-upgrade-432FL35T.js → global-upgrade-2CK75GFZ.js} +9 -9
- package/dist/{identity-Y4TV3HOR.js → identity-T2EYYWQJ.js} +4 -4
- package/dist/{live-capabilities-TF5OI6MP.js → live-capabilities-V4LJIPMB.js} +4 -4
- package/dist/{paths-PUHJCRSZ.js → paths-XULGFNML.js} +3 -3
- package/dist/{reapply-YF6ZPMSG.js → reapply-KAEIPK36.js} +34 -34
- package/dist/src/index.js +33 -33
- package/dist/{upgrade-lock-KGXKS5S3.js → upgrade-lock-TPOCYNQ3.js} +8 -4
- package/dist/{usage-D7HCNUXP.js → usage-SMB3WYHN.js} +3 -3
- package/package.json +1 -1
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
addGeminiMcpServer,
|
|
3
3
|
removeGeminiMcpServer
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-WYIJA2GH.js";
|
|
5
5
|
import {
|
|
6
6
|
CLAUDE_CODE_AGENT
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-2R2LXG6H.js";
|
|
8
8
|
import {
|
|
9
9
|
compatibleToolLookup
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-MQGFUEYG.js";
|
|
11
11
|
import {
|
|
12
12
|
CLAUDE_HOOK_EVENTS,
|
|
13
13
|
PUSHARY_MCP_URL,
|
|
@@ -19,12 +19,13 @@ import {
|
|
|
19
19
|
isPusharyHook,
|
|
20
20
|
registerHookEntry,
|
|
21
21
|
removeClaudeMcpServers
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-NQ6KV722.js";
|
|
23
23
|
import {
|
|
24
24
|
AGENT_ENFORCEMENT,
|
|
25
25
|
HOOK_COMPATIBLE_PROFILES,
|
|
26
26
|
HOOK_FAILURE,
|
|
27
27
|
PHONE_ANSWERED_TOOLS,
|
|
28
|
+
compatibleProfileFor,
|
|
28
29
|
compatibleTargetFiles,
|
|
29
30
|
hookCompatibleProfile,
|
|
30
31
|
hookCompatibleProfileBySource,
|
|
@@ -32,7 +33,7 @@ import {
|
|
|
32
33
|
pusharyMissingReason,
|
|
33
34
|
refusalOutput,
|
|
34
35
|
withHookHoldBudget
|
|
35
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-BDMNQBP4.js";
|
|
36
37
|
|
|
37
38
|
// src/config-document.ts
|
|
38
39
|
import { parse, stringify } from "smol-toml";
|
|
@@ -60,43 +61,47 @@ import { homedir } from "os";
|
|
|
60
61
|
import { join } from "path";
|
|
61
62
|
|
|
62
63
|
// src/openhands-hooks-file.ts
|
|
63
|
-
var
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
user_prompt_submit: "UserPromptSubmit",
|
|
67
|
-
session_start: "SessionStart",
|
|
68
|
-
session_end: "SessionEnd",
|
|
69
|
-
stop: "Stop"
|
|
70
|
-
};
|
|
71
|
-
var OPENHANDS_EVENTS = new Set(Object.values(OPENHANDS_EVENT_BY_FIELD));
|
|
64
|
+
var snakeCaseEventField = (event) => event.replace(/(?<!^)(?=[A-Z])/g, "_").toLowerCase();
|
|
65
|
+
var OPENHANDS_EVENTS = new Set(compatibleProfileFor("openhands").events);
|
|
66
|
+
var OPENHANDS_EVENT_BY_FIELD = new Map([...OPENHANDS_EVENTS].map((event) => [snakeCaseEventField(event), event]));
|
|
72
67
|
var OPENHANDS_HOOKS_KEY = "hooks";
|
|
73
|
-
var openHandsEventNamed = (key) => OPENHANDS_EVENT_BY_FIELD
|
|
74
|
-
var
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
68
|
+
var openHandsEventNamed = (key) => OPENHANDS_EVENT_BY_FIELD.get(key) ?? (OPENHANDS_EVENTS.has(key) ? key : void 0);
|
|
69
|
+
var UNCHANGED = { kind: "unchanged" };
|
|
70
|
+
var isMovedEvent = (key, event, keepsEventNames) => event !== void 0 && !(keepsEventNames && key === event);
|
|
71
|
+
var plannedMoves = (source, keepsEventNames) => {
|
|
72
|
+
const moves = [];
|
|
73
|
+
for (const [key, value] of Object.entries(source)) {
|
|
74
|
+
const event = openHandsEventNamed(key);
|
|
75
|
+
if (!isMovedEvent(key, event, keepsEventNames)) continue;
|
|
76
|
+
if (!Array.isArray(value)) return { kind: "not_a_list", key };
|
|
77
|
+
moves.push({ from: key, event, entries: value });
|
|
78
|
+
}
|
|
79
|
+
return { kind: "moves", moves };
|
|
80
|
+
};
|
|
81
81
|
var prefixed = (prefix, key) => prefix ? `${prefix}.${key}` : key;
|
|
82
|
+
var conflictAt = (conflictAtKey) => ({ kind: "conflict", conflictAt: conflictAtKey });
|
|
83
|
+
var entriesAlreadyUnder = (target, event) => {
|
|
84
|
+
const existing = target[event];
|
|
85
|
+
return Array.isArray(existing) ? existing : [];
|
|
86
|
+
};
|
|
82
87
|
var foldOpenHandsHookShapes = (config) => {
|
|
83
88
|
const current = config[OPENHANDS_HOOKS_KEY];
|
|
84
|
-
if (current !== void 0 && !isRecord(current)) return
|
|
89
|
+
if (current !== void 0 && !isRecord(current)) return UNCHANGED;
|
|
85
90
|
const wrapped = isRecord(current);
|
|
86
91
|
const source = wrapped ? current : config;
|
|
87
|
-
const
|
|
88
|
-
if (
|
|
92
|
+
const planned = plannedMoves(source, wrapped);
|
|
93
|
+
if (planned.kind === "not_a_list") return conflictAt(prefixed(wrapped ? OPENHANDS_HOOKS_KEY : void 0, planned.key));
|
|
89
94
|
const target = wrapped ? current : {};
|
|
90
|
-
const clash = moves.find(({ event }) => target[event] !== void 0 && !Array.isArray(target[event]));
|
|
91
|
-
if (clash) return prefixed(OPENHANDS_HOOKS_KEY, clash.event);
|
|
92
|
-
if (moves.length === 0) return
|
|
93
|
-
for (const { from, event, entries } of moves) {
|
|
94
|
-
const existing =
|
|
95
|
+
const clash = planned.moves.find(({ event }) => target[event] !== void 0 && !Array.isArray(target[event]));
|
|
96
|
+
if (clash) return conflictAt(prefixed(OPENHANDS_HOOKS_KEY, clash.event));
|
|
97
|
+
if (planned.moves.length === 0) return UNCHANGED;
|
|
98
|
+
for (const { from, event, entries } of planned.moves) {
|
|
99
|
+
const existing = entriesAlreadyUnder(target, event);
|
|
95
100
|
delete source[from];
|
|
96
101
|
target[event] = [...existing, ...entries];
|
|
97
102
|
}
|
|
98
103
|
config[OPENHANDS_HOOKS_KEY] = target;
|
|
99
|
-
return
|
|
104
|
+
return { kind: "folded" };
|
|
100
105
|
};
|
|
101
106
|
|
|
102
107
|
// src/compatible-config.ts
|
|
@@ -255,8 +260,8 @@ var permissionsShapeConflict = (config) => {
|
|
|
255
260
|
return permissions.allow !== void 0 && !Array.isArray(permissions.allow) ? "permissions.allow" : void 0;
|
|
256
261
|
};
|
|
257
262
|
var addCompatibleToolPermissions = (config) => {
|
|
258
|
-
const
|
|
259
|
-
if (
|
|
263
|
+
const conflictAt2 = permissionsShapeConflict(config);
|
|
264
|
+
if (conflictAt2) return { ok: false, conflictAt: conflictAt2 };
|
|
260
265
|
addPusharyToolPermissions(config);
|
|
261
266
|
return WRITTEN;
|
|
262
267
|
};
|
|
@@ -277,9 +282,10 @@ var entryFor = (profile, definition, resolve) => {
|
|
|
277
282
|
};
|
|
278
283
|
};
|
|
279
284
|
var readsOpenHandsHookShapes = (profile) => profile.payload === "openhands";
|
|
285
|
+
var foldedShapeConflict = (fold) => fold.kind === "conflict" ? fold.conflictAt : void 0;
|
|
280
286
|
var addCompatibleHooks = (config, profile, binDir) => {
|
|
281
|
-
const
|
|
282
|
-
if (
|
|
287
|
+
const conflictAt2 = (readsOpenHandsHookShapes(profile) ? foldedShapeConflict(foldOpenHandsHookShapes(config)) : void 0) ?? hooksShapeConflict(config, profile);
|
|
288
|
+
if (conflictAt2) return { ok: false, conflictAt: conflictAt2 };
|
|
283
289
|
const hooks = descend(config, profile.hooksKeyPath);
|
|
284
290
|
const supported = new Map(compatibleHookEvents(profile).map((hook) => [hook.event, hook]));
|
|
285
291
|
for (const known of compatibleDefinitions(profile)) {
|
|
@@ -3,13 +3,13 @@ import {
|
|
|
3
3
|
} from "./chunk-WHB622LP.js";
|
|
4
4
|
import {
|
|
5
5
|
ensureDaemonRunning
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-WILH4LFK.js";
|
|
7
7
|
import {
|
|
8
8
|
hookOwnerOf
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-WYIJA2GH.js";
|
|
10
10
|
import {
|
|
11
11
|
hookMeaning
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-MQGFUEYG.js";
|
|
13
13
|
import {
|
|
14
14
|
buildTranscriptRecords,
|
|
15
15
|
changedRecipientsMessage,
|
|
@@ -24,11 +24,11 @@ import {
|
|
|
24
24
|
uploadTranscriptRecords,
|
|
25
25
|
verifyAnchoredRecipients,
|
|
26
26
|
wrapSessionKey
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-BMVNMKVL.js";
|
|
28
28
|
import {
|
|
29
29
|
transcriptEnvironmentPreference,
|
|
30
30
|
transcriptsEnabled
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-4QTDUXS5.js";
|
|
32
32
|
import {
|
|
33
33
|
external_exports,
|
|
34
34
|
ownedOnlyByThisUser,
|
|
@@ -36,19 +36,19 @@ import {
|
|
|
36
36
|
} from "./chunk-P6DUWKAO.js";
|
|
37
37
|
import {
|
|
38
38
|
fetchAsCredential
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-V4DMA2GT.js";
|
|
40
40
|
import {
|
|
41
41
|
readTranscriptPreference
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-KIYUQ2XZ.js";
|
|
43
43
|
import {
|
|
44
44
|
claudeConfigDir,
|
|
45
45
|
codexHome,
|
|
46
46
|
pusharyDir
|
|
47
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-NQ6KV722.js";
|
|
48
48
|
import {
|
|
49
49
|
getApiKey,
|
|
50
50
|
getBaseUrl
|
|
51
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-IA44JTLJ.js";
|
|
52
52
|
import {
|
|
53
53
|
writeJsonAtomic,
|
|
54
54
|
writeJsonAtomicDurable
|
|
@@ -61,7 +61,7 @@ import {
|
|
|
61
61
|
isHookSource,
|
|
62
62
|
isRecord,
|
|
63
63
|
redactSecretsFromContent
|
|
64
|
-
} from "./chunk-
|
|
64
|
+
} from "./chunk-BDMNQBP4.js";
|
|
65
65
|
|
|
66
66
|
// src/transcript-registration.ts
|
|
67
67
|
import { createHash as createHash4 } from "crypto";
|
|
@@ -4,21 +4,21 @@ import {
|
|
|
4
4
|
claimThrottle,
|
|
5
5
|
releaseThrottle,
|
|
6
6
|
reportEvent
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-2R2LXG6H.js";
|
|
8
8
|
import {
|
|
9
9
|
deriveToolTarget,
|
|
10
10
|
permissionDeniedAction
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-MQGFUEYG.js";
|
|
12
12
|
import {
|
|
13
13
|
projectNameFor
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-FS4VJTFC.js";
|
|
15
15
|
import {
|
|
16
16
|
PERMISSION_ALLOWED_EVENT,
|
|
17
17
|
PERMISSION_DENIED_EVENT,
|
|
18
18
|
machineApprovalFor,
|
|
19
19
|
machineDecisionFor,
|
|
20
20
|
wireVerdictFor
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-BDMNQBP4.js";
|
|
22
22
|
|
|
23
23
|
// src/machine-decision-audit.ts
|
|
24
24
|
var MACHINE_DECISION_REPORT_TIMEOUT_MS = 800;
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
} from "./chunk-CXQWDQCJ.js";
|
|
20
20
|
import {
|
|
21
21
|
redactSecretsFromContent
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-BDMNQBP4.js";
|
|
23
23
|
|
|
24
24
|
// src/shell-quote.ts
|
|
25
25
|
var shellDoubleQuoted = (text) => `"${text.replace(/(["\\$`])/g, "\\$1")}"`;
|
|
@@ -201,7 +201,15 @@ var NpmReleaseAgeError = class extends NpmInstallError {
|
|
|
201
201
|
this.name = "NpmReleaseAgeError";
|
|
202
202
|
}
|
|
203
203
|
};
|
|
204
|
+
var NPM_DISK_FULL_DETAIL = "The disk is full, so npm could not install Pushary.";
|
|
205
|
+
var NpmDiskFullError = class extends NpmInstallError {
|
|
206
|
+
constructor() {
|
|
207
|
+
super(NPM_DISK_FULL_DETAIL);
|
|
208
|
+
this.name = "NpmDiskFullError";
|
|
209
|
+
}
|
|
210
|
+
};
|
|
204
211
|
var NPM_PERMISSION_CODE = /\b(EACCES|EPERM)\b/;
|
|
212
|
+
var NO_SPACE_LEFT = /\bENOSPC\b|no space left on device/i;
|
|
205
213
|
var ERROR_TEXT_FIELDS = ["code", "stderr", "stdout", "message"];
|
|
206
214
|
var errorTextOf = (err, fields = ERROR_TEXT_FIELDS) => {
|
|
207
215
|
if (typeof err !== "object" || err === null) return [String(err)];
|
|
@@ -229,8 +237,10 @@ var npmExitedOnItsOwn = (error) => {
|
|
|
229
237
|
return typeof status === "number" && Number.isSafeInteger(status) && status > 0 && !npmWasKilledBySignal(error);
|
|
230
238
|
};
|
|
231
239
|
var npmExitedOnReleaseAge = (error) => npmExitedOnItsOwn(error) && isNpmReleaseAgeFailure(error);
|
|
240
|
+
var npmRanOutOfDiskSpace = (error) => errorTextOf(error).some((text) => NO_SPACE_LEFT.test(text));
|
|
232
241
|
var npmInstallFailure = (err, platform = process.platform) => {
|
|
233
242
|
if (npmExitedOnReleaseAge(err)) return new NpmReleaseAgeError(npmErrorMessage(err));
|
|
243
|
+
if (npmRanOutOfDiskSpace(err)) return new NpmDiskFullError();
|
|
234
244
|
const code = npmPermissionCodeOf(err);
|
|
235
245
|
return code === null ? new NpmInstallError(npmErrorMessage(err)) : new NpmPermissionError(npmErrorMessage(err), npmPermissionFailureKind(code, platform));
|
|
236
246
|
};
|
|
@@ -590,6 +600,7 @@ var readPlannedSetupInstall = (platform = process.platform) => {
|
|
|
590
600
|
var setupNeedsGlobalInstall = (version, planned) => planned.prefix === void 0 || needsGlobalInstall(version, planned.installedVersion, planned.binsPresent);
|
|
591
601
|
var asCachedResult = (result) => result === "installed" ? "cached" : result;
|
|
592
602
|
var installState;
|
|
603
|
+
var failuresThisProcessLeftUnfinished = /* @__PURE__ */ new Map();
|
|
593
604
|
var installGlobally = (options) => {
|
|
594
605
|
if (!isKnownReleaseVersion(options.version)) {
|
|
595
606
|
return Promise.reject(new NpmInstallError("Setup requires a known release version. Run an official versioned release; no global package was installed."));
|
|
@@ -599,9 +610,13 @@ var installGlobally = (options) => {
|
|
|
599
610
|
}
|
|
600
611
|
const started = (async () => {
|
|
601
612
|
if (!npmIsOnPath()) throw new NpmMissingError();
|
|
602
|
-
const { withUpgradeLock } = await import("./global-upgrade-
|
|
603
|
-
const { installWithUpgradeLock, ownsUpgradeLock } = await import("./upgrade-lock-
|
|
604
|
-
const { autoUpdateLock } = await import("./paths-
|
|
613
|
+
const { withUpgradeLock } = await import("./global-upgrade-2CK75GFZ.js");
|
|
614
|
+
const { canonicalLockPath, installWithUpgradeLock, leftAnUnfinishedInstallHere, ownsUpgradeLock } = await import("./upgrade-lock-TPOCYNQ3.js");
|
|
615
|
+
const { autoUpdateLock } = await import("./paths-XULGFNML.js");
|
|
616
|
+
const lockPath = options.lockPath ?? autoUpdateLock();
|
|
617
|
+
const lockFile = canonicalLockPath(lockPath);
|
|
618
|
+
const unfinishedHere = failuresThisProcessLeftUnfinished.get(lockFile);
|
|
619
|
+
if (unfinishedHere !== void 0 && !ownsUpgradeLock(lockPath) && leftAnUnfinishedInstallHere(lockPath)) throw unfinishedHere;
|
|
605
620
|
let result = "skipped";
|
|
606
621
|
const install = async () => {
|
|
607
622
|
const planned = readPlannedSetupInstall(process.platform);
|
|
@@ -614,11 +629,16 @@ var installGlobally = (options) => {
|
|
|
614
629
|
installWithUpgradeLock({ packageName: planned.packageName, version: options.version, timeoutMs: options.timeoutMs ?? 12e4 }, options.lockPath);
|
|
615
630
|
result = "installed";
|
|
616
631
|
};
|
|
617
|
-
if (ownsUpgradeLock(
|
|
632
|
+
if (ownsUpgradeLock(lockPath)) {
|
|
618
633
|
await install();
|
|
619
|
-
|
|
634
|
+
return result;
|
|
635
|
+
}
|
|
636
|
+
try {
|
|
620
637
|
const lock = await withUpgradeLock(install, options);
|
|
621
638
|
if (lock.kind === "refused") throw new Error(lock.message);
|
|
639
|
+
} catch (error) {
|
|
640
|
+
if (leftAnUnfinishedInstallHere(lockPath)) failuresThisProcessLeftUnfinished.set(lockFile, error);
|
|
641
|
+
throw error;
|
|
622
642
|
}
|
|
623
643
|
return result;
|
|
624
644
|
})();
|
|
@@ -649,6 +669,7 @@ export {
|
|
|
649
669
|
NpmPermissionError,
|
|
650
670
|
NpmInstallError,
|
|
651
671
|
NpmReleaseAgeError,
|
|
672
|
+
NpmDiskFullError,
|
|
652
673
|
npmExitedOnReleaseAge,
|
|
653
674
|
npmInstallFailure,
|
|
654
675
|
resolveBinary,
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
} from "./chunk-U4P4NDVB.js";
|
|
17
17
|
import {
|
|
18
18
|
withoutNpmInstallConsent
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-K63QVFSB.js";
|
|
20
20
|
|
|
21
21
|
// src/codex-desktop-launch.ts
|
|
22
22
|
import { spawn as spawn2, execFileSync as execFileSync2 } from "child_process";
|
|
@@ -539,8 +539,8 @@ var loadedOnce = (load) => {
|
|
|
539
539
|
};
|
|
540
540
|
|
|
541
541
|
// src/codex-desktop-proxy.ts
|
|
542
|
-
var loadThePhone = () => import("./api-
|
|
543
|
-
var loadTheCardRouting = () => import("./codex-card-routing-
|
|
542
|
+
var loadThePhone = () => import("./api-NCCKFLNT.js");
|
|
543
|
+
var loadTheCardRouting = () => import("./codex-card-routing-K6LLM4TA.js");
|
|
544
544
|
var theFirstCardLoadsAgain = () => {
|
|
545
545
|
};
|
|
546
546
|
var ASKS_WITHOUT_ROUTING = {};
|
|
@@ -1101,7 +1101,7 @@ var codexDesktopCommand = async (args, entry, readAccount) => {
|
|
|
1101
1101
|
return runCodexDesktopProxy(engine2, args.slice(3), readAccount, { watchesForCards: layoutIsKnown });
|
|
1102
1102
|
}
|
|
1103
1103
|
if (args[0] === APP_CARDS_FLAG) {
|
|
1104
|
-
const { codexAppCardsCommandOnThisMac } = await import("./codex-app-cards-switch-
|
|
1104
|
+
const { codexAppCardsCommandOnThisMac } = await import("./codex-app-cards-switch-J3AR3LN3.js");
|
|
1105
1105
|
return codexAppCardsCommandOnThisMac(args.slice(1), entry, readAccount);
|
|
1106
1106
|
}
|
|
1107
1107
|
if (args.length > 2) throw new Error("Usage: pushary codex --desktop [path/to/Codex.app]");
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
resolveInstallSourceFor
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-MAXV4AZR.js";
|
|
4
4
|
import {
|
|
5
5
|
apiKeyInForce,
|
|
6
6
|
configFilePath,
|
|
7
7
|
keyPrefixToShow
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-IA44JTLJ.js";
|
|
9
9
|
import {
|
|
10
10
|
backupFile,
|
|
11
11
|
backupFileInto,
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
API_KEY_PREFIX_PATTERN,
|
|
18
18
|
isRecord,
|
|
19
19
|
isValidApiKey
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-BDMNQBP4.js";
|
|
21
21
|
|
|
22
22
|
// src/shell-alias.ts
|
|
23
23
|
import { homedir } from "os";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
pusharyHookExecutable
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-WYIJA2GH.js";
|
|
4
4
|
import {
|
|
5
5
|
bridgeResolvesToApp,
|
|
6
6
|
cursorUserHooks,
|
|
7
7
|
executableFileName,
|
|
8
8
|
isBridgeLocator,
|
|
9
9
|
liveBridgeProbe
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-NQ6KV722.js";
|
|
11
11
|
import {
|
|
12
12
|
atLeast,
|
|
13
13
|
parseVersion
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
isCursorHookPayload,
|
|
22
22
|
isRecord,
|
|
23
23
|
toolsCoveredByGateEntry
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-BDMNQBP4.js";
|
|
25
25
|
|
|
26
26
|
// src/cursor-gate-registration.ts
|
|
27
27
|
import { dirname, isAbsolute, join, resolve } from "path";
|
|
@@ -3,24 +3,24 @@ import {
|
|
|
3
3
|
expectedLaunchCapabilities,
|
|
4
4
|
hasSpawnProvider,
|
|
5
5
|
resolveControlPolicy
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-4E3KK4PH.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-WILH4LFK.js";
|
|
14
14
|
import {
|
|
15
15
|
getMachineId
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-3S4OKDZR.js";
|
|
17
17
|
import {
|
|
18
18
|
readControlMode,
|
|
19
19
|
readKeyInForce
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-KIYUQ2XZ.js";
|
|
21
21
|
import {
|
|
22
22
|
getBaseUrl
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-IA44JTLJ.js";
|
|
24
24
|
import {
|
|
25
25
|
getPackageVersion
|
|
26
26
|
} from "./chunk-CXQWDQCJ.js";
|
|
@@ -5,13 +5,13 @@ import {
|
|
|
5
5
|
OPENCLAW_ENVIRONMENT_KEYS,
|
|
6
6
|
openClawEnvironmentOf,
|
|
7
7
|
openClawPathsFrom
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-NQ6KV722.js";
|
|
9
9
|
import {
|
|
10
10
|
resolvePathBinary
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-K63QVFSB.js";
|
|
12
12
|
import {
|
|
13
13
|
isRecord
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-BDMNQBP4.js";
|
|
15
15
|
|
|
16
16
|
// src/openclaw/wiring-state.ts
|
|
17
17
|
var OPENCLAW_PLUGIN_ID = "pushary";
|
|
@@ -87,6 +87,15 @@ var openClawWiringState = (facts) => {
|
|
|
87
87
|
};
|
|
88
88
|
var isOpenClawWired = (state) => state.kind === "wired";
|
|
89
89
|
var isOursToRemove = (facts) => facts.kind === "installed" && facts.packageName === OPENCLAW_PLUGIN_PACKAGE;
|
|
90
|
+
var namesThePlugin = (table) => isRecord(table) && Object.hasOwn(table, OPENCLAW_PLUGIN_ID);
|
|
91
|
+
var loadsAFolderNamedForThePlugin = (load) => isRecord(load) && Array.isArray(load.paths) && load.paths.some((path) => typeof path === "string" && path.includes(OPENCLAW_PLUGIN_ID));
|
|
92
|
+
var pusharyPluginInOpenClawConfig = (config) => {
|
|
93
|
+
if (!isRecord(config)) return "unreadable";
|
|
94
|
+
const plugins = config.plugins;
|
|
95
|
+
if (plugins === void 0) return "absent";
|
|
96
|
+
if (!isRecord(plugins)) return "unreadable";
|
|
97
|
+
return namesThePlugin(plugins.entries) || namesThePlugin(plugins.installs) || loadsAFolderNamedForThePlugin(plugins.load) ? "present" : "absent";
|
|
98
|
+
};
|
|
90
99
|
|
|
91
100
|
// src/openclaw/runtime.ts
|
|
92
101
|
import { execFile } from "child_process";
|
|
@@ -181,6 +190,7 @@ export {
|
|
|
181
190
|
openClawWiringState,
|
|
182
191
|
isOpenClawWired,
|
|
183
192
|
isOursToRemove,
|
|
193
|
+
pusharyPluginInOpenClawConfig,
|
|
184
194
|
currentOpenClawEnvironment,
|
|
185
195
|
openClawPathsNow,
|
|
186
196
|
openClawLauncherCandidates,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
claudeConfigDir
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-NQ6KV722.js";
|
|
4
4
|
import {
|
|
5
5
|
claudePermissionRulesFromSettings
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-BDMNQBP4.js";
|
|
7
7
|
|
|
8
8
|
// src/claude-permission-rules.ts
|
|
9
9
|
import { readFileSync, statSync } from "fs";
|
|
@@ -10,12 +10,13 @@ import {
|
|
|
10
10
|
openClawIsOlderThanSupported,
|
|
11
11
|
openClawPathsNow,
|
|
12
12
|
openClawWiringState,
|
|
13
|
+
pusharyPluginInOpenClawConfig,
|
|
13
14
|
readOpenClawEntry,
|
|
14
15
|
readOpenClawVersion,
|
|
15
16
|
uninstallOpenClawPlugin,
|
|
16
17
|
unsetOpenClawEntry,
|
|
17
18
|
writeOpenClawEntry
|
|
18
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-MGKF5FLQ.js";
|
|
19
20
|
import {
|
|
20
21
|
needsShell
|
|
21
22
|
} from "./chunk-3PSNUHC5.js";
|
|
@@ -27,10 +28,10 @@ import {
|
|
|
27
28
|
openClawDirectoriesToLookIn,
|
|
28
29
|
openClawPluginFolder,
|
|
29
30
|
openClawSetupReceiptDirectory
|
|
30
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-NQ6KV722.js";
|
|
31
32
|
import {
|
|
32
33
|
resolvePathBinary
|
|
33
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-K63QVFSB.js";
|
|
34
35
|
import {
|
|
35
36
|
readJsonSafe,
|
|
36
37
|
writeJsonAtomic
|
|
@@ -41,7 +42,7 @@ import {
|
|
|
41
42
|
} from "./chunk-CXQWDQCJ.js";
|
|
42
43
|
import {
|
|
43
44
|
isRecord
|
|
44
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-BDMNQBP4.js";
|
|
45
46
|
|
|
46
47
|
// src/hermes/plugin-payload.ts
|
|
47
48
|
import { createHash } from "crypto";
|
|
@@ -3965,13 +3966,22 @@ var removalTargets = (files) => {
|
|
|
3965
3966
|
const currentPath = receiptPathFor(files, current);
|
|
3966
3967
|
return recorded.some((target) => target.receiptPath === currentPath) ? recorded : [...recorded, { environment: current, receipt: { kind: "missing" }, receiptPath: currentPath }];
|
|
3967
3968
|
};
|
|
3969
|
+
var OPENCLAW_EXTENSIONS_FOLDER = "extensions";
|
|
3970
|
+
var pusharyPluginOnDisk = (environment) => {
|
|
3971
|
+
const where = openClawPathsNow(environment);
|
|
3972
|
+
if (existsSync4(join3(where.stateDirectory, OPENCLAW_EXTENSIONS_FOLDER, OPENCLAW_PLUGIN_ID))) return "present";
|
|
3973
|
+
const config = readJsonSafe(where.configFile);
|
|
3974
|
+
if (config.kind === "missing") return "absent";
|
|
3975
|
+
return config.kind === "ok" ? pusharyPluginInOpenClawConfig(config.value) : "unreadable";
|
|
3976
|
+
};
|
|
3977
|
+
var neverSetUpHere = (receipt, environment) => receipt.kind === "missing" && pusharyPluginOnDisk(environment) === "absent";
|
|
3968
3978
|
var removeFromOneOpenClaw = async (target, request) => {
|
|
3969
3979
|
const { environment, receipt } = target;
|
|
3970
3980
|
const launcher = launcherFor(request.launcher, () => launcherWhereOpenClawLives(environment, receipt));
|
|
3971
3981
|
if (launcher === null) return receipt.kind === "ok" ? { kind: "runtime_missing" } : { kind: "not_found" };
|
|
3972
3982
|
const session = sessionFor(launcher, environment);
|
|
3973
3983
|
const facts = await inspectOpenClawPlugin(session, { runtime: false });
|
|
3974
|
-
if (facts.kind === "unreadable") return { kind: "unreadable" };
|
|
3984
|
+
if (facts.kind === "unreadable") return neverSetUpHere(receipt, environment) ? { kind: "not_found" } : { kind: "unreadable" };
|
|
3975
3985
|
if (facts.kind === "installed" && !isOursToRemove(facts)) return { kind: "not_ours", packageName: facts.packageName };
|
|
3976
3986
|
if (facts.kind === "not_installed" && receipt.kind === "missing") return { kind: "not_found" };
|
|
3977
3987
|
if (request.dryRun) return { kind: "removed", dryRun: true, settingsRestored: true };
|
|
@@ -2,31 +2,31 @@ import {
|
|
|
2
2
|
SIGNED_OUT_ON_MAC_MESSAGE,
|
|
3
3
|
describeSignedOutKey,
|
|
4
4
|
readSignedOutDiagnosis
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-DRLY2ELW.js";
|
|
6
6
|
import {
|
|
7
7
|
APPROVAL_RULES_PATH
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-UXXYHW6B.js";
|
|
9
9
|
import {
|
|
10
10
|
createIo
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-GISC7J7K.js";
|
|
12
12
|
import {
|
|
13
13
|
absoluteUrl,
|
|
14
14
|
checkApiKey,
|
|
15
15
|
describeKeyCheck,
|
|
16
16
|
keyCheckFromResponse
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-WGZFBSXM.js";
|
|
18
18
|
import {
|
|
19
19
|
readKeySource
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-KIYUQ2XZ.js";
|
|
21
21
|
import {
|
|
22
22
|
getBaseUrl
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-IA44JTLJ.js";
|
|
24
24
|
import {
|
|
25
25
|
EXIT
|
|
26
26
|
} from "./chunk-BG4HHB7E.js";
|
|
27
27
|
import {
|
|
28
28
|
KEY_SCOPE
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-BDMNQBP4.js";
|
|
30
30
|
|
|
31
31
|
// src/cli/report-key.ts
|
|
32
32
|
var { dim, yellow } = createIo();
|