pushary 1.9.256 → 1.9.259

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 (145) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/{api-PDBKGOGU.js → api-KZ4IO7ON.js} +11 -11
  3. package/dist/bin/pushary-audit.js +3 -3
  4. package/dist/bin/pushary-bell-hook.js +29 -29
  5. package/dist/bin/pushary-bell.js +12 -12
  6. package/dist/bin/pushary-calls.js +15 -15
  7. package/dist/bin/pushary-claude.js +26 -26
  8. package/dist/bin/pushary-clean.js +40 -40
  9. package/dist/bin/pushary-codex-bridge.js +23 -23
  10. package/dist/bin/pushary-codex-hook.js +36 -36
  11. package/dist/bin/pushary-codex-session.js +8 -8
  12. package/dist/bin/pushary-codex.js +16 -16
  13. package/dist/bin/pushary-connect.js +36 -36
  14. package/dist/bin/pushary-cowork.js +5 -5
  15. package/dist/bin/pushary-daemon.js +47 -47
  16. package/dist/bin/pushary-disconnect.js +31 -31
  17. package/dist/bin/pushary-display-hook.js +3 -0
  18. package/dist/bin/pushary-doctor.js +48 -48
  19. package/dist/bin/pushary-elicitation-hook.js +28 -28
  20. package/dist/bin/pushary-gemini-bridge.js +18 -18
  21. package/dist/bin/pushary-gemini-hook.js +32 -32
  22. package/dist/bin/pushary-hook.js +36 -36
  23. package/dist/bin/pushary-login.js +23 -23
  24. package/dist/bin/pushary-logout.js +32 -32
  25. package/dist/bin/pushary-mcp.js +12 -12
  26. package/dist/bin/pushary-mode.js +16 -16
  27. package/dist/bin/pushary-notification-hook.js +28 -28
  28. package/dist/bin/pushary-opencode-bridge.js +22 -22
  29. package/dist/bin/pushary-opencode-hook.js +33 -33
  30. package/dist/bin/pushary-permission-denied-hook.js +35 -35
  31. package/dist/bin/pushary-permission-hook.js +36 -36
  32. package/dist/bin/pushary-post-hook.js +29 -29
  33. package/dist/bin/pushary-prompt-hook.js +28 -28
  34. package/dist/bin/pushary-session-end-hook.js +28 -28
  35. package/dist/bin/pushary-session-start-hook.js +40 -40
  36. package/dist/bin/pushary-sessions.js +12 -12
  37. package/dist/bin/pushary-setup.js +85 -64
  38. package/dist/bin/pushary-stats.js +5 -5
  39. package/dist/bin/pushary-status.js +37 -37
  40. package/dist/bin/pushary-stop-hook.js +28 -28
  41. package/dist/bin/pushary-stopfailure-hook.js +28 -28
  42. package/dist/bin/pushary-suggestions.js +16 -16
  43. package/dist/bin/pushary-transcript-register.js +17 -17
  44. package/dist/bin/pushary-transcripts.js +26 -26
  45. package/dist/bin/pushary-upgrade.js +48 -48
  46. package/dist/bin/pushary-wait.js +16 -16
  47. package/dist/bin/pushary.js +7 -7
  48. package/dist/{chunk-P4SM5JPQ.js → chunk-2DYBA2II.js} +2 -2
  49. package/dist/{chunk-KPYMLGHD.js → chunk-2GHNWRWN.js} +5 -5
  50. package/dist/{chunk-6JR5O74N.js → chunk-2P22GQEF.js} +2 -2
  51. package/dist/{chunk-2EBKVUV3.js → chunk-3MFQZIFR.js} +1 -1
  52. package/dist/{chunk-2OROBVCH.js → chunk-4OVUK56V.js} +6 -6
  53. package/dist/{chunk-Y3SW3AH4.js → chunk-4XF3KIK7.js} +3 -3
  54. package/dist/{chunk-CHP66VVN.js → chunk-5ZFKMWGK.js} +5 -5
  55. package/dist/{chunk-JWATMYBN.js → chunk-6CU5IOYP.js} +4 -4
  56. package/dist/{chunk-ZJUYUFEA.js → chunk-6XLFC43B.js} +5 -5
  57. package/dist/{chunk-BOC25SJO.js → chunk-6XROU22D.js} +46 -24
  58. package/dist/{chunk-Q7LZL757.js → chunk-7ALRPLO5.js} +1 -1
  59. package/dist/{chunk-HMARMKFN.js → chunk-7IP5CIP4.js} +2 -2
  60. package/dist/{chunk-MQSNZQ6X.js → chunk-7TGORNMH.js} +40 -28
  61. package/dist/{chunk-Z5I22MEH.js → chunk-A276HQFV.js} +1 -1
  62. package/dist/{chunk-LPHUELFO.js → chunk-A3ECMJW7.js} +4 -4
  63. package/dist/{chunk-OYZZXZYE.js → chunk-ADRV4PAY.js} +1 -1
  64. package/dist/{chunk-AOYHU6XJ.js → chunk-AKSUNBT6.js} +5 -5
  65. package/dist/{chunk-I4FZKY3R.js → chunk-AWKKAGLD.js} +3 -3
  66. package/dist/{chunk-SY5A4BTI.js → chunk-BYMM5NWM.js} +2 -2
  67. package/dist/{chunk-4CKGVOZN.js → chunk-BZS3DN6S.js} +4 -4
  68. package/dist/{chunk-A4QPJFVF.js → chunk-C5H5V5LW.js} +1 -1
  69. package/dist/{chunk-MI72IU6G.js → chunk-CMLH7XKQ.js} +12 -12
  70. package/dist/{chunk-ZMUVYTOY.js → chunk-CPMJBRKT.js} +2 -2
  71. package/dist/{chunk-TV3UAKAL.js → chunk-DOCQOW3H.js} +1 -1
  72. package/dist/{chunk-RFKP2QPM.js → chunk-DSRSXB4C.js} +7 -7
  73. package/dist/{chunk-RV4ARWS2.js → chunk-EAIHDQW6.js} +4 -4
  74. package/dist/{chunk-6NIFF33D.js → chunk-EPPG7UYT.js} +4 -4
  75. package/dist/{chunk-CVZB2UJY.js → chunk-EWFY4X2R.js} +6 -6
  76. package/dist/chunk-FUGK6M6S.js +69 -0
  77. package/dist/{chunk-MYA2MZVD.js → chunk-FVELY3OX.js} +3 -3
  78. package/dist/{chunk-HXDPONTW.js → chunk-GDIIFHLE.js} +4 -4
  79. package/dist/{chunk-EUJSAZYI.js → chunk-HIGRCM4Q.js} +1 -1
  80. package/dist/{chunk-6FGATHF3.js → chunk-I6NA76CJ.js} +1 -1
  81. package/dist/{chunk-SDPDAWUY.js → chunk-ILJKJHTF.js} +1 -1
  82. package/dist/{chunk-7DQRFOCT.js → chunk-IZ3WAW32.js} +3 -3
  83. package/dist/{chunk-PQH3NK6Z.js → chunk-K3I636LG.js} +5 -5
  84. package/dist/{chunk-DF6HDNIG.js → chunk-KVJC5ZWY.js} +1 -1
  85. package/dist/{chunk-YOR6P7ZD.js → chunk-LGXPSL5B.js} +2 -2
  86. package/dist/{chunk-7LCGDZB5.js → chunk-LLFO2T37.js} +3 -3
  87. package/dist/{chunk-QDYNEY25.js → chunk-LQGWJN7G.js} +1 -1
  88. package/dist/{chunk-2ZPBZ4YU.js → chunk-LRRQRF6V.js} +2 -2
  89. package/dist/{chunk-2ZWOLIMD.js → chunk-MQ7D3BUL.js} +2 -2
  90. package/dist/{chunk-E5LT4X66.js → chunk-NBGWQ2ZM.js} +1 -1
  91. package/dist/{chunk-E63N5ML7.js → chunk-NBU6LMWC.js} +4 -4
  92. package/dist/{chunk-XVIZUXKN.js → chunk-NMVHN3HC.js} +1 -1
  93. package/dist/{chunk-KMHC3PG6.js → chunk-NVRNS263.js} +1 -0
  94. package/dist/{chunk-IMKSRTFI.js → chunk-NZZI77JY.js} +1 -1
  95. package/dist/{chunk-DFPARBO2.js → chunk-O7TXZAXL.js} +5 -5
  96. package/dist/{chunk-JKWS5QQW.js → chunk-OLOGC5FB.js} +27 -2
  97. package/dist/{chunk-2BU3ZINY.js → chunk-OVUXENQ3.js} +2 -2
  98. package/dist/{chunk-NV3DXCYB.js → chunk-P462IBX7.js} +5 -5
  99. package/dist/{chunk-UQHQ5WKT.js → chunk-PAI2T23S.js} +1 -1
  100. package/dist/{chunk-CKRSZJZR.js → chunk-PDYGEI4J.js} +6 -6
  101. package/dist/{chunk-4RAXRM4E.js → chunk-PXBMEKOX.js} +2 -2
  102. package/dist/{chunk-TMV6L4XN.js → chunk-QAQBKLO3.js} +3 -3
  103. package/dist/{chunk-4XHYW7UN.js → chunk-QD5ZJA5S.js} +1 -1
  104. package/dist/{chunk-7HJDCATD.js → chunk-QWF6SPFG.js} +3 -3
  105. package/dist/{chunk-2NA62YF2.js → chunk-QYUKN27D.js} +4 -4
  106. package/dist/{chunk-M7EL423A.js → chunk-R5NFIWEU.js} +1 -1
  107. package/dist/{chunk-LGB2O2FG.js → chunk-RCBJ4GCY.js} +5 -5
  108. package/dist/{chunk-CDSHRV3I.js → chunk-RLAZPTYE.js} +7 -7
  109. package/dist/{chunk-42TGZKJW.js → chunk-S6RAM5NS.js} +2 -2
  110. package/dist/{chunk-VFMTS5C5.js → chunk-SI6YS6Q4.js} +10 -10
  111. package/dist/{chunk-Y5FH7P7H.js → chunk-SM4LDZXZ.js} +3 -3
  112. package/dist/{chunk-OX3RKATP.js → chunk-SZYC2YXC.js} +2 -2
  113. package/dist/{chunk-WRUT4RBW.js → chunk-TBUVYP3M.js} +3 -3
  114. package/dist/{chunk-OZJQXTEY.js → chunk-TJXUS7V2.js} +1 -1
  115. package/dist/{chunk-MIMOIRXH.js → chunk-TXOQQ3MV.js} +4 -4
  116. package/dist/{chunk-NU2SCQSY.js → chunk-UGARTFYN.js} +1 -1
  117. package/dist/{chunk-YRIB6P5B.js → chunk-URCTIW2K.js} +10 -10
  118. package/dist/{chunk-6LLXTRR4.js → chunk-UZZPQQI3.js} +5 -5
  119. package/dist/{chunk-ULRUKD2J.js → chunk-VQFOA64S.js} +1 -1
  120. package/dist/{chunk-LK6NP47P.js → chunk-VT2INEAF.js} +3 -3
  121. package/dist/{chunk-SPS75AL3.js → chunk-WBV7IRV5.js} +8 -8
  122. package/dist/{chunk-NNFTZNME.js → chunk-WOVJVQ7C.js} +6 -6
  123. package/dist/{chunk-EQQK2GCR.js → chunk-X6RQS3B4.js} +4 -4
  124. package/dist/{chunk-QKDK6C7Y.js → chunk-XF7FUP3A.js} +1 -1
  125. package/dist/{chunk-P65RQWAF.js → chunk-XOREUXPV.js} +1 -1
  126. package/dist/{chunk-APQ2WPSI.js → chunk-YVQWGCWS.js} +1 -1
  127. package/dist/{chunk-ENE3YCWH.js → chunk-Z3FLO3TN.js} +6 -6
  128. package/dist/{chunk-SXV6KRKD.js → chunk-Z3O63BK6.js} +6 -6
  129. package/dist/{chunk-T7IJFOLM.js → chunk-ZSBMV36A.js} +5 -5
  130. package/dist/{codex-app-cards-switch-ZWT7GVF3.js → codex-app-cards-switch-EVGZNOVW.js} +12 -12
  131. package/dist/{codex-card-routing-R5RYIO2T.js → codex-card-routing-XMQEWBVZ.js} +2 -2
  132. package/dist/{codex-desktop-launch-7PSF3TOL.js → codex-desktop-launch-XV5US6DV.js} +3 -3
  133. package/dist/{codex-session-launch-HHEVRULR.js → codex-session-launch-G2YTBANF.js} +20 -20
  134. package/dist/{config-XDKSDUVB.js → config-YM55MYXX.js} +3 -3
  135. package/dist/{global-upgrade-RCBL4COT.js → global-upgrade-AKKW3YEJ.js} +9 -9
  136. package/dist/{identity-N23JZMTN.js → identity-4NX35LHS.js} +4 -4
  137. package/dist/{live-capabilities-AVFBIZAP.js → live-capabilities-5ATYDLAL.js} +4 -4
  138. package/dist/{paths-KZSXNV7G.js → paths-J4VN4755.js} +3 -3
  139. package/dist/reapply-MI5A4MM3.js +76 -0
  140. package/dist/src/index.js +34 -34
  141. package/dist/{upgrade-lock-SRFPOOJH.js → upgrade-lock-4PXBDTIV.js} +4 -4
  142. package/dist/{usage-XXFGYXXC.js → usage-ZLVHS47G.js} +3 -3
  143. package/package.json +1 -1
  144. package/dist/chunk-IM35HIWM.js +0 -48
  145. package/dist/reapply-BJSKHOWU.js +0 -76
@@ -1,19 +1,19 @@
1
1
  import {
2
2
  APPROVAL_RULES_PATH,
3
3
  canChangeApprovalSettings
4
- } from "./chunk-HMARMKFN.js";
4
+ } from "./chunk-7IP5CIP4.js";
5
5
  import {
6
6
  callMcpTool
7
- } from "./chunk-ZJUYUFEA.js";
7
+ } from "./chunk-6XLFC43B.js";
8
8
  import {
9
9
  absoluteUrl
10
- } from "./chunk-Y3SW3AH4.js";
10
+ } from "./chunk-4XF3KIK7.js";
11
11
  import {
12
12
  getBaseUrl
13
- } from "./chunk-42TGZKJW.js";
13
+ } from "./chunk-S6RAM5NS.js";
14
14
  import {
15
15
  NPX_LATEST_COMMAND
16
- } from "./chunk-E5LT4X66.js";
16
+ } from "./chunk-NBGWQ2ZM.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-KMHC3PG6.js";
24
+ } from "./chunk-NVRNS263.js";
25
25
 
26
26
  // src/reach.ts
27
27
  var PUSHARY_APP_DOWNLOAD_URL = "https://pushary.com/download";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  pusharyFetch
3
- } from "./chunk-TMV6L4XN.js";
3
+ } from "./chunk-QAQBKLO3.js";
4
4
  import {
5
5
  getBaseUrl
6
- } from "./chunk-42TGZKJW.js";
6
+ } from "./chunk-S6RAM5NS.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-KMHC3PG6.js";
16
+ } from "./chunk-NVRNS263.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,25 +1,25 @@
1
1
  import {
2
2
  openClawLauncherCandidates
3
- } from "./chunk-7HJDCATD.js";
3
+ } from "./chunk-QWF6SPFG.js";
4
4
  import {
5
5
  openCodeConfigDirFrom
6
- } from "./chunk-RFKP2QPM.js";
6
+ } from "./chunk-DSRSXB4C.js";
7
7
  import {
8
8
  nativeClaudeInstallPath
9
9
  } from "./chunk-TCE3J44Z.js";
10
10
  import {
11
11
  grokHome
12
- } from "./chunk-ENE3YCWH.js";
12
+ } from "./chunk-Z3FLO3TN.js";
13
13
  import {
14
14
  claudeConfigDir,
15
15
  clineDataDirectory,
16
16
  codexHomeFrom,
17
17
  openClawEnvironmentOf,
18
18
  openClawPathsFrom
19
- } from "./chunk-4RAXRM4E.js";
19
+ } from "./chunk-PXBMEKOX.js";
20
20
  import {
21
21
  HOOK_COMPATIBLE_PROFILES
22
- } from "./chunk-KMHC3PG6.js";
22
+ } from "./chunk-NVRNS263.js";
23
23
 
24
24
  // src/vscode-config.ts
25
25
  import { homedir } from "os";
@@ -1,17 +1,17 @@
1
1
  import {
2
2
  compatibleConfigFile,
3
3
  hasCompatibleHooks
4
- } from "./chunk-ENE3YCWH.js";
4
+ } from "./chunk-Z3FLO3TN.js";
5
5
  import {
6
6
  pusharyHookExecutable
7
- } from "./chunk-6NIFF33D.js";
7
+ } from "./chunk-EPPG7UYT.js";
8
8
  import {
9
9
  isProtectedByScope,
10
10
  registerHookEntry
11
- } from "./chunk-4RAXRM4E.js";
11
+ } from "./chunk-PXBMEKOX.js";
12
12
  import {
13
13
  isRecord
14
- } from "./chunk-KMHC3PG6.js";
14
+ } from "./chunk-NVRNS263.js";
15
15
 
16
16
  // src/cursor-config.ts
17
17
  var hookCommandOf = (entry) => {
@@ -1,20 +1,20 @@
1
1
  import {
2
2
  fetchAsCredential
3
- } from "./chunk-DF6HDNIG.js";
3
+ } from "./chunk-KVJC5ZWY.js";
4
4
  import {
5
5
  keyCheckFromResponse
6
- } from "./chunk-Y3SW3AH4.js";
6
+ } from "./chunk-4XF3KIK7.js";
7
7
  import {
8
8
  installNetworkDefaults
9
- } from "./chunk-TMV6L4XN.js";
9
+ } from "./chunk-QAQBKLO3.js";
10
10
  import {
11
11
  getBaseUrl
12
- } from "./chunk-42TGZKJW.js";
12
+ } from "./chunk-S6RAM5NS.js";
13
13
  import {
14
14
  isRecord,
15
15
  isToolErrorResult,
16
16
  toolFailureCodeOfResult
17
- } from "./chunk-KMHC3PG6.js";
17
+ } from "./chunk-NVRNS263.js";
18
18
 
19
19
  // src/retry.ts
20
20
  var isRetryable = (err) => {
@@ -29,7 +29,7 @@ import {
29
29
  toolResultErrorText,
30
30
  transcriptTokensIn,
31
31
  transcriptUsageRequest
32
- } from "./chunk-JKWS5QQW.js";
32
+ } from "./chunk-OLOGC5FB.js";
33
33
  import {
34
34
  askUser,
35
35
  cancelQuestion,
@@ -45,37 +45,37 @@ import {
45
45
  waitForOpenQuestion,
46
46
  waitForQuestion,
47
47
  writeDegraded
48
- } from "./chunk-CVZB2UJY.js";
48
+ } from "./chunk-EWFY4X2R.js";
49
49
  import {
50
50
  RETRY_ACK,
51
51
  readCommandAck,
52
52
  refusedReceiptMessage
53
- } from "./chunk-OZJQXTEY.js";
53
+ } from "./chunk-TJXUS7V2.js";
54
54
  import {
55
55
  SubscriptionRequiredError,
56
56
  isRetryable,
57
57
  withRetry
58
- } from "./chunk-ZJUYUFEA.js";
58
+ } from "./chunk-6XLFC43B.js";
59
59
  import {
60
60
  fetchAsCredential
61
- } from "./chunk-DF6HDNIG.js";
61
+ } from "./chunk-KVJC5ZWY.js";
62
62
  import {
63
63
  branchFor,
64
64
  projectNameFor,
65
65
  repoKeyFor
66
- } from "./chunk-QKDK6C7Y.js";
66
+ } from "./chunk-XF7FUP3A.js";
67
67
  import {
68
68
  getMachineId
69
- } from "./chunk-IMKSRTFI.js";
69
+ } from "./chunk-NZZI77JY.js";
70
70
  import {
71
71
  reportedInstallSource
72
- } from "./chunk-OX3RKATP.js";
72
+ } from "./chunk-SZYC2YXC.js";
73
73
  import {
74
74
  IDLE_PROMPT_NOTIFICATION,
75
75
  NOTIFICATION_PUSH_TYPES,
76
76
  POSTTOOLUSE_MIRROR_ONLY_TOOLS,
77
77
  claudeConfigDir
78
- } from "./chunk-4RAXRM4E.js";
78
+ } from "./chunk-PXBMEKOX.js";
79
79
  import {
80
80
  compareVersion,
81
81
  parseVersion
@@ -84,7 +84,7 @@ import {
84
84
  getApiKey,
85
85
  getBaseUrl,
86
86
  isMalformedApiKeyError
87
- } from "./chunk-42TGZKJW.js";
87
+ } from "./chunk-S6RAM5NS.js";
88
88
  import {
89
89
  writeFileAtomic,
90
90
  writeJsonAtomicDurable
@@ -105,6 +105,7 @@ import {
105
105
  POLICY_REQUEST_CAPABILITIES_HEADER,
106
106
  QUESTION_LIMIT_PROMPT_REASON,
107
107
  REPO_AWARE_AGENTS,
108
+ STOP_HANDOFF_ACTION,
108
109
  UNVERIFIABLE_APPROVAL_REASON,
109
110
  WITHDRAWN_APPROVAL_REASON,
110
111
  agentQuestionContext,
@@ -151,7 +152,7 @@ import {
151
152
  resolvePolicy,
152
153
  unansweredRefusalReason,
153
154
  waitsForThePhone
154
- } from "./chunk-KMHC3PG6.js";
155
+ } from "./chunk-NVRNS263.js";
155
156
 
156
157
  // src/pending.ts
157
158
  import { join } from "path";
@@ -1080,6 +1081,9 @@ var ask = (reason) => claudePreToolUseOutput("ask", reason);
1080
1081
  var halted = (reason) => claudeStoppedPreToolUseOutput(reason);
1081
1082
 
1082
1083
  // src/permission-ask-outcome.ts
1084
+ var noteAStopAtTheAsk = (reply, signals) => {
1085
+ if (reply.handoffAction === STOP_HANDOFF_ACTION) signals.agentStopped = true;
1086
+ };
1083
1087
  var RULE_APPROVES_UNANSWERED = { kind: "rule_approves" };
1084
1088
  var pushOnlyUnansweredEnding = (timeoutAction, window, missedAnswer) => timeoutAction === "approve" && questionServedItsWholeWindow(window) ? RULE_APPROVES_UNANSWERED : missedAnswer;
1085
1089
  var NO_ASKED_FILE_PATH = {};
@@ -1147,7 +1151,10 @@ var handlePushOnly = async (apiKey, call, timeoutSeconds, timeoutAction, signals
1147
1151
  agentPromptFollows: promptFollowsAHandBack(call)
1148
1152
  }, subscriptionRequiredOutput);
1149
1153
  }
1150
- if (isDecisionStopped(result)) return halted(DECISION_STOP_REASON);
1154
+ if (isDecisionStopped(result)) {
1155
+ noteAStopAtTheAsk(result, signals);
1156
+ return halted(DECISION_STOP_REASON);
1157
+ }
1151
1158
  const deadline = storedWaitDeadline(result, requestedDeadline);
1152
1159
  const window = questionWindowOf(result, { cutShort: clampCut || deadline < requestedDeadline });
1153
1160
  if (waitsForThePhone(result)) {
@@ -1206,7 +1213,10 @@ var handlePushFirst = async (apiKey, call, pushFirstSeconds, signals) => {
1206
1213
  signals.askFailed = true;
1207
1214
  return outcomeOfFailedPermissionAsk(error, sessionId, { refusesUnanswered: false, agentPromptFollows: promptFollowsAHandBack(call) }, subscriptionRequiredOutput);
1208
1215
  }
1209
- if (isDecisionStopped(result)) return halted(DECISION_STOP_REASON);
1216
+ if (isDecisionStopped(result)) {
1217
+ noteAStopAtTheAsk(result, signals);
1218
+ return halted(DECISION_STOP_REASON);
1219
+ }
1210
1220
  if (waitsForThePhone(result)) announceWait(pushFirstSeconds, call.missedAnswer, result.answerUrl, sessionId);
1211
1221
  const deadline = storedWaitDeadline(result, requestedDeadline);
1212
1222
  const answer = await waitForQuestion(apiKey, result, deadline, 1500);
@@ -1342,16 +1352,6 @@ var userScope = () => {
1342
1352
  return "default";
1343
1353
  }
1344
1354
  };
1345
- var PRESENTATION_ONLY_INPUT_KEYS = ["description"];
1346
- var identifyingToolInput = (toolInput) => {
1347
- if (!toolInput) return {};
1348
- const identifying = {};
1349
- for (const [key, value] of Object.entries(toolInput)) {
1350
- if (PRESENTATION_ONLY_INPUT_KEYS.includes(key)) continue;
1351
- identifying[key] = value;
1352
- }
1353
- return identifying;
1354
- };
1355
1355
  var PRIVATE_FOLDER_MODE = 448;
1356
1356
  var PRIVATE_FILE_MODE = 384;
1357
1357
  var GROUP_OR_OTHER_PERMISSIONS = 63;
@@ -1438,6 +1438,24 @@ var readClaimed = (claimed, ttlMs) => {
1438
1438
  removeQuietly(claimed);
1439
1439
  }
1440
1440
  };
1441
+ var A_RECORD_IN_FLIGHT = /\.(?:pending|claimed)$/;
1442
+ var recordedKeyAt = (dir, key, ttlMs) => {
1443
+ try {
1444
+ const record = lstatSync3(join6(dir, key));
1445
+ return record.isFile() && Date.now() - record.mtimeMs < ttlMs ? { key, recordedAtMs: record.mtimeMs } : null;
1446
+ } catch {
1447
+ return null;
1448
+ }
1449
+ };
1450
+ var isRecordedKey = (recorded) => recorded !== null;
1451
+ var byRecordedTime = (left, right) => left.recordedAtMs - right.recordedAtMs;
1452
+ var recordedKeysStartingWith = (dir, prefix, ttlMs) => {
1453
+ try {
1454
+ return readdirSync3(dir).filter((name) => name.startsWith(prefix) && !A_RECORD_IN_FLIGHT.test(name)).map((name) => recordedKeyAt(dir, name, ttlMs)).filter(isRecordedKey).sort(byRecordedTime).map((recorded) => recorded.key);
1455
+ } catch {
1456
+ return [];
1457
+ }
1458
+ };
1441
1459
  var callDecisionStore = (name, ttlMs) => {
1442
1460
  const decisionDir = () => join6(tmpdir6(), `pushary-${name}-decisions-${userScope()}`);
1443
1461
  return {
@@ -1479,6 +1497,10 @@ var callDecisionStore = (name, ttlMs) => {
1479
1497
  if (!key) return;
1480
1498
  const dir = decisionDir();
1481
1499
  if (isPrivateFolder(dir)) removeQuietly(join6(dir, key));
1500
+ },
1501
+ keysStartingWith: (prefix) => {
1502
+ const dir = decisionDir();
1503
+ return isPrivateFolder(dir) ? recordedKeysStartingWith(dir, prefix, ttlMs) : [];
1482
1504
  }
1483
1505
  };
1484
1506
  };
@@ -2451,6 +2473,7 @@ export {
2451
2473
  deny,
2452
2474
  ask,
2453
2475
  halted,
2476
+ noteAStopAtTheAsk,
2454
2477
  askedFilePathOf,
2455
2478
  questionWindowOf,
2456
2479
  refusingTimeoutOutput,
@@ -2473,7 +2496,6 @@ export {
2473
2496
  codexUnansweredDecision,
2474
2497
  codexAskedFilePathOf,
2475
2498
  userScope,
2476
- identifyingToolInput,
2477
2499
  callDecisionStore,
2478
2500
  blockedActionFingerprint,
2479
2501
  sweepFilesOlderThan,
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  computerOsOfPlatform,
3
3
  isComputerAgent
4
- } from "./chunk-KMHC3PG6.js";
4
+ } from "./chunk-NVRNS263.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,9 +1,9 @@
1
1
  import {
2
2
  absoluteUrl
3
- } from "./chunk-Y3SW3AH4.js";
3
+ } from "./chunk-4XF3KIK7.js";
4
4
  import {
5
5
  KEY_SCOPE
6
- } from "./chunk-KMHC3PG6.js";
6
+ } from "./chunk-NVRNS263.js";
7
7
 
8
8
  // src/cli/approval-settings-pages.ts
9
9
  var API_KEYS_PATH = "/dashboard/agent/settings";
@@ -1,33 +1,34 @@
1
1
  import {
2
+ forgetEveryPhoneApproval,
2
3
  forgetPhoneApproval,
3
4
  holdsPhoneApproval,
4
5
  phoneApprovalSourceFor,
5
6
  rememberPhoneApproval,
6
7
  takePhoneApproval
7
- } from "./chunk-IM35HIWM.js";
8
+ } from "./chunk-FUGK6M6S.js";
8
9
  import {
9
10
  claudeSettingsLocationFor,
10
11
  readClaudePermissionRules
11
- } from "./chunk-SY5A4BTI.js";
12
+ } from "./chunk-BYMM5NWM.js";
12
13
  import {
13
14
  defersToNativeMode
14
- } from "./chunk-TV3UAKAL.js";
15
+ } from "./chunk-DOCQOW3H.js";
15
16
  import {
16
17
  reportMachineDenial
17
- } from "./chunk-E63N5ML7.js";
18
+ } from "./chunk-NBU6LMWC.js";
18
19
  import {
19
20
  isGatingMoment,
20
21
  recordKeylessMoment
21
- } from "./chunk-QDYNEY25.js";
22
+ } from "./chunk-LQGWJN7G.js";
22
23
  import {
23
24
  isAdmitted,
24
25
  readAdmissionRules
25
- } from "./chunk-NV3DXCYB.js";
26
+ } from "./chunk-P462IBX7.js";
26
27
  import {
27
28
  activeHookSource,
28
29
  activeIdentity,
29
30
  namedSource
30
- } from "./chunk-ENE3YCWH.js";
31
+ } from "./chunk-Z3FLO3TN.js";
31
32
  import {
32
33
  DEFAULT_SESSION,
33
34
  allow,
@@ -51,6 +52,7 @@ import {
51
52
  hasBlockedActionHint,
52
53
  isDeferAnswer,
53
54
  markApprovalReminded,
55
+ noteAStopAtTheAsk,
54
56
  oncePerSession,
55
57
  outcomeOfFailedAsk,
56
58
  permissionModeOf,
@@ -68,7 +70,7 @@ import {
68
70
  storedWaitDeadline,
69
71
  sweepFilesOlderThan,
70
72
  userScope
71
- } from "./chunk-BOC25SJO.js";
73
+ } from "./chunk-6XROU22D.js";
72
74
  import {
73
75
  UNNAMED_ACTION,
74
76
  deriveAction,
@@ -79,7 +81,7 @@ import {
79
81
  patchDeletesFiles,
80
82
  permissionDeniedAction,
81
83
  scopePathFor
82
- } from "./chunk-JKWS5QQW.js";
84
+ } from "./chunk-OLOGC5FB.js";
83
85
  import {
84
86
  askUser,
85
87
  cancelQuestion,
@@ -93,30 +95,30 @@ import {
93
95
  sendNotification,
94
96
  waitForQuestion,
95
97
  withdrawQuestion
96
- } from "./chunk-CVZB2UJY.js";
98
+ } from "./chunk-EWFY4X2R.js";
97
99
  import {
98
100
  branchFor,
99
101
  projectNameFor,
100
102
  repoKeyFor,
101
103
  repositoryScopeFor
102
- } from "./chunk-QKDK6C7Y.js";
104
+ } from "./chunk-XF7FUP3A.js";
103
105
  import {
104
106
  getMachineId
105
- } from "./chunk-IMKSRTFI.js";
107
+ } from "./chunk-NZZI77JY.js";
106
108
  import {
107
109
  POSTTOOLUSE_MIRRORED_TOOLS
108
- } from "./chunk-4RAXRM4E.js";
110
+ } from "./chunk-PXBMEKOX.js";
109
111
  import {
110
112
  getApiKey,
111
113
  getBaseUrl,
112
114
  isMalformedApiKeyError
113
- } from "./chunk-42TGZKJW.js";
115
+ } from "./chunk-S6RAM5NS.js";
114
116
  import {
115
117
  writeFileAtomic
116
118
  } from "./chunk-PM2NRK6Y.js";
117
119
  import {
118
120
  NPX_LATEST_COMMAND
119
- } from "./chunk-E5LT4X66.js";
121
+ } from "./chunk-NBGWQ2ZM.js";
120
122
  import {
121
123
  AGENT_QUESTION_STRATEGY,
122
124
  AGENT_QUESTION_TOOL,
@@ -185,7 +187,7 @@ import {
185
187
  terminalStaysLiveForTheCall,
186
188
  timeoutActionWithoutLocalPrompt,
187
189
  unapprovedScopeReason
188
- } from "./chunk-KMHC3PG6.js";
190
+ } from "./chunk-NVRNS263.js";
189
191
 
190
192
  // src/terminal-answer-watch.ts
191
193
  import { closeSync, openSync, readSync, statSync } from "fs";
@@ -344,8 +346,9 @@ var claimMcpHoldHandback = (fingerprint) => {
344
346
  };
345
347
 
346
348
  // src/hook.ts
347
- var settledAs = (outcome, output) => ({ output, outcome });
348
- var settledWithoutAKey = (output) => ({ output, outcome: null });
349
+ var settledAs = (outcome, output) => ({ output, outcome, phoneSaidYes: false });
350
+ var settledWithoutAKey = (output) => ({ output, outcome: null, phoneSaidYes: false });
351
+ var settledByThePhone = (outcome, output, phoneSaidYes) => ({ output, outcome, phoneSaidYes });
349
352
  var POSTTOOLUSE_REPORTED_TOOLS = new Set(POSTTOOLUSE_MIRRORED_TOOLS);
350
353
  var rememberGateOutcome = (input, outcome) => {
351
354
  if (outcome !== null && POSTTOOLUSE_REPORTED_TOOLS.has(input.tool_name)) recordGateOutcome(input.tool_use_id, outcome);
@@ -423,6 +426,7 @@ var handleTerminalLive = async (apiKey, input, event, description, projectName,
423
426
  }
424
427
  if (isDecisionStopped(question)) {
425
428
  stop.abort();
429
+ noteAStopAtTheAsk(question, signals);
426
430
  return void 0;
427
431
  }
428
432
  const deadline = storedWaitDeadline(question, requestedDeadline);
@@ -545,7 +549,7 @@ var dispatchModeDecision = async (apiKey, input, event, toolPolicy, machineId, t
545
549
  if (trainingConsent && signals.humanDecision) {
546
550
  emitDecisionEpisode(apiKey, input, toolPolicy, machineId, toolTarget, decision, result);
547
551
  }
548
- return { result, humanDecision: signals.humanDecision === true, mode, askFailed: signals.askFailed === true };
552
+ return { result, humanDecision: signals.humanDecision === true, mode, askFailed: signals.askFailed === true, agentStopped: signals.agentStopped === true };
549
553
  };
550
554
  var dispatchModeHandler = async (...args) => (await dispatchModeDecision(...args)).result;
551
555
  var isPhoneApproval = (decided) => decided.humanDecision && decided.result?.hookSpecificOutput.permissionDecision === "allow";
@@ -887,8 +891,9 @@ var decidePreToolUse = async (input, canonical) => {
887
891
  default: {
888
892
  if (preToolUseHandsOff(input, gateInput, verdict)) return settledAs("terminal_only", ask(TERMINAL_AND_PHONE_REASON));
889
893
  const decided = await dispatchModeDecision(apiKey, input, "PreToolUse", verdict.policy, getMachineId(), modeState.trainingConsent, verdict.scopeReason, verdict.scopePath, void 0, permissionsOffAskReason(gateInput, verdict), matchedRouteOf(gateInput));
890
- if (phoneApprovalSource && isPhoneApproval(decided)) rememberPhoneApproval(phoneApprovalSource, input);
891
- return settledAs(outcomeOfDispatch(decided), rememberHandbackToThePrompt(input, heldForMcpRoute, decided.result));
894
+ const phoneSaidYes = phoneApprovalSource !== null && isPhoneApproval(decided);
895
+ if (phoneSaidYes) rememberPhoneApproval(phoneApprovalSource, input);
896
+ return settledByThePhone(outcomeOfDispatch(decided), rememberHandbackToThePrompt(input, heldForMcpRoute, decided.result), phoneSaidYes);
892
897
  }
893
898
  }
894
899
  } catch (error) {
@@ -896,8 +901,13 @@ var decidePreToolUse = async (input, canonical) => {
896
901
  return settledAs("undecided", undecidedCall(SOLE_GATE_UNDECIDED_REASON));
897
902
  }
898
903
  };
904
+ var forgetEveryYesUnlessThePhoneSaidYes = (input, decision) => {
905
+ const source = phoneApprovalSourceOf(input);
906
+ if (source !== null && !decision.phoneSaidYes) forgetEveryPhoneApproval(source, input);
907
+ };
899
908
  var handlePreToolUse = async (input, canonical) => {
900
909
  const decision = await decidePreToolUse(input, canonical);
910
+ forgetEveryYesUnlessThePhoneSaidYes(input, decision);
901
911
  rememberGateOutcome(input, decision.outcome);
902
912
  return decision.output;
903
913
  };
@@ -911,7 +921,10 @@ var toPermissionRequestOutput = (hookOutput) => {
911
921
  if (d.permissionDecision === "deny") return permReqDeny(d.permissionDecisionReason);
912
922
  return void 0;
913
923
  };
914
- var answerOfTheReplay = (replayed) => replayed.humanDecision ? toPermissionRequestOutput(replayed.result) : void 0;
924
+ var answerOfTheReplay = (replayed) => {
925
+ if (replayed.agentStopped) return permReqHalted(DECISION_STOP_REASON);
926
+ return replayed.humanDecision ? toPermissionRequestOutput(replayed.result) : void 0;
927
+ };
915
928
  var permissionRequestPlanOutput = (answer, plan) => {
916
929
  switch (answer) {
917
930
  case "approved":
@@ -1020,18 +1033,17 @@ var handlePermissionRequest = async (input, canonical, holdBudgetSeconds) => {
1020
1033
  const preToolUseOwnsTheCall = !scopeQuestion && !preToolUseAllowLeftThePrompt && !claudeAllowlistOwnsCall(gateInput, verdict, input.permission_mode, claudeRules) && (isPermissionRequestOwnedByPreToolUse(ACTIVE_SOURCE, input.tool_name, input.permission_mode, shouldDeferToNativeMode) || preToolUseRanForTheCall && approvalRouteOutranksAutoMode(gateInput, verdict, input.permission_mode));
1021
1034
  if (!handedOff && (preToolUseAskedTheScopeQuestion || preToolUseOwnsTheCall)) return void 0;
1022
1035
  const terminalLiveDispatch = handedOff ? { holdBudgetSeconds } : void 0;
1036
+ const replayTheYes = async (call) => answerOfTheReplay(
1037
+ await dispatchModeDecision(apiKey, call, "PermissionRequest", verdict.policy, getMachineId(), false, verdict.kind === "gate" ? verdict.scopeReason : void 0, verdict.kind === "gate" ? verdict.scopePath : void 0, terminalLiveDispatch, permissionsOffAskReason(gateInput, verdict), matchedRouteOf(gateInput))
1038
+ );
1023
1039
  switch (verdict.kind) {
1024
1040
  case "allow":
1025
1041
  return permReqAllow();
1026
1042
  // No opinion, so Claude Code's own dialog shows.
1027
1043
  case "defer":
1028
- return void 0;
1044
+ return approvedCall ? await replayTheYes(approvedCall) : void 0;
1029
1045
  default:
1030
- if (approvedCall) {
1031
- return answerOfTheReplay(
1032
- await dispatchModeDecision(apiKey, approvedCall, "PermissionRequest", verdict.policy, getMachineId(), false, verdict.scopeReason, verdict.scopePath, terminalLiveDispatch, permissionsOffAskReason(gateInput, verdict), matchedRouteOf(gateInput))
1033
- );
1034
- }
1046
+ if (approvedCall) return await replayTheYes(approvedCall);
1035
1047
  return toPermissionRequestOutput(
1036
1048
  await dispatchModeHandler(apiKey, input, "PermissionRequest", verdict.policy, getMachineId(), modeState.trainingConsent, verdict.scopeReason, verdict.scopePath, terminalLiveDispatch, permissionsOffAskReason(gateInput, verdict), matchedRouteOf(gateInput))
1037
1049
  );
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  guardBinary
3
- } from "./chunk-4RAXRM4E.js";
3
+ } from "./chunk-PXBMEKOX.js";
4
4
 
5
5
  // src/bell/install.ts
6
6
  import { join } from "path";
@@ -4,16 +4,16 @@ import {
4
4
  } from "./chunk-WHB622LP.js";
5
5
  import {
6
6
  keyPrefix
7
- } from "./chunk-7DQRFOCT.js";
7
+ } from "./chunk-IZ3WAW32.js";
8
8
  import {
9
9
  keyPrefixToShow
10
- } from "./chunk-42TGZKJW.js";
10
+ } from "./chunk-S6RAM5NS.js";
11
11
  import {
12
12
  NPX_LATEST_COMMAND
13
- } from "./chunk-E5LT4X66.js";
13
+ } from "./chunk-NBGWQ2ZM.js";
14
14
  import {
15
15
  isValidApiKey
16
- } from "./chunk-KMHC3PG6.js";
16
+ } from "./chunk-NVRNS263.js";
17
17
 
18
18
  // src/setup/key-account.ts
19
19
  var isKeyHeldByMacApp = (key, holder) => holder.macAppInstalled && holder.macAppKey === key;
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  renderCommandHelp
3
- } from "./chunk-E5LT4X66.js";
3
+ } from "./chunk-NBGWQ2ZM.js";
4
4
  import {
5
5
  EXIT
6
6
  } from "./chunk-BG4HHB7E.js";
@@ -9,7 +9,7 @@ import {
9
9
  installedCodexApp,
10
10
  readCodexAppRuntime,
11
11
  shellQuoted
12
- } from "./chunk-RV4ARWS2.js";
12
+ } from "./chunk-EAIHDQW6.js";
13
13
  import {
14
14
  CODEX_APP_LAUNCH_AT_LOGIN_VERB,
15
15
  CODEX_APP_LAUNCH_VARIABLE,
@@ -20,20 +20,20 @@ import {
20
20
  } from "./chunk-QCGNGEGE.js";
21
21
  import {
22
22
  parseConfigDocument
23
- } from "./chunk-NU2SCQSY.js";
23
+ } from "./chunk-UGARTFYN.js";
24
24
  import {
25
25
  xml
26
- } from "./chunk-CKRSZJZR.js";
26
+ } from "./chunk-PDYGEI4J.js";
27
27
  import {
28
28
  codexHomeFrom
29
- } from "./chunk-4RAXRM4E.js";
29
+ } from "./chunk-PXBMEKOX.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-KMHC3PG6.js";
36
+ } from "./chunk-NVRNS263.js";
37
37
 
38
38
  // src/codex-app-cards-switch.ts
39
39
  import { execFileSync as execFileSync2 } from "child_process";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  SETUP_FLAGS
3
- } from "./chunk-ULRUKD2J.js";
3
+ } from "./chunk-VQFOA64S.js";
4
4
  import {
5
5
  parseFlags
6
6
  } from "./chunk-BZIBNSQE.js";
@@ -9,7 +9,7 @@ import {
9
9
  } from "./chunk-CINBAX5G.js";
10
10
  import {
11
11
  NPX_LATEST_COMMAND
12
- } from "./chunk-E5LT4X66.js";
12
+ } from "./chunk-NBGWQ2ZM.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-KMHC3PG6.js";
20
+ } from "./chunk-NVRNS263.js";
21
21
 
22
22
  // src/cli/cowork.ts
23
23
  import { readFileSync } from "fs";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  claudeConfigDir
3
- } from "./chunk-4RAXRM4E.js";
3
+ } from "./chunk-PXBMEKOX.js";
4
4
  import {
5
5
  claudePermissionRulesFromSettings
6
- } from "./chunk-KMHC3PG6.js";
6
+ } from "./chunk-NVRNS263.js";
7
7
 
8
8
  // src/claude-permission-rules.ts
9
9
  import { readFileSync, statSync } from "fs";