@pushary/agent-hooks 1.9.145 → 1.9.148
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 +25 -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-H7H75ARS.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 +144 -106
- 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-6IWOMXUF.js → chunk-2VPRLAKF.js} +4 -4
- package/dist/{chunk-GK5X2ZTN.js → chunk-3AAQJ75F.js} +5 -5
- package/dist/{chunk-YNCVSKUW.js → chunk-3OPXQK4D.js} +5 -5
- package/dist/{chunk-ZORBUQFG.js → chunk-3T7RA7WJ.js} +2 -2
- package/dist/{chunk-PXZTCR4M.js → chunk-3WD3BEPB.js} +2 -2
- package/dist/{chunk-VTJ4WZOC.js → chunk-43NHQUCY.js} +24 -3
- package/dist/{chunk-S7HGPKCL.js → chunk-4L2IYNLC.js} +1 -1
- package/dist/{chunk-KFALRZIN.js → chunk-5IG3VPHT.js} +4 -4
- package/dist/{chunk-S3A4PCRR.js → chunk-5ZIYTFPW.js} +10 -10
- package/dist/{chunk-A2H256WR.js → chunk-6HO36P3A.js} +1 -1
- package/dist/{chunk-FCSPMSDC.js → chunk-6RYJ3XCD.js} +200 -59
- package/dist/{chunk-PY6CM4NK.js → chunk-6YX3VB5P.js} +19 -12
- package/dist/{chunk-BYKRAYGD.js → chunk-A3URJPYH.js} +1 -1
- package/dist/{chunk-KS3PNTRT.js → chunk-ABTQG6XU.js} +1 -1
- package/dist/{chunk-72LP4RPC.js → chunk-AQ7L2E2U.js} +98 -47
- package/dist/{chunk-FNAH3YJC.js → chunk-B6RTPP3X.js} +16 -16
- package/dist/{chunk-K2SKUBYY.js → chunk-BP5HLKR6.js} +12 -12
- package/dist/{chunk-4L5WPDTB.js → chunk-BPKB7BI4.js} +1 -1
- package/dist/{chunk-YRJZF5RG.js → chunk-CABBLJD5.js} +3 -3
- package/dist/{chunk-ZBMVOMFG.js → chunk-CAHULQIO.js} +1 -1
- package/dist/chunk-CBIS7IYQ.js +157 -0
- package/dist/{chunk-LJRPWUST.js → chunk-CDQOARIF.js} +3 -3
- package/dist/{chunk-ZSOCJHL7.js → chunk-CIRTRWHM.js} +309 -5
- package/dist/{chunk-NTMKJRQ3.js → chunk-CMTDMZPV.js} +2 -2
- package/dist/{chunk-WOSO4YFQ.js → chunk-CU5SYUMK.js} +3 -6
- package/dist/{chunk-L4OGTRVW.js → chunk-D3QT4S7U.js} +4 -4
- package/dist/{chunk-YU5XE6VC.js → chunk-DHCJDYBT.js} +8 -7
- package/dist/{chunk-2LGDEPVL.js → chunk-DLPI45DF.js} +6 -6
- package/dist/{chunk-ZJZNT2G5.js → chunk-ENRL4WFD.js} +4 -4
- package/dist/{chunk-6UK4K5RS.js → chunk-FQLS37AX.js} +1 -1
- package/dist/{chunk-B4JQIH5M.js → chunk-H6FFNTSR.js} +7 -7
- package/dist/{chunk-JKWUF776.js → chunk-HEOBF5H6.js} +3 -3
- package/dist/{chunk-MNU5N3CQ.js → chunk-JSZ6LKX5.js} +23 -12
- package/dist/{chunk-RO6EVL5C.js → chunk-JUEQUYAT.js} +2 -2
- package/dist/{chunk-GURIOZE7.js → chunk-KP6ERYOA.js} +8 -8
- package/dist/{chunk-QKTF7WS6.js → chunk-KWJJYZ3T.js} +4 -4
- package/dist/{chunk-EPWOARGR.js → chunk-KXNAB76Z.js} +16 -5
- package/dist/chunk-LC53HRZ6.js +36 -0
- package/dist/{chunk-52UXNCZG.js → chunk-M7HJZ7HO.js} +3 -3
- package/dist/{chunk-WMBWKPKJ.js → chunk-MT4GBXLM.js} +10 -74
- package/dist/{chunk-WPBWJMBZ.js → chunk-MUSINFEU.js} +5 -5
- package/dist/{chunk-LD4R2P6N.js → chunk-NHZV2H63.js} +1 -1
- package/dist/{chunk-USFZJAB4.js → chunk-NLED3JGR.js} +1 -1
- package/dist/{chunk-DZIZ3XFL.js → chunk-NRPQUU3D.js} +2 -2
- package/dist/{chunk-LQXUWXQP.js → chunk-O5ARO3JM.js} +33 -10
- package/dist/chunk-OYIN77HO.js +72 -0
- package/dist/{chunk-TJXJGMSP.js → chunk-PH3MVQCQ.js} +21 -11
- package/dist/{chunk-2ELNRGNX.js → chunk-PUTX5BBE.js} +7 -4
- package/dist/{chunk-R34RWVN2.js → chunk-PVBDITRS.js} +14 -5
- package/dist/{chunk-33BYPZ52.js → chunk-Q7GZKNMH.js} +1 -1
- package/dist/{chunk-7LTP2GHO.js → chunk-QSZYHL7Z.js} +2 -2
- package/dist/{chunk-CUR2DCZN.js → chunk-QTQRQZIU.js} +4 -4
- package/dist/{chunk-SQL5YXUH.js → chunk-R2JRRCZK.js} +1 -1
- package/dist/{chunk-4KDRT3OA.js → chunk-RMBY7JGO.js} +1 -1
- package/dist/{chunk-KKPT7ROP.js → chunk-RWTH5RYA.js} +2 -2
- package/dist/chunk-RYDDLS62.js +176 -0
- package/dist/{chunk-Q6P7G4NY.js → chunk-S3MEI2D2.js} +17 -5
- package/dist/{chunk-HOQH5CLZ.js → chunk-T3CMGGNW.js} +1 -1
- package/dist/{chunk-IIN26HL7.js → chunk-T4PX3DRF.js} +1 -1
- package/dist/{chunk-6LZ7MXHD.js → chunk-TXXAQRX4.js} +7 -5
- package/dist/{chunk-YZA3YBHX.js → chunk-UAHBSOO4.js} +2 -2
- package/dist/{chunk-LMU6NG2G.js → chunk-UFGFO7QB.js} +1 -1
- package/dist/{chunk-TRV3ETGY.js → chunk-UJUGFLVF.js} +5 -5
- package/dist/{chunk-IRPIMQ7U.js → chunk-UL2NNDKD.js} +3 -3
- package/dist/{chunk-BWREST4F.js → chunk-VPADWVYD.js} +1 -1
- package/dist/{chunk-5TWW7ZUL.js → chunk-VPMSV35B.js} +5 -5
- package/dist/{chunk-G3VSMI7K.js → chunk-WQEJCDMR.js} +2 -2
- package/dist/{chunk-JZT2LPRM.js → chunk-WQJ5NJ35.js} +1 -1
- package/dist/{chunk-63WX5KZN.js → chunk-X4OEGFOG.js} +3 -3
- package/dist/{chunk-RWLNTZK5.js → chunk-X4OQ5UMH.js} +5 -5
- package/dist/{chunk-MOC2DN42.js → chunk-XSBW6TUH.js} +2 -2
- package/dist/{chunk-WH4ODOCE.js → chunk-XZGQZDFP.js} +6 -6
- package/dist/{chunk-FO3MDD26.js → chunk-YM2T76UM.js} +27 -0
- package/dist/{chunk-WUT3PO33.js → chunk-YOP7LFHW.js} +8 -8
- package/dist/{chunk-KGFB2LEB.js → chunk-YTD7RV6F.js} +3 -3
- package/dist/{chunk-IDLOJIIS.js → chunk-YWSIN7IH.js} +1 -1
- package/dist/{chunk-MKHVLDMN.js → chunk-ZCB5SCYM.js} +2 -2
- package/dist/{chunk-OONMKLUF.js → chunk-ZOATPL53.js} +4 -4
- package/dist/{chunk-Y7INHH5G.js → chunk-ZX2O66NS.js} +3 -3
- package/dist/{codex-app-cards-switch-F7WQ7Y3I.js → codex-app-cards-switch-BCM547E6.js} +11 -11
- package/dist/{codex-card-routing-EVL5L36G.js → codex-card-routing-222EKZJR.js} +2 -2
- package/dist/{codex-desktop-launch-PL6Z2ELZ.js → codex-desktop-launch-6AFOLMZ7.js} +1 -1
- package/dist/{codex-session-launch-7NQEAUDU.js → codex-session-launch-4YJR4ZGN.js} +20 -20
- package/dist/{config-KFFD4VWH.js → config-GWNPGS47.js} +3 -3
- package/dist/{global-upgrade-L3CY6EFF.js → global-upgrade-VRF6OSSU.js} +9 -9
- package/dist/{identity-DPYYIMHL.js → identity-PQIM7R2N.js} +4 -4
- package/dist/{live-capabilities-QJEXK6GH.js → live-capabilities-G3LMKZUB.js} +4 -4
- package/dist/{paths-PEF6C64P.js → paths-TFGIP5PU.js} +7 -3
- package/dist/{reapply-7APCQRRK.js → reapply-3IRAI6JF.js} +30 -29
- package/dist/src/index.js +34 -34
- package/dist/{upgrade-lock-A7OKXMRW.js → upgrade-lock-2G7ANYYO.js} +6 -4
- package/dist/{usage-HSS33762.js → usage-K3EGYCSU.js} +3 -3
- package/package.json +1 -1
- package/dist/chunk-D3UFDCTQ.js +0 -87
|
@@ -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,19 +1,20 @@
|
|
|
1
1
|
import {
|
|
2
2
|
notificationAnswerStep
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-6YX3VB5P.js";
|
|
4
4
|
import {
|
|
5
5
|
canChangeApprovalSettings
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-UAHBSOO4.js";
|
|
7
7
|
import {
|
|
8
8
|
matchMacAccountStep,
|
|
9
9
|
retryAgentCommand
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-PUTX5BBE.js";
|
|
11
11
|
import {
|
|
12
12
|
EXIT
|
|
13
13
|
} from "./chunk-BG4HHB7E.js";
|
|
14
14
|
import {
|
|
15
|
-
NPX_LATEST_COMMAND
|
|
16
|
-
|
|
15
|
+
NPX_LATEST_COMMAND,
|
|
16
|
+
npmExecSetupCommandFor
|
|
17
|
+
} from "./chunk-TXXAQRX4.js";
|
|
17
18
|
|
|
18
19
|
// src/setup/closing.ts
|
|
19
20
|
var ACTIVITY_URL = "pushary.com/dashboard/agent/activity";
|
|
@@ -23,8 +24,10 @@ var sendAnotherTestLines = (appPlatforms) => {
|
|
|
23
24
|
const step = notificationAnswerStep(appPlatforms);
|
|
24
25
|
return step === null ? [CHECK_THE_NOTIFICATION_OPENED, SEND_ANOTHER_TEST] : [SEND_ANOTHER_TEST, step];
|
|
25
26
|
};
|
|
26
|
-
var TRANSCRIPT_SYNC_NOTICE = `Transcripts sync redacted and encrypted. Your phone can decrypt them
|
|
27
|
-
var PAIR_PHONE_APP_HINT = `${NPX_LATEST_COMMAND}
|
|
27
|
+
var TRANSCRIPT_SYNC_NOTICE = `Transcripts sync redacted and encrypted. Your phone can decrypt them. Pushary can open a session only for a documented legal request, and every opening is logged. Turn off: ${NPX_LATEST_COMMAND} transcripts off`;
|
|
28
|
+
var PAIR_PHONE_APP_HINT = `${NPX_LATEST_COMMAND} pair pair the Pushary app on your phone`;
|
|
29
|
+
var ALLOW_NOTIFICATIONS_HINT = `${NPX_LATEST_COMMAND} doctor --roundtrip after you allow notifications in the Pushary app`;
|
|
30
|
+
var unreachedPhoneHint = (facts) => facts.phoneAwaitsNotifications === true ? ALLOW_NOTIFICATIONS_HINT : PAIR_PHONE_APP_HINT;
|
|
28
31
|
var RESTART_AGENTS_LINE = "Restart any open agent sessions so they pick up Pushary.";
|
|
29
32
|
var TEAM_OFFER_URL = "https://pushary.com/teams?utm_source=cli&utm_medium=setup&utm_campaign=teams";
|
|
30
33
|
var PLANS_THAT_CAN_MOVE_UP_TO_TEAM = ["agent", "agent_pro"];
|
|
@@ -146,7 +149,7 @@ var nextSteps = (facts, reachable) => {
|
|
|
146
149
|
lines.push("pushary claude launch a managed Claude Code session");
|
|
147
150
|
}
|
|
148
151
|
if (!reachable) {
|
|
149
|
-
lines.push(
|
|
152
|
+
lines.push(unreachedPhoneHint(facts));
|
|
150
153
|
}
|
|
151
154
|
lines.push("pushary doctor re-check everything");
|
|
152
155
|
return lines;
|
|
@@ -157,7 +160,11 @@ var describeClosing = (facts) => {
|
|
|
157
160
|
return {
|
|
158
161
|
ok: false,
|
|
159
162
|
headline: "Setup failed.",
|
|
160
|
-
next: [
|
|
163
|
+
next: [
|
|
164
|
+
"No agent was set up. Your key is saved.",
|
|
165
|
+
...reachable ? ["Push works."] : [],
|
|
166
|
+
`Fix the problem above, then run setup again. To check this computer, run ${NPX_LATEST_COMMAND} doctor.`
|
|
167
|
+
],
|
|
161
168
|
exitCode: EXIT.FAILED,
|
|
162
169
|
reason: "configured-nothing"
|
|
163
170
|
};
|
|
@@ -260,8 +267,10 @@ var RETRY_AGENT_LABEL = "Retry just this agent:";
|
|
|
260
267
|
var INSTALL_NODE_STEP = "Install the current Node.js LTS, which includes npm, then run setup again.";
|
|
261
268
|
var NPM_PREFIX_STEP = "npm can't install globally here. Use nvm, or run: npm config set prefix ~/.npm-global, then run setup again.";
|
|
262
269
|
var NPM_FILE_IN_USE_STEP = "Close other terminals or editors that use Node, then run setup again.";
|
|
263
|
-
var nextStepFor = (failure) => {
|
|
270
|
+
var nextStepFor = (failure, releaseAgeRefusedAgents) => {
|
|
264
271
|
switch (failure.remedy) {
|
|
272
|
+
case "use-npm-policy":
|
|
273
|
+
return { kind: "use-npm-policy", instruction: `Your npm only installs releases older than its min-release-age. Run this instead: ${npmExecSetupCommandFor(process.platform, releaseAgeRefusedAgents)}` };
|
|
265
274
|
case "install-node":
|
|
266
275
|
return { kind: "install-node", instruction: INSTALL_NODE_STEP };
|
|
267
276
|
case "fix-npm-prefix":
|
|
@@ -276,8 +285,9 @@ var nextStepFor = (failure) => {
|
|
|
276
285
|
};
|
|
277
286
|
var describeAgentFailures = (failures, agentName) => failures.map((failure) => ({
|
|
278
287
|
summary: `${agentName(failure.agent)}: ${failure.detail}`,
|
|
279
|
-
next: nextStepFor(failure)
|
|
288
|
+
next: nextStepFor(failure, agentsRefusedForReleaseAge(failures))
|
|
280
289
|
}));
|
|
290
|
+
var agentsRefusedForReleaseAge = (failures) => failures.filter((failure) => failure.remedy === "use-npm-policy").map((failure) => failure.agent);
|
|
281
291
|
var agentFailureFollowUps = (failures) => [
|
|
282
292
|
...failures.some((failure) => failure.remedy === "install-node") ? ["install-node"] : [],
|
|
283
293
|
...failures.some((failure) => failure.remedy === "fix-npm-prefix") ? ["fix-npm-prefix"] : [],
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
NpmInstallError,
|
|
3
3
|
NpmMissingError,
|
|
4
|
-
NpmPermissionError
|
|
5
|
-
|
|
4
|
+
NpmPermissionError,
|
|
5
|
+
NpmReleaseAgeError
|
|
6
|
+
} from "./chunk-43NHQUCY.js";
|
|
6
7
|
import {
|
|
7
8
|
writeFileAtomic
|
|
8
9
|
} from "./chunk-TODDEIYG.js";
|
|
9
10
|
import {
|
|
10
11
|
NPX_LATEST_COMMAND
|
|
11
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-TXXAQRX4.js";
|
|
12
13
|
import {
|
|
13
14
|
readSetupAgentFailures
|
|
14
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-O5ARO3JM.js";
|
|
15
16
|
|
|
16
17
|
// src/setup/config-write.ts
|
|
17
18
|
var AgentConfigWriteError = class extends Error {
|
|
@@ -62,11 +63,13 @@ var NPM_PERMISSION_REMEDIES = {
|
|
|
62
63
|
"file-in-use": "close-node-programs"
|
|
63
64
|
};
|
|
64
65
|
var remedyForError = (error) => {
|
|
66
|
+
if (error instanceof NpmReleaseAgeError) return "use-npm-policy";
|
|
65
67
|
if (error instanceof NpmMissingError) return "install-node";
|
|
66
68
|
if (error instanceof NpmPermissionError) return NPM_PERMISSION_REMEDIES[error.kind];
|
|
67
69
|
return "retry-agent";
|
|
68
70
|
};
|
|
69
71
|
var setupFailureDiagnostic = (error) => {
|
|
72
|
+
if (error instanceof NpmReleaseAgeError) return { stage: "runtime-install", diagnosticCode: "npm-release-age" };
|
|
70
73
|
if (error instanceof AgentConfigError) return { stage: "config-read" };
|
|
71
74
|
if (error instanceof AgentConfigWriteError) return { stage: "config-write", diagnosticCode: "config-write-failed" };
|
|
72
75
|
if (error instanceof NpmMissingError) return { stage: "runtime-install", diagnosticCode: "npm-missing" };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
addGeminiMcpServer,
|
|
3
3
|
removeGeminiMcpServer
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-QTQRQZIU.js";
|
|
5
5
|
import {
|
|
6
6
|
CLAUDE_CODE_AGENT
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-BP5HLKR6.js";
|
|
8
8
|
import {
|
|
9
9
|
compatibleToolLookup
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-WQJ5NJ35.js";
|
|
11
11
|
import {
|
|
12
12
|
CLAUDE_HOOK_EVENTS,
|
|
13
13
|
PUSHARY_MCP_URL,
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
isPusharyHook,
|
|
20
20
|
registerHookEntry,
|
|
21
21
|
removeClaudeMcpServers
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-AQ7L2E2U.js";
|
|
23
23
|
import {
|
|
24
24
|
HOOK_COMPATIBLE_PROFILES,
|
|
25
25
|
PHONE_ANSWERED_TOOLS,
|
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
pusharyMissingReason,
|
|
31
31
|
refusalOutput,
|
|
32
32
|
withHookHoldBudget
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-O5ARO3JM.js";
|
|
34
34
|
|
|
35
35
|
// src/config-document.ts
|
|
36
36
|
import { parse, stringify } from "smol-toml";
|
|
@@ -74,6 +74,7 @@ var HOOK_FAILURE = {
|
|
|
74
74
|
variesByEvent: "varies_by_event",
|
|
75
75
|
refusedOnPosix: "refused_on_posix",
|
|
76
76
|
notVerifiableInThisRepo: "not_verifiable_in_this_repo",
|
|
77
|
+
hostBlocksTheCall: "host_blocks_the_call",
|
|
77
78
|
noHook: "no_hook"
|
|
78
79
|
};
|
|
79
80
|
var NO_HOOK_NOTHING_GATED = "Everything. There is no hook, so the agent only reaches a person when it chooses to call Pushary.";
|
|
@@ -157,6 +158,14 @@ var AGENT_ENFORCEMENT = {
|
|
|
157
158
|
gatedTools: [],
|
|
158
159
|
notGated: "Everything Hermes does not flag as a dangerous command, unless named in PUSHARY_GATE_TOOLS, which is empty by default. That list refuses on an error, while the approval transport hands back to Hermes."
|
|
159
160
|
},
|
|
161
|
+
openclaw: {
|
|
162
|
+
...HOOK_DECIDES_BEFORE_THE_CALL,
|
|
163
|
+
localPrompt: LOCAL_PROMPT.agentsOwnPrompt,
|
|
164
|
+
whenHookIsMissing: HOOK_FAILURE.agentsOwnApproval,
|
|
165
|
+
whenHookCrashes: HOOK_FAILURE.hostBlocksTheCall,
|
|
166
|
+
gatedTools: ["exec", "process", "plugins", "gateway", "openclaw", "automations", "terminal"],
|
|
167
|
+
notGated: "The read actions of process, plugins, gateway, openclaw, automations and terminal; write, edit and apply_patch outside the OpenClaw state directories, ~/.pushary, ~/.config/openclaw and the gateway service files, and inside the agent workspace except its hooks folder; and every other OpenClaw tool unless the plugin gatedTools setting names it, such as message or the file-transfer plugin file_write. Tools that an ACP session with approve-all or a CLI backend runs inside its own harness never reach before_tool_call."
|
|
168
|
+
},
|
|
160
169
|
qwen_code: COMPATIBLE_HOOK_AGENT,
|
|
161
170
|
codebuddy: COMPATIBLE_HOOK_AGENT,
|
|
162
171
|
qoder: COMPATIBLE_HOOK_AGENT,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
callDecisionStore,
|
|
3
3
|
identifyingToolInput
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-BP5HLKR6.js";
|
|
5
5
|
import {
|
|
6
6
|
canonicalJson
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-AQ7L2E2U.js";
|
|
8
8
|
|
|
9
9
|
// src/phone-approval.ts
|
|
10
10
|
import { createHash } from "crypto";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AGENT_CHOICES
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-CAHULQIO.js";
|
|
4
4
|
import {
|
|
5
5
|
BELL_HOOK_BINARY
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-R2JRRCZK.js";
|
|
7
7
|
import {
|
|
8
8
|
CLAUDE_HOOK_EVENTS,
|
|
9
9
|
CODEX_HOOK_EVENTS,
|
|
@@ -16,13 +16,13 @@ import {
|
|
|
16
16
|
isBridgeLocator,
|
|
17
17
|
isProtectedByScope,
|
|
18
18
|
registerHookEntry
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-AQ7L2E2U.js";
|
|
20
20
|
import {
|
|
21
21
|
CURSOR_GATE_EVENTS,
|
|
22
22
|
HOOK_BUDGETS,
|
|
23
23
|
HOOK_LOCATOR_BINARY,
|
|
24
24
|
hookCommandHoldBudget
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-O5ARO3JM.js";
|
|
26
26
|
|
|
27
27
|
// src/gemini-config.ts
|
|
28
28
|
var GEMINI_HOOK_BINARY = "pushary-gemini-hook";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
pusharyDir
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-AQ7L2E2U.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-O5ARO3JM.js";
|
|
17
17
|
|
|
18
18
|
// src/declined-agents-file.ts
|
|
19
19
|
import { join } from "path";
|
|
@@ -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-AQ7L2E2U.js";
|
|
9
|
+
import {
|
|
10
|
+
resolvePathBinary
|
|
11
|
+
} from "./chunk-43NHQUCY.js";
|
|
12
|
+
import {
|
|
13
|
+
isRecord
|
|
14
|
+
} from "./chunk-O5ARO3JM.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,20 +1,25 @@
|
|
|
1
|
+
import {
|
|
2
|
+
openClawLauncherCandidates
|
|
3
|
+
} from "./chunk-RYDDLS62.js";
|
|
1
4
|
import {
|
|
2
5
|
openCodeConfigDirFrom
|
|
3
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-3AAQJ75F.js";
|
|
4
7
|
import {
|
|
5
8
|
nativeClaudeInstallPath
|
|
6
9
|
} from "./chunk-CYTPQDQY.js";
|
|
7
10
|
import {
|
|
8
11
|
grokHome
|
|
9
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-PVBDITRS.js";
|
|
10
13
|
import {
|
|
11
14
|
claudeConfigDir,
|
|
12
15
|
clineDataDirectory,
|
|
13
|
-
codexHomeFrom
|
|
14
|
-
|
|
16
|
+
codexHomeFrom,
|
|
17
|
+
openClawEnvironmentOf,
|
|
18
|
+
openClawPathsFrom
|
|
19
|
+
} from "./chunk-AQ7L2E2U.js";
|
|
15
20
|
import {
|
|
16
21
|
HOOK_COMPATIBLE_PROFILES
|
|
17
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-O5ARO3JM.js";
|
|
18
23
|
|
|
19
24
|
// src/vscode-config.ts
|
|
20
25
|
import { homedir } from "os";
|
|
@@ -220,6 +225,11 @@ var agentProbes = (home = homedir2(), platform = process.platform) => ({
|
|
|
220
225
|
paths: [],
|
|
221
226
|
configMarkers: [join2(home, ".hermes")]
|
|
222
227
|
},
|
|
228
|
+
openclaw: {
|
|
229
|
+
binary: "openclaw",
|
|
230
|
+
paths: openClawLauncherCandidates(openClawPathsFrom(openClawEnvironmentOf(process.env), home), home),
|
|
231
|
+
configMarkers: [openClawPathsFrom(openClawEnvironmentOf(process.env), home).stateDirectory]
|
|
232
|
+
},
|
|
223
233
|
cursor: {
|
|
224
234
|
// GUI editor. `cursor` on PATH only exists if the user ran "Install 'cursor'
|
|
225
235
|
// command in PATH" from the command palette, which most never do.
|
|
@@ -277,6 +287,7 @@ var detectAllAgents = (deps = defaultDeps, home) => {
|
|
|
277
287
|
}));
|
|
278
288
|
};
|
|
279
289
|
var isDetected = (result) => result.kind === "installed";
|
|
290
|
+
var detectedAgentChoices = () => detectAllAgents().filter((entry) => isDetected(entry.result)).map((entry) => entry.agent);
|
|
280
291
|
var shortenHome = (path, home = homedir2()) => home && path.startsWith(home) ? `~${path.slice(home.length)}` : path;
|
|
281
292
|
var describeDetection = (result, home) => {
|
|
282
293
|
if (result.kind !== "installed") return null;
|
|
@@ -294,6 +305,7 @@ export {
|
|
|
294
305
|
agentProbes,
|
|
295
306
|
detectAllAgents,
|
|
296
307
|
isDetected,
|
|
308
|
+
detectedAgentChoices,
|
|
297
309
|
shortenHome,
|
|
298
310
|
describeDetection
|
|
299
311
|
};
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
DISCONNECT_AGENT_IDS,
|
|
3
3
|
SETUP_AGENT_CHOICES,
|
|
4
4
|
isApprovalMode
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-O5ARO3JM.js";
|
|
6
6
|
|
|
7
7
|
// src/cli/mode-request.ts
|
|
8
8
|
var parseDuration = (value) => {
|
|
@@ -35,6 +35,7 @@ var describeMode = (mode) => {
|
|
|
35
35
|
// src/cli/commands.ts
|
|
36
36
|
var npxLatestCommandFor = (platform) => `${platform === "win32" ? "npx.cmd" : "npx"} pushary@latest`;
|
|
37
37
|
var NPX_LATEST_COMMAND = npxLatestCommandFor(process.platform);
|
|
38
|
+
var npmExecSetupCommandFor = (platform, agents) => `${platform === "win32" ? "npm.cmd" : "npm"} exec --yes --package=pushary@latest -c "pushary setup --agents ${agents.join(",")}"`;
|
|
38
39
|
var COMMAND_LIST = [
|
|
39
40
|
{
|
|
40
41
|
name: "codex",
|
|
@@ -55,7 +56,7 @@ var COMMAND_LIST = [
|
|
|
55
56
|
{
|
|
56
57
|
name: "setup",
|
|
57
58
|
module: "pushary-setup",
|
|
58
|
-
summary: "Configure Claude Code, Codex, Gemini CLI, Hermes, Cursor, VS Code, OpenCode, or fx with Pushary"
|
|
59
|
+
summary: "Configure Claude Code, Codex, Gemini CLI, Hermes, OpenClaw, Cursor, VS Code, OpenCode, or fx with Pushary"
|
|
59
60
|
},
|
|
60
61
|
{
|
|
61
62
|
name: "claude",
|
|
@@ -95,7 +96,7 @@ var COMMAND_LIST = [
|
|
|
95
96
|
name: "pair",
|
|
96
97
|
module: "pushary-connect",
|
|
97
98
|
aliases: ["connect"],
|
|
98
|
-
summary: "Pair a phone without re-running setup
|
|
99
|
+
summary: "Pair a phone without re-running setup: the Pushary app, or --browser for web push (also: connect)"
|
|
99
100
|
},
|
|
100
101
|
{
|
|
101
102
|
name: "bell",
|
|
@@ -159,8 +160,8 @@ var COMMAND_OPTIONS = {
|
|
|
159
160
|
["--force", "Start a new sign-in instead of reusing the saved key"]
|
|
160
161
|
],
|
|
161
162
|
pair: [
|
|
162
|
-
["--app", "Pair
|
|
163
|
-
["--browser", "
|
|
163
|
+
["--app", "Pair the Pushary app (default)"],
|
|
164
|
+
["--browser", "Use browser web push instead of the app"]
|
|
164
165
|
],
|
|
165
166
|
cowork: [
|
|
166
167
|
["--open", "Also open the setup guide in your browser"],
|
|
@@ -316,6 +317,7 @@ export {
|
|
|
316
317
|
resolveModeInput,
|
|
317
318
|
describeMode,
|
|
318
319
|
NPX_LATEST_COMMAND,
|
|
320
|
+
npmExecSetupCommandFor,
|
|
319
321
|
LISTED_COMMANDS,
|
|
320
322
|
resolveCommandName,
|
|
321
323
|
isInvocationOf,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
absoluteUrl
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-CABBLJD5.js";
|
|
4
4
|
import {
|
|
5
5
|
KEY_SCOPE
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-O5ARO3JM.js";
|
|
7
7
|
|
|
8
8
|
// src/cli/approval-settings-pages.ts
|
|
9
9
|
var API_KEYS_PATH = "/dashboard/agent/settings";
|