pushary 1.9.276 → 1.9.277
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 +7 -0
- package/README.md +1 -0
- package/dist/{api-OLFIDMS7.js → api-JDJKIBJ2.js} +12 -12
- package/dist/bin/pushary-ask.d.ts +1 -0
- package/dist/bin/pushary-ask.js +303 -0
- package/dist/bin/pushary-audit.js +3 -3
- package/dist/bin/pushary-bell-hook.js +31 -30
- package/dist/bin/pushary-bell.js +11 -11
- package/dist/bin/pushary-calls.js +14 -14
- package/dist/bin/pushary-claude.js +42 -40
- package/dist/bin/pushary-clean.js +47 -46
- package/dist/bin/pushary-codex-bridge.js +23 -23
- package/dist/bin/pushary-codex-hook.js +37 -35
- package/dist/bin/pushary-codex-session.js +8 -8
- package/dist/bin/pushary-codex.js +17 -16
- package/dist/bin/pushary-connect.js +37 -36
- package/dist/bin/pushary-cowork.js +5 -5
- package/dist/bin/pushary-daemon.js +69 -68
- package/dist/bin/pushary-disconnect.js +33 -32
- package/dist/bin/pushary-display-hook.js +79 -48
- package/dist/bin/pushary-doctor.js +76 -75
- package/dist/bin/pushary-elicitation-hook.js +30 -28
- package/dist/bin/pushary-gemini-bridge.js +18 -18
- package/dist/bin/pushary-gemini-hook.js +34 -32
- package/dist/bin/pushary-hook.js +38 -37
- package/dist/bin/pushary-login.js +45 -44
- package/dist/bin/pushary-logout.js +33 -32
- package/dist/bin/pushary-mcp.js +14 -14
- package/dist/bin/pushary-mode.js +15 -15
- package/dist/bin/pushary-notification-hook.js +28 -27
- package/dist/bin/pushary-opencode-bridge.js +25 -25
- package/dist/bin/pushary-opencode-hook.js +48 -46
- package/dist/bin/pushary-permission-denied-hook.js +35 -34
- package/dist/bin/pushary-permission-hook.js +36 -35
- package/dist/bin/pushary-post-hook.js +29 -28
- package/dist/bin/pushary-prompt-hook.js +28 -27
- package/dist/bin/pushary-session-end-hook.js +31 -30
- package/dist/bin/pushary-session-start-hook.js +41 -40
- package/dist/bin/pushary-sessions.js +12 -12
- package/dist/bin/pushary-setup.js +94 -93
- package/dist/bin/pushary-stats.js +7 -7
- package/dist/bin/pushary-status.js +38 -37
- package/dist/bin/pushary-stop-hook.js +28 -27
- package/dist/bin/pushary-stopfailure-hook.js +28 -27
- package/dist/bin/pushary-suggestions.js +15 -15
- package/dist/bin/pushary-transcript-register.js +16 -16
- package/dist/bin/pushary-transcripts.js +27 -27
- package/dist/bin/pushary-upgrade.js +65 -64
- package/dist/bin/pushary-wait.js +16 -16
- package/dist/bin/pushary.js +8 -7
- package/dist/{chunk-LP7DPO3E.js → chunk-22OYSTAN.js} +1 -1
- package/dist/{chunk-YN4YRZNF.js → chunk-2BW7GNNB.js} +2 -2
- package/dist/{chunk-ZW2BWWIP.js → chunk-2XAZO2Q3.js} +2 -2
- package/dist/{chunk-GXXZLEHJ.js → chunk-33IU43ZR.js} +7 -7
- package/dist/{chunk-FDJ74WHC.js → chunk-3CNXRECH.js} +4 -4
- package/dist/{chunk-D6BE2O76.js → chunk-3HKTW7AH.js} +2 -2
- package/dist/{chunk-RLDWWF4R.js → chunk-4IX2PONM.js} +1 -1
- package/dist/{chunk-ESHKK3NZ.js → chunk-5VAI3RDO.js} +4 -4
- package/dist/{chunk-N6YV7ZYB.js → chunk-5XVPGNE5.js} +6 -6
- package/dist/{chunk-DTJ654CO.js → chunk-5ZX57DNR.js} +2 -2
- package/dist/{chunk-6IEGHLAQ.js → chunk-63J4TOMV.js} +4 -4
- package/dist/{chunk-M4G55A3C.js → chunk-6RSP2BY4.js} +3 -3
- package/dist/{chunk-FTWDXWIC.js → chunk-6X7GXEBI.js} +15 -4
- package/dist/{chunk-4TZE23IY.js → chunk-72CPOGDP.js} +3 -3
- package/dist/{chunk-PJ2MCXPU.js → chunk-76XC2ICT.js} +18 -19
- package/dist/{chunk-YWSNBQFN.js → chunk-7AMWTZTL.js} +5 -5
- package/dist/{chunk-ACOOCU2C.js → chunk-7RLMFVUZ.js} +2 -2
- package/dist/{chunk-3XNTOZSO.js → chunk-A7PIULSY.js} +1 -1
- package/dist/{chunk-ZCSQCI3V.js → chunk-AECDNNRM.js} +1 -1
- package/dist/{chunk-6ILWJR5J.js → chunk-B5565Y33.js} +1 -1
- package/dist/{chunk-5MD7VE6J.js → chunk-B6RL3XXW.js} +3 -3
- package/dist/{chunk-GXJ5WI6B.js → chunk-BAYA2H6O.js} +7 -7
- package/dist/{chunk-UMW3HCWQ.js → chunk-C3E5KDBH.js} +10 -10
- package/dist/{chunk-X6HX2UHZ.js → chunk-CB2NT2J5.js} +1 -1
- package/dist/{chunk-OAZ7WMAU.js → chunk-CUXMOQDW.js} +3 -3
- package/dist/{chunk-5PB5PLYU.js → chunk-DFNJBEFV.js} +10 -10
- package/dist/{chunk-DFEGXN5S.js → chunk-DIQKY76N.js} +1 -1
- package/dist/{chunk-EWT4JVQ6.js → chunk-DISRB3NE.js} +1 -1
- package/dist/{chunk-CREEYGND.js → chunk-DMMIXJKD.js} +12 -12
- package/dist/{chunk-S3H2J5PJ.js → chunk-DWM7BYVK.js} +1 -1
- package/dist/{chunk-KS2H54MK.js → chunk-EEC52E5K.js} +1 -1
- package/dist/{chunk-HF47DPMN.js → chunk-ETZUDUCB.js} +1 -1
- package/dist/{chunk-SCWBZEDN.js → chunk-FGIJ46DR.js} +5 -5
- package/dist/{chunk-DXY77UVL.js → chunk-FSJVDHQ5.js} +14 -14
- package/dist/{chunk-QU5K42CD.js → chunk-GJQJHWQ4.js} +2 -2
- package/dist/{chunk-V54U7EAG.js → chunk-GP7Q2DCX.js} +4 -4
- package/dist/{chunk-ZMVHJCM2.js → chunk-GQDJPX3J.js} +1 -1
- package/dist/{chunk-YIWLOD3H.js → chunk-GUL5YSME.js} +5 -5
- package/dist/{chunk-M23WDLIC.js → chunk-HMUSFFEH.js} +3 -3
- package/dist/{chunk-4YHQYYTJ.js → chunk-HQSTVSDO.js} +169 -74
- package/dist/{chunk-TGS5T7AD.js → chunk-I4A6CL5Q.js} +6 -6
- package/dist/{chunk-YABFR43V.js → chunk-I5I5PXQL.js} +10 -10
- package/dist/{chunk-ZMMCHRJF.js → chunk-ISPN73NA.js} +5 -5
- package/dist/{chunk-HYHA7TQV.js → chunk-J2N3BNNE.js} +1 -1
- package/dist/{chunk-5YKEUZCZ.js → chunk-JHJPAG6R.js} +6 -6
- package/dist/{chunk-ZM3LMIDN.js → chunk-JNPWASVJ.js} +11 -1
- package/dist/{chunk-FI4ZDYXT.js → chunk-K5JEB3I4.js} +8 -8
- package/dist/{chunk-52T655NA.js → chunk-K5LHDTYS.js} +1 -1
- package/dist/{chunk-6ZYEZF6R.js → chunk-KKEX5FAB.js} +8 -8
- package/dist/{chunk-YNDJIBLB.js → chunk-KO2QJNTA.js} +1 -1
- package/dist/{chunk-JOWPUJPT.js → chunk-LO2LCXNB.js} +5 -5
- package/dist/{chunk-46NACONX.js → chunk-MGV6KJJF.js} +1 -1
- package/dist/{chunk-EA7G2WD3.js → chunk-MOMA4DD4.js} +1 -1
- package/dist/{chunk-2JZM72KC.js → chunk-MZJIL5CA.js} +5 -5
- package/dist/{chunk-OK5XINZK.js → chunk-NDDIA2YJ.js} +7 -7
- package/dist/{chunk-6BSQQQPF.js → chunk-NLJUHVZJ.js} +3 -3
- package/dist/{chunk-5CIJT5EW.js → chunk-OIRKU5GW.js} +4 -4
- package/dist/{chunk-SBULIKB5.js → chunk-OMHFKENS.js} +6 -6
- package/dist/{chunk-WXYSJULN.js → chunk-QHSJVHNC.js} +4 -4
- package/dist/{chunk-E6DLZK6F.js → chunk-QNMJJMZF.js} +4 -4
- package/dist/{chunk-CK2XAWUK.js → chunk-QUU74XFH.js} +3 -3
- package/dist/{chunk-QMFJHEHJ.js → chunk-R5FAM3I6.js} +1 -1
- package/dist/{chunk-TRNII2FW.js → chunk-R7VMXE6A.js} +1 -1
- package/dist/{chunk-WGN5Z3WG.js → chunk-SMI5X7BO.js} +1 -1
- package/dist/{chunk-U43TDW57.js → chunk-TSKDJNC5.js} +1 -1
- package/dist/{chunk-UIVL7CLE.js → chunk-UCX7X333.js} +1 -1
- package/dist/{chunk-HYLZSXGI.js → chunk-UXB54PYF.js} +29 -22
- package/dist/{chunk-RVEJ2HQO.js → chunk-WCTHF35Z.js} +3 -3
- package/dist/{chunk-KMCKHX4S.js → chunk-WFDFDUHU.js} +2 -2
- package/dist/{chunk-CABA3Y5F.js → chunk-WG4Y6DJD.js} +24 -11
- package/dist/{chunk-DHLVNUDU.js → chunk-WJALXH6I.js} +1 -1
- package/dist/{chunk-NDE2U7MH.js → chunk-WTPNWUEQ.js} +3 -3
- package/dist/{chunk-EL3X6A4S.js → chunk-WXXAFKZE.js} +2 -2
- package/dist/{chunk-BZCSYGXX.js → chunk-WY6VFXYH.js} +22 -20
- package/dist/{chunk-KFSWRHKU.js → chunk-XHEF2MQZ.js} +2 -2
- package/dist/{chunk-37U5RQKQ.js → chunk-XOALU2TA.js} +4 -4
- package/dist/{chunk-SNPJ6XXM.js → chunk-XUIQOGUN.js} +3 -3
- package/dist/{chunk-YXDPRTVM.js → chunk-YAV677T2.js} +4 -4
- package/dist/{chunk-DQ4JAE76.js → chunk-YBTS5ZR3.js} +6 -2
- package/dist/{chunk-7QBTDXGQ.js → chunk-YPTRRRD3.js} +1 -1
- package/dist/{chunk-HGNBFVY5.js → chunk-YSDITWDH.js} +4 -4
- package/dist/chunk-Z25VDYAL.js +6 -0
- package/dist/{chunk-I5L4QXWJ.js → chunk-Z5H2XKMF.js} +2 -2
- package/dist/{codex-app-cards-switch-5LUDTLSJ.js → codex-app-cards-switch-YN66WO7X.js} +12 -12
- package/dist/{codex-card-routing-3KMBEQOC.js → codex-card-routing-QXVDJGWF.js} +2 -2
- package/dist/{codex-desktop-launch-AJWF2S4W.js → codex-desktop-launch-XFRDRYXQ.js} +3 -3
- package/dist/{codex-session-launch-VSXLEJVF.js → codex-session-launch-W3SUQJMA.js} +22 -22
- package/dist/{config-YXLVQ5T7.js → config-EGAARNM4.js} +9 -3
- package/dist/{global-upgrade-KHCU2JYT.js → global-upgrade-KKCSLSUA.js} +9 -9
- package/dist/{identity-CGMWCMVP.js → identity-P35TDUOJ.js} +4 -4
- package/dist/{live-capabilities-NLUOLMSU.js → live-capabilities-6NS5JAL4.js} +4 -4
- package/dist/{paths-KDPFVDE5.js → paths-FCBX57O2.js} +3 -3
- package/dist/{reapply-7ALGSM56.js → reapply-KASKVOYN.js} +36 -35
- package/dist/src/index.d.ts +14 -3
- package/dist/src/index.js +34 -33
- package/dist/{upgrade-lock-CRYW2DXA.js → upgrade-lock-HOMFI7KP.js} +4 -4
- package/dist/{usage-Q3DQZVW2.js → usage-MAE6ZECN.js} +3 -3
- package/package.json +2 -1
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
quoteIfNeeded,
|
|
7
7
|
shellDoubleQuoted
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-QNMJJMZF.js";
|
|
9
9
|
import {
|
|
10
10
|
writeFileAtomic
|
|
11
11
|
} from "./chunk-PM2NRK6Y.js";
|
|
@@ -23,8 +23,9 @@ import {
|
|
|
23
23
|
PUSHARY_CONNECTOR_TOOL_PREFIXES,
|
|
24
24
|
PUSHARY_HOSTS,
|
|
25
25
|
PUSHARY_TOOL_PREFIX,
|
|
26
|
+
isRecord,
|
|
26
27
|
withHookHoldBudget
|
|
27
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-YBTS5ZR3.js";
|
|
28
29
|
|
|
29
30
|
// src/setup/paths.ts
|
|
30
31
|
import { createHash as createHash2 } from "crypto";
|
|
@@ -36,13 +37,103 @@ var claudeConfigDir = (home = homedir(), environment = { CLAUDE_CONFIG_DIR: proc
|
|
|
36
37
|
var claudeUserConfigFile = (home = homedir(), environment = { CLAUDE_CONFIG_DIR: process.env.CLAUDE_CONFIG_DIR }) => join(environment.CLAUDE_CONFIG_DIR ? claudeConfigDir(home, environment) : home, ".claude.json");
|
|
37
38
|
|
|
38
39
|
// src/setup/paths.ts
|
|
39
|
-
import { homedir as
|
|
40
|
-
import { join as
|
|
40
|
+
import { homedir as homedir5 } from "os";
|
|
41
|
+
import { join as join8 } from "path";
|
|
41
42
|
|
|
42
43
|
// src/codex-config.ts
|
|
43
44
|
import { createHash } from "crypto";
|
|
45
|
+
import { homedir as homedir3 } from "os";
|
|
46
|
+
import { join as join3 } from "path";
|
|
47
|
+
|
|
48
|
+
// src/mac-app-mcp.ts
|
|
49
|
+
import { spawn } from "child_process";
|
|
50
|
+
import { accessSync, constants } from "fs";
|
|
44
51
|
import { homedir as homedir2 } from "os";
|
|
45
52
|
import { join as join2 } from "path";
|
|
53
|
+
import { StringDecoder } from "string_decoder";
|
|
54
|
+
var macAppMcpCommand = () => join2(homedir2(), ".pushary", "bin", "pushary-mcp");
|
|
55
|
+
var macAppSignIn = () => {
|
|
56
|
+
const command = macAppMcpCommand();
|
|
57
|
+
try {
|
|
58
|
+
accessSync(command, constants.X_OK);
|
|
59
|
+
return { kind: "mac_app", command };
|
|
60
|
+
} catch {
|
|
61
|
+
return null;
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
var MacAppUnreachableError = class extends Error {
|
|
65
|
+
constructor(detail) {
|
|
66
|
+
super(`The Pushary Mac app did not answer: ${detail}`);
|
|
67
|
+
this.name = "MacAppUnreachableError";
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
var MacAppRefusedError = class extends Error {
|
|
71
|
+
status;
|
|
72
|
+
constructor(status, message) {
|
|
73
|
+
super(message);
|
|
74
|
+
this.name = "MacAppRefusedError";
|
|
75
|
+
this.status = status;
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
var UNAUTHENTICATED_STATUS = 401;
|
|
79
|
+
var SIGNED_OUT = /^Pushary (?:has no key for|rejected) this Mac/;
|
|
80
|
+
var HTTP_FAILURE = /^Pushary returned (\d{3})\b/;
|
|
81
|
+
var UNREACHABLE = /^Pushary (?:is unreachable|sent no response|MCP bridge is busy)/;
|
|
82
|
+
var MAX_COMPLAINT_LENGTH = 300;
|
|
83
|
+
var DEFAULT_TIMEOUT_MS = 9e4;
|
|
84
|
+
var macAppFailureOf = (message) => {
|
|
85
|
+
if (SIGNED_OUT.test(message)) return new MacAppRefusedError(UNAUTHENTICATED_STATUS, message);
|
|
86
|
+
const status = HTTP_FAILURE.exec(message)?.[1];
|
|
87
|
+
if (status) return new MacAppRefusedError(Number(status), message);
|
|
88
|
+
return UNREACHABLE.test(message) ? new MacAppUnreachableError(message) : new Error(message);
|
|
89
|
+
};
|
|
90
|
+
var replyCarrying = (line, id) => {
|
|
91
|
+
try {
|
|
92
|
+
const reply = JSON.parse(line);
|
|
93
|
+
return isRecord(reply) && reply.id === id ? reply : null;
|
|
94
|
+
} catch {
|
|
95
|
+
return null;
|
|
96
|
+
}
|
|
97
|
+
};
|
|
98
|
+
var onEachLine = (stream, use) => {
|
|
99
|
+
const decoder = new StringDecoder("utf8");
|
|
100
|
+
let unfinished = "";
|
|
101
|
+
stream.on("data", (chunk) => {
|
|
102
|
+
const lines = (unfinished + decoder.write(chunk)).split("\n");
|
|
103
|
+
unfinished = lines.pop() ?? "";
|
|
104
|
+
lines.forEach(use);
|
|
105
|
+
});
|
|
106
|
+
};
|
|
107
|
+
var boundedSignal = ({ timeoutMs = DEFAULT_TIMEOUT_MS, signal }) => signal ? AbortSignal.any([AbortSignal.timeout(timeoutMs), signal]) : AbortSignal.timeout(timeoutMs);
|
|
108
|
+
var abortError = (bounded, callers) => callers?.aborted ? callers.reason : new MacAppUnreachableError(bounded.reason instanceof Error ? bounded.reason.message : "it took too long");
|
|
109
|
+
var requestThroughMacApp = ({ command }, message, options = {}) => {
|
|
110
|
+
const bounded = boundedSignal(options);
|
|
111
|
+
if (bounded.aborted) return Promise.reject(abortError(bounded, options.signal));
|
|
112
|
+
return new Promise((resolve3, reject) => {
|
|
113
|
+
const relay = spawn(command, [], { stdio: ["pipe", "pipe", "pipe"], detached: true });
|
|
114
|
+
let complaint = "";
|
|
115
|
+
const settle = (finish) => {
|
|
116
|
+
bounded.removeEventListener("abort", onAbort);
|
|
117
|
+
relay.kill();
|
|
118
|
+
finish();
|
|
119
|
+
};
|
|
120
|
+
const onAbort = () => settle(() => reject(abortError(bounded, options.signal)));
|
|
121
|
+
bounded.addEventListener("abort", onAbort, { once: true });
|
|
122
|
+
relay.on("error", (error) => settle(() => reject(new MacAppUnreachableError(error.message))));
|
|
123
|
+
relay.stdin.on("error", (error) => settle(() => reject(new MacAppUnreachableError(error.message))));
|
|
124
|
+
relay.on("close", (code) => settle(() => reject(new MacAppUnreachableError(complaint || `it ended with code ${code ?? "none"}`))));
|
|
125
|
+
onEachLine(relay.stderr, (line) => {
|
|
126
|
+
complaint = line.trim().slice(0, MAX_COMPLAINT_LENGTH) || complaint;
|
|
127
|
+
});
|
|
128
|
+
onEachLine(relay.stdout, (line) => {
|
|
129
|
+
const reply = replyCarrying(line, message.id);
|
|
130
|
+
if (reply) settle(() => resolve3(reply));
|
|
131
|
+
});
|
|
132
|
+
relay.stdin.write(`${JSON.stringify(message)}
|
|
133
|
+
`);
|
|
134
|
+
});
|
|
135
|
+
};
|
|
136
|
+
var macAppReplyError = (reply) => isRecord(reply.error) ? macAppFailureOf(typeof reply.error.message === "string" ? reply.error.message : "Pushary MCP error") : null;
|
|
46
137
|
|
|
47
138
|
// src/hook-command.ts
|
|
48
139
|
var HOOK_SHELL = "/bin/sh -c";
|
|
@@ -235,13 +326,13 @@ var bearerKeyOf = (authorization) => typeof authorization === "string" && author
|
|
|
235
326
|
// src/codex-config.ts
|
|
236
327
|
var CODEX_HOOK_BINARY = "pushary-codex-hook";
|
|
237
328
|
var codexHookCommand = (resolvedBinary, platform = process.platform) => guardBinary(resolvedBinary ?? CODEX_HOOK_BINARY, platform, windowsNodeLauncherFor(platform));
|
|
238
|
-
var codexHome = () => codexHomeFrom(
|
|
239
|
-
var codexHomeFrom = (home) => process.env.CODEX_HOME?.trim() ||
|
|
240
|
-
var codexConfigToml = () =>
|
|
241
|
-
var codexHooksJsonIn = (home) =>
|
|
329
|
+
var codexHome = () => codexHomeFrom(homedir3());
|
|
330
|
+
var codexHomeFrom = (home) => process.env.CODEX_HOME?.trim() || join3(home, ".codex");
|
|
331
|
+
var codexConfigToml = () => join3(codexHome(), "config.toml");
|
|
332
|
+
var codexHooksJsonIn = (home) => join3(home, "hooks.json");
|
|
242
333
|
var codexHooksJson = () => codexHooksJsonIn(codexHome());
|
|
243
|
-
var codexAgentsMd = () =>
|
|
244
|
-
var codexSkillDir = () =>
|
|
334
|
+
var codexAgentsMd = () => join3(codexHome(), "AGENTS.md");
|
|
335
|
+
var codexSkillDir = () => join3(codexHome(), "skills", "pushary");
|
|
245
336
|
var CODEX_TOOL_CALL_MATCHER = "Bash|apply_patch|mcp__.*";
|
|
246
337
|
var CODEX_PRE_TOOL_USE_MATCHER = [CODEX_TOOL_CALL_MATCHER, ...CODEX_QUESTION_TOOLS].join("|");
|
|
247
338
|
var CODEX_HOOK_EVENTS = [
|
|
@@ -298,7 +389,6 @@ var CODEX_MCP_URL = "https://pushary.com/api/mcp/mcp";
|
|
|
298
389
|
var CODEX_HTTP_ONLY_FIELDS = ["url", "http_headers", "env_http_headers", "http_headers_helper", "bearer_token", "bearer_token_env_var", "auth", "oauth", "oauth_resource"];
|
|
299
390
|
var NATIVE_MCP_TRANSPORT_FIELDS = [...CODEX_HTTP_ONLY_FIELDS, "args", "env", "env_vars", "cwd"];
|
|
300
391
|
var OLD_CLI_HTTP_FIELDS = /* @__PURE__ */ new Set(["url", "http_headers"]);
|
|
301
|
-
var nativeCodexMcpCommand = () => join2(homedir2(), ".pushary", "bin", "pushary-mcp");
|
|
302
392
|
var isNativeCodexMcpEntry = (entry2, command) => {
|
|
303
393
|
const server = asRecord2(entry2);
|
|
304
394
|
return server?.command === command && NATIVE_MCP_TRANSPORT_FIELDS.every((field) => !(field in server));
|
|
@@ -323,7 +413,7 @@ var codexMcpStartsCommand = (config) => {
|
|
|
323
413
|
var addCodexMcpServer = (config, apiKey, nativeOwnership = "preserve") => {
|
|
324
414
|
const existing = asRecord2(asRecord2(config.mcp_servers)?.pushary);
|
|
325
415
|
if (existing !== void 0 && "command" in existing) {
|
|
326
|
-
const command =
|
|
416
|
+
const command = macAppMcpCommand();
|
|
327
417
|
if (!isOldCliMixedCodexMcpEntry(existing, command) && !isNativeCodexMcpEntry(existing, command)) {
|
|
328
418
|
throw new Error("Pushary MCP has an unrecognized or mixed transport. Its configuration was left unchanged.");
|
|
329
419
|
}
|
|
@@ -346,7 +436,7 @@ var readCodexMcpAuth = (config) => {
|
|
|
346
436
|
const pushary = asRecord2(asRecord2(config.mcp_servers)?.pushary);
|
|
347
437
|
if (!pushary) return void 0;
|
|
348
438
|
if ("command" in pushary) {
|
|
349
|
-
return isNativeCodexMcpEntry(pushary,
|
|
439
|
+
return isNativeCodexMcpEntry(pushary, macAppMcpCommand()) ? { method: "native" } : void 0;
|
|
350
440
|
}
|
|
351
441
|
const authorization = asRecord2(pushary.http_headers)?.Authorization;
|
|
352
442
|
if (typeof authorization === "string" && authorization.startsWith("Bearer ")) {
|
|
@@ -601,8 +691,8 @@ var staleTrustKeys = (state, hooksJsonPath, event, currentKey, ourHash) => {
|
|
|
601
691
|
// src/diagnostics/bridge.ts
|
|
602
692
|
import { execFileSync } from "child_process";
|
|
603
693
|
import { existsSync as existsSync2, readFileSync as readFileSync2 } from "fs";
|
|
604
|
-
import { homedir as
|
|
605
|
-
import { dirname, join as
|
|
694
|
+
import { homedir as homedir4 } from "os";
|
|
695
|
+
import { dirname, join as join4 } from "path";
|
|
606
696
|
var BRIDGE_BUNDLE_IDENTIFIER = "com.pushary.app";
|
|
607
697
|
var BRIDGE_HELPER_SUFFIX = "/Contents/Helpers/pushary-bridge";
|
|
608
698
|
var BRIDGE_BUNDLE_ROOTS = ["/Applications/Pushary.app", "$HOME/Applications/Pushary.app"];
|
|
@@ -612,7 +702,7 @@ var BRIDGE_STUB_RUNS_THE_HELPER = 'exec "$P$H"';
|
|
|
612
702
|
var expandHome = (path, home) => path.replaceAll("$HOME", home);
|
|
613
703
|
var parseBridgeStub = (contents, stubPath) => {
|
|
614
704
|
const helperSuffix = contents.match(/^H=(\S+)$/m)?.[1] ?? BRIDGE_HELPER_SUFFIX;
|
|
615
|
-
const cachePath = contents.match(/^C="([^"\n]+)"$/m)?.[1] ??
|
|
705
|
+
const cachePath = contents.match(/^C="([^"\n]+)"$/m)?.[1] ?? join4(dirname(stubPath), BRIDGE_CACHE_FILE);
|
|
616
706
|
const rootsLine = contents.match(/^for P in ((?:"[^"\n]*"\s*)+); do$/m)?.[1];
|
|
617
707
|
const bundleRoots = rootsLine ? [...rootsLine.matchAll(/"([^"]*)"/g)].map((match) => match[1]) : BRIDGE_BUNDLE_ROOTS;
|
|
618
708
|
const bundleIdentifier = contents.match(/kMDItemCFBundleIdentifier == "([^"]+)"/)?.[1] ?? BRIDGE_BUNDLE_IDENTIFIER;
|
|
@@ -687,14 +777,14 @@ var liveBridgeProbe = () => ({
|
|
|
687
777
|
exists: existsSync2,
|
|
688
778
|
readFile: readOrNull,
|
|
689
779
|
mdfind: spotlight,
|
|
690
|
-
home:
|
|
780
|
+
home: homedir4()
|
|
691
781
|
});
|
|
692
782
|
|
|
693
783
|
// src/cline-config.ts
|
|
694
|
-
import { join as
|
|
784
|
+
import { join as join6 } from "path";
|
|
695
785
|
|
|
696
786
|
// src/claude-config.ts
|
|
697
|
-
import { join as
|
|
787
|
+
import { join as join5, win32 as win322 } from "path";
|
|
698
788
|
|
|
699
789
|
// src/claude-tools.ts
|
|
700
790
|
var POSTTOOLUSE_MIRROR_ONLY_TOOLS = ["TodoWrite", "Task", "WebFetch", "WebSearch"];
|
|
@@ -973,7 +1063,7 @@ var addPusharyToolPermissions = (settings, rules = [PUSHARY_PERMISSION_RULE]) =>
|
|
|
973
1063
|
permissions.allow = filtered;
|
|
974
1064
|
};
|
|
975
1065
|
var addPusharyHooks = (settings, binDir, version = null) => {
|
|
976
|
-
const resolve3 = (name) => guardBinary(binDir ?
|
|
1066
|
+
const resolve3 = (name) => guardBinary(binDir ? join5(binDir, name) : name);
|
|
977
1067
|
const hooks = ensureRecord2(settings, "hooks");
|
|
978
1068
|
const supported = new Map(supportedClaudeEvents(version).map((hook) => [hook.event, hook]));
|
|
979
1069
|
for (const known of CLAUDE_HOOK_EVENTS) {
|
|
@@ -1028,7 +1118,7 @@ var removePusharySettings = (settings, scope) => {
|
|
|
1028
1118
|
};
|
|
1029
1119
|
|
|
1030
1120
|
// src/instruction-file.ts
|
|
1031
|
-
import { accessSync, constants, existsSync as existsSync3, readFileSync as readFileSync3, statSync, writeFileSync, mkdirSync, rmSync } from "fs";
|
|
1121
|
+
import { accessSync as accessSync2, constants as constants2, existsSync as existsSync3, readFileSync as readFileSync3, statSync, writeFileSync, mkdirSync, rmSync } from "fs";
|
|
1032
1122
|
import { dirname as dirname2 } from "path";
|
|
1033
1123
|
var PUSHARY_BEGIN = "<!-- BEGIN PUSHARY (managed by @pushary/agent-hooks; do not edit this block) -->";
|
|
1034
1124
|
var PUSHARY_END = "<!-- END PUSHARY -->";
|
|
@@ -1101,7 +1191,7 @@ var readUtf8 = (filePath) => {
|
|
|
1101
1191
|
};
|
|
1102
1192
|
var isWritable = (filePath) => {
|
|
1103
1193
|
try {
|
|
1104
|
-
|
|
1194
|
+
accessSync2(filePath, constants2.W_OK);
|
|
1105
1195
|
return true;
|
|
1106
1196
|
} catch {
|
|
1107
1197
|
return false;
|
|
@@ -1186,10 +1276,10 @@ var environmentValue = (environment, name) => {
|
|
|
1186
1276
|
const value = environment[name]?.trim();
|
|
1187
1277
|
return value ? value : void 0;
|
|
1188
1278
|
};
|
|
1189
|
-
var clineDirectory = (location) => environmentValue(location.environment, CLINE_DIR_ENV) ??
|
|
1190
|
-
var clineDataDirectory = (location) => environmentValue(location.environment, CLINE_DATA_DIR_ENV) ??
|
|
1191
|
-
var clineMcpSettingsPath = (location) => environmentValue(location.environment, CLINE_MCP_SETTINGS_PATH_ENV) ??
|
|
1192
|
-
var clineRulesFile = (location) =>
|
|
1279
|
+
var clineDirectory = (location) => environmentValue(location.environment, CLINE_DIR_ENV) ?? join6(location.home, CLINE_DIRECTORY_NAME);
|
|
1280
|
+
var clineDataDirectory = (location) => environmentValue(location.environment, CLINE_DATA_DIR_ENV) ?? join6(clineDirectory(location), CLINE_DATA_DIRECTORY_NAME);
|
|
1281
|
+
var clineMcpSettingsPath = (location) => environmentValue(location.environment, CLINE_MCP_SETTINGS_PATH_ENV) ?? join6(clineDataDirectory(location), CLINE_SETTINGS_DIRECTORY_NAME, CLINE_SETTINGS_FILE_NAME);
|
|
1282
|
+
var clineRulesFile = (location) => join6(clineDirectory(location), CLINE_RULES_DIRECTORY_NAME, CLINE_RULES_FILE_NAME);
|
|
1193
1283
|
var parsedJson = (text) => {
|
|
1194
1284
|
try {
|
|
1195
1285
|
return { ok: true, value: JSON.parse(text) };
|
|
@@ -1293,7 +1383,7 @@ var clineInstructionsBody = () => `${renderAgentInstructions(CLINE_LABEL)}
|
|
|
1293
1383
|
${CLINE_TOOL_NOTE}`;
|
|
1294
1384
|
|
|
1295
1385
|
// src/openclaw/openclaw-paths.ts
|
|
1296
|
-
import { join as
|
|
1386
|
+
import { join as join7, resolve as resolve2 } from "path";
|
|
1297
1387
|
var OPENCLAW_ENVIRONMENT_KEYS = ["OPENCLAW_HOME", "OPENCLAW_STATE_DIR", "OPENCLAW_CONFIG_PATH", "OPENCLAW_PROFILE"];
|
|
1298
1388
|
var STATE_DIRECTORY_NAME = ".openclaw";
|
|
1299
1389
|
var PUSHARY_DIRECTORY_NAME = ".pushary";
|
|
@@ -1319,70 +1409,75 @@ var pathSetting = (value, home) => {
|
|
|
1319
1409
|
};
|
|
1320
1410
|
var openClawPathsFrom = (environment, osHome) => {
|
|
1321
1411
|
const home = homeOf(environment, osHome);
|
|
1322
|
-
const stateDirectory = pathSetting(environment.OPENCLAW_STATE_DIR, home) ??
|
|
1412
|
+
const stateDirectory = pathSetting(environment.OPENCLAW_STATE_DIR, home) ?? join7(home, STATE_DIRECTORY_NAME);
|
|
1323
1413
|
return {
|
|
1324
1414
|
home,
|
|
1325
1415
|
stateDirectory,
|
|
1326
|
-
configFile: pathSetting(environment.OPENCLAW_CONFIG_PATH, home) ??
|
|
1327
|
-
environmentFile:
|
|
1416
|
+
configFile: pathSetting(environment.OPENCLAW_CONFIG_PATH, home) ?? join7(stateDirectory, CONFIG_FILE_NAME),
|
|
1417
|
+
environmentFile: join7(stateDirectory, ENVIRONMENT_FILE_NAME)
|
|
1328
1418
|
};
|
|
1329
1419
|
};
|
|
1330
|
-
var openClawDirectoriesToLookIn = (paths) => [.../* @__PURE__ */ new Set([paths.stateDirectory, paths.configFile,
|
|
1420
|
+
var openClawDirectoriesToLookIn = (paths) => [.../* @__PURE__ */ new Set([paths.stateDirectory, paths.configFile, join7(paths.home, STATE_DIRECTORY_NAME)])];
|
|
1331
1421
|
var openClawEnvironmentOf = (environment) => Object.fromEntries(OPENCLAW_ENVIRONMENT_KEYS.flatMap((key) => {
|
|
1332
1422
|
const value = environment[key];
|
|
1333
1423
|
return value === void 0 ? [] : [[key, value]];
|
|
1334
1424
|
}));
|
|
1335
|
-
var ownedPluginFolderIn = (osHome) =>
|
|
1425
|
+
var ownedPluginFolderIn = (osHome) => join7(osHome, PUSHARY_DIRECTORY_NAME, OWNED_PLUGIN_FOLDER_NAME);
|
|
1336
1426
|
|
|
1337
1427
|
// src/setup/paths.ts
|
|
1338
|
-
var claudeSettings = (environment = process.env) =>
|
|
1339
|
-
var claudeJson = (environment = process.env) => claudeUserConfigFile(
|
|
1340
|
-
var claudeSkillDir = (environment = process.env) =>
|
|
1341
|
-
var cursorPluginDir = () =>
|
|
1342
|
-
var cursorUserHooks = () =>
|
|
1343
|
-
var cursorPluginMcp = () =>
|
|
1344
|
-
var cursorPluginManifest = () =>
|
|
1345
|
-
var cursorPluginRule = () =>
|
|
1346
|
-
var cursorUserMcp = () =>
|
|
1347
|
-
var vscodePluginDir = () =>
|
|
1348
|
-
var vscodePluginMcp = () =>
|
|
1349
|
-
var claudeSettingsLocal = () =>
|
|
1350
|
-
var pusharyDir = () =>
|
|
1351
|
-
var bridgeStub = () =>
|
|
1352
|
-
var bridgeCache = () =>
|
|
1353
|
-
var claudeSetupDir = () => process.env.CLAUDE_CONFIG_DIR ?
|
|
1354
|
-
var claudeMcpReceipt = () =>
|
|
1355
|
-
var bridgeAgentKey = () =>
|
|
1356
|
-
var autoUpdateState = () =>
|
|
1357
|
-
var autoUpdateLock = () =>
|
|
1358
|
-
var serviceOwedBackMark = () =>
|
|
1359
|
-
var autoUpdateLog = () =>
|
|
1360
|
-
var clientReportClaims = () =>
|
|
1361
|
-
var claudeRegistrationReceipt = () =>
|
|
1362
|
-
var hermesConfig = () =>
|
|
1363
|
-
var hermesConfigReceipt = () =>
|
|
1364
|
-
var hermesSetupReceipt = () =>
|
|
1365
|
-
var openClawSetupReceiptDirectory = () =>
|
|
1366
|
-
var openClawPluginFolder = () => ownedPluginFolderIn(
|
|
1367
|
-
var hermesAppWiringRecord = () =>
|
|
1368
|
-
var fxQuestionRuleReceipt = () =>
|
|
1369
|
-
var hookTakeoverReceipt = (agent) =>
|
|
1370
|
-
var codexSkillDir2 = () =>
|
|
1371
|
-
var codexAgentsMd2 = () =>
|
|
1372
|
-
var geminiSettings = () =>
|
|
1373
|
-
var geminiMd = () =>
|
|
1374
|
-
var pusharyConfigFile = () =>
|
|
1375
|
-
var fxConfigDir = () =>
|
|
1376
|
-
var fxMcpProfile = () =>
|
|
1377
|
-
var fxSettings = () =>
|
|
1378
|
-
var fxAgentsMd = () =>
|
|
1379
|
-
var clineLocation = () => ({ home:
|
|
1428
|
+
var claudeSettings = (environment = process.env) => join8(claudeConfigDir(homedir5(), environment), "settings.json");
|
|
1429
|
+
var claudeJson = (environment = process.env) => claudeUserConfigFile(homedir5(), environment);
|
|
1430
|
+
var claudeSkillDir = (environment = process.env) => join8(claudeConfigDir(homedir5(), environment), "skills", "pushary");
|
|
1431
|
+
var cursorPluginDir = () => join8(homedir5(), ".cursor", "plugins", "local", "pushary");
|
|
1432
|
+
var cursorUserHooks = () => join8(homedir5(), ".cursor", "hooks.json");
|
|
1433
|
+
var cursorPluginMcp = () => join8(cursorPluginDir(), "mcp.json");
|
|
1434
|
+
var cursorPluginManifest = () => join8(cursorPluginDir(), ".cursor-plugin", "plugin.json");
|
|
1435
|
+
var cursorPluginRule = () => join8(cursorPluginDir(), "rules", "pushary.mdc");
|
|
1436
|
+
var cursorUserMcp = () => join8(homedir5(), ".cursor", "mcp.json");
|
|
1437
|
+
var vscodePluginDir = () => join8(homedir5(), ".pushary", "plugins", "vscode");
|
|
1438
|
+
var vscodePluginMcp = () => join8(vscodePluginDir(), ".mcp.json");
|
|
1439
|
+
var claudeSettingsLocal = () => join8(claudeConfigDir(), "settings.local.json");
|
|
1440
|
+
var pusharyDir = () => join8(homedir5(), ".pushary");
|
|
1441
|
+
var bridgeStub = () => join8(pusharyDir(), "bin", HOOK_LOCATOR_BINARY);
|
|
1442
|
+
var bridgeCache = () => join8(pusharyDir(), "bin", BRIDGE_CACHE_FILE);
|
|
1443
|
+
var claudeSetupDir = () => process.env.CLAUDE_CONFIG_DIR ? join8(pusharyDir(), "setup", "claude-profiles", createHash2("sha256").update(claudeUserConfigFile()).digest("hex").slice(0, 32)) : join8(pusharyDir(), "setup");
|
|
1444
|
+
var claudeMcpReceipt = () => join8(claudeSetupDir(), "claude-mcp.json");
|
|
1445
|
+
var bridgeAgentKey = () => join8(pusharyDir(), "bridge-auth", "agent-key.json");
|
|
1446
|
+
var autoUpdateState = () => join8(pusharyDir(), "auto-update.json");
|
|
1447
|
+
var autoUpdateLock = () => join8(pusharyDir(), "auto-update.lock");
|
|
1448
|
+
var serviceOwedBackMark = () => join8(pusharyDir(), "service-owed-back");
|
|
1449
|
+
var autoUpdateLog = () => join8(pusharyDir(), "logs", "auto-update.log");
|
|
1450
|
+
var clientReportClaims = () => join8(pusharyDir(), "client-reports");
|
|
1451
|
+
var claudeRegistrationReceipt = () => join8(claudeSetupDir(), "claude-registration.json");
|
|
1452
|
+
var hermesConfig = () => join8(homedir5(), ".hermes", "config.yaml");
|
|
1453
|
+
var hermesConfigReceipt = () => join8(pusharyDir(), "setup", "hermes-config.json");
|
|
1454
|
+
var hermesSetupReceipt = () => join8(pusharyDir(), "setup", "hermes-plugin.json");
|
|
1455
|
+
var openClawSetupReceiptDirectory = () => join8(pusharyDir(), "setup", "openclaw");
|
|
1456
|
+
var openClawPluginFolder = () => ownedPluginFolderIn(homedir5());
|
|
1457
|
+
var hermesAppWiringRecord = () => join8(pusharyDir(), "setup", "hermes-wired-by-mac-app");
|
|
1458
|
+
var fxQuestionRuleReceipt = () => join8(pusharyDir(), "setup", "fx-question-rule.json");
|
|
1459
|
+
var hookTakeoverReceipt = (agent) => join8(agent === "claude_code" ? claudeSetupDir() : join8(pusharyDir(), "setup"), `hook-takeover-${agent}.json`);
|
|
1460
|
+
var codexSkillDir2 = () => join8(codexHome(), "skills", "pushary");
|
|
1461
|
+
var codexAgentsMd2 = () => join8(codexHome(), "AGENTS.md");
|
|
1462
|
+
var geminiSettings = () => join8(homedir5(), ".gemini", "settings.json");
|
|
1463
|
+
var geminiMd = () => join8(homedir5(), ".gemini", "GEMINI.md");
|
|
1464
|
+
var pusharyConfigFile = () => join8(homedir5(), ".pushary", "config.json");
|
|
1465
|
+
var fxConfigDir = () => join8(homedir5(), ".fx");
|
|
1466
|
+
var fxMcpProfile = () => join8(fxConfigDir(), "mcp.json");
|
|
1467
|
+
var fxSettings = () => join8(fxConfigDir(), "settings.json");
|
|
1468
|
+
var fxAgentsMd = () => join8(fxConfigDir(), "AGENTS.md");
|
|
1469
|
+
var clineLocation = () => ({ home: homedir5(), environment: process.env });
|
|
1380
1470
|
var clineMcpSettings = () => clineMcpSettingsPath(clineLocation());
|
|
1381
1471
|
var clineRules = () => clineRulesFile(clineLocation());
|
|
1382
1472
|
|
|
1383
1473
|
export {
|
|
1384
1474
|
claudeConfigDir,
|
|
1385
1475
|
claudeUserConfigFile,
|
|
1476
|
+
macAppSignIn,
|
|
1477
|
+
MacAppUnreachableError,
|
|
1478
|
+
MacAppRefusedError,
|
|
1479
|
+
requestThroughMacApp,
|
|
1480
|
+
macAppReplyError,
|
|
1386
1481
|
holdBudgetOf,
|
|
1387
1482
|
hookCommandTokens,
|
|
1388
1483
|
executableFileName,
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
reachVerdict,
|
|
15
15
|
reachesYou,
|
|
16
16
|
verifyDelivery
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-5XVPGNE5.js";
|
|
18
18
|
import {
|
|
19
19
|
describeRevokeAttempt,
|
|
20
20
|
keyNoLongerAccepted,
|
|
@@ -29,20 +29,20 @@ import {
|
|
|
29
29
|
isCI,
|
|
30
30
|
terminalColumns,
|
|
31
31
|
useColor
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-K5LHDTYS.js";
|
|
33
33
|
import {
|
|
34
34
|
checkApiKey
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-QUU74XFH.js";
|
|
36
36
|
import {
|
|
37
37
|
reportedInstallSource
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-5ZX57DNR.js";
|
|
39
39
|
import {
|
|
40
40
|
NPX_LATEST_COMMAND
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-JNPWASVJ.js";
|
|
42
42
|
import {
|
|
43
43
|
NO_PAIRING_COMPUTER,
|
|
44
44
|
PAIR_TTL_SECONDS
|
|
45
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-YBTS5ZR3.js";
|
|
46
46
|
|
|
47
47
|
// src/onboarding.ts
|
|
48
48
|
import qrcodeTerminal from "qrcode-terminal";
|
|
@@ -6,37 +6,37 @@ import {
|
|
|
6
6
|
postLiveSession,
|
|
7
7
|
postLiveSessionUntilAccepted,
|
|
8
8
|
startLiveSessionHeartbeat
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-YPTRRRD3.js";
|
|
10
10
|
import {
|
|
11
11
|
CommandReceipts,
|
|
12
12
|
controllerCommandSchema
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-B5565Y33.js";
|
|
14
14
|
import {
|
|
15
15
|
SESSION_IDLE_TIMEOUT_MS,
|
|
16
16
|
describeIdleWindow,
|
|
17
17
|
idleDeadlinePassed,
|
|
18
18
|
startProcessOwnership
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-Z5H2XKMF.js";
|
|
20
20
|
import {
|
|
21
21
|
spawnClaude
|
|
22
22
|
} from "./chunk-3PSNUHC5.js";
|
|
23
|
+
import {
|
|
24
|
+
readCommandAck
|
|
25
|
+
} from "./chunk-TSKDJNC5.js";
|
|
23
26
|
import {
|
|
24
27
|
isDecisionStopped,
|
|
25
28
|
isWaitForAnswerResponse,
|
|
26
29
|
withdrawQuestion,
|
|
27
30
|
writeDegraded
|
|
28
|
-
} from "./chunk-
|
|
29
|
-
import {
|
|
30
|
-
readCommandAck
|
|
31
|
-
} from "./chunk-U43TDW57.js";
|
|
31
|
+
} from "./chunk-UXB54PYF.js";
|
|
32
32
|
import {
|
|
33
33
|
callMcpTool,
|
|
34
34
|
isRetryable
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-WG4Y6DJD.js";
|
|
36
36
|
import {
|
|
37
37
|
projectNameFor,
|
|
38
38
|
repositoryScopeFor
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-DWM7BYVK.js";
|
|
40
40
|
import {
|
|
41
41
|
AGENT_QUESTION_DESCRIPTION_MAX,
|
|
42
42
|
AGENT_QUESTION_HEADER_MAX,
|
|
@@ -58,7 +58,7 @@ import {
|
|
|
58
58
|
parseCodexQuestions,
|
|
59
59
|
planElicitationAsk,
|
|
60
60
|
readElicitationFields
|
|
61
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-YBTS5ZR3.js";
|
|
62
62
|
|
|
63
63
|
// src/codex-question-owner.ts
|
|
64
64
|
import { createHash } from "crypto";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
questionWindowOf
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-76XC2ICT.js";
|
|
4
4
|
import {
|
|
5
5
|
UNNAMED_ACTION
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-DIQKY76N.js";
|
|
7
7
|
import {
|
|
8
8
|
ASK_USER_TIMEOUT_MS,
|
|
9
9
|
WAIT_END_TIMEOUT_MS,
|
|
@@ -11,10 +11,10 @@ import {
|
|
|
11
11
|
askUser,
|
|
12
12
|
unavailableQuestionUnlessRefused,
|
|
13
13
|
waitForQuestion
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-UXB54PYF.js";
|
|
15
15
|
import {
|
|
16
16
|
getMachineId
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-SMI5X7BO.js";
|
|
18
18
|
import {
|
|
19
19
|
hookMaxWaitSeconds,
|
|
20
20
|
hookWaitClamped,
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
refusesWhenUnanswered,
|
|
25
25
|
ruleApprovesAfterItsFullWindow,
|
|
26
26
|
scopeBreachReasonOf
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-YBTS5ZR3.js";
|
|
28
28
|
|
|
29
29
|
// src/pushed-question.ts
|
|
30
30
|
var scopeQuestionOf = (verdict) => {
|
|
@@ -4,20 +4,20 @@ import {
|
|
|
4
4
|
} from "./chunk-3PSNUHC5.js";
|
|
5
5
|
import {
|
|
6
6
|
getMachineId
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-SMI5X7BO.js";
|
|
8
8
|
import {
|
|
9
9
|
readControlMode
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-5ZX57DNR.js";
|
|
11
11
|
import {
|
|
12
12
|
pusharyDir
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-HQSTVSDO.js";
|
|
14
14
|
import {
|
|
15
15
|
resolveGlobalBinary,
|
|
16
16
|
withoutNpmInstallConsent
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-QNMJJMZF.js";
|
|
18
18
|
import {
|
|
19
19
|
getApiKey
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-6X7GXEBI.js";
|
|
21
21
|
import {
|
|
22
22
|
readJsonSafe,
|
|
23
23
|
writeFileAtomic,
|
|
@@ -33,7 +33,7 @@ import {
|
|
|
33
33
|
} from "./chunk-CXQWDQCJ.js";
|
|
34
34
|
import {
|
|
35
35
|
isRecord
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-YBTS5ZR3.js";
|
|
37
37
|
|
|
38
38
|
// src/daemon-entry-guard.ts
|
|
39
39
|
import { mkdirSync, readFileSync } from "fs";
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
PUSHARY_CLI_LATEST_FOR_POWERSHELL,
|
|
9
9
|
SETUP_AGENT_CHOICES,
|
|
10
10
|
isApprovalMode
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-YBTS5ZR3.js";
|
|
12
12
|
|
|
13
13
|
// src/cli/mode-request.ts
|
|
14
14
|
var parseDuration = (value) => {
|
|
@@ -47,6 +47,16 @@ var npmExecSetupCommandFor = (platform, agents, version) => {
|
|
|
47
47
|
return `${platform === "win32" ? "npm.cmd" : "npm"} exec --yes --package=pushary@${version} -c "pushary setup --agents ${agents.join(",")}"`;
|
|
48
48
|
};
|
|
49
49
|
var COMMAND_LIST = [
|
|
50
|
+
{
|
|
51
|
+
name: "ask",
|
|
52
|
+
module: "pushary-ask",
|
|
53
|
+
summary: "Ask a question with optional screenshots and print the response as JSON",
|
|
54
|
+
detail: [
|
|
55
|
+
'pushary ask "Ship this layout?" --image checkout.png',
|
|
56
|
+
"Use --type confirm|select|input and repeat --option for a selection. Attach up to two files with --image.",
|
|
57
|
+
"Exit 0 means yes for a confirmation or an answered selection/input. Pending or handoff returns 9. A declined confirmation returns 1."
|
|
58
|
+
]
|
|
59
|
+
},
|
|
50
60
|
{
|
|
51
61
|
name: "codex",
|
|
52
62
|
module: "pushary-codex-session",
|
|
@@ -3,10 +3,7 @@ import {
|
|
|
3
3
|
forkFinishWithUpgradeLock,
|
|
4
4
|
installWithUpgradeLock,
|
|
5
5
|
releaseAutoUpdateLock
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import {
|
|
8
|
-
phoneStartIsRequired
|
|
9
|
-
} from "./chunk-M23WDLIC.js";
|
|
6
|
+
} from "./chunk-WXXAFKZE.js";
|
|
10
7
|
import {
|
|
11
8
|
describeAutoUpdateCheck,
|
|
12
9
|
globalInstallLocation,
|
|
@@ -18,12 +15,15 @@ import {
|
|
|
18
15
|
readAutoUpdateState,
|
|
19
16
|
updateAutoUpdateState,
|
|
20
17
|
upgradeEntryFor
|
|
21
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-GJQJHWQ4.js";
|
|
19
|
+
import {
|
|
20
|
+
phoneStartIsRequired
|
|
21
|
+
} from "./chunk-HMUSFFEH.js";
|
|
22
22
|
import {
|
|
23
23
|
autoUpdateLock,
|
|
24
24
|
autoUpdateLog,
|
|
25
25
|
autoUpdateState
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-HQSTVSDO.js";
|
|
27
27
|
import {
|
|
28
28
|
describeReleaseNpmHolds,
|
|
29
29
|
execNpm,
|
|
@@ -33,10 +33,10 @@ import {
|
|
|
33
33
|
npmExitedOnReleaseAge,
|
|
34
34
|
readGlobalCliInstallAt,
|
|
35
35
|
readGlobalPrefix
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-QNMJJMZF.js";
|
|
37
37
|
import {
|
|
38
38
|
NPX_LATEST_COMMAND
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-JNPWASVJ.js";
|
|
40
40
|
import {
|
|
41
41
|
EXIT
|
|
42
42
|
} from "./chunk-BG4HHB7E.js";
|