pushary 1.9.46 → 1.9.47

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 (103) hide show
  1. package/CHANGELOG.md +7 -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 +142 -76
  6. package/dist/bin/pushary-codex-bridge.js +18 -18
  7. package/dist/bin/pushary-codex-hook.js +30 -30
  8. package/dist/bin/pushary-codex-session.js +22 -19
  9. package/dist/bin/pushary-codex.js +12 -12
  10. package/dist/bin/pushary-connect.js +24 -24
  11. package/dist/bin/pushary-cowork.js +5 -5
  12. package/dist/bin/pushary-daemon.js +32 -32
  13. package/dist/bin/pushary-disconnect.js +37 -30
  14. package/dist/bin/pushary-doctor.js +34 -34
  15. package/dist/bin/pushary-elicitation-hook.js +25 -25
  16. package/dist/bin/pushary-gemini-bridge.js +13 -13
  17. package/dist/bin/pushary-gemini-hook.js +27 -27
  18. package/dist/bin/pushary-hook.js +29 -29
  19. package/dist/bin/pushary-login.js +12 -12
  20. package/dist/bin/pushary-logout.js +24 -24
  21. package/dist/bin/pushary-mcp.js +9 -9
  22. package/dist/bin/pushary-mode.js +12 -12
  23. package/dist/bin/pushary-notification-hook.js +24 -24
  24. package/dist/bin/pushary-opencode-hook.js +26 -26
  25. package/dist/bin/pushary-permission-denied-hook.js +29 -29
  26. package/dist/bin/pushary-permission-hook.js +28 -28
  27. package/dist/bin/pushary-post-hook.js +24 -24
  28. package/dist/bin/pushary-prompt-hook.js +24 -24
  29. package/dist/bin/pushary-session-end-hook.js +24 -24
  30. package/dist/bin/pushary-session-start-hook.js +28 -28
  31. package/dist/bin/pushary-setup.js +36 -36
  32. package/dist/bin/pushary-stats.js +5 -5
  33. package/dist/bin/pushary-status.js +26 -26
  34. package/dist/bin/pushary-stop-hook.js +24 -24
  35. package/dist/bin/pushary-stopfailure-hook.js +24 -24
  36. package/dist/bin/pushary-suggestions.js +12 -12
  37. package/dist/bin/pushary-transcript-register.js +17 -17
  38. package/dist/bin/pushary-transcripts.js +7 -7
  39. package/dist/bin/pushary-upgrade.js +30 -30
  40. package/dist/bin/pushary-wait.js +12 -12
  41. package/dist/bin/pushary.js +6 -6
  42. package/dist/{chunk-VTF7LKDB.js → chunk-3F3JHJPS.js} +5 -5
  43. package/dist/{chunk-NO3ADUD4.js → chunk-3KSN65VJ.js} +1 -1
  44. package/dist/{chunk-SEKQAYVP.js → chunk-3RAWTKWW.js} +2 -2
  45. package/dist/{chunk-ZGGSQTCO.js → chunk-4MJ46JA7.js} +1 -1
  46. package/dist/{chunk-FQW7AV6U.js → chunk-6VFP72GX.js} +3 -3
  47. package/dist/{chunk-NWZZTHWF.js → chunk-6W64IVG3.js} +1 -1
  48. package/dist/{chunk-5O6GB64K.js → chunk-6WFJCUWO.js} +2 -2
  49. package/dist/{chunk-GG6C4CHH.js → chunk-7JUISFZ7.js} +2 -2
  50. package/dist/{chunk-MOUUDZOZ.js → chunk-7VLY6RHG.js} +1 -1
  51. package/dist/{chunk-W7MXYDGP.js → chunk-ADKWE35P.js} +2 -2
  52. package/dist/{chunk-ON2WCBIN.js → chunk-AIDH46DC.js} +10 -10
  53. package/dist/{chunk-FQWI6XQG.js → chunk-BS457P5Z.js} +1 -1
  54. package/dist/{chunk-I5EQ5NJD.js → chunk-CVCOZWSB.js} +8 -8
  55. package/dist/{chunk-UCRG5QGN.js → chunk-DDS472RO.js} +1 -1
  56. package/dist/{chunk-HTQPDODV.js → chunk-DPF6WDCX.js} +4 -4
  57. package/dist/{chunk-EKDSF3IX.js → chunk-DRQVZHWE.js} +1 -1
  58. package/dist/{chunk-EDSXF7NV.js → chunk-DY5PQSQB.js} +109 -30
  59. package/dist/{chunk-EP4MD6TH.js → chunk-FDDZEYGM.js} +5 -5
  60. package/dist/{chunk-UP2RNIHL.js → chunk-FWQ2O5BI.js} +4 -4
  61. package/dist/{chunk-KJNWVAS6.js → chunk-FY6ZTTDQ.js} +3 -3
  62. package/dist/{chunk-UGXRDY3O.js → chunk-GLVPA4EK.js} +5 -5
  63. package/dist/{chunk-MBB4XJIN.js → chunk-GOTCSFLS.js} +7 -7
  64. package/dist/{chunk-NULG2ZUG.js → chunk-J3CYUXGX.js} +4 -4
  65. package/dist/{chunk-JPGY5LSF.js → chunk-K2KGB7TK.js} +5 -5
  66. package/dist/{chunk-5NXD6ZHQ.js → chunk-K2YVKKYV.js} +2 -2
  67. package/dist/{chunk-2X3PPRNC.js → chunk-KQDHOQRG.js} +3 -3
  68. package/dist/{chunk-PZPYL65I.js → chunk-LFMC5AE2.js} +1 -1
  69. package/dist/{chunk-P2FHZ65U.js → chunk-LQRPQXAG.js} +1 -1
  70. package/dist/{chunk-2PTJHEX4.js → chunk-M47U54AO.js} +2 -2
  71. package/dist/{chunk-EW52AGOV.js → chunk-MCL5IS6A.js} +4 -4
  72. package/dist/{chunk-2IFTZZ5K.js → chunk-MM472M4O.js} +1 -1
  73. package/dist/{chunk-CJKEU4EZ.js → chunk-MZQ5M6F6.js} +4 -4
  74. package/dist/{chunk-LEMQA4HM.js → chunk-N6JNKOKJ.js} +5 -5
  75. package/dist/{chunk-T623UG5T.js → chunk-OL7QCMQK.js} +3 -3
  76. package/dist/{chunk-UI3WDOV3.js → chunk-P4RKBBHE.js} +2 -2
  77. package/dist/{chunk-35TUEZ5E.js → chunk-PHKISQPB.js} +3 -3
  78. package/dist/{chunk-7XSIUY5F.js → chunk-PRQMACC7.js} +1 -1
  79. package/dist/{chunk-GQZF6DPL.js → chunk-R7AMICLS.js} +1 -1
  80. package/dist/{chunk-CA6F44OF.js → chunk-RDVDW3WK.js} +5 -5
  81. package/dist/{chunk-BKJP2MQN.js → chunk-ROQSYB3T.js} +6 -6
  82. package/dist/{chunk-LA4S2KIM.js → chunk-S3657KK2.js} +3 -3
  83. package/dist/{chunk-2VNHP2OE.js → chunk-T3QKLW3M.js} +1 -1
  84. package/dist/{chunk-OI6YNNI5.js → chunk-TP5SLM2I.js} +8 -4
  85. package/dist/{chunk-2ZD53EQW.js → chunk-TSI25WVW.js} +2 -2
  86. package/dist/{chunk-XAMFOUXA.js → chunk-UFTPB3LZ.js} +2 -2
  87. package/dist/{chunk-ELLN4XAF.js → chunk-UIPZSSBC.js} +2 -2
  88. package/dist/{chunk-WN3MDHAM.js → chunk-VE4LQ23C.js} +1 -1
  89. package/dist/{chunk-ULEX43F7.js → chunk-VQZ4FP6Z.js} +1 -1
  90. package/dist/{chunk-G227SH2O.js → chunk-VVJUH4SV.js} +2 -2
  91. package/dist/{chunk-FMDGUCER.js → chunk-WHHNQA4C.js} +19 -10
  92. package/dist/{chunk-ZYS4UHEC.js → chunk-WOE46HSM.js} +4 -4
  93. package/dist/{chunk-HX34VBPE.js → chunk-X6ILS4XE.js} +4 -4
  94. package/dist/{chunk-LNO25UX4.js → chunk-YCKGZOKV.js} +6 -6
  95. package/dist/{chunk-2UABJ75E.js → chunk-YENJWLN4.js} +2 -2
  96. package/dist/{chunk-PGULTXDJ.js → chunk-ZHZTFA76.js} +5 -5
  97. package/dist/{chunk-WYD4PYTL.js → chunk-ZR2EPWW4.js} +9 -9
  98. package/dist/{global-upgrade-A7EADTOL.js → global-upgrade-KHP36X27.js} +6 -6
  99. package/dist/{paths-UIPHTZH4.js → paths-63XAPFWJ.js} +2 -2
  100. package/dist/{reapply-JAT4DS6G.js → reapply-Y2EXWAWE.js} +20 -20
  101. package/dist/src/index.js +19 -19
  102. package/dist/{upgrade-lock-YUSXU5I5.js → upgrade-lock-RF3LR2HC.js} +3 -3
  103. package/package.json +1 -1
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  pusharyDir
3
- } from "./chunk-EW52AGOV.js";
3
+ } from "./chunk-MCL5IS6A.js";
4
4
  import {
5
5
  readJsonSafe
6
6
  } from "./chunk-AQFEP65J.js";
7
7
  import {
8
8
  isRecord
9
- } from "./chunk-EDSXF7NV.js";
9
+ } from "./chunk-DY5PQSQB.js";
10
10
 
11
11
  // src/process-ownership.ts
12
12
  import { createHash, randomUUID } from "crypto";
@@ -5,16 +5,16 @@ import {
5
5
  import {
6
6
  NOTIFICATION_MATCHED_TYPES,
7
7
  POSTTOOLUSE_MIRRORED_TOOLS
8
- } from "./chunk-NWZZTHWF.js";
8
+ } from "./chunk-6W64IVG3.js";
9
9
  import {
10
10
  isProtectedByScope,
11
11
  registerHookEntry
12
- } from "./chunk-EW52AGOV.js";
12
+ } from "./chunk-MCL5IS6A.js";
13
13
  import {
14
14
  CLAUDE_PRETOOLUSE_MATCHER,
15
15
  HOOK_BUDGETS,
16
16
  HOOK_LOCATOR_BINARY
17
- } from "./chunk-EDSXF7NV.js";
17
+ } from "./chunk-DY5PQSQB.js";
18
18
 
19
19
  // src/gemini-config.ts
20
20
  var GEMINI_HOOK_BINARY = "pushary-gemini-hook";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  NPX_LATEST_COMMAND
3
- } from "./chunk-WN3MDHAM.js";
3
+ } from "./chunk-VE4LQ23C.js";
4
4
 
5
5
  // src/config.ts
6
6
  import { readFileSync } from "fs";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  DEFAULT_SESSION
3
- } from "./chunk-WYD4PYTL.js";
3
+ } from "./chunk-ZR2EPWW4.js";
4
4
 
5
5
  // src/answer.ts
6
6
  var isDeferAnswer = (value) => value === "defer";
@@ -1,17 +1,17 @@
1
1
  import {
2
2
  readControlMode
3
- } from "./chunk-LA4S2KIM.js";
3
+ } from "./chunk-S3657KK2.js";
4
4
  import {
5
5
  needsShell,
6
6
  spawnClaude
7
7
  } from "./chunk-XHKBHWLX.js";
8
8
  import {
9
9
  getMachineId
10
- } from "./chunk-ULEX43F7.js";
10
+ } from "./chunk-VQZ4FP6Z.js";
11
11
  import {
12
12
  pusharyDir,
13
13
  resolveGlobalBinary
14
- } from "./chunk-EW52AGOV.js";
14
+ } from "./chunk-MCL5IS6A.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-7XSIUY5F.js";
23
+ } from "./chunk-PRQMACC7.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-EDSXF7NV.js";
31
+ } from "./chunk-DY5PQSQB.js";
32
32
 
33
33
  // src/daemon-lifecycle.ts
34
34
  import { dirname, join, win32 as win32Path } from "path";
@@ -4,26 +4,26 @@ import {
4
4
  hasDaemonServiceDefinition,
5
5
  readDaemonNeedsLogin,
6
6
  readDaemonStatus
7
- } from "./chunk-CA6F44OF.js";
7
+ } from "./chunk-RDVDW3WK.js";
8
8
  import {
9
9
  readControlMode,
10
10
  readKeySource
11
- } from "./chunk-LA4S2KIM.js";
11
+ } from "./chunk-S3657KK2.js";
12
12
  import {
13
13
  detectProviderLiveCapabilities,
14
14
  expectedLaunchCapabilities,
15
15
  hasSpawnProvider,
16
16
  resolveControlPolicy
17
- } from "./chunk-2PTJHEX4.js";
17
+ } from "./chunk-M47U54AO.js";
18
18
  import {
19
19
  getMachineId
20
- } from "./chunk-ULEX43F7.js";
20
+ } from "./chunk-VQZ4FP6Z.js";
21
21
  import {
22
22
  getBaseUrl
23
- } from "./chunk-7XSIUY5F.js";
23
+ } from "./chunk-PRQMACC7.js";
24
24
  import {
25
25
  getPackageVersion
26
- } from "./chunk-EDSXF7NV.js";
26
+ } from "./chunk-DY5PQSQB.js";
27
27
 
28
28
  // src/machines.ts
29
29
  import { hostname } from "os";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  resolveInstallSourceFor
3
- } from "./chunk-W7MXYDGP.js";
3
+ } from "./chunk-ADKWE35P.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-7XSIUY5F.js";
12
+ } from "./chunk-PRQMACC7.js";
13
13
  import {
14
14
  API_KEY_PREFIX_PATTERN,
15
15
  isRecord
16
- } from "./chunk-EDSXF7NV.js";
16
+ } from "./chunk-DY5PQSQB.js";
17
17
 
18
18
  // src/shell-alias.ts
19
19
  import { homedir } from "os";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getBaseUrl
3
- } from "./chunk-7XSIUY5F.js";
3
+ } from "./chunk-PRQMACC7.js";
4
4
 
5
5
  // src/transcript-api.ts
6
6
  var fetchTranscriptRecipients = async (apiKey, baseUrl = getBaseUrl()) => {
@@ -3,18 +3,18 @@ import {
3
3
  addGeminiMcpServer,
4
4
  removeGeminiMcpServer,
5
5
  supportedClaudeEvents
6
- } from "./chunk-35TUEZ5E.js";
6
+ } from "./chunk-PHKISQPB.js";
7
7
  import {
8
8
  CLAUDE_CODE_AGENT,
9
9
  compatibleToolLookup
10
- } from "./chunk-WYD4PYTL.js";
10
+ } from "./chunk-ZR2EPWW4.js";
11
11
  import {
12
12
  guardBinary,
13
13
  guardBinaryRefusing,
14
14
  holdBudgetOf,
15
15
  isProtectedByScope,
16
16
  registerHookEntry
17
- } from "./chunk-EW52AGOV.js";
17
+ } from "./chunk-MCL5IS6A.js";
18
18
  import {
19
19
  HOOK_LOCATOR_BINARY,
20
20
  PHONE_ANSWERED_TOOLS,
@@ -25,7 +25,7 @@ import {
25
25
  pusharyMissingReason,
26
26
  refusalOutput,
27
27
  withHookHoldBudget
28
- } from "./chunk-EDSXF7NV.js";
28
+ } from "./chunk-DY5PQSQB.js";
29
29
 
30
30
  // src/claude-config.ts
31
31
  import { join } from "path";
@@ -284,6 +284,9 @@ var compatibleTargetPaths = (profile, home) => compatibleTargetFiles(profile).ma
284
284
  var compatibleConfigFile = (profile, home) => compatibleFilePath(profile.configFile, home);
285
285
  var compatibleMcpFile = (profile, home) => profile.mcp ? compatibleFilePath(profile.mcp.file, home) : null;
286
286
  var compatibleInstructionsFile = (profile, home) => profile.instructions ? compatibleFilePath(profile.instructions.file, home) : null;
287
+ var PUSHARY_OWNED_FILE_STEM = "pushary";
288
+ var isPusharyOwnedFile = (file) => file.path.at(-1)?.split(".")[0] === PUSHARY_OWNED_FILE_STEM;
289
+ var isEmptiedPusharyOwnedDocument = (file, document) => isPusharyOwnedFile(file) && Object.keys(document).length === 0;
287
290
  var asRecord2 = (value) => value && typeof value === "object" && !Array.isArray(value) ? value : void 0;
288
291
  var ensureRecord2 = (target, key) => {
289
292
  const existing = asRecord2(target[key]);
@@ -490,6 +493,7 @@ export {
490
493
  compatibleConfigFile,
491
494
  compatibleMcpFile,
492
495
  compatibleInstructionsFile,
496
+ isEmptiedPusharyOwnedDocument,
493
497
  compatibleHookEvents,
494
498
  addCompatibleToolPermissions,
495
499
  addCompatibleHooks,
@@ -8,10 +8,10 @@ import {
8
8
  codexHooksJsonIn,
9
9
  isPusharyCodexCommand,
10
10
  resolvePathBinary
11
- } from "./chunk-EW52AGOV.js";
11
+ } from "./chunk-MCL5IS6A.js";
12
12
  import {
13
13
  getPackageVersion
14
- } from "./chunk-EDSXF7NV.js";
14
+ } from "./chunk-DY5PQSQB.js";
15
15
 
16
16
  // src/codex-app-server.ts
17
17
  import { existsSync, realpathSync } from "fs";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  parseSseMessages
3
- } from "./chunk-FQW7AV6U.js";
3
+ } from "./chunk-6VFP72GX.js";
4
4
  import {
5
5
  NPX_LATEST_COMMAND
6
- } from "./chunk-WN3MDHAM.js";
6
+ } from "./chunk-VE4LQ23C.js";
7
7
 
8
8
  // src/mcp-stdio-bridge.ts
9
9
  var MCP_BRIDGE_BINARY = "pushary-mcp";
@@ -3,11 +3,11 @@ import {
3
3
  decodePublicKey,
4
4
  generateSessionKey,
5
5
  wrapSessionKey
6
- } from "./chunk-EKDSF3IX.js";
6
+ } from "./chunk-DRQVZHWE.js";
7
7
  import {
8
8
  fetchTranscriptRecipients,
9
9
  uploadTranscriptRecords
10
- } from "./chunk-2VNHP2OE.js";
10
+ } from "./chunk-T3QKLW3M.js";
11
11
 
12
12
  // src/live-session.ts
13
13
  var MAX_TRANSCRIPT_QUEUE = 100;
@@ -2,7 +2,7 @@ import {
2
2
  DISCONNECT_AGENT_IDS,
3
3
  SETUP_AGENT_CHOICES,
4
4
  isApprovalMode
5
- } from "./chunk-EDSXF7NV.js";
5
+ } from "./chunk-DY5PQSQB.js";
6
6
 
7
7
  // src/cli/mode-request.ts
8
8
  var parseDuration = (value) => {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  pusharyDir
3
- } from "./chunk-EW52AGOV.js";
3
+ } from "./chunk-MCL5IS6A.js";
4
4
  import {
5
5
  writeFileAtomic
6
6
  } from "./chunk-AQFEP65J.js";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  CODEX_HOOK_STATUS
3
- } from "./chunk-2ZD53EQW.js";
3
+ } from "./chunk-TSI25WVW.js";
4
4
  import {
5
5
  NPX_LATEST_COMMAND
6
- } from "./chunk-WN3MDHAM.js";
6
+ } from "./chunk-VE4LQ23C.js";
7
7
 
8
8
  // src/setup/codex-trust.ts
9
9
  var CODEX_TRUST_TELEMETRY = {
@@ -4,13 +4,13 @@ import {
4
4
  postLiveSession,
5
5
  postLiveSessionUntilAccepted,
6
6
  startLiveSessionHeartbeat
7
- } from "./chunk-ELLN4XAF.js";
7
+ } from "./chunk-UIPZSSBC.js";
8
8
  import {
9
9
  SESSION_IDLE_TIMEOUT_MS,
10
10
  describeIdleWindow,
11
11
  idleDeadlinePassed,
12
12
  startProcessOwnership
13
- } from "./chunk-UI3WDOV3.js";
13
+ } from "./chunk-P4RKBBHE.js";
14
14
  import {
15
15
  spawnClaude
16
16
  } from "./chunk-XHKBHWLX.js";
@@ -21,11 +21,11 @@ import {
21
21
  repoKeyFor,
22
22
  withdrawQuestion,
23
23
  writeDegraded
24
- } from "./chunk-UGXRDY3O.js";
24
+ } from "./chunk-GLVPA4EK.js";
25
25
  import {
26
26
  callMcpTool,
27
27
  isRetryable
28
- } from "./chunk-FQW7AV6U.js";
28
+ } from "./chunk-6VFP72GX.js";
29
29
  import {
30
30
  AGENT_QUESTION_DESCRIPTION_MAX,
31
31
  AGENT_QUESTION_HEADER_MAX,
@@ -33,7 +33,9 @@ import {
33
33
  ASK_CONTEXT_MAX,
34
34
  ASK_QUESTION_MAX,
35
35
  CODEX_NATIVE_APPROVAL_CAPABILITY,
36
+ CODEX_NATIVE_APPROVAL_CHOICES,
36
37
  CODEX_NATIVE_APPROVAL_METHODS,
38
+ CODEX_NATIVE_APPROVAL_REPLIES,
37
39
  PERSONAL_QUESTION_CAPABILITY,
38
40
  canonicalJsonText,
39
41
  codexNativeApprovalResponse,
@@ -44,7 +46,7 @@ import {
44
46
  parseCodexQuestions,
45
47
  planElicitationAsk,
46
48
  readElicitationFields
47
- } from "./chunk-EDSXF7NV.js";
49
+ } from "./chunk-DY5PQSQB.js";
48
50
 
49
51
  // src/codex-question-owner.ts
50
52
  import { createHash } from "crypto";
@@ -164,7 +166,7 @@ var CodexNativeApprovals = class {
164
166
  this.pending.delete(id);
165
167
  this.retired.add(id);
166
168
  if (!nativeClosed && !this.closed && !pending.replied && !this.options.shared) {
167
- this.options.reply(id, codexNativeApprovalResponse(pending.approval, "Deny"));
169
+ this.options.reply(id, codexNativeApprovalResponse(pending.approval, CODEX_NATIVE_APPROVAL_CHOICES.deny));
168
170
  pending.replied = true;
169
171
  }
170
172
  const task = this.cleanup(pending, nativeClosed).finally(() => {
@@ -181,6 +183,7 @@ var CodexNativeApprovals = class {
181
183
  correlationId: pending.correlationId,
182
184
  claimId: pending.claimId,
183
185
  localSurfaceAvailable: this.options.shared,
186
+ acceptsAllowReply: true,
184
187
  cwd: pending.cwd,
185
188
  repoKey: pending.repoKey
186
189
  });
@@ -213,12 +216,18 @@ var CodexNativeApprovals = class {
213
216
  pending.creating = false;
214
217
  }
215
218
  if (signal.aborted) return;
216
- if (created.kind === "deny") {
217
- this.options.reply(pending.owner.requestId, codexNativeApprovalResponse(pending.approval, "Deny"));
219
+ if (created.kind === CODEX_NATIVE_APPROVAL_REPLIES.deny) {
220
+ this.options.reply(pending.owner.requestId, codexNativeApprovalResponse(pending.approval, CODEX_NATIVE_APPROVAL_CHOICES.deny));
218
221
  pending.replied = true;
219
222
  return;
220
223
  }
221
- if (created.kind !== "ask" || !pending.correlationId) throw new Error("Native approval unavailable");
224
+ if (created.kind === CODEX_NATIVE_APPROVAL_REPLIES.allow && pending.approval.options.includes(CODEX_NATIVE_APPROVAL_CHOICES.once)) {
225
+ this.options.reply(pending.owner.requestId, codexNativeApprovalResponse(pending.approval, CODEX_NATIVE_APPROVAL_CHOICES.once));
226
+ pending.replied = true;
227
+ return;
228
+ }
229
+ if (created.kind === CODEX_NATIVE_APPROVAL_REPLIES.native && this.options.shared) return;
230
+ if (created.kind !== CODEX_NATIVE_APPROVAL_REPLIES.ask || !pending.correlationId) throw new Error("Native approval unavailable");
222
231
  let answer = null;
223
232
  while (!signal.aborted) {
224
233
  const result = await callMcpTool(
@@ -245,7 +254,7 @@ var CodexNativeApprovals = class {
245
254
  await this.post(pending, "reply_queued", AbortSignal.timeout(3e3));
246
255
  } catch {
247
256
  if (!pending.controller.signal.aborted && !this.options.signal.aborted && !this.closed && !this.options.shared && !pending.replied) {
248
- this.options.reply(pending.owner.requestId, codexNativeApprovalResponse(pending.approval, "Deny"));
257
+ this.options.reply(pending.owner.requestId, codexNativeApprovalResponse(pending.approval, CODEX_NATIVE_APPROVAL_CHOICES.deny));
249
258
  pending.replied = true;
250
259
  }
251
260
  if (!pending.controller.signal.aborted && !this.options.signal.aborted) writeDegraded("questions", { reason: "native_approval_unavailable", fallback: this.options.shared ? "native client" : "refused", event: pending.owner.method });
@@ -1,16 +1,16 @@
1
1
  import {
2
2
  openCodeConfigDirFrom
3
- } from "./chunk-VTF7LKDB.js";
3
+ } from "./chunk-3F3JHJPS.js";
4
4
  import {
5
5
  grokHome
6
- } from "./chunk-OI6YNNI5.js";
6
+ } from "./chunk-TP5SLM2I.js";
7
7
  import {
8
8
  codexHomeFrom,
9
9
  resolvePathBinary
10
- } from "./chunk-EW52AGOV.js";
10
+ } from "./chunk-MCL5IS6A.js";
11
11
  import {
12
12
  HOOK_COMPATIBLE_PROFILES
13
- } from "./chunk-EDSXF7NV.js";
13
+ } from "./chunk-DY5PQSQB.js";
14
14
 
15
15
  // src/hermes-config.ts
16
16
  import { execFileSync } from "child_process";
@@ -2,25 +2,25 @@ import {
2
2
  SIGNED_OUT_ON_MAC_MESSAGE,
3
3
  describeSignedOutKey,
4
4
  readSignedOutDiagnosis
5
- } from "./chunk-5O6GB64K.js";
5
+ } from "./chunk-6WFJCUWO.js";
6
6
  import {
7
7
  createIo
8
8
  } from "./chunk-FO3MDD26.js";
9
9
  import {
10
10
  readKeySource
11
- } from "./chunk-LA4S2KIM.js";
11
+ } from "./chunk-S3657KK2.js";
12
12
  import {
13
13
  absoluteUrl,
14
14
  checkApiKey,
15
15
  describeKeyCheck,
16
16
  keyCheckFromResponse
17
- } from "./chunk-2X3PPRNC.js";
17
+ } from "./chunk-KQDHOQRG.js";
18
18
  import {
19
19
  EXIT
20
20
  } from "./chunk-KZERVKTD.js";
21
21
  import {
22
22
  getBaseUrl
23
- } from "./chunk-7XSIUY5F.js";
23
+ } from "./chunk-PRQMACC7.js";
24
24
 
25
25
  // src/cli/report-key.ts
26
26
  var { dim, yellow } = createIo();
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  announceSubscriptionRequired,
3
3
  isDeferAnswer
4
- } from "./chunk-GQZF6DPL.js";
4
+ } from "./chunk-R7AMICLS.js";
5
5
  import {
6
6
  AUTO_DECISION_WINDOW_MS,
7
7
  DEFAULT_SESSION,
@@ -10,24 +10,24 @@ import {
10
10
  permissionDeniedAction,
11
11
  releaseThrottle,
12
12
  reportEvent
13
- } from "./chunk-WYD4PYTL.js";
13
+ } from "./chunk-ZR2EPWW4.js";
14
14
  import {
15
15
  askUser,
16
16
  isDecisionStopped,
17
17
  waitForQuestion
18
- } from "./chunk-UGXRDY3O.js";
18
+ } from "./chunk-GLVPA4EK.js";
19
19
  import {
20
20
  SubscriptionRequiredError
21
- } from "./chunk-FQW7AV6U.js";
21
+ } from "./chunk-6VFP72GX.js";
22
22
  import {
23
23
  getMachineId
24
- } from "./chunk-ULEX43F7.js";
24
+ } from "./chunk-VQZ4FP6Z.js";
25
25
  import {
26
26
  machineDecisionFor,
27
27
  parseAgentQuestionAnswers,
28
28
  shouldDeferToNativeMode,
29
29
  wireVerdictFor
30
- } from "./chunk-EDSXF7NV.js";
30
+ } from "./chunk-DY5PQSQB.js";
31
31
 
32
32
  // src/machine-decision-audit.ts
33
33
  import { basename } from "path";
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-POFBE6ZY.js";
4
4
  import {
5
5
  autoUpdateState
6
- } from "./chunk-EW52AGOV.js";
6
+ } from "./chunk-MCL5IS6A.js";
7
7
  import {
8
8
  readJsonSafe,
9
9
  writeJsonAtomic
@@ -15,7 +15,7 @@ import {
15
15
  globalUpgradeEntry,
16
16
  isAutoUpdateResult,
17
17
  ownPackageRoot
18
- } from "./chunk-EDSXF7NV.js";
18
+ } from "./chunk-DY5PQSQB.js";
19
19
 
20
20
  // src/auto-update.ts
21
21
  import { spawn } from "child_process";
@@ -4,7 +4,7 @@ import {
4
4
  forkFinishWithUpgradeLock,
5
5
  installWithUpgradeLock,
6
6
  releaseAutoUpdateLock
7
- } from "./chunk-FQWI6XQG.js";
7
+ } from "./chunk-BS457P5Z.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-2UABJ75E.js";
17
+ } from "./chunk-YENJWLN4.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-EW52AGOV.js";
30
+ } from "./chunk-MCL5IS6A.js";
31
31
  import {
32
32
  NPX_LATEST_COMMAND
33
- } from "./chunk-WN3MDHAM.js";
33
+ } from "./chunk-VE4LQ23C.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-EDSXF7NV.js";
42
+ } from "./chunk-DY5PQSQB.js";
43
43
 
44
44
  // src/global-upgrade.ts
45
45
  import { existsSync } from "fs";
@@ -2,10 +2,10 @@ import {
2
2
  IDLE_PROMPT_NOTIFICATION,
3
3
  NOTIFICATION_PUSH_TYPES,
4
4
  POSTTOOLUSE_MIRROR_ONLY_TOOLS
5
- } from "./chunk-NWZZTHWF.js";
5
+ } from "./chunk-6W64IVG3.js";
6
6
  import {
7
7
  reportedInstallSource
8
- } from "./chunk-W7MXYDGP.js";
8
+ } from "./chunk-ADKWE35P.js";
9
9
  import {
10
10
  cancelQuestion,
11
11
  clientErrorKindOf,
@@ -14,29 +14,30 @@ import {
14
14
  reportClientError,
15
15
  sendNotification,
16
16
  waitForAnswer
17
- } from "./chunk-UGXRDY3O.js";
17
+ } from "./chunk-GLVPA4EK.js";
18
18
  import {
19
19
  withRetry
20
- } from "./chunk-FQW7AV6U.js";
20
+ } from "./chunk-6VFP72GX.js";
21
21
  import {
22
22
  getMachineId
23
- } from "./chunk-ULEX43F7.js";
23
+ } from "./chunk-VQZ4FP6Z.js";
24
24
  import {
25
25
  canonicalJson
26
- } from "./chunk-EW52AGOV.js";
26
+ } from "./chunk-MCL5IS6A.js";
27
27
  import {
28
28
  writeFileAtomic
29
29
  } from "./chunk-AQFEP65J.js";
30
30
  import {
31
31
  getApiKey,
32
32
  getBaseUrl
33
- } from "./chunk-7XSIUY5F.js";
33
+ } from "./chunk-PRQMACC7.js";
34
34
  import {
35
35
  ACTION_BODY_MAX,
36
36
  AGENTS,
37
37
  AGENT_LABELS_BY_TYPE,
38
38
  BLANK_TASK_INPUT_TOOL,
39
39
  BLOCKED_ACTION_GRANT_TTL_SECONDS,
40
+ CODEX_SHELL_COMMAND_FLAGS,
40
41
  DECISION_LINE_MAX,
41
42
  FILE_TARGET_TOOLS,
42
43
  GATE_MAX_TOOL_INPUTS,
@@ -63,7 +64,7 @@ import {
63
64
  toToolLookup,
64
65
  truncateLine,
65
66
  unansweredRefusalReason
66
- } from "./chunk-EDSXF7NV.js";
67
+ } from "./chunk-DY5PQSQB.js";
67
68
 
68
69
  // ../hook-mapping/src/describe.ts
69
70
  import { isAbsolute, relative, resolve } from "path";
@@ -682,7 +683,6 @@ var CODEX_GUARDIAN_THREAD_SOURCE = "guardian_review";
682
683
  var CODEX_PLANNED_ACTION_MARKER = "Planned action JSON:\n";
683
684
  var CODEX_APPROVAL_REQUEST_END = ">>> APPROVAL REQUEST END";
684
685
  var CODEX_SHELL_TOOL = "exec_command";
685
- var CODEX_SHELL_COMMAND_FLAGS = ["-lc", "-c"];
686
686
  var nonEmptyString = (value) => typeof value === "string" && value.length > 0 ? value : void 0;
687
687
  var isTimestamp = (value) => typeof value === "string" && Number.isFinite(Date.parse(value));
688
688
  var readCodexTurnContext = (line) => {
@@ -5,15 +5,15 @@ import {
5
5
  readGlobalUpgradeSubject,
6
6
  upgradeInstalledPackage,
7
7
  withUpgradeLock
8
- } from "./chunk-PGULTXDJ.js";
9
- import "./chunk-FQWI6XQG.js";
10
- import "./chunk-2UABJ75E.js";
8
+ } from "./chunk-ZHZTFA76.js";
9
+ import "./chunk-BS457P5Z.js";
10
+ import "./chunk-YENJWLN4.js";
11
11
  import "./chunk-POFBE6ZY.js";
12
12
  import "./chunk-KZERVKTD.js";
13
- import "./chunk-EW52AGOV.js";
13
+ import "./chunk-MCL5IS6A.js";
14
14
  import "./chunk-AQFEP65J.js";
15
- import "./chunk-WN3MDHAM.js";
16
- import "./chunk-EDSXF7NV.js";
15
+ import "./chunk-VE4LQ23C.js";
16
+ import "./chunk-DY5PQSQB.js";
17
17
  export {
18
18
  finishGlobalUpgrade,
19
19
  finishUpgradeWithLock,
@@ -32,8 +32,8 @@ import {
32
32
  pusharyDir,
33
33
  vscodePluginDir,
34
34
  vscodePluginMcp
35
- } from "./chunk-EW52AGOV.js";
36
- import "./chunk-EDSXF7NV.js";
35
+ } from "./chunk-MCL5IS6A.js";
36
+ import "./chunk-DY5PQSQB.js";
37
37
  export {
38
38
  autoUpdateLock,
39
39
  autoUpdateLog,