pushary 1.9.102 → 1.9.104

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 (135) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/README.md +1 -0
  3. package/dist/{api-3O3GJV3V.js → api-QOG7JVXE.js} +13 -12
  4. package/dist/bin/pushary-audit.d.ts +1 -0
  5. package/dist/bin/pushary-audit.js +263 -0
  6. package/dist/bin/pushary-bell-hook.js +31 -30
  7. package/dist/bin/pushary-bell.js +14 -13
  8. package/dist/bin/pushary-claude.js +42 -41
  9. package/dist/bin/pushary-clean.js +40 -39
  10. package/dist/bin/pushary-codex-bridge.js +25 -24
  11. package/dist/bin/pushary-codex-hook.js +39 -38
  12. package/dist/bin/pushary-codex-session.js +8 -8
  13. package/dist/bin/pushary-codex.js +17 -16
  14. package/dist/bin/pushary-connect.js +33 -32
  15. package/dist/bin/pushary-cowork.js +8 -8
  16. package/dist/bin/pushary-daemon.js +52 -50
  17. package/dist/bin/pushary-disconnect.js +32 -31
  18. package/dist/bin/pushary-display-hook.js +21 -20
  19. package/dist/bin/pushary-doctor.js +56 -54
  20. package/dist/bin/pushary-elicitation-hook.js +31 -30
  21. package/dist/bin/pushary-gemini-bridge.js +16 -15
  22. package/dist/bin/pushary-gemini-hook.js +34 -33
  23. package/dist/bin/pushary-hook.js +36 -35
  24. package/dist/bin/pushary-login.js +27 -26
  25. package/dist/bin/pushary-logout.js +33 -32
  26. package/dist/bin/pushary-mcp.js +14 -13
  27. package/dist/bin/pushary-mode.js +19 -18
  28. package/dist/bin/pushary-notification-hook.js +31 -30
  29. package/dist/bin/pushary-opencode-hook.js +33 -32
  30. package/dist/bin/pushary-permission-denied-hook.js +35 -34
  31. package/dist/bin/pushary-permission-hook.js +36 -35
  32. package/dist/bin/pushary-post-hook.js +31 -30
  33. package/dist/bin/pushary-prompt-hook.js +31 -30
  34. package/dist/bin/pushary-session-end-hook.js +33 -32
  35. package/dist/bin/pushary-session-start-hook.js +41 -40
  36. package/dist/bin/pushary-setup.js +71 -69
  37. package/dist/bin/pushary-stats.js +6 -6
  38. package/dist/bin/pushary-status.js +39 -38
  39. package/dist/bin/pushary-stop-hook.js +31 -30
  40. package/dist/bin/pushary-stopfailure-hook.js +31 -30
  41. package/dist/bin/pushary-suggestions.js +19 -18
  42. package/dist/bin/pushary-transcript-register.js +22 -21
  43. package/dist/bin/pushary-transcripts.js +30 -29
  44. package/dist/bin/pushary-upgrade.js +48 -46
  45. package/dist/bin/pushary-wait.js +19 -18
  46. package/dist/bin/pushary.js +11 -9
  47. package/dist/{chunk-YETNUPV5.js → chunk-2MRLDEQY.js} +3 -3
  48. package/dist/{chunk-KOUB4ZLX.js → chunk-3A7REECH.js} +1 -1
  49. package/dist/{chunk-O5ZKMUTP.js → chunk-3KEY3453.js} +6 -6
  50. package/dist/{chunk-JVE4P54I.js → chunk-4HBWXZPI.js} +5 -3
  51. package/dist/{chunk-WYJ6QM7K.js → chunk-4JBCPRWZ.js} +2 -2
  52. package/dist/{chunk-J6SSLXSU.js → chunk-4OLWSYX5.js} +4 -4
  53. package/dist/{chunk-JECH4NJL.js → chunk-4QI6SBNR.js} +6 -4
  54. package/dist/{chunk-UOE26LPT.js → chunk-5BX57BGT.js} +7 -7
  55. package/dist/{chunk-4FAJQPFY.js → chunk-5YVBVJOH.js} +330 -0
  56. package/dist/{chunk-4TVLPGJV.js → chunk-6B4R7HUV.js} +1 -1
  57. package/dist/{chunk-JKOAAIJD.js → chunk-7RHEZVAE.js} +5 -5
  58. package/dist/{chunk-RVSRPDRF.js → chunk-AE2BQ3XM.js} +2 -2
  59. package/dist/{chunk-SRE6XJ3K.js → chunk-AG7PFGGE.js} +7 -7
  60. package/dist/{chunk-O7ITTNDD.js → chunk-AYWX6M7J.js} +5 -3
  61. package/dist/{chunk-JUA7MX2V.js → chunk-BDSI2NEN.js} +4 -4
  62. package/dist/{chunk-KZERVKTD.js → chunk-BG4HHB7E.js} +2 -1
  63. package/dist/{chunk-ZCYLCD6L.js → chunk-CC4LGKEZ.js} +5 -5
  64. package/dist/{chunk-CQ7QE4W2.js → chunk-CFTPHNBY.js} +1 -1
  65. package/dist/{chunk-AFGMZZEB.js → chunk-FH6PHTUD.js} +2 -2
  66. package/dist/{chunk-IOQ3ZCAE.js → chunk-FQNMUJTK.js} +1 -1
  67. package/dist/{chunk-AWF5WICI.js → chunk-FVERRWDP.js} +2 -2
  68. package/dist/{chunk-KTM2X3XQ.js → chunk-FXTUSTQG.js} +16 -16
  69. package/dist/{chunk-ZXK46QT4.js → chunk-FYQHXN4X.js} +2 -2
  70. package/dist/{chunk-AZSOH2SF.js → chunk-GV2MF4NY.js} +2 -2
  71. package/dist/{chunk-4QO267OY.js → chunk-GV5TEADP.js} +1 -1
  72. package/dist/{chunk-FF7L4B3W.js → chunk-HB7FHRTT.js} +9 -9
  73. package/dist/{chunk-T7G6IIV4.js → chunk-HHEFOGT2.js} +3 -3
  74. package/dist/{chunk-3OIUMHHO.js → chunk-HJ4EBHK4.js} +2 -2
  75. package/dist/{chunk-MK2XE66G.js → chunk-HXZYBYBD.js} +3 -3
  76. package/dist/{chunk-SA4PCB6N.js → chunk-I3T5YV5I.js} +7 -7
  77. package/dist/{chunk-KLJ2CTT7.js → chunk-ID4BZRBW.js} +4 -4
  78. package/dist/{chunk-Y7KRX7U4.js → chunk-IVAXF3JG.js} +1 -1
  79. package/dist/{chunk-MA65OP6M.js → chunk-JGRBWTDW.js} +14 -12
  80. package/dist/{chunk-WPK2UWDU.js → chunk-JMTOQXHV.js} +2 -2
  81. package/dist/{chunk-QD57EL3I.js → chunk-JVZVO3K5.js} +3 -3
  82. package/dist/{chunk-KACD6W6J.js → chunk-KDIZS7FN.js} +1 -1
  83. package/dist/{chunk-T6TQETDN.js → chunk-LIDIA5JW.js} +4 -4
  84. package/dist/{chunk-G7RMOSRX.js → chunk-M7BDKARZ.js} +1 -1
  85. package/dist/{chunk-Y3SZVZF6.js → chunk-N4RIGNDX.js} +2 -2
  86. package/dist/{chunk-7BIVBOD5.js → chunk-NGY2WS3X.js} +5 -5
  87. package/dist/{chunk-HYAQIKYB.js → chunk-NKA2PEQQ.js} +6 -6
  88. package/dist/{chunk-MP3SEXXJ.js → chunk-OFRQNTJD.js} +1 -1
  89. package/dist/{chunk-NZQEABRO.js → chunk-OPV6724W.js} +13 -11
  90. package/dist/{chunk-SXAZPWL7.js → chunk-ORIVT4BL.js} +8 -6
  91. package/dist/{chunk-V5DV7XZN.js → chunk-PK6LBL3Z.js} +4 -4
  92. package/dist/{chunk-6N5DQG5F.js → chunk-PYUN7HNY.js} +2 -2
  93. package/dist/chunk-QENTGE75.js +86 -0
  94. package/dist/{chunk-PM34Z5WX.js → chunk-RDUY7MKN.js} +6 -6
  95. package/dist/{chunk-X3HBR57D.js → chunk-RUN772MN.js} +7 -7
  96. package/dist/{chunk-VD6CAELE.js → chunk-RYUIXLZ5.js} +4 -4
  97. package/dist/{chunk-2PR5EP7N.js → chunk-SJCHJQKT.js} +4 -4
  98. package/dist/{chunk-EOD3DBIN.js → chunk-SJJCCFD5.js} +3 -3
  99. package/dist/{chunk-3K7PB5LI.js → chunk-SPM4VNED.js} +3 -3
  100. package/dist/{chunk-3Q2X3T3U.js → chunk-SVZPRTCK.js} +1 -1
  101. package/dist/{chunk-UQWEH7CK.js → chunk-TMJK3CLD.js} +5 -5
  102. package/dist/{chunk-AHIAB7JQ.js → chunk-TYH7SNKD.js} +1 -1
  103. package/dist/{chunk-PPWEBIKL.js → chunk-TYM6IH5F.js} +23 -9
  104. package/dist/{chunk-VJOMBYY5.js → chunk-U5DBYW63.js} +1 -1
  105. package/dist/{chunk-TLERJKSE.js → chunk-UL52HYKN.js} +1 -1
  106. package/dist/{chunk-Z2TX7DVU.js → chunk-UUYLBSAU.js} +15 -13
  107. package/dist/{chunk-7OZOFTTB.js → chunk-UYJLXAP4.js} +7 -7
  108. package/dist/{chunk-BQHZRH6S.js → chunk-VAZCGOLS.js} +26 -110
  109. package/dist/{chunk-LURFSDCL.js → chunk-VUFHYMSP.js} +1 -1
  110. package/dist/{chunk-JPKJBKZE.js → chunk-VZY4GD4T.js} +9 -9
  111. package/dist/{chunk-5PW25NHB.js → chunk-WBLK4WLO.js} +5 -5
  112. package/dist/{chunk-2S5J5YI2.js → chunk-XDTE55H7.js} +5 -5
  113. package/dist/{chunk-3ITURBPE.js → chunk-XTMAVKO3.js} +5 -5
  114. package/dist/{chunk-E7WJQBK3.js → chunk-XXNXMX2G.js} +14 -14
  115. package/dist/{chunk-WZNLWDSL.js → chunk-XXPA3X6L.js} +7 -7
  116. package/dist/{chunk-PWGD5EP6.js → chunk-YDT6TVGN.js} +7 -1
  117. package/dist/{chunk-NMUI3ZWG.js → chunk-YPY4YCIZ.js} +1 -1
  118. package/dist/{chunk-PPY5N2E6.js → chunk-YU2EUD7O.js} +1 -1
  119. package/dist/{chunk-WVAJSBI2.js → chunk-ZBT3U2VB.js} +3 -3
  120. package/dist/{chunk-AVXG5QB2.js → chunk-ZUXDGVW4.js} +5 -5
  121. package/dist/{codex-app-cards-switch-D475JLP5.js → codex-app-cards-switch-6IDDWXYS.js} +13 -12
  122. package/dist/{codex-desktop-launch-WOPEZMO6.js → codex-desktop-launch-VP4TXVCM.js} +1 -1
  123. package/dist/{codex-session-launch-AWWECV2L.js → codex-session-launch-OACJB5NN.js} +22 -21
  124. package/dist/{config-A5EC37VZ.js → config-S7HAIK6E.js} +3 -3
  125. package/dist/{global-upgrade-V6FA6MUF.js → global-upgrade-OOFEGR4H.js} +12 -11
  126. package/dist/{identity-BEPQQHNR.js → identity-QSM6MVAH.js} +5 -4
  127. package/dist/{live-capabilities-EAM2QN73.js → live-capabilities-NSVW362T.js} +6 -5
  128. package/dist/{paths-2IEEYSHM.js → paths-KFRRYJWL.js} +4 -3
  129. package/dist/reapply-7H3VCPW4.js +65 -0
  130. package/dist/src/index.js +37 -36
  131. package/dist/{upgrade-lock-DLGVC34L.js → upgrade-lock-BJKRXNMC.js} +5 -4
  132. package/dist/usage-KGWL6WKQ.js +11 -0
  133. package/package.json +2 -1
  134. package/dist/reapply-3LBUA5EV.js +0 -64
  135. package/dist/usage-U6H5UFS2.js +0 -11
@@ -4,13 +4,13 @@ import {
4
4
  configFailureKind,
5
5
  retryAgentCommand,
6
6
  writeSetupConfigFile
7
- } from "./chunk-JECH4NJL.js";
7
+ } from "./chunk-4QI6SBNR.js";
8
8
  import {
9
9
  MCP_BRIDGE_BINARY
10
- } from "./chunk-AZSOH2SF.js";
10
+ } from "./chunk-GV2MF4NY.js";
11
11
  import {
12
12
  KEY_FILE_MODE
13
- } from "./chunk-HYAQIKYB.js";
13
+ } from "./chunk-NKA2PEQQ.js";
14
14
  import {
15
15
  CLINE_SERVER_NAME_TAKEN,
16
16
  CLINE_SETTINGS_REFUSALS,
@@ -32,13 +32,15 @@ import {
32
32
  withClinePusharyServer,
33
33
  withRefreshedClineKey,
34
34
  withoutClinePusharyServer
35
- } from "./chunk-O7ITTNDD.js";
35
+ } from "./chunk-AYWX6M7J.js";
36
+ import {
37
+ resolveGlobalBinary
38
+ } from "./chunk-VAZCGOLS.js";
36
39
  import {
37
40
  readJsonSafe,
38
- resolveGlobalBinary,
39
41
  writeFileAtomic,
40
42
  writeJsonAtomic
41
- } from "./chunk-BQHZRH6S.js";
43
+ } from "./chunk-QENTGE75.js";
42
44
 
43
45
  // src/fx-config.ts
44
46
  var FX_SERVER_NAME = "pushary";
@@ -1,17 +1,17 @@
1
1
  import {
2
2
  keyCheckFromResponse
3
- } from "./chunk-7BIVBOD5.js";
3
+ } from "./chunk-NGY2WS3X.js";
4
4
  import {
5
5
  installNetworkDefaults
6
- } from "./chunk-KLJ2CTT7.js";
6
+ } from "./chunk-ID4BZRBW.js";
7
7
  import {
8
8
  getBaseUrl
9
- } from "./chunk-KOUB4ZLX.js";
9
+ } from "./chunk-3A7REECH.js";
10
10
  import {
11
11
  isRecord,
12
12
  isToolErrorResult,
13
13
  toolFailureCodeOfResult
14
- } from "./chunk-4FAJQPFY.js";
14
+ } from "./chunk-5YVBVJOH.js";
15
15
 
16
16
  // src/retry.ts
17
17
  var isRetryable = (err) => {
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  pusharyDir
3
- } from "./chunk-O7ITTNDD.js";
3
+ } from "./chunk-AYWX6M7J.js";
4
4
  import {
5
5
  writeFileAtomic
6
- } from "./chunk-BQHZRH6S.js";
6
+ } from "./chunk-QENTGE75.js";
7
7
 
8
8
  // src/identity.ts
9
9
  import { randomUUID } from "crypto";
@@ -0,0 +1,86 @@
1
+ // src/cli/fsx.ts
2
+ import { copyFileSync, lstatSync, realpathSync, existsSync, fchmodSync, fsyncSync, mkdirSync, openSync, closeSync, readFileSync, renameSync, statSync, unlinkSync, writeFileSync } from "fs";
3
+ import { dirname, join } from "path";
4
+ var readJsonSafe = (filePath) => {
5
+ let raw;
6
+ try {
7
+ raw = readFileSync(filePath, "utf-8");
8
+ } catch (err) {
9
+ const error = err;
10
+ if (error.code === "ENOENT") return { kind: "missing" };
11
+ return { kind: "unreadable", error };
12
+ }
13
+ if (raw.trim() === "") return { kind: "ok", value: {} };
14
+ try {
15
+ const value = JSON.parse(raw);
16
+ return { kind: "ok", value };
17
+ } catch (err) {
18
+ return { kind: "unparseable", error: err, raw };
19
+ }
20
+ };
21
+ var isFile = (path) => {
22
+ try {
23
+ return statSync(path).isFile();
24
+ } catch {
25
+ return false;
26
+ }
27
+ };
28
+ var readFileOrMissing = (path) => {
29
+ try {
30
+ return readFileSync(path, "utf-8");
31
+ } catch (error) {
32
+ if (error instanceof Error && "code" in error && error.code === "ENOENT") return null;
33
+ throw error;
34
+ }
35
+ };
36
+ var stamp = () => (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-");
37
+ var backupFile = (filePath) => {
38
+ const target = `${filePath}.pushary-backup-${stamp()}`;
39
+ copyFileSync(filePath, target);
40
+ return target;
41
+ };
42
+ var writeFileAtomic = (filePath, contents, mode, encoding = "utf-8") => {
43
+ const target = lstatSync(filePath, { throwIfNoEntry: false })?.isSymbolicLink() ? realpathSync(filePath) : filePath;
44
+ const dir = dirname(target);
45
+ if (!existsSync(dir)) mkdirSync(dir, { recursive: true });
46
+ const temp = join(dir, `.${process.pid}-${stamp()}.pushary-tmp`);
47
+ try {
48
+ writeFileSync(temp, contents, mode === void 0 ? encoding : { encoding, mode });
49
+ const handle = openSync(temp, "r+");
50
+ try {
51
+ if (mode !== void 0) fchmodSync(handle, mode);
52
+ fsyncSync(handle);
53
+ } finally {
54
+ closeSync(handle);
55
+ }
56
+ renameSync(temp, target);
57
+ } catch (err) {
58
+ try {
59
+ if (existsSync(temp)) unlinkSync(temp);
60
+ } catch {
61
+ }
62
+ throw err;
63
+ }
64
+ };
65
+ var writeJsonAtomic = (filePath, data, mode) => writeFileAtomic(filePath, `${JSON.stringify(data, null, 2)}
66
+ `, mode);
67
+ var writeJsonAtomicDurable = (filePath, data, mode) => {
68
+ writeJsonAtomic(filePath, data, mode);
69
+ if (process.platform === "win32") return;
70
+ const directory = openSync(dirname(filePath), "r");
71
+ try {
72
+ fsyncSync(directory);
73
+ } finally {
74
+ closeSync(directory);
75
+ }
76
+ };
77
+
78
+ export {
79
+ readJsonSafe,
80
+ isFile,
81
+ readFileOrMissing,
82
+ backupFile,
83
+ writeFileAtomic,
84
+ writeJsonAtomic,
85
+ writeJsonAtomicDurable
86
+ };
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  compatibleConfigFile
3
- } from "./chunk-UOE26LPT.js";
3
+ } from "./chunk-5BX57BGT.js";
4
4
  import {
5
5
  hookOwnerOf,
6
6
  hookOwnerOfCommands,
7
7
  liveBridgeProbe,
8
8
  resolveBridgeStub
9
- } from "./chunk-VD6CAELE.js";
9
+ } from "./chunk-RYUIXLZ5.js";
10
10
  import {
11
11
  AGENT_CHOICES
12
- } from "./chunk-WVAJSBI2.js";
12
+ } from "./chunk-ZBT3U2VB.js";
13
13
  import {
14
14
  claudeSettings,
15
15
  codexHooksJson,
@@ -19,10 +19,10 @@ import {
19
19
  pusharyDir,
20
20
  vscodePluginDir,
21
21
  windowsNodeLauncherFor
22
- } from "./chunk-O7ITTNDD.js";
22
+ } from "./chunk-AYWX6M7J.js";
23
23
  import {
24
24
  readJsonSafe
25
- } from "./chunk-BQHZRH6S.js";
25
+ } from "./chunk-QENTGE75.js";
26
26
  import {
27
27
  HOOK_BUDGETS,
28
28
  HOOK_COMPATIBLE_PROFILES,
@@ -30,7 +30,7 @@ import {
30
30
  OPENCODE_APPROVAL_EVENT,
31
31
  hookCompatibleProfile,
32
32
  isRecord
33
- } from "./chunk-4FAJQPFY.js";
33
+ } from "./chunk-5YVBVJOH.js";
34
34
 
35
35
  // src/opencode-plugin.ts
36
36
  var OPENCODE_PLUGIN_MARKER = "pushary-opencode-plugin w1";
@@ -1,30 +1,30 @@
1
1
  import {
2
2
  announceSubscriptionRequired,
3
3
  isDeferAnswer
4
- } from "./chunk-CQ7QE4W2.js";
4
+ } from "./chunk-CFTPHNBY.js";
5
5
  import {
6
6
  AUTO_DECISION_WINDOW_MS,
7
7
  DEFAULT_SESSION,
8
8
  claimThrottle,
9
9
  releaseThrottle,
10
10
  reportEvent
11
- } from "./chunk-Z2TX7DVU.js";
11
+ } from "./chunk-UUYLBSAU.js";
12
12
  import {
13
13
  deriveToolTarget,
14
14
  permissionDeniedAction
15
- } from "./chunk-MP3SEXXJ.js";
15
+ } from "./chunk-OFRQNTJD.js";
16
16
  import {
17
17
  askUser,
18
18
  isDecisionStopped,
19
19
  isQuestionLimitRefusal,
20
20
  waitForQuestion
21
- } from "./chunk-ZCYLCD6L.js";
21
+ } from "./chunk-CC4LGKEZ.js";
22
22
  import {
23
23
  SubscriptionRequiredError
24
- } from "./chunk-V5DV7XZN.js";
24
+ } from "./chunk-PK6LBL3Z.js";
25
25
  import {
26
26
  getMachineId
27
- } from "./chunk-6N5DQG5F.js";
27
+ } from "./chunk-PYUN7HNY.js";
28
28
  import {
29
29
  ASK_CONTEXT_MAX,
30
30
  agentQuestionContext,
@@ -36,7 +36,7 @@ import {
36
36
  questionsShownAsASet,
37
37
  shouldDeferToNativeMode,
38
38
  wireVerdictFor
39
- } from "./chunk-4FAJQPFY.js";
39
+ } from "./chunk-5YVBVJOH.js";
40
40
 
41
41
  // src/machine-decision-audit.ts
42
42
  import { basename } from "path";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  AGENT_CHOICES
3
- } from "./chunk-WVAJSBI2.js";
3
+ } from "./chunk-ZBT3U2VB.js";
4
4
  import {
5
5
  BELL_HOOK_BINARY
6
- } from "./chunk-VJOMBYY5.js";
6
+ } from "./chunk-U5DBYW63.js";
7
7
  import {
8
8
  CLAUDE_HOOK_EVENTS,
9
9
  CODEX_HOOK_EVENTS,
@@ -13,13 +13,13 @@ import {
13
13
  hookBinaryNameOf,
14
14
  isProtectedByScope,
15
15
  registerHookEntry
16
- } from "./chunk-O7ITTNDD.js";
16
+ } from "./chunk-AYWX6M7J.js";
17
17
  import {
18
18
  CURSOR_GATE_EVENTS,
19
19
  HOOK_BUDGETS,
20
20
  HOOK_LOCATOR_BINARY,
21
21
  hookCommandHoldBudget
22
- } from "./chunk-4FAJQPFY.js";
22
+ } from "./chunk-5YVBVJOH.js";
23
23
 
24
24
  // src/diagnostics/bridge.ts
25
25
  import { execFileSync } from "child_process";
@@ -13,16 +13,16 @@ import {
13
13
  } from "./chunk-G66WIAST.js";
14
14
  import {
15
15
  keyPrefix
16
- } from "./chunk-HYAQIKYB.js";
16
+ } from "./chunk-NKA2PEQQ.js";
17
17
  import {
18
18
  getBaseUrl
19
- } from "./chunk-KOUB4ZLX.js";
19
+ } from "./chunk-3A7REECH.js";
20
20
  import {
21
21
  NPX_LATEST_COMMAND
22
- } from "./chunk-PWGD5EP6.js";
22
+ } from "./chunk-YDT6TVGN.js";
23
23
  import {
24
24
  isValidApiKey
25
- } from "./chunk-4FAJQPFY.js";
25
+ } from "./chunk-5YVBVJOH.js";
26
26
 
27
27
  // src/cli/login-ui.ts
28
28
  import { hostname } from "os";
@@ -3,11 +3,11 @@ import {
3
3
  } from "./chunk-POFBE6ZY.js";
4
4
  import {
5
5
  autoUpdateState
6
- } from "./chunk-O7ITTNDD.js";
6
+ } from "./chunk-AYWX6M7J.js";
7
7
  import {
8
8
  readJsonSafe,
9
9
  writeJsonAtomic
10
- } from "./chunk-BQHZRH6S.js";
10
+ } from "./chunk-QENTGE75.js";
11
11
  import {
12
12
  CLI_PACKAGE_NAMES,
13
13
  POSIX_GLOBAL_ROOT_SEGMENTS,
@@ -17,7 +17,7 @@ import {
17
17
  } from "./chunk-ZVU6WMMU.js";
18
18
  import {
19
19
  isAutoUpdateResult
20
- } from "./chunk-4FAJQPFY.js";
20
+ } from "./chunk-5YVBVJOH.js";
21
21
 
22
22
  // src/auto-update.ts
23
23
  import { spawn } from "child_process";
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  CODEX_HOOK_STATUS
3
- } from "./chunk-RVSRPDRF.js";
3
+ } from "./chunk-AE2BQ3XM.js";
4
4
  import {
5
5
  retryAgentCommand
6
- } from "./chunk-JECH4NJL.js";
6
+ } from "./chunk-4QI6SBNR.js";
7
7
  import {
8
8
  NPX_LATEST_COMMAND
9
- } from "./chunk-PWGD5EP6.js";
9
+ } from "./chunk-YDT6TVGN.js";
10
10
 
11
11
  // src/setup/codex-trust.ts
12
12
  var CODEX_TRUST_TELEMETRY = {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  readTranscriptPreference
3
- } from "./chunk-HYAQIKYB.js";
3
+ } from "./chunk-NKA2PEQQ.js";
4
4
 
5
5
  // src/transcript-setting.ts
6
6
  var transcriptEnvironmentPreference = () => {
@@ -9,20 +9,20 @@ import {
9
9
  installedCodexApp,
10
10
  readCodexAppRuntime,
11
11
  shellQuoted
12
- } from "./chunk-Y3SZVZF6.js";
12
+ } from "./chunk-N4RIGNDX.js";
13
13
  import {
14
14
  writeHuman
15
15
  } from "./chunk-QCGNGEGE.js";
16
16
  import {
17
17
  xml
18
- } from "./chunk-NZQEABRO.js";
18
+ } from "./chunk-OPV6724W.js";
19
+ import {
20
+ writeFileAtomic
21
+ } from "./chunk-QENTGE75.js";
19
22
  import {
20
23
  CODEX_APP_LAUNCH_AT_LOGIN_VERB,
21
24
  CODEX_APP_LAUNCH_VARIABLE
22
25
  } from "./chunk-E46NE7FB.js";
23
- import {
24
- writeFileAtomic
25
- } from "./chunk-BQHZRH6S.js";
26
26
 
27
27
  // src/codex-app-cards-switch.ts
28
28
  import { execFileSync as execFileSync2 } from "child_process";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  HOOK_HOLD_BUDGET_ENV,
3
3
  hookHoldBudgetProof
4
- } from "./chunk-4FAJQPFY.js";
4
+ } from "./chunk-5YVBVJOH.js";
5
5
 
6
6
  // src/hold-budget.ts
7
7
  var takeHookHoldBudget = (args = process.argv.slice(2), env = process.env) => {
@@ -5,19 +5,21 @@ import {
5
5
  hermesAppWiringRecord,
6
6
  hermesConfigReceipt,
7
7
  hermesSetupReceipt
8
- } from "./chunk-O7ITTNDD.js";
8
+ } from "./chunk-AYWX6M7J.js";
9
+ import {
10
+ resolvePathBinary
11
+ } from "./chunk-VAZCGOLS.js";
9
12
  import {
10
13
  readJsonSafe,
11
- resolvePathBinary,
12
14
  writeJsonAtomic
13
- } from "./chunk-BQHZRH6S.js";
15
+ } from "./chunk-QENTGE75.js";
14
16
  import {
15
17
  isNewerVersion,
16
18
  isReleaseVersion
17
19
  } from "./chunk-ZVU6WMMU.js";
18
20
  import {
19
21
  isRecord
20
- } from "./chunk-4FAJQPFY.js";
22
+ } from "./chunk-5YVBVJOH.js";
21
23
 
22
24
  // src/hermes/plugin-payload.ts
23
25
  import { createHash } from "crypto";
@@ -1311,7 +1313,7 @@ def _await_decision(request, created, correlation_id: str, offered, uses_select:
1311
1313
  return _decided(request, correlation_id, "deny", None)
1312
1314
  ` },
1313
1315
  { path: "cancellation.py", contents: 'from __future__ import annotations\n\nfrom typing import Literal, Mapping, Tuple\n\nCancellation = Literal[\n "withdrawn_by_this_call",\n "cancelled_unproven",\n "already_cancelled",\n "not_pending",\n "unreachable",\n]\n\nWITHDRAWN_BY_THIS_CALL: Cancellation = "withdrawn_by_this_call"\nCANCELLED_UNPROVEN: Cancellation = "cancelled_unproven"\nALREADY_CANCELLED: Cancellation = "already_cancelled"\nNOT_PENDING: Cancellation = "not_pending"\nUNREACHABLE: Cancellation = "unreachable"\nCANCELLATIONS: Tuple[Cancellation, ...] = (\n WITHDRAWN_BY_THIS_CALL,\n CANCELLED_UNPROVEN,\n ALREADY_CANCELLED,\n NOT_PENDING,\n UNREACHABLE,\n)\n\nUNAVAILABLE_STATUS = "unavailable"\nSTOP_HANDOFF = "stop"\n\n\ndef classify_cancellation(response: object) -> Cancellation:\n if not isinstance(response, Mapping):\n return UNREACHABLE\n fields: Mapping[object, object] = response\n cancelled = fields.get("cancelled")\n by_this_call = fields.get("cancelledByThisCall")\n if (\n not isinstance(cancelled, bool)\n or fields.get("status") == UNAVAILABLE_STATUS\n or fields.get("handoffAction") == STOP_HANDOFF\n or (by_this_call is not None and not isinstance(by_this_call, bool))\n or (by_this_call is True and not cancelled)\n ):\n return UNREACHABLE\n if not cancelled:\n return NOT_PENDING\n if by_this_call is None:\n return CANCELLED_UNPROVEN\n return WITHDRAWN_BY_THIS_CALL if by_this_call else ALREADY_CANCELLED\n' },
1314
- { path: "dashboard/manifest.json", contents: '{\n "name": "pushary",\n "label": "Pushary",\n "description": "Approvals Pushary is carrying to your phone, answerable from Hermes Desktop",\n "version": "1.0.0",\n "tab": { "hidden": true },\n "entry": "web.js",\n "api": "plugin_api.py"\n}\n' },
1316
+ { path: "dashboard/manifest.json", contents: '{\n "name": "pushary",\n "label": "Pushary",\n "description": "Approvals Pushary is carrying to your phone, answerable from Hermes Desktop",\n "version": "1.0.1",\n "tab": { "hidden": true },\n "entry": "web.js",\n "api": "plugin_api.py"\n}\n' },
1315
1317
  { path: "dashboard/plugin_api.py", contents: `import importlib
1316
1318
  import sys
1317
1319
  import time
@@ -1590,6 +1592,11 @@ SNAPSHOT_PRUNE_INTERVAL_SECONDS = 60 * 60
1590
1592
  SOURCE_UNAVAILABLE = "source_unavailable"
1591
1593
  HISTORY_NOT_ALLOWED_WARNING = ("[pushary] Hermes session history is not saved on this computer; it needs "
1592
1594
  "\`npx pushary@latest setup\` with the key Hermes uses, or Session history turned on in the Pushary Mac app")
1595
+ HELPER_ENVIRONMENT_NAMES = frozenset({
1596
+ "HOME", "PATH", "TMPDIR", "LANG", "LC_ALL", "LC_CTYPE",
1597
+ "SYSTEMROOT", "PATHEXT", "COMSPEC", "USERPROFILE", "APPDATA", "LOCALAPPDATA", "TEMP", "TMP",
1598
+ "PUSHARY_BASE_URL", "PUSHARY_API_URL", "PUSHARY_CONFIG_FILE", "PUSHARY_TRANSCRIPTS", "PUSHARY_TRANSCRIPT_REGISTRY_DIR",
1599
+ })
1593
1600
 
1594
1601
 
1595
1602
  class _Authorization(NamedTuple):
@@ -1717,6 +1724,14 @@ def write_snapshot(path: Path, session_id: str, messages: list[dict[str, object]
1717
1724
  Path(temporary).unlink(missing_ok=True)
1718
1725
 
1719
1726
 
1727
+ def _helper_environment() -> dict[str, str]:
1728
+ return {name: value for name, value in os.environ.items() if name in HELPER_ENVIRONMENT_NAMES}
1729
+
1730
+
1731
+ def _registration_environment(key: str) -> dict[str, str]:
1732
+ return {**_helper_environment(), "PUSHARY_API_KEY": key, "PUSHARY_BASE_URL": api.BASE_URL}
1733
+
1734
+
1720
1735
  def _registration_command(key: str) -> list[str] | None:
1721
1736
  root = Path.home() / ".pushary"
1722
1737
  try:
@@ -1731,7 +1746,7 @@ def _registration_command(key: str) -> list[str] | None:
1731
1746
  command = [helper, "hermes"]
1732
1747
  result = subprocess.run([helper, "authorize-export"],
1733
1748
  input=json.dumps({"apiKey": key, "baseUrl": api.BASE_URL}), text=True,
1734
- stdout=subprocess.PIPE, stderr=subprocess.DEVNULL, timeout=5, check=False)
1749
+ env=_helper_environment(), stdout=subprocess.PIPE, stderr=subprocess.DEVNULL, timeout=5, check=False)
1735
1750
  if result.returncode != 0:
1736
1751
  return None
1737
1752
  authorization = json.loads(result.stdout)
@@ -1885,8 +1900,7 @@ def _export_loop(database_path: Path, session_id: str, key: str, command: list[s
1885
1900
  if ending or time.monotonic() >= next_registration:
1886
1901
  payload = {"session_id": session_id, "cwd": str(database_path.parent), "transcript_path": str(path),
1887
1902
  "hook_event_name": "SessionEnd" if ending else "SessionStart"}
1888
- environment = {**os.environ, "PUSHARY_API_KEY": key, "PUSHARY_BASE_URL": api.BASE_URL}
1889
- result = subprocess.run(command, input=json.dumps(payload), text=True, env=environment,
1903
+ result = subprocess.run(command, input=json.dumps(payload), text=True, env=_registration_environment(key),
1890
1904
  stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL, timeout=5, check=False)
1891
1905
  if result.returncode != 0:
1892
1906
  logger.warning("[pushary] Hermes history reader could not register")
@@ -2084,7 +2098,7 @@ def record_plugin_load(approval_transport_registered, home=None, pid=None, now=N
2084
2098
  logger.debug("[pushary] could not record the plugin load: %s", exc)
2085
2099
  return None
2086
2100
  ` },
2087
- { path: "plugin.yaml", contents: 'name: pushary\nversion: 1.0.0\ndescription: Push notifications and human-in-the-loop for Hermes Agent via Pushary\nauthor: RalphNex OU\nrequires_env:\n - name: PUSHARY_API_KEY\n description: Your Pushary API key\n url: https://pushary.com/sign-up?from=hermes\n secret: true\nconfig_schema:\n api_key:\n type: secret\n env: PUSHARY_API_KEY\n label: Pushary API key\n description: "Get one at pushary.com/sign-up?from=hermes"\n required: true\nprovides_tools:\n - pushary_remind\n - pushary_notify\n - pushary_ask\n - pushary_wait\n - pushary_cancel\n - pushary_propose_scope\n - pushary_enroll\n - pushary_ask_end_user\nprovides_hooks:\n - pre_llm_call\n - pre_tool_call\n - post_tool_call\n - on_session_start\n - on_session_end\n - on_session_finalize\n - post_approval_response\nprovides_approval_transports:\n - pushary\n' },
2101
+ { path: "plugin.yaml", contents: 'name: pushary\nversion: 1.0.1\ndescription: Push notifications and human-in-the-loop for Hermes Agent via Pushary\nauthor: RalphNex OU\nrequires_env:\n - name: PUSHARY_API_KEY\n description: Your Pushary API key\n url: https://pushary.com/sign-up?from=hermes\n secret: true\nconfig_schema:\n api_key:\n type: secret\n env: PUSHARY_API_KEY\n label: Pushary API key\n description: "Get one at pushary.com/sign-up?from=hermes"\n required: true\nprovides_tools:\n - pushary_remind\n - pushary_notify\n - pushary_ask\n - pushary_wait\n - pushary_cancel\n - pushary_propose_scope\n - pushary_enroll\n - pushary_ask_end_user\nprovides_hooks:\n - pre_llm_call\n - pre_tool_call\n - post_tool_call\n - on_session_start\n - on_session_end\n - on_session_finalize\n - post_approval_response\nprovides_approval_transports:\n - pushary\n' },
2088
2102
  { path: "schemas.py", contents: `PUSHARY_REMIND = {
2089
2103
  "name": "pushary_remind",
2090
2104
  "description": "Schedule a one-time personal reminder on Pushary, even after Hermes exits. Use body plus in_minutes or at (ISO timestamp with explicit UTC offset, within 30 days). Never guess the user's timezone. Confirm the returned time. No arguments lists pending reminders; cancel_reminder_id cancels a scheduled one. Use Hermes cron for agent work; use this for reminding the operator.",
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  guardBinary
3
- } from "./chunk-O7ITTNDD.js";
3
+ } from "./chunk-AYWX6M7J.js";
4
4
 
5
5
  // src/bell/install.ts
6
6
  import { join } from "path";
@@ -2,7 +2,7 @@ import {
2
2
  isApprovalMode,
3
3
  isRecord,
4
4
  isTimeoutAction
5
- } from "./chunk-4FAJQPFY.js";
5
+ } from "./chunk-5YVBVJOH.js";
6
6
 
7
7
  // src/cli/settings-response.ts
8
8
  var isFiniteNumber = (value) => typeof value === "number" && Number.isFinite(value);
@@ -27,11 +27,11 @@ import {
27
27
  toolResultErrorText,
28
28
  transcriptTokensIn,
29
29
  transcriptUsageRequest
30
- } from "./chunk-MP3SEXXJ.js";
30
+ } from "./chunk-OFRQNTJD.js";
31
31
  import {
32
32
  branchFor,
33
33
  repoKeyFor
34
- } from "./chunk-4QO267OY.js";
34
+ } from "./chunk-GV5TEADP.js";
35
35
  import {
36
36
  cancelQuestion,
37
37
  clientErrorKindOf,
@@ -39,33 +39,35 @@ import {
39
39
  reportClientError,
40
40
  sendNotification,
41
41
  waitForAnswer
42
- } from "./chunk-ZCYLCD6L.js";
42
+ } from "./chunk-CC4LGKEZ.js";
43
43
  import {
44
44
  withRetry
45
- } from "./chunk-V5DV7XZN.js";
45
+ } from "./chunk-PK6LBL3Z.js";
46
46
  import {
47
47
  getMachineId
48
- } from "./chunk-6N5DQG5F.js";
48
+ } from "./chunk-PYUN7HNY.js";
49
49
  import {
50
50
  reportedInstallSource
51
- } from "./chunk-AFGMZZEB.js";
51
+ } from "./chunk-FH6PHTUD.js";
52
52
  import {
53
53
  IDLE_PROMPT_NOTIFICATION,
54
54
  NOTIFICATION_PUSH_TYPES,
55
55
  POSTTOOLUSE_MIRROR_ONLY_TOOLS,
56
56
  canonicalJson,
57
57
  claudeConfigDir
58
- } from "./chunk-O7ITTNDD.js";
58
+ } from "./chunk-AYWX6M7J.js";
59
59
  import {
60
60
  compareVersion,
61
- parseVersion,
62
- writeFileAtomic,
63
- writeJsonAtomicDurable
64
- } from "./chunk-BQHZRH6S.js";
61
+ parseVersion
62
+ } from "./chunk-VAZCGOLS.js";
65
63
  import {
66
64
  getApiKey,
67
65
  getBaseUrl
68
- } from "./chunk-KOUB4ZLX.js";
66
+ } from "./chunk-3A7REECH.js";
67
+ import {
68
+ writeFileAtomic,
69
+ writeJsonAtomicDurable
70
+ } from "./chunk-QENTGE75.js";
69
71
  import {
70
72
  BLOCKED_ACTION_GRANT_TTL_SECONDS,
71
73
  COMMAND_RECOVERY,
@@ -86,7 +88,7 @@ import {
86
88
  resolveAutoResolveOrigin,
87
89
  resolvePolicy,
88
90
  unansweredRefusalReason
89
- } from "./chunk-4FAJQPFY.js";
91
+ } from "./chunk-5YVBVJOH.js";
90
92
 
91
93
  // src/pending.ts
92
94
  import { join } from "path";
@@ -3,24 +3,24 @@ import {
3
3
  expectedLaunchCapabilities,
4
4
  hasSpawnProvider,
5
5
  resolveControlPolicy
6
- } from "./chunk-J6SSLXSU.js";
6
+ } from "./chunk-4OLWSYX5.js";
7
7
  import {
8
8
  daemonHasRemoteProof,
9
9
  daemonServiceManagerAvailable,
10
10
  hasDaemonServiceDefinition,
11
11
  readDaemonNeedsLogin,
12
12
  readDaemonStatus
13
- } from "./chunk-NZQEABRO.js";
13
+ } from "./chunk-OPV6724W.js";
14
+ import {
15
+ getMachineId
16
+ } from "./chunk-PYUN7HNY.js";
14
17
  import {
15
18
  readControlMode,
16
19
  readKeySource
17
- } from "./chunk-HYAQIKYB.js";
18
- import {
19
- getMachineId
20
- } from "./chunk-6N5DQG5F.js";
20
+ } from "./chunk-NKA2PEQQ.js";
21
21
  import {
22
22
  getBaseUrl
23
- } from "./chunk-KOUB4ZLX.js";
23
+ } from "./chunk-3A7REECH.js";
24
24
  import {
25
25
  getPackageVersion
26
26
  } from "./chunk-ZVU6WMMU.js";