@pushary/agent-hooks 1.9.158 → 1.9.161

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (146) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/README.md +1 -0
  3. package/dist/{api-MRFKFDVV.js → api-WHTSBK74.js} +15 -13
  4. package/dist/bin/pushary-audit.js +7 -7
  5. package/dist/bin/pushary-bell-hook.js +31 -31
  6. package/dist/bin/pushary-bell.js +16 -16
  7. package/dist/bin/pushary-calls.d.ts +1 -0
  8. package/dist/bin/pushary-calls.js +287 -0
  9. package/dist/bin/pushary-claude.js +37 -37
  10. package/dist/bin/pushary-clean.js +47 -45
  11. package/dist/bin/pushary-codex-bridge.js +27 -27
  12. package/dist/bin/pushary-codex-hook.js +46 -44
  13. package/dist/bin/pushary-codex-session.js +8 -8
  14. package/dist/bin/pushary-codex.js +19 -19
  15. package/dist/bin/pushary-connect.js +41 -40
  16. package/dist/bin/pushary-cowork.js +6 -6
  17. package/dist/bin/pushary-daemon.js +52 -51
  18. package/dist/bin/pushary-disconnect.js +39 -37
  19. package/dist/bin/pushary-display-hook.js +20 -1
  20. package/dist/bin/pushary-doctor.js +61 -59
  21. package/dist/bin/pushary-elicitation-hook.js +32 -32
  22. package/dist/bin/pushary-gemini-bridge.js +19 -19
  23. package/dist/bin/pushary-gemini-hook.js +36 -36
  24. package/dist/bin/pushary-hook.js +39 -38
  25. package/dist/bin/pushary-login.js +28 -28
  26. package/dist/bin/pushary-logout.js +34 -33
  27. package/dist/bin/pushary-mcp.js +15 -15
  28. package/dist/bin/pushary-mode.js +21 -21
  29. package/dist/bin/pushary-notification-hook.js +30 -30
  30. package/dist/bin/pushary-opencode-hook.js +399 -45
  31. package/dist/bin/pushary-permission-denied-hook.js +39 -38
  32. package/dist/bin/pushary-permission-hook.js +39 -38
  33. package/dist/bin/pushary-post-hook.js +31 -31
  34. package/dist/bin/pushary-prompt-hook.js +30 -30
  35. package/dist/bin/pushary-session-end-hook.js +30 -30
  36. package/dist/bin/pushary-session-start-hook.js +41 -40
  37. package/dist/bin/pushary-setup.js +73 -72
  38. package/dist/bin/pushary-stats.js +6 -6
  39. package/dist/bin/pushary-status.js +40 -39
  40. package/dist/bin/pushary-stop-hook.js +30 -30
  41. package/dist/bin/pushary-stopfailure-hook.js +30 -30
  42. package/dist/bin/pushary-suggestions.js +21 -21
  43. package/dist/bin/pushary-transcript-register.js +21 -21
  44. package/dist/bin/pushary-transcripts.js +32 -32
  45. package/dist/bin/pushary-upgrade.js +50 -49
  46. package/dist/bin/pushary-wait.js +23 -23
  47. package/dist/bin/pushary.js +10 -9
  48. package/dist/{chunk-IKC33YKC.js → chunk-26GVUJMR.js} +5 -2
  49. package/dist/{chunk-Q7WCDUFV.js → chunk-2ABUBECK.js} +6 -6
  50. package/dist/{chunk-V36P4KS4.js → chunk-2PY5DJTC.js} +1 -1
  51. package/dist/{chunk-J7HSUQK2.js → chunk-3F6HE5AK.js} +3 -3
  52. package/dist/{chunk-AZZNHW3R.js → chunk-4ZNZS6FM.js} +8 -5
  53. package/dist/{chunk-HA2SRYYP.js → chunk-55AHQF63.js} +92 -0
  54. package/dist/{chunk-UPI3JDHZ.js → chunk-5S66DHJS.js} +3 -3
  55. package/dist/{chunk-4I2SHNEU.js → chunk-5UBV26GO.js} +3 -3
  56. package/dist/{chunk-ALQWZCUT.js → chunk-6NWESDKK.js} +4 -4
  57. package/dist/{chunk-DHI3X5WK.js → chunk-6OSE2IRG.js} +2 -2
  58. package/dist/{chunk-NW63PGKF.js → chunk-7AQTKVA6.js} +12 -7
  59. package/dist/{chunk-FTTSQAF4.js → chunk-7IHVTLHK.js} +1 -1
  60. package/dist/{chunk-GTYVNVBZ.js → chunk-7VXHWU7A.js} +4 -4
  61. package/dist/{chunk-B3BOAYRO.js → chunk-7WLKE7QN.js} +3 -3
  62. package/dist/{chunk-QVVBU2JU.js → chunk-ANYLSZN3.js} +24 -9
  63. package/dist/{chunk-6GGK3T24.js → chunk-AT5ZLKMQ.js} +5 -5
  64. package/dist/{chunk-CCKY3JDB.js → chunk-ATI5XO3E.js} +4 -4
  65. package/dist/{chunk-CAMFNSJS.js → chunk-AVGYUZVK.js} +6 -6
  66. package/dist/{chunk-FGVBFDNV.js → chunk-AVRRD6AY.js} +1 -1
  67. package/dist/{chunk-ORQ7THNZ.js → chunk-BGU56XCS.js} +1 -1
  68. package/dist/{chunk-K3OCYJPK.js → chunk-BTYHDCAP.js} +3 -3
  69. package/dist/{chunk-YPFOTFEG.js → chunk-DHUWAUVL.js} +1 -1
  70. package/dist/{chunk-IOKJJ2SY.js → chunk-DHX5JZSH.js} +4 -4
  71. package/dist/{chunk-XNJ2HOEL.js → chunk-DLZ6RK2P.js} +3 -3
  72. package/dist/{chunk-TSR3FPGL.js → chunk-DWMQZM52.js} +1 -1
  73. package/dist/{chunk-N3CFEMLS.js → chunk-E7K6YCWY.js} +6 -6
  74. package/dist/{chunk-3QU4WXAH.js → chunk-EGEZKJHX.js} +5 -5
  75. package/dist/{chunk-3UNZ7HRN.js → chunk-F5NJUDGA.js} +20 -18
  76. package/dist/{chunk-UDLWNOXX.js → chunk-FZCEPG6J.js} +2 -2
  77. package/dist/{chunk-N5SSADNW.js → chunk-G44FOBHN.js} +4 -4
  78. package/dist/{chunk-TKBCLK4B.js → chunk-GJA3KQ3T.js} +5 -5
  79. package/dist/{chunk-CSZWWPNS.js → chunk-GNHXDRO6.js} +1 -1
  80. package/dist/{chunk-AMIUB22C.js → chunk-HHNC6FWO.js} +1 -1
  81. package/dist/{chunk-PND5IGC7.js → chunk-HKCJZGAJ.js} +6 -6
  82. package/dist/{chunk-IIK3CZXJ.js → chunk-HKI4RMZF.js} +8 -7
  83. package/dist/{chunk-PBPQRJ2T.js → chunk-I5HXAELM.js} +5 -5
  84. package/dist/{chunk-T3PZQNIK.js → chunk-IGSSDODQ.js} +2 -2
  85. package/dist/{chunk-CS4Z44F5.js → chunk-IHYKSPWH.js} +85 -8
  86. package/dist/chunk-J36DDPJV.js +18 -0
  87. package/dist/{chunk-ANQBLZAE.js → chunk-KDHLOPSO.js} +1 -1
  88. package/dist/{chunk-4B5K6YIP.js → chunk-KKDKPWGM.js} +1 -1
  89. package/dist/{chunk-XHCX6DOY.js → chunk-L2ADRR62.js} +5 -5
  90. package/dist/{chunk-RRVFN432.js → chunk-LRTRIDOC.js} +1 -1
  91. package/dist/{chunk-MTITL2IG.js → chunk-LVGRSC44.js} +5 -5
  92. package/dist/{chunk-C6PAIHLP.js → chunk-MGOBIHXH.js} +10 -10
  93. package/dist/{chunk-EHRWEXRN.js → chunk-MPYQW4IV.js} +2 -2
  94. package/dist/{chunk-QP3TCKRZ.js → chunk-N4OKAE65.js} +15 -15
  95. package/dist/{chunk-SZMDRBNK.js → chunk-ONMAG5BF.js} +2 -2
  96. package/dist/{chunk-TMWXWBFP.js → chunk-OOODAKCC.js} +6 -6
  97. package/dist/chunk-OQAIMSHQ.js +885 -0
  98. package/dist/{chunk-TZJR5ESF.js → chunk-OSCZ4MNE.js} +7 -7
  99. package/dist/{chunk-X254TRBU.js → chunk-OXZ75E2Y.js} +4 -4
  100. package/dist/{chunk-OCWXE4PR.js → chunk-OZK75SFS.js} +11 -9
  101. package/dist/{chunk-RL5JLDRE.js → chunk-PXLWR4TG.js} +2 -2
  102. package/dist/{chunk-4WL2MINE.js → chunk-QLEFFGCN.js} +1 -1
  103. package/dist/{chunk-4NHQAMSK.js → chunk-R7NAG65X.js} +4 -4
  104. package/dist/{chunk-UVWKMFLQ.js → chunk-R7RN3Z2T.js} +2 -2
  105. package/dist/{chunk-AOP55JR2.js → chunk-RZBCXPOV.js} +14 -3
  106. package/dist/{chunk-SNQOEDZ2.js → chunk-S6ARXVVZ.js} +1 -1
  107. package/dist/{chunk-TYBVQ33X.js → chunk-TYB2QGJD.js} +6 -6
  108. package/dist/{chunk-XSIZKQ2C.js → chunk-U36COV3Z.js} +11 -11
  109. package/dist/{chunk-PI3BOI3A.js → chunk-U3FVVMB3.js} +1 -1
  110. package/dist/{chunk-AGYD6XNI.js → chunk-UH7GJHOO.js} +3 -3
  111. package/dist/chunk-UJT32RSQ.js +242 -0
  112. package/dist/{chunk-WIIMW5YO.js → chunk-UQTQ6HPO.js} +2 -0
  113. package/dist/{chunk-JKRQL2BL.js → chunk-UZTGEACF.js} +5 -5
  114. package/dist/{chunk-MHYX5Q3F.js → chunk-VIS3EVRH.js} +1 -1
  115. package/dist/{chunk-4SN4FHFZ.js → chunk-VYNC7EYV.js} +2 -2
  116. package/dist/{chunk-EGBI4GRS.js → chunk-W6FCSBTM.js} +2 -2
  117. package/dist/{chunk-IVOELLUK.js → chunk-WAFJGQSE.js} +39 -8
  118. package/dist/{chunk-LVZBLKAU.js → chunk-WCXVPYSD.js} +1 -1
  119. package/dist/{chunk-K3I2NMEF.js → chunk-WNIDBPT2.js} +8 -8
  120. package/dist/{chunk-CIAJ55EQ.js → chunk-WTWBHE2Y.js} +42 -34
  121. package/dist/{chunk-GHHVXARK.js → chunk-XWCLKWKP.js} +1 -1
  122. package/dist/{chunk-ZYDE6QRW.js → chunk-Y23YO46U.js} +3 -3
  123. package/dist/{chunk-2L52USKM.js → chunk-Y553AEQU.js} +3 -3
  124. package/dist/{chunk-H6CL3T2S.js → chunk-Y6ILCLKE.js} +1 -1
  125. package/dist/{chunk-APCJZFTJ.js → chunk-YD45WNVQ.js} +1 -1
  126. package/dist/{chunk-MLPPQ556.js → chunk-YEB7YWW7.js} +13 -13
  127. package/dist/{chunk-TPLTB256.js → chunk-YGHHDDIM.js} +4 -4
  128. package/dist/{chunk-N2LWKWNY.js → chunk-Z5DOTAFI.js} +3 -3
  129. package/dist/{chunk-2MPT7YQK.js → chunk-ZIKSHD5M.js} +5 -3
  130. package/dist/{codex-app-cards-switch-CXXDGH7R.js → codex-app-cards-switch-DPCGWQSX.js} +14 -14
  131. package/dist/{codex-card-routing-WP4IHJFN.js → codex-card-routing-NFIEH66Q.js} +2 -2
  132. package/dist/{codex-desktop-launch-EN7ACHC6.js → codex-desktop-launch-MARNBY23.js} +1 -1
  133. package/dist/{codex-session-launch-7BV4VTJW.js → codex-session-launch-LSNU7CUV.js} +23 -23
  134. package/dist/{config-SZMMBOJV.js → config-5D34OAYM.js} +4 -4
  135. package/dist/{global-upgrade-I5J6BDHA.js → global-upgrade-5XBO6FYU.js} +11 -11
  136. package/dist/{identity-GLJNTNHW.js → identity-6QEFK7PW.js} +5 -5
  137. package/dist/{live-capabilities-AYO7FOHS.js → live-capabilities-6KOGY6KM.js} +5 -5
  138. package/dist/{paths-NRBEF3T2.js → paths-7M6V62NO.js} +4 -4
  139. package/dist/reapply-ZECM5JRX.js +69 -0
  140. package/dist/src/index.js +39 -38
  141. package/dist/{upgrade-lock-H6SU7MJR.js → upgrade-lock-DI4JY2CU.js} +5 -5
  142. package/dist/usage-X4BIHYR5.js +11 -0
  143. package/package.json +2 -1
  144. package/dist/chunk-GLDSXDRV.js +0 -593
  145. package/dist/reapply-J2QUV7J2.js +0 -68
  146. package/dist/usage-MY3DIFBG.js +0 -11
@@ -3596,6 +3596,93 @@ var shellCommandStringOf = (shell, args) => {
3596
3596
  return operand === void 0 || operand.expands ? UNREADABLE2 : { kind: "readable", script: operand.text };
3597
3597
  };
3598
3598
 
3599
+ // ../contracts/src/phone-call-setup.ts
3600
+ var PHONE_CALL_SETUP_PATH = "/api/v1/server/calls";
3601
+ var PHONE_CALL_SETUP_TEST_CALL_PARAM = "testCall";
3602
+ var TEST_CALL_PROGRESS = ["calling", "confirmed", "not_confirmed", "not_answered", "failed"];
3603
+ var PHONE_NUMBER_REJECTIONS = [
3604
+ "not_a_number",
3605
+ "not_a_supported_country",
3606
+ "crown_dependency_number",
3607
+ "service_number",
3608
+ "not_a_mobile_number",
3609
+ "wrong_length",
3610
+ "country_not_available"
3611
+ ];
3612
+ var PHONE_CALL_SETUP_ERRORS = [
3613
+ "unauthorized",
3614
+ "no_site",
3615
+ "not_available",
3616
+ "invalid_input",
3617
+ "phone_rejected",
3618
+ "phone_required",
3619
+ "consent_required",
3620
+ "invalid_rules",
3621
+ "invalid_time_zone",
3622
+ "invalid_name",
3623
+ "country_not_available",
3624
+ "daily_test_limit",
3625
+ "number_test_limit",
3626
+ "no_minutes",
3627
+ "not_entitled",
3628
+ "daily_limit",
3629
+ "busy",
3630
+ "provider_failed",
3631
+ "unknown_call"
3632
+ ];
3633
+ var isRecord2 = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
3634
+ var isOneOf = (values, value) => typeof value === "string" && values.includes(value);
3635
+ var isNullableString = (value) => value === null || typeof value === "string";
3636
+ var isWholeNumber = (value) => typeof value === "number" && Number.isSafeInteger(value) && value >= 0;
3637
+ var isStringList = (value) => Array.isArray(value) && value.every((item) => typeof item === "string");
3638
+ var STATUS_BOOLEANS = ["confirmed", "consented", "enabled", "ready", "weekdaysOnly", "entitled"];
3639
+ var STATUS_COUNTS = ["callAfterSeconds", "startHour", "endHour", "secondsLeft", "testCallsLeftToday"];
3640
+ var parsePhoneCallSetupStatus = (value) => {
3641
+ if (!isRecord2(value)) return null;
3642
+ if (!isNullableString(value.number) || !isNullableString(value.firstName)) return null;
3643
+ if (typeof value.timeZone !== "string" || typeof value.suggestedCountry !== "string" || !isStringList(value.liveCountries)) return null;
3644
+ if (!STATUS_BOOLEANS.every((field) => typeof value[field] === "boolean")) return null;
3645
+ if (!STATUS_COUNTS.every((field) => isWholeNumber(value[field]))) return null;
3646
+ return {
3647
+ number: value.number,
3648
+ firstName: value.firstName,
3649
+ timeZone: value.timeZone,
3650
+ confirmed: value.confirmed === true,
3651
+ consented: value.consented === true,
3652
+ enabled: value.enabled === true,
3653
+ ready: value.ready === true,
3654
+ callAfterSeconds: Number(value.callAfterSeconds),
3655
+ startHour: Number(value.startHour),
3656
+ endHour: Number(value.endHour),
3657
+ weekdaysOnly: value.weekdaysOnly === true,
3658
+ entitled: value.entitled === true,
3659
+ secondsLeft: Number(value.secondsLeft),
3660
+ testCallsLeftToday: Number(value.testCallsLeftToday),
3661
+ liveCountries: value.liveCountries,
3662
+ suggestedCountry: value.suggestedCountry
3663
+ };
3664
+ };
3665
+ var parseRefusal = (value) => {
3666
+ if (!isOneOf(PHONE_CALL_SETUP_ERRORS, value.error)) return null;
3667
+ if (value.phoneRejection === void 0) return { ok: false, error: value.error };
3668
+ return isOneOf(PHONE_NUMBER_REJECTIONS, value.phoneRejection) ? { ok: false, error: value.error, phoneRejection: value.phoneRejection } : null;
3669
+ };
3670
+ var parsePhoneCallSetupReply = (value) => {
3671
+ if (!isRecord2(value)) return null;
3672
+ if (value.ok === false) return parseRefusal(value);
3673
+ if (value.ok !== true) return null;
3674
+ const status = parsePhoneCallSetupStatus(value.status);
3675
+ if (status === null) return null;
3676
+ if (value.testCallId === void 0) return { ok: true, status };
3677
+ return typeof value.testCallId === "string" && value.testCallId.length > 0 ? { ok: true, status, testCallId: value.testCallId } : null;
3678
+ };
3679
+ var parseTestCallReply = (value) => {
3680
+ if (!isRecord2(value)) return null;
3681
+ if (value.ok === true) return isOneOf(TEST_CALL_PROGRESS, value.progress) ? { ok: true, progress: value.progress } : null;
3682
+ if (value.ok === false && isOneOf(PHONE_CALL_SETUP_ERRORS, value.error)) return { ok: false, error: value.error };
3683
+ return null;
3684
+ };
3685
+
3599
3686
  // ../contracts/src/chatgpt-plugin.ts
3600
3687
  var CHATGPT_CONNECTOR_TEST = `@Pushary use ask_user to ask \u201C${CONNECTOR_SETUP_QUESTION}\u201D with type \u201Cconfirm\u201D and agentName \u201CChatGPT - Setup check\u201D. Wait for my answer and tell me which answer you received.`;
3601
3688
  var CHATGPT_CONNECTOR_STARTER = `@Pushary ${connectorStarterPrompt("Use agentName \u201CChatGPT - <task name>\u201D.")}`;
@@ -10187,6 +10274,7 @@ export {
10187
10274
  AGENT_QUESTION_DESCRIPTION_MAX,
10188
10275
  parseAgentQuestions,
10189
10276
  isTypedAnswerQuestion,
10277
+ isAgentQuestionSet,
10190
10278
  parseAgentQuestionAnswers,
10191
10279
  CODEX_QUESTION_TOOLS,
10192
10280
  isCodexQuestionTool,
@@ -10248,6 +10336,10 @@ export {
10248
10336
  claudeTurnEndOutput,
10249
10337
  PENDING_COMMAND_PREFIX,
10250
10338
  pendingCommandInstruction,
10339
+ PHONE_CALL_SETUP_PATH,
10340
+ PHONE_CALL_SETUP_TEST_CALL_PARAM,
10341
+ parsePhoneCallSetupReply,
10342
+ parseTestCallReply,
10251
10343
  degradedLine,
10252
10344
  API_KEY_PREFIX_PATTERN,
10253
10345
  isValidApiKey,
@@ -4,15 +4,15 @@ import {
4
4
  claimThrottle,
5
5
  releaseThrottle,
6
6
  reportEvent
7
- } from "./chunk-QP3TCKRZ.js";
7
+ } from "./chunk-N4OKAE65.js";
8
8
  import {
9
9
  deriveToolTarget,
10
10
  permissionDeniedAction
11
- } from "./chunk-IKC33YKC.js";
11
+ } from "./chunk-26GVUJMR.js";
12
12
  import {
13
13
  machineDecisionFor,
14
14
  wireVerdictFor
15
- } from "./chunk-HA2SRYYP.js";
15
+ } from "./chunk-55AHQF63.js";
16
16
 
17
17
  // src/machine-decision-audit.ts
18
18
  import { basename } from "path";
@@ -4,10 +4,10 @@ import {
4
4
  } from "./chunk-352FIVVH.js";
5
5
  import {
6
6
  fetchAsCredential
7
- } from "./chunk-TSR3FPGL.js";
7
+ } from "./chunk-DWMQZM52.js";
8
8
  import {
9
9
  getBaseUrl
10
- } from "./chunk-FTTSQAF4.js";
10
+ } from "./chunk-7IHVTLHK.js";
11
11
  import {
12
12
  writeJsonAtomicDurable
13
13
  } from "./chunk-TODDEIYG.js";
@@ -15,7 +15,7 @@ import {
15
15
  compressTranscriptRecord,
16
16
  redactSecretsFromContent,
17
17
  transcriptRecordPlaintext
18
- } from "./chunk-HA2SRYYP.js";
18
+ } from "./chunk-55AHQF63.js";
19
19
 
20
20
  // src/transcript-recipient-pin.ts
21
21
  import { createHash } from "crypto";
@@ -1,18 +1,18 @@
1
1
  import {
2
2
  CODEX_HOOK_STATUS
3
- } from "./chunk-4NHQAMSK.js";
3
+ } from "./chunk-R7NAG65X.js";
4
4
  import {
5
5
  HERMES_ALWAYS_ALLOWED_SHELL_RULE,
6
6
  HERMES_COMMAND_ALLOWLIST_KEY,
7
7
  HERMES_GATE_TOOLS_KEY,
8
8
  HERMES_SHELL_TOOL
9
- } from "./chunk-Q7WCDUFV.js";
9
+ } from "./chunk-2ABUBECK.js";
10
10
  import {
11
11
  retryAgentCommand
12
- } from "./chunk-2L52USKM.js";
12
+ } from "./chunk-Y553AEQU.js";
13
13
  import {
14
14
  NPX_LATEST_COMMAND
15
- } from "./chunk-AOP55JR2.js";
15
+ } from "./chunk-RZBCXPOV.js";
16
16
 
17
17
  // src/setup/codex-trust.ts
18
18
  var CODEX_TRUST_TELEMETRY = {
@@ -4,10 +4,10 @@ import {
4
4
  keyPrefix,
5
5
  readConfigFileKey,
6
6
  readMacAppKeyPrefix
7
- } from "./chunk-ZYDE6QRW.js";
7
+ } from "./chunk-Y23YO46U.js";
8
8
  import {
9
9
  NPX_LATEST_COMMAND
10
- } from "./chunk-AOP55JR2.js";
10
+ } from "./chunk-RZBCXPOV.js";
11
11
 
12
12
  // src/key-signed-out.ts
13
13
  var VERDICT_BY_CHECK = {
@@ -1,20 +1,23 @@
1
1
  import {
2
2
  notificationAnswerStep
3
- } from "./chunk-TMWXWBFP.js";
4
- import {
5
- canChangeApprovalSettings
6
- } from "./chunk-SZMDRBNK.js";
3
+ } from "./chunk-OOODAKCC.js";
7
4
  import {
8
5
  matchMacAccountStep,
9
6
  retryAgentCommand
10
- } from "./chunk-2L52USKM.js";
7
+ } from "./chunk-Y553AEQU.js";
8
+ import {
9
+ canChangeApprovalSettings
10
+ } from "./chunk-ONMAG5BF.js";
11
11
  import {
12
12
  EXIT
13
13
  } from "./chunk-BG4HHB7E.js";
14
14
  import {
15
15
  NPX_LATEST_COMMAND,
16
16
  npmExecSetupCommandFor
17
- } from "./chunk-AOP55JR2.js";
17
+ } from "./chunk-RZBCXPOV.js";
18
+ import {
19
+ LATEST_DIST_TAG
20
+ } from "./chunk-UQTQ6HPO.js";
18
21
 
19
22
  // src/setup/closing.ts
20
23
  var ACTIVITY_URL = "pushary.com/dashboard/agent/activity";
@@ -79,6 +82,7 @@ var commandSurfaceFor = (keyScope) => [
79
82
  { command: "pushary status", summary: "what this machine is connected to" },
80
83
  ...approvalCommandSummaries(canChangeApprovalSettings(keyScope)),
81
84
  { command: "pushary stats", summary: "what your agents have been asking" },
85
+ { command: "pushary calls on", summary: "get a phone call when an approval waits" },
82
86
  { command: "pushary claude", summary: "run Claude Code with encrypted transcript support" },
83
87
  { command: "pushary doctor", summary: "check the install" }
84
88
  ];
@@ -267,10 +271,11 @@ var RETRY_AGENT_LABEL = "Retry just this agent:";
267
271
  var INSTALL_NODE_STEP = "Install the current Node.js LTS, which includes npm, then run setup again.";
268
272
  var NPM_PREFIX_STEP = "npm can't install globally here. Use nvm, or run: npm config set prefix ~/.npm-global, then run setup again.";
269
273
  var NPM_FILE_IN_USE_STEP = "Close other terminals or editors that use Node, then run setup again.";
274
+ var releaseAgeRecoveryStep = (platform, agents) => `Your npm only installs releases older than its min-release-age. Run the newest release it allows: ${npmExecSetupCommandFor(platform, agents, LATEST_DIST_TAG)}`;
270
275
  var nextStepFor = (failure, releaseAgeRefusedAgents, recovery) => {
271
276
  switch (failure.remedy) {
272
277
  case "use-npm-policy":
273
- return { kind: "use-npm-policy", instruction: `Wait until this exact release meets your npm min-release-age policy. Resolve any unfinished-install warning before retrying, then run: ${npmExecSetupCommandFor(recovery.platform, releaseAgeRefusedAgents, recovery.version)}` };
278
+ return { kind: "use-npm-policy", instruction: releaseAgeRecoveryStep(recovery.platform, releaseAgeRefusedAgents) };
274
279
  case "install-node":
275
280
  return { kind: "install-node", instruction: INSTALL_NODE_STEP };
276
281
  case "fix-npm-prefix":
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  NPX_LATEST_COMMAND
3
- } from "./chunk-AOP55JR2.js";
3
+ } from "./chunk-RZBCXPOV.js";
4
4
 
5
5
  // src/config.ts
6
6
  import { readFileSync } from "fs";
@@ -1,17 +1,17 @@
1
1
  import {
2
2
  pusharyHookExecutable
3
- } from "./chunk-TPLTB256.js";
3
+ } from "./chunk-YGHHDDIM.js";
4
4
  import {
5
5
  bridgeResolvesToApp,
6
6
  cursorUserHooks,
7
7
  executableFileName,
8
8
  isBridgeLocator,
9
9
  liveBridgeProbe
10
- } from "./chunk-B3BOAYRO.js";
10
+ } from "./chunk-7WLKE7QN.js";
11
11
  import {
12
12
  atLeast,
13
13
  parseVersion
14
- } from "./chunk-IVOELLUK.js";
14
+ } from "./chunk-WAFJGQSE.js";
15
15
  import {
16
16
  CURSOR_GATE_COVERAGE,
17
17
  CURSOR_GATE_SCRIPT,
@@ -21,7 +21,7 @@ import {
21
21
  isCursorHookPayload,
22
22
  isRecord,
23
23
  toolsCoveredByGateEntry
24
- } from "./chunk-HA2SRYYP.js";
24
+ } from "./chunk-55AHQF63.js";
25
25
 
26
26
  // src/cursor-gate-registration.ts
27
27
  import { dirname, isAbsolute, join, resolve } from "path";
@@ -3,13 +3,13 @@ import {
3
3
  formatVersion,
4
4
  quoteIfNeeded,
5
5
  shellDoubleQuoted
6
- } from "./chunk-IVOELLUK.js";
6
+ } from "./chunk-WAFJGQSE.js";
7
7
  import {
8
8
  writeFileAtomic
9
9
  } from "./chunk-TODDEIYG.js";
10
10
  import {
11
11
  cmdShimScriptOf
12
- } from "./chunk-WIIMW5YO.js";
12
+ } from "./chunk-UQTQ6HPO.js";
13
13
  import {
14
14
  CLAUDE_MCP_PRETOOLUSE_MATCHER,
15
15
  CLAUDE_PRETOOLUSE_MATCHER,
@@ -22,7 +22,7 @@ import {
22
22
  PUSHARY_HOSTS,
23
23
  PUSHARY_TOOL_PREFIX,
24
24
  withHookHoldBudget
25
- } from "./chunk-HA2SRYYP.js";
25
+ } from "./chunk-55AHQF63.js";
26
26
 
27
27
  // src/setup/paths.ts
28
28
  import { createHash as createHash2 } from "crypto";
@@ -3,10 +3,10 @@ import {
3
3
  forkFinishWithUpgradeLock,
4
4
  installWithUpgradeLock,
5
5
  releaseAutoUpdateLock
6
- } from "./chunk-2MPT7YQK.js";
6
+ } from "./chunk-ZIKSHD5M.js";
7
7
  import {
8
8
  phoneStartIsRequired
9
- } from "./chunk-AGYD6XNI.js";
9
+ } from "./chunk-UH7GJHOO.js";
10
10
  import {
11
11
  describeAutoUpdateCheck,
12
12
  globalInstallLocation,
@@ -18,26 +18,28 @@ import {
18
18
  readAutoUpdateState,
19
19
  updateAutoUpdateState,
20
20
  upgradeEntryFor
21
- } from "./chunk-J7HSUQK2.js";
21
+ } from "./chunk-3F6HE5AK.js";
22
22
  import {
23
23
  autoUpdateLock,
24
24
  autoUpdateLog,
25
25
  autoUpdateState
26
- } from "./chunk-B3BOAYRO.js";
26
+ } from "./chunk-7WLKE7QN.js";
27
27
  import {
28
28
  execNpm,
29
29
  fetchLatestPublishedVersion,
30
30
  npmErrorMessage,
31
+ previewGlobalInstall,
31
32
  readGlobalCliInstallAt,
32
33
  readGlobalPrefix
33
- } from "./chunk-IVOELLUK.js";
34
+ } from "./chunk-WAFJGQSE.js";
34
35
  import {
35
36
  EXIT
36
37
  } from "./chunk-BG4HHB7E.js";
37
38
  import {
38
39
  NPX_LATEST_COMMAND
39
- } from "./chunk-AOP55JR2.js";
40
+ } from "./chunk-RZBCXPOV.js";
40
41
  import {
42
+ LATEST_DIST_TAG,
41
43
  commandsPackage,
42
44
  globalUpgradeEntry,
43
45
  isNewerVersion,
@@ -45,7 +47,7 @@ import {
45
47
  isSameMajorVersion,
46
48
  ownPackageRoot,
47
49
  packageVersionAt
48
- } from "./chunk-WIIMW5YO.js";
50
+ } from "./chunk-UQTQ6HPO.js";
49
51
 
50
52
  // src/global-upgrade.ts
51
53
  import { existsSync } from "fs";
@@ -185,6 +187,18 @@ var finishInstalledUpgrade = async (context, from, to, finishAttempts) => {
185
187
  };
186
188
  var settledFinishCheck = (state) => ({ result: "finish_blocked", from: state.from, to: state.to, detail: state.detail });
187
189
  var isInstallableRelease = (latest, installed) => latest !== void 0 && isNewerVersion(latest, installed) && isSameMajorVersion(latest, installed);
190
+ var releaseNpmAllows = (context, installed, published) => {
191
+ if (!isInstallableRelease(published, installed)) return published;
192
+ const preview = previewGlobalInstall({
193
+ packageName: context.location.packageName,
194
+ version: LATEST_DIST_TAG,
195
+ prefix: context.location.prefix,
196
+ timeoutMs: INSTALL_TIMEOUT_MS
197
+ }, context.runNpm);
198
+ if (preview.kind === "resolved") return preview.version;
199
+ return preview.kind === "refused_for_release_age" ? installed : published;
200
+ };
201
+ var npmPolicyHoldDetail = (published, allowed) => published !== void 0 && published !== allowed && isNewerVersion(published, allowed) ? `${published} is not yet allowed by this machine's npm settings, such as min-release-age` : void 0;
188
202
  var checkAndInstall = async (context) => {
189
203
  const installed = packageVersionAt(context.packageRoot);
190
204
  if (installed === void 0 || !isReleaseVersion(installed)) {
@@ -192,11 +206,12 @@ var checkAndInstall = async (context) => {
192
206
  }
193
207
  const previous = readAutoUpdateState(context.statePath);
194
208
  const pendingFinish = hasRetryableUpgradeFinish(previous, installed);
195
- const latest = await fetchLatestPublishedVersion({ packageName: context.location.packageName, fetchImpl: context.fetchImpl });
209
+ const published = await fetchLatestPublishedVersion({ packageName: context.location.packageName, fetchImpl: context.fetchImpl });
210
+ const latest = releaseNpmAllows(context, installed, published);
196
211
  if (pendingFinish && !isInstallableRelease(latest, installed)) return finishInstalledUpgrade(context, previous.from, installed, nextFinishAttempt(previous, installed));
197
212
  if (hasSettledUpgradeFinish(previous, installed) && !isInstallableRelease(latest, installed)) return settledFinishCheck(previous);
198
213
  if (latest === void 0) return { result: "failed", from: installed, detail: UNREACHABLE_REGISTRY };
199
- if (!isNewerVersion(latest, installed)) return { result: "current", from: installed };
214
+ if (!isNewerVersion(latest, installed)) return { result: "current", from: installed, detail: npmPolicyHoldDetail(published, installed) };
200
215
  if (!isSameMajorVersion(latest, installed)) {
201
216
  return { result: "needs_manual", from: installed, to: latest, detail: newMajorDetail(latest) };
202
217
  }
@@ -1,25 +1,25 @@
1
1
  import {
2
2
  openClawLauncherCandidates
3
- } from "./chunk-CCKY3JDB.js";
3
+ } from "./chunk-ATI5XO3E.js";
4
4
  import {
5
5
  openCodeConfigDirFrom
6
- } from "./chunk-GLDSXDRV.js";
6
+ } from "./chunk-UJT32RSQ.js";
7
7
  import {
8
8
  nativeClaudeInstallPath
9
9
  } from "./chunk-CYTPQDQY.js";
10
10
  import {
11
11
  grokHome
12
- } from "./chunk-MTITL2IG.js";
12
+ } from "./chunk-LVGRSC44.js";
13
13
  import {
14
14
  claudeConfigDir,
15
15
  clineDataDirectory,
16
16
  codexHomeFrom,
17
17
  openClawEnvironmentOf,
18
18
  openClawPathsFrom
19
- } from "./chunk-B3BOAYRO.js";
19
+ } from "./chunk-7WLKE7QN.js";
20
20
  import {
21
21
  HOOK_COMPATIBLE_PROFILES
22
- } from "./chunk-HA2SRYYP.js";
22
+ } from "./chunk-55AHQF63.js";
23
23
 
24
24
  // src/vscode-config.ts
25
25
  import { homedir } from "os";
@@ -1,17 +1,17 @@
1
1
  import {
2
2
  needsShell
3
- } from "./chunk-H6CL3T2S.js";
3
+ } from "./chunk-Y6ILCLKE.js";
4
4
  import {
5
5
  OPENCLAW_ENVIRONMENT_KEYS,
6
6
  openClawEnvironmentOf,
7
7
  openClawPathsFrom
8
- } from "./chunk-B3BOAYRO.js";
8
+ } from "./chunk-7WLKE7QN.js";
9
9
  import {
10
10
  resolvePathBinary
11
- } from "./chunk-IVOELLUK.js";
11
+ } from "./chunk-WAFJGQSE.js";
12
12
  import {
13
13
  isRecord
14
- } from "./chunk-HA2SRYYP.js";
14
+ } from "./chunk-55AHQF63.js";
15
15
 
16
16
  // src/openclaw/wiring-state.ts
17
17
  var OPENCLAW_PLUGIN_ID = "pushary";
@@ -14,7 +14,7 @@ import {
14
14
  reachVerdict,
15
15
  reachesYou,
16
16
  verifyDelivery
17
- } from "./chunk-TMWXWBFP.js";
17
+ } from "./chunk-OOODAKCC.js";
18
18
  import {
19
19
  describeRevokeAttempt,
20
20
  keyNoLongerAccepted,
@@ -29,20 +29,20 @@ import {
29
29
  isCI,
30
30
  terminalColumns,
31
31
  useColor
32
- } from "./chunk-GHHVXARK.js";
32
+ } from "./chunk-XWCLKWKP.js";
33
33
  import {
34
34
  checkApiKey
35
- } from "./chunk-PBPQRJ2T.js";
35
+ } from "./chunk-I5HXAELM.js";
36
36
  import {
37
37
  reportedInstallSource
38
- } from "./chunk-UDLWNOXX.js";
38
+ } from "./chunk-FZCEPG6J.js";
39
39
  import {
40
40
  NPX_LATEST_COMMAND
41
- } from "./chunk-AOP55JR2.js";
41
+ } from "./chunk-RZBCXPOV.js";
42
42
  import {
43
43
  NO_PAIRING_COMPUTER,
44
44
  PAIR_TTL_SECONDS
45
- } from "./chunk-HA2SRYYP.js";
45
+ } from "./chunk-55AHQF63.js";
46
46
 
47
47
  // src/onboarding.ts
48
48
  import qrcodeTerminal from "qrcode-terminal";
@@ -9,7 +9,7 @@ import {
9
9
  isSetupConnectMode,
10
10
  isValidApiKey,
11
11
  normalizeAgentId
12
- } from "./chunk-HA2SRYYP.js";
12
+ } from "./chunk-55AHQF63.js";
13
13
 
14
14
  // src/setup/options.ts
15
15
  var AGENT_CHOICES = SETUP_AGENT_CHOICES;
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  readConfigFileKey
3
- } from "./chunk-ZYDE6QRW.js";
3
+ } from "./chunk-Y23YO46U.js";
4
4
 
5
5
  // src/bell/fleet.ts
6
6
  import { closeSync, constants, futimesSync, lstatSync, mkdirSync, openSync, readdirSync, unlinkSync } from "fs";
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  parseSseMessages
3
- } from "./chunk-TZJR5ESF.js";
3
+ } from "./chunk-OSCZ4MNE.js";
4
4
  import {
5
5
  fetchAsCredential
6
- } from "./chunk-TSR3FPGL.js";
6
+ } from "./chunk-DWMQZM52.js";
7
7
  import {
8
8
  NPX_LATEST_COMMAND
9
- } from "./chunk-AOP55JR2.js";
9
+ } from "./chunk-RZBCXPOV.js";
10
10
 
11
11
  // src/mcp-stdio-bridge.ts
12
12
  var MCP_BRIDGE_BINARY = "pushary-mcp";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  DEFAULT_SESSION
3
- } from "./chunk-QP3TCKRZ.js";
3
+ } from "./chunk-N4OKAE65.js";
4
4
 
5
5
  // src/answer.ts
6
6
  var isDeferAnswer = (value) => value === "defer";
@@ -13,16 +13,16 @@ import {
13
13
  } from "./chunk-WHB622LP.js";
14
14
  import {
15
15
  keyPrefix
16
- } from "./chunk-ZYDE6QRW.js";
16
+ } from "./chunk-Y23YO46U.js";
17
17
  import {
18
18
  getBaseUrl
19
- } from "./chunk-FTTSQAF4.js";
19
+ } from "./chunk-7IHVTLHK.js";
20
20
  import {
21
21
  NPX_LATEST_COMMAND
22
- } from "./chunk-AOP55JR2.js";
22
+ } from "./chunk-RZBCXPOV.js";
23
23
  import {
24
24
  isValidApiKey
25
- } from "./chunk-HA2SRYYP.js";
25
+ } from "./chunk-55AHQF63.js";
26
26
 
27
27
  // src/cli/login-ui.ts
28
28
  import { hostname } from "os";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  SETUP_FLAGS
3
- } from "./chunk-FGVBFDNV.js";
3
+ } from "./chunk-AVRRD6AY.js";
4
4
  import {
5
5
  parseFlags
6
6
  } from "./chunk-YPY4YCIZ.js";
@@ -9,7 +9,7 @@ import {
9
9
  } from "./chunk-YU2EUD7O.js";
10
10
  import {
11
11
  NPX_LATEST_COMMAND
12
- } from "./chunk-AOP55JR2.js";
12
+ } from "./chunk-RZBCXPOV.js";
13
13
  import {
14
14
  CLAUDE_CONNECTOR_GUIDE,
15
15
  CLAUDE_CONNECTOR_STEPS,
@@ -17,7 +17,7 @@ import {
17
17
  CLAUDE_CONNECTOR_URL,
18
18
  COWORK_CONNECTOR_LIMIT,
19
19
  COWORK_STANDING_INSTRUCTIONS
20
- } from "./chunk-HA2SRYYP.js";
20
+ } from "./chunk-55AHQF63.js";
21
21
 
22
22
  // src/cli/cowork.ts
23
23
  import { readFileSync } from "fs";
@@ -5,7 +5,7 @@ import {
5
5
  MCP_CREDENTIAL_REJECTION_BODY,
6
6
  isRecord,
7
7
  responseRejectsCredential
8
- } from "./chunk-HA2SRYYP.js";
8
+ } from "./chunk-55AHQF63.js";
9
9
 
10
10
  // src/credential-rejection.ts
11
11
  import { createHash, randomUUID } from "crypto";
@@ -9,20 +9,20 @@ import {
9
9
  installedCodexApp,
10
10
  readCodexAppRuntime,
11
11
  shellQuoted
12
- } from "./chunk-N2LWKWNY.js";
12
+ } from "./chunk-Z5DOTAFI.js";
13
+ import {
14
+ CODEX_APP_LAUNCH_AT_LOGIN_VERB,
15
+ CODEX_APP_LAUNCH_VARIABLE
16
+ } from "./chunk-U4P4NDVB.js";
13
17
  import {
14
18
  writeHuman
15
19
  } from "./chunk-QCGNGEGE.js";
16
20
  import {
17
21
  xml
18
- } from "./chunk-K3I2NMEF.js";
22
+ } from "./chunk-WNIDBPT2.js";
19
23
  import {
20
24
  writeFileAtomic
21
25
  } from "./chunk-TODDEIYG.js";
22
- import {
23
- CODEX_APP_LAUNCH_AT_LOGIN_VERB,
24
- CODEX_APP_LAUNCH_VARIABLE
25
- } from "./chunk-U4P4NDVB.js";
26
26
 
27
27
  // src/codex-app-cards-switch.ts
28
28
  import { execFileSync as execFileSync2 } from "child_process";
@@ -1,22 +1,22 @@
1
1
  import {
2
2
  cursorGateOwnsClaudeCall,
3
3
  readCursorGateRegistration
4
- } from "./chunk-GTYVNVBZ.js";
4
+ } from "./chunk-7VXHWU7A.js";
5
5
  import {
6
6
  registerTranscript
7
- } from "./chunk-C6PAIHLP.js";
7
+ } from "./chunk-MGOBIHXH.js";
8
8
  import {
9
9
  namedEvent
10
- } from "./chunk-MTITL2IG.js";
10
+ } from "./chunk-LVGRSC44.js";
11
11
  import {
12
12
  writeDegraded
13
- } from "./chunk-CS4Z44F5.js";
13
+ } from "./chunk-IHYKSPWH.js";
14
14
  import {
15
15
  claudeShapedHookInput,
16
16
  hookCompatibleProfileBySource,
17
17
  isGrokHookPayload,
18
18
  isGrokSessionEndStop
19
- } from "./chunk-HA2SRYYP.js";
19
+ } from "./chunk-55AHQF63.js";
20
20
 
21
21
  // src/tool-hook-input.ts
22
22
  var OPTIONAL_TEXT_FIELDS = ["hook_event_name", "session_id", "cwd", "transcript_path", "tool_use_id", "permission_mode", "cursor_version"];