pushary 1.9.276 → 1.9.277

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 (148) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/README.md +1 -0
  3. package/dist/{api-OLFIDMS7.js → api-JDJKIBJ2.js} +12 -12
  4. package/dist/bin/pushary-ask.d.ts +1 -0
  5. package/dist/bin/pushary-ask.js +303 -0
  6. package/dist/bin/pushary-audit.js +3 -3
  7. package/dist/bin/pushary-bell-hook.js +31 -30
  8. package/dist/bin/pushary-bell.js +11 -11
  9. package/dist/bin/pushary-calls.js +14 -14
  10. package/dist/bin/pushary-claude.js +42 -40
  11. package/dist/bin/pushary-clean.js +47 -46
  12. package/dist/bin/pushary-codex-bridge.js +23 -23
  13. package/dist/bin/pushary-codex-hook.js +37 -35
  14. package/dist/bin/pushary-codex-session.js +8 -8
  15. package/dist/bin/pushary-codex.js +17 -16
  16. package/dist/bin/pushary-connect.js +37 -36
  17. package/dist/bin/pushary-cowork.js +5 -5
  18. package/dist/bin/pushary-daemon.js +69 -68
  19. package/dist/bin/pushary-disconnect.js +33 -32
  20. package/dist/bin/pushary-display-hook.js +79 -48
  21. package/dist/bin/pushary-doctor.js +76 -75
  22. package/dist/bin/pushary-elicitation-hook.js +30 -28
  23. package/dist/bin/pushary-gemini-bridge.js +18 -18
  24. package/dist/bin/pushary-gemini-hook.js +34 -32
  25. package/dist/bin/pushary-hook.js +38 -37
  26. package/dist/bin/pushary-login.js +45 -44
  27. package/dist/bin/pushary-logout.js +33 -32
  28. package/dist/bin/pushary-mcp.js +14 -14
  29. package/dist/bin/pushary-mode.js +15 -15
  30. package/dist/bin/pushary-notification-hook.js +28 -27
  31. package/dist/bin/pushary-opencode-bridge.js +25 -25
  32. package/dist/bin/pushary-opencode-hook.js +48 -46
  33. package/dist/bin/pushary-permission-denied-hook.js +35 -34
  34. package/dist/bin/pushary-permission-hook.js +36 -35
  35. package/dist/bin/pushary-post-hook.js +29 -28
  36. package/dist/bin/pushary-prompt-hook.js +28 -27
  37. package/dist/bin/pushary-session-end-hook.js +31 -30
  38. package/dist/bin/pushary-session-start-hook.js +41 -40
  39. package/dist/bin/pushary-sessions.js +12 -12
  40. package/dist/bin/pushary-setup.js +94 -93
  41. package/dist/bin/pushary-stats.js +7 -7
  42. package/dist/bin/pushary-status.js +38 -37
  43. package/dist/bin/pushary-stop-hook.js +28 -27
  44. package/dist/bin/pushary-stopfailure-hook.js +28 -27
  45. package/dist/bin/pushary-suggestions.js +15 -15
  46. package/dist/bin/pushary-transcript-register.js +16 -16
  47. package/dist/bin/pushary-transcripts.js +27 -27
  48. package/dist/bin/pushary-upgrade.js +65 -64
  49. package/dist/bin/pushary-wait.js +16 -16
  50. package/dist/bin/pushary.js +8 -7
  51. package/dist/{chunk-LP7DPO3E.js → chunk-22OYSTAN.js} +1 -1
  52. package/dist/{chunk-YN4YRZNF.js → chunk-2BW7GNNB.js} +2 -2
  53. package/dist/{chunk-ZW2BWWIP.js → chunk-2XAZO2Q3.js} +2 -2
  54. package/dist/{chunk-GXXZLEHJ.js → chunk-33IU43ZR.js} +7 -7
  55. package/dist/{chunk-FDJ74WHC.js → chunk-3CNXRECH.js} +4 -4
  56. package/dist/{chunk-D6BE2O76.js → chunk-3HKTW7AH.js} +2 -2
  57. package/dist/{chunk-RLDWWF4R.js → chunk-4IX2PONM.js} +1 -1
  58. package/dist/{chunk-ESHKK3NZ.js → chunk-5VAI3RDO.js} +4 -4
  59. package/dist/{chunk-N6YV7ZYB.js → chunk-5XVPGNE5.js} +6 -6
  60. package/dist/{chunk-DTJ654CO.js → chunk-5ZX57DNR.js} +2 -2
  61. package/dist/{chunk-6IEGHLAQ.js → chunk-63J4TOMV.js} +4 -4
  62. package/dist/{chunk-M4G55A3C.js → chunk-6RSP2BY4.js} +3 -3
  63. package/dist/{chunk-FTWDXWIC.js → chunk-6X7GXEBI.js} +15 -4
  64. package/dist/{chunk-4TZE23IY.js → chunk-72CPOGDP.js} +3 -3
  65. package/dist/{chunk-PJ2MCXPU.js → chunk-76XC2ICT.js} +18 -19
  66. package/dist/{chunk-YWSNBQFN.js → chunk-7AMWTZTL.js} +5 -5
  67. package/dist/{chunk-ACOOCU2C.js → chunk-7RLMFVUZ.js} +2 -2
  68. package/dist/{chunk-3XNTOZSO.js → chunk-A7PIULSY.js} +1 -1
  69. package/dist/{chunk-ZCSQCI3V.js → chunk-AECDNNRM.js} +1 -1
  70. package/dist/{chunk-6ILWJR5J.js → chunk-B5565Y33.js} +1 -1
  71. package/dist/{chunk-5MD7VE6J.js → chunk-B6RL3XXW.js} +3 -3
  72. package/dist/{chunk-GXJ5WI6B.js → chunk-BAYA2H6O.js} +7 -7
  73. package/dist/{chunk-UMW3HCWQ.js → chunk-C3E5KDBH.js} +10 -10
  74. package/dist/{chunk-X6HX2UHZ.js → chunk-CB2NT2J5.js} +1 -1
  75. package/dist/{chunk-OAZ7WMAU.js → chunk-CUXMOQDW.js} +3 -3
  76. package/dist/{chunk-5PB5PLYU.js → chunk-DFNJBEFV.js} +10 -10
  77. package/dist/{chunk-DFEGXN5S.js → chunk-DIQKY76N.js} +1 -1
  78. package/dist/{chunk-EWT4JVQ6.js → chunk-DISRB3NE.js} +1 -1
  79. package/dist/{chunk-CREEYGND.js → chunk-DMMIXJKD.js} +12 -12
  80. package/dist/{chunk-S3H2J5PJ.js → chunk-DWM7BYVK.js} +1 -1
  81. package/dist/{chunk-KS2H54MK.js → chunk-EEC52E5K.js} +1 -1
  82. package/dist/{chunk-HF47DPMN.js → chunk-ETZUDUCB.js} +1 -1
  83. package/dist/{chunk-SCWBZEDN.js → chunk-FGIJ46DR.js} +5 -5
  84. package/dist/{chunk-DXY77UVL.js → chunk-FSJVDHQ5.js} +14 -14
  85. package/dist/{chunk-QU5K42CD.js → chunk-GJQJHWQ4.js} +2 -2
  86. package/dist/{chunk-V54U7EAG.js → chunk-GP7Q2DCX.js} +4 -4
  87. package/dist/{chunk-ZMVHJCM2.js → chunk-GQDJPX3J.js} +1 -1
  88. package/dist/{chunk-YIWLOD3H.js → chunk-GUL5YSME.js} +5 -5
  89. package/dist/{chunk-M23WDLIC.js → chunk-HMUSFFEH.js} +3 -3
  90. package/dist/{chunk-4YHQYYTJ.js → chunk-HQSTVSDO.js} +169 -74
  91. package/dist/{chunk-TGS5T7AD.js → chunk-I4A6CL5Q.js} +6 -6
  92. package/dist/{chunk-YABFR43V.js → chunk-I5I5PXQL.js} +10 -10
  93. package/dist/{chunk-ZMMCHRJF.js → chunk-ISPN73NA.js} +5 -5
  94. package/dist/{chunk-HYHA7TQV.js → chunk-J2N3BNNE.js} +1 -1
  95. package/dist/{chunk-5YKEUZCZ.js → chunk-JHJPAG6R.js} +6 -6
  96. package/dist/{chunk-ZM3LMIDN.js → chunk-JNPWASVJ.js} +11 -1
  97. package/dist/{chunk-FI4ZDYXT.js → chunk-K5JEB3I4.js} +8 -8
  98. package/dist/{chunk-52T655NA.js → chunk-K5LHDTYS.js} +1 -1
  99. package/dist/{chunk-6ZYEZF6R.js → chunk-KKEX5FAB.js} +8 -8
  100. package/dist/{chunk-YNDJIBLB.js → chunk-KO2QJNTA.js} +1 -1
  101. package/dist/{chunk-JOWPUJPT.js → chunk-LO2LCXNB.js} +5 -5
  102. package/dist/{chunk-46NACONX.js → chunk-MGV6KJJF.js} +1 -1
  103. package/dist/{chunk-EA7G2WD3.js → chunk-MOMA4DD4.js} +1 -1
  104. package/dist/{chunk-2JZM72KC.js → chunk-MZJIL5CA.js} +5 -5
  105. package/dist/{chunk-OK5XINZK.js → chunk-NDDIA2YJ.js} +7 -7
  106. package/dist/{chunk-6BSQQQPF.js → chunk-NLJUHVZJ.js} +3 -3
  107. package/dist/{chunk-5CIJT5EW.js → chunk-OIRKU5GW.js} +4 -4
  108. package/dist/{chunk-SBULIKB5.js → chunk-OMHFKENS.js} +6 -6
  109. package/dist/{chunk-WXYSJULN.js → chunk-QHSJVHNC.js} +4 -4
  110. package/dist/{chunk-E6DLZK6F.js → chunk-QNMJJMZF.js} +4 -4
  111. package/dist/{chunk-CK2XAWUK.js → chunk-QUU74XFH.js} +3 -3
  112. package/dist/{chunk-QMFJHEHJ.js → chunk-R5FAM3I6.js} +1 -1
  113. package/dist/{chunk-TRNII2FW.js → chunk-R7VMXE6A.js} +1 -1
  114. package/dist/{chunk-WGN5Z3WG.js → chunk-SMI5X7BO.js} +1 -1
  115. package/dist/{chunk-U43TDW57.js → chunk-TSKDJNC5.js} +1 -1
  116. package/dist/{chunk-UIVL7CLE.js → chunk-UCX7X333.js} +1 -1
  117. package/dist/{chunk-HYLZSXGI.js → chunk-UXB54PYF.js} +29 -22
  118. package/dist/{chunk-RVEJ2HQO.js → chunk-WCTHF35Z.js} +3 -3
  119. package/dist/{chunk-KMCKHX4S.js → chunk-WFDFDUHU.js} +2 -2
  120. package/dist/{chunk-CABA3Y5F.js → chunk-WG4Y6DJD.js} +24 -11
  121. package/dist/{chunk-DHLVNUDU.js → chunk-WJALXH6I.js} +1 -1
  122. package/dist/{chunk-NDE2U7MH.js → chunk-WTPNWUEQ.js} +3 -3
  123. package/dist/{chunk-EL3X6A4S.js → chunk-WXXAFKZE.js} +2 -2
  124. package/dist/{chunk-BZCSYGXX.js → chunk-WY6VFXYH.js} +22 -20
  125. package/dist/{chunk-KFSWRHKU.js → chunk-XHEF2MQZ.js} +2 -2
  126. package/dist/{chunk-37U5RQKQ.js → chunk-XOALU2TA.js} +4 -4
  127. package/dist/{chunk-SNPJ6XXM.js → chunk-XUIQOGUN.js} +3 -3
  128. package/dist/{chunk-YXDPRTVM.js → chunk-YAV677T2.js} +4 -4
  129. package/dist/{chunk-DQ4JAE76.js → chunk-YBTS5ZR3.js} +6 -2
  130. package/dist/{chunk-7QBTDXGQ.js → chunk-YPTRRRD3.js} +1 -1
  131. package/dist/{chunk-HGNBFVY5.js → chunk-YSDITWDH.js} +4 -4
  132. package/dist/chunk-Z25VDYAL.js +6 -0
  133. package/dist/{chunk-I5L4QXWJ.js → chunk-Z5H2XKMF.js} +2 -2
  134. package/dist/{codex-app-cards-switch-5LUDTLSJ.js → codex-app-cards-switch-YN66WO7X.js} +12 -12
  135. package/dist/{codex-card-routing-3KMBEQOC.js → codex-card-routing-QXVDJGWF.js} +2 -2
  136. package/dist/{codex-desktop-launch-AJWF2S4W.js → codex-desktop-launch-XFRDRYXQ.js} +3 -3
  137. package/dist/{codex-session-launch-VSXLEJVF.js → codex-session-launch-W3SUQJMA.js} +22 -22
  138. package/dist/{config-YXLVQ5T7.js → config-EGAARNM4.js} +9 -3
  139. package/dist/{global-upgrade-KHCU2JYT.js → global-upgrade-KKCSLSUA.js} +9 -9
  140. package/dist/{identity-CGMWCMVP.js → identity-P35TDUOJ.js} +4 -4
  141. package/dist/{live-capabilities-NLUOLMSU.js → live-capabilities-6NS5JAL4.js} +4 -4
  142. package/dist/{paths-KDPFVDE5.js → paths-FCBX57O2.js} +3 -3
  143. package/dist/{reapply-7ALGSM56.js → reapply-KASKVOYN.js} +36 -35
  144. package/dist/src/index.d.ts +14 -3
  145. package/dist/src/index.js +34 -33
  146. package/dist/{upgrade-lock-CRYW2DXA.js → upgrade-lock-HOMFI7KP.js} +4 -4
  147. package/dist/{usage-Q3DQZVW2.js → usage-MAE6ZECN.js} +3 -3
  148. package/package.json +2 -1
@@ -9,31 +9,31 @@ import {
9
9
  installedCodexApp,
10
10
  readCodexAppRuntime,
11
11
  shellQuoted
12
- } from "./chunk-HGNBFVY5.js";
12
+ } from "./chunk-YSDITWDH.js";
13
+ import {
14
+ writeHuman
15
+ } from "./chunk-QCGNGEGE.js";
13
16
  import {
14
17
  CODEX_APP_LAUNCH_AT_LOGIN_VERB,
15
18
  CODEX_APP_LAUNCH_VARIABLE,
16
19
  codexEngineInside
17
20
  } from "./chunk-U4P4NDVB.js";
18
- import {
19
- writeHuman
20
- } from "./chunk-QCGNGEGE.js";
21
21
  import {
22
22
  parseConfigDocument
23
- } from "./chunk-ZCSQCI3V.js";
23
+ } from "./chunk-AECDNNRM.js";
24
24
  import {
25
25
  xml
26
- } from "./chunk-5YKEUZCZ.js";
26
+ } from "./chunk-JHJPAG6R.js";
27
27
  import {
28
28
  codexHomeFrom
29
- } from "./chunk-4YHQYYTJ.js";
29
+ } from "./chunk-HQSTVSDO.js";
30
30
  import {
31
31
  readRegularTextFile,
32
32
  writeFileAtomic
33
33
  } from "./chunk-PM2NRK6Y.js";
34
34
  import {
35
35
  isRecord
36
- } from "./chunk-DQ4JAE76.js";
36
+ } from "./chunk-YBTS5ZR3.js";
37
37
 
38
38
  // src/codex-app-cards-switch.ts
39
39
  import { execFileSync as execFileSync2 } from "child_process";
@@ -2,7 +2,7 @@ import {
2
2
  isApprovalMode,
3
3
  isRecord,
4
4
  isTimeoutAction
5
- } from "./chunk-DQ4JAE76.js";
5
+ } from "./chunk-YBTS5ZR3.js";
6
6
 
7
7
  // src/cli/settings-response.ts
8
8
  var isFiniteNumber = (value) => typeof value === "number" && Number.isFinite(value);
@@ -18,18 +18,18 @@ import {
18
18
  settingSnapshot,
19
19
  writeHermesSetting,
20
20
  writeSetupReceipt
21
- } from "./chunk-ESHKK3NZ.js";
21
+ } from "./chunk-5VAI3RDO.js";
22
22
  import {
23
23
  OPENCLAW_MIN_VERSION,
24
24
  OPENCLAW_PLUGIN_ID,
25
25
  OPENCLAW_PLUGIN_PACKAGE
26
- } from "./chunk-6BSQQQPF.js";
26
+ } from "./chunk-NLJUHVZJ.js";
27
27
  import {
28
28
  retryAgentCommand
29
- } from "./chunk-NDE2U7MH.js";
29
+ } from "./chunk-WTPNWUEQ.js";
30
30
  import {
31
31
  configFilePath
32
- } from "./chunk-FTWDXWIC.js";
32
+ } from "./chunk-6X7GXEBI.js";
33
33
  import {
34
34
  readJsonSafe,
35
35
  writeJsonAtomic
@@ -37,7 +37,7 @@ import {
37
37
  import {
38
38
  readSetupOutcomeProperties,
39
39
  redactSecretsFromContent
40
- } from "./chunk-DQ4JAE76.js";
40
+ } from "./chunk-YBTS5ZR3.js";
41
41
 
42
42
  // src/hermes/shell-gate.ts
43
43
  var readHermesShellGate = async (launcher, pluginVersion = null) => {
@@ -12,7 +12,7 @@ import {
12
12
  isSetupConnectMode,
13
13
  isValidApiKey,
14
14
  normalizeAgentId
15
- } from "./chunk-DQ4JAE76.js";
15
+ } from "./chunk-YBTS5ZR3.js";
16
16
 
17
17
  // src/setup/options.ts
18
18
  var AGENT_CHOICES = SETUP_AGENT_CHOICES;
@@ -6,7 +6,7 @@ import {
6
6
  } from "./chunk-6ICPEJY5.js";
7
7
  import {
8
8
  isRecord
9
- } from "./chunk-DQ4JAE76.js";
9
+ } from "./chunk-YBTS5ZR3.js";
10
10
 
11
11
  // src/setup/agent-probe.ts
12
12
  import { execSync } from "child_process";
@@ -4,13 +4,13 @@ import {
4
4
  configFailureKind,
5
5
  retryAgentCommand,
6
6
  writeSetupConfigFile
7
- } from "./chunk-NDE2U7MH.js";
7
+ } from "./chunk-WTPNWUEQ.js";
8
8
  import {
9
9
  MCP_BRIDGE_BINARY
10
- } from "./chunk-5CIJT5EW.js";
10
+ } from "./chunk-OIRKU5GW.js";
11
11
  import {
12
12
  KEY_FILE_MODE
13
- } from "./chunk-DTJ654CO.js";
13
+ } from "./chunk-5ZX57DNR.js";
14
14
  import {
15
15
  CLINE_SERVER_NAME_TAKEN,
16
16
  CLINE_SETTINGS_REFUSALS,
@@ -32,10 +32,10 @@ import {
32
32
  withClinePusharyServer,
33
33
  withRefreshedClineKey,
34
34
  withoutClinePusharyServer
35
- } from "./chunk-4YHQYYTJ.js";
35
+ } from "./chunk-HQSTVSDO.js";
36
36
  import {
37
37
  resolveGlobalBinary
38
- } from "./chunk-E6DLZK6F.js";
38
+ } from "./chunk-QNMJJMZF.js";
39
39
  import {
40
40
  readJsonSafe,
41
41
  writeFileAtomic,
@@ -3,7 +3,7 @@ import {
3
3
  openCodePluginArgv,
4
4
  openCodePluginModule,
5
5
  renderOpenCodePlugin
6
- } from "./chunk-KS2H54MK.js";
6
+ } from "./chunk-EEC52E5K.js";
7
7
  import {
8
8
  OPENCODE_FAILED_EVENT,
9
9
  OPENCODE_IDLE_EVENT,
@@ -12,17 +12,17 @@ import {
12
12
  OPENCODE_PLUGIN_SIBLING,
13
13
  OPENCODE_PLUGIN_SIBLING_CONTENTS,
14
14
  OPENCODE_SUBAGENT_IDLE_EVENT
15
- } from "./chunk-RLDWWF4R.js";
15
+ } from "./chunk-4IX2PONM.js";
16
16
  import {
17
17
  compatibleConfigFile
18
- } from "./chunk-SBULIKB5.js";
18
+ } from "./chunk-OMHFKENS.js";
19
19
  import {
20
20
  hookOwnerOf,
21
21
  hookOwnerOfCommands
22
- } from "./chunk-37U5RQKQ.js";
22
+ } from "./chunk-XOALU2TA.js";
23
23
  import {
24
24
  AGENT_CHOICES
25
- } from "./chunk-46NACONX.js";
25
+ } from "./chunk-MGV6KJJF.js";
26
26
  import {
27
27
  OPENCODE_INSTRUCTIONS_LABEL,
28
28
  bridgeStub,
@@ -36,7 +36,7 @@ import {
36
36
  resolveBridgeStub,
37
37
  vscodePluginDir,
38
38
  windowsNodeLauncherFor
39
- } from "./chunk-4YHQYYTJ.js";
39
+ } from "./chunk-HQSTVSDO.js";
40
40
  import {
41
41
  readJsonSafe
42
42
  } from "./chunk-PM2NRK6Y.js";
@@ -46,7 +46,7 @@ import {
46
46
  OPENCODE_APPROVAL_EVENT,
47
47
  hookCompatibleProfile,
48
48
  isRecord
49
- } from "./chunk-DQ4JAE76.js";
49
+ } from "./chunk-YBTS5ZR3.js";
50
50
 
51
51
  // src/opencode-config.ts
52
52
  import { existsSync, mkdirSync, readdirSync, readFileSync, rmSync, writeFileSync } from "fs";
@@ -5,13 +5,13 @@ import {
5
5
  OPENCLAW_ENVIRONMENT_KEYS,
6
6
  openClawEnvironmentOf,
7
7
  openClawPathsFrom
8
- } from "./chunk-4YHQYYTJ.js";
8
+ } from "./chunk-HQSTVSDO.js";
9
9
  import {
10
10
  resolvePathBinary
11
- } from "./chunk-E6DLZK6F.js";
11
+ } from "./chunk-QNMJJMZF.js";
12
12
  import {
13
13
  isRecord
14
- } from "./chunk-DQ4JAE76.js";
14
+ } from "./chunk-YBTS5ZR3.js";
15
15
 
16
16
  // src/openclaw/wiring-state.ts
17
17
  var OPENCLAW_PLUGIN_ID = "pushary";
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  parseSseMessages
3
- } from "./chunk-CABA3Y5F.js";
3
+ } from "./chunk-WG4Y6DJD.js";
4
4
  import {
5
5
  fetchAsCredential
6
- } from "./chunk-DHLVNUDU.js";
6
+ } from "./chunk-WJALXH6I.js";
7
7
  import {
8
8
  malformedApiKeyMessage
9
- } from "./chunk-FTWDXWIC.js";
9
+ } from "./chunk-6X7GXEBI.js";
10
10
  import {
11
11
  NPX_LATEST_COMMAND
12
- } from "./chunk-ZM3LMIDN.js";
12
+ } from "./chunk-JNPWASVJ.js";
13
13
 
14
14
  // src/mcp-stdio-bridge.ts
15
15
  var MCP_BRIDGE_BINARY = "pushary-mcp";
@@ -1,16 +1,16 @@
1
1
  import {
2
2
  parseConfigDocument
3
- } from "./chunk-ZCSQCI3V.js";
3
+ } from "./chunk-AECDNNRM.js";
4
4
  import {
5
5
  addGeminiMcpServer,
6
6
  removeGeminiMcpServer
7
- } from "./chunk-37U5RQKQ.js";
7
+ } from "./chunk-XOALU2TA.js";
8
8
  import {
9
9
  CLAUDE_CODE_AGENT
10
- } from "./chunk-PJ2MCXPU.js";
10
+ } from "./chunk-76XC2ICT.js";
11
11
  import {
12
12
  compatibleToolLookup
13
- } from "./chunk-DFEGXN5S.js";
13
+ } from "./chunk-DIQKY76N.js";
14
14
  import {
15
15
  CLAUDE_HOOK_EVENTS,
16
16
  PUSHARY_MCP_URL,
@@ -22,7 +22,7 @@ import {
22
22
  isPusharyHook,
23
23
  registerHookEntry,
24
24
  removeClaudeMcpServers
25
- } from "./chunk-4YHQYYTJ.js";
25
+ } from "./chunk-HQSTVSDO.js";
26
26
  import {
27
27
  AGENT_ENFORCEMENT,
28
28
  HOOK_COMPATIBLE_PROFILES,
@@ -36,7 +36,7 @@ import {
36
36
  pusharyMissingReason,
37
37
  refusalOutput,
38
38
  withHookHoldBudget
39
- } from "./chunk-DQ4JAE76.js";
39
+ } from "./chunk-YBTS5ZR3.js";
40
40
 
41
41
  // src/compatible-config.ts
42
42
  import { homedir } from "os";
@@ -1,19 +1,19 @@
1
1
  import {
2
2
  macAppBridgeAvailable
3
- } from "./chunk-OK5XINZK.js";
3
+ } from "./chunk-NDDIA2YJ.js";
4
4
  import {
5
5
  keyPrefix
6
- } from "./chunk-DTJ654CO.js";
6
+ } from "./chunk-5ZX57DNR.js";
7
7
  import {
8
8
  bridgeAgentKey
9
- } from "./chunk-4YHQYYTJ.js";
9
+ } from "./chunk-HQSTVSDO.js";
10
10
  import {
11
11
  readJsonSafe
12
12
  } from "./chunk-PM2NRK6Y.js";
13
13
  import {
14
14
  isRecord,
15
15
  isValidApiKey
16
- } from "./chunk-DQ4JAE76.js";
16
+ } from "./chunk-YBTS5ZR3.js";
17
17
 
18
18
  // src/shared-mcp-key.ts
19
19
  var asRecord = (value) => value !== null && typeof value === "object" && !Array.isArray(value) ? value : void 0;
@@ -19,7 +19,7 @@ import {
19
19
  } from "./chunk-CXQWDQCJ.js";
20
20
  import {
21
21
  redactSecretsFromContent
22
- } from "./chunk-DQ4JAE76.js";
22
+ } from "./chunk-YBTS5ZR3.js";
23
23
 
24
24
  // src/shell-quote.ts
25
25
  var shellDoubleQuoted = (text) => `"${text.replace(/(["\\$`])/g, "\\$1")}"`;
@@ -610,9 +610,9 @@ var installGlobally = (options) => {
610
610
  }
611
611
  const started = (async () => {
612
612
  if (!npmIsOnPath()) throw new NpmMissingError();
613
- const { withUpgradeLock } = await import("./global-upgrade-KHCU2JYT.js");
614
- const { canonicalLockPath, installWithUpgradeLock, leftAnUnfinishedInstallHere, ownsUpgradeLock } = await import("./upgrade-lock-CRYW2DXA.js");
615
- const { autoUpdateLock } = await import("./paths-KDPFVDE5.js");
613
+ const { withUpgradeLock } = await import("./global-upgrade-KKCSLSUA.js");
614
+ const { canonicalLockPath, installWithUpgradeLock, leftAnUnfinishedInstallHere, ownsUpgradeLock } = await import("./upgrade-lock-HOMFI7KP.js");
615
+ const { autoUpdateLock } = await import("./paths-FCBX57O2.js");
616
616
  const lockPath = options.lockPath ?? autoUpdateLock();
617
617
  const lockFile = canonicalLockPath(lockPath);
618
618
  const unfinishedHere = failuresThisProcessLeftUnfinished.get(lockFile);
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  pusharyFetch
3
- } from "./chunk-5MD7VE6J.js";
3
+ } from "./chunk-B6RL3XXW.js";
4
4
  import {
5
5
  getBaseUrl
6
- } from "./chunk-FTWDXWIC.js";
6
+ } from "./chunk-6X7GXEBI.js";
7
7
  import {
8
8
  NetworkError
9
9
  } from "./chunk-CINBAX5G.js";
@@ -13,7 +13,7 @@ import {
13
13
  import {
14
14
  isValidApiKey,
15
15
  normalizeKeyScope
16
- } from "./chunk-DQ4JAE76.js";
16
+ } from "./chunk-YBTS5ZR3.js";
17
17
 
18
18
  // src/session.ts
19
19
  var samePusharyAccount = (left, right) => left.kind === "ok" && right.kind === "ok" && left.identity.workspaceId !== "" && left.identity.workspaceId === right.identity.workspaceId && left.identity.siteId === right.identity.siteId;
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  canonicalGateInputs,
3
3
  patchDeletesFiles
4
- } from "./chunk-DFEGXN5S.js";
4
+ } from "./chunk-DIQKY76N.js";
5
5
 
6
6
  // src/gate-call-reading.ts
7
7
  var gateCallReadingOf = (profile, raw) => {
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  computerOsOfPlatform,
3
3
  isComputerAgent
4
- } from "./chunk-DQ4JAE76.js";
4
+ } from "./chunk-YBTS5ZR3.js";
5
5
 
6
6
  // src/setup/phone-check.ts
7
7
  var NO_AGENT_CONNECTED_LINE = "Skipping the phone step: no agent was connected, so nothing could ask you anything on your phone yet.";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  pusharyDir
3
- } from "./chunk-4YHQYYTJ.js";
3
+ } from "./chunk-HQSTVSDO.js";
4
4
  import {
5
5
  writeFileAtomic
6
6
  } from "./chunk-PM2NRK6Y.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  isFinalCommandAckRefusal
3
- } from "./chunk-DQ4JAE76.js";
3
+ } from "./chunk-YBTS5ZR3.js";
4
4
 
5
5
  // src/command-ack-outcome.ts
6
6
  var SETTLED_ACK = { outcome: "settled" };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  guardBinary
3
- } from "./chunk-4YHQYYTJ.js";
3
+ } from "./chunk-HQSTVSDO.js";
4
4
 
5
5
  // src/bell/install.ts
6
6
  import { join } from "path";
@@ -8,24 +8,26 @@ import {
8
8
  SubscriptionRequiredError,
9
9
  callMcpTool,
10
10
  isRetryable
11
- } from "./chunk-CABA3Y5F.js";
11
+ } from "./chunk-WG4Y6DJD.js";
12
12
  import {
13
13
  fetchAsCredential
14
- } from "./chunk-DHLVNUDU.js";
14
+ } from "./chunk-WJALXH6I.js";
15
15
  import {
16
16
  installNetworkDefaults,
17
17
  isNetworkFailure
18
- } from "./chunk-5MD7VE6J.js";
18
+ } from "./chunk-B6RL3XXW.js";
19
19
  import {
20
20
  keyPrefix
21
- } from "./chunk-DTJ654CO.js";
21
+ } from "./chunk-5ZX57DNR.js";
22
22
  import {
23
+ MacAppRefusedError,
24
+ MacAppUnreachableError,
23
25
  clientReportClaims
24
- } from "./chunk-4YHQYYTJ.js";
26
+ } from "./chunk-HQSTVSDO.js";
25
27
  import {
26
28
  getApiKey,
27
29
  getBaseUrl
28
- } from "./chunk-FTWDXWIC.js";
30
+ } from "./chunk-6X7GXEBI.js";
29
31
  import {
30
32
  getPackageVersion
31
33
  } from "./chunk-CXQWDQCJ.js";
@@ -55,7 +57,7 @@ import {
55
57
  responseRejectsCredential,
56
58
  truncateLine,
57
59
  waitEndAnswered
58
- } from "./chunk-DQ4JAE76.js";
60
+ } from "./chunk-YBTS5ZR3.js";
59
61
 
60
62
  // src/api.ts
61
63
  import { randomUUID } from "crypto";
@@ -101,6 +103,8 @@ var isThePersonsStop = (reply) => reply.status === PERSON_STOPPED_STATUS;
101
103
  var isPending = (reply) => reply.status === void 0 || reply.status === PENDING_STATUS;
102
104
  var isUnavailable = (reply) => reply.status === UNAVAILABLE_STATUS;
103
105
  var askingProcessWaits = (asker, currentParent, isGone) => currentParent === asker && !isGone(asker);
106
+ var INIT_PROCESS = 1;
107
+ var askingProcessWaitsFrom = ({ asker, currentParent, waitedMs, isGone }) => asker <= INIT_PROCESS ? waitedMs < OPEN_QUESTION_LIVE_WINDOW_MS : askingProcessWaits(asker, currentParent, isGone);
104
108
  var waitWhileTheQuestionIsOpen = async (effects) => {
105
109
  const startedAt = effects.now();
106
110
  let failures = 0;
@@ -122,7 +126,7 @@ var waitWhileTheQuestionIsOpen = async (effects) => {
122
126
  continue;
123
127
  }
124
128
  failures = 0;
125
- if (!isPending(reply)) return { kind: "closed" };
129
+ if (!isPending(reply)) return { kind: "closed", reply };
126
130
  await effects.sleep(poll.pauseMs);
127
131
  }
128
132
  return { kind: "abandoned" };
@@ -322,14 +326,14 @@ var withinAskUserLimits = (params) => ({
322
326
  permissionMode: boundedPermissionMode(params.permissionMode)
323
327
  });
324
328
  var ASK_USER_TIMEOUT_MS = 15e3;
325
- var askUser = async (apiKey, params, timeoutMs = ASK_USER_TIMEOUT_MS, baseUrl, signal) => {
329
+ var askUser = async (signIn, params, timeoutMs = ASK_USER_TIMEOUT_MS, baseUrl, signal) => {
326
330
  const identified = params.toolUseId || params.requestId ? params : { ...params, requestId: randomUUID() };
327
- const result = await callMcpTool(apiKey, "ask_user", { ...withinAskUserLimits(identified), pausedAware: true, wait: false }, { maxRetries: 3, timeoutMs, baseUrl, signal });
331
+ const result = await callMcpTool(signIn, "ask_user", { ...withinAskUserLimits(identified), pausedAware: true, wait: false }, { maxRetries: 3, timeoutMs, baseUrl, signal });
328
332
  if (!isAskUserReply(result)) throw new Error("Invalid ask_user response");
329
333
  return result;
330
334
  };
331
- var waitForAnswer = async (apiKey, correlationId, timeoutMs = 3e4, signal, baseUrl) => {
332
- const result = await callMcpTool(apiKey, "wait_for_answer", {
335
+ var waitForAnswer = async (signIn, correlationId, timeoutMs = 3e4, signal, baseUrl) => {
336
+ const result = await callMcpTool(signIn, "wait_for_answer", {
333
337
  correlationId,
334
338
  timeoutMs
335
339
  }, { timeoutMs: timeoutMs + 1e4, signal, baseUrl });
@@ -360,7 +364,8 @@ var isDroppedConnection = (error) => {
360
364
  return error.message === DROPPED_RESPONSE_MESSAGE || code !== null && DROPPED_CONNECTION_CODES.has(code);
361
365
  };
362
366
  var isTransientWaitFailure = (error) => {
363
- if (error instanceof McpHttpError) return isPassingHttpStatus(error.status);
367
+ if (error instanceof McpHttpError || error instanceof MacAppRefusedError) return isPassingHttpStatus(error.status);
368
+ if (error instanceof MacAppUnreachableError) return true;
364
369
  if (error instanceof SubscriptionRequiredError || error instanceof McpToolError) return false;
365
370
  return isRetryable(error) || isDroppedConnection(error);
366
371
  };
@@ -453,17 +458,17 @@ var pollForAnswer = async (apiKey, correlationId, deadlineMs, pollInterval = 2e3
453
458
  return settleAtTheDeadline(apiKey, correlationId, atDeadline, withdraw, signal);
454
459
  };
455
460
  var CANCEL_QUESTION_TIMEOUT_MS = 4e3;
456
- var cancelQuestion = async (apiKey, correlationId, signal, baseUrl) => {
457
- return callMcpTool(apiKey, "cancel_question", { correlationId }, { signal, timeoutMs: CANCEL_QUESTION_TIMEOUT_MS, maxRetries: 1, baseUrl });
461
+ var cancelQuestion = async (signIn, correlationId, signal, baseUrl) => {
462
+ return callMcpTool(signIn, "cancel_question", { correlationId }, { signal, timeoutMs: CANCEL_QUESTION_TIMEOUT_MS, maxRetries: 1, baseUrl });
458
463
  };
459
464
  var cancelQuestionSettledAtComputer = async (apiKey, correlationId, signal) => callMcpTool(apiKey, "cancel_question", { correlationId, [CANCEL_QUESTION_REASON_FIELD]: QUESTION_WITHDRAWAL_REASON.settledAtComputer }, { signal, timeoutMs: CANCEL_QUESTION_TIMEOUT_MS, maxRetries: 1 });
460
465
  var WITHDRAW_READ_TIMEOUT_MS = 2e3;
461
- var withdrawQuestion = async (apiKey, correlationId, transport = { cancelQuestion, waitForAnswer }) => {
466
+ var withdrawQuestion = async (signIn, correlationId, transport = { cancelQuestion, waitForAnswer }) => {
462
467
  try {
463
- const cancelled = await transport.cancelQuestion(apiKey, correlationId, AbortSignal.timeout(CANCEL_QUESTION_TIMEOUT_MS));
468
+ const cancelled = await transport.cancelQuestion(signIn, correlationId, AbortSignal.timeout(CANCEL_QUESTION_TIMEOUT_MS));
464
469
  if (!cancelled || isDecisionStopped(cancelled)) return STOPPED;
465
470
  if (cancelled.cancelled === true) return { answered: false, status: "withdrawn" };
466
- const late = await transport.waitForAnswer(apiKey, correlationId, 1e3, AbortSignal.timeout(WITHDRAW_READ_TIMEOUT_MS));
471
+ const late = await transport.waitForAnswer(signIn, correlationId, 1e3, AbortSignal.timeout(WITHDRAW_READ_TIMEOUT_MS));
467
472
  if (late.answered || isDecisionStopped(late)) return late;
468
473
  return late.status === "expired" ? { answered: false, status: "withdrawn" } : STOPPED;
469
474
  } catch {
@@ -556,6 +561,12 @@ var claimBlockedAction = async (apiKey, request, timeoutMs) => {
556
561
  };
557
562
 
558
563
  export {
564
+ isPolicyConfig,
565
+ isWaitForAnswerResponse,
566
+ isThePersonsStop,
567
+ askingProcessWaits,
568
+ askingProcessWaitsFrom,
569
+ waitWhileTheQuestionIsOpen,
559
570
  testTrafficHeaders,
560
571
  postKeylessBeacon,
561
572
  telemetryOptedOut,
@@ -564,10 +575,6 @@ export {
564
575
  exitAfterClientReports,
565
576
  clientErrorKindOf,
566
577
  writeDegraded,
567
- isPolicyConfig,
568
- isWaitForAnswerResponse,
569
- isThePersonsStop,
570
- askingProcessWaits,
571
578
  isDecisionStopped,
572
579
  isStoredPastThePushCap,
573
580
  isQuestionLimitRefusal,
@@ -9,10 +9,10 @@ import {
9
9
  } from "./chunk-3EGEA4KH.js";
10
10
  import {
11
11
  testTrafficHeaders
12
- } from "./chunk-HYLZSXGI.js";
12
+ } from "./chunk-UXB54PYF.js";
13
13
  import {
14
14
  getBaseUrl
15
- } from "./chunk-FTWDXWIC.js";
15
+ } from "./chunk-6X7GXEBI.js";
16
16
  import {
17
17
  CLI_LOCAL_BIND_PATH,
18
18
  LOCAL_CONFIRM_HOST,
@@ -23,7 +23,7 @@ import {
23
23
  isLocalConfirmToken,
24
24
  isPhonePass,
25
25
  localTerminalEntryUrl
26
- } from "./chunk-DQ4JAE76.js";
26
+ } from "./chunk-YBTS5ZR3.js";
27
27
 
28
28
  // src/cli/login-ui.ts
29
29
  import { hostname } from "os";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  pusharyDir
3
- } from "./chunk-4YHQYYTJ.js";
3
+ } from "./chunk-HQSTVSDO.js";
4
4
  import {
5
5
  readRegularJsonFile,
6
6
  writeFileAtomic
@@ -13,7 +13,7 @@ import {
13
13
  serializeDeclinedAgents,
14
14
  withDeclinedAgent,
15
15
  withoutDeclinedAgent
16
- } from "./chunk-DQ4JAE76.js";
16
+ } from "./chunk-YBTS5ZR3.js";
17
17
 
18
18
  // src/declined-agents-file.ts
19
19
  import { join } from "path";
@@ -1,20 +1,25 @@
1
1
  import {
2
2
  fetchAsCredential
3
- } from "./chunk-DHLVNUDU.js";
3
+ } from "./chunk-WJALXH6I.js";
4
4
  import {
5
5
  keyCheckFromResponse
6
- } from "./chunk-CK2XAWUK.js";
6
+ } from "./chunk-QUU74XFH.js";
7
7
  import {
8
8
  installNetworkDefaults
9
- } from "./chunk-5MD7VE6J.js";
9
+ } from "./chunk-B6RL3XXW.js";
10
+ import {
11
+ MacAppUnreachableError,
12
+ macAppReplyError,
13
+ requestThroughMacApp
14
+ } from "./chunk-HQSTVSDO.js";
10
15
  import {
11
16
  getBaseUrl
12
- } from "./chunk-FTWDXWIC.js";
17
+ } from "./chunk-6X7GXEBI.js";
13
18
  import {
14
19
  isRecord,
15
20
  isToolErrorResult,
16
21
  toolFailureCodeOfResult
17
- } from "./chunk-DQ4JAE76.js";
22
+ } from "./chunk-YBTS5ZR3.js";
18
23
 
19
24
  // src/retry.ts
20
25
  var isRetryable = (err) => {
@@ -104,20 +109,28 @@ var parseMcpResponse = (body, contentType) => {
104
109
  }
105
110
  return JSON.parse(body);
106
111
  };
107
- var sendMcpRequest = async (apiKey, message, options = {}) => {
112
+ var sendThroughMacApp = async (signIn, message, { timeoutMs, signal }) => {
113
+ const reply = await requestThroughMacApp(signIn, message, { timeoutMs, signal });
114
+ const failure = macAppReplyError(reply);
115
+ if (failure) throw failure;
116
+ return { data: reply, sessionId: "", status: 200, statusText: "OK" };
117
+ };
118
+ var retryableRequest = (signal) => (error) => retryableUnlessTheCallerGaveUp(signal)(error) || signal?.aborted !== true && error instanceof MacAppUnreachableError;
119
+ var sendMcpRequest = async (signIn, message, options = {}) => {
108
120
  return withRetry(async () => {
109
121
  options.signal?.throwIfAborted();
122
+ if (typeof signIn !== "string") return sendThroughMacApp(signIn, message, options);
110
123
  const baseUrl = options.baseUrl ?? getBaseUrl();
111
124
  const fetchFn = options.fetchFn ?? fetch;
112
125
  const headers = {
113
126
  "Content-Type": "application/json",
114
127
  "Accept": "application/json, text/event-stream",
115
- "Authorization": `Bearer ${apiKey}`
128
+ "Authorization": `Bearer ${signIn}`
116
129
  };
117
130
  if (options.sessionId) {
118
131
  headers["Mcp-Session-Id"] = options.sessionId;
119
132
  }
120
- const response = await fetchAsCredential(apiKey, `${baseUrl}/api/mcp/mcp`, {
133
+ const response = await fetchAsCredential(signIn, `${baseUrl}/api/mcp/mcp`, {
121
134
  method: "POST",
122
135
  headers,
123
136
  body: JSON.stringify(message),
@@ -147,10 +160,10 @@ var sendMcpRequest = async (apiKey, message, options = {}) => {
147
160
  status: response.status,
148
161
  statusText: response.statusText
149
162
  };
150
- }, { maxAttempts: options.maxRetries ?? 1, shouldRetry: retryableUnlessTheCallerGaveUp(options.signal) });
163
+ }, { maxAttempts: options.maxRetries ?? 1, shouldRetry: retryableRequest(options.signal) });
151
164
  };
152
- var callMcpTool = async (apiKey, toolName, params, options = {}) => {
153
- const { data } = await sendMcpRequest(apiKey, {
165
+ var callMcpTool = async (signIn, toolName, params, options = {}) => {
166
+ const { data } = await sendMcpRequest(signIn, {
154
167
  jsonrpc: "2.0",
155
168
  id: options.id ?? Date.now(),
156
169
  method: "tools/call",
@@ -5,7 +5,7 @@ import {
5
5
  MCP_CREDENTIAL_REJECTION_BODY,
6
6
  isRecord,
7
7
  responseRejectsCredential
8
- } from "./chunk-DQ4JAE76.js";
8
+ } from "./chunk-YBTS5ZR3.js";
9
9
 
10
10
  // src/credential-rejection.ts
11
11
  import { createHash, randomUUID } from "crypto";
@@ -4,16 +4,16 @@ import {
4
4
  NpmMissingError,
5
5
  NpmPermissionError,
6
6
  NpmReleaseAgeError
7
- } from "./chunk-E6DLZK6F.js";
7
+ } from "./chunk-QNMJJMZF.js";
8
8
  import {
9
9
  writeFileAtomic
10
10
  } from "./chunk-PM2NRK6Y.js";
11
11
  import {
12
12
  NPX_LATEST_COMMAND
13
- } from "./chunk-ZM3LMIDN.js";
13
+ } from "./chunk-JNPWASVJ.js";
14
14
  import {
15
15
  readSetupAgentFailures
16
- } from "./chunk-DQ4JAE76.js";
16
+ } from "./chunk-YBTS5ZR3.js";
17
17
 
18
18
  // src/setup/config-write.ts
19
19
  var AgentConfigWriteError = class extends Error {