pushary 1.9.137 → 1.9.138
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 +5 -0
- package/dist/{api-5H25QRNM.js → api-J4XJ7XWW.js} +9 -9
- package/dist/bin/pushary-audit.js +3 -3
- package/dist/bin/pushary-bell-hook.js +19 -19
- package/dist/bin/pushary-bell.js +7 -7
- package/dist/bin/pushary-claude.js +23 -23
- package/dist/bin/pushary-clean.js +28 -28
- package/dist/bin/pushary-codex-bridge.js +15 -15
- package/dist/bin/pushary-codex-hook.js +30 -30
- package/dist/bin/pushary-codex-session.js +6 -6
- package/dist/bin/pushary-codex.js +11 -11
- package/dist/bin/pushary-connect.js +23 -23
- package/dist/bin/pushary-daemon-supervisor.js +91 -12
- package/dist/bin/pushary-daemon.js +35 -35
- package/dist/bin/pushary-disconnect.js +23 -23
- package/dist/bin/pushary-display-hook.js +22 -13
- package/dist/bin/pushary-doctor.js +39 -39
- package/dist/bin/pushary-elicitation-hook.js +20 -20
- package/dist/bin/pushary-gemini-bridge.js +6 -6
- package/dist/bin/pushary-gemini-hook.js +23 -23
- package/dist/bin/pushary-hook.js +25 -25
- package/dist/bin/pushary-login.js +17 -17
- package/dist/bin/pushary-logout.js +21 -21
- package/dist/bin/pushary-mcp.js +11 -11
- package/dist/bin/pushary-mode.js +12 -12
- package/dist/bin/pushary-notification-hook.js +19 -19
- package/dist/bin/pushary-opencode-hook.js +22 -22
- package/dist/bin/pushary-permission-denied-hook.js +25 -25
- package/dist/bin/pushary-permission-hook.js +25 -25
- package/dist/bin/pushary-post-hook.js +20 -20
- package/dist/bin/pushary-prompt-hook.js +19 -19
- package/dist/bin/pushary-session-end-hook.js +19 -19
- package/dist/bin/pushary-session-start-hook.js +28 -28
- package/dist/bin/pushary-setup.js +46 -46
- package/dist/bin/pushary-status.js +27 -27
- package/dist/bin/pushary-stop-hook.js +19 -19
- package/dist/bin/pushary-stopfailure-hook.js +19 -19
- package/dist/bin/pushary-suggestions.js +12 -12
- package/dist/bin/pushary-transcript-register.js +9 -9
- package/dist/bin/pushary-transcripts.js +19 -19
- package/dist/bin/pushary-upgrade.js +37 -37
- package/dist/bin/pushary-wait.js +12 -12
- package/dist/bin/pushary.js +6 -6
- package/dist/{chunk-ICCM3DLT.js → chunk-33E75LIY.js} +1 -1
- package/dist/{chunk-IHAKBLW2.js → chunk-42BVIKPZ.js} +3 -3
- package/dist/{chunk-3QBI5C6P.js → chunk-52B2TQJM.js} +1 -1
- package/dist/{chunk-NZD6ISCL.js → chunk-5ZK4RHYR.js} +1 -1
- package/dist/{chunk-MD63J3T7.js → chunk-6TK3DWSF.js} +78 -24
- package/dist/{chunk-DBIPNY7J.js → chunk-7WR3FDDX.js} +2 -2
- package/dist/{chunk-6SWFS4GU.js → chunk-AGVE7MXF.js} +2 -2
- package/dist/{chunk-43DT3QWZ.js → chunk-APTNHX63.js} +3 -3
- package/dist/{chunk-L2GADKFL.js → chunk-B3AZPYRU.js} +6 -6
- package/dist/{chunk-JZJ5CM6X.js → chunk-CBTXOWB3.js} +3 -3
- package/dist/{chunk-A7R43KOX.js → chunk-CULDO4UA.js} +2 -2
- package/dist/{chunk-YHX5YF77.js → chunk-DES272QQ.js} +3 -3
- package/dist/{chunk-WXUEOHYY.js → chunk-DK6CMXYI.js} +5 -5
- package/dist/{chunk-VV7WRIQT.js → chunk-DMZMPYLB.js} +2 -2
- package/dist/{chunk-WNT4JHK3.js → chunk-EHQCMJHI.js} +1 -1
- package/dist/{chunk-V7ZY7P2X.js → chunk-EJSU5YWO.js} +3 -3
- package/dist/{chunk-CMAB4KQG.js → chunk-FJ7OESWX.js} +3 -3
- package/dist/{chunk-2R4OVJHS.js → chunk-FO5MHOBI.js} +4 -4
- package/dist/{chunk-NN43KGTN.js → chunk-FQ3ASV5L.js} +3 -3
- package/dist/{chunk-GS5FH3C2.js → chunk-FYLYAVQG.js} +2 -2
- package/dist/{chunk-2MVKT7KH.js → chunk-H5XLVJI7.js} +1 -1
- package/dist/{chunk-UP5QXEUU.js → chunk-HVRXBHX2.js} +2 -2
- package/dist/{chunk-VBWJ756P.js → chunk-ICQU3SNR.js} +3 -3
- package/dist/{chunk-2XDVEBHI.js → chunk-IDGWQY3J.js} +4 -4
- package/dist/{chunk-6WT5OIRM.js → chunk-JFGM6VSU.js} +3 -3
- package/dist/{chunk-7VKW7OA5.js → chunk-KN4YJ4QS.js} +2 -2
- package/dist/{chunk-Q2VV77IY.js → chunk-KXKE3SW3.js} +4 -4
- package/dist/{chunk-MQ3I5OIC.js → chunk-L3UV4LLL.js} +7 -7
- package/dist/{chunk-D7AAAD6W.js → chunk-LF3ZRLUQ.js} +8 -8
- package/dist/{chunk-7XD56GXA.js → chunk-LIUWN23V.js} +4 -4
- package/dist/{chunk-54TZGPZP.js → chunk-LIZEMDE4.js} +1 -1
- package/dist/{chunk-G73ACPR2.js → chunk-LPXHKIJC.js} +1 -1
- package/dist/{chunk-2E46RALI.js → chunk-NIBF37NU.js} +2 -2
- package/dist/{chunk-EJHD44ZN.js → chunk-NLJ2ILA7.js} +1 -1
- package/dist/{chunk-3HXOR6E5.js → chunk-NNDUDXOJ.js} +9 -9
- package/dist/{chunk-H2RE3IPK.js → chunk-NUG2A73X.js} +1 -1
- package/dist/{chunk-62GD26OE.js → chunk-O26H5X5M.js} +2 -2
- package/dist/{chunk-POV2TBFA.js → chunk-OAGYR5LI.js} +9 -9
- package/dist/{chunk-4T72AHIA.js → chunk-OXPYENHL.js} +1 -1
- package/dist/{chunk-7NCI2DGB.js → chunk-P6HLLS5J.js} +2 -2
- package/dist/{chunk-ZWLSXECG.js → chunk-P7YVVWTW.js} +1 -1
- package/dist/{chunk-TLK5YLIE.js → chunk-PNDL3OMR.js} +2 -2
- package/dist/{chunk-A4YOXS24.js → chunk-PPCZSOCL.js} +2 -2
- package/dist/{chunk-KLV2NQVT.js → chunk-S47AAQFT.js} +2 -2
- package/dist/{chunk-PHA6AFOR.js → chunk-SNMTACCY.js} +4 -4
- package/dist/{chunk-VO77WHK4.js → chunk-TJCUGBCZ.js} +5 -5
- package/dist/{chunk-R7KC57PC.js → chunk-TN5PGMH5.js} +1 -1
- package/dist/{chunk-R6N6FREL.js → chunk-TXPXK5Q6.js} +10 -10
- package/dist/{chunk-ZWIJJYN3.js → chunk-VF4N6NHG.js} +3 -3
- package/dist/{chunk-HY4ATVCT.js → chunk-VQMGR32B.js} +1 -1
- package/dist/{chunk-LAWI6NQK.js → chunk-WHOFZB5W.js} +1 -1
- package/dist/{codex-app-cards-switch-JU236CG2.js → codex-app-cards-switch-R3MIDYFA.js} +6 -6
- package/dist/{codex-desktop-launch-LRQ4LU64.js → codex-desktop-launch-2YRIBVDK.js} +1 -1
- package/dist/{codex-session-launch-DTGH7ZKM.js → codex-session-launch-CTMTMGHU.js} +15 -15
- package/dist/{global-upgrade-5UAH5DCG.js → global-upgrade-NMTIVAJ3.js} +8 -8
- package/dist/{identity-UFJEWGEU.js → identity-3XKATUN2.js} +3 -3
- package/dist/{live-capabilities-BL3SHFWX.js → live-capabilities-MR35FXPF.js} +3 -3
- package/dist/paths-YA5ROXGC.js +2 -2
- package/dist/{reapply-OPQF4DPQ.js → reapply-LIBOIVBT.js} +23 -23
- package/dist/src/index.js +25 -25
- package/dist/{upgrade-lock-AZLOOGKV.js → upgrade-lock-LK4XD3HR.js} +3 -3
- package/package.json +1 -1
- package/dist/bin/pushary-daemon-supervisor.d.ts +0 -1
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
reportEvent
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-LF3ZRLUQ.js";
|
|
5
5
|
import "../chunk-A2YJ2FBR.js";
|
|
6
6
|
import "../chunk-IRIXOH4U.js";
|
|
7
7
|
import {
|
|
8
8
|
askUser,
|
|
9
9
|
isDecisionStopped,
|
|
10
10
|
waitForAnswer
|
|
11
|
-
} from "../chunk-
|
|
12
|
-
import "../chunk-Y47BMZUR.js";
|
|
11
|
+
} from "../chunk-B3AZPYRU.js";
|
|
13
12
|
import "../chunk-POFBE6ZY.js";
|
|
14
|
-
import "../chunk-
|
|
13
|
+
import "../chunk-DK6CMXYI.js";
|
|
14
|
+
import "../chunk-KXKE3SW3.js";
|
|
15
|
+
import "../chunk-SNMTACCY.js";
|
|
16
|
+
import "../chunk-Y47BMZUR.js";
|
|
15
17
|
import "../chunk-VVN3RPV6.js";
|
|
16
|
-
import "../chunk-Q2VV77IY.js";
|
|
17
|
-
import "../chunk-PHA6AFOR.js";
|
|
18
18
|
import {
|
|
19
19
|
getMachineId
|
|
20
|
-
} from "../chunk-
|
|
20
|
+
} from "../chunk-EHQCMJHI.js";
|
|
21
|
+
import "../chunk-YU2EUD7O.js";
|
|
21
22
|
import "../chunk-LNF36PTF.js";
|
|
22
|
-
import "../chunk-
|
|
23
|
-
import "../chunk-
|
|
23
|
+
import "../chunk-TN5PGMH5.js";
|
|
24
|
+
import "../chunk-FYLYAVQG.js";
|
|
24
25
|
import {
|
|
25
26
|
getApiKey
|
|
26
27
|
} from "../chunk-IKBTG3OT.js";
|
|
27
|
-
import "../chunk-YU2EUD7O.js";
|
|
28
|
-
import "../chunk-TODDEIYG.js";
|
|
29
28
|
import "../chunk-BG4HHB7E.js";
|
|
29
|
+
import "../chunk-TODDEIYG.js";
|
|
30
30
|
import {
|
|
31
31
|
NPX_LATEST_COMMAND
|
|
32
32
|
} from "../chunk-MQMVJDII.js";
|
|
@@ -1,63 +1,63 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
printKeyCheck
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-NIBF37NU.js";
|
|
5
5
|
import {
|
|
6
6
|
connectDevice,
|
|
7
7
|
connectExistingApp,
|
|
8
8
|
printConnectInstructions
|
|
9
|
-
} from "../chunk-
|
|
9
|
+
} from "../chunk-OXPYENHL.js";
|
|
10
10
|
import "../chunk-3EGEA4KH.js";
|
|
11
|
-
import "../chunk-
|
|
11
|
+
import "../chunk-EJSU5YWO.js";
|
|
12
12
|
import "../chunk-U3OLXV5Z.js";
|
|
13
13
|
import {
|
|
14
14
|
CONNECTED_THROUGH_MAC_APP,
|
|
15
15
|
PAIR_FROM_MAC_APP,
|
|
16
16
|
readMacAppConnection
|
|
17
|
-
} from "../chunk-
|
|
18
|
-
import "../chunk-
|
|
17
|
+
} from "../chunk-S47AAQFT.js";
|
|
18
|
+
import "../chunk-52B2TQJM.js";
|
|
19
19
|
import "../chunk-QCGNGEGE.js";
|
|
20
|
-
import "../chunk-
|
|
20
|
+
import "../chunk-ICQU3SNR.js";
|
|
21
21
|
import {
|
|
22
22
|
createIo
|
|
23
23
|
} from "../chunk-FO3MDD26.js";
|
|
24
24
|
import {
|
|
25
25
|
exitOnHelpFlag
|
|
26
26
|
} from "../chunk-K7YJBVR3.js";
|
|
27
|
-
import "../chunk-
|
|
28
|
-
import "../chunk-
|
|
29
|
-
import "../chunk-
|
|
27
|
+
import "../chunk-APTNHX63.js";
|
|
28
|
+
import "../chunk-PNDL3OMR.js";
|
|
29
|
+
import "../chunk-LF3ZRLUQ.js";
|
|
30
30
|
import "../chunk-A2YJ2FBR.js";
|
|
31
31
|
import "../chunk-5XDFQ6E3.js";
|
|
32
|
-
import "../chunk-
|
|
32
|
+
import "../chunk-WHOFZB5W.js";
|
|
33
33
|
import {
|
|
34
34
|
parseFlags
|
|
35
35
|
} from "../chunk-YPY4YCIZ.js";
|
|
36
36
|
import "../chunk-IRIXOH4U.js";
|
|
37
|
-
import "../chunk-
|
|
38
|
-
import "../chunk-Y47BMZUR.js";
|
|
37
|
+
import "../chunk-B3AZPYRU.js";
|
|
39
38
|
import "../chunk-POFBE6ZY.js";
|
|
40
|
-
import "../chunk-
|
|
41
|
-
import "../chunk-VVN3RPV6.js";
|
|
39
|
+
import "../chunk-DK6CMXYI.js";
|
|
42
40
|
import {
|
|
43
41
|
checkApiKey
|
|
44
|
-
} from "../chunk-
|
|
45
|
-
import "../chunk-
|
|
46
|
-
import "../chunk-
|
|
42
|
+
} from "../chunk-KXKE3SW3.js";
|
|
43
|
+
import "../chunk-SNMTACCY.js";
|
|
44
|
+
import "../chunk-Y47BMZUR.js";
|
|
45
|
+
import "../chunk-VVN3RPV6.js";
|
|
46
|
+
import "../chunk-EHQCMJHI.js";
|
|
47
|
+
import {
|
|
48
|
+
UsageError
|
|
49
|
+
} from "../chunk-YU2EUD7O.js";
|
|
47
50
|
import {
|
|
48
51
|
readKeySource
|
|
49
52
|
} from "../chunk-PNVTPEO5.js";
|
|
50
53
|
import "../chunk-LNF36PTF.js";
|
|
51
|
-
import "../chunk-
|
|
52
|
-
import "../chunk-
|
|
54
|
+
import "../chunk-TN5PGMH5.js";
|
|
55
|
+
import "../chunk-FYLYAVQG.js";
|
|
53
56
|
import "../chunk-IKBTG3OT.js";
|
|
54
|
-
import {
|
|
55
|
-
UsageError
|
|
56
|
-
} from "../chunk-YU2EUD7O.js";
|
|
57
|
-
import "../chunk-TODDEIYG.js";
|
|
58
57
|
import {
|
|
59
58
|
EXIT
|
|
60
59
|
} from "../chunk-BG4HHB7E.js";
|
|
60
|
+
import "../chunk-TODDEIYG.js";
|
|
61
61
|
import {
|
|
62
62
|
isInvocationOf
|
|
63
63
|
} from "../chunk-MQMVJDII.js";
|
|
@@ -2,26 +2,105 @@
|
|
|
2
2
|
|
|
3
3
|
// bin/pushary-daemon-supervisor.ts
|
|
4
4
|
import { spawn } from "child_process";
|
|
5
|
+
import { appendFileSync, mkdirSync } from "fs";
|
|
6
|
+
|
|
7
|
+
// src/daemon-supervisor.ts
|
|
8
|
+
import { join } from "path";
|
|
9
|
+
var SUPERVISOR_LAUNCH_FLAG = "--launch";
|
|
10
|
+
var DAEMON_LOG_FILE = "daemon.log";
|
|
11
|
+
var DAEMON_ERROR_LOG_FILE = "daemon-error.log";
|
|
12
|
+
var STDIO_FOR_OUTPUT = {
|
|
13
|
+
"shared-console": "inherit",
|
|
14
|
+
"log-files": ["ignore", "pipe", "pipe"],
|
|
15
|
+
discarded: "ignore"
|
|
16
|
+
};
|
|
17
|
+
var parseSupervisorInvocation = (args) => {
|
|
18
|
+
const launching = args.length > 1 && args[args.length - 1] === SUPERVISOR_LAUNCH_FLAG;
|
|
19
|
+
const [daemonEntry, stateDir] = launching ? args.slice(0, -1) : args;
|
|
20
|
+
if (!daemonEntry || daemonEntry === SUPERVISOR_LAUNCH_FLAG) return { kind: "missing-entry" };
|
|
21
|
+
return { kind: launching ? "launch" : "supervise", daemonEntry, stateDir: stateDir || null };
|
|
22
|
+
};
|
|
23
|
+
var supervisorRelaunch = (execPath, supervisorScript, daemon) => ({
|
|
24
|
+
command: execPath,
|
|
25
|
+
args: [supervisorScript, daemon.daemonEntry, ...daemon.stateDir === null ? [] : [daemon.stateDir]],
|
|
26
|
+
options: { detached: true, windowsHide: true, stdio: "ignore" }
|
|
27
|
+
});
|
|
28
|
+
var daemonLogPaths = (stateDir) => ({
|
|
29
|
+
output: join(stateDir, DAEMON_LOG_FILE),
|
|
30
|
+
errors: join(stateDir, DAEMON_ERROR_LOG_FILE)
|
|
31
|
+
});
|
|
32
|
+
var daemonOutputFor = (stateDir, preparedLogs2) => {
|
|
33
|
+
if (stateDir === null) return { kind: "shared-console" };
|
|
34
|
+
if (preparedLogs2 === null) return { kind: "discarded" };
|
|
35
|
+
return { kind: "log-files", paths: preparedLogs2 };
|
|
36
|
+
};
|
|
37
|
+
var supervisedDaemonLaunch = (execPath, daemonEntry, output) => ({
|
|
38
|
+
command: execPath,
|
|
39
|
+
args: [daemonEntry],
|
|
40
|
+
options: { windowsHide: true, stdio: STDIO_FOR_OUTPUT[output.kind] }
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
// bin/pushary-daemon-supervisor.ts
|
|
5
44
|
var FIRST_DELAY_MS = 1e4;
|
|
6
45
|
var MAX_DELAY_MS = 5 * 6e4;
|
|
7
46
|
var HEALTHY_RUN_MS = 6e4;
|
|
8
|
-
var
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
47
|
+
var wait = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
|
|
48
|
+
var appendQuietly = (path, chunk) => {
|
|
49
|
+
try {
|
|
50
|
+
appendFileSync(path, chunk);
|
|
51
|
+
} catch {
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
var preparedLogs = (stateDir) => {
|
|
56
|
+
try {
|
|
57
|
+
mkdirSync(stateDir, { recursive: true });
|
|
58
|
+
} catch {
|
|
59
|
+
return null;
|
|
60
|
+
}
|
|
61
|
+
return daemonLogPaths(stateDir);
|
|
62
|
+
};
|
|
63
|
+
var outputOf = (daemon) => daemonOutputFor(daemon.stateDir, daemon.stateDir === null ? null : preparedLogs(daemon.stateDir));
|
|
64
|
+
var runDaemonOnce = (daemonEntry, output) => new Promise((resolve) => {
|
|
65
|
+
const launch = supervisedDaemonLaunch(process.execPath, daemonEntry, output);
|
|
66
|
+
const child = spawn(launch.command, [...launch.args], launch.options);
|
|
67
|
+
if (output.kind === "log-files") {
|
|
68
|
+
child.stdout?.on("data", (chunk) => appendQuietly(output.paths.output, chunk));
|
|
69
|
+
child.stderr?.on("data", (chunk) => appendQuietly(output.paths.errors, chunk));
|
|
70
|
+
}
|
|
71
|
+
child.once("error", () => resolve(1));
|
|
72
|
+
child.once("exit", (code) => resolve(code ?? 1));
|
|
73
|
+
});
|
|
74
|
+
var supervise = async (daemon) => {
|
|
75
|
+
const output = outputOf(daemon);
|
|
19
76
|
let delay = FIRST_DELAY_MS;
|
|
20
77
|
for (; ; ) {
|
|
21
78
|
const startedAt = Date.now();
|
|
22
|
-
if (await
|
|
79
|
+
if (await runDaemonOnce(daemon.daemonEntry, output) === 0) return;
|
|
23
80
|
if (Date.now() - startedAt >= HEALTHY_RUN_MS) delay = FIRST_DELAY_MS;
|
|
24
81
|
await wait(delay);
|
|
25
82
|
delay = Math.min(delay * 2, MAX_DELAY_MS);
|
|
26
83
|
}
|
|
84
|
+
};
|
|
85
|
+
var launchHiddenSupervisor = (daemon) => {
|
|
86
|
+
const supervisorScript = process.argv[1];
|
|
87
|
+
if (!supervisorScript) {
|
|
88
|
+
process.exitCode = 64;
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
const relaunch = supervisorRelaunch(process.execPath, supervisorScript, daemon);
|
|
92
|
+
const child = spawn(relaunch.command, [...relaunch.args], relaunch.options);
|
|
93
|
+
child.once("error", () => {
|
|
94
|
+
process.exitCode = 1;
|
|
95
|
+
});
|
|
96
|
+
child.unref();
|
|
97
|
+
};
|
|
98
|
+
var invocation = parseSupervisorInvocation(process.argv.slice(2));
|
|
99
|
+
if (invocation.kind === "missing-entry") {
|
|
100
|
+
process.stderr.write("Missing daemon entry.\n");
|
|
101
|
+
process.exitCode = 64;
|
|
102
|
+
} else if (invocation.kind === "launch") {
|
|
103
|
+
launchHiddenSupervisor(invocation);
|
|
104
|
+
} else {
|
|
105
|
+
await supervise(invocation);
|
|
27
106
|
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
inspectConfiguredManagedProviders
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-OAGYR5LI.js";
|
|
5
5
|
import {
|
|
6
6
|
readHookWiring,
|
|
7
7
|
readHookWiringSafely
|
|
8
|
-
} from "../chunk-
|
|
9
|
-
import "../chunk-
|
|
10
|
-
import "../chunk-
|
|
8
|
+
} from "../chunk-L3UV4LLL.js";
|
|
9
|
+
import "../chunk-LPXHKIJC.js";
|
|
10
|
+
import "../chunk-P7YVVWTW.js";
|
|
11
11
|
import {
|
|
12
12
|
keepLinuxDaemonAfterLogout,
|
|
13
13
|
lingerReportOf
|
|
@@ -15,8 +15,8 @@ import {
|
|
|
15
15
|
import {
|
|
16
16
|
HEARTBEAT_INTERVAL_MS,
|
|
17
17
|
sendHeartbeat
|
|
18
|
-
} from "../chunk-
|
|
19
|
-
import "../chunk-
|
|
18
|
+
} from "../chunk-FJ7OESWX.js";
|
|
19
|
+
import "../chunk-AGVE7MXF.js";
|
|
20
20
|
import {
|
|
21
21
|
readSignedOutDiagnosis
|
|
22
22
|
} from "../chunk-U3OLXV5Z.js";
|
|
@@ -24,14 +24,14 @@ import {
|
|
|
24
24
|
HERMES_INSTALL_MARKER_FILE,
|
|
25
25
|
defaultHermesHome,
|
|
26
26
|
parseHermesInstallMarker
|
|
27
|
-
} from "../chunk-
|
|
27
|
+
} from "../chunk-CULDO4UA.js";
|
|
28
28
|
import {
|
|
29
29
|
writeHuman
|
|
30
30
|
} from "../chunk-QCGNGEGE.js";
|
|
31
|
-
import "../chunk-
|
|
32
|
-
import "../chunk-
|
|
33
|
-
import "../chunk-
|
|
34
|
-
import "../chunk-
|
|
31
|
+
import "../chunk-IDGWQY3J.js";
|
|
32
|
+
import "../chunk-LIZEMDE4.js";
|
|
33
|
+
import "../chunk-5ZK4RHYR.js";
|
|
34
|
+
import "../chunk-ICQU3SNR.js";
|
|
35
35
|
import {
|
|
36
36
|
exitOnHelpFlag
|
|
37
37
|
} from "../chunk-K7YJBVR3.js";
|
|
@@ -43,8 +43,8 @@ import {
|
|
|
43
43
|
launchableProviders,
|
|
44
44
|
resolveControlPolicy,
|
|
45
45
|
trackProviderInventory
|
|
46
|
-
} from "../chunk-
|
|
47
|
-
import "../chunk-
|
|
46
|
+
} from "../chunk-7WR3FDDX.js";
|
|
47
|
+
import "../chunk-NLJ2ILA7.js";
|
|
48
48
|
import {
|
|
49
49
|
SESSION_REAP_SILENCE_MS,
|
|
50
50
|
describeIdleWindow,
|
|
@@ -52,18 +52,18 @@ import {
|
|
|
52
52
|
listProcessProofs,
|
|
53
53
|
ownsLiveProcess,
|
|
54
54
|
silentSpawnedProofs
|
|
55
|
-
} from "../chunk-
|
|
55
|
+
} from "../chunk-H5XLVJI7.js";
|
|
56
56
|
import "../chunk-CYTPQDQY.js";
|
|
57
57
|
import {
|
|
58
58
|
readLocalAutoUpdateReport
|
|
59
|
-
} from "../chunk-
|
|
60
|
-
import "../chunk-
|
|
59
|
+
} from "../chunk-33E75LIY.js";
|
|
60
|
+
import "../chunk-FQ3ASV5L.js";
|
|
61
61
|
import {
|
|
62
62
|
startRegisteredTranscripts
|
|
63
|
-
} from "../chunk-
|
|
63
|
+
} from "../chunk-JFGM6VSU.js";
|
|
64
64
|
import "../chunk-VAE5JBR5.js";
|
|
65
65
|
import "../chunk-G66WIAST.js";
|
|
66
|
-
import "../chunk-
|
|
66
|
+
import "../chunk-APTNHX63.js";
|
|
67
67
|
import {
|
|
68
68
|
DAEMON_LEASE_RENEW_INTERVAL_MS,
|
|
69
69
|
DAEMON_YIELD_CHECK_INTERVAL_MS,
|
|
@@ -81,39 +81,40 @@ import {
|
|
|
81
81
|
requestDaemonHandoff,
|
|
82
82
|
stopDaemonRunning,
|
|
83
83
|
writeDaemonNeedsLogin
|
|
84
|
-
} from "../chunk-
|
|
84
|
+
} from "../chunk-6TK3DWSF.js";
|
|
85
85
|
import {
|
|
86
86
|
hookOwnerOf
|
|
87
|
-
} from "../chunk-
|
|
87
|
+
} from "../chunk-PNDL3OMR.js";
|
|
88
88
|
import {
|
|
89
89
|
markPendingCommandRefused,
|
|
90
90
|
pendingCommandReceipts,
|
|
91
91
|
removePendingCommand
|
|
92
|
-
} from "../chunk-
|
|
92
|
+
} from "../chunk-LF3ZRLUQ.js";
|
|
93
93
|
import "../chunk-A2YJ2FBR.js";
|
|
94
94
|
import "../chunk-5XDFQ6E3.js";
|
|
95
|
-
import "../chunk-
|
|
95
|
+
import "../chunk-WHOFZB5W.js";
|
|
96
96
|
import "../chunk-YPY4YCIZ.js";
|
|
97
97
|
import "../chunk-YOV3LHOL.js";
|
|
98
98
|
import "../chunk-XMSDA5WA.js";
|
|
99
99
|
import "../chunk-ZWURBNA3.js";
|
|
100
|
+
import "../chunk-IRIXOH4U.js";
|
|
101
|
+
import "../chunk-B3AZPYRU.js";
|
|
102
|
+
import "../chunk-POFBE6ZY.js";
|
|
103
|
+
import "../chunk-DK6CMXYI.js";
|
|
104
|
+
import "../chunk-KXKE3SW3.js";
|
|
105
|
+
import "../chunk-SNMTACCY.js";
|
|
100
106
|
import {
|
|
101
107
|
spawnClaude
|
|
102
108
|
} from "../chunk-H6CL3T2S.js";
|
|
103
|
-
import "../chunk-IRIXOH4U.js";
|
|
104
|
-
import "../chunk-L2GADKFL.js";
|
|
105
109
|
import {
|
|
106
110
|
readCommandAck,
|
|
107
111
|
refusedReceiptMessage
|
|
108
112
|
} from "../chunk-Y47BMZUR.js";
|
|
109
|
-
import "../chunk-POFBE6ZY.js";
|
|
110
|
-
import "../chunk-WXUEOHYY.js";
|
|
111
113
|
import "../chunk-VVN3RPV6.js";
|
|
112
|
-
import "../chunk-Q2VV77IY.js";
|
|
113
|
-
import "../chunk-PHA6AFOR.js";
|
|
114
114
|
import {
|
|
115
115
|
getMachineId
|
|
116
|
-
} from "../chunk-
|
|
116
|
+
} from "../chunk-EHQCMJHI.js";
|
|
117
|
+
import "../chunk-YU2EUD7O.js";
|
|
117
118
|
import {
|
|
118
119
|
readControlMode
|
|
119
120
|
} from "../chunk-PNVTPEO5.js";
|
|
@@ -121,21 +122,20 @@ import "../chunk-LNF36PTF.js";
|
|
|
121
122
|
import {
|
|
122
123
|
claudeConfigDir,
|
|
123
124
|
codexHome
|
|
124
|
-
} from "../chunk-
|
|
125
|
+
} from "../chunk-TN5PGMH5.js";
|
|
125
126
|
import {
|
|
126
127
|
resolveBinary
|
|
127
|
-
} from "../chunk-
|
|
128
|
+
} from "../chunk-FYLYAVQG.js";
|
|
128
129
|
import {
|
|
129
130
|
getApiKey,
|
|
130
131
|
getBaseUrl
|
|
131
132
|
} from "../chunk-IKBTG3OT.js";
|
|
132
|
-
import "../chunk-YU2EUD7O.js";
|
|
133
|
-
import {
|
|
134
|
-
writeJsonAtomicDurable
|
|
135
|
-
} from "../chunk-TODDEIYG.js";
|
|
136
133
|
import {
|
|
137
134
|
EXIT
|
|
138
135
|
} from "../chunk-BG4HHB7E.js";
|
|
136
|
+
import {
|
|
137
|
+
writeJsonAtomicDurable
|
|
138
|
+
} from "../chunk-TODDEIYG.js";
|
|
139
139
|
import "../chunk-MQMVJDII.js";
|
|
140
140
|
import "../chunk-WIIMW5YO.js";
|
|
141
141
|
import {
|
|
@@ -2,18 +2,18 @@
|
|
|
2
2
|
import {
|
|
3
3
|
declinedAgentsFile,
|
|
4
4
|
recordDeclinedAgent
|
|
5
|
-
} from "../chunk-
|
|
5
|
+
} from "../chunk-P7YVVWTW.js";
|
|
6
6
|
import {
|
|
7
7
|
isCursorPluginLeftover,
|
|
8
8
|
isPusharyCursorPluginManifest,
|
|
9
9
|
releaseSoleGate
|
|
10
|
-
} from "../chunk-
|
|
10
|
+
} from "../chunk-VF4N6NHG.js";
|
|
11
11
|
import {
|
|
12
12
|
planFxRemoval,
|
|
13
13
|
removeClineServer
|
|
14
|
-
} from "../chunk-
|
|
15
|
-
import "../chunk-
|
|
16
|
-
import "../chunk-
|
|
14
|
+
} from "../chunk-IDGWQY3J.js";
|
|
15
|
+
import "../chunk-LIZEMDE4.js";
|
|
16
|
+
import "../chunk-5ZK4RHYR.js";
|
|
17
17
|
import {
|
|
18
18
|
OPENCODE_PLUGIN_SIBLING,
|
|
19
19
|
OPENCODE_PLUGIN_SIBLING_CONTENTS,
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
openCodePluginDir,
|
|
26
26
|
openCodePluginFile,
|
|
27
27
|
removeOpenCodeMcpServer
|
|
28
|
-
} from "../chunk-
|
|
28
|
+
} from "../chunk-ICQU3SNR.js";
|
|
29
29
|
import {
|
|
30
30
|
exitOnHelpFlag
|
|
31
31
|
} from "../chunk-K7YJBVR3.js";
|
|
@@ -38,26 +38,29 @@ import {
|
|
|
38
38
|
isEmptiedPusharyOwnedDocument,
|
|
39
39
|
removeCompatibleHooks,
|
|
40
40
|
removeCompatibleMcpServer
|
|
41
|
-
} from "../chunk-
|
|
41
|
+
} from "../chunk-APTNHX63.js";
|
|
42
42
|
import {
|
|
43
43
|
removeGeminiSettings
|
|
44
|
-
} from "../chunk-
|
|
45
|
-
import "../chunk-
|
|
44
|
+
} from "../chunk-PNDL3OMR.js";
|
|
45
|
+
import "../chunk-LF3ZRLUQ.js";
|
|
46
46
|
import "../chunk-A2YJ2FBR.js";
|
|
47
47
|
import "../chunk-5XDFQ6E3.js";
|
|
48
|
-
import "../chunk-
|
|
48
|
+
import "../chunk-WHOFZB5W.js";
|
|
49
49
|
import {
|
|
50
50
|
parseFlags
|
|
51
51
|
} from "../chunk-YPY4YCIZ.js";
|
|
52
52
|
import "../chunk-IRIXOH4U.js";
|
|
53
|
-
import "../chunk-
|
|
54
|
-
import "../chunk-Y47BMZUR.js";
|
|
53
|
+
import "../chunk-B3AZPYRU.js";
|
|
55
54
|
import "../chunk-POFBE6ZY.js";
|
|
56
|
-
import "../chunk-
|
|
55
|
+
import "../chunk-DK6CMXYI.js";
|
|
56
|
+
import "../chunk-KXKE3SW3.js";
|
|
57
|
+
import "../chunk-SNMTACCY.js";
|
|
58
|
+
import "../chunk-Y47BMZUR.js";
|
|
57
59
|
import "../chunk-VVN3RPV6.js";
|
|
58
|
-
import "../chunk-
|
|
59
|
-
import
|
|
60
|
-
|
|
60
|
+
import "../chunk-EHQCMJHI.js";
|
|
61
|
+
import {
|
|
62
|
+
UsageError
|
|
63
|
+
} from "../chunk-YU2EUD7O.js";
|
|
61
64
|
import "../chunk-PNVTPEO5.js";
|
|
62
65
|
import "../chunk-LNF36PTF.js";
|
|
63
66
|
import {
|
|
@@ -89,18 +92,15 @@ import {
|
|
|
89
92
|
removePusharySettings,
|
|
90
93
|
removePusharyToolPermissions,
|
|
91
94
|
restoreClaudeMcpServer
|
|
92
|
-
} from "../chunk-
|
|
93
|
-
import "../chunk-
|
|
95
|
+
} from "../chunk-TN5PGMH5.js";
|
|
96
|
+
import "../chunk-FYLYAVQG.js";
|
|
94
97
|
import "../chunk-IKBTG3OT.js";
|
|
95
98
|
import {
|
|
96
|
-
|
|
97
|
-
} from "../chunk-
|
|
99
|
+
EXIT
|
|
100
|
+
} from "../chunk-BG4HHB7E.js";
|
|
98
101
|
import {
|
|
99
102
|
readFileOrMissing
|
|
100
103
|
} from "../chunk-TODDEIYG.js";
|
|
101
|
-
import {
|
|
102
|
-
EXIT
|
|
103
|
-
} from "../chunk-BG4HHB7E.js";
|
|
104
104
|
import {
|
|
105
105
|
isInvocationOf
|
|
106
106
|
} from "../chunk-MQMVJDII.js";
|
|
@@ -2912,7 +2912,7 @@ init_fsx();
|
|
|
2912
2912
|
init_paths();
|
|
2913
2913
|
import { createHash as createHash10 } from "crypto";
|
|
2914
2914
|
import { lstatSync as lstatSync5, readFileSync as readFileSync19, readdirSync as readdirSync2, realpathSync as realpathSync4, statSync as statSync5, unlinkSync as unlinkSync5 } from "fs";
|
|
2915
|
-
import { basename as basename3, dirname as dirname9, isAbsolute, join as
|
|
2915
|
+
import { basename as basename3, dirname as dirname9, isAbsolute, join as join21, relative, resolve as resolve3, sep } from "path";
|
|
2916
2916
|
|
|
2917
2917
|
// src/transcript-phone-trust.ts
|
|
2918
2918
|
import { createHash as createHash5 } from "crypto";
|
|
@@ -7623,7 +7623,7 @@ var hookOwnerOfCommands = (commands, appAvailable = true) => {
|
|
|
7623
7623
|
|
|
7624
7624
|
// src/daemon-lifecycle.ts
|
|
7625
7625
|
init_src();
|
|
7626
|
-
import { dirname as dirname8, join as
|
|
7626
|
+
import { dirname as dirname8, join as join20, win32 as win32Path } from "path";
|
|
7627
7627
|
import { existsSync as existsSync6, mkdirSync as mkdirSync7, readFileSync as readFileSync18, realpathSync as realpathSync3, renameSync as renameSync3, statSync as statSync4, unlinkSync as unlinkSync4, writeFileSync as writeFileSync5 } from "fs";
|
|
7628
7628
|
import { createHash as createHash9, randomUUID as randomUUID3 } from "crypto";
|
|
7629
7629
|
import { homedir as homedir8, uptime, userInfo } from "os";
|
|
@@ -7661,11 +7661,20 @@ var DAEMON_ENTRY_GUARD_SOURCE = [
|
|
|
7661
7661
|
""
|
|
7662
7662
|
].join("\n");
|
|
7663
7663
|
|
|
7664
|
+
// src/daemon-supervisor.ts
|
|
7665
|
+
import { join as join19 } from "path";
|
|
7666
|
+
var SUPERVISOR_LAUNCH_FLAG = "--launch";
|
|
7667
|
+
|
|
7664
7668
|
// src/daemon-lifecycle.ts
|
|
7665
7669
|
init_global_package();
|
|
7666
7670
|
var DAEMON_LEASE_RENEW_INTERVAL_MS = 3e4;
|
|
7667
7671
|
var LOCAL_LEASE_TIMEOUT_MS = DAEMON_LEASE_RENEW_INTERVAL_MS * 3;
|
|
7668
7672
|
var DAEMON_YIELD_CHECK_INTERVAL_MS = 2e3;
|
|
7673
|
+
var WINDOWS_TASK_NAME = "Pushary Daemon";
|
|
7674
|
+
var POWERSHELL_SINGLE_QUOTES = /['\u2018\u2019\u201A\u201B]/g;
|
|
7675
|
+
var powershellLiteral = (value) => `'${value.replace(POWERSHELL_SINGLE_QUOTES, (quote) => quote + quote)}'`;
|
|
7676
|
+
var WINDOWS_TASK_LOOKUP = `$task = @(Get-ScheduledTask -ErrorAction Stop) | Where-Object { $_.TaskName -eq ${powershellLiteral(WINDOWS_TASK_NAME)} -and $_.TaskPath -eq '\\' } | Select-Object -First 1; if ($null -eq $task) { exit 3 }`;
|
|
7677
|
+
var powershellCommandLineEndsWithLaunchFlag = `$_.CommandLine.TrimEnd().TrimEnd([char]34).EndsWith(${powershellLiteral(SUPERVISOR_LAUNCH_FLAG)})`;
|
|
7669
7678
|
var HANDOFF_WAIT_FLOOR_MS = DAEMON_YIELD_CHECK_INTERVAL_MS * 2;
|
|
7670
7679
|
|
|
7671
7680
|
// src/transcript-registration.ts
|
|
@@ -7836,7 +7845,7 @@ var storedRegistrationSchema = external_exports.object({
|
|
|
7836
7845
|
endedAt: external_exports.number().positive().optional(),
|
|
7837
7846
|
drained: external_exports.boolean().optional()
|
|
7838
7847
|
});
|
|
7839
|
-
var defaultRegistryDirectory = () => process.env.PUSHARY_TRANSCRIPT_REGISTRY_DIR ||
|
|
7848
|
+
var defaultRegistryDirectory = () => process.env.PUSHARY_TRANSCRIPT_REGISTRY_DIR || join21(pusharyDir(), "transcript-capture");
|
|
7840
7849
|
var cliRegistry = (apiKey = getApiKey()) => ({ apiKey, baseUrl: getBaseUrl(), directory: defaultRegistryDirectory() });
|
|
7841
7850
|
var accountFor = (registry) => createHash10("sha256").update(`${registry.baseUrl}\0${registry.apiKey}`).digest("hex");
|
|
7842
7851
|
var TTL = 48 * 60 * 60 * 1e3;
|
|
@@ -7847,7 +7856,7 @@ var read = (path) => {
|
|
|
7847
7856
|
var consent = (record) => record.consentOverride ?? readTranscriptPreference() ?? true;
|
|
7848
7857
|
var withoutTrailingSlash = (url) => url.replace(/\/+$/, "");
|
|
7849
7858
|
var sameServer = (url, registry) => withoutTrailingSlash(url) === withoutTrailingSlash(registry.baseUrl);
|
|
7850
|
-
var fileFor3 = (registry, sessionId) =>
|
|
7859
|
+
var fileFor3 = (registry, sessionId) => join21(registry.directory, `${createHash10("sha256").update(accountFor(registry) + sessionId).digest("hex")}.json`);
|
|
7851
7860
|
var permitted = (registry, raw2) => raw2.account === accountFor(registry) && consent(raw2) && !raw2.drained && (raw2.source !== "claude" || !!raw2.expectedSiteId || !macOwnsClaudeHooks(raw2.cwd)) && (!raw2.expectedSiteId || raw2.expectedSiteId === raw2.verifiedSiteId && !!raw2.expectedBaseUrl && sameServer(raw2.expectedBaseUrl, registry));
|
|
7852
7861
|
var registeredTranscriptEnabled = (apiKey, sessionId, registry = cliRegistry(apiKey)) => {
|
|
7853
7862
|
try {
|
|
@@ -7857,9 +7866,9 @@ var registeredTranscriptEnabled = (apiKey, sessionId, registry = cliRegistry(api
|
|
|
7857
7866
|
}
|
|
7858
7867
|
};
|
|
7859
7868
|
var macOwnsClaudeHooks = (cwd) => [
|
|
7860
|
-
|
|
7861
|
-
|
|
7862
|
-
|
|
7869
|
+
join21(claudeConfigDir(), "settings.json"),
|
|
7870
|
+
join21(cwd, ".claude", "settings.json"),
|
|
7871
|
+
join21(cwd, ".claude", "settings.local.json")
|
|
7863
7872
|
].some((path) => {
|
|
7864
7873
|
try {
|
|
7865
7874
|
return hookOwnerOf(JSON.parse(readFileSync19(path, "utf8"))) === "app";
|
|
@@ -7870,12 +7879,12 @@ var macOwnsClaudeHooks = (cwd) => [
|
|
|
7870
7879
|
var TRANSCRIPT_ROOT_NAME = { claude: "projects", codex: "sessions", gemini: "tmp", cursor: "projects", hermes: "hermes-history" };
|
|
7871
7880
|
var transcriptRoots = (source) => {
|
|
7872
7881
|
const home = homedir9();
|
|
7873
|
-
if (source === "codex") return [
|
|
7874
|
-
if (source === "cursor") return [
|
|
7875
|
-
if (source === "hermes") return [
|
|
7876
|
-
if (source === "gemini") return [
|
|
7882
|
+
if (source === "codex") return [join21(codexHome(), TRANSCRIPT_ROOT_NAME.codex)];
|
|
7883
|
+
if (source === "cursor") return [join21(home, ".cursor", TRANSCRIPT_ROOT_NAME.cursor)];
|
|
7884
|
+
if (source === "hermes") return [join21(home, ".pushary", TRANSCRIPT_ROOT_NAME.hermes)];
|
|
7885
|
+
if (source === "gemini") return [join21(process.env.GEMINI_CLI_HOME || home, ".gemini", "tmp"), join21(home, ".cache", ".gemini", "tmp")];
|
|
7877
7886
|
const configured = process.env.CLAUDE_CONFIG_DIR;
|
|
7878
|
-
return [
|
|
7887
|
+
return [join21(configured || join21(home, ".claude"), TRANSCRIPT_ROOT_NAME.claude), join21(home, ".claude", TRANSCRIPT_ROOT_NAME.claude)];
|
|
7879
7888
|
};
|
|
7880
7889
|
var isAgentTranscriptRoot = (root, source) => isAbsolute(root) && resolve3(root) === root && basename3(root) === TRANSCRIPT_ROOT_NAME[source];
|
|
7881
7890
|
var acceptedTranscriptRoots = (source, registeredRoot) => typeof registeredRoot === "string" && isAgentTranscriptRoot(registeredRoot, source) ? [...transcriptRoots(source), registeredRoot] : transcriptRoots(source);
|
|
@@ -7885,7 +7894,7 @@ var resolvedSourcePath = (path) => {
|
|
|
7885
7894
|
return realpathSync4(absolute);
|
|
7886
7895
|
} catch {
|
|
7887
7896
|
const parent = dirname9(absolute);
|
|
7888
|
-
return parent === absolute ? absolute :
|
|
7897
|
+
return parent === absolute ? absolute : join21(resolvedSourcePath(parent), basename3(absolute));
|
|
7889
7898
|
}
|
|
7890
7899
|
};
|
|
7891
7900
|
var transcriptRootContaining = (candidate, roots) => {
|