@pushary/agent-hooks 1.9.145 → 1.9.147
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 +17 -0
- package/README.md +5 -4
- package/data/SKILL.md +3 -3
- package/data/cursor-plugin/scripts/redaction.mjs +2 -1
- package/data/cursor-plugin/skills/pushary/SKILL.md +2 -2
- package/data/openclaw-plugin/LICENSE +21 -0
- package/data/openclaw-plugin/README.md +113 -0
- package/data/openclaw-plugin/dist/api-key-shape.js +5 -0
- package/data/openclaw-plugin/dist/approval-hook.js +88 -0
- package/data/openclaw-plugin/dist/approval-question.js +66 -0
- package/data/openclaw-plugin/dist/connection.js +101 -0
- package/data/openclaw-plugin/dist/decision-reply.js +6 -0
- package/data/openclaw-plugin/dist/gate-result.js +58 -0
- package/data/openclaw-plugin/dist/gate.js +173 -0
- package/data/openclaw-plugin/dist/hook-budget.js +19 -0
- package/data/openclaw-plugin/dist/host-api.js +1 -0
- package/data/openclaw-plugin/dist/host-version.js +25 -0
- package/data/openclaw-plugin/dist/index.js +32 -0
- package/data/openclaw-plugin/dist/openclaw-paths.js +43 -0
- package/data/openclaw-plugin/dist/openclaw-write-guard.js +93 -0
- package/data/openclaw-plugin/dist/protected-writes.js +217 -0
- package/data/openclaw-plugin/dist/pushary-client.js +103 -0
- package/data/openclaw-plugin/dist/pushary-hosts.js +3 -0
- package/data/openclaw-plugin/dist/redaction.js +53 -0
- package/data/openclaw-plugin/dist/replies.js +65 -0
- package/data/openclaw-plugin/dist/settings.js +103 -0
- package/data/openclaw-plugin/openclaw.plugin.json +32 -0
- package/data/openclaw-plugin/package.json +70 -0
- package/data/vscode-plugin/scripts/redaction.mjs +2 -1
- package/data/vscode-plugin/skills/pushary/SKILL.md +2 -2
- package/dist/{api-KWJQMO6G.js → api-2KDVLXHT.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 +11 -11
- package/dist/bin/pushary-claude.js +27 -27
- package/dist/bin/pushary-clean.js +76 -39
- package/dist/bin/pushary-codex-bridge.js +23 -23
- package/dist/bin/pushary-codex-hook.js +35 -35
- package/dist/bin/pushary-codex-session.js +8 -8
- package/dist/bin/pushary-codex.js +16 -16
- package/dist/bin/pushary-connect.js +78 -36
- package/dist/bin/pushary-cowork.js +5 -5
- package/dist/bin/pushary-daemon.js +44 -43
- package/dist/bin/pushary-disconnect.js +28 -28
- package/dist/bin/pushary-display-hook.js +96 -44
- package/dist/bin/pushary-doctor.js +124 -55
- package/dist/bin/pushary-elicitation-hook.js +28 -28
- package/dist/bin/pushary-gemini-bridge.js +17 -17
- package/dist/bin/pushary-gemini-hook.js +32 -32
- package/dist/bin/pushary-hook.js +35 -35
- package/dist/bin/pushary-login.js +22 -22
- package/dist/bin/pushary-logout.js +33 -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-hook.js +31 -31
- package/dist/bin/pushary-permission-denied-hook.js +35 -35
- 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 +37 -36
- package/dist/bin/pushary-setup.js +140 -87
- package/dist/bin/pushary-stats.js +5 -5
- package/dist/bin/pushary-status.js +38 -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 +25 -25
- package/dist/bin/pushary-upgrade.js +42 -41
- package/dist/bin/pushary-wait.js +16 -16
- package/dist/bin/pushary.js +7 -7
- package/dist/{chunk-4KDRT3OA.js → chunk-2EETRVCZ.js} +1 -1
- package/dist/{chunk-LJRPWUST.js → chunk-2G54YLN3.js} +3 -3
- package/dist/{chunk-R34RWVN2.js → chunk-2I6A34GJ.js} +14 -5
- package/dist/{chunk-WPBWJMBZ.js → chunk-2QY2BD4T.js} +5 -5
- package/dist/{chunk-RO6EVL5C.js → chunk-2RAIG6NF.js} +2 -2
- package/dist/{chunk-LD4R2P6N.js → chunk-2YNAQ5TX.js} +1 -1
- package/dist/{chunk-TRV3ETGY.js → chunk-37ZBJB2Q.js} +5 -5
- package/dist/{chunk-BWREST4F.js → chunk-3NMX4725.js} +1 -1
- package/dist/{chunk-YRJZF5RG.js → chunk-3TTXOU6G.js} +3 -3
- package/dist/{chunk-FCSPMSDC.js → chunk-4P3ML7HP.js} +200 -59
- package/dist/{chunk-IRPIMQ7U.js → chunk-526XSNMS.js} +3 -3
- package/dist/{chunk-4L5WPDTB.js → chunk-57GVGSOQ.js} +1 -1
- package/dist/{chunk-ZORBUQFG.js → chunk-5II3USXS.js} +2 -2
- package/dist/{chunk-USFZJAB4.js → chunk-5K65H6OO.js} +1 -1
- package/dist/{chunk-5TWW7ZUL.js → chunk-6C5QRJIH.js} +5 -5
- package/dist/{chunk-KFALRZIN.js → chunk-6EPTMB7L.js} +4 -4
- package/dist/{chunk-LQXUWXQP.js → chunk-6JBX55K4.js} +31 -8
- package/dist/{chunk-B4JQIH5M.js → chunk-6YVGY2ZX.js} +7 -7
- package/dist/{chunk-7LTP2GHO.js → chunk-72S6PF2I.js} +2 -2
- package/dist/{chunk-WMBWKPKJ.js → chunk-7P32YU2M.js} +10 -74
- package/dist/{chunk-TJXJGMSP.js → chunk-7TVSWGAV.js} +8 -6
- package/dist/{chunk-L4OGTRVW.js → chunk-7WDEJTNX.js} +4 -4
- package/dist/{chunk-KGFB2LEB.js → chunk-7XIJD7NL.js} +3 -3
- package/dist/{chunk-S3A4PCRR.js → chunk-A5MSVNFS.js} +10 -10
- package/dist/{chunk-OONMKLUF.js → chunk-ANLR5G2W.js} +4 -4
- package/dist/{chunk-HOQH5CLZ.js → chunk-BEDAQAEN.js} +1 -1
- package/dist/{chunk-JKWUF776.js → chunk-BHGSNYG5.js} +3 -3
- package/dist/{chunk-VTJ4WZOC.js → chunk-BU2J4P7P.js} +3 -3
- package/dist/{chunk-6UK4K5RS.js → chunk-BYVLAPCF.js} +1 -1
- package/dist/{chunk-KS3PNTRT.js → chunk-CSNG5NQR.js} +1 -1
- package/dist/{chunk-JZT2LPRM.js → chunk-D7ZWJYXB.js} +1 -1
- package/dist/{chunk-Y7INHH5G.js → chunk-ELRZO6A7.js} +3 -3
- package/dist/{chunk-6IWOMXUF.js → chunk-EV54ZQ5J.js} +4 -4
- package/dist/{chunk-33BYPZ52.js → chunk-FHBJJOMF.js} +1 -1
- package/dist/{chunk-YU5XE6VC.js → chunk-FKGWP4MF.js} +8 -7
- package/dist/{chunk-2ELNRGNX.js → chunk-FMAIUTVU.js} +3 -3
- package/dist/{chunk-EPWOARGR.js → chunk-FWCECQTY.js} +2 -2
- package/dist/{chunk-BYKRAYGD.js → chunk-GGCUXNZN.js} +1 -1
- package/dist/{chunk-WH4ODOCE.js → chunk-GIWI5IHB.js} +6 -6
- package/dist/{chunk-72LP4RPC.js → chunk-GJV5RVUU.js} +98 -47
- package/dist/chunk-GPAMD5JG.js +157 -0
- package/dist/{chunk-FNAH3YJC.js → chunk-I72UU75H.js} +16 -16
- package/dist/{chunk-ZSOCJHL7.js → chunk-ISM6XF3V.js} +309 -5
- package/dist/{chunk-Q6P7G4NY.js → chunk-ISOP4ENY.js} +17 -5
- package/dist/{chunk-6LZ7MXHD.js → chunk-JDIKCM2N.js} +5 -5
- package/dist/{chunk-52UXNCZG.js → chunk-KDJIDRJS.js} +3 -3
- package/dist/{chunk-LMU6NG2G.js → chunk-KFL7OWLI.js} +1 -1
- package/dist/{chunk-PXZTCR4M.js → chunk-KH27X5CW.js} +2 -2
- package/dist/{chunk-MOC2DN42.js → chunk-KXMIDDUN.js} +2 -2
- package/dist/{chunk-QKTF7WS6.js → chunk-L2M6D2N4.js} +4 -4
- package/dist/{chunk-CUR2DCZN.js → chunk-L6BTSIKF.js} +4 -4
- package/dist/{chunk-YZA3YBHX.js → chunk-LO52V6WG.js} +2 -2
- package/dist/{chunk-GK5X2ZTN.js → chunk-MI7GHNTO.js} +5 -5
- package/dist/{chunk-MKHVLDMN.js → chunk-MYJJNLT2.js} +2 -2
- package/dist/{chunk-WUT3PO33.js → chunk-NAGF5ZJ2.js} +8 -8
- package/dist/{chunk-ZBMVOMFG.js → chunk-NMUEUDTT.js} +1 -1
- package/dist/{chunk-MNU5N3CQ.js → chunk-OSYULPJO.js} +23 -12
- package/dist/{chunk-SQL5YXUH.js → chunk-OXDKZYBO.js} +1 -1
- package/dist/chunk-OYIN77HO.js +72 -0
- package/dist/{chunk-KKPT7ROP.js → chunk-P6W2V2AP.js} +2 -2
- package/dist/{chunk-G3VSMI7K.js → chunk-Q3JW44JV.js} +2 -2
- package/dist/{chunk-K2SKUBYY.js → chunk-Q6POCQOV.js} +12 -12
- package/dist/{chunk-IIN26HL7.js → chunk-Q767Y4LY.js} +1 -1
- package/dist/{chunk-GURIOZE7.js → chunk-QGKFDSEO.js} +8 -8
- package/dist/{chunk-YNCVSKUW.js → chunk-RZGR4G5G.js} +5 -5
- package/dist/{chunk-2LGDEPVL.js → chunk-RZJHCHEA.js} +6 -6
- package/dist/{chunk-ZJZNT2G5.js → chunk-T274HRSR.js} +4 -4
- package/dist/chunk-T2CR5REM.js +176 -0
- package/dist/{chunk-A2H256WR.js → chunk-T3TVMMXJ.js} +1 -1
- package/dist/{chunk-NTMKJRQ3.js → chunk-TZ7CBPCD.js} +2 -2
- package/dist/{chunk-S7HGPKCL.js → chunk-UGPNLU4O.js} +1 -1
- package/dist/{chunk-DZIZ3XFL.js → chunk-UR55VBLY.js} +2 -2
- package/dist/{chunk-PY6CM4NK.js → chunk-WLKW2TF7.js} +19 -12
- package/dist/{chunk-63WX5KZN.js → chunk-WNV3X2VU.js} +3 -3
- package/dist/{chunk-WOSO4YFQ.js → chunk-XQOBM3E6.js} +3 -3
- package/dist/{chunk-RWLNTZK5.js → chunk-YICO6HEW.js} +5 -5
- package/dist/{chunk-FO3MDD26.js → chunk-YM2T76UM.js} +27 -0
- package/dist/chunk-YOVJOHM5.js +36 -0
- package/dist/{chunk-IDLOJIIS.js → chunk-ZKAQWXGO.js} +1 -1
- package/dist/{codex-app-cards-switch-F7WQ7Y3I.js → codex-app-cards-switch-GN65VEKM.js} +11 -11
- package/dist/{codex-card-routing-EVL5L36G.js → codex-card-routing-JTS75442.js} +2 -2
- package/dist/{codex-desktop-launch-PL6Z2ELZ.js → codex-desktop-launch-AQ2HSOQJ.js} +1 -1
- package/dist/{codex-session-launch-7NQEAUDU.js → codex-session-launch-QYZZGVSQ.js} +20 -20
- package/dist/{config-KFFD4VWH.js → config-5ATI6KPI.js} +3 -3
- package/dist/{global-upgrade-L3CY6EFF.js → global-upgrade-K4HWVUMI.js} +9 -9
- package/dist/{identity-DPYYIMHL.js → identity-V2GZCPJV.js} +4 -4
- package/dist/{live-capabilities-QJEXK6GH.js → live-capabilities-PD62FO4K.js} +4 -4
- package/dist/{paths-PEF6C64P.js → paths-WPJEIHUE.js} +7 -3
- package/dist/{reapply-7APCQRRK.js → reapply-ZEWMGDXT.js} +30 -29
- package/dist/src/index.js +34 -34
- package/dist/{upgrade-lock-A7OKXMRW.js → upgrade-lock-7OR6V323.js} +4 -4
- package/dist/{usage-HSS33762.js → usage-GWZ3UGZG.js} +3 -3
- package/package.json +1 -1
- package/dist/chunk-D3UFDCTQ.js +0 -87
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ensureCodexTrustsPusharyHooks
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-5II3USXS.js";
|
|
4
4
|
import {
|
|
5
5
|
hermesReceiptPaths,
|
|
6
6
|
hermesSetupPredatesThePluginFolder,
|
|
7
7
|
installHermesPlugin,
|
|
8
|
+
openClawFilesNow,
|
|
8
9
|
refreshHermesPluginFiles,
|
|
10
|
+
refreshOpenClawPlugin,
|
|
9
11
|
shippedHermesPlugin
|
|
10
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-ISM6XF3V.js";
|
|
11
13
|
import {
|
|
12
14
|
fxIgnoresInstructionsFile,
|
|
13
15
|
fxInstructionsBody,
|
|
@@ -16,7 +18,7 @@ import {
|
|
|
16
18
|
macAppFxBridge,
|
|
17
19
|
refreshClineKey,
|
|
18
20
|
switchFxHttpEntryToBridge
|
|
19
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-RZGR4G5G.js";
|
|
20
22
|
import {
|
|
21
23
|
OPENCODE_HOOK_BINARY,
|
|
22
24
|
agentHookOwner,
|
|
@@ -28,16 +30,16 @@ import {
|
|
|
28
30
|
openCodePluginDir,
|
|
29
31
|
openCodeWired,
|
|
30
32
|
withOpenCodeAskRules
|
|
31
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-MI7GHNTO.js";
|
|
32
34
|
import {
|
|
33
35
|
detectClaudeVersion
|
|
34
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-UR55VBLY.js";
|
|
35
37
|
import {
|
|
36
38
|
addCompatibleHooks,
|
|
37
39
|
compatibleConfigFile,
|
|
38
40
|
compatibleInstructionsFile,
|
|
39
41
|
hasCompatibleHooks
|
|
40
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-2I6A34GJ.js";
|
|
41
43
|
import {
|
|
42
44
|
GEMINI_HOOK_BINARY,
|
|
43
45
|
addGeminiHooks,
|
|
@@ -49,10 +51,10 @@ import {
|
|
|
49
51
|
geminiWired,
|
|
50
52
|
hasGeminiHooks,
|
|
51
53
|
planHooks
|
|
52
|
-
} from "./chunk-
|
|
54
|
+
} from "./chunk-L6BTSIKF.js";
|
|
53
55
|
import {
|
|
54
56
|
KEY_FILE_MODE
|
|
55
|
-
} from "./chunk-
|
|
57
|
+
} from "./chunk-XQOBM3E6.js";
|
|
56
58
|
import {
|
|
57
59
|
CLAUDE_HOOK_BINARY,
|
|
58
60
|
CLAUDE_HOOK_EVENTS,
|
|
@@ -99,13 +101,13 @@ import {
|
|
|
99
101
|
renderAgentInstructions,
|
|
100
102
|
supportedClaudeEvents,
|
|
101
103
|
vscodePluginMcp
|
|
102
|
-
} from "./chunk-
|
|
104
|
+
} from "./chunk-GJV5RVUU.js";
|
|
103
105
|
import {
|
|
104
106
|
formatVersion,
|
|
105
107
|
hookCommandsUseBareNames,
|
|
106
108
|
resolveGlobalBinDir,
|
|
107
109
|
resolveGlobalBinary
|
|
108
|
-
} from "./chunk-
|
|
110
|
+
} from "./chunk-BU2J4P7P.js";
|
|
109
111
|
import {
|
|
110
112
|
readJsonSafe,
|
|
111
113
|
writeFileAtomic,
|
|
@@ -115,7 +117,7 @@ import {
|
|
|
115
117
|
HOOK_COMPATIBLE_PROFILES,
|
|
116
118
|
isCompatibleAgentType,
|
|
117
119
|
isRecord
|
|
118
|
-
} from "./chunk-
|
|
120
|
+
} from "./chunk-6JBX55K4.js";
|
|
119
121
|
|
|
120
122
|
// src/reapply.ts
|
|
121
123
|
import { dirname, join } from "path";
|
|
@@ -470,7 +472,8 @@ var SETUP_CHOICE_BY_REAPPLY_ID = {
|
|
|
470
472
|
opencode: "opencode",
|
|
471
473
|
fx: "fx",
|
|
472
474
|
cline: "cline",
|
|
473
|
-
hermes: "hermes"
|
|
475
|
+
hermes: "hermes",
|
|
476
|
+
openclaw: "openclaw"
|
|
474
477
|
};
|
|
475
478
|
var setupChoiceOf = (id) => isCompatibleAgentType(id) ? id : SETUP_CHOICE_BY_REAPPLY_ID[id];
|
|
476
479
|
var reapplyHookOwner = (id, appAvailable) => agentHookOwner(setupChoiceOf(id), appAvailable);
|
|
@@ -498,6 +501,13 @@ var reapplyHermesPlugin = async () => {
|
|
|
498
501
|
}
|
|
499
502
|
return HERMES_REFRESH_RESULTS[refreshHermesPluginFiles("cli", plugin)];
|
|
500
503
|
};
|
|
504
|
+
var OPENCLAW_REFRESH_RESULTS = {
|
|
505
|
+
refreshed: { configured: true, reapplied: true, hooks: false, mcp: false, pluginFiles: true },
|
|
506
|
+
current: { configured: true, reapplied: false, hooks: false, mcp: false },
|
|
507
|
+
not_set_up: { configured: false, reapplied: false, hooks: false, mcp: false },
|
|
508
|
+
failed: FAILED_REAPPLY
|
|
509
|
+
};
|
|
510
|
+
var reapplyOpenClawPlugin = async () => OPENCLAW_REFRESH_RESULTS[await refreshOpenClawPlugin({ files: openClawFilesNow() })];
|
|
501
511
|
var noInstructionBlock = () => null;
|
|
502
512
|
var reapplyAllAgents = async (apiKey, options = {}) => {
|
|
503
513
|
const appAvailable = (options.appAvailable ?? macAppBridgeAvailable)();
|
|
@@ -526,6 +536,7 @@ var reapplyAllAgents = async (apiKey, options = {}) => {
|
|
|
526
536
|
{ id: "fx", label: "fx", run: () => reapplyFxWiring(apiKey), instructions: fxInstructionTarget },
|
|
527
537
|
{ id: "cline", label: CLINE_LABEL, run: () => reapplyClineSettings(apiKey), instructions: clineInstructionTarget },
|
|
528
538
|
{ id: "hermes", label: "Hermes", run: reapplyHermesPlugin, instructions: noInstructionBlock },
|
|
539
|
+
{ id: "openclaw", label: "OpenClaw", run: reapplyOpenClawPlugin, instructions: noInstructionBlock },
|
|
529
540
|
...HOOK_COMPATIBLE_PROFILES.map((profile) => ({
|
|
530
541
|
id: profile.agentType,
|
|
531
542
|
label: profile.label,
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
// src/key-revocation.ts
|
|
2
|
+
var SELF_REVOKE_PATH = "/api/v1/server/keys/self/revoke";
|
|
3
|
+
var DEVICE_KEY_PATH = "/api/agent/device-key";
|
|
4
|
+
var FULL_ACCESS_ONLY_STATUS = 403;
|
|
5
|
+
var REVOKE_TIMEOUT_MS = 1e4;
|
|
6
|
+
var readRevokedCount = async (response) => {
|
|
7
|
+
try {
|
|
8
|
+
const body = await response.json();
|
|
9
|
+
const revoked = typeof body === "object" && body !== null && "revoked" in body ? body.revoked : void 0;
|
|
10
|
+
return typeof revoked === "number" && Number.isInteger(revoked) && revoked >= 0 ? revoked : null;
|
|
11
|
+
} catch {
|
|
12
|
+
return null;
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
var revokeAgentKey = async (apiKey, baseUrl, fetchImpl) => {
|
|
16
|
+
const response = await fetchImpl(`${baseUrl}${DEVICE_KEY_PATH}`, {
|
|
17
|
+
method: "DELETE",
|
|
18
|
+
headers: { Authorization: `Bearer ${apiKey}` },
|
|
19
|
+
signal: AbortSignal.timeout(REVOKE_TIMEOUT_MS)
|
|
20
|
+
});
|
|
21
|
+
if (!response.ok) return { kind: "refused", status: response.status };
|
|
22
|
+
const revoked = await readRevokedCount(response);
|
|
23
|
+
if (revoked === null) return { kind: "unconfirmed", status: response.status };
|
|
24
|
+
return revoked > 0 ? { kind: "revoked" } : { kind: "not_accepted" };
|
|
25
|
+
};
|
|
26
|
+
var revokeOwnKey = async (apiKey, baseUrl, fetchImpl = fetch) => {
|
|
27
|
+
try {
|
|
28
|
+
const response = await fetchImpl(`${baseUrl}${SELF_REVOKE_PATH}`, {
|
|
29
|
+
method: "POST",
|
|
30
|
+
headers: { Authorization: `Bearer ${apiKey}`, "Content-Type": "application/json" },
|
|
31
|
+
signal: AbortSignal.timeout(REVOKE_TIMEOUT_MS)
|
|
32
|
+
});
|
|
33
|
+
if (response.status === 401) return { kind: "not_accepted" };
|
|
34
|
+
if (response.status === FULL_ACCESS_ONLY_STATUS) return await revokeAgentKey(apiKey, baseUrl, fetchImpl);
|
|
35
|
+
if (!response.ok) return { kind: "refused", status: response.status };
|
|
36
|
+
return { kind: "revoked" };
|
|
37
|
+
} catch (err) {
|
|
38
|
+
return { kind: "unreachable", detail: err instanceof Error ? err.message : "network error" };
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
var REVOKE_DETAIL = {
|
|
42
|
+
revoked: "Revoked the key on pushary.com.",
|
|
43
|
+
not_accepted: "pushary.com had already stopped accepting the key.",
|
|
44
|
+
refused: "pushary.com refused to revoke the key",
|
|
45
|
+
unconfirmed: "pushary.com did not confirm the key was revoked",
|
|
46
|
+
unreachable: "Could not reach pushary.com to revoke the key"
|
|
47
|
+
};
|
|
48
|
+
var describeRevokeAttempt = (attempt) => {
|
|
49
|
+
if (attempt.kind === "refused" || attempt.kind === "unconfirmed") return `${REVOKE_DETAIL[attempt.kind]} (HTTP ${attempt.status}).`;
|
|
50
|
+
if (attempt.kind === "unreachable") return `${REVOKE_DETAIL.unreachable}: ${attempt.detail}`;
|
|
51
|
+
return REVOKE_DETAIL[attempt.kind];
|
|
52
|
+
};
|
|
53
|
+
var keyNoLongerAccepted = (attempt) => attempt.kind === "revoked" || attempt.kind === "not_accepted";
|
|
54
|
+
var keyValidityOf = (check) => {
|
|
55
|
+
switch (check.kind) {
|
|
56
|
+
case "ok":
|
|
57
|
+
case "locked":
|
|
58
|
+
return "valid";
|
|
59
|
+
case "rejected":
|
|
60
|
+
case "malformed":
|
|
61
|
+
return "invalid";
|
|
62
|
+
case "unreachable":
|
|
63
|
+
return "unknown";
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
export {
|
|
68
|
+
revokeOwnKey,
|
|
69
|
+
describeRevokeAttempt,
|
|
70
|
+
keyNoLongerAccepted,
|
|
71
|
+
keyValidityOf
|
|
72
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
pusharyDir
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-GJV5RVUU.js";
|
|
4
4
|
import {
|
|
5
5
|
readRegularJsonFile,
|
|
6
6
|
writeFileAtomic
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
serializeDeclinedAgents,
|
|
14
14
|
withDeclinedAgent,
|
|
15
15
|
withoutDeclinedAgent
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-6JBX55K4.js";
|
|
17
17
|
|
|
18
18
|
// src/declined-agents-file.ts
|
|
19
19
|
import { join } from "path";
|
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
keyPrefix,
|
|
5
5
|
readConfigFileKey,
|
|
6
6
|
readMacAppKeyPrefix
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-XQOBM3E6.js";
|
|
8
8
|
import {
|
|
9
9
|
NPX_LATEST_COMMAND
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-JDIKCM2N.js";
|
|
11
11
|
|
|
12
12
|
// src/key-signed-out.ts
|
|
13
13
|
var VERDICT_BY_CHECK = {
|
|
@@ -27,11 +27,11 @@ import {
|
|
|
27
27
|
toolResultErrorText,
|
|
28
28
|
transcriptTokensIn,
|
|
29
29
|
transcriptUsageRequest
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-D7ZWJYXB.js";
|
|
31
31
|
import {
|
|
32
32
|
branchFor,
|
|
33
33
|
repoKeyFor
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-BYVLAPCF.js";
|
|
35
35
|
import {
|
|
36
36
|
cancelQuestion,
|
|
37
37
|
clientErrorKindOf,
|
|
@@ -39,39 +39,39 @@ import {
|
|
|
39
39
|
reportClientError,
|
|
40
40
|
sendNotification,
|
|
41
41
|
waitForAnswer
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-FKGWP4MF.js";
|
|
43
43
|
import {
|
|
44
44
|
isRetryable,
|
|
45
45
|
withRetry
|
|
46
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-2QY2BD4T.js";
|
|
47
47
|
import {
|
|
48
48
|
RETRY_ACK,
|
|
49
49
|
readCommandAck,
|
|
50
50
|
refusedReceiptMessage
|
|
51
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-GGCUXNZN.js";
|
|
52
52
|
import {
|
|
53
53
|
fetchAsCredential
|
|
54
|
-
} from "./chunk-
|
|
54
|
+
} from "./chunk-UGPNLU4O.js";
|
|
55
55
|
import {
|
|
56
56
|
getMachineId
|
|
57
|
-
} from "./chunk-
|
|
57
|
+
} from "./chunk-CSNG5NQR.js";
|
|
58
58
|
import {
|
|
59
59
|
reportedInstallSource
|
|
60
|
-
} from "./chunk-
|
|
60
|
+
} from "./chunk-KXMIDDUN.js";
|
|
61
61
|
import {
|
|
62
62
|
IDLE_PROMPT_NOTIFICATION,
|
|
63
63
|
NOTIFICATION_PUSH_TYPES,
|
|
64
64
|
POSTTOOLUSE_MIRROR_ONLY_TOOLS,
|
|
65
65
|
claudeConfigDir
|
|
66
|
-
} from "./chunk-
|
|
66
|
+
} from "./chunk-GJV5RVUU.js";
|
|
67
67
|
import {
|
|
68
68
|
compareVersion,
|
|
69
69
|
parseVersion
|
|
70
|
-
} from "./chunk-
|
|
70
|
+
} from "./chunk-BU2J4P7P.js";
|
|
71
71
|
import {
|
|
72
72
|
getApiKey,
|
|
73
73
|
getBaseUrl
|
|
74
|
-
} from "./chunk-
|
|
74
|
+
} from "./chunk-3NMX4725.js";
|
|
75
75
|
import {
|
|
76
76
|
writeFileAtomic,
|
|
77
77
|
writeJsonAtomicDurable
|
|
@@ -100,7 +100,7 @@ import {
|
|
|
100
100
|
resolveAutoResolveOrigin,
|
|
101
101
|
resolvePolicy,
|
|
102
102
|
unansweredRefusalReason
|
|
103
|
-
} from "./chunk-
|
|
103
|
+
} from "./chunk-6JBX55K4.js";
|
|
104
104
|
|
|
105
105
|
// src/pending.ts
|
|
106
106
|
import { join } from "path";
|
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
import {
|
|
2
2
|
MANAGED_CLAUDE_SETTINGS_BY_PLATFORM
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-TZ7CBPCD.js";
|
|
4
4
|
import {
|
|
5
5
|
declinedAgentsFile,
|
|
6
6
|
readDeclinedAgents
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-P6W2V2AP.js";
|
|
8
8
|
import {
|
|
9
9
|
OPENCODE_HOOK_BINARY,
|
|
10
10
|
openCodeConfigDir,
|
|
11
11
|
openCodePluginArgv,
|
|
12
12
|
openCodePluginFile
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-MI7GHNTO.js";
|
|
14
14
|
import {
|
|
15
15
|
liveCursorGateCoverage
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-7WDEJTNX.js";
|
|
17
17
|
import {
|
|
18
18
|
compatibleConfigFile,
|
|
19
19
|
compatibleHookEvents,
|
|
20
20
|
grokHome,
|
|
21
21
|
parseConfigDocument
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-2I6A34GJ.js";
|
|
23
23
|
import {
|
|
24
24
|
DEFAULT_HOOKS_KEY_PATH,
|
|
25
25
|
GEMINI_HOOK_BINARY,
|
|
26
26
|
GEMINI_HOOK_EVENTS,
|
|
27
27
|
hooksAt
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-L6BTSIKF.js";
|
|
29
29
|
import {
|
|
30
30
|
CODEX_EARLIER_APPROVAL_MATCHERS,
|
|
31
31
|
CODEX_HOOK_BINARY,
|
|
@@ -53,7 +53,7 @@ import {
|
|
|
53
53
|
parseHookArgv,
|
|
54
54
|
parseHookCommand,
|
|
55
55
|
supportedClaudeEvents
|
|
56
|
-
} from "./chunk-
|
|
56
|
+
} from "./chunk-GJV5RVUU.js";
|
|
57
57
|
import {
|
|
58
58
|
readRegularJsonFile,
|
|
59
59
|
readRegularTextFile
|
|
@@ -67,7 +67,7 @@ import {
|
|
|
67
67
|
OPENCODE_APPROVAL_EVENT,
|
|
68
68
|
isRecord,
|
|
69
69
|
matcherMatchesEveryCall
|
|
70
|
-
} from "./chunk-
|
|
70
|
+
} from "./chunk-6JBX55K4.js";
|
|
71
71
|
|
|
72
72
|
// src/hook-wiring.ts
|
|
73
73
|
import { createHash } from "crypto";
|
|
@@ -4,13 +4,13 @@ import {
|
|
|
4
4
|
configFailureKind,
|
|
5
5
|
retryAgentCommand,
|
|
6
6
|
writeSetupConfigFile
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-FMAIUTVU.js";
|
|
8
8
|
import {
|
|
9
9
|
MCP_BRIDGE_BINARY
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-KDJIDRJS.js";
|
|
11
11
|
import {
|
|
12
12
|
KEY_FILE_MODE
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-XQOBM3E6.js";
|
|
14
14
|
import {
|
|
15
15
|
CLINE_SERVER_NAME_TAKEN,
|
|
16
16
|
CLINE_SETTINGS_REFUSALS,
|
|
@@ -32,10 +32,10 @@ import {
|
|
|
32
32
|
withClinePusharyServer,
|
|
33
33
|
withRefreshedClineKey,
|
|
34
34
|
withoutClinePusharyServer
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-GJV5RVUU.js";
|
|
36
36
|
import {
|
|
37
37
|
resolveGlobalBinary
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-BU2J4P7P.js";
|
|
39
39
|
import {
|
|
40
40
|
readJsonSafe,
|
|
41
41
|
writeFileAtomic,
|
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
forkFinishWithUpgradeLock,
|
|
4
4
|
installWithUpgradeLock,
|
|
5
5
|
releaseAutoUpdateLock
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-FWCECQTY.js";
|
|
7
7
|
import {
|
|
8
8
|
phoneStartIsRequired
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-ELRZO6A7.js";
|
|
10
10
|
import {
|
|
11
11
|
describeAutoUpdateCheck,
|
|
12
12
|
globalInstallLocation,
|
|
@@ -18,25 +18,25 @@ import {
|
|
|
18
18
|
readAutoUpdateState,
|
|
19
19
|
updateAutoUpdateState,
|
|
20
20
|
upgradeEntryFor
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-MYJJNLT2.js";
|
|
22
22
|
import {
|
|
23
23
|
autoUpdateLock,
|
|
24
24
|
autoUpdateLog,
|
|
25
25
|
autoUpdateState
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-GJV5RVUU.js";
|
|
27
27
|
import {
|
|
28
28
|
execNpm,
|
|
29
29
|
fetchLatestPublishedVersion,
|
|
30
30
|
npmErrorMessage,
|
|
31
31
|
readGlobalCliInstallAt,
|
|
32
32
|
readGlobalPrefix
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-BU2J4P7P.js";
|
|
34
34
|
import {
|
|
35
35
|
EXIT
|
|
36
36
|
} from "./chunk-BG4HHB7E.js";
|
|
37
37
|
import {
|
|
38
38
|
NPX_LATEST_COMMAND
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-JDIKCM2N.js";
|
|
40
40
|
import {
|
|
41
41
|
commandsPackage,
|
|
42
42
|
globalUpgradeEntry,
|
|
@@ -13,16 +13,16 @@ import {
|
|
|
13
13
|
} from "./chunk-G66WIAST.js";
|
|
14
14
|
import {
|
|
15
15
|
keyPrefix
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-XQOBM3E6.js";
|
|
17
17
|
import {
|
|
18
18
|
getBaseUrl
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-3NMX4725.js";
|
|
20
20
|
import {
|
|
21
21
|
NPX_LATEST_COMMAND
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-JDIKCM2N.js";
|
|
23
23
|
import {
|
|
24
24
|
isValidApiKey
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-6JBX55K4.js";
|
|
26
26
|
|
|
27
27
|
// src/cli/login-ui.ts
|
|
28
28
|
import { hostname } from "os";
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
import {
|
|
2
|
+
needsShell
|
|
3
|
+
} from "./chunk-H6CL3T2S.js";
|
|
4
|
+
import {
|
|
5
|
+
OPENCLAW_ENVIRONMENT_KEYS,
|
|
6
|
+
openClawEnvironmentOf,
|
|
7
|
+
openClawPathsFrom
|
|
8
|
+
} from "./chunk-GJV5RVUU.js";
|
|
9
|
+
import {
|
|
10
|
+
resolvePathBinary
|
|
11
|
+
} from "./chunk-BU2J4P7P.js";
|
|
12
|
+
import {
|
|
13
|
+
isRecord
|
|
14
|
+
} from "./chunk-6JBX55K4.js";
|
|
15
|
+
|
|
16
|
+
// src/openclaw/wiring-state.ts
|
|
17
|
+
var OPENCLAW_PLUGIN_ID = "pushary";
|
|
18
|
+
var OPENCLAW_PLUGIN_PACKAGE = "@pushary/openclaw";
|
|
19
|
+
var OPENCLAW_GATE_HOOK = "before_tool_call";
|
|
20
|
+
var OPENCLAW_NOT_FOUND_MARKER = "Plugin not found";
|
|
21
|
+
var OPENCLAW_MIN_VERSION = "2026.11.3";
|
|
22
|
+
var OPENCLAW_ENTRY_UNSET_MARKER = "Config path is valid but unset";
|
|
23
|
+
var LOADED_STATUS = "loaded";
|
|
24
|
+
var ERROR_STATUS = "error";
|
|
25
|
+
var stringOrNull = (value) => typeof value === "string" && value.length > 0 ? value : null;
|
|
26
|
+
var parsedJson = (text) => {
|
|
27
|
+
try {
|
|
28
|
+
return JSON.parse(text);
|
|
29
|
+
} catch {
|
|
30
|
+
return null;
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
var jsonObjectIn = (output) => {
|
|
34
|
+
const start = output.indexOf("{");
|
|
35
|
+
return start === -1 ? null : parsedJson(output.slice(start));
|
|
36
|
+
};
|
|
37
|
+
var typedHookNames = (value) => Array.isArray(value) ? value.flatMap((hook) => isRecord(hook) && typeof hook.name === "string" ? [hook.name] : []) : null;
|
|
38
|
+
var registersGateFrom = (document) => {
|
|
39
|
+
const names = typedHookNames(document.typedHooks);
|
|
40
|
+
return names === null ? null : names.includes(OPENCLAW_GATE_HOOK);
|
|
41
|
+
};
|
|
42
|
+
var openClawPluginFactsFrom = (reading) => {
|
|
43
|
+
if (reading.kind === "failed") {
|
|
44
|
+
return reading.output.includes(OPENCLAW_NOT_FOUND_MARKER) ? { kind: "not_installed" } : { kind: "unreadable" };
|
|
45
|
+
}
|
|
46
|
+
const document = jsonObjectIn(reading.stdout);
|
|
47
|
+
if (!isRecord(document) || !isRecord(document.plugin)) return { kind: "unreadable" };
|
|
48
|
+
const plugin = document.plugin;
|
|
49
|
+
if (typeof plugin.enabled !== "boolean") return { kind: "unreadable" };
|
|
50
|
+
return {
|
|
51
|
+
kind: "installed",
|
|
52
|
+
packageName: stringOrNull(plugin.packageName),
|
|
53
|
+
version: stringOrNull(plugin.version),
|
|
54
|
+
enabled: plugin.enabled,
|
|
55
|
+
status: stringOrNull(plugin.status),
|
|
56
|
+
registersGate: registersGateFrom(document)
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
var openClawEntryFrom = (reading) => {
|
|
60
|
+
if (reading.kind === "failed") {
|
|
61
|
+
return reading.output.includes(OPENCLAW_ENTRY_UNSET_MARKER) ? { kind: "absent" } : { kind: "unreadable" };
|
|
62
|
+
}
|
|
63
|
+
const text = reading.stdout.trim();
|
|
64
|
+
if (text.length === 0) return { kind: "unreadable" };
|
|
65
|
+
const value = parsedJson(text);
|
|
66
|
+
return value === null ? { kind: "unreadable" } : { kind: "present", value };
|
|
67
|
+
};
|
|
68
|
+
var openClawWiringState = (facts) => {
|
|
69
|
+
if (facts.kind !== "installed") return facts;
|
|
70
|
+
if (facts.packageName !== OPENCLAW_PLUGIN_PACKAGE) return { kind: "not_ours", packageName: facts.packageName };
|
|
71
|
+
if (!facts.enabled) return { kind: "disabled", version: facts.version };
|
|
72
|
+
if (facts.status === ERROR_STATUS || facts.registersGate === false) return { kind: "failed_to_load", version: facts.version };
|
|
73
|
+
return { kind: "wired", version: facts.version, gateVerified: facts.registersGate === true && facts.status === LOADED_STATUS };
|
|
74
|
+
};
|
|
75
|
+
var isOpenClawWired = (state) => state.kind === "wired";
|
|
76
|
+
var isOursToRemove = (facts) => facts.kind === "installed" && facts.packageName === OPENCLAW_PLUGIN_PACKAGE;
|
|
77
|
+
|
|
78
|
+
// src/openclaw/runtime.ts
|
|
79
|
+
import { execFile } from "child_process";
|
|
80
|
+
import { accessSync, constants, statSync } from "fs";
|
|
81
|
+
import { homedir } from "os";
|
|
82
|
+
import { join } from "path";
|
|
83
|
+
import { promisify } from "util";
|
|
84
|
+
var OPENCLAW_LAUNCHER_NAME = "openclaw";
|
|
85
|
+
var OPENCLAW_ENTRY_PATH = `plugins.entries.${OPENCLAW_PLUGIN_ID}`;
|
|
86
|
+
var OPENCLAW_PATH_NOT_FOUND = "Config path not found";
|
|
87
|
+
var OPENCLAW_INSPECT_TIMEOUT_MS = 6e4;
|
|
88
|
+
var OPENCLAW_CONFIG_TIMEOUT_MS = 6e4;
|
|
89
|
+
var OPENCLAW_ENABLE_TIMEOUT_MS = 12e4;
|
|
90
|
+
var OPENCLAW_INSTALL_TIMEOUT_MS = 6e5;
|
|
91
|
+
var OPENCLAW_OUTPUT_LIMIT_BYTES = 4 * 1024 * 1024;
|
|
92
|
+
var isExecutableFile = (path) => {
|
|
93
|
+
try {
|
|
94
|
+
accessSync(path, constants.X_OK);
|
|
95
|
+
return statSync(path).isFile();
|
|
96
|
+
} catch {
|
|
97
|
+
return false;
|
|
98
|
+
}
|
|
99
|
+
};
|
|
100
|
+
var currentOpenClawEnvironment = () => openClawEnvironmentOf(process.env);
|
|
101
|
+
var openClawPathsNow = (environment = currentOpenClawEnvironment()) => openClawPathsFrom(environment, homedir());
|
|
102
|
+
var openClawLauncherCandidates = (paths, userHome) => [
|
|
103
|
+
join(paths.home, ".openclaw", "bin", OPENCLAW_LAUNCHER_NAME),
|
|
104
|
+
join(userHome, ".local", "bin", OPENCLAW_LAUNCHER_NAME)
|
|
105
|
+
];
|
|
106
|
+
var findOpenClawLauncher = () => {
|
|
107
|
+
const onPath = resolvePathBinary(OPENCLAW_LAUNCHER_NAME);
|
|
108
|
+
if (onPath) return { path: onPath };
|
|
109
|
+
if (process.platform === "win32") return null;
|
|
110
|
+
const installed = openClawLauncherCandidates(openClawPathsNow(), homedir()).find(isExecutableFile);
|
|
111
|
+
return installed ? { path: installed } : null;
|
|
112
|
+
};
|
|
113
|
+
var quotedForWindowsShell = (argument) => `"${argument.replace(/"/g, '\\"')}"`;
|
|
114
|
+
var commandOutput = (error) => {
|
|
115
|
+
if (!isRecord(error)) return String(error);
|
|
116
|
+
return [error.stdout, error.stderr].map((part) => part === void 0 || part === null ? "" : String(part)).join("\n");
|
|
117
|
+
};
|
|
118
|
+
var stoppedAtTimeout = (error) => isRecord(error) && error.killed === true;
|
|
119
|
+
var runFileAsync = promisify(execFile);
|
|
120
|
+
var childEnvironment = (environment) => {
|
|
121
|
+
const inherited = { ...process.env };
|
|
122
|
+
for (const key of OPENCLAW_ENVIRONMENT_KEYS) delete inherited[key];
|
|
123
|
+
return { ...inherited, ...environment };
|
|
124
|
+
};
|
|
125
|
+
var runOpenClawCommand = async (session, args, timeoutMs) => {
|
|
126
|
+
const shell = needsShell(session.launcher.path);
|
|
127
|
+
try {
|
|
128
|
+
const running = runFileAsync(
|
|
129
|
+
shell ? quotedForWindowsShell(session.launcher.path) : session.launcher.path,
|
|
130
|
+
shell ? args.map(quotedForWindowsShell) : [...args],
|
|
131
|
+
{ encoding: "utf-8", timeout: timeoutMs, maxBuffer: OPENCLAW_OUTPUT_LIMIT_BYTES, shell, env: childEnvironment(session.environment) }
|
|
132
|
+
);
|
|
133
|
+
running.child.stdin?.end();
|
|
134
|
+
const { stdout } = await running;
|
|
135
|
+
return { kind: "ok", stdout };
|
|
136
|
+
} catch (error) {
|
|
137
|
+
return { kind: "failed", output: commandOutput(error), timedOut: stoppedAtTimeout(error) };
|
|
138
|
+
}
|
|
139
|
+
};
|
|
140
|
+
var inspectOpenClawPlugin = async (session, options) => {
|
|
141
|
+
const args = ["plugins", "inspect", OPENCLAW_PLUGIN_ID, ...options.runtime ? ["--runtime"] : [], "--json"];
|
|
142
|
+
const result = await runOpenClawCommand(session, args, OPENCLAW_INSPECT_TIMEOUT_MS);
|
|
143
|
+
return openClawPluginFactsFrom(result.kind === "ok" ? result : { kind: "failed", output: result.output });
|
|
144
|
+
};
|
|
145
|
+
var readOpenClawEntry = async (session) => {
|
|
146
|
+
const result = await runOpenClawCommand(session, ["config", "get", OPENCLAW_ENTRY_PATH, "--json"], OPENCLAW_CONFIG_TIMEOUT_MS);
|
|
147
|
+
return openClawEntryFrom(result.kind === "ok" ? result : { kind: "failed", output: result.output });
|
|
148
|
+
};
|
|
149
|
+
var writeOpenClawEntry = async (session, value) => (await runOpenClawCommand(session, ["config", "set", OPENCLAW_ENTRY_PATH, JSON.stringify(value), "--strict-json"], OPENCLAW_CONFIG_TIMEOUT_MS)).kind === "ok";
|
|
150
|
+
var unsetOpenClawEntry = async (session) => {
|
|
151
|
+
const result = await runOpenClawCommand(session, ["config", "unset", OPENCLAW_ENTRY_PATH], OPENCLAW_CONFIG_TIMEOUT_MS);
|
|
152
|
+
return result.kind === "ok" || result.output.includes(OPENCLAW_PATH_NOT_FOUND);
|
|
153
|
+
};
|
|
154
|
+
var installOpenClawPluginFrom = (session, folder) => runOpenClawCommand(session, ["plugins", "install", folder, "--force", "--accept-capabilities"], OPENCLAW_INSTALL_TIMEOUT_MS);
|
|
155
|
+
var enableOpenClawPlugin = (session) => runOpenClawCommand(session, ["plugins", "enable", OPENCLAW_PLUGIN_ID, "--accept-capabilities"], OPENCLAW_ENABLE_TIMEOUT_MS);
|
|
156
|
+
var uninstallOpenClawPlugin = (session, dryRun) => runOpenClawCommand(session, ["plugins", "uninstall", OPENCLAW_PLUGIN_ID, dryRun ? "--dry-run" : "--force"], OPENCLAW_ENABLE_TIMEOUT_MS);
|
|
157
|
+
|
|
158
|
+
export {
|
|
159
|
+
OPENCLAW_PLUGIN_ID,
|
|
160
|
+
OPENCLAW_PLUGIN_PACKAGE,
|
|
161
|
+
OPENCLAW_MIN_VERSION,
|
|
162
|
+
openClawWiringState,
|
|
163
|
+
isOpenClawWired,
|
|
164
|
+
isOursToRemove,
|
|
165
|
+
currentOpenClawEnvironment,
|
|
166
|
+
openClawPathsNow,
|
|
167
|
+
openClawLauncherCandidates,
|
|
168
|
+
findOpenClawLauncher,
|
|
169
|
+
inspectOpenClawPlugin,
|
|
170
|
+
readOpenClawEntry,
|
|
171
|
+
writeOpenClawEntry,
|
|
172
|
+
unsetOpenClawEntry,
|
|
173
|
+
installOpenClawPluginFrom,
|
|
174
|
+
enableOpenClawPlugin,
|
|
175
|
+
uninstallOpenClawPlugin
|
|
176
|
+
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
claudeConfigDir
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-GJV5RVUU.js";
|
|
4
4
|
import {
|
|
5
5
|
claudePermissionRulesFromSettings
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-6JBX55K4.js";
|
|
7
7
|
|
|
8
8
|
// src/claude-permission-rules.ts
|
|
9
9
|
import { readFileSync, statSync } from "fs";
|