@pushary/agent-hooks 1.9.21 → 1.9.22

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 (100) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/dist/bin/pushary-bell-hook.js +25 -25
  3. package/dist/bin/pushary-bell.js +9 -9
  4. package/dist/bin/pushary-claude.js +24 -24
  5. package/dist/bin/pushary-clean.js +28 -28
  6. package/dist/bin/pushary-codex-bridge.js +17 -17
  7. package/dist/bin/pushary-codex-hook.js +35 -35
  8. package/dist/bin/pushary-codex.js +12 -12
  9. package/dist/bin/pushary-connect.js +24 -24
  10. package/dist/bin/pushary-cowork.js +5 -5
  11. package/dist/bin/pushary-daemon.js +31 -31
  12. package/dist/bin/pushary-disconnect.js +24 -24
  13. package/dist/bin/pushary-doctor.js +33 -33
  14. package/dist/bin/pushary-elicitation-hook.js +25 -25
  15. package/dist/bin/pushary-gemini-bridge.js +13 -13
  16. package/dist/bin/pushary-gemini-hook.js +28 -28
  17. package/dist/bin/pushary-hook.js +29 -29
  18. package/dist/bin/pushary-login.js +12 -12
  19. package/dist/bin/pushary-logout.js +12 -12
  20. package/dist/bin/pushary-mcp.js +9 -9
  21. package/dist/bin/pushary-mode.js +12 -12
  22. package/dist/bin/pushary-notification-hook.js +24 -24
  23. package/dist/bin/pushary-opencode-hook.js +27 -27
  24. package/dist/bin/pushary-permission-denied-hook.js +29 -29
  25. package/dist/bin/pushary-permission-hook.js +28 -28
  26. package/dist/bin/pushary-post-hook.js +24 -24
  27. package/dist/bin/pushary-prompt-hook.js +24 -24
  28. package/dist/bin/pushary-session-end-hook.js +24 -24
  29. package/dist/bin/pushary-session-start-hook.js +28 -28
  30. package/dist/bin/pushary-setup.js +35 -35
  31. package/dist/bin/pushary-stats.js +5 -5
  32. package/dist/bin/pushary-status.js +26 -26
  33. package/dist/bin/pushary-stop-hook.js +24 -24
  34. package/dist/bin/pushary-stopfailure-hook.js +24 -24
  35. package/dist/bin/pushary-suggestions.js +12 -12
  36. package/dist/bin/pushary-transcript-register.js +17 -17
  37. package/dist/bin/pushary-transcripts.js +7 -7
  38. package/dist/bin/pushary-upgrade.js +30 -30
  39. package/dist/bin/pushary-wait.js +12 -12
  40. package/dist/bin/pushary.js +6 -6
  41. package/dist/{chunk-BV5JPACQ.js → chunk-2MW4OHWI.js} +2 -2
  42. package/dist/{chunk-RVP6COOQ.js → chunk-3BWW4UMT.js} +2 -2
  43. package/dist/{chunk-IIQ77WUJ.js → chunk-4AO2OVUA.js} +6 -6
  44. package/dist/{chunk-VRXX2AY2.js → chunk-4PERN2SO.js} +1 -1
  45. package/dist/{chunk-TQIPIFL7.js → chunk-5AZ546F6.js} +1 -1
  46. package/dist/{chunk-NVXC6ZBR.js → chunk-5TLRS3AK.js} +2 -2
  47. package/dist/{chunk-FH4O3QGQ.js → chunk-6IOLTFNP.js} +3 -3
  48. package/dist/{chunk-ZNAGS7O7.js → chunk-6SFTI7LM.js} +3 -3
  49. package/dist/{chunk-BDL6GJOQ.js → chunk-6TSEEKPL.js} +4 -4
  50. package/dist/{chunk-4WHNRAOK.js → chunk-75MJRC5I.js} +1 -1
  51. package/dist/{chunk-ESHO7OC3.js → chunk-76YNWUXC.js} +1 -1
  52. package/dist/{chunk-Y2BOLNJV.js → chunk-AGIO7SF5.js} +9 -6
  53. package/dist/{chunk-G4TV5GYU.js → chunk-AR4NXO4Q.js} +2 -2
  54. package/dist/{chunk-IEYFFMTU.js → chunk-ARJSQUIS.js} +2 -2
  55. package/dist/{chunk-VD2AWSER.js → chunk-BDGKWUK2.js} +2 -2
  56. package/dist/{chunk-JHAPJRAN.js → chunk-BDV4WDIA.js} +1 -1
  57. package/dist/{chunk-YCL2V5FD.js → chunk-CW3QUV6B.js} +10 -10
  58. package/dist/{chunk-LUDGBOLV.js → chunk-DV26ZWUC.js} +2 -2
  59. package/dist/{chunk-6WINXCXY.js → chunk-E3FSKKTJ.js} +1 -1
  60. package/dist/{chunk-CEF4UQ3X.js → chunk-E7EOUEGQ.js} +4 -4
  61. package/dist/{chunk-II6OFDB3.js → chunk-E7HOX73X.js} +4 -4
  62. package/dist/{chunk-TVBEHME2.js → chunk-G5YMVGAK.js} +4 -4
  63. package/dist/{chunk-VBPASZU7.js → chunk-GFXZDU4V.js} +18 -4
  64. package/dist/{chunk-IM7EGZVH.js → chunk-GNQZY4GL.js} +1 -1
  65. package/dist/{chunk-5PW6GMQO.js → chunk-GWKT2ZZS.js} +2 -2
  66. package/dist/{chunk-2V55RBUR.js → chunk-JQVGCDHW.js} +5 -5
  67. package/dist/{chunk-U6GYFWT4.js → chunk-KCLWVCGN.js} +4 -4
  68. package/dist/{chunk-Y6PZ3B5U.js → chunk-KCXG2INQ.js} +2 -2
  69. package/dist/{chunk-7AFLHL2R.js → chunk-KH2EDRJQ.js} +2 -2
  70. package/dist/{chunk-TJ4KMPYO.js → chunk-LH3GTSXC.js} +8 -8
  71. package/dist/{chunk-L5NPRGVE.js → chunk-N2JP3RKP.js} +5 -5
  72. package/dist/{chunk-UZ2YEGIT.js → chunk-NB2PY5JX.js} +3 -3
  73. package/dist/{chunk-AXBFNQG6.js → chunk-OZVZGWER.js} +1 -1
  74. package/dist/{chunk-PCVAK67W.js → chunk-P345G4DK.js} +1 -7
  75. package/dist/{chunk-QHY3UDYC.js → chunk-SGUGGHMC.js} +3 -3
  76. package/dist/{chunk-UKCRTTKF.js → chunk-T57BCGHQ.js} +1 -1
  77. package/dist/{chunk-GMJOSAAP.js → chunk-TH3HKKGW.js} +14 -13
  78. package/dist/{chunk-PYWZYM74.js → chunk-TSFNX5J2.js} +5 -5
  79. package/dist/{chunk-B6KZME5D.js → chunk-TZWZVAMN.js} +1 -1
  80. package/dist/{chunk-247PAUW6.js → chunk-U26CAOZC.js} +1 -1
  81. package/dist/{chunk-NBGJ3EOE.js → chunk-U2IEM5FF.js} +1 -1
  82. package/dist/{chunk-BERMVODT.js → chunk-U4OWRGYI.js} +5 -5
  83. package/dist/{chunk-Z5EYCMJH.js → chunk-UFGU7AK3.js} +2 -2
  84. package/dist/{chunk-TBCXMW2C.js → chunk-WAKQYJ6T.js} +3 -3
  85. package/dist/{chunk-6WBIQQHO.js → chunk-WE2RVY7V.js} +1 -1
  86. package/dist/{chunk-4BKAZ4JN.js → chunk-XDTYGS6R.js} +4 -4
  87. package/dist/{chunk-YLLGKY7K.js → chunk-YGR5PBOF.js} +3 -3
  88. package/dist/{chunk-PCF7JUTP.js → chunk-YI543EKI.js} +3 -3
  89. package/dist/{chunk-I52ALHOM.js → chunk-YODL2CJV.js} +2 -2
  90. package/dist/{chunk-4RJQPI36.js → chunk-YPZ4AE2R.js} +4 -4
  91. package/dist/{chunk-XNO3CSVW.js → chunk-YR3DHPYI.js} +1 -1
  92. package/dist/{chunk-FUXCWF4Y.js → chunk-Z7KB4R6U.js} +7 -7
  93. package/dist/{chunk-SVQOEVAT.js → chunk-ZUOIDI6M.js} +4 -4
  94. package/dist/{global-upgrade-AHRKGQ7M.js → global-upgrade-F3QY6OHE.js} +6 -6
  95. package/dist/{paths-AGUCNYQ5.js → paths-CBEAZNJR.js} +2 -2
  96. package/dist/{reapply-BUCDXIIM.js → reapply-4HP6N7LY.js} +20 -20
  97. package/dist/src/index.d.ts +1 -0
  98. package/dist/src/index.js +19 -19
  99. package/dist/{upgrade-lock-7Z5WBZVH.js → upgrade-lock-N3G5V2QS.js} +3 -3
  100. package/package.json +1 -1
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  resolveInstallSourceFor
3
- } from "./chunk-NVXC6ZBR.js";
3
+ } from "./chunk-5TLRS3AK.js";
4
4
  import {
5
5
  backupFile,
6
6
  readJsonSafe,
@@ -9,11 +9,11 @@ import {
9
9
  } from "./chunk-AQFEP65J.js";
10
10
  import {
11
11
  configFilePath
12
- } from "./chunk-4WHNRAOK.js";
12
+ } from "./chunk-75MJRC5I.js";
13
13
  import {
14
14
  API_KEY_PREFIX_PATTERN,
15
15
  isRecord
16
- } from "./chunk-VBPASZU7.js";
16
+ } from "./chunk-GFXZDU4V.js";
17
17
 
18
18
  // src/shell-alias.ts
19
19
  import { homedir } from "os";
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  keyCheckFromResponse
3
- } from "./chunk-UZ2YEGIT.js";
3
+ } from "./chunk-NB2PY5JX.js";
4
4
  import {
5
5
  installNetworkDefaults
6
- } from "./chunk-TBCXMW2C.js";
6
+ } from "./chunk-WAKQYJ6T.js";
7
7
  import {
8
8
  getBaseUrl
9
- } from "./chunk-4WHNRAOK.js";
9
+ } from "./chunk-75MJRC5I.js";
10
10
 
11
11
  // src/retry.ts
12
12
  var isRetryable = (err) => {
@@ -3,18 +3,18 @@ import {
3
3
  addGeminiMcpServer,
4
4
  removeGeminiMcpServer,
5
5
  supportedClaudeEvents
6
- } from "./chunk-YLLGKY7K.js";
6
+ } from "./chunk-YGR5PBOF.js";
7
7
  import {
8
8
  CLAUDE_CODE_AGENT,
9
9
  parseApplyPatchFiles
10
- } from "./chunk-YCL2V5FD.js";
10
+ } from "./chunk-CW3QUV6B.js";
11
11
  import {
12
12
  guardBinary,
13
13
  guardBinaryRefusing,
14
14
  holdBudgetOf,
15
15
  isProtectedByScope,
16
16
  registerHookEntry
17
- } from "./chunk-CEF4UQ3X.js";
17
+ } from "./chunk-E7EOUEGQ.js";
18
18
  import {
19
19
  HOOK_LOCATOR_BINARY,
20
20
  PHONE_ANSWERED_TOOLS,
@@ -24,7 +24,7 @@ import {
24
24
  refusalOutput,
25
25
  toToolLookup,
26
26
  withHookHoldBudget
27
- } from "./chunk-VBPASZU7.js";
27
+ } from "./chunk-GFXZDU4V.js";
28
28
 
29
29
  // src/claude-config.ts
30
30
  import { join } from "path";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  NPX_LATEST_COMMAND
3
- } from "./chunk-B6KZME5D.js";
3
+ } from "./chunk-TZWZVAMN.js";
4
4
 
5
5
  // src/config.ts
6
6
  import { readFileSync } from "fs";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  readConfigFileKey
3
- } from "./chunk-FH4O3QGQ.js";
3
+ } from "./chunk-6IOLTFNP.js";
4
4
 
5
5
  // src/bell/fleet.ts
6
6
  import { closeSync, constants, futimesSync, lstatSync, mkdirSync, openSync, readdirSync, unlinkSync } from "fs";
@@ -5,26 +5,27 @@ import {
5
5
  import {
6
6
  SubscriptionRequiredError,
7
7
  callMcpTool
8
- } from "./chunk-ZNAGS7O7.js";
8
+ } from "./chunk-6SFTI7LM.js";
9
9
  import {
10
10
  installNetworkDefaults,
11
11
  isNetworkFailure
12
- } from "./chunk-TBCXMW2C.js";
12
+ } from "./chunk-WAKQYJ6T.js";
13
13
  import {
14
14
  clientReportClaims
15
- } from "./chunk-CEF4UQ3X.js";
15
+ } from "./chunk-E7EOUEGQ.js";
16
16
  import {
17
17
  getApiKey,
18
18
  getBaseUrl
19
- } from "./chunk-4WHNRAOK.js";
19
+ } from "./chunk-75MJRC5I.js";
20
20
  import {
21
21
  ASK_AGENT_NAME_MAX,
22
22
  ASK_QUESTION_MAX,
23
23
  CLIENT_REPORT_PATH,
24
24
  DECISION_LINE_MAX,
25
+ GATE_PERMISSION_MODE_MAX_LENGTH,
25
26
  degradedLine,
26
27
  truncateLine
27
- } from "./chunk-VBPASZU7.js";
28
+ } from "./chunk-GFXZDU4V.js";
28
29
 
29
30
  // src/client-report-claim.ts
30
31
  import { createHash } from "crypto";
@@ -190,13 +191,15 @@ var unavailableQuestionUnlessSubscriptionRequired = (error) => {
190
191
  return { correlationId: "", status: "unavailable" };
191
192
  };
192
193
  var truncateOptional = (text, max) => text === void 0 ? void 0 : truncateLine(text, max);
194
+ var boundedPermissionMode = (value) => typeof value === "string" && value.length > 0 ? value.slice(0, GATE_PERMISSION_MODE_MAX_LENGTH) : void 0;
193
195
  var withinAskUserLimits = (params) => ({
194
196
  ...params,
195
197
  question: truncateLine(params.question, ASK_QUESTION_MAX),
196
198
  agentName: truncateOptional(params.agentName, ASK_AGENT_NAME_MAX),
197
199
  intent: truncateOptional(params.intent, DECISION_LINE_MAX),
198
200
  action: truncateOptional(params.action, DECISION_LINE_MAX),
199
- blocker: truncateOptional(params.blocker, DECISION_LINE_MAX)
201
+ blocker: truncateOptional(params.blocker, DECISION_LINE_MAX),
202
+ permissionMode: boundedPermissionMode(params.permissionMode)
200
203
  });
201
204
  var askUser = async (apiKey, params, timeoutMs = 15e3) => {
202
205
  const identified = params.toolUseId || params.requestId ? params : { ...params, requestId: randomUUID() };
@@ -6,12 +6,12 @@ import {
6
6
  permissionDeniedAction,
7
7
  releaseThrottle,
8
8
  reportEvent
9
- } from "./chunk-YCL2V5FD.js";
9
+ } from "./chunk-CW3QUV6B.js";
10
10
  import {
11
11
  machineDecisionFor,
12
12
  shouldDeferToNativeMode,
13
13
  wireVerdictFor
14
- } from "./chunk-VBPASZU7.js";
14
+ } from "./chunk-GFXZDU4V.js";
15
15
 
16
16
  // src/machine-decision-audit.ts
17
17
  import { basename } from "path";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  pusharyDir
3
- } from "./chunk-CEF4UQ3X.js";
3
+ } from "./chunk-E7EOUEGQ.js";
4
4
  import {
5
5
  readJsonSafe,
6
6
  writeFileAtomic
@@ -13,7 +13,7 @@ import {
13
13
  serializeDeclinedAgents,
14
14
  withDeclinedAgent,
15
15
  withoutDeclinedAgent
16
- } from "./chunk-VBPASZU7.js";
16
+ } from "./chunk-GFXZDU4V.js";
17
17
 
18
18
  // src/declined-agents-file.ts
19
19
  import { join } from "path";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  parseSseMessages
3
- } from "./chunk-ZNAGS7O7.js";
3
+ } from "./chunk-6SFTI7LM.js";
4
4
  import {
5
5
  NPX_LATEST_COMMAND
6
- } from "./chunk-B6KZME5D.js";
6
+ } from "./chunk-TZWZVAMN.js";
7
7
 
8
8
  // src/mcp-stdio-bridge.ts
9
9
  var MCP_BRIDGE_BINARY = "pushary-mcp";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  PRETOOLUSE_GATED_TOOLS
3
- } from "./chunk-VBPASZU7.js";
3
+ } from "./chunk-GFXZDU4V.js";
4
4
 
5
5
  // src/claude-tools.ts
6
6
  var POSTTOOLUSE_MIRROR_ONLY_TOOLS = ["TodoWrite", "Task", "WebFetch", "WebSearch"];
@@ -2,7 +2,7 @@ import {
2
2
  IDLE_PROMPT_NOTIFICATION,
3
3
  NOTIFICATION_PUSH_TYPES,
4
4
  POSTTOOLUSE_MIRROR_ONLY_TOOLS
5
- } from "./chunk-JHAPJRAN.js";
5
+ } from "./chunk-BDV4WDIA.js";
6
6
  import {
7
7
  cancelQuestion,
8
8
  clientErrorKindOf,
@@ -10,26 +10,26 @@ import {
10
10
  reportClientError,
11
11
  sendNotification,
12
12
  waitForAnswer
13
- } from "./chunk-Y2BOLNJV.js";
13
+ } from "./chunk-AGIO7SF5.js";
14
14
  import {
15
15
  withRetry
16
- } from "./chunk-ZNAGS7O7.js";
16
+ } from "./chunk-6SFTI7LM.js";
17
17
  import {
18
18
  getMachineId
19
- } from "./chunk-NBGJ3EOE.js";
19
+ } from "./chunk-U2IEM5FF.js";
20
20
  import {
21
21
  reportedInstallSource
22
- } from "./chunk-NVXC6ZBR.js";
22
+ } from "./chunk-5TLRS3AK.js";
23
23
  import {
24
24
  canonicalJson
25
- } from "./chunk-CEF4UQ3X.js";
25
+ } from "./chunk-E7EOUEGQ.js";
26
26
  import {
27
27
  writeFileAtomic
28
28
  } from "./chunk-AQFEP65J.js";
29
29
  import {
30
30
  getApiKey,
31
31
  getBaseUrl
32
- } from "./chunk-4WHNRAOK.js";
32
+ } from "./chunk-75MJRC5I.js";
33
33
  import {
34
34
  ACTION_BODY_MAX,
35
35
  AGENT_LABELS_BY_TYPE,
@@ -60,7 +60,7 @@ import {
60
60
  resolvePolicy,
61
61
  toToolLookup,
62
62
  truncateLine
63
- } from "./chunk-VBPASZU7.js";
63
+ } from "./chunk-GFXZDU4V.js";
64
64
 
65
65
  // ../hook-mapping/src/describe.ts
66
66
  import { isAbsolute, relative, resolve } from "path";
@@ -204,6 +204,7 @@ var parseApplyPatchOps = (command) => {
204
204
  return ops;
205
205
  };
206
206
  var parseApplyPatchFiles = (command) => [...new Set(parseApplyPatchOps(command).map((entry) => entry.path))];
207
+ var patchDeletesFiles = (toolName, toolInput) => toolName === "apply_patch" && parseApplyPatchOps(toolInput.command).some((entry) => entry.op === "delete");
207
208
  var OPENCODE_TOOL_NAMES = {
208
209
  bash: "Bash",
209
210
  // A shell command reaching outside the worktree asks a second time under its
@@ -1359,7 +1360,6 @@ var toCodexWire = (event, decision) => {
1359
1360
  decision.kind === "deny" ? decision.reason : void 0
1360
1361
  ) ?? null;
1361
1362
  };
1362
- var patchDeletesFiles = (toolName, toolInput) => toolName === "apply_patch" && parseApplyPatchOps(toolInput.command).some((entry) => entry.op === "delete");
1363
1363
  var describeApplyPatch = (command) => {
1364
1364
  const ops = parseApplyPatchOps(command);
1365
1365
  if (ops.length === 0) return null;
@@ -2246,6 +2246,7 @@ export {
2246
2246
  describeToolCall,
2247
2247
  deriveToolTarget,
2248
2248
  parseApplyPatchFiles,
2249
+ patchDeletesFiles,
2249
2250
  OPENCODE_TOOL_NAMES,
2250
2251
  canonicalGateInputs,
2251
2252
  scopePathFor,
@@ -2279,7 +2280,6 @@ export {
2279
2280
  codexDeny,
2280
2281
  codexPass,
2281
2282
  toCodexWire,
2282
- patchDeletesFiles,
2283
2283
  describeApplyPatch,
2284
2284
  toPolicyLookup,
2285
2285
  toPolicyLookups,
@@ -3,11 +3,11 @@ import {
3
3
  decodePublicKey,
4
4
  generateSessionKey,
5
5
  wrapSessionKey
6
- } from "./chunk-6WINXCXY.js";
6
+ } from "./chunk-E3FSKKTJ.js";
7
7
  import {
8
8
  fetchTranscriptRecipients,
9
9
  uploadTranscriptRecords
10
- } from "./chunk-IM7EGZVH.js";
10
+ } from "./chunk-GNQZY4GL.js";
11
11
 
12
12
  // src/live-session.ts
13
13
  var MAX_TRANSCRIPT_QUEUE = 100;
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  redactSecretsFromContent
3
- } from "./chunk-VBPASZU7.js";
3
+ } from "./chunk-GFXZDU4V.js";
4
4
 
5
5
  // src/crypto.ts
6
6
  import nacl from "tweetnacl";
@@ -13,7 +13,7 @@ import {
13
13
  isReleaseVersion,
14
14
  ownPackageName,
15
15
  withHookHoldBudget
16
- } from "./chunk-VBPASZU7.js";
16
+ } from "./chunk-GFXZDU4V.js";
17
17
 
18
18
  // src/setup/paths.ts
19
19
  import { homedir as homedir2 } from "os";
@@ -395,9 +395,9 @@ var installGlobally = (options) => {
395
395
  }
396
396
  const started = (async () => {
397
397
  if (!npmIsOnPath()) throw new NpmMissingError();
398
- const { withUpgradeLock } = await import("./global-upgrade-AHRKGQ7M.js");
399
- const { installWithUpgradeLock, ownsUpgradeLock } = await import("./upgrade-lock-7Z5WBZVH.js");
400
- const { autoUpdateLock: autoUpdateLock2 } = await import("./paths-AGUCNYQ5.js");
398
+ const { withUpgradeLock } = await import("./global-upgrade-F3QY6OHE.js");
399
+ const { installWithUpgradeLock, ownsUpgradeLock } = await import("./upgrade-lock-N3G5V2QS.js");
400
+ const { autoUpdateLock: autoUpdateLock2 } = await import("./paths-CBEAZNJR.js");
401
401
  let result = "skipped";
402
402
  const install = async () => {
403
403
  const platform = process.platform;
@@ -1,16 +1,16 @@
1
1
  import {
2
2
  registerTranscript
3
- } from "./chunk-TJ4KMPYO.js";
3
+ } from "./chunk-LH3GTSXC.js";
4
4
  import {
5
5
  namedEvent
6
- } from "./chunk-BDL6GJOQ.js";
6
+ } from "./chunk-6TSEEKPL.js";
7
7
  import {
8
8
  writeDegraded
9
- } from "./chunk-Y2BOLNJV.js";
9
+ } from "./chunk-AGIO7SF5.js";
10
10
  import {
11
11
  claudeShapedHookInput,
12
12
  hookCompatibleProfileBySource
13
- } from "./chunk-VBPASZU7.js";
13
+ } from "./chunk-GFXZDU4V.js";
14
14
 
15
15
  // src/tool-hook-input.ts
16
16
  var OPTIONAL_TEXT_FIELDS = ["hook_event_name", "session_id", "cwd", "transcript_path", "tool_use_id", "permission_mode"];
@@ -14,19 +14,19 @@ import {
14
14
  } from "./chunk-FO3MDD26.js";
15
15
  import {
16
16
  callMcpTool
17
- } from "./chunk-ZNAGS7O7.js";
17
+ } from "./chunk-6SFTI7LM.js";
18
18
  import {
19
19
  reportedInstallSource
20
- } from "./chunk-NVXC6ZBR.js";
20
+ } from "./chunk-5TLRS3AK.js";
21
21
  import {
22
22
  NPX_LATEST_COMMAND
23
- } from "./chunk-B6KZME5D.js";
23
+ } from "./chunk-TZWZVAMN.js";
24
24
  import {
25
25
  NO_PAIRING_COMPUTER,
26
26
  PAIR_TTL_SECONDS,
27
27
  classifyConfirmResponse,
28
28
  isAnswerSource
29
- } from "./chunk-VBPASZU7.js";
29
+ } from "./chunk-GFXZDU4V.js";
30
30
 
31
31
  // src/reach.ts
32
32
  var reachVerdict = (channels) => {
@@ -2125,9 +2125,19 @@ var SETTLED_OUTCOME = {
2125
2125
  deny: "deny"
2126
2126
  };
2127
2127
  var isSettledOutcome = (value) => typeof value === "string" && SETTLED_OUTCOMES.includes(value);
2128
- var APPROVE_RESPONSES = /* @__PURE__ */ new Set(["yes", "approve", "approved"]);
2129
- var DENY_RESPONSES = /* @__PURE__ */ new Set(["no", "deny", "denied", "reject", "rejected"]);
2130
- var DEFER_RESPONSES = /* @__PURE__ */ new Set(["defer"]);
2128
+ var APPROVE_ANSWER = "yes";
2129
+ var DENY_ANSWER = "no";
2130
+ var DEFER_ANSWER = "defer";
2131
+ var PHONE_DENIAL_PREFIX = "Denied from your phone: ";
2132
+ var PHONE_DENIAL_REASON = "Denied via push notification";
2133
+ var denyReasonFrom = (value, note) => {
2134
+ const trimmed = note?.trim();
2135
+ if (trimmed) return `${PHONE_DENIAL_PREFIX}${trimmed}`;
2136
+ return value && value !== DENY_ANSWER && value !== APPROVE_ANSWER ? `${PHONE_DENIAL_PREFIX}${value}` : PHONE_DENIAL_REASON;
2137
+ };
2138
+ var APPROVE_RESPONSES = /* @__PURE__ */ new Set([APPROVE_ANSWER, "approve", "approved"]);
2139
+ var DENY_RESPONSES = /* @__PURE__ */ new Set([DENY_ANSWER, "deny", "denied", "reject", "rejected"]);
2140
+ var DEFER_RESPONSES = /* @__PURE__ */ new Set([DEFER_ANSWER]);
2131
2141
  var classifyConfirmResponse = (response) => {
2132
2142
  const normalized = (response ?? "").trim().toLowerCase();
2133
2143
  if (APPROVE_RESPONSES.has(normalized)) return "approve";
@@ -2590,6 +2600,7 @@ var SCOPE_BATCH_REASON = "This patch exceeds the agreed scope. Split it into sin
2590
2600
  var unapprovedScopeReason = (scopeReason) => `${scopeReason}. Nobody approved this path, so the change was refused.`;
2591
2601
  var NO_RESPONSE_REASON = "No response within timeout";
2592
2602
  var codexRaisesItsOwnPrompts = (permissionMode) => permissionMode !== "bypassPermissions";
2603
+ var codexHasNoPromptOfItsOwn = (scopeReason, permissionMode) => scopeReason !== void 0 || !codexRaisesItsOwnPrompts(permissionMode);
2593
2604
  var CODEX_ASK_PASSES = { kind: "pass" };
2594
2605
  var CODEX_ASK_UNANSWERED = { kind: "deny", reason: NO_RESPONSE_REASON };
2595
2606
  var timeoutActionApplies = (ask) => ask.mode === "push_only" && ask.fullWindowServed;
@@ -2679,6 +2690,7 @@ var modeStateFromResponse = (data) => {
2679
2690
  };
2680
2691
  var GATE_WIRE = 1;
2681
2692
  var GATE_MAX_TOOL_INPUTS = 32;
2693
+ var GATE_PERMISSION_MODE_MAX_LENGTH = 64;
2682
2694
  var GATE_BLOCK_REASON_MAX_LENGTH = 200;
2683
2695
  var wireVerdictFor = (verdict, deadlineSeconds) => {
2684
2696
  switch (verdict.kind) {
@@ -3212,6 +3224,7 @@ export {
3212
3224
  ASK_AGENT_NAME_MAX,
3213
3225
  truncateLine,
3214
3226
  isAnswerSource,
3227
+ denyReasonFrom,
3215
3228
  classifyConfirmResponse,
3216
3229
  buildDecisionEpisodeFeatures,
3217
3230
  resolveAutoResolveOrigin,
@@ -3234,7 +3247,7 @@ export {
3234
3247
  SCOPE_BATCH_REASON,
3235
3248
  unapprovedScopeReason,
3236
3249
  NO_RESPONSE_REASON,
3237
- codexRaisesItsOwnPrompts,
3250
+ codexHasNoPromptOfItsOwn,
3238
3251
  codexUnansweredPreToolUse,
3239
3252
  scopeBreachReasonOf,
3240
3253
  codexCallNeedsAPerson,
@@ -3245,6 +3258,7 @@ export {
3245
3258
  modeStateFromResponse,
3246
3259
  GATE_WIRE,
3247
3260
  GATE_MAX_TOOL_INPUTS,
3261
+ GATE_PERMISSION_MODE_MAX_LENGTH,
3248
3262
  GATE_BLOCK_REASON_MAX_LENGTH,
3249
3263
  wireVerdictFor,
3250
3264
  machineDecisionFor,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getBaseUrl
3
- } from "./chunk-4WHNRAOK.js";
3
+ } from "./chunk-75MJRC5I.js";
4
4
 
5
5
  // src/transcript-api.ts
6
6
  var fetchTranscriptRecipients = async (apiKey, baseUrl = getBaseUrl()) => {
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-POFBE6ZY.js";
4
4
  import {
5
5
  autoUpdateState
6
- } from "./chunk-CEF4UQ3X.js";
6
+ } from "./chunk-E7EOUEGQ.js";
7
7
  import {
8
8
  readJsonSafe,
9
9
  writeJsonAtomic
@@ -14,7 +14,7 @@ import {
14
14
  cliPackagePathSegments,
15
15
  globalUpgradeEntry,
16
16
  ownPackageRoot
17
- } from "./chunk-VBPASZU7.js";
17
+ } from "./chunk-GFXZDU4V.js";
18
18
 
19
19
  // src/auto-update.ts
20
20
  import { spawn } from "child_process";
@@ -4,7 +4,7 @@ import {
4
4
  forkFinishWithUpgradeLock,
5
5
  installWithUpgradeLock,
6
6
  releaseAutoUpdateLock
7
- } from "./chunk-VRXX2AY2.js";
7
+ } from "./chunk-4PERN2SO.js";
8
8
  import {
9
9
  describeAutoUpdateCheck,
10
10
  globalInstallLocation,
@@ -14,7 +14,7 @@ import {
14
14
  readAutoUpdateState,
15
15
  updateAutoUpdateState,
16
16
  upgradeEntryFor
17
- } from "./chunk-5PW6GMQO.js";
17
+ } from "./chunk-GWKT2ZZS.js";
18
18
  import {
19
19
  EXIT
20
20
  } from "./chunk-KZERVKTD.js";
@@ -27,10 +27,10 @@ import {
27
27
  npmErrorMessage,
28
28
  readGlobalCliInstallAt,
29
29
  readGlobalPrefix
30
- } from "./chunk-CEF4UQ3X.js";
30
+ } from "./chunk-E7EOUEGQ.js";
31
31
  import {
32
32
  NPX_LATEST_COMMAND
33
- } from "./chunk-B6KZME5D.js";
33
+ } from "./chunk-TZWZVAMN.js";
34
34
  import {
35
35
  commandsPackage,
36
36
  globalUpgradeEntry,
@@ -39,7 +39,7 @@ import {
39
39
  isSameMajorVersion,
40
40
  ownPackageRoot,
41
41
  packageVersionAt
42
- } from "./chunk-VBPASZU7.js";
42
+ } from "./chunk-GFXZDU4V.js";
43
43
 
44
44
  // src/global-upgrade.ts
45
45
  import { existsSync } from "fs";
@@ -1,17 +1,17 @@
1
1
  import {
2
2
  compatibleConfigFile,
3
3
  hasCompatibleHooks
4
- } from "./chunk-BDL6GJOQ.js";
4
+ } from "./chunk-6TSEEKPL.js";
5
5
  import {
6
6
  pusharyHookExecutable
7
- } from "./chunk-PYWZYM74.js";
7
+ } from "./chunk-TSFNX5J2.js";
8
8
  import {
9
9
  isProtectedByScope,
10
10
  registerHookEntry
11
- } from "./chunk-CEF4UQ3X.js";
11
+ } from "./chunk-E7EOUEGQ.js";
12
12
  import {
13
13
  isRecord
14
- } from "./chunk-VBPASZU7.js";
14
+ } from "./chunk-GFXZDU4V.js";
15
15
 
16
16
  // src/cursor-config.ts
17
17
  var hookCommandOf = (entry) => {
@@ -8,10 +8,10 @@ import {
8
8
  codexHooksJsonIn,
9
9
  isPusharyCodexCommand,
10
10
  resolvePathBinary
11
- } from "./chunk-CEF4UQ3X.js";
11
+ } from "./chunk-E7EOUEGQ.js";
12
12
  import {
13
13
  getPackageVersion
14
- } from "./chunk-VBPASZU7.js";
14
+ } from "./chunk-GFXZDU4V.js";
15
15
 
16
16
  // src/codex-app-server.ts
17
17
  import { existsSync, realpathSync } from "fs";
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  pusharyDir
3
- } from "./chunk-CEF4UQ3X.js";
3
+ } from "./chunk-E7EOUEGQ.js";
4
4
  import {
5
5
  readJsonSafe
6
6
  } from "./chunk-AQFEP65J.js";
7
7
  import {
8
8
  isRecord
9
- } from "./chunk-VBPASZU7.js";
9
+ } from "./chunk-GFXZDU4V.js";
10
10
 
11
11
  // src/process-ownership.ts
12
12
  import { createHash, randomUUID } from "crypto";
@@ -6,38 +6,38 @@ import {
6
6
  } from "./chunk-VTR4VRL2.js";
7
7
  import {
8
8
  ensureDaemonRunning
9
- } from "./chunk-L5NPRGVE.js";
9
+ } from "./chunk-N2JP3RKP.js";
10
10
  import {
11
11
  buildTranscriptRecords,
12
12
  decodePublicKey,
13
13
  generateSessionKey,
14
14
  wrapSessionKey
15
- } from "./chunk-6WINXCXY.js";
15
+ } from "./chunk-E3FSKKTJ.js";
16
16
  import {
17
17
  fetchTranscriptRecipients,
18
18
  uploadTranscriptRecords
19
- } from "./chunk-IM7EGZVH.js";
19
+ } from "./chunk-GNQZY4GL.js";
20
20
  import {
21
21
  transcriptEnvironmentPreference,
22
22
  transcriptsEnabled
23
- } from "./chunk-6WBIQQHO.js";
23
+ } from "./chunk-WE2RVY7V.js";
24
24
  import {
25
25
  hookOwnerOf
26
- } from "./chunk-PYWZYM74.js";
26
+ } from "./chunk-TSFNX5J2.js";
27
27
  import {
28
28
  readTranscriptPreference
29
- } from "./chunk-FH4O3QGQ.js";
29
+ } from "./chunk-6IOLTFNP.js";
30
30
  import {
31
31
  codexHome,
32
32
  pusharyDir
33
- } from "./chunk-CEF4UQ3X.js";
33
+ } from "./chunk-E7EOUEGQ.js";
34
34
  import {
35
35
  writeJsonAtomic
36
36
  } from "./chunk-AQFEP65J.js";
37
37
  import {
38
38
  getApiKey,
39
39
  getBaseUrl
40
- } from "./chunk-4WHNRAOK.js";
40
+ } from "./chunk-75MJRC5I.js";
41
41
 
42
42
  // src/transcript-registration.ts
43
43
  import { createHash } from "crypto";
@@ -4,14 +4,14 @@ import {
4
4
  } from "./chunk-XHKBHWLX.js";
5
5
  import {
6
6
  readControlMode
7
- } from "./chunk-FH4O3QGQ.js";
7
+ } from "./chunk-6IOLTFNP.js";
8
8
  import {
9
9
  getMachineId
10
- } from "./chunk-NBGJ3EOE.js";
10
+ } from "./chunk-U2IEM5FF.js";
11
11
  import {
12
12
  pusharyDir,
13
13
  resolveGlobalBinary
14
- } from "./chunk-CEF4UQ3X.js";
14
+ } from "./chunk-E7EOUEGQ.js";
15
15
  import {
16
16
  readJsonSafe,
17
17
  writeFileAtomic,
@@ -20,7 +20,7 @@ import {
20
20
  } from "./chunk-AQFEP65J.js";
21
21
  import {
22
22
  getApiKey
23
- } from "./chunk-4WHNRAOK.js";
23
+ } from "./chunk-75MJRC5I.js";
24
24
  import {
25
25
  CLI_PACKAGE_NAMES,
26
26
  cmdShimTarget,
@@ -28,7 +28,7 @@ import {
28
28
  globalPackageFolder,
29
29
  globalRootFor,
30
30
  isRecord
31
- } from "./chunk-VBPASZU7.js";
31
+ } from "./chunk-GFXZDU4V.js";
32
32
 
33
33
  // src/daemon-lifecycle.ts
34
34
  import { dirname, join, win32 as win32Path } from "path";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  pusharyFetch
3
- } from "./chunk-TBCXMW2C.js";
3
+ } from "./chunk-WAKQYJ6T.js";
4
4
  import {
5
5
  NetworkError
6
6
  } from "./chunk-7QLSKOSU.js";
@@ -9,11 +9,11 @@ import {
9
9
  } from "./chunk-KZERVKTD.js";
10
10
  import {
11
11
  getBaseUrl
12
- } from "./chunk-4WHNRAOK.js";
12
+ } from "./chunk-75MJRC5I.js";
13
13
  import {
14
14
  isValidApiKey,
15
15
  normalizeKeyScope
16
- } from "./chunk-VBPASZU7.js";
16
+ } from "./chunk-GFXZDU4V.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,6 +1,6 @@
1
1
  import {
2
2
  guardBinary
3
- } from "./chunk-CEF4UQ3X.js";
3
+ } from "./chunk-E7EOUEGQ.js";
4
4
 
5
5
  // src/bell/install.ts
6
6
  import { join } from "path";