pushary 1.9.66 → 1.9.68

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.
Files changed (127) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/data/SKILL.md +1 -1
  3. package/data/cursor-plugin/skills/pushary/SKILL.md +1 -1
  4. package/data/vscode-plugin/skills/pushary/SKILL.md +1 -1
  5. package/dist/{api-GDSVUTI2.js → api-6Q7XIB67.js} +10 -10
  6. package/dist/bin/pushary-bell-hook.js +25 -25
  7. package/dist/bin/pushary-bell.js +10 -10
  8. package/dist/bin/pushary-claude.js +26 -26
  9. package/dist/bin/pushary-clean.js +73 -74
  10. package/dist/bin/pushary-codex-bridge.js +21 -21
  11. package/dist/bin/pushary-codex-hook.js +30 -30
  12. package/dist/bin/pushary-codex-session.js +8 -8
  13. package/dist/bin/pushary-codex.js +13 -13
  14. package/dist/bin/pushary-connect.js +28 -27
  15. package/dist/bin/pushary-cowork.js +5 -5
  16. package/dist/bin/pushary-daemon.js +40 -39
  17. package/dist/bin/pushary-disconnect.js +25 -25
  18. package/dist/bin/pushary-doctor.js +126 -72
  19. package/dist/bin/pushary-elicitation-hook.js +25 -25
  20. package/dist/bin/pushary-gemini-bridge.js +15 -15
  21. package/dist/bin/pushary-gemini-hook.js +27 -27
  22. package/dist/bin/pushary-hook.js +29 -29
  23. package/dist/bin/pushary-login.js +20 -19
  24. package/dist/bin/pushary-logout.js +26 -27
  25. package/dist/bin/pushary-mcp.js +11 -11
  26. package/dist/bin/pushary-mode.js +16 -15
  27. package/dist/bin/pushary-notification-hook.js +24 -24
  28. package/dist/bin/pushary-opencode-hook.js +26 -26
  29. package/dist/bin/pushary-permission-denied-hook.js +29 -29
  30. package/dist/bin/pushary-permission-hook.js +29 -29
  31. package/dist/bin/pushary-post-hook.js +24 -24
  32. package/dist/bin/pushary-prompt-hook.js +24 -24
  33. package/dist/bin/pushary-session-end-hook.js +26 -26
  34. package/dist/bin/pushary-session-start-hook.js +34 -33
  35. package/dist/bin/pushary-setup.js +115 -98
  36. package/dist/bin/pushary-stats.js +5 -5
  37. package/dist/bin/pushary-status.js +37 -35
  38. package/dist/bin/pushary-stop-hook.js +24 -24
  39. package/dist/bin/pushary-stopfailure-hook.js +24 -24
  40. package/dist/bin/pushary-suggestions.js +15 -14
  41. package/dist/bin/pushary-transcript-register.js +16 -16
  42. package/dist/bin/pushary-transcripts.js +18 -17
  43. package/dist/bin/pushary-upgrade.js +66 -38
  44. package/dist/bin/pushary-wait.js +26 -20
  45. package/dist/bin/pushary.js +7 -7
  46. package/dist/{chunk-ZJV7SFIJ.js → chunk-2HMKZYF5.js} +1 -1
  47. package/dist/{chunk-IA5VWIHV.js → chunk-2VYQG2HG.js} +2 -2
  48. package/dist/{chunk-A47UKPC7.js → chunk-32OSSYGZ.js} +1 -1
  49. package/dist/{chunk-DBUHSUL7.js → chunk-4TIN3T2A.js} +1 -1
  50. package/dist/{chunk-JL3SZJJP.js → chunk-53Q4LRBU.js} +2 -2
  51. package/dist/{chunk-HUGVJBDN.js → chunk-53RH3ZIK.js} +2 -2
  52. package/dist/{chunk-2BL6KWN7.js → chunk-6IFEYELN.js} +9 -9
  53. package/dist/{chunk-DKMVVBXO.js → chunk-6VFZVL65.js} +55 -13
  54. package/dist/{chunk-YQDCTID4.js → chunk-73DHP3JX.js} +4 -4
  55. package/dist/{chunk-G6VJZ3RB.js → chunk-77L2TNJW.js} +1 -1
  56. package/dist/{chunk-IQ3GKPFM.js → chunk-77QP22FL.js} +1 -1
  57. package/dist/{chunk-VURDLVAQ.js → chunk-7S7NTMDJ.js} +3 -3
  58. package/dist/{chunk-4APD2DPI.js → chunk-7SKGS7QN.js} +53 -3
  59. package/dist/chunk-7V63A4AI.js +25 -0
  60. package/dist/{chunk-6BGVSV2Q.js → chunk-7YJSDXLM.js} +1 -1
  61. package/dist/{chunk-MNNQEUQC.js → chunk-AJIT4SCL.js} +27 -8
  62. package/dist/{chunk-QR2QWGQI.js → chunk-BSMHSN3Y.js} +3 -3
  63. package/dist/{chunk-R7C2FS33.js → chunk-C4EDAHXI.js} +1 -1
  64. package/dist/{chunk-7LK3Y6ET.js → chunk-CB4U6WRP.js} +6 -6
  65. package/dist/chunk-D6W7QDQE.js +2298 -0
  66. package/dist/{chunk-V4EOFOB2.js → chunk-E5PEOVUJ.js} +6 -6
  67. package/dist/{chunk-32ZT2ATY.js → chunk-EOWHEZHD.js} +8 -8
  68. package/dist/{chunk-57NTMVMI.js → chunk-EUU5PDUI.js} +6 -6
  69. package/dist/{chunk-XXIJBYNW.js → chunk-GMHQYX3D.js} +1 -1
  70. package/dist/{chunk-V3YBVOTZ.js → chunk-I5FFSOCV.js} +2 -2
  71. package/dist/{chunk-RJ6JEHCP.js → chunk-JAKWPQ2L.js} +1 -1
  72. package/dist/{chunk-XDDSURY3.js → chunk-JPVV27O2.js} +3 -3
  73. package/dist/{chunk-GWYCKTXS.js → chunk-K4TSXWVX.js} +5 -5
  74. package/dist/chunk-LF2NSOAQ.js +299 -0
  75. package/dist/{chunk-6RJZSBPD.js → chunk-LGCVAE52.js} +1 -1
  76. package/dist/{chunk-GDLT32I4.js → chunk-LQAAOXYJ.js} +21 -13
  77. package/dist/{chunk-3ELJIG2R.js → chunk-MCNHNIRC.js} +3 -3
  78. package/dist/{chunk-XIJTXRWB.js → chunk-METUT7V4.js} +2 -2
  79. package/dist/{chunk-MDIGG3Q7.js → chunk-MFWHANKG.js} +3 -3
  80. package/dist/{chunk-GECU7V44.js → chunk-MHC34X5A.js} +3 -3
  81. package/dist/{chunk-376TUN72.js → chunk-MMTA7UKA.js} +3 -3
  82. package/dist/{chunk-XGFFNERF.js → chunk-MUDUWF74.js} +1 -1
  83. package/dist/{chunk-KS3O6O7E.js → chunk-NAQCWM4U.js} +3 -3
  84. package/dist/{chunk-TQNFDNJA.js → chunk-NKPSJOHJ.js} +6 -6
  85. package/dist/{chunk-DPU6H4JY.js → chunk-NLDEC4Y7.js} +3 -3
  86. package/dist/{chunk-XEXF2OFZ.js → chunk-NWN6GGJL.js} +2 -2
  87. package/dist/{chunk-IGO3AGZK.js → chunk-O655YCOG.js} +4 -4
  88. package/dist/{chunk-5FJDODOA.js → chunk-ODAAK2RZ.js} +3 -3
  89. package/dist/{chunk-AVWECJSN.js → chunk-ORHVVRVL.js} +2 -2
  90. package/dist/{chunk-YB3HMDKE.js → chunk-P4XZX7CL.js} +2 -2
  91. package/dist/{chunk-CNJ7SI5V.js → chunk-PBEW5CJK.js} +4 -4
  92. package/dist/{chunk-CN6JFM62.js → chunk-PEPRUUGM.js} +15 -6
  93. package/dist/{chunk-QN25WBXL.js → chunk-PGOPIIOQ.js} +7 -7
  94. package/dist/{chunk-Q5RNYE2L.js → chunk-PZZKXX6Q.js} +4 -4
  95. package/dist/{chunk-SVKCYUYP.js → chunk-Q6JXE3PD.js} +9 -9
  96. package/dist/{chunk-ZAZUDYSF.js → chunk-QYTOYNV2.js} +5 -5
  97. package/dist/{chunk-3FQX74E4.js → chunk-REQO3WWO.js} +23 -8
  98. package/dist/{chunk-EJR5JXMV.js → chunk-RQOT6QL3.js} +43 -5
  99. package/dist/{chunk-AWGBL4P3.js → chunk-RWXDWOQQ.js} +89 -41
  100. package/dist/{chunk-6ZXCWK27.js → chunk-SL7CIZCL.js} +60 -6
  101. package/dist/{chunk-3EZP5ZPS.js → chunk-TVVJ6OYG.js} +4 -4
  102. package/dist/{chunk-B6JC676X.js → chunk-UC2J5RR4.js} +1 -1
  103. package/dist/{chunk-26W46E46.js → chunk-UETS2WEA.js} +27 -10
  104. package/dist/{chunk-EU2ZOZC3.js → chunk-UXN73YAE.js} +3 -3
  105. package/dist/{chunk-XFQAK35L.js → chunk-VHMZPN3N.js} +1 -1
  106. package/dist/{chunk-45KMS76L.js → chunk-VKZ3RJ5U.js} +1 -1
  107. package/dist/{chunk-T6YLXO6N.js → chunk-VRFFMTIG.js} +4 -4
  108. package/dist/{chunk-DIUTSF6I.js → chunk-WPOXZPEH.js} +4 -4
  109. package/dist/{chunk-GO7YKPT3.js → chunk-X2MTVD4W.js} +1 -1
  110. package/dist/{chunk-5J7OZBJ4.js → chunk-XQKB4LEK.js} +2 -2
  111. package/dist/{chunk-QOIPUYUD.js → chunk-XZKSUJ55.js} +1 -1
  112. package/dist/{chunk-RSZQEEEW.js → chunk-YZHJQG6W.js} +8 -6
  113. package/dist/{chunk-UTAARXYQ.js → chunk-ZK5WYAMI.js} +1 -1
  114. package/dist/{codex-app-cards-switch-W7OLKOMO.js → codex-app-cards-switch-VZ4XIDJO.js} +11 -11
  115. package/dist/{codex-desktop-launch-U6V3AXZF.js → codex-desktop-launch-CX2IE5BI.js} +1 -1
  116. package/dist/{codex-session-launch-EFU46WBL.js → codex-session-launch-WUIM6ZGA.js} +18 -18
  117. package/dist/{config-UC4LMCNX.js → config-OBGYURFX.js} +3 -3
  118. package/dist/{global-upgrade-ABF5O3HU.js → global-upgrade-XZ5L7LDB.js} +10 -10
  119. package/dist/{identity-3ZUZPHN6.js → identity-TGQPFIE4.js} +4 -4
  120. package/dist/{live-capabilities-BXWXJARK.js → live-capabilities-JHESROAP.js} +5 -5
  121. package/dist/{paths-FO76CFRQ.js → paths-EOMNC4QM.js} +7 -3
  122. package/dist/{reapply-3T3DFUAI.js → reapply-J5HHUUBE.js} +27 -26
  123. package/dist/src/index.js +28 -28
  124. package/dist/{upgrade-lock-EZ5JIPJE.js → upgrade-lock-VQORI6G5.js} +4 -4
  125. package/dist/{usage-Y6BL7RUD.js → usage-KX2HN47E.js} +3 -3
  126. package/package.json +1 -1
  127. package/dist/chunk-QBNICXMC.js +0 -615
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  announceSubscriptionRequired,
3
3
  isDeferAnswer
4
- } from "./chunk-ZJV7SFIJ.js";
4
+ } from "./chunk-2HMKZYF5.js";
5
5
  import {
6
6
  AUTO_DECISION_WINDOW_MS,
7
7
  DEFAULT_SESSION,
@@ -10,19 +10,19 @@ import {
10
10
  permissionDeniedAction,
11
11
  releaseThrottle,
12
12
  reportEvent
13
- } from "./chunk-2BL6KWN7.js";
13
+ } from "./chunk-6IFEYELN.js";
14
14
  import {
15
15
  askUser,
16
16
  isDecisionStopped,
17
17
  isQuestionLimitRefusal,
18
18
  waitForQuestion
19
- } from "./chunk-ZAZUDYSF.js";
19
+ } from "./chunk-QYTOYNV2.js";
20
20
  import {
21
21
  SubscriptionRequiredError
22
- } from "./chunk-Q5RNYE2L.js";
22
+ } from "./chunk-PZZKXX6Q.js";
23
23
  import {
24
24
  getMachineId
25
- } from "./chunk-IA5VWIHV.js";
25
+ } from "./chunk-2VYQG2HG.js";
26
26
  import {
27
27
  ASK_CONTEXT_MAX,
28
28
  agentQuestionContext,
@@ -34,7 +34,7 @@ import {
34
34
  questionsShownAsASet,
35
35
  shouldDeferToNativeMode,
36
36
  wireVerdictFor
37
- } from "./chunk-EJR5JXMV.js";
37
+ } from "./chunk-RQOT6QL3.js";
38
38
 
39
39
  // src/machine-decision-audit.ts
40
40
  import { basename } from "path";
@@ -1,9 +1,9 @@
1
- import {
2
- APPROVAL_SETTINGS_PATH
3
- } from "./chunk-26W46E46.js";
4
1
  import {
5
2
  readMacAppAgentKey
6
- } from "./chunk-CN6JFM62.js";
3
+ } from "./chunk-PEPRUUGM.js";
4
+ import {
5
+ API_KEYS_PATH
6
+ } from "./chunk-7V63A4AI.js";
7
7
  import {
8
8
  findExportedKeyLines,
9
9
  isAdoptedMacAppKey,
@@ -13,13 +13,13 @@ import {
13
13
  readConfigFileKey,
14
14
  readKeySource,
15
15
  readMacAppKeyPrefix
16
- } from "./chunk-CNJ7SI5V.js";
16
+ } from "./chunk-PBEW5CJK.js";
17
17
  import {
18
18
  absoluteUrl
19
- } from "./chunk-QR2QWGQI.js";
19
+ } from "./chunk-BSMHSN3Y.js";
20
20
  import {
21
21
  isValidApiKey
22
- } from "./chunk-EJR5JXMV.js";
22
+ } from "./chunk-RQOT6QL3.js";
23
23
 
24
24
  // src/key-revocation.ts
25
25
  var SELF_REVOKE_PATH = "/api/v1/server/keys/self/revoke";
@@ -128,7 +128,7 @@ var SPARED_KEY_WHY = {
128
128
  no_creation_record: "This CLI has no record of creating it, so it may be in use by the Mac app or on another machine."
129
129
  };
130
130
  var localRemovalOf = (dryRun) => dryRun ? "would be removed here" : "removed here";
131
- var settingsUrlOf = (baseUrl) => absoluteUrl(baseUrl, APPROVAL_SETTINGS_PATH);
131
+ var settingsUrlOf = (baseUrl) => absoluteUrl(baseUrl, API_KEYS_PATH);
132
132
  var revokeYourselfHint = (reason, baseUrl) => reason === "no_creation_record" ? `Revoke it at ${settingsUrlOf(baseUrl)} if nothing else uses it.` : null;
133
133
  var describeCliKeyRevocation = (outcome, run) => {
134
134
  const label = `API key ${outcome.keyPrefix}`;
@@ -4,23 +4,23 @@ import {
4
4
  } from "./chunk-XHKBHWLX.js";
5
5
  import {
6
6
  readControlMode
7
- } from "./chunk-CNJ7SI5V.js";
7
+ } from "./chunk-PBEW5CJK.js";
8
8
  import {
9
9
  getMachineId
10
- } from "./chunk-IA5VWIHV.js";
10
+ } from "./chunk-2VYQG2HG.js";
11
11
  import {
12
12
  pusharyDir
13
- } from "./chunk-GDLT32I4.js";
13
+ } from "./chunk-LQAAOXYJ.js";
14
14
  import {
15
15
  readJsonSafe,
16
16
  resolveGlobalBinary,
17
17
  writeFileAtomic,
18
18
  writeJsonAtomic,
19
19
  writeJsonAtomicDurable
20
- } from "./chunk-KS3O6O7E.js";
20
+ } from "./chunk-NAQCWM4U.js";
21
21
  import {
22
22
  getApiKey
23
- } from "./chunk-A47UKPC7.js";
23
+ } from "./chunk-32OSSYGZ.js";
24
24
  import {
25
25
  CLI_PACKAGE_NAMES,
26
26
  cmdShimTarget,
@@ -30,7 +30,7 @@ import {
30
30
  } from "./chunk-QTOLNRET.js";
31
31
  import {
32
32
  isRecord
33
- } from "./chunk-EJR5JXMV.js";
33
+ } from "./chunk-RQOT6QL3.js";
34
34
 
35
35
  // src/daemon-lifecycle.ts
36
36
  import { dirname, join, win32 as win32Path } from "path";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  localRepoKey,
3
3
  normalizeRepoRemote
4
- } from "./chunk-EJR5JXMV.js";
4
+ } from "./chunk-RQOT6QL3.js";
5
5
 
6
6
  // src/repo.ts
7
7
  import { existsSync, readFileSync, statSync } from "fs";
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  autoUpdateLock
3
- } from "./chunk-GDLT32I4.js";
3
+ } from "./chunk-LQAAOXYJ.js";
4
4
  import {
5
5
  installPackageGlobally,
6
6
  npmErrorMessage,
7
7
  writeJsonAtomic
8
- } from "./chunk-KS3O6O7E.js";
8
+ } from "./chunk-NAQCWM4U.js";
9
9
 
10
10
  // src/upgrade-lock.ts
11
11
  import { fork } from "child_process";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  isFile
3
- } from "./chunk-KS3O6O7E.js";
3
+ } from "./chunk-NAQCWM4U.js";
4
4
 
5
5
  // src/claude-native-install.ts
6
6
  import { accessSync, constants } from "fs";
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  pusharyDir
3
- } from "./chunk-GDLT32I4.js";
3
+ } from "./chunk-LQAAOXYJ.js";
4
4
  import {
5
5
  readJsonSafe,
6
6
  writeFileAtomic
7
- } from "./chunk-KS3O6O7E.js";
7
+ } from "./chunk-NAQCWM4U.js";
8
8
  import {
9
9
  DECLINED_AGENTS_FILE,
10
10
  DISCONNECT_AGENT_IDS,
@@ -13,7 +13,7 @@ import {
13
13
  serializeDeclinedAgents,
14
14
  withDeclinedAgent,
15
15
  withoutDeclinedAgent
16
- } from "./chunk-EJR5JXMV.js";
16
+ } from "./chunk-RQOT6QL3.js";
17
17
 
18
18
  // src/declined-agents-file.ts
19
19
  import { join } from "path";
@@ -3,24 +3,24 @@ import {
3
3
  expectedLaunchCapabilities,
4
4
  hasSpawnProvider,
5
5
  resolveControlPolicy
6
- } from "./chunk-T6YLXO6N.js";
6
+ } from "./chunk-VRFFMTIG.js";
7
7
  import {
8
8
  daemonHasRemoteProof,
9
9
  daemonServiceManagerAvailable,
10
10
  hasDaemonServiceDefinition,
11
11
  readDaemonNeedsLogin,
12
12
  readDaemonStatus
13
- } from "./chunk-57NTMVMI.js";
13
+ } from "./chunk-EUU5PDUI.js";
14
14
  import {
15
15
  readControlMode,
16
16
  readKeySource
17
- } from "./chunk-CNJ7SI5V.js";
17
+ } from "./chunk-PBEW5CJK.js";
18
18
  import {
19
19
  getMachineId
20
- } from "./chunk-IA5VWIHV.js";
20
+ } from "./chunk-2VYQG2HG.js";
21
21
  import {
22
22
  getBaseUrl
23
- } from "./chunk-A47UKPC7.js";
23
+ } from "./chunk-32OSSYGZ.js";
24
24
  import {
25
25
  getPackageVersion
26
26
  } from "./chunk-QTOLNRET.js";
@@ -0,0 +1,299 @@
1
+ import {
2
+ openCodeConfigDirFrom
3
+ } from "./chunk-CB4U6WRP.js";
4
+ import {
5
+ nativeClaudeInstallPath
6
+ } from "./chunk-JAKWPQ2L.js";
7
+ import {
8
+ grokHome
9
+ } from "./chunk-TVVJ6OYG.js";
10
+ import {
11
+ claudeConfigDir,
12
+ clineDataDirectory,
13
+ codexHomeFrom
14
+ } from "./chunk-LQAAOXYJ.js";
15
+ import {
16
+ HOOK_COMPATIBLE_PROFILES
17
+ } from "./chunk-RQOT6QL3.js";
18
+
19
+ // src/vscode-config.ts
20
+ import { homedir } from "os";
21
+ import { join } from "path";
22
+ var PLUGIN_LOCATIONS_KEY = "chat.pluginLocations";
23
+ var blankJsonComments = (text) => {
24
+ let out = "";
25
+ let i = 0;
26
+ let inString = false;
27
+ let escaped = false;
28
+ while (i < text.length) {
29
+ const ch = text[i];
30
+ if (inString) {
31
+ out += ch;
32
+ if (escaped) escaped = false;
33
+ else if (ch === "\\") escaped = true;
34
+ else if (ch === '"') inString = false;
35
+ i += 1;
36
+ continue;
37
+ }
38
+ if (ch === '"') {
39
+ inString = true;
40
+ out += ch;
41
+ i += 1;
42
+ continue;
43
+ }
44
+ if (ch === "/" && text[i + 1] === "/") {
45
+ while (i < text.length && text[i] !== "\n") {
46
+ out += " ";
47
+ i += 1;
48
+ }
49
+ continue;
50
+ }
51
+ if (ch === "/" && text[i + 1] === "*") {
52
+ const end = text.indexOf("*/", i + 2);
53
+ const stop = end === -1 ? text.length : end + 2;
54
+ while (i < stop) {
55
+ out += text[i] === "\n" ? "\n" : " ";
56
+ i += 1;
57
+ }
58
+ continue;
59
+ }
60
+ out += ch;
61
+ i += 1;
62
+ }
63
+ return out;
64
+ };
65
+ var asRecord = (value) => value && typeof value === "object" && !Array.isArray(value) ? value : void 0;
66
+ var parseJsonc = (text) => {
67
+ const blanked = blankJsonComments(text);
68
+ const withoutTrailingCommas = blanked.replace(/,(\s*[}\]])/g, "$1");
69
+ try {
70
+ return asRecord(JSON.parse(withoutTrailingCommas));
71
+ } catch {
72
+ return void 0;
73
+ }
74
+ };
75
+ var rootBraceIndex = (text) => blankJsonComments(text).indexOf("{");
76
+ var detectIndent = (text) => {
77
+ const match = /\n([ \t]+)"/.exec(text);
78
+ return match?.[1] ?? " ";
79
+ };
80
+ var freshDocument = (pluginDir, indent = " ") => `${JSON.stringify({ [PLUGIN_LOCATIONS_KEY]: { [pluginDir]: true } }, null, indent)}
81
+ `;
82
+ var registerPluginLocation = (existing, pluginDir) => {
83
+ if (existing === null || existing.trim() === "") {
84
+ return { kind: "created", content: freshDocument(pluginDir) };
85
+ }
86
+ const indent = detectIndent(existing);
87
+ try {
88
+ const parsed2 = asRecord(JSON.parse(existing));
89
+ if (parsed2) {
90
+ const locations2 = asRecord(parsed2[PLUGIN_LOCATIONS_KEY]) ?? {};
91
+ if (locations2[pluginDir] === true) return { kind: "already" };
92
+ parsed2[PLUGIN_LOCATIONS_KEY] = { ...locations2, [pluginDir]: true };
93
+ return { kind: "merged", content: `${JSON.stringify(parsed2, null, indent)}
94
+ ` };
95
+ }
96
+ } catch {
97
+ }
98
+ const parsed = parseJsonc(existing);
99
+ if (!parsed) return { kind: "manual" };
100
+ const locations = asRecord(parsed[PLUGIN_LOCATIONS_KEY]);
101
+ if (locations?.[pluginDir] === true) return { kind: "already" };
102
+ if (parsed[PLUGIN_LOCATIONS_KEY] !== void 0) return { kind: "manual" };
103
+ const brace = rootBraceIndex(existing);
104
+ if (brace === -1) return { kind: "manual" };
105
+ const needsComma = Object.keys(parsed).length > 0;
106
+ const line = `
107
+ ${indent}${JSON.stringify(PLUGIN_LOCATIONS_KEY)}: { ${JSON.stringify(pluginDir)}: true }${needsComma ? "," : ""}`;
108
+ return {
109
+ kind: "inserted",
110
+ content: `${existing.slice(0, brace + 1)}${line}${existing.slice(brace + 1)}`
111
+ };
112
+ };
113
+ var unregisterPluginLocation = (existing, pluginDir) => {
114
+ if (existing === null || existing.trim() === "") return { kind: "absent" };
115
+ const indent = detectIndent(existing);
116
+ try {
117
+ const parsed2 = asRecord(JSON.parse(existing));
118
+ if (parsed2) {
119
+ const locations2 = asRecord(parsed2[PLUGIN_LOCATIONS_KEY]);
120
+ if (!locations2 || !(pluginDir in locations2)) return { kind: "absent" };
121
+ const remaining = { ...locations2 };
122
+ delete remaining[pluginDir];
123
+ if (Object.keys(remaining).length === 0) delete parsed2[PLUGIN_LOCATIONS_KEY];
124
+ else parsed2[PLUGIN_LOCATIONS_KEY] = remaining;
125
+ return { kind: "removed", content: `${JSON.stringify(parsed2, null, indent)}
126
+ ` };
127
+ }
128
+ } catch {
129
+ }
130
+ const parsed = parseJsonc(existing);
131
+ if (!parsed) return { kind: "manual" };
132
+ const locations = asRecord(parsed[PLUGIN_LOCATIONS_KEY]);
133
+ if (!locations || !(pluginDir in locations)) return { kind: "absent" };
134
+ const line = new RegExp(
135
+ `\\n[ \\t]*${escapeRegExp(JSON.stringify(PLUGIN_LOCATIONS_KEY))}\\s*:\\s*\\{\\s*${escapeRegExp(JSON.stringify(pluginDir))}\\s*:\\s*true\\s*\\},?`
136
+ );
137
+ if (!line.test(existing)) return { kind: "manual" };
138
+ return { kind: "removed", content: existing.replace(line, "") };
139
+ };
140
+ var escapeRegExp = (value) => value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
141
+ var isPluginRegistered = (existing, pluginDir) => {
142
+ if (!existing) return false;
143
+ const parsed = parseJsonc(existing);
144
+ return asRecord(parsed?.[PLUGIN_LOCATIONS_KEY])?.[pluginDir] === true;
145
+ };
146
+ var pluginLocationSnippet = (pluginDir) => `"${PLUGIN_LOCATIONS_KEY}": {
147
+ ${JSON.stringify(pluginDir)}: true
148
+ }`;
149
+ var VSCODE_PRODUCTS = ["Code", "Code - Insiders"];
150
+ var settingsRoot = (home, platform) => {
151
+ if (platform === "darwin") return join(home, "Library", "Application Support");
152
+ if (platform === "win32") return process.env.APPDATA?.trim() || join(home, "AppData", "Roaming");
153
+ return process.env.XDG_CONFIG_HOME?.trim() || join(home, ".config");
154
+ };
155
+ var vscodeSettingsCandidates = (home = homedir(), platform = process.platform) => {
156
+ const root = settingsRoot(home, platform);
157
+ return VSCODE_PRODUCTS.map((product) => join(root, product, "User", "settings.json"));
158
+ };
159
+ var vscodeSettingsTargets = (exists, home, platform) => {
160
+ const candidates = vscodeSettingsCandidates(home, platform);
161
+ const present = candidates.filter((path) => exists(path));
162
+ return present.length > 0 ? present : candidates.slice(0, 1);
163
+ };
164
+
165
+ // src/setup/detect.ts
166
+ import { execSync } from "child_process";
167
+ import { existsSync } from "fs";
168
+ import { homedir as homedir2 } from "os";
169
+ import { dirname, join as join2 } from "path";
170
+ var whichCommand = () => process.platform === "win32" ? "where" : "which";
171
+ var binaryOnPath = (binary) => {
172
+ try {
173
+ execSync(`${whichCommand()} ${binary}`, { stdio: "ignore", timeout: 5e3 });
174
+ return true;
175
+ } catch {
176
+ return false;
177
+ }
178
+ };
179
+ var defaultDeps = { onPath: binaryOnPath, exists: existsSync };
180
+ var detectAgent = (probe, deps = defaultDeps) => {
181
+ const checked = [];
182
+ if (probe.binary) {
183
+ checked.push(`${whichCommand()} ${probe.binary}`);
184
+ if (deps.onPath(probe.binary)) {
185
+ return { kind: "installed", evidence: `${probe.binary} on PATH`, strong: true };
186
+ }
187
+ }
188
+ for (const path of probe.paths) {
189
+ checked.push(path);
190
+ if (deps.exists(path)) return { kind: "installed", evidence: path, strong: true };
191
+ }
192
+ for (const marker of probe.configMarkers) {
193
+ checked.push(marker);
194
+ if (deps.exists(marker)) return { kind: "installed", evidence: marker, strong: false };
195
+ }
196
+ if (probe.binary === null && probe.paths.length === 0 && probe.configMarkers.length === 0) {
197
+ return { kind: "unknown" };
198
+ }
199
+ return { kind: "not-found", checked };
200
+ };
201
+ var agentProbes = (home = homedir2(), platform = process.platform) => ({
202
+ claude_code: {
203
+ binary: "claude",
204
+ // The native installer puts it here, outside a default non-login PATH.
205
+ paths: [nativeClaudeInstallPath(home, platform)],
206
+ configMarkers: [claudeConfigDir(home)]
207
+ },
208
+ codex: {
209
+ binary: "codex",
210
+ paths: [],
211
+ configMarkers: [codexHomeFrom(home)]
212
+ },
213
+ gemini_cli: {
214
+ binary: "gemini",
215
+ paths: [],
216
+ configMarkers: [join2(home, ".gemini")]
217
+ },
218
+ hermes: {
219
+ binary: "hermes",
220
+ paths: [],
221
+ configMarkers: [join2(home, ".hermes")]
222
+ },
223
+ cursor: {
224
+ // GUI editor. `cursor` on PATH only exists if the user ran "Install 'cursor'
225
+ // command in PATH" from the command palette, which most never do.
226
+ binary: "cursor",
227
+ paths: platform === "darwin" ? ["/Applications/Cursor.app"] : platform === "win32" ? [join2(process.env.LOCALAPPDATA ?? join2(home, "AppData", "Local"), "Programs", "cursor")] : ["/usr/share/cursor", join2(home, ".local", "share", "cursor")],
228
+ configMarkers: [join2(home, ".cursor")]
229
+ },
230
+ vscode: {
231
+ // Like Cursor, a GUI editor: `code` on PATH only exists if the user ran
232
+ // "Shell Command: Install 'code' command in PATH", which on macOS is opt-in.
233
+ binary: "code",
234
+ paths: platform === "darwin" ? ["/Applications/Visual Studio Code.app"] : platform === "win32" ? [join2(process.env.LOCALAPPDATA ?? join2(home, "AppData", "Local"), "Programs", "Microsoft VS Code")] : ["/usr/share/code", join2(home, ".local", "share", "code")],
235
+ // The settings directory rather than ~/.vscode, because the settings
236
+ // directory is what this installer actually writes to. Insiders counts:
237
+ // someone running only Insiders still has VS Code.
238
+ configMarkers: vscodeSettingsCandidates(home).map((path) => dirname(path))
239
+ },
240
+ opencode: {
241
+ binary: "opencode",
242
+ paths: [],
243
+ // Resolved rather than spelled: OpenCode honours OPENCODE_CONFIG_DIR and then
244
+ // XDG_CONFIG_HOME, and `~/.opencode` — the obvious guess — is a path it has
245
+ // never used.
246
+ configMarkers: [openCodeConfigDirFrom(home)]
247
+ },
248
+ fx: {
249
+ binary: null,
250
+ paths: [join2(home, ".fx", "settings.json"), join2(home, ".fx", "sessions"), join2(home, ".fx", "history.jsonl")],
251
+ configMarkers: []
252
+ },
253
+ cline: {
254
+ binary: "cline",
255
+ paths: [clineDataDirectory({ home, environment: process.env })],
256
+ configMarkers: []
257
+ },
258
+ ...compatibleProbes(),
259
+ grok: { binary: "grok", paths: [join2(home, ".local", "bin", "grok")], configMarkers: [grokHome(home)] },
260
+ // "Other" is a set of printed instructions for any MCP or HTTP client. There is
261
+ // nothing to detect, and it must never be auto-selected.
262
+ custom: { binary: null, paths: [], configMarkers: [] }
263
+ });
264
+ var compatibleProbes = () => HOOK_COMPATIBLE_PROFILES.reduce((probes, profile) => ({
265
+ ...probes,
266
+ [profile.agentType]: {
267
+ binary: profile.binary,
268
+ paths: [],
269
+ configMarkers: []
270
+ }
271
+ }), {});
272
+ var detectAllAgents = (deps = defaultDeps, home) => {
273
+ const probes = agentProbes(home);
274
+ return Object.keys(probes).map((agent) => ({
275
+ agent,
276
+ result: detectAgent(probes[agent], deps)
277
+ }));
278
+ };
279
+ var isDetected = (result) => result.kind === "installed";
280
+ var shortenHome = (path, home = homedir2()) => home && path.startsWith(home) ? `~${path.slice(home.length)}` : path;
281
+ var describeDetection = (result, home) => {
282
+ if (result.kind !== "installed") return null;
283
+ const evidence = shortenHome(result.evidence, home);
284
+ return result.strong ? evidence : `${evidence}, config only`;
285
+ };
286
+
287
+ export {
288
+ registerPluginLocation,
289
+ unregisterPluginLocation,
290
+ isPluginRegistered,
291
+ pluginLocationSnippet,
292
+ vscodeSettingsTargets,
293
+ detectAgent,
294
+ agentProbes,
295
+ detectAllAgents,
296
+ isDetected,
297
+ shortenHome,
298
+ describeDetection
299
+ };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  readConfigFileKey
3
- } from "./chunk-CNJ7SI5V.js";
3
+ } from "./chunk-PBEW5CJK.js";
4
4
 
5
5
  // src/bell/fleet.ts
6
6
  import { closeSync, constants, futimesSync, lstatSync, mkdirSync, openSync, readdirSync, unlinkSync } from "fs";
@@ -4,7 +4,7 @@ import {
4
4
  quoteIfNeeded,
5
5
  shellDoubleQuoted,
6
6
  writeFileAtomic
7
- } from "./chunk-KS3O6O7E.js";
7
+ } from "./chunk-NAQCWM4U.js";
8
8
  import {
9
9
  CLAUDE_PRETOOLUSE_MATCHER,
10
10
  CODEX_QUESTION_TOOLS,
@@ -12,7 +12,7 @@ import {
12
12
  HOOK_LOCATOR_BINARY,
13
13
  PRETOOLUSE_GATED_TOOLS,
14
14
  withHookHoldBudget
15
- } from "./chunk-EJR5JXMV.js";
15
+ } from "./chunk-RQOT6QL3.js";
16
16
 
17
17
  // src/setup/paths.ts
18
18
  import { createHash as createHash2 } from "crypto";
@@ -873,6 +873,20 @@ var hasInstructionBlock = (filePath) => {
873
873
  }
874
874
  };
875
875
 
876
+ // src/pushary-mcp-url.ts
877
+ var PUSHARY_MCP_HOSTS = /* @__PURE__ */ new Set(["pushary.com", "www.pushary.com"]);
878
+ var PUSHARY_MCP_PATH_PREFIX = "/api/mcp";
879
+ var isPusharyMcpPath = (pathname) => pathname === PUSHARY_MCP_PATH_PREFIX || pathname.startsWith(`${PUSHARY_MCP_PATH_PREFIX}/`);
880
+ var isPusharyMcpUrl = (value) => {
881
+ if (typeof value !== "string") return false;
882
+ try {
883
+ const url = new URL(value);
884
+ return PUSHARY_MCP_HOSTS.has(url.hostname) && isPusharyMcpPath(url.pathname);
885
+ } catch {
886
+ return false;
887
+ }
888
+ };
889
+
876
890
  // src/cline-config.ts
877
891
  var CLINE_LABEL = "Cline";
878
892
  var CLINE_SERVER_NAME = "pushary";
@@ -892,8 +906,6 @@ var AUTHORIZATION_HEADER = "Authorization";
892
906
  var PUSHARY_KEY_BEARER_PREFIX = "Bearer pk_";
893
907
  var TRANSPORT_FIELDS = /* @__PURE__ */ new Set(["transport", "type", "transportType", "url", "headers", "command", "args", "cwd", "env"]);
894
908
  var CONNECTION_SWITCH_FIELD = "disabled";
895
- var PUSHARY_MCP_HOSTS = /* @__PURE__ */ new Set(["pushary.com", "www.pushary.com"]);
896
- var PUSHARY_MCP_PATH_PREFIX = "/api/mcp";
897
909
  var CLINE_AUTO_APPROVE_STEP = 'In Cline, open Auto-approve under the chat box and tick "Use MCP servers", so Pushary calls run without waiting for a click in VS Code. That setting covers every MCP server in Cline, not only Pushary.';
898
910
  var CLINE_RELOAD_STEP = "Reload VS Code (Developer: Reload Window) or restart the Cline CLI so Cline loads the Pushary server.";
899
911
  var CLINE_TOOL_NOTE = `In Cline, these tools come from the MCP server named "${CLINE_SERVER_NAME}". Cline's own question tool waits in VS Code and never reaches the user's phone, so when the user may be away, ask through Pushary's \`ask_user\` instead. Cline cannot tell whether the user is watching VS Code; Pushary's delivery mode decides where a notification lands, so call \`send_notification\` with context type "task_complete" when a task of several steps finishes.`;
@@ -936,15 +948,6 @@ var transportOf = (entry2) => {
936
948
  const record = asRecord4(entry2);
937
949
  return asRecord4(record?.transport) ?? record;
938
950
  };
939
- var isPusharyMcpUrl = (value) => {
940
- if (typeof value !== "string") return false;
941
- try {
942
- const url = new URL(value);
943
- return PUSHARY_MCP_HOSTS.has(url.hostname) && (url.pathname === PUSHARY_MCP_PATH_PREFIX || url.pathname.startsWith(`${PUSHARY_MCP_PATH_PREFIX}/`));
944
- } catch {
945
- return false;
946
- }
947
- };
948
951
  var authorizationBearer = (apiKey) => `Bearer ${apiKey}`;
949
952
  var clinePusharyEntry = (apiKey) => ({
950
953
  transport: {
@@ -1049,6 +1052,8 @@ var clientReportClaims = () => join5(pusharyDir(), "client-reports");
1049
1052
  var claudeRegistrationReceipt = () => join5(claudeSetupDir(), "claude-registration.json");
1050
1053
  var hermesConfig = () => join5(homedir3(), ".hermes", "config.yaml");
1051
1054
  var hermesConfigReceipt = () => join5(pusharyDir(), "setup", "hermes-config.json");
1055
+ var hermesSetupReceipt = () => join5(pusharyDir(), "setup", "hermes-plugin.json");
1056
+ var hermesAppWiringRecord = () => join5(pusharyDir(), "setup", "hermes-wired-by-mac-app");
1052
1057
  var fxQuestionRuleReceipt = () => join5(pusharyDir(), "setup", "fx-question-rule.json");
1053
1058
  var hookTakeoverReceipt = (agent) => join5(agent === "claude_code" ? claudeSetupDir() : join5(pusharyDir(), "setup"), `hook-takeover-${agent}.json`);
1054
1059
  var codexSkillDir2 = () => join5(codexHome(), "skills", "pushary");
@@ -1140,6 +1145,7 @@ export {
1140
1145
  refreshInstructionBlock,
1141
1146
  removeInstructionBlock,
1142
1147
  hasInstructionBlock,
1148
+ isPusharyMcpUrl,
1143
1149
  CLINE_LABEL,
1144
1150
  CLINE_AUTO_APPROVE_STEP,
1145
1151
  CLINE_RELOAD_STEP,
@@ -1185,6 +1191,8 @@ export {
1185
1191
  claudeRegistrationReceipt,
1186
1192
  hermesConfig,
1187
1193
  hermesConfigReceipt,
1194
+ hermesSetupReceipt,
1195
+ hermesAppWiringRecord,
1188
1196
  fxQuestionRuleReceipt,
1189
1197
  hookTakeoverReceipt,
1190
1198
  codexSkillDir2,
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  pusharyDir
3
- } from "./chunk-GDLT32I4.js";
3
+ } from "./chunk-LQAAOXYJ.js";
4
4
  import {
5
5
  readJsonSafe
6
- } from "./chunk-KS3O6O7E.js";
6
+ } from "./chunk-NAQCWM4U.js";
7
7
  import {
8
8
  isRecord
9
- } from "./chunk-EJR5JXMV.js";
9
+ } from "./chunk-RQOT6QL3.js";
10
10
 
11
11
  // src/process-ownership.ts
12
12
  import { createHash, randomUUID } from "crypto";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  configFilePath
3
- } from "./chunk-A47UKPC7.js";
3
+ } from "./chunk-32OSSYGZ.js";
4
4
  import {
5
5
  normalizeInstallSource
6
- } from "./chunk-EJR5JXMV.js";
6
+ } from "./chunk-RQOT6QL3.js";
7
7
 
8
8
  // src/install-source.ts
9
9
  import { readFileSync } from "fs";
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  findNativeClaudeInstall
3
- } from "./chunk-RJ6JEHCP.js";
3
+ } from "./chunk-JAKWPQ2L.js";
4
4
  import {
5
5
  parseVersion
6
- } from "./chunk-KS3O6O7E.js";
6
+ } from "./chunk-NAQCWM4U.js";
7
7
  import {
8
8
  isRecord
9
- } from "./chunk-EJR5JXMV.js";
9
+ } from "./chunk-RQOT6QL3.js";
10
10
 
11
11
  // src/setup/agent-probe.ts
12
12
  import { execSync } from "child_process";
@@ -1,19 +1,19 @@
1
1
  import {
2
2
  readExistingMachineId
3
- } from "./chunk-IA5VWIHV.js";
3
+ } from "./chunk-2VYQG2HG.js";
4
4
  import {
5
5
  NetworkError
6
6
  } from "./chunk-PPY5N2E6.js";
7
7
  import {
8
8
  getBaseUrl
9
- } from "./chunk-A47UKPC7.js";
9
+ } from "./chunk-32OSSYGZ.js";
10
10
  import {
11
11
  getPackageVersion
12
12
  } from "./chunk-QTOLNRET.js";
13
13
  import {
14
14
  clientContextHeaders,
15
15
  redactSecretsFromContent
16
- } from "./chunk-EJR5JXMV.js";
16
+ } from "./chunk-RQOT6QL3.js";
17
17
 
18
18
  // src/cli/net.ts
19
19
  import { createRequire } from "module";