pushary 1.9.283 → 1.9.285

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 +15 -0
  2. package/README.md +3 -1
  3. package/dist/{api-OJRU3MYI.js → api-4MGFAW5H.js} +12 -12
  4. package/dist/bin/pushary-ask.js +14 -14
  5. package/dist/bin/pushary-audit.js +3 -3
  6. package/dist/bin/pushary-bell-hook.js +28 -28
  7. package/dist/bin/pushary-bell.js +11 -11
  8. package/dist/bin/pushary-calls.js +14 -14
  9. package/dist/bin/pushary-claude.js +25 -25
  10. package/dist/bin/pushary-clean.js +39 -39
  11. package/dist/bin/pushary-codex-bridge.js +22 -22
  12. package/dist/bin/pushary-codex-hook.js +38 -36
  13. package/dist/bin/pushary-codex-session.js +8 -8
  14. package/dist/bin/pushary-codex.js +16 -16
  15. package/dist/bin/pushary-connect.js +35 -35
  16. package/dist/bin/pushary-cowork.js +5 -5
  17. package/dist/bin/pushary-daemon.js +115 -52
  18. package/dist/bin/pushary-disconnect.js +30 -30
  19. package/dist/bin/pushary-display-hook.js +16 -1
  20. package/dist/bin/pushary-doctor.js +60 -54
  21. package/dist/bin/pushary-elicitation-hook.js +27 -27
  22. package/dist/bin/pushary-gemini-bridge.js +17 -17
  23. package/dist/bin/pushary-gemini-hook.js +31 -31
  24. package/dist/bin/pushary-hook.js +35 -35
  25. package/dist/bin/pushary-login.js +46 -43
  26. package/dist/bin/pushary-logout.js +31 -31
  27. package/dist/bin/pushary-mcp.js +12 -12
  28. package/dist/bin/pushary-mode.js +15 -15
  29. package/dist/bin/pushary-notification-hook.js +27 -27
  30. package/dist/bin/pushary-opencode-bridge.js +21 -21
  31. package/dist/bin/pushary-opencode-hook.js +32 -32
  32. package/dist/bin/pushary-permission-denied-hook.js +34 -34
  33. package/dist/bin/pushary-permission-hook.js +35 -35
  34. package/dist/bin/pushary-post-hook.js +28 -28
  35. package/dist/bin/pushary-prompt-hook.js +27 -27
  36. package/dist/bin/pushary-session-end-hook.js +27 -27
  37. package/dist/bin/pushary-session-start-hook.js +39 -39
  38. package/dist/bin/pushary-sessions.js +12 -12
  39. package/dist/bin/pushary-setup.js +65 -61
  40. package/dist/bin/pushary-stats.js +5 -5
  41. package/dist/bin/pushary-status.js +36 -36
  42. package/dist/bin/pushary-stop-hook.js +27 -27
  43. package/dist/bin/pushary-stopfailure-hook.js +27 -27
  44. package/dist/bin/pushary-suggestions.js +15 -15
  45. package/dist/bin/pushary-transcript-register.js +16 -16
  46. package/dist/bin/pushary-transcripts.js +25 -25
  47. package/dist/bin/pushary-upgrade.js +54 -50
  48. package/dist/bin/pushary-wait.js +24 -24
  49. package/dist/bin/pushary.js +7 -7
  50. package/dist/{chunk-K4YUNJDY.js → chunk-2HA6AGLM.js} +8 -7
  51. package/dist/{chunk-6VK43QVL.js → chunk-2MQUKVMW.js} +7 -7
  52. package/dist/{chunk-JSYYVEVW.js → chunk-2NUVES3K.js} +4 -4
  53. package/dist/{chunk-RJ5HUNEE.js → chunk-2SW5J3J2.js} +1 -1
  54. package/dist/{chunk-TBCHTCA2.js → chunk-44RAWLI3.js} +1 -1
  55. package/dist/{chunk-AKUQLREQ.js → chunk-4KPUTQPG.js} +4 -4
  56. package/dist/{chunk-5YSFXK2C.js → chunk-4TOJHGPX.js} +2 -2
  57. package/dist/{chunk-7OOQJD33.js → chunk-4Y7RNQO5.js} +3 -3
  58. package/dist/{chunk-J2UDVVCB.js → chunk-52XX2DYG.js} +6 -6
  59. package/dist/{chunk-SIP2BFVS.js → chunk-5DF6YZPG.js} +63 -7
  60. package/dist/{chunk-EGZUBQL6.js → chunk-5FZ2K4UV.js} +1 -1
  61. package/dist/{chunk-VO22G4MS.js → chunk-5IJ252DT.js} +7 -7
  62. package/dist/{chunk-UOABAWQ4.js → chunk-6T367UEE.js} +6 -6
  63. package/dist/{chunk-I67ZGYEY.js → chunk-6VN46PV6.js} +5 -5
  64. package/dist/{chunk-XKSIMUZM.js → chunk-6YVIWLL2.js} +2 -2
  65. package/dist/{chunk-EUO5U5V7.js → chunk-6ZNQDNFS.js} +11 -7
  66. package/dist/{chunk-UIOTVHQB.js → chunk-6ZRSO6PM.js} +2 -2
  67. package/dist/{chunk-M3MD5Y2O.js → chunk-745DB5AH.js} +5 -5
  68. package/dist/{chunk-CPNPPYQL.js → chunk-77F7TPQE.js} +3 -3
  69. package/dist/{chunk-JWMDRKAO.js → chunk-7GHHQFHH.js} +10 -10
  70. package/dist/{chunk-26RKJL2X.js → chunk-7O4XAG63.js} +2 -2
  71. package/dist/{chunk-EANJH5FQ.js → chunk-7U43GCFH.js} +5 -5
  72. package/dist/{chunk-XC2O4MA3.js → chunk-7ZCIUEBP.js} +1 -1
  73. package/dist/{chunk-YSR7QVMN.js → chunk-A533F6TF.js} +3 -3
  74. package/dist/{chunk-AIBGURF2.js → chunk-ACAMCU2Y.js} +1 -1
  75. package/dist/{chunk-7VL6QZ3C.js → chunk-BCYXPGOQ.js} +3 -3
  76. package/dist/{chunk-QU2NSBXD.js → chunk-BETDBGC7.js} +2 -2
  77. package/dist/{chunk-E4WNMH33.js → chunk-CDOFQJ2Z.js} +1 -1
  78. package/dist/{chunk-3B3UE65E.js → chunk-CE4D3FCO.js} +12 -12
  79. package/dist/{chunk-HX3RPHIH.js → chunk-CITB5W5V.js} +8 -8
  80. package/dist/{chunk-IASJJRQV.js → chunk-CP65XDI7.js} +3 -3
  81. package/dist/{chunk-N6RX3ZWB.js → chunk-DBBLMMBL.js} +1 -1
  82. package/dist/{chunk-ATWYNEN4.js → chunk-DYIU6SSG.js} +1 -1
  83. package/dist/{chunk-JP7RRADP.js → chunk-ESTQIKTS.js} +1 -1
  84. package/dist/{chunk-YARDFZND.js → chunk-EZBNWOZM.js} +2 -2
  85. package/dist/{chunk-GS4D3NTI.js → chunk-FLUKEERY.js} +5 -5
  86. package/dist/{chunk-B7SK3EXB.js → chunk-FQC76AYR.js} +5 -5
  87. package/dist/{chunk-JHYVJYGR.js → chunk-HHGZZIKD.js} +6 -6
  88. package/dist/{chunk-TVQWBXV2.js → chunk-HOAWHKM3.js} +20 -18
  89. package/dist/{chunk-SWGR226D.js → chunk-HWIDUN2Q.js} +10 -10
  90. package/dist/{chunk-L2BJVSVI.js → chunk-IGDC2GMU.js} +2 -2
  91. package/dist/{chunk-5RSXB22M.js → chunk-IVIG4LUZ.js} +4 -4
  92. package/dist/{chunk-VYLJWG3B.js → chunk-JBK7WRPB.js} +1 -1
  93. package/dist/{chunk-Y5INUJ2S.js → chunk-JMPGFGCM.js} +3 -3
  94. package/dist/{chunk-XOZZ7LFC.js → chunk-JPCVW3BA.js} +2 -2
  95. package/dist/{chunk-IP6BVZZL.js → chunk-KI6IY52L.js} +6 -6
  96. package/dist/{chunk-CA7VX4KS.js → chunk-L4PIOZIP.js} +2 -2
  97. package/dist/{chunk-73SEBA5G.js → chunk-LAPJNDQG.js} +4 -4
  98. package/dist/{chunk-2JWCBGFX.js → chunk-LF2BFP3F.js} +3 -3
  99. package/dist/{chunk-SL6ZTQA2.js → chunk-LP2VGPHZ.js} +1 -1
  100. package/dist/{chunk-OOSOLBO2.js → chunk-MBUENM7S.js} +1 -1
  101. package/dist/{chunk-QSPYUDHD.js → chunk-MTSTB2GL.js} +1 -1
  102. package/dist/{chunk-4RPG3SFC.js → chunk-NAD2JOKF.js} +16 -6
  103. package/dist/{chunk-6GCGRTR7.js → chunk-O2BQDYHI.js} +1 -1
  104. package/dist/{chunk-OYRQZWXW.js → chunk-P47NDCPH.js} +2 -2
  105. package/dist/{chunk-CWQU75DS.js → chunk-P4FD4WGC.js} +3 -3
  106. package/dist/{chunk-FQWIGDXG.js → chunk-PAY473GK.js} +1 -1
  107. package/dist/{chunk-FIAXP3LF.js → chunk-PCKCLSGP.js} +1 -1
  108. package/dist/{chunk-T5D3F6ME.js → chunk-PGCMTR5N.js} +5 -5
  109. package/dist/{chunk-CBA4AVFT.js → chunk-PMHOO355.js} +4 -4
  110. package/dist/{chunk-7Y3NHQSD.js → chunk-PU5MHVE2.js} +5 -5
  111. package/dist/{chunk-SAFK3BQB.js → chunk-QQDGYEWB.js} +1 -1
  112. package/dist/{chunk-7PRPLYOT.js → chunk-QTNBPBYN.js} +1 -1
  113. package/dist/{chunk-6MUWWEYX.js → chunk-QWBPCCFQ.js} +7 -7
  114. package/dist/{chunk-OTIXTZA6.js → chunk-RRDQYSNT.js} +2 -2
  115. package/dist/{chunk-M6T24IVX.js → chunk-RT4KU4JT.js} +1 -1
  116. package/dist/{chunk-HKXFHEB4.js → chunk-SNR7BUWT.js} +4 -4
  117. package/dist/{chunk-JPSCKMYH.js → chunk-SRGKENVI.js} +1 -1
  118. package/dist/{chunk-IX2DKVF2.js → chunk-V5LIBKOQ.js} +4 -4
  119. package/dist/{chunk-FNENGMPK.js → chunk-V77JIYBK.js} +1 -1
  120. package/dist/{chunk-4ZWNL3CK.js → chunk-VFPXC2HE.js} +1 -1
  121. package/dist/{chunk-DTYSJP6K.js → chunk-VVXWDBZK.js} +2 -2
  122. package/dist/{chunk-PUNIACRA.js → chunk-VZXBPQIX.js} +4 -4
  123. package/dist/{chunk-OQVYOMNI.js → chunk-WKXO22AI.js} +4 -4
  124. package/dist/{chunk-NWFO2WGB.js → chunk-WUDKVYSQ.js} +2 -2
  125. package/dist/{chunk-XGWKMWKM.js → chunk-WY2HGMNV.js} +3 -3
  126. package/dist/{chunk-YG5TIW73.js → chunk-XCPZ64EV.js} +3 -3
  127. package/dist/{chunk-ZUHELFIM.js → chunk-XNWLSADP.js} +5 -4
  128. package/dist/{chunk-IPJRN56U.js → chunk-XV7ZL2JN.js} +5 -5
  129. package/dist/{chunk-KMMO3K2C.js → chunk-YJ6OARPK.js} +21 -14
  130. package/dist/{chunk-EDVQWYSU.js → chunk-YPDWI6KV.js} +4 -4
  131. package/dist/{chunk-AOLCAXRB.js → chunk-YQVGPAZV.js} +1 -1
  132. package/dist/{chunk-6RAIYGKT.js → chunk-YV7BK4UO.js} +1 -1
  133. package/dist/{codex-app-cards-switch-2ZVORWWV.js → codex-app-cards-switch-JPDKYQ5R.js} +11 -11
  134. package/dist/{codex-card-routing-PLD74MXM.js → codex-card-routing-BDAI3C5X.js} +2 -2
  135. package/dist/{codex-desktop-launch-BDR7I3AT.js → codex-desktop-launch-WELLPX34.js} +3 -3
  136. package/dist/{codex-session-launch-HZJWXLWT.js → codex-session-launch-BAVV7JK7.js} +21 -21
  137. package/dist/{config-DY2KBMHL.js → config-L57XINHY.js} +3 -3
  138. package/dist/{global-upgrade-H4CHC3PX.js → global-upgrade-ZD6PXYIH.js} +9 -9
  139. package/dist/{identity-BEGPK37L.js → identity-ZTXVU75K.js} +4 -4
  140. package/dist/{live-capabilities-W4YZO6AH.js → live-capabilities-TFAUA6FN.js} +4 -4
  141. package/dist/{paths-J7L3IDOW.js → paths-3VDI3LAG.js} +3 -3
  142. package/dist/{reapply-3ECJVIWC.js → reapply-DWXARPLQ.js} +34 -34
  143. package/dist/src/index.js +33 -33
  144. package/dist/{upgrade-lock-UPLYK4CW.js → upgrade-lock-KNVJBN5G.js} +4 -4
  145. package/dist/{usage-ZDDF7U5L.js → usage-YDADZALP.js} +3 -3
  146. package/package.json +1 -1
@@ -4,16 +4,16 @@ import {
4
4
  NpmMissingError,
5
5
  NpmPermissionError,
6
6
  NpmReleaseAgeError
7
- } from "./chunk-HKXFHEB4.js";
7
+ } from "./chunk-SNR7BUWT.js";
8
8
  import {
9
9
  writeFileAtomic
10
10
  } from "./chunk-PM2NRK6Y.js";
11
11
  import {
12
12
  NPX_LATEST_COMMAND
13
- } from "./chunk-QU2NSBXD.js";
13
+ } from "./chunk-BETDBGC7.js";
14
14
  import {
15
15
  readSetupAgentFailures
16
- } from "./chunk-4RPG3SFC.js";
16
+ } from "./chunk-NAD2JOKF.js";
17
17
 
18
18
  // src/setup/config-write.ts
19
19
  var AgentConfigWriteError = class extends Error {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  isRecord
3
- } from "./chunk-4RPG3SFC.js";
3
+ } from "./chunk-NAD2JOKF.js";
4
4
 
5
5
  // src/config-document.ts
6
6
  import { parse, stringify } from "smol-toml";
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  RETRY_ACK,
6
6
  refusedReceiptMessage
7
- } from "./chunk-E4WNMH33.js";
7
+ } from "./chunk-CDOFQJ2Z.js";
8
8
 
9
9
  // src/command-receipts.ts
10
10
  import { randomUUID } from "crypto";
@@ -6,7 +6,7 @@ import {
6
6
  OPENCODE_PLUGIN_PLACEHOLDER,
7
7
  OPENCODE_PLUGIN_SIBLING,
8
8
  OPENCODE_PLUGIN_SIBLING_CONTENTS
9
- } from "./chunk-ATWYNEN4.js";
9
+ } from "./chunk-DYIU6SSG.js";
10
10
 
11
11
  // src/opencode-runtime-bundle.ts
12
12
  var openCodeRuntimeSource = `import { spawn } from 'child_process';
@@ -4940,12 +4940,13 @@ var OUTBOX_BACKLOG_STALL_MS = 20 * MINUTE_MS;
4940
4940
  var PUSHARY_HOSTS = ["pushary.com", "www.pushary.com"];
4941
4941
 
4942
4942
  // ../contracts/src/key-scope.ts
4943
- var KEY_SCOPES = ["full_access", "agent", "connector", "bound"];
4943
+ var KEY_SCOPES = ["full_access", "agent", "connector", "bound", "enroll"];
4944
4944
  var KEY_SCOPE = {
4945
4945
  full_access: "full_access",
4946
4946
  agent: "agent",
4947
4947
  connector: "connector",
4948
- bound: "bound"
4948
+ bound: "bound",
4949
+ enroll: "enroll"
4949
4950
  };
4950
4951
  var normalizeKeyScope = (value) => typeof value === "string" && KEY_SCOPES.includes(value) ? value : null;
4951
4952
 
@@ -12383,6 +12384,8 @@ var GATE_ALLOW_SOURCE = {
12383
12384
  allowlist: "allowlist",
12384
12385
  policy: "policy"
12385
12386
  };
12387
+ var EXPLICIT_ANSWER_ONLY = { onlyAnExplicitAnswerRunsIt: true };
12388
+ var onlyAnExplicitAnswerRunsTheCall = (verdict) => verdict.kind === "gate" && verdict.onlyAnExplicitAnswerRunsIt === true;
12386
12389
  var isGateRefusal = (verdict) => verdict.kind === "kill" || verdict.kind === "deny";
12387
12390
  var PUSHARY_TOOL_PREFIX = "mcp__pushary__";
12388
12391
  var PUSHARY_CONNECTOR_TOOL_PREFIXES = ["mcp__claude_ai_Pushary__", "mcp__plugin_pushary_pushary__"];
@@ -12627,7 +12630,11 @@ var GATE_VERDICT_RESTRAINT = { allow: 0, defer: 1, gate: 2, deny: 3, kill: 4 };
12627
12630
  var strictestGateVerdictOf = (strictest, verdict) => {
12628
12631
  const restraint = GATE_VERDICT_RESTRAINT[verdict.kind] - GATE_VERDICT_RESTRAINT[strictest.kind];
12629
12632
  if (restraint !== 0) return restraint > 0 ? verdict : strictest;
12630
- return strictest.kind === "gate" && verdict.kind === "gate" ? { ...strictest, policy: strictestReadingOf(verdict.policy, strictest.policy) } : strictest;
12633
+ return strictest.kind === "gate" && verdict.kind === "gate" ? {
12634
+ ...strictest,
12635
+ policy: strictestReadingOf(verdict.policy, strictest.policy),
12636
+ ...onlyAnExplicitAnswerRunsTheCall(strictest) || onlyAnExplicitAnswerRunsTheCall(verdict) ? EXPLICIT_ANSWER_ONLY : {}
12637
+ } : strictest;
12631
12638
  };
12632
12639
  var policyOfReadings = (readings) => readings.policy;
12633
12640
  var toolInputsOfReadings = (readings) => readings.toolInputs;
@@ -12916,7 +12923,7 @@ var verdictWithoutTheAsksThatMayApprove = (input, original) => {
12916
12923
  const fallback = { ...input, config: withoutAsksThatMayApproveWithoutAnAnswer(input.config) };
12917
12924
  const verdict = gateVerdictOfTheCall(fallback);
12918
12925
  if (verdict.kind !== "deny" || namesAnArgumentOf(verdict.policy.tool, input.toolName)) return verdict;
12919
- const explicitAnswer = { ...original, policy: { ...original.policy, timeoutAction: "wait" } };
12926
+ const explicitAnswer = { ...original, policy: { ...original.policy, timeoutAction: "wait" }, ...EXPLICIT_ANSWER_ONLY };
12920
12927
  return strictestGateVerdictOf(explicitAnswer, gateVerdictOfTheCall(withoutStandingDeniesOfTheWholeTool(fallback)));
12921
12928
  };
12922
12929
  var theWholeVerdictThatDoesNotApprove = (withoutTheAsks, verdict) => withoutTheAsks.kind === "gate" && !gateMayApproveWithoutAnAnswer(withoutTheAsks) ? withoutTheAsks : strictestGateVerdictOf(verdict, withoutTheAsks);
@@ -13041,7 +13048,8 @@ var refusesWhenUnanswered = ({ mode, timeoutAction }) => mode === "push_only" &&
13041
13048
  var codexDeferredPreToolUse = () => ({ kind: "deny", reason: CODEX_PRE_TOOL_USE_HAND_BACK.reason });
13042
13049
  var isScopeReason = (scopeReason) => typeof scopeReason === "string" && scopeReason.length > 0;
13043
13050
  var scopeBreachReasonOf = (verdict) => verdict.kind === "gate" && isScopeReason(verdict.scopeReason) ? verdict.scopeReason : void 0;
13044
- var onlyCodexPreToolUseCanAsk = (verdict, permissionMode) => verdict.kind === "gate" && (scopeBreachReasonOf(verdict) !== void 0 || !codexRaisesItsOwnPrompts(permissionMode));
13051
+ var gateOutranksTheNativeMode = (verdict) => scopeBreachReasonOf(verdict) !== void 0 || onlyAnExplicitAnswerRunsTheCall(verdict);
13052
+ var onlyCodexPreToolUseCanAsk = (verdict, permissionMode) => verdict.kind === "gate" && (gateOutranksTheNativeMode(verdict) || !codexRaisesItsOwnPrompts(permissionMode));
13045
13053
  var runsACommandThatNeedsAPersonUnderOneArrowReading = ({ toolName, toolInputs }) => SHELL_DIALECT_BY_TOOL.has(toolName) && toolInputs.some((toolInput) => {
13046
13054
  const command = extractPolicyArg(toolName, toolInput);
13047
13055
  return command !== void 0 && (commandNeedsAPerson(toolName, command) || commandWritesThroughARemoteApi(command));
@@ -13106,7 +13114,7 @@ var refusalOfAFloorHeldEditNobodyIsAskedAbout = (policy) => ({
13106
13114
  var codexPreToolUseDelivery = (input, verdict, call) => {
13107
13115
  if (verdict.kind !== "gate" || !codexCallNeedsAPerson(input, verdict, call)) return CODEX_PRE_TOOL_USE_PASSES;
13108
13116
  const floorHoldsAnAllow = theProtectedFileFloorHoldsAnAllow(input);
13109
- const noPromptOfItsOwn = floorHoldsAnAllow || codexDestructiveCallIsDecidedOnThePhone(input, verdict.policy.mode, call) || codexHasNoPromptOfItsOwn(scopeBreachReasonOf(verdict), call.permissionMode);
13117
+ const noPromptOfItsOwn = floorHoldsAnAllow || codexDestructiveCallIsDecidedOnThePhone(input, verdict.policy.mode, call) || codexHasNoPromptOfItsOwn(scopeBreachReasonOf(verdict), call.permissionMode) || onlyAnExplicitAnswerRunsTheCall(verdict);
13110
13118
  const mode = noPromptOfItsOwn ? approvalModeWithoutLocalPrompt(verdict.policy.mode) : verdict.policy.mode;
13111
13119
  if (mode === "push_first" && !codexOwnPromptCannotTakeTheCall(input, call)) return CODEX_PRE_TOOL_USE_PASSES;
13112
13120
  const policy = { ...verdict.policy, mode };
@@ -13997,6 +14005,7 @@ export {
13997
14005
  buildDecisionEpisodeFeatures,
13998
14006
  resolveAutoResolveOrigin,
13999
14007
  resolvePolicy,
14008
+ onlyAnExplicitAnswerRunsTheCall,
14000
14009
  isGateRefusal,
14001
14010
  PUSHARY_TOOL_PREFIX,
14002
14011
  PUSHARY_CONNECTOR_TOOL_PREFIXES,
@@ -14053,6 +14062,7 @@ export {
14053
14062
  refusesWhenUnanswered,
14054
14063
  codexDeferredPreToolUse,
14055
14064
  scopeBreachReasonOf,
14065
+ gateOutranksTheNativeMode,
14056
14066
  protectedFileEditRefusedAlert,
14057
14067
  codexPreToolUseDelivery,
14058
14068
  claudePermissionRulesFromSettings,
@@ -10,7 +10,7 @@ import {
10
10
  uploadTranscriptRecords,
11
11
  verifyAnchoredRecipients,
12
12
  wrapSessionKey
13
- } from "./chunk-Y5INUJ2S.js";
13
+ } from "./chunk-JMPGFGCM.js";
14
14
 
15
15
  // src/live-session.ts
16
16
  var LIVE_TRANSCRIPT_LIMITS = { queuedRecords: 100, recordCharacters: 32 * 1024 };
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  pusharyDir
3
- } from "./chunk-XKSIMUZM.js";
3
+ } from "./chunk-6YVIWLL2.js";
4
4
  import {
5
5
  readJsonSafe
6
6
  } from "./chunk-PM2NRK6Y.js";
7
7
  import {
8
8
  isRecord
9
- } from "./chunk-4RPG3SFC.js";
9
+ } from "./chunk-NAD2JOKF.js";
10
10
 
11
11
  // src/process-ownership.ts
12
12
  import { createHash, randomUUID } from "crypto";
@@ -5,13 +5,13 @@ import {
5
5
  OPENCLAW_ENVIRONMENT_KEYS,
6
6
  openClawEnvironmentOf,
7
7
  openClawPathsFrom
8
- } from "./chunk-XKSIMUZM.js";
8
+ } from "./chunk-6YVIWLL2.js";
9
9
  import {
10
10
  resolvePathBinary
11
- } from "./chunk-HKXFHEB4.js";
11
+ } from "./chunk-SNR7BUWT.js";
12
12
  import {
13
13
  isRecord
14
- } from "./chunk-4RPG3SFC.js";
14
+ } from "./chunk-NAD2JOKF.js";
15
15
 
16
16
  // src/openclaw/wiring-state.ts
17
17
  var OPENCLAW_PLUGIN_ID = "pushary";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  HOOK_HOLD_BUDGET_ENV,
3
3
  hookHoldBudgetProof
4
- } from "./chunk-4RPG3SFC.js";
4
+ } from "./chunk-NAD2JOKF.js";
5
5
 
6
6
  // src/hold-budget.ts
7
7
  var takeHookHoldBudget = (args = process.argv.slice(2), env = process.env) => {
@@ -5,7 +5,7 @@ import {
5
5
  MCP_CREDENTIAL_REJECTION_BODY,
6
6
  isRecord,
7
7
  responseRejectsCredential
8
- } from "./chunk-4RPG3SFC.js";
8
+ } from "./chunk-NAD2JOKF.js";
9
9
 
10
10
  // src/credential-rejection.ts
11
11
  import { createHash, randomUUID } from "crypto";
@@ -5,13 +5,13 @@ import {
5
5
  } from "./chunk-OYIN77HO.js";
6
6
  import {
7
7
  readMacAppAgentKey
8
- } from "./chunk-73SEBA5G.js";
8
+ } from "./chunk-LAPJNDQG.js";
9
9
  import {
10
10
  API_KEYS_PATH
11
- } from "./chunk-YARDFZND.js";
11
+ } from "./chunk-EZBNWOZM.js";
12
12
  import {
13
13
  absoluteUrl
14
- } from "./chunk-YSR7QVMN.js";
14
+ } from "./chunk-A533F6TF.js";
15
15
  import {
16
16
  findExportedKeyLines,
17
17
  isAdoptedMacAppKey,
@@ -21,10 +21,10 @@ import {
21
21
  readConfigFileKey,
22
22
  readKeySource,
23
23
  readMacAppKeyPrefix
24
- } from "./chunk-DTYSJP6K.js";
24
+ } from "./chunk-VVXWDBZK.js";
25
25
  import {
26
26
  isValidApiKey
27
- } from "./chunk-4RPG3SFC.js";
27
+ } from "./chunk-NAD2JOKF.js";
28
28
 
29
29
  // src/cli/held-key-revocation.ts
30
30
  var readCliHeldKeys = (profiles) => {
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  parseSseMessages
3
- } from "./chunk-UOABAWQ4.js";
3
+ } from "./chunk-6T367UEE.js";
4
4
  import {
5
5
  fetchAsCredential
6
- } from "./chunk-FIAXP3LF.js";
6
+ } from "./chunk-PCKCLSGP.js";
7
7
  import {
8
8
  malformedApiKeyMessage
9
- } from "./chunk-XOZZ7LFC.js";
9
+ } from "./chunk-JPCVW3BA.js";
10
10
  import {
11
11
  NPX_LATEST_COMMAND
12
- } from "./chunk-QU2NSBXD.js";
12
+ } from "./chunk-BETDBGC7.js";
13
13
 
14
14
  // src/mcp-stdio-bridge.ts
15
15
  var MCP_BRIDGE_BINARY = "pushary-mcp";
@@ -9,7 +9,7 @@ import {
9
9
  installedCodexApp,
10
10
  readCodexAppRuntime,
11
11
  shellQuoted
12
- } from "./chunk-OQVYOMNI.js";
12
+ } from "./chunk-WKXO22AI.js";
13
13
  import {
14
14
  writeHuman
15
15
  } from "./chunk-QCGNGEGE.js";
@@ -20,20 +20,20 @@ import {
20
20
  } from "./chunk-U4P4NDVB.js";
21
21
  import {
22
22
  parseConfigDocument
23
- } from "./chunk-SL6ZTQA2.js";
23
+ } from "./chunk-LP2VGPHZ.js";
24
24
  import {
25
25
  xml
26
- } from "./chunk-SIP2BFVS.js";
26
+ } from "./chunk-5DF6YZPG.js";
27
27
  import {
28
28
  codexHomeFrom
29
- } from "./chunk-XKSIMUZM.js";
29
+ } from "./chunk-6YVIWLL2.js";
30
30
  import {
31
31
  readRegularTextFile,
32
32
  writeFileAtomic
33
33
  } from "./chunk-PM2NRK6Y.js";
34
34
  import {
35
35
  isRecord
36
- } from "./chunk-4RPG3SFC.js";
36
+ } from "./chunk-NAD2JOKF.js";
37
37
 
38
38
  // src/codex-app-cards-switch.ts
39
39
  import { execFileSync as execFileSync2 } from "child_process";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  renderCommandHelp
3
- } from "./chunk-QU2NSBXD.js";
3
+ } from "./chunk-BETDBGC7.js";
4
4
  import {
5
5
  EXIT
6
6
  } from "./chunk-BG4HHB7E.js";
@@ -7,7 +7,7 @@ import {
7
7
  isAutoApprove,
8
8
  isAutoDeny,
9
9
  isTimeoutAction
10
- } from "./chunk-4RPG3SFC.js";
10
+ } from "./chunk-NAD2JOKF.js";
11
11
 
12
12
  // src/wait-ladder.ts
13
13
  var WAIT_RULE_LABELS = {
@@ -3,7 +3,7 @@ import {
3
3
  openCodePluginArgv,
4
4
  openCodePluginModule,
5
5
  renderOpenCodePlugin
6
- } from "./chunk-QSPYUDHD.js";
6
+ } from "./chunk-MTSTB2GL.js";
7
7
  import {
8
8
  OPENCODE_FAILED_EVENT,
9
9
  OPENCODE_IDLE_EVENT,
@@ -12,17 +12,17 @@ import {
12
12
  OPENCODE_PLUGIN_SIBLING,
13
13
  OPENCODE_PLUGIN_SIBLING_CONTENTS,
14
14
  OPENCODE_SUBAGENT_IDLE_EVENT
15
- } from "./chunk-ATWYNEN4.js";
15
+ } from "./chunk-DYIU6SSG.js";
16
16
  import {
17
17
  compatibleConfigFile
18
- } from "./chunk-IP6BVZZL.js";
18
+ } from "./chunk-KI6IY52L.js";
19
19
  import {
20
20
  hookOwnerOf,
21
21
  hookOwnerOfCommands
22
- } from "./chunk-IX2DKVF2.js";
22
+ } from "./chunk-V5LIBKOQ.js";
23
23
  import {
24
24
  AGENT_CHOICES
25
- } from "./chunk-4ZWNL3CK.js";
25
+ } from "./chunk-VFPXC2HE.js";
26
26
  import {
27
27
  OPENCODE_INSTRUCTIONS_LABEL,
28
28
  bridgeStub,
@@ -36,7 +36,7 @@ import {
36
36
  resolveBridgeStub,
37
37
  vscodePluginDir,
38
38
  windowsNodeLauncherFor
39
- } from "./chunk-XKSIMUZM.js";
39
+ } from "./chunk-6YVIWLL2.js";
40
40
  import {
41
41
  readJsonSafe
42
42
  } from "./chunk-PM2NRK6Y.js";
@@ -46,7 +46,7 @@ import {
46
46
  OPENCODE_APPROVAL_EVENT,
47
47
  hookCompatibleProfile,
48
48
  isRecord
49
- } from "./chunk-4RPG3SFC.js";
49
+ } from "./chunk-NAD2JOKF.js";
50
50
 
51
51
  // src/opencode-config.ts
52
52
  import { existsSync, mkdirSync, readdirSync, readFileSync, rmSync, writeFileSync } from "fs";
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  callDecisionStore
3
- } from "./chunk-KMMO3K2C.js";
3
+ } from "./chunk-YJ6OARPK.js";
4
4
  import {
5
5
  claudePromptMayFollowPreToolUseAllow,
6
6
  promptedCallIdentityText
7
- } from "./chunk-JP7RRADP.js";
7
+ } from "./chunk-ESTQIKTS.js";
8
8
 
9
9
  // src/phone-approval.ts
10
10
  import { createHash as createHash2 } from "crypto";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  computerOsOfPlatform,
3
3
  isComputerAgent
4
- } from "./chunk-4RPG3SFC.js";
4
+ } from "./chunk-NAD2JOKF.js";
5
5
 
6
6
  // src/setup/phone-check.ts
7
7
  var NO_AGENT_CONNECTED_LINE = "Skipping the phone step: no agent was connected, so nothing could ask you anything on your phone yet.";
@@ -19,7 +19,7 @@ import {
19
19
  } from "./chunk-CXQWDQCJ.js";
20
20
  import {
21
21
  redactSecretsFromContent
22
- } from "./chunk-4RPG3SFC.js";
22
+ } from "./chunk-NAD2JOKF.js";
23
23
 
24
24
  // src/shell-quote.ts
25
25
  var shellDoubleQuoted = (text) => `"${text.replace(/(["\\$`])/g, "\\$1")}"`;
@@ -610,9 +610,9 @@ var installGlobally = (options) => {
610
610
  }
611
611
  const started = (async () => {
612
612
  if (!npmIsOnPath()) throw new NpmMissingError();
613
- const { withUpgradeLock } = await import("./global-upgrade-H4CHC3PX.js");
614
- const { canonicalLockPath, installWithUpgradeLock, leftAnUnfinishedInstallHere, ownsUpgradeLock } = await import("./upgrade-lock-UPLYK4CW.js");
615
- const { autoUpdateLock } = await import("./paths-J7L3IDOW.js");
613
+ const { withUpgradeLock } = await import("./global-upgrade-ZD6PXYIH.js");
614
+ const { canonicalLockPath, installWithUpgradeLock, leftAnUnfinishedInstallHere, ownsUpgradeLock } = await import("./upgrade-lock-KNVJBN5G.js");
615
+ const { autoUpdateLock } = await import("./paths-3VDI3LAG.js");
616
616
  const lockPath = options.lockPath ?? autoUpdateLock();
617
617
  const lockFile = canonicalLockPath(lockPath);
618
618
  const unfinishedHere = failuresThisProcessLeftUnfinished.get(lockFile);
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  pusharyDir
3
- } from "./chunk-XKSIMUZM.js";
3
+ } from "./chunk-6YVIWLL2.js";
4
4
  import {
5
5
  writeFileAtomic
6
6
  } from "./chunk-PM2NRK6Y.js";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  AGENT_CHOICES
3
- } from "./chunk-4ZWNL3CK.js";
3
+ } from "./chunk-VFPXC2HE.js";
4
4
  import {
5
5
  BELL_HOOK_BINARY
6
- } from "./chunk-EGZUBQL6.js";
6
+ } from "./chunk-5FZ2K4UV.js";
7
7
  import {
8
8
  CLAUDE_HOOK_EVENTS,
9
9
  CODEX_HOOK_EVENTS,
@@ -16,13 +16,13 @@ import {
16
16
  isBridgeLocator,
17
17
  isProtectedByScope,
18
18
  registerHookEntry
19
- } from "./chunk-XKSIMUZM.js";
19
+ } from "./chunk-6YVIWLL2.js";
20
20
  import {
21
21
  CURSOR_GATE_EVENTS,
22
22
  HOOK_BUDGETS,
23
23
  HOOK_LOCATOR_BINARY,
24
24
  hookCommandHoldBudget
25
- } from "./chunk-4RPG3SFC.js";
25
+ } from "./chunk-NAD2JOKF.js";
26
26
 
27
27
  // src/gemini-config.ts
28
28
  var GEMINI_HOOK_BINARY = "pushary-gemini-hook";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  canonicalGateInputs,
3
3
  patchDeletesFiles
4
- } from "./chunk-JP7RRADP.js";
4
+ } from "./chunk-ESTQIKTS.js";
5
5
 
6
6
  // src/gate-call-reading.ts
7
7
  var gateCallReadingOf = (profile, raw) => {
@@ -12,7 +12,7 @@ import {
12
12
  isSetupConnectMode,
13
13
  isValidApiKey,
14
14
  normalizeAgentId
15
- } from "./chunk-4RPG3SFC.js";
15
+ } from "./chunk-NAD2JOKF.js";
16
16
 
17
17
  // src/setup/options.ts
18
18
  var AGENT_CHOICES = SETUP_AGENT_CHOICES;
@@ -2,7 +2,7 @@ import {
2
2
  apiKeyInForce,
3
3
  configFilePath,
4
4
  keyPrefixToShow
5
- } from "./chunk-XOZZ7LFC.js";
5
+ } from "./chunk-JPCVW3BA.js";
6
6
  import {
7
7
  backupFile,
8
8
  backupFileInto,
@@ -15,7 +15,7 @@ import {
15
15
  isRecord,
16
16
  isValidApiKey,
17
17
  normalizeInstallSource
18
- } from "./chunk-4RPG3SFC.js";
18
+ } from "./chunk-NAD2JOKF.js";
19
19
 
20
20
  // src/install-source.ts
21
21
  import { readFileSync } from "fs";
@@ -4,16 +4,16 @@ import {
4
4
  } from "./chunk-WHB622LP.js";
5
5
  import {
6
6
  keyPrefix
7
- } from "./chunk-DTYSJP6K.js";
7
+ } from "./chunk-VVXWDBZK.js";
8
8
  import {
9
9
  keyPrefixToShow
10
- } from "./chunk-XOZZ7LFC.js";
10
+ } from "./chunk-JPCVW3BA.js";
11
11
  import {
12
12
  NPX_LATEST_COMMAND
13
- } from "./chunk-QU2NSBXD.js";
13
+ } from "./chunk-BETDBGC7.js";
14
14
  import {
15
15
  isValidApiKey
16
- } from "./chunk-4RPG3SFC.js";
16
+ } from "./chunk-NAD2JOKF.js";
17
17
 
18
18
  // src/setup/key-account.ts
19
19
  var isKeyHeldByMacApp = (key, holder) => holder.macAppInstalled && holder.macAppKey === key;
@@ -16,7 +16,7 @@ import {
16
16
  } from "./chunk-U4P4NDVB.js";
17
17
  import {
18
18
  withoutNpmInstallConsent
19
- } from "./chunk-HKXFHEB4.js";
19
+ } from "./chunk-SNR7BUWT.js";
20
20
 
21
21
  // src/codex-desktop-launch.ts
22
22
  import { spawn as spawn2, execFileSync as execFileSync2 } from "child_process";
@@ -539,8 +539,8 @@ var loadedOnce = (load) => {
539
539
  };
540
540
 
541
541
  // src/codex-desktop-proxy.ts
542
- var loadThePhone = () => import("./api-OJRU3MYI.js");
543
- var loadTheCardRouting = () => import("./codex-card-routing-PLD74MXM.js");
542
+ var loadThePhone = () => import("./api-4MGFAW5H.js");
543
+ var loadTheCardRouting = () => import("./codex-card-routing-BDAI3C5X.js");
544
544
  var theFirstCardLoadsAgain = () => {
545
545
  };
546
546
  var ASKS_WITHOUT_ROUTING = {};
@@ -1101,7 +1101,7 @@ var codexDesktopCommand = async (args, entry, readAccount) => {
1101
1101
  return runCodexDesktopProxy(engine2, args.slice(3), readAccount, { watchesForCards: layoutIsKnown });
1102
1102
  }
1103
1103
  if (args[0] === APP_CARDS_FLAG) {
1104
- const { codexAppCardsCommandOnThisMac } = await import("./codex-app-cards-switch-2ZVORWWV.js");
1104
+ const { codexAppCardsCommandOnThisMac } = await import("./codex-app-cards-switch-JPDKYQ5R.js");
1105
1105
  return codexAppCardsCommandOnThisMac(args.slice(1), entry, readAccount);
1106
1106
  }
1107
1107
  if (args.length > 2) throw new Error("Usage: pushary codex --desktop [path/to/Codex.app]");
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-POFBE6ZY.js";
4
4
  import {
5
5
  autoUpdateState
6
- } from "./chunk-XKSIMUZM.js";
6
+ } from "./chunk-6YVIWLL2.js";
7
7
  import {
8
8
  readJsonSafe,
9
9
  writeJsonAtomic
@@ -17,7 +17,7 @@ import {
17
17
  } from "./chunk-CXQWDQCJ.js";
18
18
  import {
19
19
  isAutoUpdateResult
20
- } from "./chunk-4RPG3SFC.js";
20
+ } from "./chunk-NAD2JOKF.js";
21
21
 
22
22
  // src/auto-update.ts
23
23
  import { spawn } from "child_process";
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  STOPPED_FROM_PUSHARY_LADDER,
3
3
  UNREAD_MODE_LADDER
4
- } from "./chunk-7PRPLYOT.js";
4
+ } from "./chunk-QTNBPBYN.js";
5
5
  import {
6
6
  createIo
7
- } from "./chunk-N6RX3ZWB.js";
7
+ } from "./chunk-DBBLMMBL.js";
8
8
  import {
9
9
  CLAUDE_CODE_AGENT,
10
10
  fetchModeState,
11
11
  getPolicy
12
- } from "./chunk-KMMO3K2C.js";
12
+ } from "./chunk-YJ6OARPK.js";
13
13
 
14
14
  // src/cli/hook-wait-ladder.ts
15
15
  var readClaudeCodeHookWaitState = async (apiKey) => {
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  pusharyHookExecutable
3
- } from "./chunk-IX2DKVF2.js";
3
+ } from "./chunk-V5LIBKOQ.js";
4
4
  import {
5
5
  bridgeResolvesToApp,
6
6
  cursorUserHooks,
7
7
  executableFileName,
8
8
  isBridgeLocator,
9
9
  liveBridgeProbe
10
- } from "./chunk-XKSIMUZM.js";
10
+ } from "./chunk-6YVIWLL2.js";
11
11
  import {
12
12
  atLeast,
13
13
  parseVersion
@@ -21,7 +21,7 @@ import {
21
21
  isCursorHookPayload,
22
22
  isRecord,
23
23
  toolsCoveredByGateEntry
24
- } from "./chunk-4RPG3SFC.js";
24
+ } from "./chunk-NAD2JOKF.js";
25
25
 
26
26
  // src/cursor-gate-registration.ts
27
27
  import { dirname, isAbsolute, join, resolve } from "path";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  realpath
3
- } from "./chunk-6RAIYGKT.js";
3
+ } from "./chunk-YV7BK4UO.js";
4
4
  import {
5
5
  findNativeClaudeInstall
6
6
  } from "./chunk-TCE3J44Z.js";
@@ -12,7 +12,7 @@ import {
12
12
  resolvePackageVersionFromBinary,
13
13
  resolvePathBinary,
14
14
  resolvePathBinaryAsync
15
- } from "./chunk-HKXFHEB4.js";
15
+ } from "./chunk-SNR7BUWT.js";
16
16
  import {
17
17
  AGENTS,
18
18
  CLAUDE_BRIDGE_CAPABILITY,
@@ -25,7 +25,7 @@ import {
25
25
  OPENCODE_BRIDGE_CAPABILITY,
26
26
  SPAWN_CAPABILITY,
27
27
  sessionProvidersAdvertisedBy
28
- } from "./chunk-4RPG3SFC.js";
28
+ } from "./chunk-NAD2JOKF.js";
29
29
 
30
30
  // src/live-capabilities.ts
31
31
  import { execFileSync } from "child_process";
@@ -134,6 +134,7 @@ var launchableProviders = sessionProvidersAdvertisedBy;
134
134
  var hasSpawnProvider = (capabilities) => launchableProviders(capabilities).length > 0;
135
135
  var resolveControlPolicy = (input) => {
136
136
  if (input.mode === "off") return "disabled";
137
+ if (input.turnedOffByUser) return "turned-off";
137
138
  if (input.mode === null && !input.servicePresent) return "preserve-absent";
138
139
  if (input.providerAvailable && input.managerAvailable) return "enabled";
139
140
  return input.servicePresent ? "legacy" : "unsupported";
@@ -148,7 +149,7 @@ var WHAT_REQUIRED_PHONE_START_LACKS = {
148
149
  "service-manager": "no native background-service manager is available in this OS session"
149
150
  };
150
151
  var describeMissingControlPrerequisite = (missing) => WHAT_REQUIRED_PHONE_START_LACKS[missing];
151
- var phoneStartIsRequired = (input) => input.mode === "on" || input.policy === "legacy" || input.lifecycleFailed;
152
+ var phoneStartIsRequired = (input) => input.lifecycleFailed || input.policy !== "turned-off" && (input.mode === "on" || input.policy === "legacy");
152
153
  var isManagedProvider = (value) => MANAGED_PROVIDERS.some((provider) => provider === value);
153
154
  var MANAGED_PROVIDER_OF_AGENT = new Map(
154
155
  Object.entries(AGENTS).flatMap(([agent, entry]) => entry.sessionRuntime ? [[agent, entry.sessionRuntime.provider]] : [])