@pushary/agent-hooks 1.9.71 → 1.9.73

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 (127) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/{api-HEIRLMTZ.js → api-JVWXPKEW.js} +10 -10
  3. package/dist/bin/pushary-bell-hook.js +25 -25
  4. package/dist/bin/pushary-bell.js +10 -10
  5. package/dist/bin/pushary-claude.js +202 -67
  6. package/dist/bin/pushary-clean.js +33 -33
  7. package/dist/bin/pushary-codex-bridge.js +23 -21
  8. package/dist/bin/pushary-codex-hook.js +30 -30
  9. package/dist/bin/pushary-codex-session.js +8 -8
  10. package/dist/bin/pushary-codex.js +13 -13
  11. package/dist/bin/pushary-connect.js +26 -26
  12. package/dist/bin/pushary-cowork.js +5 -5
  13. package/dist/bin/pushary-daemon.js +38 -38
  14. package/dist/bin/pushary-disconnect.js +25 -25
  15. package/dist/bin/pushary-doctor.js +41 -41
  16. package/dist/bin/pushary-elicitation-hook.js +25 -25
  17. package/dist/bin/pushary-gemini-bridge.js +45 -48
  18. package/dist/bin/pushary-gemini-hook.js +27 -27
  19. package/dist/bin/pushary-hook.js +29 -29
  20. package/dist/bin/pushary-login.js +20 -20
  21. package/dist/bin/pushary-logout.js +24 -24
  22. package/dist/bin/pushary-mcp.js +11 -11
  23. package/dist/bin/pushary-mode.js +15 -15
  24. package/dist/bin/pushary-notification-hook.js +24 -24
  25. package/dist/bin/pushary-opencode-hook.js +26 -26
  26. package/dist/bin/pushary-permission-denied-hook.js +29 -29
  27. package/dist/bin/pushary-permission-hook.js +29 -29
  28. package/dist/bin/pushary-post-hook.js +24 -24
  29. package/dist/bin/pushary-prompt-hook.js +24 -24
  30. package/dist/bin/pushary-session-end-hook.js +26 -26
  31. package/dist/bin/pushary-session-start-hook.js +34 -34
  32. package/dist/bin/pushary-setup.js +47 -46
  33. package/dist/bin/pushary-stats.js +5 -5
  34. package/dist/bin/pushary-status.js +31 -31
  35. package/dist/bin/pushary-stop-hook.js +24 -24
  36. package/dist/bin/pushary-stopfailure-hook.js +24 -24
  37. package/dist/bin/pushary-suggestions.js +15 -15
  38. package/dist/bin/pushary-transcript-register.js +16 -16
  39. package/dist/bin/pushary-transcripts.js +20 -19
  40. package/dist/bin/pushary-upgrade.js +39 -39
  41. package/dist/bin/pushary-wait.js +15 -15
  42. package/dist/bin/pushary.js +7 -7
  43. package/dist/{chunk-EVJRITSI.js → chunk-2HFC4W6J.js} +1 -1
  44. package/dist/{chunk-4QPF4BGP.js → chunk-2JFEMKDG.js} +6 -6
  45. package/dist/{chunk-KGZH5RTB.js → chunk-2NG3ANMT.js} +6 -6
  46. package/dist/{chunk-JMACQEPU.js → chunk-2QB7HJVJ.js} +2 -2
  47. package/dist/{chunk-XJMUEOXT.js → chunk-3JJI5O5N.js} +1 -1
  48. package/dist/{chunk-BZ7XGS5L.js → chunk-3QBKMSOZ.js} +1 -1
  49. package/dist/{chunk-AN26S5DC.js → chunk-3RAWW5DH.js} +6 -6
  50. package/dist/{chunk-J7BLYQ7Z.js → chunk-4LAD5A2Q.js} +4 -4
  51. package/dist/{chunk-VSQDVH43.js → chunk-4UIR25GA.js} +1 -1
  52. package/dist/{chunk-AUOVB62W.js → chunk-56GK65Z6.js} +3 -3
  53. package/dist/{chunk-AERRQEWZ.js → chunk-7FROPPIH.js} +2 -2
  54. package/dist/{chunk-GIE7PLZD.js → chunk-7M4AA7QF.js} +4 -4
  55. package/dist/{chunk-SWQTCKLM.js → chunk-7RX5TOU3.js} +6 -6
  56. package/dist/{chunk-SMIU5URV.js → chunk-7S46LCKD.js} +2 -2
  57. package/dist/{chunk-IYMYGKFB.js → chunk-AC5TVOAH.js} +10 -11
  58. package/dist/{chunk-5NQ3SMVP.js → chunk-AJWGZJFS.js} +122 -35
  59. package/dist/{chunk-JGEPODEP.js → chunk-AVHL2ZTS.js} +85 -3
  60. package/dist/{chunk-3CN2EFKK.js → chunk-AXZ67XVN.js} +1 -1
  61. package/dist/{chunk-MZ6GL46A.js → chunk-BLX6KRK5.js} +1 -1
  62. package/dist/{chunk-ZBPBX656.js → chunk-CGWUVEOB.js} +3 -3
  63. package/dist/{chunk-YG3NFC5N.js → chunk-CMYFV3VC.js} +5 -5
  64. package/dist/{chunk-C3YAMEO2.js → chunk-DT6VCMXS.js} +2 -2
  65. package/dist/{chunk-7OYWCOVC.js → chunk-EITOMPFB.js} +4 -4
  66. package/dist/{chunk-QWCOMSDH.js → chunk-EUEGCEA7.js} +3 -3
  67. package/dist/{chunk-5WHSFMV2.js → chunk-EUHTC7K5.js} +1 -1
  68. package/dist/{chunk-HR6M44CX.js → chunk-F3WI32HG.js} +7 -7
  69. package/dist/{chunk-6W2ASRZO.js → chunk-FAKEKFCI.js} +3 -3
  70. package/dist/{chunk-FTOKESSK.js → chunk-FB262EOM.js} +1 -1
  71. package/dist/{chunk-4XFFGFHN.js → chunk-FK3JSDH5.js} +13 -13
  72. package/dist/{chunk-3FY5ZPIZ.js → chunk-GBR6E7AY.js} +1 -1
  73. package/dist/{chunk-NHC5YUH6.js → chunk-IN3MPEFA.js} +5 -5
  74. package/dist/{chunk-LA3MMHLO.js → chunk-JC7XUZST.js} +6 -3
  75. package/dist/{chunk-2XD4TTUM.js → chunk-JNTYPMVU.js} +10 -10
  76. package/dist/{chunk-B3KPRSCM.js → chunk-JWBZUTYF.js} +5 -5
  77. package/dist/{chunk-LKAO35SY.js → chunk-JYOR57ZW.js} +3 -3
  78. package/dist/{chunk-MGF7D2ZL.js → chunk-KDQLKND5.js} +36 -35
  79. package/dist/{chunk-DOMDCMGC.js → chunk-KSLBS3II.js} +5 -5
  80. package/dist/chunk-L2FQBHIR.js +74 -0
  81. package/dist/{chunk-JEZGDP55.js → chunk-N4VRSFRZ.js} +5 -5
  82. package/dist/chunk-N5P2FLOJ.js +82 -0
  83. package/dist/{chunk-D536PHXF.js → chunk-NGNBX3YH.js} +4 -4
  84. package/dist/{chunk-EZHM6I2V.js → chunk-NJSW2REO.js} +4 -4
  85. package/dist/{chunk-XSUWXBHF.js → chunk-O4EAMVSC.js} +3 -3
  86. package/dist/{chunk-YRWGCYHH.js → chunk-OJ3ZD5VX.js} +1 -1
  87. package/dist/{chunk-25W6AD3W.js → chunk-PGJMSREY.js} +6 -6
  88. package/dist/{chunk-OJFOIKRM.js → chunk-PM2MHBMF.js} +3 -3
  89. package/dist/{chunk-ITKAMUHG.js → chunk-PNXNWZ5P.js} +3 -3
  90. package/dist/{chunk-AZ56FPRG.js → chunk-PPKIL4EL.js} +1 -1
  91. package/dist/{chunk-WOZLV3LN.js → chunk-QAWWTRDD.js} +4 -4
  92. package/dist/{chunk-NPO3ZTR4.js → chunk-QMPM3CAN.js} +1 -1
  93. package/dist/{chunk-X2KK42JA.js → chunk-R5PZPROX.js} +1 -1
  94. package/dist/{chunk-T7FPZN5V.js → chunk-RZVWEDIS.js} +3 -3
  95. package/dist/{chunk-TATE22GH.js → chunk-S63VIM7E.js} +1 -1
  96. package/dist/{chunk-ZZ7VB6QC.js → chunk-S7VMHSJW.js} +3 -3
  97. package/dist/{chunk-X6CSZSSQ.js → chunk-SQ5XCMPB.js} +4 -4
  98. package/dist/{chunk-BJRLJJS2.js → chunk-TFDMJHAB.js} +1 -1
  99. package/dist/{chunk-VMQEB56V.js → chunk-TQ2L3ECX.js} +2 -2
  100. package/dist/{chunk-IPSO7DUB.js → chunk-TTGBS5JB.js} +3 -3
  101. package/dist/{chunk-YX6VQGLG.js → chunk-U3EBM73X.js} +2 -2
  102. package/dist/{chunk-LRS4TJU2.js → chunk-UIF7HWHX.js} +4 -4
  103. package/dist/{chunk-LWAYXE7G.js → chunk-UUCRWEEU.js} +2 -2
  104. package/dist/{chunk-LMP2FAS6.js → chunk-VBSPP4QY.js} +3 -3
  105. package/dist/{chunk-XZTFYFC7.js → chunk-VJUDBZGC.js} +2 -2
  106. package/dist/{chunk-ONZ3UGNY.js → chunk-W47XZJSH.js} +2 -2
  107. package/dist/{chunk-G3J5JKEJ.js → chunk-WJJVCDEU.js} +6 -6
  108. package/dist/{chunk-FA6INGK7.js → chunk-WXV7J3DG.js} +3 -3
  109. package/dist/{chunk-EBOGB7JR.js → chunk-XKQ7CQGG.js} +1 -1
  110. package/dist/{chunk-KEPESIIR.js → chunk-XMSDA5WA.js} +1 -70
  111. package/dist/{chunk-LKKIFFUC.js → chunk-YZ6DMGZZ.js} +1 -1
  112. package/dist/{chunk-YMBJU4CT.js → chunk-Z7AIYWZ2.js} +2 -2
  113. package/dist/{chunk-QSZQCKPB.js → chunk-ZBZBYUNZ.js} +5 -5
  114. package/dist/{codex-app-cards-switch-A77HUVKT.js → codex-app-cards-switch-M7VH7AZH.js} +11 -11
  115. package/dist/{codex-desktop-launch-FSHKRCRL.js → codex-desktop-launch-6DASTBBA.js} +1 -1
  116. package/dist/{codex-session-launch-VAXYRXK6.js → codex-session-launch-2XSMFA4K.js} +20 -18
  117. package/dist/{config-SMJ2QWQF.js → config-7QQOIFTW.js} +3 -3
  118. package/dist/{global-upgrade-63X4UFFP.js → global-upgrade-XAKX26AN.js} +10 -10
  119. package/dist/{identity-3L2YHAZP.js → identity-7AS5MBNM.js} +4 -4
  120. package/dist/{live-capabilities-QBQX7RFM.js → live-capabilities-DV4F7MIB.js} +5 -5
  121. package/dist/{paths-5VPGINSP.js → paths-GSMXYKT5.js} +3 -3
  122. package/dist/{reapply-MSIZJULX.js → reapply-MR7UWBXR.js} +27 -27
  123. package/dist/src/index.d.ts +2 -6
  124. package/dist/src/index.js +28 -28
  125. package/dist/{upgrade-lock-KKW6XZ7B.js → upgrade-lock-6OTHLCBZ.js} +4 -4
  126. package/dist/{usage-ICF3NG4F.js → usage-H53PO3VQ.js} +3 -3
  127. package/package.json +3 -1
@@ -3,13 +3,13 @@ import {
3
3
  loadPin,
4
4
  savePin,
5
5
  verifyRecipients
6
- } from "./chunk-FTOKESSK.js";
6
+ } from "./chunk-FB262EOM.js";
7
7
  import {
8
8
  ensureDaemonRunning
9
- } from "./chunk-G3J5JKEJ.js";
9
+ } from "./chunk-WJJVCDEU.js";
10
10
  import {
11
11
  hookOwnerOf
12
- } from "./chunk-WOZLV3LN.js";
12
+ } from "./chunk-QAWWTRDD.js";
13
13
  import {
14
14
  buildTranscriptRecords,
15
15
  decodePublicKey,
@@ -18,26 +18,26 @@ import {
18
18
  recordSealerFor,
19
19
  uploadTranscriptRecords,
20
20
  wrapSessionKey
21
- } from "./chunk-LA3MMHLO.js";
21
+ } from "./chunk-JC7XUZST.js";
22
22
  import {
23
23
  transcriptEnvironmentPreference,
24
24
  transcriptsEnabled
25
- } from "./chunk-TATE22GH.js";
25
+ } from "./chunk-S63VIM7E.js";
26
26
  import {
27
27
  readTranscriptPreference
28
- } from "./chunk-D536PHXF.js";
28
+ } from "./chunk-NGNBX3YH.js";
29
29
  import {
30
30
  claudeConfigDir,
31
31
  codexHome,
32
32
  pusharyDir
33
- } from "./chunk-SMIU5URV.js";
33
+ } from "./chunk-7S46LCKD.js";
34
34
  import {
35
35
  writeJsonAtomic
36
- } from "./chunk-T7FPZN5V.js";
36
+ } from "./chunk-RZVWEDIS.js";
37
37
  import {
38
38
  getApiKey,
39
39
  getBaseUrl
40
- } from "./chunk-X2KK42JA.js";
40
+ } from "./chunk-R5PZPROX.js";
41
41
 
42
42
  // src/transcript-registration.ts
43
43
  import { createHash } from "crypto";
@@ -462,8 +462,7 @@ var withoutTrailingSlash = (url) => url.replace(/\/+$/, "");
462
462
  var sameServer = (url, registry) => withoutTrailingSlash(url) === withoutTrailingSlash(registry.baseUrl);
463
463
  var fileFor2 = (registry, sessionId) => join3(registry.directory, `${createHash("sha256").update(accountFor(registry) + sessionId).digest("hex")}.json`);
464
464
  var permitted = (registry, raw) => raw.account === accountFor(registry) && consent(raw) && !raw.drained && (raw.source !== "claude" || !!raw.expectedSiteId || !macOwnsClaudeHooks(raw.cwd)) && (!raw.expectedSiteId || raw.expectedSiteId === raw.verifiedSiteId && !!raw.expectedBaseUrl && sameServer(raw.expectedBaseUrl, registry));
465
- var registeredTranscriptEnabled = (apiKey, sessionId) => {
466
- const registry = cliRegistry(apiKey);
465
+ var registeredTranscriptEnabled = (apiKey, sessionId, registry = cliRegistry(apiKey)) => {
467
466
  try {
468
467
  return permitted(registry, read(fileFor2(registry, sessionId)));
469
468
  } catch {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  repoKeyFor
3
- } from "./chunk-NPO3ZTR4.js";
3
+ } from "./chunk-QMPM3CAN.js";
4
4
  import {
5
5
  cancelQuestion,
6
6
  clientErrorKindOf,
@@ -8,29 +8,32 @@ import {
8
8
  reportClientError,
9
9
  sendNotification,
10
10
  waitForAnswer
11
- } from "./chunk-YG3NFC5N.js";
11
+ } from "./chunk-CMYFV3VC.js";
12
12
  import {
13
13
  withRetry
14
- } from "./chunk-GIE7PLZD.js";
14
+ } from "./chunk-7M4AA7QF.js";
15
15
  import {
16
16
  getMachineId
17
- } from "./chunk-LWAYXE7G.js";
17
+ } from "./chunk-UUCRWEEU.js";
18
18
  import {
19
19
  reportedInstallSource
20
- } from "./chunk-AERRQEWZ.js";
20
+ } from "./chunk-7FROPPIH.js";
21
21
  import {
22
22
  IDLE_PROMPT_NOTIFICATION,
23
23
  NOTIFICATION_PUSH_TYPES,
24
24
  POSTTOOLUSE_MIRROR_ONLY_TOOLS,
25
- canonicalJson
26
- } from "./chunk-SMIU5URV.js";
25
+ canonicalJson,
26
+ claudeConfigDir
27
+ } from "./chunk-7S46LCKD.js";
27
28
  import {
29
+ compareVersion,
30
+ parseVersion,
28
31
  writeFileAtomic
29
- } from "./chunk-T7FPZN5V.js";
32
+ } from "./chunk-RZVWEDIS.js";
30
33
  import {
31
34
  getApiKey,
32
35
  getBaseUrl
33
- } from "./chunk-X2KK42JA.js";
36
+ } from "./chunk-R5PZPROX.js";
34
37
  import {
35
38
  ACTION_BODY_MAX,
36
39
  AGENTS,
@@ -43,19 +46,23 @@ import {
43
46
  GATE_MAX_TOOL_INPUTS,
44
47
  HOOK_COMPATIBLE_PROFILES,
45
48
  HOOK_SOURCES,
46
- PENDING_COMMAND_PREFIX,
47
49
  REPO_AWARE_AGENTS,
48
50
  TASK_OUTPUT_TOOL,
49
51
  TASK_STOP_TOOL,
50
52
  blockedActionIdentity,
53
+ canCarryPendingCommand,
51
54
  canonicalToolName,
55
+ claudeTurnEndOutput,
56
+ conversationText,
52
57
  gateOutputFor,
53
58
  hookCompatibleProfileBySource,
54
59
  isAutoApprove,
60
+ isRecord,
55
61
  isTokenCount,
56
62
  modeStateFromResponse,
57
63
  parseMcpToolName,
58
64
  pendingCommandEvents,
65
+ pendingCommandInstruction,
59
66
  questionLimitHandBack,
60
67
  redactSecrets,
61
68
  redactSecretsDeep,
@@ -65,7 +72,7 @@ import {
65
72
  toToolLookup,
66
73
  truncateLine,
67
74
  unansweredRefusalReason
68
- } from "./chunk-JGEPODEP.js";
75
+ } from "./chunk-AVHL2ZTS.js";
69
76
 
70
77
  // ../hook-mapping/src/describe.ts
71
78
  import { isAbsolute, relative, resolve } from "path";
@@ -590,7 +597,7 @@ var SESSION_END_ACTIONS = {
590
597
  var countArray = (value) => Array.isArray(value) ? value.length : 0;
591
598
  var summarizeFinalMessage = (message) => {
592
599
  if (typeof message !== "string") return "Session ended";
593
- const collapsed = message.replace(/\s+/g, " ").trim();
600
+ const collapsed = conversationText(message).replace(/\s+/g, " ").trim();
594
601
  if (!collapsed) return "Session ended";
595
602
  return collapsed.slice(0, STOP_SUMMARY_MAX_LENGTH);
596
603
  };
@@ -621,7 +628,7 @@ var compactionAction = (hookEvent, trigger) => {
621
628
  };
622
629
  var sessionStartAction = (source) => source === "resume" ? "Session resumed" : "Session started";
623
630
  var sessionEndAction = (reason) => typeof reason === "string" && SESSION_END_ACTIONS[reason] || "Session ended";
624
- var taskTitleFrom = (prompt) => typeof prompt === "string" ? prompt.replace(/\s+/g, " ").trim().slice(0, TASK_TITLE_MAX_LENGTH) || void 0 : void 0;
631
+ var taskTitleFrom = (prompt) => typeof prompt === "string" ? conversationText(prompt).replace(/\s+/g, " ").trim().slice(0, TASK_TITLE_MAX_LENGTH) || void 0 : void 0;
625
632
  var asString = (value) => typeof value === "string" && value.length > 0 ? value : void 0;
626
633
  var NOTIFICATION_ACTION_MAX_LENGTH = 200;
627
634
  var STOP_FAILURE_REASON_MAX_LENGTH = 300;
@@ -1581,14 +1588,78 @@ var forgetBlockedActionHint = (fingerprint) => {
1581
1588
  }
1582
1589
  };
1583
1590
 
1591
+ // src/claude-session-record.ts
1592
+ import { readFileSync as readFileSync6, readdirSync as readdirSync4, statSync as statSync6 } from "fs";
1593
+ import { join as join7 } from "path";
1594
+ var UNREADABLE = { kind: "unreadable" };
1595
+ var OTHER_SESSION = { kind: "other_session" };
1596
+ var PROCESS_ID = /^[1-9]\d*$/;
1597
+ var SESSION_FILE_SUFFIX = ".json";
1598
+ var SESSION_FILE_MAX_BYTES = 64 * 1024;
1599
+ var isRunning = (pid) => {
1600
+ try {
1601
+ process.kill(pid, 0);
1602
+ return true;
1603
+ } catch (error) {
1604
+ return error instanceof Error && "code" in error && error.code === "EPERM";
1605
+ }
1606
+ };
1607
+ var isSmallRegularFile = (path) => {
1608
+ try {
1609
+ const stats = statSync6(path);
1610
+ return stats.isFile() && stats.size <= SESSION_FILE_MAX_BYTES;
1611
+ } catch {
1612
+ return false;
1613
+ }
1614
+ };
1615
+ var readSessionFile = (path, sessionId) => {
1616
+ if (!isSmallRegularFile(path)) return UNREADABLE;
1617
+ try {
1618
+ const parsed = JSON.parse(readFileSync6(path, "utf-8"));
1619
+ if (!isRecord(parsed) || typeof parsed.sessionId !== "string") return UNREADABLE;
1620
+ if (parsed.sessionId !== sessionId) return OTHER_SESSION;
1621
+ return { kind: "this_session", version: typeof parsed.version === "string" ? parsed.version : null };
1622
+ } catch {
1623
+ return UNREADABLE;
1624
+ }
1625
+ };
1626
+ var runningSessionFiles = (sessions) => {
1627
+ try {
1628
+ return readdirSync4(sessions).filter((name) => name.endsWith(SESSION_FILE_SUFFIX)).map((name) => name.slice(0, -SESSION_FILE_SUFFIX.length)).filter((pid) => PROCESS_ID.test(pid) && isRunning(Number(pid))).map((pid) => join7(sessions, `${pid}${SESSION_FILE_SUFFIX}`));
1629
+ } catch {
1630
+ return [];
1631
+ }
1632
+ };
1633
+ var parsedSessionVersion = (version) => {
1634
+ const release = version === null ? null : parseVersion(version);
1635
+ return version === null || release === null ? null : { version, release };
1636
+ };
1637
+ var isParsed = (entry) => entry !== null;
1638
+ var lowerVersion = (lowest, entry) => compareVersion(entry.release, lowest.release) < 0 ? entry : lowest;
1639
+ var oldestVersionAcross = (readings) => {
1640
+ if (readings.some((reading) => reading.kind === "unreadable")) return null;
1641
+ const parsed = readings.flatMap((reading) => reading.kind === "this_session" ? [reading.version] : []).map(parsedSessionVersion);
1642
+ if (parsed.length === 0 || !parsed.every(isParsed)) return null;
1643
+ return parsed.filter(isParsed).reduce(lowerVersion).version;
1644
+ };
1645
+ var claudeSessionVersion = (sessionId, environment = process.env) => {
1646
+ if (!sessionId) return null;
1647
+ try {
1648
+ const sessions = join7(claudeConfigDir(void 0, environment), "sessions");
1649
+ return oldestVersionAcross(runningSessionFiles(sessions).map((path) => readSessionFile(path, sessionId)));
1650
+ } catch {
1651
+ return null;
1652
+ }
1653
+ };
1654
+
1584
1655
  // src/background-work.ts
1585
1656
  import { createHash as createHash7 } from "crypto";
1586
- import { mkdirSync as mkdirSync6, rmSync as rmSync5, statSync as statSync6, writeFileSync as writeFileSync6 } from "fs";
1657
+ import { mkdirSync as mkdirSync6, rmSync as rmSync5, statSync as statSync7, writeFileSync as writeFileSync6 } from "fs";
1587
1658
  import { tmpdir as tmpdir7 } from "os";
1588
- import { join as join7 } from "path";
1659
+ import { join as join8 } from "path";
1589
1660
  var BACKGROUND_WORK_TTL_MS = 60 * 60 * 1e3;
1590
- var backgroundWorkDir = () => join7(tmpdir7(), "pushary-background-work");
1591
- var markerFor = (sessionKey) => join7(backgroundWorkDir(), createHash7("sha256").update(sessionKey).digest("hex"));
1661
+ var backgroundWorkDir = () => join8(tmpdir7(), "pushary-background-work");
1662
+ var markerFor = (sessionKey) => join8(backgroundWorkDir(), createHash7("sha256").update(sessionKey).digest("hex"));
1592
1663
  var hasRunningBackgroundTasks = (backgroundTasks) => Array.isArray(backgroundTasks) && backgroundTasks.length > 0;
1593
1664
  var noteBackgroundWork = (sessionKey, running) => {
1594
1665
  try {
@@ -1604,21 +1675,21 @@ var noteBackgroundWork = (sessionKey, running) => {
1604
1675
  };
1605
1676
  var isWaitingOnBackgroundWork = (sessionKey, nowMs = Date.now()) => {
1606
1677
  try {
1607
- return nowMs - statSync6(markerFor(sessionKey)).mtimeMs < BACKGROUND_WORK_TTL_MS;
1678
+ return nowMs - statSync7(markerFor(sessionKey)).mtimeMs < BACKGROUND_WORK_TTL_MS;
1608
1679
  } catch {
1609
1680
  return false;
1610
1681
  }
1611
1682
  };
1612
1683
 
1613
1684
  // src/events.ts
1614
- import { basename as basename2, join as join8 } from "path";
1615
- import { existsSync as existsSync6, mkdirSync as mkdirSync7, readFileSync as readFileSync6, statSync as statSync7, writeFileSync as writeFileSync7 } from "fs";
1685
+ import { basename as basename2, join as join9 } from "path";
1686
+ import { existsSync as existsSync6, mkdirSync as mkdirSync7, readFileSync as readFileSync7, statSync as statSync8, writeFileSync as writeFileSync7 } from "fs";
1616
1687
  import { tmpdir as tmpdir8 } from "os";
1617
- var INTENT_DIR = join8(tmpdir8(), "pushary-intent");
1688
+ var INTENT_DIR = join9(tmpdir8(), "pushary-intent");
1618
1689
  var INTENT_MAX_BYTES = 2048;
1619
1690
  var INTENT_GRACE_MS = 10 * 60 * 1e3;
1620
1691
  var sanitizeSession = (sessionId) => sessionId.replace(/[^A-Za-z0-9_-]/g, "_").slice(0, 128) || DEFAULT_SESSION;
1621
- var intentFile = (sessionId) => join8(INTENT_DIR, sanitizeSession(sessionId));
1692
+ var intentFile = (sessionId) => join9(INTENT_DIR, sanitizeSession(sessionId));
1622
1693
  var saveLastPrompt = (sessionId, prompt) => {
1623
1694
  try {
1624
1695
  const trimmed = prompt.replace(/\s+/g, " ").trim().slice(0, INTENT_MAX_BYTES);
@@ -1631,8 +1702,8 @@ var saveLastPrompt = (sessionId, prompt) => {
1631
1702
  var readLastPrompt = (sessionId) => {
1632
1703
  try {
1633
1704
  const path = intentFile(sessionId);
1634
- if (isDefaultSession(sessionId) && statSync7(path).mtimeMs < Date.now() - INTENT_GRACE_MS) return void 0;
1635
- const value = readFileSync6(path, "utf-8").trim();
1705
+ if (isDefaultSession(sessionId) && statSync8(path).mtimeMs < Date.now() - INTENT_GRACE_MS) return void 0;
1706
+ const value = readFileSync7(path, "utf-8").trim();
1636
1707
  return value.length > 0 ? value : void 0;
1637
1708
  } catch {
1638
1709
  return void 0;
@@ -1697,7 +1768,7 @@ var readFreshCachedPolicy = (apiKey, agentType, sessionId) => {
1697
1768
  const request = policyRequestFor(agentType);
1698
1769
  const path = policyCacheFile(apiKey, request.agent, request.repoAware);
1699
1770
  if (!existsSync6(path)) return null;
1700
- const cached = JSON.parse(readFileSync6(path, "utf-8"));
1771
+ const cached = JSON.parse(readFileSync7(path, "utf-8"));
1701
1772
  if (!isPolicyConfig(cached)) return null;
1702
1773
  if ((cached._sessionId ?? null) !== (sessionId ?? null)) return null;
1703
1774
  if (!cached._cachedAt || Date.now() - cached._cachedAt >= POLICY_CACHE_TTL_MS) return null;
@@ -1740,8 +1811,9 @@ var deriveAutoDecisionBeacon = (toolName, toolInput, liveMode, agentType, cwd, s
1740
1811
  };
1741
1812
  var AUTO_DECISION_WINDOW_MS = 15 * 60 * 1e3;
1742
1813
  var HOOK_ACTIVE_WINDOW_MS = 30 * 60 * 1e3;
1814
+ var hookSourceOfAgentType = (agentType) => HOOK_SOURCES.find((candidate) => AGENT_IDENTITIES[candidate].type === agentType);
1743
1815
  var deriveUsage = (payload, agent, event) => {
1744
- const source = HOOK_SOURCES.find((candidate) => AGENT_IDENTITIES[candidate].type === agent.type);
1816
+ const source = hookSourceOfAgentType(agent.type);
1745
1817
  const request = source ? transcriptUsageRequest({ source, event, payload, costTracking: process.env[COST_TRACKING_ENV] }) : null;
1746
1818
  if (!request) return void 0;
1747
1819
  try {
@@ -1750,16 +1822,19 @@ var deriveUsage = (payload, agent, event) => {
1750
1822
  return void 0;
1751
1823
  }
1752
1824
  };
1753
- var mergeAdditionalContext = (existing, reported) => {
1825
+ var pendingInstructionOf = (reported) => {
1754
1826
  const pendingCommand = reported.status === "fulfilled" ? reported.value?.pendingCommand : void 0;
1755
- if (typeof pendingCommand !== "string" || pendingCommand.trim().length === 0) return existing;
1756
- const injected = `${PENDING_COMMAND_PREFIX} ${pendingCommand.trim()}`;
1827
+ return typeof pendingCommand === "string" ? pendingCommandInstruction(pendingCommand) : void 0;
1828
+ };
1829
+ var mergeAdditionalContext = (existing, reported) => {
1830
+ const injected = pendingInstructionOf(reported);
1831
+ if (injected === void 0) return existing;
1757
1832
  return existing ? `${existing}
1758
1833
 
1759
1834
  ${injected}` : injected;
1760
1835
  };
1761
1836
  var consumesActivityContext = (agentType) => {
1762
- const source = HOOK_SOURCES.find((candidate) => AGENT_IDENTITIES[candidate].type === agentType);
1837
+ const source = hookSourceOfAgentType(agentType);
1763
1838
  if (!source) return false;
1764
1839
  return pendingCommandEvents(source).some((event) => event !== "Stop");
1765
1840
  };
@@ -1997,7 +2072,10 @@ var handleUserPrompt = async (input, agent = CLAUDE_CODE_AGENT) => {
1997
2072
  }
1998
2073
  };
1999
2074
  var UNUSED_APPROVAL_INSTRUCTION = "The person allowed, from Pushary, the call auto mode blocked. Send that call again now, exactly as it was with nothing changed, to use their approval. It covers only that exact call.";
2000
- var phoneInstructionOf = (pendingCommand) => typeof pendingCommand === "string" && pendingCommand.trim().length > 0 ? `The user sent a new instruction from their phone via Pushary: ${pendingCommand.trim()}` : null;
2075
+ var carriesInstructionAtTurnEnd = (agentType) => {
2076
+ const source = hookSourceOfAgentType(agentType);
2077
+ return source !== void 0 && canCarryPendingCommand(source, "Stop");
2078
+ };
2001
2079
  var handleStop = async (input, agent = CLAUDE_CODE_AGENT) => {
2002
2080
  const deadline = Date.now() + HOOK_BUDGET_MS;
2003
2081
  const signal = AbortSignal.timeout(HOOK_BUDGET_MS);
@@ -2006,6 +2084,7 @@ var handleStop = async (input, agent = CLAUDE_CODE_AGENT) => {
2006
2084
  const sessionKey = input.session_id || DEFAULT_SESSION;
2007
2085
  noteBackgroundWork(sessionKey, hasRunningBackgroundTasks(input.background_tasks));
2008
2086
  const late = await reconcilePendingQuestions(sessionKey, void 0, signal);
2087
+ const carriesInstruction = carriesInstructionAtTurnEnd(agent.type);
2009
2088
  const tasks = [
2010
2089
  reportEvent({
2011
2090
  event: "session_end",
@@ -2014,7 +2093,12 @@ var handleStop = async (input, agent = CLAUDE_CODE_AGENT) => {
2014
2093
  action: summarizeStop(input),
2015
2094
  ...sessionIdentityOf(input),
2016
2095
  usage: deriveUsage(input, agent, "Stop")
2017
- }, { maxAttempts: 1, budgetMs: Math.min(DRAINING_REPORT_BUDGET_MS, Math.max(0, deadline - Date.now())), signal })
2096
+ }, {
2097
+ maxAttempts: 1,
2098
+ budgetMs: Math.min(DRAINING_REPORT_BUDGET_MS, Math.max(0, deadline - Date.now())),
2099
+ signal,
2100
+ skipDrain: !carriesInstruction
2101
+ })
2018
2102
  ];
2019
2103
  if (late.length > 0) {
2020
2104
  tasks.push(notifyLateAnswers(getApiKey(), late, `${agent.label} - ${projectName}`, input.session_id, signal));
@@ -2022,10 +2106,13 @@ var handleStop = async (input, agent = CLAUDE_CODE_AGENT) => {
2022
2106
  }
2023
2107
  if (!isDefaultSession(sessionKey) && listPendingQuestions(sessionKey).length === 0) removePendingSession(sessionKey);
2024
2108
  const [reported] = await Promise.allSettled(tasks);
2025
- const pendingCommand = reported.status === "fulfilled" ? reported.value?.pendingCommand : void 0;
2026
2109
  const unusedApproval = !input.stop_hook_active && approvalAwaitingRetry(input.session_id) !== null;
2027
- const instructions = [unusedApproval ? UNUSED_APPROVAL_INSTRUCTION : null, phoneInstructionOf(pendingCommand)].filter((instruction) => instruction !== null);
2028
- return instructions.length > 0 ? { decision: "block", reason: instructions.join("\n\n") } : void 0;
2110
+ const instruction = carriesInstruction ? pendingInstructionOf(reported) : void 0;
2111
+ return claudeTurnEndOutput({
2112
+ instruction,
2113
+ continueReason: unusedApproval ? UNUSED_APPROVAL_INSTRUCTION : void 0,
2114
+ claudeVersion: instruction === void 0 ? null : claudeSessionVersion(input.session_id)
2115
+ });
2029
2116
  } catch {
2030
2117
  return void 0;
2031
2118
  }
@@ -1025,6 +1025,40 @@ var toolsCoveredByGateEntry = (coverage, matcher) => {
1025
1025
  var toolMatches = (match, toolName) => match.kind === "named" ? match.tools.includes(toolName) : toolName.startsWith(match.prefix);
1026
1026
  var cursorGateOwnsToolCall = (registration, toolName) => typeof toolName === "string" && registration.some((match) => toolMatches(match, toolName));
1027
1027
 
1028
+ // ../contracts/src/conversation-text.ts
1029
+ var INTERNAL_ENVELOPE = /(^|\n) {0,3}(?:<(total_tokens|task-notification)>[\s\S]*?(?:<\/\2>|$)[\t ]*)+/g;
1030
+ var INCOMPLETE_ENVELOPE = /(^|\n) {0,3}<(?:total_tokens|task-notification)$/g;
1031
+ var SUGGESTION_REQUEST = /^This is an app-generated request for a suggested next user(?: message| prompt)/;
1032
+ var visibleProse = (text2) => text2.replace(INTERNAL_ENVELOPE, "$1").replace(INCOMPLETE_ENVELOPE, "$1");
1033
+ function conversationText(text2) {
1034
+ if (SUGGESTION_REQUEST.test(text2.trimStart())) return "";
1035
+ const output = [];
1036
+ let prose = [];
1037
+ let fence = null;
1038
+ for (const line of text2.split("\n")) {
1039
+ const marker = /^ {0,3}(`{3,}|~{3,})/.exec(line)?.[1];
1040
+ if (fence) {
1041
+ output.push(line);
1042
+ if (marker?.[0] === fence.marker && marker.length >= fence.length) fence = null;
1043
+ } else if (marker) {
1044
+ output.push(visibleProse(prose.join("\n")), line);
1045
+ prose = [];
1046
+ fence = { marker: marker.charAt(0), length: marker.length };
1047
+ } else {
1048
+ prose.push(line);
1049
+ }
1050
+ }
1051
+ output.push(visibleProse(prose.join("\n")));
1052
+ return output.join("\n").trim();
1053
+ }
1054
+ function extractMessageText(content) {
1055
+ if (typeof content === "string") return content;
1056
+ if (!Array.isArray(content)) return "";
1057
+ return content.flatMap(
1058
+ (block) => block !== null && typeof block === "object" && "type" in block && block.type === "text" && "text" in block && typeof block.text === "string" ? [block.text] : []
1059
+ ).join("\n");
1060
+ }
1061
+
1028
1062
  // ../contracts/src/shell-analysis.ts
1029
1063
  var SHELL_WORD_SEPARATOR = /[ \t\n]/;
1030
1064
  var ARITHMETIC_EVALUATING_EXPANSION = /\$[#+=~^]*(?:[A-Za-z_][A-Za-z0-9_]*|[0-9]+|[-?$!@*#])?\[/;
@@ -2069,6 +2103,51 @@ var powerShellCommandHasAVisibleConsequence = (command, judge) => {
2069
2103
  return powerShellReadingIsDestructive(reading, judge) || stages.some((stage) => stageHasAVisibleConsequence(stage, judge)) || reading.statements.some(listsRecursivelyIntoARemoval) || runsFetchedPowerShellCode(stages, judge) || runsADownloadedFile(stages, judge) || reading.posixCommands.some((words) => judge.commandShowsAConsequence(words));
2070
2104
  };
2071
2105
 
2106
+ // ../contracts/src/release-version.ts
2107
+ var RELEASE_VERSION_PATTERN = /^(0|[1-9]\d{0,8})\.(0|[1-9]\d{0,8})\.(0|[1-9]\d{0,8})$/;
2108
+ var parseReleaseVersion = (version) => {
2109
+ const match = RELEASE_VERSION_PATTERN.exec(version);
2110
+ return match ? [Number(match[1]), Number(match[2]), Number(match[3])] : null;
2111
+ };
2112
+ var compareReleaseVersions = (left, right) => {
2113
+ for (let index = 0; index < left.length; index++) {
2114
+ if (left[index] !== right[index]) return left[index] < right[index] ? -1 : 1;
2115
+ }
2116
+ return 0;
2117
+ };
2118
+ var isReleaseBelow = (version, floor) => compareReleaseVersions(version, floor) < 0;
2119
+ var formatReleaseVersion = (version) => version.join(".");
2120
+
2121
+ // ../contracts/src/claude-turn-end.ts
2122
+ var STOP_CONTEXT_RELEASE = [2, 1, 163];
2123
+ var readsStopContext = (claudeVersion) => {
2124
+ const release = claudeVersion === null ? null : parseReleaseVersion(claudeVersion);
2125
+ return release !== null && !isReleaseBelow(release, STOP_CONTEXT_RELEASE);
2126
+ };
2127
+ var stopContext = (additionalContext) => ({
2128
+ hookEventName: "Stop",
2129
+ additionalContext
2130
+ });
2131
+ var instructionAtTurnEnd = (instruction, claudeVersion) => readsStopContext(claudeVersion) ? { hookSpecificOutput: stopContext(instruction) } : { decision: "block", reason: instruction };
2132
+ var claudeTurnEndOutput = ({
2133
+ instruction,
2134
+ continueReason,
2135
+ claudeVersion
2136
+ }) => {
2137
+ if (instruction === void 0) return continueReason === void 0 ? void 0 : { decision: "block", reason: continueReason };
2138
+ if (continueReason === void 0) return instructionAtTurnEnd(instruction, claudeVersion);
2139
+ return readsStopContext(claudeVersion) ? { decision: "block", reason: continueReason, hookSpecificOutput: stopContext(instruction) } : { decision: "block", reason: `${continueReason}
2140
+
2141
+ ${instruction}` };
2142
+ };
2143
+
2144
+ // ../contracts/src/pending-command.ts
2145
+ var PENDING_COMMAND_PREFIX = "The user sent a new instruction from their phone via Pushary:";
2146
+ var pendingCommandInstruction = (command) => {
2147
+ const instruction = command.trim();
2148
+ return instruction.length === 0 ? void 0 : `${PENDING_COMMAND_PREFIX} ${instruction}`;
2149
+ };
2150
+
2072
2151
  // ../contracts/src/command-analysis/sql-text.ts
2073
2152
  var UNCERTAIN_SQL = { kind: "uncertain" };
2074
2153
  var STRING_PLACEHOLDER = "''";
@@ -2866,7 +2945,6 @@ var withoutDeclinedAgent = (agents, agent) => agents.filter((candidate) => candi
2866
2945
  // ../contracts/src/cli-version-standing.ts
2867
2946
  var FIRST_AUTO_UPDATING_RELEASE = [1, 5, 0];
2868
2947
  var MIN_SAFE_RELEASE = [1, 9, 26];
2869
- var formatReleaseVersion = (version) => version.join(".");
2870
2948
  var FIRST_AUTO_UPDATING_CLI_VERSION = formatReleaseVersion(FIRST_AUTO_UPDATING_RELEASE);
2871
2949
  var MIN_SAFE_CLI_VERSION = formatReleaseVersion(MIN_SAFE_RELEASE);
2872
2950
 
@@ -6516,7 +6594,6 @@ var claudePreToolUseOutput = (decision, reason, updatedInput) => ({
6516
6594
  ...updatedInput ? { updatedInput } : {}
6517
6595
  }
6518
6596
  });
6519
- var PENDING_COMMAND_PREFIX = "The user sent a new instruction from their phone via Pushary:";
6520
6597
  var pendingCommandEvents = (source) => {
6521
6598
  switch (source) {
6522
6599
  case "claude":
@@ -6554,6 +6631,7 @@ var compatiblePendingCommandEvents = (source) => {
6554
6631
  if (!profile || profile.wire !== "permission_decision") return [];
6555
6632
  return COMPATIBLE_PENDING_COMMAND_EVENTS.filter((event) => profile.events.includes(event));
6556
6633
  };
6634
+ var canCarryPendingCommand = (source, event) => pendingCommandEvents(source).includes(event);
6557
6635
  var claudePermissionRequestOutput = (decision, reason, updatedInput) => ({
6558
6636
  hookSpecificOutput: {
6559
6637
  hookEventName: "PermissionRequest",
@@ -6771,6 +6849,8 @@ var hookActivationResult = (report) => {
6771
6849
  };
6772
6850
 
6773
6851
  export {
6852
+ conversationText,
6853
+ extractMessageText,
6774
6854
  isRecord,
6775
6855
  AGENT_QUESTION_HEADER_MAX,
6776
6856
  AGENT_QUESTION_OPTION_MAX,
@@ -6827,6 +6907,8 @@ export {
6827
6907
  NO_CURSOR_GATE,
6828
6908
  toolsCoveredByGateEntry,
6829
6909
  cursorGateOwnsToolCall,
6910
+ claudeTurnEndOutput,
6911
+ pendingCommandInstruction,
6830
6912
  degradedLine,
6831
6913
  KEY_SCOPE,
6832
6914
  normalizeKeyScope,
@@ -6961,8 +7043,8 @@ export {
6961
7043
  claudePermissionDeniedOutput,
6962
7044
  codexStopRescueOutput,
6963
7045
  claudePreToolUseOutput,
6964
- PENDING_COMMAND_PREFIX,
6965
7046
  pendingCommandEvents,
7047
+ canCarryPendingCommand,
6966
7048
  claudePermissionRequestOutput,
6967
7049
  gateOutputFor,
6968
7050
  renderElicitationOutput,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  DEFAULT_SESSION
3
- } from "./chunk-5NQ3SMVP.js";
3
+ } from "./chunk-AJWGZJFS.js";
4
4
 
5
5
  // src/answer.ts
6
6
  var isDeferAnswer = (value) => value === "defer";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  guardBinary
3
- } from "./chunk-SMIU5URV.js";
3
+ } from "./chunk-7S46LCKD.js";
4
4
 
5
5
  // src/bell/install.ts
6
6
  import { join } from "path";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  SETUP_FLAGS
3
- } from "./chunk-EVJRITSI.js";
3
+ } from "./chunk-2HFC4W6J.js";
4
4
  import {
5
5
  parseFlags
6
6
  } from "./chunk-NMUI3ZWG.js";
@@ -9,7 +9,7 @@ import {
9
9
  } from "./chunk-PPY5N2E6.js";
10
10
  import {
11
11
  NPX_LATEST_COMMAND
12
- } from "./chunk-AZ56FPRG.js";
12
+ } from "./chunk-PPKIL4EL.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-JGEPODEP.js";
20
+ } from "./chunk-AVHL2ZTS.js";
21
21
 
22
22
  // src/cli/cowork.ts
23
23
  import { readFileSync } from "fs";
@@ -6,18 +6,18 @@ import {
6
6
  McpToolError,
7
7
  SubscriptionRequiredError,
8
8
  callMcpTool
9
- } from "./chunk-GIE7PLZD.js";
9
+ } from "./chunk-7M4AA7QF.js";
10
10
  import {
11
11
  installNetworkDefaults,
12
12
  isNetworkFailure
13
- } from "./chunk-XSUWXBHF.js";
13
+ } from "./chunk-O4EAMVSC.js";
14
14
  import {
15
15
  clientReportClaims
16
- } from "./chunk-SMIU5URV.js";
16
+ } from "./chunk-7S46LCKD.js";
17
17
  import {
18
18
  getApiKey,
19
19
  getBaseUrl
20
- } from "./chunk-X2KK42JA.js";
20
+ } from "./chunk-R5PZPROX.js";
21
21
  import {
22
22
  ASK_AGENT_NAME_MAX,
23
23
  CLIENT_REPORT_PATH,
@@ -26,7 +26,7 @@ import {
26
26
  TOOL_FAILURE_CODES,
27
27
  degradedLine,
28
28
  truncateLine
29
- } from "./chunk-JGEPODEP.js";
29
+ } from "./chunk-AVHL2ZTS.js";
30
30
 
31
31
  // src/api.ts
32
32
  import { randomUUID } from "crypto";
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  autoUpdateLock
3
- } from "./chunk-SMIU5URV.js";
3
+ } from "./chunk-7S46LCKD.js";
4
4
  import {
5
5
  installPackageGlobally,
6
6
  npmErrorMessage,
7
7
  writeJsonAtomic
8
- } from "./chunk-T7FPZN5V.js";
8
+ } from "./chunk-RZVWEDIS.js";
9
9
 
10
10
  // src/upgrade-lock.ts
11
11
  import { fork } from "child_process";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  realpath
3
- } from "./chunk-LKAO35SY.js";
3
+ } from "./chunk-JYOR57ZW.js";
4
4
  import {
5
5
  findNativeClaudeInstall
6
- } from "./chunk-BJRLJJS2.js";
6
+ } from "./chunk-TFDMJHAB.js";
7
7
  import {
8
8
  readGlobalPrefixAsync,
9
9
  resolveGlobalBinary,
@@ -13,10 +13,10 @@ import {
13
13
  resolvePackageVersionFromBinary,
14
14
  resolvePathBinary,
15
15
  resolvePathBinaryAsync
16
- } from "./chunk-T7FPZN5V.js";
16
+ } from "./chunk-RZVWEDIS.js";
17
17
  import {
18
18
  MANAGED_PROVIDERS
19
- } from "./chunk-JGEPODEP.js";
19
+ } from "./chunk-AVHL2ZTS.js";
20
20
 
21
21
  // src/live-capabilities.ts
22
22
  import { homedir } from "os";
@@ -3,13 +3,13 @@ import {
3
3
  NpmMissingError,
4
4
  NpmPermissionError,
5
5
  writeFileAtomic
6
- } from "./chunk-T7FPZN5V.js";
6
+ } from "./chunk-RZVWEDIS.js";
7
7
  import {
8
8
  NPX_LATEST_COMMAND
9
- } from "./chunk-AZ56FPRG.js";
9
+ } from "./chunk-PPKIL4EL.js";
10
10
  import {
11
11
  readSetupAgentFailures
12
- } from "./chunk-JGEPODEP.js";
12
+ } from "./chunk-AVHL2ZTS.js";
13
13
 
14
14
  // src/setup/config-write.ts
15
15
  var AgentConfigWriteError = class extends Error {
@@ -2,7 +2,7 @@ import {
2
2
  isApprovalMode,
3
3
  isRecord,
4
4
  isTimeoutAction
5
- } from "./chunk-JGEPODEP.js";
5
+ } from "./chunk-AVHL2ZTS.js";
6
6
 
7
7
  // src/cli/settings-response.ts
8
8
  var isFiniteNumber = (value) => typeof value === "number" && Number.isFinite(value);