pushary 1.9.61 → 1.9.63

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 (125) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/README.md +1 -1
  3. package/dist/{api-LW3PJQYY.js → api-UHUUAONF.js} +14 -12
  4. package/dist/bin/pushary-bell-hook.js +27 -27
  5. package/dist/bin/pushary-bell.js +12 -12
  6. package/dist/bin/pushary-claude.js +35 -28
  7. package/dist/bin/pushary-clean.js +35 -34
  8. package/dist/bin/pushary-codex-bridge.js +21 -21
  9. package/dist/bin/pushary-codex-hook.js +51 -38
  10. package/dist/bin/pushary-codex-session.js +8 -8
  11. package/dist/bin/pushary-codex.js +14 -14
  12. package/dist/bin/pushary-connect.js +27 -27
  13. package/dist/bin/pushary-cowork.js +5 -5
  14. package/dist/bin/pushary-daemon.js +39 -38
  15. package/dist/bin/pushary-disconnect.js +30 -29
  16. package/dist/bin/pushary-doctor.js +46 -44
  17. package/dist/bin/pushary-elicitation-hook.js +30 -28
  18. package/dist/bin/pushary-gemini-bridge.js +15 -15
  19. package/dist/bin/pushary-gemini-hook.js +38 -30
  20. package/dist/bin/pushary-hook.js +32 -31
  21. package/dist/bin/pushary-login.js +27 -15
  22. package/dist/bin/pushary-logout.js +28 -28
  23. package/dist/bin/pushary-mcp.js +11 -11
  24. package/dist/bin/pushary-mode.js +14 -14
  25. package/dist/bin/pushary-notification-hook.js +26 -26
  26. package/dist/bin/pushary-opencode-hook.js +40 -31
  27. package/dist/bin/pushary-permission-denied-hook.js +31 -31
  28. package/dist/bin/pushary-permission-hook.js +30 -30
  29. package/dist/bin/pushary-post-hook.js +26 -26
  30. package/dist/bin/pushary-prompt-hook.js +26 -26
  31. package/dist/bin/pushary-session-end-hook.js +26 -26
  32. package/dist/bin/pushary-session-start-hook.js +34 -33
  33. package/dist/bin/pushary-setup.js +115 -4205
  34. package/dist/bin/pushary-stats.js +5 -5
  35. package/dist/bin/pushary-status.js +32 -32
  36. package/dist/bin/pushary-stop-hook.js +26 -26
  37. package/dist/bin/pushary-stopfailure-hook.js +26 -26
  38. package/dist/bin/pushary-suggestions.js +14 -14
  39. package/dist/bin/pushary-transcript-register.js +18 -18
  40. package/dist/bin/pushary-transcripts.js +62 -9
  41. package/dist/bin/pushary-upgrade.js +43 -41
  42. package/dist/bin/pushary-wait.js +14 -14
  43. package/dist/bin/pushary.js +7 -7
  44. package/dist/{chunk-ORX5BTV4.js → chunk-2MZ6ROWZ.js} +8 -6
  45. package/dist/{chunk-7BHI3PZN.js → chunk-3GVV7XVT.js} +1 -1
  46. package/dist/{chunk-GKFO5JLN.js → chunk-3QLFB2EY.js} +4 -4
  47. package/dist/{chunk-LBHJJEKT.js → chunk-4WFAP6QN.js} +10 -10
  48. package/dist/{chunk-PITQ5ZIQ.js → chunk-5JK3DQGZ.js} +2 -2
  49. package/dist/{chunk-CJ5TCFD4.js → chunk-5LOP4AVD.js} +3 -3
  50. package/dist/{chunk-ERK24P76.js → chunk-6Z2VR3BA.js} +4 -2
  51. package/dist/{chunk-K4MBKXAE.js → chunk-75ODMNOM.js} +1 -1
  52. package/dist/{chunk-YPD3MTFU.js → chunk-7GRQGXF4.js} +1 -1
  53. package/dist/{chunk-AXJLJJ3M.js → chunk-7NCLUA65.js} +99 -6
  54. package/dist/{chunk-YDR4BQ7R.js → chunk-AB3VAQ25.js} +3 -3
  55. package/dist/{chunk-2AELPDMT.js → chunk-BCVCUDFI.js} +16 -5
  56. package/dist/{chunk-RGSW36XH.js → chunk-BQFL2ECS.js} +3 -3
  57. package/dist/{chunk-BG4Y64FW.js → chunk-BUQU3OPX.js} +1 -1
  58. package/dist/{chunk-SHJVFW22.js → chunk-CLABCSZC.js} +4 -4
  59. package/dist/{chunk-4VRTSDGP.js → chunk-DMNLFWGY.js} +7 -108
  60. package/dist/{chunk-7MCCXE5Y.js → chunk-EHHTQURL.js} +5 -5
  61. package/dist/{chunk-XAO6EYGM.js → chunk-ELAK46NR.js} +26 -3
  62. package/dist/{chunk-JGQV4MDQ.js → chunk-EQ26IKZM.js} +6 -6
  63. package/dist/{chunk-VX2MJ4X7.js → chunk-FAF5AW3P.js} +9 -9
  64. package/dist/{chunk-XEJOPVCG.js → chunk-FEAGK25K.js} +1 -1
  65. package/dist/{chunk-GZCSWDAS.js → chunk-GNUARBRZ.js} +4 -4
  66. package/dist/{chunk-64S5PQBQ.js → chunk-GZS72NCF.js} +4 -4
  67. package/dist/{chunk-WFSGCFXQ.js → chunk-HAIXS4OX.js} +2 -6
  68. package/dist/{chunk-G36T5LAP.js → chunk-HOIO66DU.js} +3 -3
  69. package/dist/{chunk-ADR3KHOC.js → chunk-HZ72EMJE.js} +2 -2
  70. package/dist/{chunk-WN3RACVD.js → chunk-IOH2T3CB.js} +17 -3
  71. package/dist/chunk-KEPESIIR.js +4117 -0
  72. package/dist/{chunk-ZEWIMY63.js → chunk-KL76XWZ7.js} +1 -1
  73. package/dist/{chunk-IFPOHFDJ.js → chunk-KLZZI5TU.js} +1 -1
  74. package/dist/{chunk-ATKN4BJT.js → chunk-KUCL7ETL.js} +1 -1
  75. package/dist/{chunk-SFAP4AJY.js → chunk-L5CDGXPO.js} +3 -3
  76. package/dist/{chunk-GDKQUB52.js → chunk-LGZ545TA.js} +5 -5
  77. package/dist/{chunk-ZGU3NXL2.js → chunk-LTT54NOU.js} +8 -8
  78. package/dist/{chunk-MWLTTLPK.js → chunk-MK4USZYQ.js} +2 -2
  79. package/dist/{chunk-NKLNU577.js → chunk-MRCVYYPW.js} +3 -3
  80. package/dist/{chunk-7JXJJNQ5.js → chunk-OJEIS5L2.js} +1 -1
  81. package/dist/{chunk-ELLJPP6O.js → chunk-OP5IBEV7.js} +7 -3
  82. package/dist/{chunk-BQ2VV7LY.js → chunk-OU3BYBJ3.js} +2 -2
  83. package/dist/{chunk-6T5Z64KS.js → chunk-OW6VBXXI.js} +15 -15
  84. package/dist/{chunk-USE5IEEW.js → chunk-OY6Z4IKB.js} +1 -1
  85. package/dist/{chunk-O65F2IIN.js → chunk-P6RF4RQN.js} +6 -6
  86. package/dist/{chunk-4N5E4JNF.js → chunk-PIQ4HHA2.js} +5 -5
  87. package/dist/{chunk-7HDGH3Z2.js → chunk-PJ34FOIV.js} +4 -4
  88. package/dist/{chunk-DQLCFGHK.js → chunk-PXAOEFJZ.js} +17 -11
  89. package/dist/{chunk-P3VQH65N.js → chunk-QC2W42DE.js} +33 -20
  90. package/dist/{chunk-X3YKQJCZ.js → chunk-RAJ3QEIL.js} +1 -1
  91. package/dist/chunk-S2Z6VWHH.js +112 -0
  92. package/dist/{chunk-FUZ5VYWD.js → chunk-SARPHHTT.js} +1 -1
  93. package/dist/{chunk-BJTSKOH3.js → chunk-SKUSGWFK.js} +5 -5
  94. package/dist/{chunk-Y6Z7DA5Y.js → chunk-T3GHXR6N.js} +5 -5
  95. package/dist/{chunk-EUIPTDLX.js → chunk-T6XQNOZV.js} +22 -15
  96. package/dist/{chunk-RJHX66EY.js → chunk-TBKHQWIH.js} +16 -11
  97. package/dist/{chunk-CICLXLQN.js → chunk-TMGJAFSD.js} +4 -4
  98. package/dist/{chunk-Y5VKZNFN.js → chunk-V5W3CK7F.js} +2 -2
  99. package/dist/{chunk-GAMVAORR.js → chunk-V7N5NOZV.js} +4 -2
  100. package/dist/{chunk-33OOEVPG.js → chunk-VC3HFFMQ.js} +1 -1
  101. package/dist/{chunk-KPNZ7JUL.js → chunk-VDBXSUXP.js} +6 -6
  102. package/dist/{chunk-7BAO42UV.js → chunk-VFJSVPNL.js} +3 -3
  103. package/dist/{chunk-HUI4OE43.js → chunk-VHZAJ6IB.js} +3 -3
  104. package/dist/{chunk-QER5R7Z6.js → chunk-VN7XH6TU.js} +2 -2
  105. package/dist/{chunk-UADSXJZ4.js → chunk-WUOOZE5S.js} +2 -2
  106. package/dist/{chunk-LN7DE5LY.js → chunk-XBTWG2VL.js} +4 -4
  107. package/dist/{chunk-XV6S5PWW.js → chunk-XE5N352V.js} +1 -1
  108. package/dist/{chunk-SVQWHV65.js → chunk-XO3KAH7K.js} +1 -1
  109. package/dist/{chunk-BUZIEL7Y.js → chunk-YK6GR4GU.js} +2 -2
  110. package/dist/chunk-YMZOM6BD.js +216 -0
  111. package/dist/{codex-app-cards-switch-BD7LCI2I.js → codex-app-cards-switch-LXMAIOFB.js} +11 -11
  112. package/dist/{codex-desktop-launch-V5CASSBB.js → codex-desktop-launch-VE5RLFUU.js} +1 -1
  113. package/dist/{codex-session-launch-5PKFKUFD.js → codex-session-launch-XZZWXCPK.js} +18 -18
  114. package/dist/{config-AEKH7HGC.js → config-PPX25AV5.js} +3 -3
  115. package/dist/{global-upgrade-IUXJJDWF.js → global-upgrade-NRMHNLNU.js} +9 -9
  116. package/dist/{identity-YJIV2XTY.js → identity-ZFQR7JNW.js} +4 -4
  117. package/dist/{live-capabilities-QYFW5QAW.js → live-capabilities-SJRYRKNB.js} +4 -4
  118. package/dist/{paths-A5GAR5PL.js → paths-7VTVOQXJ.js} +3 -3
  119. package/dist/{reapply-BKJGICRJ.js → reapply-WOANOIRZ.js} +27 -26
  120. package/dist/src/index.d.ts +1 -0
  121. package/dist/src/index.js +21 -21
  122. package/dist/{upgrade-lock-DDB7WEWC.js → upgrade-lock-VAYJZVTB.js} +4 -4
  123. package/dist/{usage-HBDNFZ3O.js → usage-C4DIYUR6.js} +3 -3
  124. package/package.json +1 -1
  125. package/dist/chunk-6FJ6CK32.js +0 -126
@@ -0,0 +1,112 @@
1
+ import {
2
+ writeFileAtomic
3
+ } from "./chunk-QENTGE75.js";
4
+ import {
5
+ NpmInstallError,
6
+ NpmMissingError,
7
+ NpmPermissionError
8
+ } from "./chunk-5LOP4AVD.js";
9
+ import {
10
+ NPX_LATEST_COMMAND
11
+ } from "./chunk-6Z2VR3BA.js";
12
+ import {
13
+ readSetupAgentFailures
14
+ } from "./chunk-7NCLUA65.js";
15
+
16
+ // src/setup/config-write.ts
17
+ var AgentConfigWriteError = class extends Error {
18
+ constructor(error) {
19
+ super(error instanceof Error ? error.message : String(error), { cause: error });
20
+ this.name = "AgentConfigWriteError";
21
+ }
22
+ };
23
+ var writeSetupConfigFile = (path, content, mode = 384) => {
24
+ try {
25
+ writeFileAtomic(path, content, mode);
26
+ } catch (error) {
27
+ throw new AgentConfigWriteError(error);
28
+ }
29
+ };
30
+ var writeSetupConfigJson = (path, value, mode) => writeSetupConfigFile(path, `${JSON.stringify(value, null, 2)}
31
+ `, mode);
32
+
33
+ // src/setup/agent-failure.ts
34
+ var AgentConfigError = class extends Error {
35
+ kind;
36
+ filePath;
37
+ constructor(kind, filePath, message) {
38
+ super(message);
39
+ this.name = "AgentConfigError";
40
+ this.kind = kind;
41
+ this.filePath = filePath;
42
+ }
43
+ };
44
+ var configFailureKind = (readFailure) => readFailure === "unparseable" ? "config-unparseable" : "config-unreadable";
45
+ var AGENT_FAILURE_DETAILS = {
46
+ "not-wired": "reported success but its config is not there.",
47
+ "app-account-mismatch": "Pushary for Mac set it up with an account that does not match this setup, so it was left as it is."
48
+ };
49
+ var DESCRIBED_FAILURE_REMEDIES = {
50
+ "not-wired": "retry-agent",
51
+ "app-account-mismatch": "match-mac-account"
52
+ };
53
+ var describedAgentFailure = (agent, kind) => ({
54
+ agent,
55
+ kind,
56
+ detail: AGENT_FAILURE_DETAILS[kind],
57
+ remedy: DESCRIBED_FAILURE_REMEDIES[kind],
58
+ stage: kind === "not-wired" ? "hook-validation" : "account-check"
59
+ });
60
+ var NPM_PERMISSION_REMEDIES = {
61
+ "global-prefix": "fix-npm-prefix",
62
+ "file-in-use": "close-node-programs"
63
+ };
64
+ var remedyForError = (error) => {
65
+ if (error instanceof NpmMissingError) return "install-node";
66
+ if (error instanceof NpmPermissionError) return NPM_PERMISSION_REMEDIES[error.kind];
67
+ return "retry-agent";
68
+ };
69
+ var setupFailureDiagnostic = (error) => {
70
+ if (error instanceof AgentConfigError) return { stage: "config-read" };
71
+ if (error instanceof AgentConfigWriteError) return { stage: "config-write", diagnosticCode: "config-write-failed" };
72
+ if (error instanceof NpmMissingError) return { stage: "runtime-install", diagnosticCode: "npm-missing" };
73
+ if (error instanceof NpmPermissionError) {
74
+ return { stage: "runtime-install", diagnosticCode: error.kind === "global-prefix" ? "npm-global-prefix-denied" : "npm-file-in-use" };
75
+ }
76
+ if (error instanceof NpmInstallError) return { stage: "runtime-install", diagnosticCode: "npm-install-failed" };
77
+ return { stage: "unknown" };
78
+ };
79
+ var agentFailureFromError = (agent, error, describeError) => ({
80
+ agent,
81
+ kind: error instanceof AgentConfigError ? error.kind : "installer-error",
82
+ detail: describeError(error),
83
+ remedy: remedyForError(error),
84
+ ...setupFailureDiagnostic(error)
85
+ });
86
+ var retryAgentCommand = (agent) => `${NPX_LATEST_COMMAND} setup --agents ${agent}`;
87
+ var takeOverHooksCommand = (agent) => `${retryAgentCommand(agent)} --take-over-hooks`;
88
+ var matchMacAccountStep = (agent, setupAccount) => `Sign Pushary for Mac into ${setupAccount ?? "this setup's account"}, or run ${takeOverHooksCommand(agent)}`;
89
+ var UNCHECKED_ACCOUNT = "an account that could not be checked";
90
+ var describeMacAccountMismatch = (mismatch) => [
91
+ `${mismatch.agentName}: Pushary for Mac uses ${mismatch.macAccount ?? UNCHECKED_ACCOUNT}. This setup uses ${mismatch.setupAccount ?? UNCHECKED_ACCOUNT}.`,
92
+ matchMacAccountStep(mismatch.agent, mismatch.setupAccount)
93
+ ];
94
+ var REMAINING_AGENTS_CONTINUE = "Other agents will continue. Re-run setup to retry.";
95
+ var afterAgentFailureNote = (agentsStillToSetUp) => agentsStillToSetUp > 0 ? REMAINING_AGENTS_CONTINUE : null;
96
+ var failedAgentsContext = (configuredAgentNames) => configuredAgentNames.length > 0 ? `(configured: ${configuredAgentNames.join(", ")})` : null;
97
+ var agentFailureWire = (failures) => readSetupAgentFailures(failures);
98
+
99
+ export {
100
+ writeSetupConfigFile,
101
+ writeSetupConfigJson,
102
+ AgentConfigError,
103
+ configFailureKind,
104
+ describedAgentFailure,
105
+ agentFailureFromError,
106
+ retryAgentCommand,
107
+ matchMacAccountStep,
108
+ describeMacAccountMismatch,
109
+ afterAgentFailureNote,
110
+ failedAgentsContext,
111
+ agentFailureWire
112
+ };
@@ -9,7 +9,7 @@ import {
9
9
  } from "./chunk-3EGEA4KH.js";
10
10
  import {
11
11
  getBaseUrl
12
- } from "./chunk-BG4Y64FW.js";
12
+ } from "./chunk-BUQU3OPX.js";
13
13
 
14
14
  // src/cli/login-ui.ts
15
15
  import { hostname } from "os";
@@ -2,24 +2,24 @@ import {
2
2
  CLAUDE_HOOK_EVENTS,
3
3
  GEMINI_HOOK_EVENTS,
4
4
  hasGeminiHooks
5
- } from "./chunk-RGSW36XH.js";
5
+ } from "./chunk-BQFL2ECS.js";
6
6
  import {
7
7
  AGENT_CHOICES
8
- } from "./chunk-XV6S5PWW.js";
8
+ } from "./chunk-XE5N352V.js";
9
9
  import {
10
10
  BELL_HOOK_BINARY
11
- } from "./chunk-IFPOHFDJ.js";
11
+ } from "./chunk-KLZZI5TU.js";
12
12
  import {
13
13
  CODEX_HOOK_EVENTS,
14
14
  HOOK_SHELL,
15
15
  hasCodexHooks,
16
16
  holdBudgetOf
17
- } from "./chunk-MWLTTLPK.js";
17
+ } from "./chunk-MK4USZYQ.js";
18
18
  import {
19
19
  CURSOR_GATE_EVENTS,
20
20
  HOOK_LOCATOR_BINARY,
21
21
  hookCommandHoldBudget
22
- } from "./chunk-AXJLJJ3M.js";
22
+ } from "./chunk-7NCLUA65.js";
23
23
 
24
24
  // src/diagnostics/bridge.ts
25
25
  import { execFileSync } from "child_process";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  APPROVAL_SETTINGS_PATH
3
- } from "./chunk-64S5PQBQ.js";
3
+ } from "./chunk-GZS72NCF.js";
4
4
  import {
5
5
  readMacAppAgentKey
6
- } from "./chunk-KPNZ7JUL.js";
6
+ } from "./chunk-VDBXSUXP.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-WN3RACVD.js";
16
+ } from "./chunk-IOH2T3CB.js";
17
17
  import {
18
18
  absoluteUrl
19
- } from "./chunk-YDR4BQ7R.js";
19
+ } from "./chunk-AB3VAQ25.js";
20
20
  import {
21
21
  isValidApiKey
22
- } from "./chunk-AXJLJJ3M.js";
22
+ } from "./chunk-7NCLUA65.js";
23
23
 
24
24
  // src/key-revocation.ts
25
25
  var SELF_REVOKE_PATH = "/api/v1/server/keys/self/revoke";
@@ -6,39 +6,40 @@ import {
6
6
  } from "./chunk-QW3FRUFB.js";
7
7
  import {
8
8
  ensureDaemonRunning
9
- } from "./chunk-LBHJJEKT.js";
9
+ } from "./chunk-4WFAP6QN.js";
10
10
  import {
11
11
  hookOwnerOf
12
- } from "./chunk-BJTSKOH3.js";
12
+ } from "./chunk-SKUSGWFK.js";
13
13
  import {
14
14
  buildTranscriptRecords,
15
15
  decodePublicKey,
16
16
  generateSessionKey,
17
+ recordSealerFor,
17
18
  wrapSessionKey
18
- } from "./chunk-2AELPDMT.js";
19
+ } from "./chunk-BCVCUDFI.js";
19
20
  import {
20
21
  fetchTranscriptRecipients,
21
22
  uploadTranscriptRecords
22
- } from "./chunk-GAMVAORR.js";
23
+ } from "./chunk-V7N5NOZV.js";
23
24
  import {
24
25
  transcriptEnvironmentPreference,
25
26
  transcriptsEnabled
26
- } from "./chunk-7JXJJNQ5.js";
27
+ } from "./chunk-OJEIS5L2.js";
27
28
  import {
28
29
  readTranscriptPreference
29
- } from "./chunk-WN3RACVD.js";
30
+ } from "./chunk-IOH2T3CB.js";
31
+ import {
32
+ writeJsonAtomic
33
+ } from "./chunk-QENTGE75.js";
30
34
  import {
31
35
  claudeConfigDir,
32
36
  codexHome,
33
37
  pusharyDir
34
- } from "./chunk-MWLTTLPK.js";
35
- import {
36
- writeJsonAtomic
37
- } from "./chunk-QENTGE75.js";
38
+ } from "./chunk-MK4USZYQ.js";
38
39
  import {
39
40
  getApiKey,
40
41
  getBaseUrl
41
- } from "./chunk-BG4Y64FW.js";
42
+ } from "./chunk-BUQU3OPX.js";
42
43
 
43
44
  // src/transcript-registration.ts
44
45
  import { createHash } from "crypto";
@@ -117,6 +118,7 @@ var loadSessionKey = (sessionId, directory = sessionDir()) => {
117
118
  wrappedKey: typeof raw.wrappedKey === "string" ? raw.wrappedKey : null,
118
119
  providerWrappedKey: typeof raw.providerWrappedKey === "string" ? raw.providerWrappedKey : null,
119
120
  providerKeyId: typeof raw.providerKeyId === "string" ? raw.providerKeyId : null,
121
+ compressRecords: raw.compressRecords === true,
120
122
  keyUploaded: raw.keyUploaded === true
121
123
  };
122
124
  } catch {
@@ -135,6 +137,7 @@ var saveSessionKey = (sessionId, value, directory = sessionDir()) => {
135
137
  wrappedKey: value.wrappedKey,
136
138
  providerWrappedKey: value.providerWrappedKey,
137
139
  providerKeyId: value.providerKeyId,
140
+ compressRecords: value.compressRecords,
138
141
  keyUploaded: value.keyUploaded
139
142
  }),
140
143
  { mode: 384 }
@@ -173,6 +176,7 @@ var createSyncState = () => ({
173
176
  wrappedKey: null,
174
177
  providerWrappedKey: null,
175
178
  providerKeyId: null,
179
+ compressRecords: false,
176
180
  seen: /* @__PURE__ */ new Set(),
177
181
  keyUploaded: false,
178
182
  keyRejected: false,
@@ -189,17 +193,18 @@ var withSessionKey = async (state, uploader) => {
189
193
  sessionKey,
190
194
  wrappedKey: wrapSessionKey(sessionKey, decodePublicKey(recipients.phonePublicKey)),
191
195
  providerWrappedKey: recipients.provider ? wrapSessionKey(sessionKey, decodePublicKey(recipients.provider.publicKey)) : state.providerWrappedKey,
192
- providerKeyId: recipients.provider ? recipients.provider.keyId : state.providerKeyId
196
+ providerKeyId: recipients.provider ? recipients.provider.keyId : state.providerKeyId,
197
+ compressRecords: recipients.phoneReadsCompressedRecords
193
198
  };
194
199
  };
195
200
  var syncTick = async (lines, state, uploader, sessionId, machineId) => {
196
201
  if (state.keyRejected) return state;
197
202
  const keyed = await withSessionKey(state, uploader);
198
- const { sessionKey, wrappedKey, providerWrappedKey, providerKeyId } = keyed;
203
+ const { sessionKey, wrappedKey, providerWrappedKey, providerKeyId, compressRecords } = keyed;
199
204
  if (!sessionKey) return state;
200
- const built = buildTranscriptRecords(lines, sessionKey, state.seen);
205
+ const built = buildTranscriptRecords(lines, sessionKey, state.seen, recordSealerFor(compressRecords));
201
206
  if (built.records.length === 0) {
202
- return { ...state, sessionKey, wrappedKey, providerWrappedKey, providerKeyId, seen: built.seen, unsettled: 0 };
207
+ return { ...state, sessionKey, wrappedKey, providerWrappedKey, providerKeyId, compressRecords, seen: built.seen, unsettled: 0 };
203
208
  }
204
209
  const seen = new Set(state.seen);
205
210
  let keyUploaded = state.keyUploaded;
@@ -237,6 +242,7 @@ var syncTick = async (lines, state, uploader, sessionId, machineId) => {
237
242
  wrappedKey,
238
243
  providerWrappedKey,
239
244
  providerKeyId,
245
+ compressRecords,
240
246
  seen,
241
247
  keyUploaded,
242
248
  keyRejected,
@@ -384,6 +390,7 @@ var startTranscriptSync = (opts) => {
384
390
  wrappedKey: state.wrappedKey,
385
391
  providerWrappedKey: state.providerWrappedKey,
386
392
  providerKeyId: state.providerKeyId,
393
+ compressRecords: state.compressRecords,
387
394
  keyUploaded: state.keyUploaded
388
395
  }, opts.storage?.sessionKeyDirectory);
389
396
  };
@@ -1,30 +1,32 @@
1
- import {
2
- SubscriptionRequiredError,
3
- callMcpTool
4
- } from "./chunk-XAO6EYGM.js";
5
1
  import {
6
2
  CLIENT_REPORT_DISABLE_ENV,
7
3
  isDisabledByEnv
8
4
  } from "./chunk-POFBE6ZY.js";
5
+ import {
6
+ McpToolError,
7
+ SubscriptionRequiredError,
8
+ callMcpTool
9
+ } from "./chunk-ELAK46NR.js";
9
10
  import {
10
11
  installNetworkDefaults,
11
12
  isNetworkFailure
12
- } from "./chunk-7BAO42UV.js";
13
+ } from "./chunk-VFJSVPNL.js";
13
14
  import {
14
15
  clientReportClaims
15
- } from "./chunk-MWLTTLPK.js";
16
+ } from "./chunk-MK4USZYQ.js";
16
17
  import {
17
18
  getApiKey,
18
19
  getBaseUrl
19
- } from "./chunk-BG4Y64FW.js";
20
+ } from "./chunk-BUQU3OPX.js";
20
21
  import {
21
22
  ASK_AGENT_NAME_MAX,
22
23
  CLIENT_REPORT_PATH,
23
24
  DECISION_LINE_MAX,
24
25
  GATE_PERMISSION_MODE_MAX_LENGTH,
26
+ TOOL_FAILURE_CODES,
25
27
  degradedLine,
26
28
  truncateLine
27
- } from "./chunk-AXJLJJ3M.js";
29
+ } from "./chunk-7NCLUA65.js";
28
30
 
29
31
  // src/api.ts
30
32
  import { randomUUID } from "crypto";
@@ -195,8 +197,10 @@ var isAwayPaused = (result) => result.paused === true;
195
197
  var isLocalQuestionHandoff = (result) => !isAwayPaused(result) && (result.suppressed === true || result.noDevices === true || result.status === "terminal" || result.status === "notified");
196
198
  var waitsForThePhone = (result) => result.answered !== true && !isAwayPaused(result) && !isLocalQuestionHandoff(result);
197
199
  var STOPPED = { answered: false, handoffAction: "stop" };
198
- var unavailableQuestionUnlessSubscriptionRequired = (error) => {
199
- if (error instanceof SubscriptionRequiredError) throw error;
200
+ var isQuestionLimitRefusal = (error) => error instanceof McpToolError && error.failure === TOOL_FAILURE_CODES.questionLimit;
201
+ var isRefusedAsk = (error) => error instanceof SubscriptionRequiredError || isQuestionLimitRefusal(error);
202
+ var unavailableQuestionUnlessRefused = (error) => {
203
+ if (isRefusedAsk(error)) throw error;
200
204
  return { correlationId: "", status: "unavailable" };
201
205
  };
202
206
  var truncateOptional = (text, max) => text === void 0 ? void 0 : truncateLine(text, max);
@@ -318,7 +322,8 @@ export {
318
322
  isAwayPaused,
319
323
  isLocalQuestionHandoff,
320
324
  waitsForThePhone,
321
- unavailableQuestionUnlessSubscriptionRequired,
325
+ isQuestionLimitRefusal,
326
+ unavailableQuestionUnlessRefused,
322
327
  askUser,
323
328
  waitForAnswer,
324
329
  WAIT_RESPONSE_GRACE_MS,
@@ -1,16 +1,16 @@
1
1
  import {
2
2
  notificationAnswerStep
3
- } from "./chunk-HUI4OE43.js";
3
+ } from "./chunk-VHZAJ6IB.js";
4
4
  import {
5
5
  matchMacAccountStep,
6
6
  retryAgentCommand
7
- } from "./chunk-4VRTSDGP.js";
7
+ } from "./chunk-S2Z6VWHH.js";
8
8
  import {
9
9
  EXIT
10
10
  } from "./chunk-KZERVKTD.js";
11
11
  import {
12
12
  NPX_LATEST_COMMAND
13
- } from "./chunk-ERK24P76.js";
13
+ } from "./chunk-6Z2VR3BA.js";
14
14
 
15
15
  // src/setup/closing.ts
16
16
  var ACTIVITY_URL = "pushary.com/dashboard/agent/activity";
@@ -20,7 +20,7 @@ var sendAnotherTestLines = (appPlatforms) => {
20
20
  const step = notificationAnswerStep(appPlatforms);
21
21
  return step === null ? [CHECK_THE_NOTIFICATION_OPENED, SEND_ANOTHER_TEST] : [SEND_ANOTHER_TEST, step];
22
22
  };
23
- var TRANSCRIPT_SYNC_NOTICE = `Transcripts sync redacted and encrypted. Your phone can decrypt them; authorized Pushary compliance admins can recover them for documented legal obligations. Turn off: ${NPX_LATEST_COMMAND} setup --transcripts off`;
23
+ var TRANSCRIPT_SYNC_NOTICE = `Transcripts sync redacted and encrypted. Your phone can decrypt them; authorized Pushary compliance admins can recover them for documented legal obligations. Turn off: ${NPX_LATEST_COMMAND} transcripts off`;
24
24
  var PAIR_PHONE_APP_HINT = `${NPX_LATEST_COMMAND} setup --connect app pair the Pushary app on your phone`;
25
25
  var RESTART_AGENTS_LINE = "Restart any open agent sessions so they pick up Pushary.";
26
26
  var ANSWERING_DEVICES = {
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  configFilePath
3
- } from "./chunk-BG4Y64FW.js";
3
+ } from "./chunk-BUQU3OPX.js";
4
4
  import {
5
5
  normalizeInstallSource
6
- } from "./chunk-AXJLJJ3M.js";
6
+ } from "./chunk-7NCLUA65.js";
7
7
 
8
8
  // src/install-source.ts
9
9
  import { readFileSync } from "fs";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getBaseUrl
3
- } from "./chunk-BG4Y64FW.js";
3
+ } from "./chunk-BUQU3OPX.js";
4
4
 
5
5
  // src/transcript-api.ts
6
6
  var fetchTranscriptRecipients = async (apiKey, baseUrl = getBaseUrl()) => {
@@ -12,14 +12,16 @@ var fetchTranscriptRecipients = async (apiKey, baseUrl = getBaseUrl()) => {
12
12
  if (!res.ok) return null;
13
13
  const data = await res.json();
14
14
  if (typeof data.publicKey !== "string" || data.publicKey.length === 0) return null;
15
+ const phoneReadsCompressedRecords = data.readsCompressedRecords === true;
15
16
  if (data.providerRecovery === void 0 || data.providerRecovery === null) {
16
- return { phonePublicKey: data.publicKey, provider: null };
17
+ return { phonePublicKey: data.publicKey, phoneReadsCompressedRecords, provider: null };
17
18
  }
18
19
  if (typeof data.providerRecovery !== "object") return null;
19
20
  const provider = data.providerRecovery;
20
21
  if (typeof provider.required !== "boolean" || typeof provider.keyId !== "string" || provider.keyId.length === 0 || typeof provider.publicKey !== "string" || provider.publicKey.length === 0) return null;
21
22
  return {
22
23
  phonePublicKey: data.publicKey,
24
+ phoneReadsCompressedRecords,
23
25
  provider: { required: provider.required, keyId: provider.keyId, publicKey: provider.publicKey }
24
26
  };
25
27
  } catch {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  PRETOOLUSE_GATED_TOOLS
3
- } from "./chunk-AXJLJJ3M.js";
3
+ } from "./chunk-7NCLUA65.js";
4
4
 
5
5
  // src/claude-tools.ts
6
6
  var POSTTOOLUSE_MIRROR_ONLY_TOOLS = ["TodoWrite", "Task", "WebFetch", "WebSearch"];
@@ -1,18 +1,18 @@
1
1
  import {
2
2
  macAppBridgeAvailable
3
- } from "./chunk-ZGU3NXL2.js";
3
+ } from "./chunk-LTT54NOU.js";
4
4
  import {
5
5
  keyPrefix
6
- } from "./chunk-WN3RACVD.js";
7
- import {
8
- bridgeAgentKey
9
- } from "./chunk-MWLTTLPK.js";
6
+ } from "./chunk-IOH2T3CB.js";
10
7
  import {
11
8
  readJsonSafe
12
9
  } from "./chunk-QENTGE75.js";
10
+ import {
11
+ bridgeAgentKey
12
+ } from "./chunk-MK4USZYQ.js";
13
13
  import {
14
14
  isValidApiKey
15
- } from "./chunk-AXJLJJ3M.js";
15
+ } from "./chunk-7NCLUA65.js";
16
16
 
17
17
  // src/shared-mcp-key.ts
18
18
  var asRecord = (value) => value !== null && typeof value === "object" && !Array.isArray(value) ? value : void 0;
@@ -1,19 +1,19 @@
1
1
  import {
2
2
  readExistingMachineId
3
- } from "./chunk-SFAP4AJY.js";
3
+ } from "./chunk-L5CDGXPO.js";
4
4
  import {
5
5
  NetworkError
6
6
  } from "./chunk-PPY5N2E6.js";
7
7
  import {
8
8
  getBaseUrl
9
- } from "./chunk-BG4Y64FW.js";
9
+ } from "./chunk-BUQU3OPX.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-AXJLJJ3M.js";
16
+ } from "./chunk-7NCLUA65.js";
17
17
 
18
18
  // src/cli/net.ts
19
19
  import { createRequire } from "module";
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  callMcpTool
3
- } from "./chunk-XAO6EYGM.js";
3
+ } from "./chunk-ELAK46NR.js";
4
4
  import {
5
5
  NPX_LATEST_COMMAND
6
- } from "./chunk-ERK24P76.js";
6
+ } from "./chunk-6Z2VR3BA.js";
7
7
  import {
8
8
  classifyConfirmResponse,
9
9
  isAnswerSource
10
- } from "./chunk-AXJLJJ3M.js";
10
+ } from "./chunk-7NCLUA65.js";
11
11
 
12
12
  // src/reach.ts
13
13
  var reachVerdict = (channels) => {
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  CODEX_HOOK_STATUS
3
- } from "./chunk-BUZIEL7Y.js";
3
+ } from "./chunk-YK6GR4GU.js";
4
4
  import {
5
5
  NPX_LATEST_COMMAND
6
- } from "./chunk-ERK24P76.js";
6
+ } from "./chunk-6Z2VR3BA.js";
7
7
 
8
8
  // src/setup/codex-trust.ts
9
9
  var CODEX_TRUST_TELEMETRY = {
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  parseSseMessages
3
- } from "./chunk-XAO6EYGM.js";
3
+ } from "./chunk-ELAK46NR.js";
4
4
  import {
5
5
  NPX_LATEST_COMMAND
6
- } from "./chunk-ERK24P76.js";
6
+ } from "./chunk-6Z2VR3BA.js";
7
7
 
8
8
  // src/mcp-stdio-bridge.ts
9
9
  var MCP_BRIDGE_BINARY = "pushary-mcp";
@@ -1,10 +1,10 @@
1
- import {
2
- pusharyDir
3
- } from "./chunk-MWLTTLPK.js";
4
1
  import {
5
2
  readJsonSafe,
6
3
  writeFileAtomic
7
4
  } from "./chunk-QENTGE75.js";
5
+ import {
6
+ pusharyDir
7
+ } from "./chunk-MK4USZYQ.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-AXJLJJ3M.js";
16
+ } from "./chunk-7NCLUA65.js";
17
17
 
18
18
  // src/declined-agents-file.ts
19
19
  import { join } from "path";
@@ -10,7 +10,7 @@ import {
10
10
  isSetupConnectMode,
11
11
  isValidApiKey,
12
12
  normalizeAgentId
13
- } from "./chunk-AXJLJJ3M.js";
13
+ } from "./chunk-7NCLUA65.js";
14
14
 
15
15
  // src/setup/options.ts
16
16
  var AGENT_CHOICES = SETUP_AGENT_CHOICES;
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  isSafeReadOnlyCommand
3
- } from "./chunk-AXJLJJ3M.js";
3
+ } from "./chunk-7NCLUA65.js";
4
4
 
5
5
  // src/ledger.ts
6
6
  import { appendFileSync, existsSync, mkdirSync, readFileSync, renameSync, rmSync, statSync } from "fs";
@@ -7,10 +7,10 @@ import {
7
7
  codexHome,
8
8
  codexHooksJsonIn,
9
9
  isPusharyCodexCommand
10
- } from "./chunk-MWLTTLPK.js";
10
+ } from "./chunk-MK4USZYQ.js";
11
11
  import {
12
12
  resolvePathBinary
13
- } from "./chunk-CJ5TCFD4.js";
13
+ } from "./chunk-5LOP4AVD.js";
14
14
  import {
15
15
  getPackageVersion
16
16
  } from "./chunk-QTOLNRET.js";