pushary 1.9.62 → 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 (123) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/README.md +1 -1
  3. package/dist/{api-7HLZRIUV.js → api-UHUUAONF.js} +10 -10
  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 +28 -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 +35 -35
  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 +45 -43
  17. package/dist/bin/pushary-elicitation-hook.js +28 -28
  18. package/dist/bin/pushary-gemini-bridge.js +15 -15
  19. package/dist/bin/pushary-gemini-hook.js +30 -30
  20. package/dist/bin/pushary-hook.js +31 -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 +29 -29
  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 +114 -4204
  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-67Q3Q5IO.js → chunk-2MZ6ROWZ.js} +6 -6
  45. package/dist/{chunk-7GU4PXE5.js → chunk-3GVV7XVT.js} +1 -1
  46. package/dist/{chunk-557ZE5EX.js → chunk-3QLFB2EY.js} +4 -4
  47. package/dist/{chunk-5R23J52J.js → chunk-4WFAP6QN.js} +10 -10
  48. package/dist/{chunk-UWCPY4RY.js → chunk-5JK3DQGZ.js} +2 -2
  49. package/dist/{chunk-CFIQ3252.js → chunk-5LOP4AVD.js} +3 -3
  50. package/dist/{chunk-FG5HMJ7C.js → chunk-6Z2VR3BA.js} +4 -2
  51. package/dist/{chunk-OZRT64BB.js → chunk-75ODMNOM.js} +1 -1
  52. package/dist/{chunk-4K6YZPZ3.js → chunk-7GRQGXF4.js} +1 -1
  53. package/dist/{chunk-FXECTHAG.js → chunk-7NCLUA65.js} +26 -4
  54. package/dist/{chunk-Q4WTIKM6.js → chunk-AB3VAQ25.js} +3 -3
  55. package/dist/{chunk-7ETELRQX.js → chunk-BCVCUDFI.js} +16 -5
  56. package/dist/{chunk-LCNN7UOE.js → chunk-BQFL2ECS.js} +3 -3
  57. package/dist/{chunk-DFKEJARZ.js → chunk-BUQU3OPX.js} +1 -1
  58. package/dist/{chunk-RFCEVROB.js → chunk-CLABCSZC.js} +4 -4
  59. package/dist/{chunk-LILS32LF.js → chunk-DMNLFWGY.js} +7 -108
  60. package/dist/{chunk-SDOWT67G.js → chunk-EHHTQURL.js} +5 -5
  61. package/dist/{chunk-ESXGCZDA.js → chunk-ELAK46NR.js} +4 -4
  62. package/dist/{chunk-ZJFJUAHS.js → chunk-EQ26IKZM.js} +6 -6
  63. package/dist/{chunk-NZLQ6GMX.js → chunk-FAF5AW3P.js} +9 -9
  64. package/dist/{chunk-A4CZPUQ6.js → chunk-FEAGK25K.js} +1 -1
  65. package/dist/{chunk-3LBB7GVF.js → chunk-GNUARBRZ.js} +4 -4
  66. package/dist/{chunk-AFV3FQNG.js → chunk-GZS72NCF.js} +4 -4
  67. package/dist/{chunk-3YGUWPNZ.js → chunk-HAIXS4OX.js} +2 -2
  68. package/dist/{chunk-TMHE5CVX.js → chunk-HOIO66DU.js} +3 -3
  69. package/dist/{chunk-NAZRRXZM.js → chunk-HZ72EMJE.js} +2 -2
  70. package/dist/{chunk-W3CBFLIX.js → chunk-IOH2T3CB.js} +17 -3
  71. package/dist/chunk-KEPESIIR.js +4117 -0
  72. package/dist/{chunk-3IFCXMC6.js → chunk-KL76XWZ7.js} +1 -1
  73. package/dist/{chunk-F35YILEN.js → chunk-KLZZI5TU.js} +1 -1
  74. package/dist/{chunk-GV43RXR2.js → chunk-KUCL7ETL.js} +1 -1
  75. package/dist/{chunk-G3ZDCYMU.js → chunk-L5CDGXPO.js} +3 -3
  76. package/dist/{chunk-EA6574W2.js → chunk-LGZ545TA.js} +5 -5
  77. package/dist/{chunk-6HIYOY6I.js → chunk-LTT54NOU.js} +8 -8
  78. package/dist/{chunk-6YSEOXP5.js → chunk-MK4USZYQ.js} +2 -2
  79. package/dist/{chunk-FX7KDF47.js → chunk-MRCVYYPW.js} +3 -3
  80. package/dist/{chunk-ZEDGKCCM.js → chunk-OJEIS5L2.js} +1 -1
  81. package/dist/{chunk-GFAG72LR.js → chunk-OP5IBEV7.js} +7 -3
  82. package/dist/{chunk-SJCPIYWJ.js → chunk-OU3BYBJ3.js} +2 -2
  83. package/dist/{chunk-W6MYFAOK.js → chunk-OW6VBXXI.js} +15 -15
  84. package/dist/{chunk-R3CLBNST.js → chunk-OY6Z4IKB.js} +1 -1
  85. package/dist/{chunk-SJJYXMJP.js → chunk-P6RF4RQN.js} +6 -6
  86. package/dist/{chunk-7E2ZN7XA.js → chunk-PIQ4HHA2.js} +5 -5
  87. package/dist/{chunk-VF3IL56Q.js → chunk-PJ34FOIV.js} +4 -4
  88. package/dist/{chunk-LWR5VKNC.js → chunk-PXAOEFJZ.js} +11 -11
  89. package/dist/{chunk-7EHZXZB2.js → chunk-QC2W42DE.js} +12 -12
  90. package/dist/{chunk-7NXB7OVX.js → chunk-RAJ3QEIL.js} +1 -1
  91. package/dist/chunk-S2Z6VWHH.js +112 -0
  92. package/dist/{chunk-MYEALNW6.js → chunk-SARPHHTT.js} +1 -1
  93. package/dist/{chunk-7NJ4TDUH.js → chunk-SKUSGWFK.js} +5 -5
  94. package/dist/{chunk-YQK72JGV.js → chunk-T3GHXR6N.js} +5 -5
  95. package/dist/{chunk-EUNSJKJJ.js → chunk-T6XQNOZV.js} +22 -15
  96. package/dist/{chunk-RSNN2TPE.js → chunk-TBKHQWIH.js} +9 -9
  97. package/dist/{chunk-M7MEVILL.js → chunk-TMGJAFSD.js} +4 -4
  98. package/dist/{chunk-PSCXEH42.js → chunk-V5W3CK7F.js} +2 -2
  99. package/dist/{chunk-UUAVYIWJ.js → chunk-V7N5NOZV.js} +4 -2
  100. package/dist/{chunk-LL2KHEJH.js → chunk-VC3HFFMQ.js} +1 -1
  101. package/dist/{chunk-QIPW7OVB.js → chunk-VDBXSUXP.js} +6 -6
  102. package/dist/{chunk-HSRNWCXJ.js → chunk-VFJSVPNL.js} +3 -3
  103. package/dist/{chunk-RU37NSZH.js → chunk-VHZAJ6IB.js} +3 -3
  104. package/dist/{chunk-BIUSODLS.js → chunk-VN7XH6TU.js} +2 -2
  105. package/dist/{chunk-EO6CL4PD.js → chunk-WUOOZE5S.js} +2 -2
  106. package/dist/{chunk-6JAWNRDR.js → chunk-XBTWG2VL.js} +4 -4
  107. package/dist/{chunk-MURJ4WAL.js → chunk-XE5N352V.js} +1 -1
  108. package/dist/{chunk-44FNEAXK.js → chunk-XO3KAH7K.js} +1 -1
  109. package/dist/{chunk-EVZDYG7L.js → chunk-YK6GR4GU.js} +2 -2
  110. package/dist/{chunk-FYS27SUS.js → chunk-YMZOM6BD.js} +6 -6
  111. package/dist/{codex-app-cards-switch-IIL7IPP6.js → codex-app-cards-switch-LXMAIOFB.js} +11 -11
  112. package/dist/{codex-desktop-launch-XCLMYVBD.js → codex-desktop-launch-VE5RLFUU.js} +1 -1
  113. package/dist/{codex-session-launch-UMVALJ3A.js → codex-session-launch-XZZWXCPK.js} +18 -18
  114. package/dist/{config-5N3GUJD5.js → config-PPX25AV5.js} +3 -3
  115. package/dist/{global-upgrade-5F4CSXED.js → global-upgrade-NRMHNLNU.js} +9 -9
  116. package/dist/{identity-7ULYW4RL.js → identity-ZFQR7JNW.js} +4 -4
  117. package/dist/{live-capabilities-QTSFXA6T.js → live-capabilities-SJRYRKNB.js} +4 -4
  118. package/dist/{paths-HEMK2ALW.js → paths-7VTVOQXJ.js} +3 -3
  119. package/dist/{reapply-AMFKVYZV.js → reapply-WOANOIRZ.js} +27 -26
  120. package/dist/src/index.js +21 -21
  121. package/dist/{upgrade-lock-IAZC5644.js → upgrade-lock-VAYJZVTB.js} +4 -4
  122. package/dist/{usage-NEFDYSRT.js → usage-C4DIYUR6.js} +3 -3
  123. package/package.json +1 -1
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  DEFAULT_SESSION
3
- } from "./chunk-LWR5VKNC.js";
3
+ } from "./chunk-PXAOEFJZ.js";
4
4
 
5
5
  // src/answer.ts
6
6
  var isDeferAnswer = (value) => value === "defer";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  guardBinary
3
- } from "./chunk-6YSEOXP5.js";
3
+ } from "./chunk-MK4USZYQ.js";
4
4
 
5
5
  // src/bell/install.ts
6
6
  import { join } from "path";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  readConfigFileKey
3
- } from "./chunk-W3CBFLIX.js";
3
+ } from "./chunk-IOH2T3CB.js";
4
4
 
5
5
  // src/bell/fleet.ts
6
6
  import { closeSync, constants, futimesSync, lstatSync, mkdirSync, openSync, readdirSync, unlinkSync } from "fs";
@@ -1,9 +1,9 @@
1
- import {
2
- pusharyDir
3
- } from "./chunk-6YSEOXP5.js";
4
1
  import {
5
2
  writeFileAtomic
6
3
  } from "./chunk-QENTGE75.js";
4
+ import {
5
+ pusharyDir
6
+ } from "./chunk-MK4USZYQ.js";
7
7
 
8
8
  // src/identity.ts
9
9
  import { randomUUID } from "crypto";
@@ -1,22 +1,22 @@
1
1
  import {
2
2
  openCodeConfigDirFrom
3
- } from "./chunk-6HIYOY6I.js";
3
+ } from "./chunk-LTT54NOU.js";
4
4
  import {
5
5
  nativeClaudeInstallPath
6
6
  } from "./chunk-VUFHYMSP.js";
7
7
  import {
8
8
  grokHome
9
- } from "./chunk-557ZE5EX.js";
9
+ } from "./chunk-3QLFB2EY.js";
10
10
  import {
11
11
  claudeConfigDir,
12
12
  codexHomeFrom
13
- } from "./chunk-6YSEOXP5.js";
13
+ } from "./chunk-MK4USZYQ.js";
14
14
  import {
15
15
  resolvePathBinary
16
- } from "./chunk-CFIQ3252.js";
16
+ } from "./chunk-5LOP4AVD.js";
17
17
  import {
18
18
  HOOK_COMPATIBLE_PROFILES
19
- } from "./chunk-FXECTHAG.js";
19
+ } from "./chunk-7NCLUA65.js";
20
20
 
21
21
  // src/hermes-config.ts
22
22
  import { execFileSync } from "child_process";
@@ -1,15 +1,18 @@
1
1
  import {
2
2
  compatibleConfigFile
3
- } from "./chunk-557ZE5EX.js";
3
+ } from "./chunk-3QLFB2EY.js";
4
4
  import {
5
5
  hookOwnerOf,
6
6
  hookOwnerOfCommands,
7
7
  liveBridgeProbe,
8
8
  resolveBridgeStub
9
- } from "./chunk-7NJ4TDUH.js";
9
+ } from "./chunk-SKUSGWFK.js";
10
10
  import {
11
11
  AGENT_CHOICES
12
- } from "./chunk-MURJ4WAL.js";
12
+ } from "./chunk-XE5N352V.js";
13
+ import {
14
+ readJsonSafe
15
+ } from "./chunk-QENTGE75.js";
13
16
  import {
14
17
  claudeSettings,
15
18
  codexHooksJson,
@@ -18,10 +21,7 @@ import {
18
21
  guardedArgv,
19
22
  pusharyDir,
20
23
  vscodePluginDir
21
- } from "./chunk-6YSEOXP5.js";
22
- import {
23
- readJsonSafe
24
- } from "./chunk-QENTGE75.js";
24
+ } from "./chunk-MK4USZYQ.js";
25
25
  import {
26
26
  HOOK_BUDGETS,
27
27
  HOOK_COMPATIBLE_PROFILES,
@@ -29,7 +29,7 @@ import {
29
29
  OPENCODE_APPROVAL_EVENT,
30
30
  hookCompatibleProfile,
31
31
  isRecord
32
- } from "./chunk-FXECTHAG.js";
32
+ } from "./chunk-7NCLUA65.js";
33
33
 
34
34
  // src/opencode-plugin.ts
35
35
  var OPENCODE_PLUGIN_MARKER = "pushary-opencode-plugin w1";
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  quoteIfNeeded,
3
3
  shellDoubleQuoted
4
- } from "./chunk-CFIQ3252.js";
4
+ } from "./chunk-5LOP4AVD.js";
5
5
  import {
6
6
  CODEX_QUESTION_TOOLS,
7
7
  HOOK_BUDGETS,
8
8
  HOOK_LOCATOR_BINARY,
9
9
  withHookHoldBudget
10
- } from "./chunk-FXECTHAG.js";
10
+ } from "./chunk-7NCLUA65.js";
11
11
 
12
12
  // src/setup/paths.ts
13
13
  import { createHash as createHash2 } from "crypto";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  SETUP_FLAGS
3
- } from "./chunk-MURJ4WAL.js";
3
+ } from "./chunk-XE5N352V.js";
4
4
  import {
5
5
  parseFlags
6
6
  } from "./chunk-NMUI3ZWG.js";
@@ -9,7 +9,7 @@ import {
9
9
  } from "./chunk-PPY5N2E6.js";
10
10
  import {
11
11
  NPX_LATEST_COMMAND
12
- } from "./chunk-FG5HMJ7C.js";
12
+ } from "./chunk-6Z2VR3BA.js";
13
13
  import {
14
14
  CLAUDE_CONNECTOR_GUIDE,
15
15
  CLAUDE_CONNECTOR_STEPS,
@@ -17,7 +17,7 @@ import {
17
17
  CLAUDE_CONNECTOR_URL,
18
18
  COWORK_CONNECTOR_LIMIT,
19
19
  COWORK_STANDING_INSTRUCTIONS
20
- } from "./chunk-FXECTHAG.js";
20
+ } from "./chunk-7NCLUA65.js";
21
21
 
22
22
  // src/cli/cowork.ts
23
23
  import { readFileSync } from "fs";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  readTranscriptPreference
3
- } from "./chunk-W3CBFLIX.js";
3
+ } from "./chunk-IOH2T3CB.js";
4
4
 
5
5
  // src/transcript-setting.ts
6
6
  var transcriptEnvironmentPreference = () => {
@@ -1,13 +1,15 @@
1
1
  import {
2
2
  buildTranscriptRecords,
3
3
  decodePublicKey,
4
+ encryptRecord,
4
5
  generateSessionKey,
6
+ recordSealerFor,
5
7
  wrapSessionKey
6
- } from "./chunk-7ETELRQX.js";
8
+ } from "./chunk-BCVCUDFI.js";
7
9
  import {
8
10
  fetchTranscriptRecipients,
9
11
  uploadTranscriptRecords
10
- } from "./chunk-UUAVYIWJ.js";
12
+ } from "./chunk-V7N5NOZV.js";
11
13
 
12
14
  // src/live-session.ts
13
15
  var MAX_TRANSCRIPT_QUEUE = 100;
@@ -68,6 +70,7 @@ var LiveTranscriptRelay = class {
68
70
  wrappedKey = null;
69
71
  providerWrappedKey = null;
70
72
  providerKeyId = null;
73
+ sealRecord = encryptRecord;
71
74
  keyUploaded = false;
72
75
  keyRejected = false;
73
76
  flushing = null;
@@ -98,13 +101,14 @@ var LiveTranscriptRelay = class {
98
101
  if (!recipients) return false;
99
102
  this.sessionKey = generateSessionKey();
100
103
  this.wrappedKey = wrapSessionKey(this.sessionKey, decodePublicKey(recipients.phonePublicKey));
104
+ this.sealRecord = recordSealerFor(recipients.phoneReadsCompressedRecords);
101
105
  if (recipients.provider) {
102
106
  this.providerWrappedKey = wrapSessionKey(this.sessionKey, decodePublicKey(recipients.provider.publicKey));
103
107
  this.providerKeyId = recipients.provider.keyId;
104
108
  }
105
109
  }
106
110
  const count = Math.min(this.queue.length, 50);
107
- const records = buildTranscriptRecords(this.queue.slice(0, count), this.sessionKey).records;
111
+ const records = buildTranscriptRecords(this.queue.slice(0, count), this.sessionKey, /* @__PURE__ */ new Set(), this.sealRecord).records;
108
112
  if (records.length === 0) {
109
113
  this.queue.splice(0, count);
110
114
  return true;
@@ -8,13 +8,13 @@ import {
8
8
  everyProgramFileIsThere,
9
9
  installedCodexApp,
10
10
  shellQuoted
11
- } from "./chunk-UWCPY4RY.js";
11
+ } from "./chunk-5JK3DQGZ.js";
12
12
  import {
13
13
  writeHuman
14
14
  } from "./chunk-QCGNGEGE.js";
15
15
  import {
16
16
  xml
17
- } from "./chunk-5R23J52J.js";
17
+ } from "./chunk-4WFAP6QN.js";
18
18
  import {
19
19
  CODEX_APP_LAUNCH_AT_LOGIN_VERB,
20
20
  CODEX_APP_LAUNCH_VARIABLE
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  ensureCodexTrustsPusharyHooks
3
- } from "./chunk-EVZDYG7L.js";
3
+ } from "./chunk-YK6GR4GU.js";
4
4
  import {
5
5
  CODEX_INSTRUCTIONS_LABEL,
6
6
  GEMINI_INSTRUCTIONS_LABEL,
@@ -11,7 +11,7 @@ import {
11
11
  macAppFxBridge,
12
12
  refreshInstructionBlock,
13
13
  renderAgentInstructions
14
- } from "./chunk-LILS32LF.js";
14
+ } from "./chunk-DMNLFWGY.js";
15
15
  import {
16
16
  OPENCODE_HOOK_BINARY,
17
17
  agentHookOwner,
@@ -21,10 +21,10 @@ import {
21
21
  openCodeInstructionsFile,
22
22
  openCodePluginDir,
23
23
  openCodeWired
24
- } from "./chunk-6HIYOY6I.js";
24
+ } from "./chunk-LTT54NOU.js";
25
25
  import {
26
26
  detectClaudeVersion
27
- } from "./chunk-R3CLBNST.js";
27
+ } from "./chunk-OY6Z4IKB.js";
28
28
  import {
29
29
  addClaudeMcpServer,
30
30
  addCompatibleHooks,
@@ -33,7 +33,7 @@ import {
33
33
  compatibleConfigFile,
34
34
  compatibleInstructionsFile,
35
35
  hasCompatibleHooks
36
- } from "./chunk-557ZE5EX.js";
36
+ } from "./chunk-3QLFB2EY.js";
37
37
  import {
38
38
  claudeUnprovenHolds,
39
39
  claudeWired,
@@ -41,7 +41,7 @@ import {
41
41
  codexWired,
42
42
  geminiWired,
43
43
  planHooks
44
- } from "./chunk-7NJ4TDUH.js";
44
+ } from "./chunk-SKUSGWFK.js";
45
45
  import {
46
46
  CLAUDE_HOOK_BINARY,
47
47
  CLAUDE_HOOK_EVENTS,
@@ -52,10 +52,15 @@ import {
52
52
  needsReregistration,
53
53
  registrationSignatures,
54
54
  supportedClaudeEvents
55
- } from "./chunk-LCNN7UOE.js";
55
+ } from "./chunk-BQFL2ECS.js";
56
56
  import {
57
57
  formatVersion
58
58
  } from "./chunk-6ICPEJY5.js";
59
+ import {
60
+ readJsonSafe,
61
+ writeFileAtomic,
62
+ writeJsonAtomic
63
+ } from "./chunk-QENTGE75.js";
59
64
  import {
60
65
  CODEX_HOOK_BINARY,
61
66
  addCodexHookTrust,
@@ -83,21 +88,16 @@ import {
83
88
  registeredCommands,
84
89
  registrationHolderOf,
85
90
  vscodePluginMcp
86
- } from "./chunk-6YSEOXP5.js";
91
+ } from "./chunk-MK4USZYQ.js";
87
92
  import {
88
93
  resolveGlobalBinDir,
89
94
  resolveGlobalBinary
90
- } from "./chunk-CFIQ3252.js";
91
- import {
92
- readJsonSafe,
93
- writeFileAtomic,
94
- writeJsonAtomic
95
- } from "./chunk-QENTGE75.js";
95
+ } from "./chunk-5LOP4AVD.js";
96
96
  import {
97
97
  HOOK_COMPATIBLE_PROFILES,
98
98
  isCompatibleAgentType,
99
99
  isRecord
100
- } from "./chunk-FXECTHAG.js";
100
+ } from "./chunk-7NCLUA65.js";
101
101
 
102
102
  // src/reapply.ts
103
103
  import { dirname, join } from "path";
@@ -6,7 +6,7 @@ import {
6
6
  } from "./chunk-6ICPEJY5.js";
7
7
  import {
8
8
  isRecord
9
- } from "./chunk-FXECTHAG.js";
9
+ } from "./chunk-7NCLUA65.js";
10
10
 
11
11
  // src/setup/agent-probe.ts
12
12
  import { execSync } from "child_process";
@@ -4,30 +4,30 @@ import {
4
4
  postLiveSession,
5
5
  postLiveSessionUntilAccepted,
6
6
  startLiveSessionHeartbeat
7
- } from "./chunk-GFAG72LR.js";
7
+ } from "./chunk-OP5IBEV7.js";
8
8
  import {
9
9
  SESSION_IDLE_TIMEOUT_MS,
10
10
  describeIdleWindow,
11
11
  idleDeadlinePassed,
12
12
  startProcessOwnership
13
- } from "./chunk-RFCEVROB.js";
13
+ } from "./chunk-CLABCSZC.js";
14
14
  import {
15
15
  spawnClaude
16
16
  } from "./chunk-XHKBHWLX.js";
17
17
  import {
18
18
  repoKeyFor
19
- } from "./chunk-4K6YZPZ3.js";
19
+ } from "./chunk-7GRQGXF4.js";
20
20
  import {
21
21
  isAskUserResponse,
22
22
  isDecisionStopped,
23
23
  isWaitForAnswerResponse,
24
24
  withdrawQuestion,
25
25
  writeDegraded
26
- } from "./chunk-RSNN2TPE.js";
26
+ } from "./chunk-TBKHQWIH.js";
27
27
  import {
28
28
  callMcpTool,
29
29
  isRetryable
30
- } from "./chunk-ESXGCZDA.js";
30
+ } from "./chunk-ELAK46NR.js";
31
31
  import {
32
32
  AGENT_QUESTION_DESCRIPTION_MAX,
33
33
  AGENT_QUESTION_HEADER_MAX,
@@ -48,7 +48,7 @@ import {
48
48
  parseCodexQuestions,
49
49
  planElicitationAsk,
50
50
  readElicitationFields
51
- } from "./chunk-FXECTHAG.js";
51
+ } from "./chunk-7NCLUA65.js";
52
52
 
53
53
  // src/codex-question-owner.ts
54
54
  import { createHash } from "crypto";
@@ -1,13 +1,13 @@
1
+ import {
2
+ writeJsonAtomic
3
+ } from "./chunk-QENTGE75.js";
1
4
  import {
2
5
  autoUpdateLock
3
- } from "./chunk-6YSEOXP5.js";
6
+ } from "./chunk-MK4USZYQ.js";
4
7
  import {
5
8
  installPackageGlobally,
6
9
  npmErrorMessage
7
- } from "./chunk-CFIQ3252.js";
8
- import {
9
- writeJsonAtomic
10
- } from "./chunk-QENTGE75.js";
10
+ } from "./chunk-5LOP4AVD.js";
11
11
 
12
12
  // src/upgrade-lock.ts
13
13
  import { fork } from "child_process";
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  isDisabledByEnv
3
3
  } from "./chunk-POFBE6ZY.js";
4
- import {
5
- autoUpdateState
6
- } from "./chunk-6YSEOXP5.js";
7
4
  import {
8
5
  readJsonSafe,
9
6
  writeJsonAtomic
10
7
  } from "./chunk-QENTGE75.js";
8
+ import {
9
+ autoUpdateState
10
+ } from "./chunk-MK4USZYQ.js";
11
11
  import {
12
12
  CLI_PACKAGE_NAMES,
13
13
  POSIX_GLOBAL_ROOT_SEGMENTS,
@@ -17,7 +17,7 @@ import {
17
17
  } from "./chunk-QTOLNRET.js";
18
18
  import {
19
19
  isAutoUpdateResult
20
- } from "./chunk-FXECTHAG.js";
20
+ } from "./chunk-7NCLUA65.js";
21
21
 
22
22
  // src/auto-update.ts
23
23
  import { spawn } from "child_process";
@@ -2,10 +2,10 @@ import {
2
2
  IDLE_PROMPT_NOTIFICATION,
3
3
  NOTIFICATION_PUSH_TYPES,
4
4
  POSTTOOLUSE_MIRROR_ONLY_TOOLS
5
- } from "./chunk-LL2KHEJH.js";
5
+ } from "./chunk-VC3HFFMQ.js";
6
6
  import {
7
7
  repoKeyFor
8
- } from "./chunk-4K6YZPZ3.js";
8
+ } from "./chunk-7GRQGXF4.js";
9
9
  import {
10
10
  cancelQuestion,
11
11
  clientErrorKindOf,
@@ -13,26 +13,26 @@ import {
13
13
  reportClientError,
14
14
  sendNotification,
15
15
  waitForAnswer
16
- } from "./chunk-RSNN2TPE.js";
16
+ } from "./chunk-TBKHQWIH.js";
17
17
  import {
18
18
  withRetry
19
- } from "./chunk-ESXGCZDA.js";
19
+ } from "./chunk-ELAK46NR.js";
20
20
  import {
21
21
  getMachineId
22
- } from "./chunk-G3ZDCYMU.js";
22
+ } from "./chunk-L5CDGXPO.js";
23
23
  import {
24
24
  reportedInstallSource
25
- } from "./chunk-PSCXEH42.js";
26
- import {
27
- canonicalJson
28
- } from "./chunk-6YSEOXP5.js";
25
+ } from "./chunk-V5W3CK7F.js";
29
26
  import {
30
27
  writeFileAtomic
31
28
  } from "./chunk-QENTGE75.js";
29
+ import {
30
+ canonicalJson
31
+ } from "./chunk-MK4USZYQ.js";
32
32
  import {
33
33
  getApiKey,
34
34
  getBaseUrl
35
- } from "./chunk-DFKEJARZ.js";
35
+ } from "./chunk-BUQU3OPX.js";
36
36
  import {
37
37
  ACTION_BODY_MAX,
38
38
  AGENTS,
@@ -67,7 +67,7 @@ import {
67
67
  toToolLookup,
68
68
  truncateLine,
69
69
  unansweredRefusalReason
70
- } from "./chunk-FXECTHAG.js";
70
+ } from "./chunk-7NCLUA65.js";
71
71
 
72
72
  // ../hook-mapping/src/describe.ts
73
73
  import { isAbsolute, relative, resolve } from "path";
@@ -4,19 +4,19 @@ import {
4
4
  outcomeOfFailedAsk,
5
5
  reportMachineDenial,
6
6
  storedWaitDeadline
7
- } from "./chunk-67Q3Q5IO.js";
7
+ } from "./chunk-2MZ6ROWZ.js";
8
8
  import {
9
9
  isGatingMoment,
10
10
  recordKeylessMoment
11
- } from "./chunk-44FNEAXK.js";
11
+ } from "./chunk-XO3KAH7K.js";
12
12
  import {
13
13
  isDeferAnswer,
14
14
  oncePerSession
15
- } from "./chunk-3IFCXMC6.js";
15
+ } from "./chunk-KL76XWZ7.js";
16
16
  import {
17
17
  activeHookSource,
18
18
  activeIdentity
19
- } from "./chunk-557ZE5EX.js";
19
+ } from "./chunk-3QLFB2EY.js";
20
20
  import {
21
21
  DEFAULT_SESSION,
22
22
  UNNAMED_ACTION,
@@ -40,10 +40,10 @@ import {
40
40
  reportEvent,
41
41
  scopePathFor,
42
42
  settleQuestionsForToolUse
43
- } from "./chunk-LWR5VKNC.js";
43
+ } from "./chunk-PXAOEFJZ.js";
44
44
  import {
45
45
  repoKeyFor
46
- } from "./chunk-4K6YZPZ3.js";
46
+ } from "./chunk-7GRQGXF4.js";
47
47
  import {
48
48
  askUser,
49
49
  cancelQuestion,
@@ -59,20 +59,20 @@ import {
59
59
  sendNotification,
60
60
  waitForQuestion,
61
61
  waitsForThePhone
62
- } from "./chunk-RSNN2TPE.js";
62
+ } from "./chunk-TBKHQWIH.js";
63
63
  import {
64
64
  getMachineId
65
- } from "./chunk-G3ZDCYMU.js";
65
+ } from "./chunk-L5CDGXPO.js";
66
66
  import {
67
67
  claudeConfigDir
68
- } from "./chunk-6YSEOXP5.js";
68
+ } from "./chunk-MK4USZYQ.js";
69
69
  import {
70
70
  getApiKey,
71
71
  getBaseUrl
72
- } from "./chunk-DFKEJARZ.js";
72
+ } from "./chunk-BUQU3OPX.js";
73
73
  import {
74
74
  NPX_LATEST_COMMAND
75
- } from "./chunk-FG5HMJ7C.js";
75
+ } from "./chunk-6Z2VR3BA.js";
76
76
  import {
77
77
  AGENT_QUESTION_STRATEGY,
78
78
  AGENT_QUESTION_TOOL,
@@ -121,7 +121,7 @@ import {
121
121
  resolveGate,
122
122
  timeoutActionWithoutLocalPrompt,
123
123
  unansweredRefusalReason
124
- } from "./chunk-FXECTHAG.js";
124
+ } from "./chunk-7NCLUA65.js";
125
125
 
126
126
  // src/claude-permission-rules.ts
127
127
  import { readFileSync, statSync } from "fs";
@@ -2,7 +2,7 @@ import {
2
2
  isApprovalMode,
3
3
  isRecord,
4
4
  isTimeoutAction
5
- } from "./chunk-FXECTHAG.js";
5
+ } from "./chunk-7NCLUA65.js";
6
6
 
7
7
  // src/cli/settings-response.ts
8
8
  var isFiniteNumber = (value) => typeof value === "number" && Number.isFinite(value);
@@ -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-DFKEJARZ.js";
12
+ } from "./chunk-BUQU3OPX.js";
13
13
 
14
14
  // src/cli/login-ui.ts
15
15
  import { hostname } from "os";