@pushary/agent-hooks 1.9.158 → 1.9.162

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 (146) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/README.md +1 -0
  3. package/dist/{api-MRFKFDVV.js → api-7NPCSUGY.js} +17 -13
  4. package/dist/bin/pushary-audit.js +7 -7
  5. package/dist/bin/pushary-bell-hook.js +31 -31
  6. package/dist/bin/pushary-bell.js +16 -16
  7. package/dist/bin/pushary-calls.d.ts +1 -0
  8. package/dist/bin/pushary-calls.js +287 -0
  9. package/dist/bin/pushary-claude.js +37 -37
  10. package/dist/bin/pushary-clean.js +47 -45
  11. package/dist/bin/pushary-codex-bridge.js +27 -27
  12. package/dist/bin/pushary-codex-hook.js +197 -60
  13. package/dist/bin/pushary-codex-session.js +8 -8
  14. package/dist/bin/pushary-codex.js +19 -19
  15. package/dist/bin/pushary-connect.js +41 -40
  16. package/dist/bin/pushary-cowork.js +6 -6
  17. package/dist/bin/pushary-daemon.js +52 -51
  18. package/dist/bin/pushary-disconnect.js +39 -37
  19. package/dist/bin/pushary-display-hook.js +20 -1
  20. package/dist/bin/pushary-doctor.js +61 -59
  21. package/dist/bin/pushary-elicitation-hook.js +32 -32
  22. package/dist/bin/pushary-gemini-bridge.js +19 -19
  23. package/dist/bin/pushary-gemini-hook.js +36 -36
  24. package/dist/bin/pushary-hook.js +39 -38
  25. package/dist/bin/pushary-login.js +28 -28
  26. package/dist/bin/pushary-logout.js +34 -33
  27. package/dist/bin/pushary-mcp.js +15 -15
  28. package/dist/bin/pushary-mode.js +21 -21
  29. package/dist/bin/pushary-notification-hook.js +30 -30
  30. package/dist/bin/pushary-opencode-hook.js +399 -45
  31. package/dist/bin/pushary-permission-denied-hook.js +39 -38
  32. package/dist/bin/pushary-permission-hook.js +39 -38
  33. package/dist/bin/pushary-post-hook.js +31 -31
  34. package/dist/bin/pushary-prompt-hook.js +30 -30
  35. package/dist/bin/pushary-session-end-hook.js +30 -30
  36. package/dist/bin/pushary-session-start-hook.js +41 -40
  37. package/dist/bin/pushary-setup.js +73 -72
  38. package/dist/bin/pushary-stats.js +6 -6
  39. package/dist/bin/pushary-status.js +40 -39
  40. package/dist/bin/pushary-stop-hook.js +30 -30
  41. package/dist/bin/pushary-stopfailure-hook.js +30 -30
  42. package/dist/bin/pushary-suggestions.js +21 -21
  43. package/dist/bin/pushary-transcript-register.js +21 -21
  44. package/dist/bin/pushary-transcripts.js +32 -32
  45. package/dist/bin/pushary-upgrade.js +50 -49
  46. package/dist/bin/pushary-wait.js +23 -23
  47. package/dist/bin/pushary.js +10 -9
  48. package/dist/{chunk-RRVFN432.js → chunk-2H7SDIM7.js} +1 -1
  49. package/dist/{chunk-DHI3X5WK.js → chunk-44DRCGP2.js} +2 -2
  50. package/dist/chunk-4IBUBMMP.js +885 -0
  51. package/dist/{chunk-RL5JLDRE.js → chunk-4U3GYVIW.js} +2 -2
  52. package/dist/{chunk-NW63PGKF.js → chunk-53IBMDX2.js} +12 -7
  53. package/dist/{chunk-XNJ2HOEL.js → chunk-5TU26542.js} +3 -3
  54. package/dist/{chunk-UVWKMFLQ.js → chunk-5ZS73ZLX.js} +2 -2
  55. package/dist/{chunk-4SN4FHFZ.js → chunk-644AKJMN.js} +2 -2
  56. package/dist/{chunk-TZJR5ESF.js → chunk-6QQUGYH6.js} +7 -7
  57. package/dist/{chunk-4B5K6YIP.js → chunk-72SYV43F.js} +1 -1
  58. package/dist/{chunk-JKRQL2BL.js → chunk-A5DXHJVS.js} +5 -5
  59. package/dist/{chunk-K3OCYJPK.js → chunk-AP26EU5H.js} +3 -3
  60. package/dist/{chunk-MLPPQ556.js → chunk-AQKMKVAD.js} +13 -13
  61. package/dist/{chunk-N5SSADNW.js → chunk-BHT76IIB.js} +4 -4
  62. package/dist/{chunk-TMWXWBFP.js → chunk-BMOGTNLK.js} +6 -6
  63. package/dist/{chunk-SNQOEDZ2.js → chunk-CSDB5VTI.js} +1 -1
  64. package/dist/{chunk-YPFOTFEG.js → chunk-CWH4LBUW.js} +1 -1
  65. package/dist/{chunk-FTTSQAF4.js → chunk-DAMTDSAE.js} +1 -1
  66. package/dist/{chunk-MHYX5Q3F.js → chunk-DSWUG4NV.js} +1 -1
  67. package/dist/{chunk-K3I2NMEF.js → chunk-EFKJCBWA.js} +8 -8
  68. package/dist/{chunk-CIAJ55EQ.js → chunk-EKELMI3A.js} +42 -34
  69. package/dist/{chunk-EGBI4GRS.js → chunk-EPQTCF6A.js} +2 -2
  70. package/dist/{chunk-4WL2MINE.js → chunk-FIR2MGSB.js} +1 -1
  71. package/dist/{chunk-N2LWKWNY.js → chunk-G5IL6C6S.js} +3 -3
  72. package/dist/{chunk-IKC33YKC.js → chunk-G6M6YJK4.js} +5 -2
  73. package/dist/{chunk-SZMDRBNK.js → chunk-GJOHGES6.js} +2 -2
  74. package/dist/{chunk-TPLTB256.js → chunk-H7OY4AAT.js} +4 -4
  75. package/dist/{chunk-IVOELLUK.js → chunk-HAOYL5JP.js} +39 -8
  76. package/dist/{chunk-Q7WCDUFV.js → chunk-I35XT5YY.js} +6 -6
  77. package/dist/{chunk-AOP55JR2.js → chunk-I5ANEYUK.js} +14 -3
  78. package/dist/{chunk-TKBCLK4B.js → chunk-I5HCOOAA.js} +5 -5
  79. package/dist/{chunk-IIK3CZXJ.js → chunk-IUXXEM4Q.js} +8 -7
  80. package/dist/{chunk-FGVBFDNV.js → chunk-J6KDUXJF.js} +1 -1
  81. package/dist/{chunk-XHCX6DOY.js → chunk-JCTS7COD.js} +5 -5
  82. package/dist/{chunk-AGYD6XNI.js → chunk-L3LFCZ5D.js} +3 -3
  83. package/dist/{chunk-3QU4WXAH.js → chunk-L44II2WD.js} +5 -5
  84. package/dist/{chunk-PBPQRJ2T.js → chunk-L6BMVCQQ.js} +5 -5
  85. package/dist/{chunk-LVZBLKAU.js → chunk-L6NG6EZS.js} +1 -1
  86. package/dist/{chunk-EHRWEXRN.js → chunk-LGR7WXI5.js} +2 -2
  87. package/dist/{chunk-2MPT7YQK.js → chunk-LQDIOUVU.js} +5 -3
  88. package/dist/{chunk-XSIZKQ2C.js → chunk-LVRFOGQY.js} +11 -11
  89. package/dist/{chunk-HA2SRYYP.js → chunk-M2ZGNZRS.js} +94 -0
  90. package/dist/{chunk-ZYDE6QRW.js → chunk-M74WT5NA.js} +3 -3
  91. package/dist/chunk-NX3Y36VY.js +242 -0
  92. package/dist/{chunk-ANQBLZAE.js → chunk-OH2WAG47.js} +1 -1
  93. package/dist/{chunk-GTYVNVBZ.js → chunk-P4KAYIMX.js} +4 -4
  94. package/dist/{chunk-4I2SHNEU.js → chunk-PIIKLAFY.js} +3 -3
  95. package/dist/{chunk-J7HSUQK2.js → chunk-QKNHNDOY.js} +3 -3
  96. package/dist/{chunk-ALQWZCUT.js → chunk-RKURAOFK.js} +4 -4
  97. package/dist/{chunk-TYBVQ33X.js → chunk-RUAGEPUJ.js} +6 -6
  98. package/dist/{chunk-IOKJJ2SY.js → chunk-SFYX32FX.js} +4 -4
  99. package/dist/{chunk-OCWXE4PR.js → chunk-SKA3U7QI.js} +11 -9
  100. package/dist/{chunk-X254TRBU.js → chunk-SQ4RPZ6O.js} +4 -4
  101. package/dist/chunk-SRSXZINE.js +18 -0
  102. package/dist/{chunk-CAMFNSJS.js → chunk-SVVZFXDX.js} +6 -6
  103. package/dist/{chunk-QVVBU2JU.js → chunk-SVWCMYR7.js} +24 -9
  104. package/dist/{chunk-MTITL2IG.js → chunk-TMDCIVZ2.js} +5 -5
  105. package/dist/{chunk-B3BOAYRO.js → chunk-TUXX7TKR.js} +3 -3
  106. package/dist/{chunk-CSZWWPNS.js → chunk-U4LHE5DH.js} +1 -1
  107. package/dist/{chunk-3UNZ7HRN.js → chunk-UBY7NJCU.js} +20 -18
  108. package/dist/{chunk-ORQ7THNZ.js → chunk-UPCIKGWA.js} +1 -1
  109. package/dist/{chunk-WIIMW5YO.js → chunk-UQTQ6HPO.js} +2 -0
  110. package/dist/{chunk-V36P4KS4.js → chunk-V3TWYF32.js} +1 -1
  111. package/dist/{chunk-N3CFEMLS.js → chunk-VGLIGBAJ.js} +6 -6
  112. package/dist/{chunk-PND5IGC7.js → chunk-VUGF2OC7.js} +6 -6
  113. package/dist/{chunk-APCJZFTJ.js → chunk-W3FE7GTH.js} +1 -1
  114. package/dist/{chunk-GHHVXARK.js → chunk-WCWWO5QL.js} +1 -1
  115. package/dist/{chunk-TSR3FPGL.js → chunk-WIFMTEQI.js} +1 -1
  116. package/dist/{chunk-AMIUB22C.js → chunk-WWSR5LMP.js} +1 -1
  117. package/dist/{chunk-CCKY3JDB.js → chunk-X5QSIMXA.js} +4 -4
  118. package/dist/{chunk-T3PZQNIK.js → chunk-XIICM4TX.js} +2 -2
  119. package/dist/{chunk-C6PAIHLP.js → chunk-XOSSXRIR.js} +10 -10
  120. package/dist/{chunk-QP3TCKRZ.js → chunk-Y3ELKLNH.js} +18 -16
  121. package/dist/{chunk-H6CL3T2S.js → chunk-Y6ILCLKE.js} +1 -1
  122. package/dist/{chunk-UDLWNOXX.js → chunk-YEVRMDG7.js} +2 -2
  123. package/dist/{chunk-CS4Z44F5.js → chunk-YH6EHCKQ.js} +87 -8
  124. package/dist/{chunk-2L52USKM.js → chunk-YPG3RXWO.js} +3 -3
  125. package/dist/{chunk-AZZNHW3R.js → chunk-YUF3AYAP.js} +9 -6
  126. package/dist/{chunk-4NHQAMSK.js → chunk-Z23SHFIC.js} +4 -4
  127. package/dist/{chunk-6GGK3T24.js → chunk-ZC42UG7B.js} +5 -5
  128. package/dist/{chunk-UPI3JDHZ.js → chunk-ZT55PJSW.js} +3 -3
  129. package/dist/{chunk-PI3BOI3A.js → chunk-ZWNFP4HZ.js} +1 -1
  130. package/dist/{codex-app-cards-switch-CXXDGH7R.js → codex-app-cards-switch-PJEY3EU5.js} +14 -14
  131. package/dist/{codex-card-routing-WP4IHJFN.js → codex-card-routing-MNAMCRPO.js} +2 -2
  132. package/dist/{codex-desktop-launch-EN7ACHC6.js → codex-desktop-launch-AUNDRYOL.js} +1 -1
  133. package/dist/{codex-session-launch-7BV4VTJW.js → codex-session-launch-IZNSTT7N.js} +23 -23
  134. package/dist/{config-SZMMBOJV.js → config-LG2RJO37.js} +4 -4
  135. package/dist/{global-upgrade-I5J6BDHA.js → global-upgrade-QE5Q3BYW.js} +11 -11
  136. package/dist/{identity-GLJNTNHW.js → identity-3BT6LWOP.js} +5 -5
  137. package/dist/{live-capabilities-AYO7FOHS.js → live-capabilities-IKTQBLVH.js} +5 -5
  138. package/dist/{paths-NRBEF3T2.js → paths-VEUTZJOY.js} +4 -4
  139. package/dist/reapply-BC2AF55M.js +69 -0
  140. package/dist/src/index.js +39 -38
  141. package/dist/{upgrade-lock-H6SU7MJR.js → upgrade-lock-NUGEPR75.js} +5 -5
  142. package/dist/usage-TEB5CX2Y.js +11 -0
  143. package/package.json +2 -1
  144. package/dist/chunk-GLDSXDRV.js +0 -593
  145. package/dist/reapply-J2QUV7J2.js +0 -68
  146. package/dist/usage-MY3DIFBG.js +0 -11
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  claudeConfigDir
3
- } from "./chunk-B3BOAYRO.js";
3
+ } from "./chunk-TUXX7TKR.js";
4
4
  import {
5
5
  claudePermissionRulesFromSettings
6
- } from "./chunk-HA2SRYYP.js";
6
+ } from "./chunk-M2ZGNZRS.js";
7
7
 
8
8
  // src/claude-permission-rules.ts
9
9
  import { readFileSync, statSync } from "fs";
@@ -1,20 +1,23 @@
1
1
  import {
2
2
  notificationAnswerStep
3
- } from "./chunk-TMWXWBFP.js";
4
- import {
5
- canChangeApprovalSettings
6
- } from "./chunk-SZMDRBNK.js";
3
+ } from "./chunk-BMOGTNLK.js";
7
4
  import {
8
5
  matchMacAccountStep,
9
6
  retryAgentCommand
10
- } from "./chunk-2L52USKM.js";
7
+ } from "./chunk-YPG3RXWO.js";
8
+ import {
9
+ canChangeApprovalSettings
10
+ } from "./chunk-GJOHGES6.js";
11
11
  import {
12
12
  EXIT
13
13
  } from "./chunk-BG4HHB7E.js";
14
14
  import {
15
15
  NPX_LATEST_COMMAND,
16
16
  npmExecSetupCommandFor
17
- } from "./chunk-AOP55JR2.js";
17
+ } from "./chunk-I5ANEYUK.js";
18
+ import {
19
+ LATEST_DIST_TAG
20
+ } from "./chunk-UQTQ6HPO.js";
18
21
 
19
22
  // src/setup/closing.ts
20
23
  var ACTIVITY_URL = "pushary.com/dashboard/agent/activity";
@@ -79,6 +82,7 @@ var commandSurfaceFor = (keyScope) => [
79
82
  { command: "pushary status", summary: "what this machine is connected to" },
80
83
  ...approvalCommandSummaries(canChangeApprovalSettings(keyScope)),
81
84
  { command: "pushary stats", summary: "what your agents have been asking" },
85
+ { command: "pushary calls on", summary: "get a phone call when an approval waits" },
82
86
  { command: "pushary claude", summary: "run Claude Code with encrypted transcript support" },
83
87
  { command: "pushary doctor", summary: "check the install" }
84
88
  ];
@@ -267,10 +271,11 @@ var RETRY_AGENT_LABEL = "Retry just this agent:";
267
271
  var INSTALL_NODE_STEP = "Install the current Node.js LTS, which includes npm, then run setup again.";
268
272
  var NPM_PREFIX_STEP = "npm can't install globally here. Use nvm, or run: npm config set prefix ~/.npm-global, then run setup again.";
269
273
  var NPM_FILE_IN_USE_STEP = "Close other terminals or editors that use Node, then run setup again.";
274
+ var releaseAgeRecoveryStep = (platform, agents) => `Your npm only installs releases older than its min-release-age. Run the newest release it allows: ${npmExecSetupCommandFor(platform, agents, LATEST_DIST_TAG)}`;
270
275
  var nextStepFor = (failure, releaseAgeRefusedAgents, recovery) => {
271
276
  switch (failure.remedy) {
272
277
  case "use-npm-policy":
273
- return { kind: "use-npm-policy", instruction: `Wait until this exact release meets your npm min-release-age policy. Resolve any unfinished-install warning before retrying, then run: ${npmExecSetupCommandFor(recovery.platform, releaseAgeRefusedAgents, recovery.version)}` };
278
+ return { kind: "use-npm-policy", instruction: releaseAgeRecoveryStep(recovery.platform, releaseAgeRefusedAgents) };
274
279
  case "install-node":
275
280
  return { kind: "install-node", instruction: INSTALL_NODE_STEP };
276
281
  case "fix-npm-prefix":
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  SETUP_FLAGS
3
- } from "./chunk-FGVBFDNV.js";
3
+ } from "./chunk-J6KDUXJF.js";
4
4
  import {
5
5
  parseFlags
6
6
  } from "./chunk-YPY4YCIZ.js";
@@ -9,7 +9,7 @@ import {
9
9
  } from "./chunk-YU2EUD7O.js";
10
10
  import {
11
11
  NPX_LATEST_COMMAND
12
- } from "./chunk-AOP55JR2.js";
12
+ } from "./chunk-I5ANEYUK.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-HA2SRYYP.js";
20
+ } from "./chunk-M2ZGNZRS.js";
21
21
 
22
22
  // src/cli/cowork.ts
23
23
  import { readFileSync } from "fs";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  pusharyDir
3
- } from "./chunk-B3BOAYRO.js";
3
+ } from "./chunk-TUXX7TKR.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-HA2SRYYP.js";
16
+ } from "./chunk-M2ZGNZRS.js";
17
17
 
18
18
  // src/declined-agents-file.ts
19
19
  import { join } from "path";
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  callDecisionStore,
3
3
  identifyingToolInput
4
- } from "./chunk-QP3TCKRZ.js";
4
+ } from "./chunk-Y3ELKLNH.js";
5
5
  import {
6
6
  canonicalJson
7
- } from "./chunk-B3BOAYRO.js";
7
+ } from "./chunk-TUXX7TKR.js";
8
8
 
9
9
  // src/phone-approval.ts
10
10
  import { createHash } from "crypto";
@@ -1,20 +1,20 @@
1
+ import {
2
+ fetchAsCredential
3
+ } from "./chunk-WIFMTEQI.js";
1
4
  import {
2
5
  keyCheckFromResponse
3
- } from "./chunk-PBPQRJ2T.js";
6
+ } from "./chunk-L6BMVCQQ.js";
4
7
  import {
5
8
  installNetworkDefaults
6
- } from "./chunk-PND5IGC7.js";
7
- import {
8
- fetchAsCredential
9
- } from "./chunk-TSR3FPGL.js";
9
+ } from "./chunk-VUGF2OC7.js";
10
10
  import {
11
11
  getBaseUrl
12
- } from "./chunk-FTTSQAF4.js";
12
+ } from "./chunk-DAMTDSAE.js";
13
13
  import {
14
14
  isRecord,
15
15
  isToolErrorResult,
16
16
  toolFailureCodeOfResult
17
- } from "./chunk-HA2SRYYP.js";
17
+ } from "./chunk-M2ZGNZRS.js";
18
18
 
19
19
  // src/retry.ts
20
20
  var isRetryable = (err) => {
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  computerOsOfPlatform,
3
3
  isComputerAgent
4
- } from "./chunk-HA2SRYYP.js";
4
+ } from "./chunk-M2ZGNZRS.js";
5
5
 
6
6
  // src/setup/phone-check.ts
7
7
  var planPhoneCheck = (context) => {
@@ -18,18 +18,18 @@ import {
18
18
  settingSnapshot,
19
19
  writeHermesSetting,
20
20
  writeSetupReceipt
21
- } from "./chunk-Q7WCDUFV.js";
21
+ } from "./chunk-I35XT5YY.js";
22
22
  import {
23
23
  OPENCLAW_MIN_VERSION,
24
24
  OPENCLAW_PLUGIN_ID,
25
25
  OPENCLAW_PLUGIN_PACKAGE
26
- } from "./chunk-CCKY3JDB.js";
26
+ } from "./chunk-X5QSIMXA.js";
27
27
  import {
28
28
  retryAgentCommand
29
- } from "./chunk-2L52USKM.js";
29
+ } from "./chunk-YPG3RXWO.js";
30
30
  import {
31
31
  configFilePath
32
- } from "./chunk-FTTSQAF4.js";
32
+ } from "./chunk-DAMTDSAE.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-HA2SRYYP.js";
40
+ } from "./chunk-M2ZGNZRS.js";
41
41
 
42
42
  // src/hermes/shell-gate.ts
43
43
  var readHermesShellGate = async (launcher) => {
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  parseSseMessages
3
- } from "./chunk-TZJR5ESF.js";
3
+ } from "./chunk-6QQUGYH6.js";
4
4
  import {
5
5
  fetchAsCredential
6
- } from "./chunk-TSR3FPGL.js";
6
+ } from "./chunk-WIFMTEQI.js";
7
7
  import {
8
8
  NPX_LATEST_COMMAND
9
- } from "./chunk-AOP55JR2.js";
9
+ } from "./chunk-I5ANEYUK.js";
10
10
 
11
11
  // src/mcp-stdio-bridge.ts
12
12
  var MCP_BRIDGE_BINARY = "pushary-mcp";
@@ -4,37 +4,37 @@ import {
4
4
  postLiveSession,
5
5
  postLiveSessionUntilAccepted,
6
6
  startLiveSessionHeartbeat
7
- } from "./chunk-SNQOEDZ2.js";
7
+ } from "./chunk-CSDB5VTI.js";
8
8
  import {
9
9
  CommandReceipts,
10
10
  controllerCommandSchema
11
- } from "./chunk-PI3BOI3A.js";
11
+ } from "./chunk-ZWNFP4HZ.js";
12
12
  import {
13
13
  SESSION_IDLE_TIMEOUT_MS,
14
14
  describeIdleWindow,
15
15
  idleDeadlinePassed,
16
16
  startProcessOwnership
17
- } from "./chunk-EHRWEXRN.js";
17
+ } from "./chunk-LGR7WXI5.js";
18
+ import {
19
+ spawnClaude
20
+ } from "./chunk-Y6ILCLKE.js";
18
21
  import {
19
22
  repositoryScopeFor
20
- } from "./chunk-4WL2MINE.js";
23
+ } from "./chunk-FIR2MGSB.js";
21
24
  import {
22
25
  isAskUserResponse,
23
26
  isDecisionStopped,
24
27
  isWaitForAnswerResponse,
25
28
  withdrawQuestion,
26
29
  writeDegraded
27
- } from "./chunk-CS4Z44F5.js";
30
+ } from "./chunk-YH6EHCKQ.js";
31
+ import {
32
+ readCommandAck
33
+ } from "./chunk-OH2WAG47.js";
28
34
  import {
29
35
  callMcpTool,
30
36
  isRetryable
31
- } from "./chunk-TZJR5ESF.js";
32
- import {
33
- spawnClaude
34
- } from "./chunk-H6CL3T2S.js";
35
- import {
36
- readCommandAck
37
- } from "./chunk-ANQBLZAE.js";
37
+ } from "./chunk-6QQUGYH6.js";
38
38
  import {
39
39
  AGENT_QUESTION_DESCRIPTION_MAX,
40
40
  AGENT_QUESTION_HEADER_MAX,
@@ -55,7 +55,7 @@ import {
55
55
  parseCodexQuestions,
56
56
  planElicitationAsk,
57
57
  readElicitationFields
58
- } from "./chunk-HA2SRYYP.js";
58
+ } from "./chunk-M2ZGNZRS.js";
59
59
 
60
60
  // src/codex-question-owner.ts
61
61
  import { createHash } from "crypto";
@@ -1,17 +1,17 @@
1
1
  import {
2
2
  compatibleConfigFile,
3
3
  hasCompatibleHooks
4
- } from "./chunk-MTITL2IG.js";
4
+ } from "./chunk-TMDCIVZ2.js";
5
5
  import {
6
6
  pusharyHookExecutable
7
- } from "./chunk-TPLTB256.js";
7
+ } from "./chunk-H7OY4AAT.js";
8
8
  import {
9
9
  isProtectedByScope,
10
10
  registerHookEntry
11
- } from "./chunk-B3BOAYRO.js";
11
+ } from "./chunk-TUXX7TKR.js";
12
12
  import {
13
13
  isRecord
14
- } from "./chunk-HA2SRYYP.js";
14
+ } from "./chunk-M2ZGNZRS.js";
15
15
 
16
16
  // src/cursor-config.ts
17
17
  var hookCommandOf = (entry) => {
@@ -1,19 +1,19 @@
1
1
  import {
2
2
  APPROVAL_RULES_PATH,
3
3
  canChangeApprovalSettings
4
- } from "./chunk-SZMDRBNK.js";
4
+ } from "./chunk-GJOHGES6.js";
5
5
  import {
6
6
  callMcpTool
7
- } from "./chunk-TZJR5ESF.js";
7
+ } from "./chunk-6QQUGYH6.js";
8
8
  import {
9
9
  absoluteUrl
10
- } from "./chunk-PBPQRJ2T.js";
10
+ } from "./chunk-L6BMVCQQ.js";
11
11
  import {
12
12
  getBaseUrl
13
- } from "./chunk-FTTSQAF4.js";
13
+ } from "./chunk-DAMTDSAE.js";
14
14
  import {
15
15
  NPX_LATEST_COMMAND
16
- } from "./chunk-AOP55JR2.js";
16
+ } from "./chunk-I5ANEYUK.js";
17
17
  import {
18
18
  AGENT_STOP_DEFAULT_SECONDS,
19
19
  APPROVAL_MODE_META,
@@ -21,7 +21,7 @@ import {
21
21
  classifyConfirmResponse,
22
22
  isAnswerSource,
23
23
  roundTripAsk
24
- } from "./chunk-HA2SRYYP.js";
24
+ } from "./chunk-M2ZGNZRS.js";
25
25
 
26
26
  // src/reach.ts
27
27
  var PUSHARY_APP_DOWNLOAD_URL = "https://pushary.com/download";
@@ -10,7 +10,7 @@ import {
10
10
  uploadTranscriptRecords,
11
11
  verifyAnchoredRecipients,
12
12
  wrapSessionKey
13
- } from "./chunk-4I2SHNEU.js";
13
+ } from "./chunk-PIIKLAFY.js";
14
14
 
15
15
  // src/live-session.ts
16
16
  var LIVE_TRANSCRIPT_LIMITS = { queuedRecords: 100, recordCharacters: 32 * 1024 };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  DEFAULT_SESSION
3
- } from "./chunk-QP3TCKRZ.js";
3
+ } from "./chunk-Y3ELKLNH.js";
4
4
 
5
5
  // src/answer.ts
6
6
  var isDeferAnswer = (value) => value === "defer";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  NPX_LATEST_COMMAND
3
- } from "./chunk-AOP55JR2.js";
3
+ } from "./chunk-I5ANEYUK.js";
4
4
 
5
5
  // src/config.ts
6
6
  import { readFileSync } from "fs";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  pusharyDir
3
- } from "./chunk-B3BOAYRO.js";
3
+ } from "./chunk-TUXX7TKR.js";
4
4
  import {
5
5
  writeFileAtomic
6
6
  } from "./chunk-TODDEIYG.js";
@@ -1,22 +1,22 @@
1
1
  import {
2
2
  needsShell,
3
3
  spawnClaude
4
- } from "./chunk-H6CL3T2S.js";
4
+ } from "./chunk-Y6ILCLKE.js";
5
5
  import {
6
6
  getMachineId
7
- } from "./chunk-MHYX5Q3F.js";
7
+ } from "./chunk-DSWUG4NV.js";
8
8
  import {
9
9
  readControlMode
10
- } from "./chunk-ZYDE6QRW.js";
10
+ } from "./chunk-M74WT5NA.js";
11
11
  import {
12
12
  pusharyDir
13
- } from "./chunk-B3BOAYRO.js";
13
+ } from "./chunk-TUXX7TKR.js";
14
14
  import {
15
15
  resolveGlobalBinary
16
- } from "./chunk-IVOELLUK.js";
16
+ } from "./chunk-HAOYL5JP.js";
17
17
  import {
18
18
  getApiKey
19
- } from "./chunk-FTTSQAF4.js";
19
+ } from "./chunk-DAMTDSAE.js";
20
20
  import {
21
21
  readJsonSafe,
22
22
  writeFileAtomic,
@@ -29,10 +29,10 @@ import {
29
29
  getPackageVersion,
30
30
  globalPackageFolder,
31
31
  globalRootFor
32
- } from "./chunk-WIIMW5YO.js";
32
+ } from "./chunk-UQTQ6HPO.js";
33
33
  import {
34
34
  isRecord
35
- } from "./chunk-HA2SRYYP.js";
35
+ } from "./chunk-M2ZGNZRS.js";
36
36
 
37
37
  // src/daemon-entry-guard.ts
38
38
  import { mkdirSync, readFileSync } from "fs";
@@ -1,19 +1,21 @@
1
1
  import {
2
2
  announceSubscriptionRequired,
3
3
  isDeferAnswer
4
- } from "./chunk-YPFOTFEG.js";
4
+ } from "./chunk-CWH4LBUW.js";
5
5
  import {
6
6
  askUser,
7
7
  isDecisionStopped,
8
8
  isQuestionLimitRefusal,
9
+ isThePersonsStop,
10
+ waitForOpenQuestion,
9
11
  waitForQuestion
10
- } from "./chunk-CS4Z44F5.js";
12
+ } from "./chunk-YH6EHCKQ.js";
11
13
  import {
12
14
  SubscriptionRequiredError
13
- } from "./chunk-TZJR5ESF.js";
15
+ } from "./chunk-6QQUGYH6.js";
14
16
  import {
15
17
  getMachineId
16
- } from "./chunk-MHYX5Q3F.js";
18
+ } from "./chunk-DSWUG4NV.js";
17
19
  import {
18
20
  ASK_CONTEXT_MAX,
19
21
  agentQuestionContext,
@@ -21,20 +23,8 @@ import {
21
23
  isTypedAnswerQuestion,
22
24
  parseAgentQuestionAnswers,
23
25
  plainAskOf,
24
- questionsShownAsASet,
25
- shouldDeferToNativeMode
26
- } from "./chunk-HA2SRYYP.js";
27
-
28
- // src/native-defer.ts
29
- var nativeDeferOptions = () => {
30
- const respect = process.env.PUSHARY_RESPECT_PERMISSION_MODE;
31
- const bypass = process.env.PUSHARY_DEFER_BYPASS;
32
- return {
33
- respectPermissionMode: !(respect === "0" || respect === "false"),
34
- deferBypass: bypass === "1" || bypass === "true"
35
- };
36
- };
37
- var defersToNativeMode = (permissionMode, toolName) => shouldDeferToNativeMode(permissionMode, toolName, nativeDeferOptions());
26
+ questionsShownAsASet
27
+ } from "./chunk-M2ZGNZRS.js";
38
28
 
39
29
  // src/agent-question-ask.ts
40
30
  var STOPPED = { kind: "stopped" };
@@ -69,31 +59,48 @@ var questionContext = (question, index, total, project) => {
69
59
  var legacyAnswerMap = (question, value) => JSON.stringify({ [question.question]: question.multiSelect ? JSON.stringify([value]) : value });
70
60
  var answerInTheEarlierForm = (question, value) => isTypedAnswerQuestion(question) ? null : parseAgentQuestionAnswers([question], legacyAnswerMap(question, value));
71
61
  var answersOnOneCard = (question, value) => answersToQuestionsAsAsked([question], value) ?? answerInTheEarlierForm(question, value);
62
+ var oneCardAsk = (call, only) => ({
63
+ question: only.question,
64
+ ...cardOf(only),
65
+ context: questionContext(only, 0, 1, call.projectName),
66
+ agentName: call.agentName,
67
+ sessionId: call.sessionId,
68
+ machineId: getMachineId(),
69
+ toolName: call.toolName,
70
+ toolUseId: call.toolUseId
71
+ });
72
+ var outcomeOfOneCardAnswer = (only, answer) => {
73
+ const values = answer.answered && answer.value ? answersToQuestionsAsAsked([only], answer.value) : null;
74
+ if (!values || isDeferAnswer(answer.value)) {
75
+ return UNANSWERED;
76
+ }
77
+ return answeredWith(values);
78
+ };
72
79
  var askAsOneCard = async (apiKey, call, only) => {
73
80
  let result;
74
81
  try {
75
- result = await askUser(apiKey, {
76
- question: only.question,
77
- ...cardOf(only),
78
- context: questionContext(only, 0, 1, call.projectName),
79
- agentName: call.agentName,
80
- sessionId: call.sessionId,
81
- machineId: getMachineId(),
82
- toolName: call.toolName,
83
- toolUseId: call.toolUseId,
84
- waitEndsAt: new Date(call.deadline).toISOString()
85
- });
82
+ result = await askUser(apiKey, { ...oneCardAsk(call, only), waitEndsAt: new Date(call.deadline).toISOString() });
86
83
  } catch (error) {
87
84
  return failedAskOutcome(error, call.sessionId);
88
85
  }
89
86
  if (isDecisionStopped(result)) return STOPPED;
87
+ call.onQuestionCreated?.(result.correlationId);
90
88
  const answer = await waitForQuestion(apiKey, result, storedWaitDeadline(result, call.deadline));
91
89
  if (isDecisionStopped(answer)) return STOPPED;
92
- const values = answer.answered && answer.value ? answersToQuestionsAsAsked([only], answer.value) : null;
93
- if (!values || isDeferAnswer(answer.value)) {
94
- return UNANSWERED;
90
+ return outcomeOfOneCardAnswer(only, answer);
91
+ };
92
+ var askAgentQuestionWhileOpen = async (apiKey, call, only, askerStillWaits) => {
93
+ let result;
94
+ try {
95
+ result = await askUser(apiKey, oneCardAsk(call, only));
96
+ } catch (error) {
97
+ return failedAskOutcome(error, call.sessionId);
95
98
  }
96
- return answeredWith(values);
99
+ if (isThePersonsStop(result)) return STOPPED;
100
+ call.onQuestionCreated?.(result.correlationId);
101
+ const answer = await waitForOpenQuestion(apiKey, result, askerStillWaits);
102
+ if (isThePersonsStop(answer)) return STOPPED;
103
+ return outcomeOfOneCardAnswer(only, answer);
97
104
  };
98
105
  var askQuestionByQuestion = async (apiKey, call, questions) => {
99
106
  const answers = {};
@@ -115,6 +122,7 @@ var askQuestionByQuestion = async (apiKey, call, questions) => {
115
122
  return failedAskOutcome(error, call.sessionId);
116
123
  }
117
124
  if (isDecisionStopped(result)) return STOPPED;
125
+ call.onQuestionCreated?.(result.correlationId);
118
126
  const answer = await waitForQuestion(apiKey, result, storedWaitDeadline(result, call.deadline));
119
127
  if (isDecisionStopped(answer)) return STOPPED;
120
128
  const legacyValue = answer.answered ? answer.value?.trim() : void 0;
@@ -134,8 +142,8 @@ var askAgentQuestions = (apiKey, call, questions) => {
134
142
  };
135
143
 
136
144
  export {
137
- defersToNativeMode,
138
145
  outcomeOfFailedAsk,
139
146
  storedWaitDeadline,
147
+ askAgentQuestionWhileOpen,
140
148
  askAgentQuestions
141
149
  };
@@ -3,10 +3,10 @@ import {
3
3
  } from "./chunk-CYTPQDQY.js";
4
4
  import {
5
5
  parseVersion
6
- } from "./chunk-IVOELLUK.js";
6
+ } from "./chunk-HAOYL5JP.js";
7
7
  import {
8
8
  isRecord
9
- } from "./chunk-HA2SRYYP.js";
9
+ } from "./chunk-M2ZGNZRS.js";
10
10
 
11
11
  // src/setup/agent-probe.ts
12
12
  import { execSync } from "child_process";
@@ -2,7 +2,7 @@ import {
2
2
  localRepoKey,
3
3
  normalizeRepoRemote,
4
4
  parseGitBranch
5
- } from "./chunk-HA2SRYYP.js";
5
+ } from "./chunk-M2ZGNZRS.js";
6
6
 
7
7
  // src/repo.ts
8
8
  import { existsSync, readFileSync, statSync } from "fs";
@@ -536,8 +536,8 @@ var loadedOnce = (load) => {
536
536
  };
537
537
 
538
538
  // src/codex-desktop-proxy.ts
539
- var loadThePhone = () => import("./api-MRFKFDVV.js");
540
- var loadTheCardRouting = () => import("./codex-card-routing-WP4IHJFN.js");
539
+ var loadThePhone = () => import("./api-7NPCSUGY.js");
540
+ var loadTheCardRouting = () => import("./codex-card-routing-MNAMCRPO.js");
541
541
  var theFirstCardLoadsAgain = () => {
542
542
  };
543
543
  var ASKS_WITHOUT_ROUTING = {};
@@ -1097,7 +1097,7 @@ var codexDesktopCommand = async (args, entry, readAccount) => {
1097
1097
  return runCodexDesktopProxy(engine2, args.slice(3), readAccount, { watchesForCards: layoutIsKnown });
1098
1098
  }
1099
1099
  if (args[0] === APP_CARDS_FLAG) {
1100
- const { codexAppCardsCommandOnThisMac } = await import("./codex-app-cards-switch-CXXDGH7R.js");
1100
+ const { codexAppCardsCommandOnThisMac } = await import("./codex-app-cards-switch-PJEY3EU5.js");
1101
1101
  return codexAppCardsCommandOnThisMac(args.slice(1), entry, readAccount);
1102
1102
  }
1103
1103
  if (args.length > 2) throw new Error("Usage: pushary codex --desktop [path/to/Codex.app]");
@@ -25,7 +25,7 @@ import {
25
25
  reportableSessionId,
26
26
  toToolLookup,
27
27
  truncateLine
28
- } from "./chunk-HA2SRYYP.js";
28
+ } from "./chunk-M2ZGNZRS.js";
29
29
 
30
30
  // ../hook-mapping/src/commit-receipt.ts
31
31
  var COMMIT_OUTPUT_MAX_LENGTH = 65536;
@@ -220,6 +220,7 @@ var OPENCODE_TOOL_NAMES = {
220
220
  grep: "Grep",
221
221
  webfetch: "WebFetch",
222
222
  websearch: "WebSearch",
223
+ skill: "Skill",
223
224
  task: "Task",
224
225
  subagent: "Task"
225
226
  };
@@ -573,7 +574,9 @@ var MEANING_BY_HOOK = {
573
574
  opencode: {
574
575
  "tool.execute.after": { kind: "tool", event: "tool_complete" },
575
576
  "chat.message": { kind: "prompt", event: "user_prompt" },
576
- "session.idle": { kind: "stop", event: "session_end" }
577
+ "session.idle": { kind: "stop", event: "session_end" },
578
+ "session.execution.failed": { kind: "stop_failure", event: "turn_error" },
579
+ "session.subagent.idle": { kind: "subagent_stop", event: "session_end" }
577
580
  }
578
581
  };
579
582
  var hookMeaning = (source, event) => MEANING_BY_HOOK[source][event] ?? null;
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  absoluteUrl
3
- } from "./chunk-PBPQRJ2T.js";
3
+ } from "./chunk-L6BMVCQQ.js";
4
4
  import {
5
5
  KEY_SCOPE
6
- } from "./chunk-HA2SRYYP.js";
6
+ } from "./chunk-M2ZGNZRS.js";
7
7
 
8
8
  // src/cli/approval-settings-pages.ts
9
9
  var API_KEYS_PATH = "/dashboard/agent/settings";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  AGENT_CHOICES
3
- } from "./chunk-FGVBFDNV.js";
3
+ } from "./chunk-J6KDUXJF.js";
4
4
  import {
5
5
  BELL_HOOK_BINARY
6
- } from "./chunk-V36P4KS4.js";
6
+ } from "./chunk-V3TWYF32.js";
7
7
  import {
8
8
  CLAUDE_HOOK_EVENTS,
9
9
  CODEX_HOOK_EVENTS,
@@ -16,13 +16,13 @@ import {
16
16
  isBridgeLocator,
17
17
  isProtectedByScope,
18
18
  registerHookEntry
19
- } from "./chunk-B3BOAYRO.js";
19
+ } from "./chunk-TUXX7TKR.js";
20
20
  import {
21
21
  CURSOR_GATE_EVENTS,
22
22
  HOOK_BUDGETS,
23
23
  HOOK_LOCATOR_BINARY,
24
24
  hookCommandHoldBudget
25
- } from "./chunk-HA2SRYYP.js";
25
+ } from "./chunk-M2ZGNZRS.js";
26
26
 
27
27
  // src/gemini-config.ts
28
28
  var GEMINI_HOOK_BINARY = "pushary-gemini-hook";