pushary 1.9.254 → 1.9.256

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 (144) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/dist/{api-QY6VQJFI.js → api-PDBKGOGU.js} +11 -11
  3. package/dist/bin/pushary-audit.js +3 -3
  4. package/dist/bin/pushary-bell-hook.js +29 -29
  5. package/dist/bin/pushary-bell.js +12 -12
  6. package/dist/bin/pushary-calls.js +17 -16
  7. package/dist/bin/pushary-claude.js +26 -26
  8. package/dist/bin/pushary-clean.js +40 -40
  9. package/dist/bin/pushary-codex-bridge.js +23 -23
  10. package/dist/bin/pushary-codex-hook.js +35 -35
  11. package/dist/bin/pushary-codex-session.js +8 -8
  12. package/dist/bin/pushary-codex.js +16 -16
  13. package/dist/bin/pushary-connect.js +36 -36
  14. package/dist/bin/pushary-cowork.js +5 -5
  15. package/dist/bin/pushary-daemon.js +47 -47
  16. package/dist/bin/pushary-disconnect.js +31 -31
  17. package/dist/bin/pushary-display-hook.js +3 -2
  18. package/dist/bin/pushary-doctor.js +48 -48
  19. package/dist/bin/pushary-elicitation-hook.js +28 -28
  20. package/dist/bin/pushary-gemini-bridge.js +18 -18
  21. package/dist/bin/pushary-gemini-hook.js +32 -32
  22. package/dist/bin/pushary-hook.js +36 -36
  23. package/dist/bin/pushary-login.js +23 -23
  24. package/dist/bin/pushary-logout.js +32 -32
  25. package/dist/bin/pushary-mcp.js +12 -12
  26. package/dist/bin/pushary-mode.js +16 -16
  27. package/dist/bin/pushary-notification-hook.js +28 -28
  28. package/dist/bin/pushary-opencode-bridge.js +22 -22
  29. package/dist/bin/pushary-opencode-hook.js +33 -33
  30. package/dist/bin/pushary-permission-denied-hook.js +35 -35
  31. package/dist/bin/pushary-permission-hook.js +36 -36
  32. package/dist/bin/pushary-post-hook.js +29 -29
  33. package/dist/bin/pushary-prompt-hook.js +28 -28
  34. package/dist/bin/pushary-session-end-hook.js +28 -28
  35. package/dist/bin/pushary-session-start-hook.js +40 -40
  36. package/dist/bin/pushary-sessions.js +12 -12
  37. package/dist/bin/pushary-setup.js +59 -59
  38. package/dist/bin/pushary-stats.js +5 -5
  39. package/dist/bin/pushary-status.js +37 -37
  40. package/dist/bin/pushary-stop-hook.js +28 -28
  41. package/dist/bin/pushary-stopfailure-hook.js +28 -28
  42. package/dist/bin/pushary-suggestions.js +16 -16
  43. package/dist/bin/pushary-transcript-register.js +17 -17
  44. package/dist/bin/pushary-transcripts.js +26 -26
  45. package/dist/bin/pushary-upgrade.js +48 -48
  46. package/dist/bin/pushary-wait.js +16 -16
  47. package/dist/bin/pushary.js +7 -7
  48. package/dist/{chunk-WTFSVKNI.js → chunk-2BU3ZINY.js} +2 -2
  49. package/dist/{chunk-UYJNAYBK.js → chunk-2EBKVUV3.js} +1 -1
  50. package/dist/{chunk-4FY7R645.js → chunk-2NA62YF2.js} +4 -4
  51. package/dist/{chunk-O4J5GVKF.js → chunk-2OROBVCH.js} +6 -6
  52. package/dist/{chunk-2NBKOBF4.js → chunk-2ZPBZ4YU.js} +2 -2
  53. package/dist/{chunk-M3JY4QP2.js → chunk-2ZWOLIMD.js} +2 -2
  54. package/dist/{chunk-VLKTJDUJ.js → chunk-42TGZKJW.js} +2 -2
  55. package/dist/{chunk-SVCNDCTR.js → chunk-4CKGVOZN.js} +4 -4
  56. package/dist/{chunk-7DJLYHXC.js → chunk-4RAXRM4E.js} +2 -2
  57. package/dist/{chunk-ZFS7EORW.js → chunk-4XHYW7UN.js} +1 -1
  58. package/dist/{chunk-GEPZJS32.js → chunk-6FGATHF3.js} +1 -1
  59. package/dist/{chunk-4KLGPKC2.js → chunk-6JR5O74N.js} +2 -2
  60. package/dist/{chunk-YG3TBL4J.js → chunk-6LLXTRR4.js} +5 -5
  61. package/dist/{chunk-642JCWTI.js → chunk-6NIFF33D.js} +4 -4
  62. package/dist/{chunk-AVYEY7Q5.js → chunk-7DQRFOCT.js} +3 -3
  63. package/dist/{chunk-ODLPEMVY.js → chunk-7HJDCATD.js} +3 -3
  64. package/dist/{chunk-E3CRPS7D.js → chunk-7LCGDZB5.js} +3 -3
  65. package/dist/{chunk-H52M2TRV.js → chunk-A4QPJFVF.js} +1 -1
  66. package/dist/{chunk-NOIBGLBE.js → chunk-AOYHU6XJ.js} +5 -5
  67. package/dist/{chunk-67IFG5NZ.js → chunk-APQ2WPSI.js} +1 -1
  68. package/dist/{chunk-ABSMY77L.js → chunk-BOC25SJO.js} +11 -11
  69. package/dist/{chunk-SUOHEXOJ.js → chunk-CDSHRV3I.js} +7 -7
  70. package/dist/{chunk-MYHEISKF.js → chunk-CHP66VVN.js} +5 -5
  71. package/dist/{chunk-JLQHY75G.js → chunk-CKRSZJZR.js} +6 -6
  72. package/dist/{chunk-OETPIQ4R.js → chunk-CVZB2UJY.js} +6 -6
  73. package/dist/{chunk-AC5AJSGU.js → chunk-DF6HDNIG.js} +1 -1
  74. package/dist/{chunk-OWJFWFE6.js → chunk-DFPARBO2.js} +5 -5
  75. package/dist/{chunk-BCYNGMS5.js → chunk-E5LT4X66.js} +1 -1
  76. package/dist/{chunk-U3AXTMV7.js → chunk-E63N5ML7.js} +4 -4
  77. package/dist/{chunk-H2VFPD2R.js → chunk-ENE3YCWH.js} +6 -6
  78. package/dist/{chunk-NBIAPFRB.js → chunk-EQQK2GCR.js} +4 -4
  79. package/dist/{chunk-7BV26BFH.js → chunk-EUJSAZYI.js} +1 -1
  80. package/dist/{chunk-KLDAKOVH.js → chunk-HMARMKFN.js} +2 -2
  81. package/dist/{chunk-RVPDHRMO.js → chunk-HXDPONTW.js} +4 -4
  82. package/dist/{chunk-SSLV3YRY.js → chunk-I4FZKY3R.js} +3 -3
  83. package/dist/{chunk-OP2ZMO4X.js → chunk-IM35HIWM.js} +3 -3
  84. package/dist/{chunk-4XTUCLYD.js → chunk-IMKSRTFI.js} +1 -1
  85. package/dist/{chunk-QYR7VUU4.js → chunk-JKWS5QQW.js} +1 -1
  86. package/dist/{chunk-BRSXM66U.js → chunk-JWATMYBN.js} +4 -4
  87. package/dist/{chunk-ZLNUJLNE.js → chunk-KMHC3PG6.js} +52 -7
  88. package/dist/{chunk-LLHESE5J.js → chunk-KPYMLGHD.js} +5 -5
  89. package/dist/{chunk-7WE4KEVO.js → chunk-LGB2O2FG.js} +5 -5
  90. package/dist/{chunk-5HHU6D5A.js → chunk-LK6NP47P.js} +3 -3
  91. package/dist/{chunk-Y3IWISL4.js → chunk-LPHUELFO.js} +4 -4
  92. package/dist/{chunk-QOKK74EW.js → chunk-M7EL423A.js} +1 -1
  93. package/dist/{chunk-MY7M5H5A.js → chunk-MI72IU6G.js} +12 -12
  94. package/dist/{chunk-NCWKTSRI.js → chunk-MIMOIRXH.js} +4 -4
  95. package/dist/{chunk-KX46VMRW.js → chunk-MQSNZQ6X.js} +16 -16
  96. package/dist/{chunk-OYGL6J2D.js → chunk-MYA2MZVD.js} +3 -3
  97. package/dist/{chunk-3L2W4LLI.js → chunk-NNFTZNME.js} +6 -6
  98. package/dist/{chunk-7OWKHNU3.js → chunk-NU2SCQSY.js} +1 -1
  99. package/dist/{chunk-ICQYKYWS.js → chunk-NV3DXCYB.js} +5 -5
  100. package/dist/{chunk-PM4ER2NJ.js → chunk-OX3RKATP.js} +2 -2
  101. package/dist/{chunk-L6Z3VDAS.js → chunk-OYZZXZYE.js} +1 -1
  102. package/dist/{chunk-RVS6JPBJ.js → chunk-OZJQXTEY.js} +1 -1
  103. package/dist/{chunk-I5N5WXGX.js → chunk-P4SM5JPQ.js} +2 -2
  104. package/dist/{chunk-GSAHQCDT.js → chunk-P65RQWAF.js} +1 -1
  105. package/dist/{chunk-QBA6GMAT.js → chunk-PQH3NK6Z.js} +5 -5
  106. package/dist/{chunk-VX5BPPHN.js → chunk-Q7LZL757.js} +1 -1
  107. package/dist/{chunk-MKBPHFPR.js → chunk-QDYNEY25.js} +1 -1
  108. package/dist/{chunk-U62LMG5F.js → chunk-QKDK6C7Y.js} +1 -1
  109. package/dist/{chunk-YXIGD5EM.js → chunk-RFKP2QPM.js} +7 -7
  110. package/dist/{chunk-G2GOAQHZ.js → chunk-RV4ARWS2.js} +4 -4
  111. package/dist/{chunk-EHEA7IA7.js → chunk-SDPDAWUY.js} +1 -1
  112. package/dist/{chunk-IMV3OTCO.js → chunk-SPS75AL3.js} +8 -8
  113. package/dist/{chunk-ZJ2TFSPR.js → chunk-SXV6KRKD.js} +6 -6
  114. package/dist/{chunk-JQCTVTIB.js → chunk-SY5A4BTI.js} +2 -2
  115. package/dist/{chunk-3J6A7KQX.js → chunk-T7IJFOLM.js} +5 -5
  116. package/dist/{chunk-GMN6X7FV.js → chunk-TMV6L4XN.js} +3 -3
  117. package/dist/{chunk-WJQJUKGE.js → chunk-TV3UAKAL.js} +1 -1
  118. package/dist/{chunk-U3JBGAVX.js → chunk-ULRUKD2J.js} +1 -1
  119. package/dist/{chunk-3BN74JWK.js → chunk-UQHQ5WKT.js} +1 -1
  120. package/dist/{chunk-CIPK5AF5.js → chunk-VFMTS5C5.js} +10 -10
  121. package/dist/{chunk-CG5W5LPA.js → chunk-WRUT4RBW.js} +3 -3
  122. package/dist/{chunk-ZDP2L7ZA.js → chunk-XVIZUXKN.js} +1 -1
  123. package/dist/{chunk-5BSRXXGB.js → chunk-Y3SW3AH4.js} +3 -3
  124. package/dist/{chunk-LQN5YB2V.js → chunk-Y5FH7P7H.js} +3 -3
  125. package/dist/{chunk-R46QOMKS.js → chunk-YOR6P7ZD.js} +2 -2
  126. package/dist/{chunk-ZMXCW2N7.js → chunk-YRIB6P5B.js} +10 -10
  127. package/dist/{chunk-HRZACRZZ.js → chunk-Z5I22MEH.js} +1 -1
  128. package/dist/{chunk-DRDHWOOW.js → chunk-ZJUYUFEA.js} +5 -5
  129. package/dist/{chunk-QLY2U3EX.js → chunk-ZMUVYTOY.js} +2 -2
  130. package/dist/{codex-app-cards-switch-CFBQWFPT.js → codex-app-cards-switch-ZWT7GVF3.js} +12 -12
  131. package/dist/{codex-card-routing-GQTCHTH5.js → codex-card-routing-R5RYIO2T.js} +2 -2
  132. package/dist/{codex-desktop-launch-IKO5DFQH.js → codex-desktop-launch-7PSF3TOL.js} +3 -3
  133. package/dist/{codex-session-launch-LBAI42YT.js → codex-session-launch-HHEVRULR.js} +20 -20
  134. package/dist/{config-ZLV45K4O.js → config-XDKSDUVB.js} +3 -3
  135. package/dist/{global-upgrade-OIYQREDI.js → global-upgrade-RCBL4COT.js} +9 -9
  136. package/dist/{identity-3Q7SYQSF.js → identity-N23JZMTN.js} +4 -4
  137. package/dist/{live-capabilities-NKJTOXAA.js → live-capabilities-AVFBIZAP.js} +4 -4
  138. package/dist/{paths-ZMSRGIIE.js → paths-KZSXNV7G.js} +3 -3
  139. package/dist/reapply-BJSKHOWU.js +76 -0
  140. package/dist/src/index.js +34 -34
  141. package/dist/{upgrade-lock-OW5SDV7B.js → upgrade-lock-SRFPOOJH.js} +4 -4
  142. package/dist/{usage-DNGUMZZM.js → usage-XXFGYXXC.js} +3 -3
  143. package/package.json +1 -1
  144. package/dist/reapply-WKPRZZSZ.js +0 -76
@@ -2398,7 +2398,7 @@ var PIPE2 = "|";
2398
2398
  var AMPERSAND = "&";
2399
2399
  var STATEMENT_SEPARATOR = ";";
2400
2400
  var ASSIGNMENT_OPERATORS = /* @__PURE__ */ new Set(["=", "+=", "-=", "*=", "/=", "%=", "??="]);
2401
- var CALL_OPERATOR_WORD = { text: AMPERSAND, quoted: false, expands: false, nested: [] };
2401
+ var CALL_OPERATOR_WORD = { text: AMPERSAND, quoted: false, quotedOnlyByEscapes: false, expands: false, nested: [] };
2402
2402
  var NOT_FOUND = -1;
2403
2403
  var TOP_LEVEL = 0;
2404
2404
  var MAX_GROUP_NESTING = 128;
@@ -2524,7 +2524,7 @@ var powerShellStatementsOf = (source) => {
2524
2524
  let stageStart = 0;
2525
2525
  let targetsARedirect = false;
2526
2526
  const startWord = () => {
2527
- draft ??= { text: "", quoted: false, expands: false, nested: [] };
2527
+ draft ??= { text: "", quoted: false, quotedOnlyByEscapes: false, expands: false, nested: [] };
2528
2528
  return draft;
2529
2529
  };
2530
2530
  const finishWord = () => {
@@ -2560,6 +2560,7 @@ var powerShellStatementsOf = (source) => {
2560
2560
  if (continuation === 0) {
2561
2561
  const word = startWord();
2562
2562
  word.text += next;
2563
+ word.quotedOnlyByEscapes = !word.quoted || word.quotedOnlyByEscapes;
2563
2564
  word.quoted = true;
2564
2565
  }
2565
2566
  index += 1 + Math.max(continuation, 1);
@@ -2607,6 +2608,7 @@ var powerShellStatementsOf = (source) => {
2607
2608
  const word = startWord();
2608
2609
  word.text += quoted.text;
2609
2610
  word.quoted = true;
2611
+ word.quotedOnlyByEscapes = false;
2610
2612
  word.expands ||= quoted.expands;
2611
2613
  word.nested.push(...quoted.nested);
2612
2614
  index = quoted.end;
@@ -2977,7 +2979,8 @@ var namesAPowerShellCommand = (program, viaCallOperator, readsAPipe) => {
2977
2979
  return false;
2978
2980
  }
2979
2981
  if (viaCallOperator) return true;
2980
- return !program.quoted && (readsAPipe || !POWERSHELL_LANGUAGE_KEYWORDS.has(program.text.toLowerCase()));
2982
+ const bare = !program.quoted || program.quotedOnlyByEscapes;
2983
+ return bare && (readsAPipe || !POWERSHELL_LANGUAGE_KEYWORDS.has(program.text.toLowerCase()));
2981
2984
  };
2982
2985
  var powerShellCommandOf = (stage) => {
2983
2986
  const { words, viaCallOperator } = commandWordsOf(stage.words);
@@ -3206,6 +3209,21 @@ var powerShellCommandIsDestructive = (command, judge) => {
3206
3209
  const analysis = powerShellReadingAt(command, TOP_LEVEL_SCRIPT);
3207
3210
  return analysis.kind === "incomplete" || powerShellReadingIsDestructive(analysis.reading, judge);
3208
3211
  };
3212
+ var cmdletOfAName = (name) => POWERSHELL_ALIASES.get(name) ?? name;
3213
+ var isAPowerShellCommand = (command) => command !== null;
3214
+ var commandsOfTheReading = (reading) => stagesOfTheReading(reading).map(powerShellCommandOf).filter(isAPowerShellCommand);
3215
+ var commandIsNamedBy = (command, ruleName) => {
3216
+ const lowered = ruleName.toLowerCase();
3217
+ return command.name === lowered || command.cmdlet === cmdletOfAName(lowered);
3218
+ };
3219
+ var spellingWithTheRuleName = (command, ruleName) => [ruleName, ...command.args.map((arg) => arg.text)].join(" ");
3220
+ var powerShellSpellingsInTheRulesNames = (command, ruleNames) => {
3221
+ if (ruleNames.length === 0) return [];
3222
+ const analysis = powerShellReadingAt(command, TOP_LEVEL_SCRIPT);
3223
+ if (analysis.kind === "incomplete") return [];
3224
+ const commands = commandsOfTheReading(analysis.reading);
3225
+ return [...new Set(ruleNames.flatMap((ruleName) => commands.filter((candidate) => commandIsNamedBy(candidate, ruleName)).map((candidate) => spellingWithTheRuleName(candidate, ruleName))))];
3226
+ };
3209
3227
  var powerShellCommandHasAVisibleConsequence = (command, judge) => {
3210
3228
  const analysis = powerShellReadingAt(command, TOP_LEVEL_SCRIPT);
3211
3229
  if (analysis.kind === "incomplete") return true;
@@ -8588,7 +8606,8 @@ var invocationsOfACommand = (command) => {
8588
8606
  };
8589
8607
  var mayRunCodeThatDeletesRecursively = (command) => CODE_THAT_MAY_DELETE_RECURSIVELY.test(command);
8590
8608
  var WORDS_THAT_OPEN_A_COMMAND = String.raw`if|then|elif|else|do|while|until|!`;
8591
- var SHELL_GROUPING_PREFIX = new RegExp(String.raw`^\s*(?:(?:${WORDS_THAT_OPEN_A_COMMAND})\s+|[({]\s*)+`);
8609
+ var A_BRACE_LIST_STARTS = String.raw`[^\s{}]*(?:,[^\s{}]*)+\}`;
8610
+ var SHELL_GROUPING_PREFIX = new RegExp(String.raw`^\s*(?:(?:${WORDS_THAT_OPEN_A_COMMAND})\s+|\(\s*|\{(?!${A_BRACE_LIST_STARTS})\s*)+`);
8592
8611
  var GROUP_OPENER_BY_CLOSER = /* @__PURE__ */ new Map([[")", "("], ["}", "{"]]);
8593
8612
  var occurrencesOf = (text3, character) => text3.split(character).length - 1;
8594
8613
  var closesAGroupItDidNotOpen = (text3) => {
@@ -8872,7 +8891,24 @@ var LEADING_CURRENT_DIRECTORY = /^(?:\.\/+)+(?=[^/])/;
8872
8891
  var canonicalPathWord = (text3) => text3.replace(CURRENT_DIRECTORY_STEP, "").replace(LEADING_CURRENT_DIRECTORY, "");
8873
8892
  var verbatimInvocationText = (invocation) => wordsOfInvocation(invocation).map((word) => asOneShellWord(word.text)).join(" ");
8874
8893
  var canonicalInvocationText = (invocation) => invocationTextWith(invocation, (word) => asOneShellWord(canonicalPathWord(word.text)));
8875
- var spellingsOfAnInvocation = (invocation, innermost) => [invocation, innermost, ...gitReadingsPastGlobalOptions(innermost), ...readingsPastGlobalFlags(innermost)].flatMap((reading) => [verbatimInvocationText(reading), canonicalInvocationText(reading)]);
8894
+ var isASpelledWord = (word) => word.text.length > 0;
8895
+ var readingWithTheProgramExpanded = (program, args) => {
8896
+ const [expanded, ...rest] = (spellingsOfAWord(program) ?? []).filter(isASpelledWord);
8897
+ return expanded === void 0 || expanded.text === program.text && rest.length === 0 ? [] : [{ program: expanded, args: [...rest, ...args] }];
8898
+ };
8899
+ var programInLowerCase = (program) => ({ ...program, text: program.text.toLowerCase() });
8900
+ var readingWithTheProgramInLowerCase = ({ program, args }) => program === void 0 || program.expands || program.text === program.text.toLowerCase() ? [] : [{ program: programInLowerCase(program), args }];
8901
+ var readingsOfTheProgramName = ({ program, args }) => {
8902
+ if (program === void 0 || program.expands || SHELL_ENV_ASSIGNMENT.test(program.text)) return [];
8903
+ const expanded = readingWithTheProgramExpanded(program, args);
8904
+ return [...expanded, ...[{ program, args }, ...expanded].flatMap(readingWithTheProgramInLowerCase)];
8905
+ };
8906
+ var programHasTooManyBraceSpellings = ({ program }) => program !== void 0 && !program.expands && spellingsOfAWord(program) === null;
8907
+ var readingsOfAnInvocation = (innermost) => {
8908
+ const named = [innermost, ...readingsOfTheProgramName(innermost)];
8909
+ return [...named, ...named.flatMap((reading) => [...gitReadingsPastGlobalOptions(reading), ...readingsPastGlobalFlags(reading)])];
8910
+ };
8911
+ var spellingsOfAnInvocation = (invocation, innermost) => [invocation, ...readingsOfAnInvocation(innermost)].flatMap((reading) => [verbatimInvocationText(reading), canonicalInvocationText(reading)]);
8876
8912
  var NO_INLINE_SCRIPT = { kind: "none" };
8877
8913
  var HIDDEN_INLINE_SCRIPT = { kind: "hidden" };
8878
8914
  var ENV_READINGS_THAT_NAME_THEIR_OUTCOME = /* @__PURE__ */ new Set(["command", "runs-nothing"]);
@@ -8929,7 +8965,7 @@ var shellCommandsOfOneCommandGitSettings = ({ program, args }) => {
8929
8965
  return globalOptions.flatMap((option, index) => globalOptions[index - 1]?.text === GIT_ONE_COMMAND_SETTING_FLAG ? shellCommandAfterTheBangOf(option.text) : []);
8930
8966
  };
8931
8967
  var setsAOneCommandGitShellCommand = (invocation) => shellCommandsOfOneCommandGitSettings(invocation).length > 0;
8932
- var segmentHidesWhatItRuns = (segment, innermost, scripts, programIsReadable) => programIsHidden(innermost) && !programIsReadable || scripts.kind === "hidden" || segment.feedsASubstitution && (passesAnInlineScript(innermost) || setsAOneCommandGitShellCommand(innermost));
8968
+ var segmentHidesWhatItRuns = (segment, innermost, scripts, programIsReadable) => programIsHidden(innermost) && !programIsReadable || programHasTooManyBraceSpellings(innermost) || scripts.kind === "hidden" || segment.feedsASubstitution && (passesAnInlineScript(innermost) || setsAOneCommandGitShellCommand(innermost));
8933
8969
  var commandsNestedIn = (innermost, scripts) => [
8934
8970
  ...scripts.kind === "readable" ? scripts.scripts : [],
8935
8971
  ...commandsRunByFind(innermost).map(verbatimInvocationText)
@@ -10812,6 +10848,15 @@ var coordinationFloorApplies = (toolName, rank) => readsOrStopsItsOwnWork(toolNa
10812
10848
  var argumentsAsWritten = (args) => ({ forms: args, hidesWhatItRuns: false });
10813
10849
  var namesAnArgumentOf = (pattern, toolName) => pattern.startsWith(`${toolName}(`);
10814
10850
  var isSpelledOut = (form) => form.length > 0;
10851
+ var A_RULE_WORD_SEPARATOR = /[\s:]/;
10852
+ var A_GLOB_CHARACTER = "*";
10853
+ var programNameOfARule = (pattern, toolName) => {
10854
+ const inner = pattern.slice(toolName.length + 1, -1).trimStart();
10855
+ const name = inner.split(A_RULE_WORD_SEPARATOR)[0] ?? "";
10856
+ return name.length === 0 || name.includes(A_GLOB_CHARACTER) ? null : name;
10857
+ };
10858
+ var isAProgramName = (name) => name !== null;
10859
+ var powerShellSpellingsOf = (restrictingPatterns, toolName, command) => shellDialectOf(toolName) === "powershell" ? powerShellSpellingsInTheRulesNames(command, restrictingPatterns.filter((pattern) => namesAnArgumentOf(pattern, toolName)).map((pattern) => programNameOfARule(pattern, toolName)).filter(isAProgramName)) : [];
10815
10860
  var restrictionReadingOf = (restrictingPatterns, toolName, args, reach) => {
10816
10861
  const command = toolName in POLICY_COMMAND_KEYS ? args[0] : void 0;
10817
10862
  if (command === void 0 || !restrictingPatterns.some((pattern) => namesAnArgumentOf(pattern, toolName))) {
@@ -10819,7 +10864,7 @@ var restrictionReadingOf = (restrictingPatterns, toolName, args, reach) => {
10819
10864
  }
10820
10865
  const spellings = commandSpellings(command, reach);
10821
10866
  return {
10822
- forms: [.../* @__PURE__ */ new Set([...args, ...spellings.forms.filter(isSpelledOut)])],
10867
+ forms: [.../* @__PURE__ */ new Set([...args, ...spellings.forms.filter(isSpelledOut), ...powerShellSpellingsOf(restrictingPatterns, toolName, command)])],
10823
10868
  hidesWhatItRuns: POSIX_SHELL_TOOLS.has(toolName) && spellings.hidesWhatItRuns
10824
10869
  };
10825
10870
  };
@@ -4,13 +4,13 @@ import {
4
4
  configFailureKind,
5
5
  retryAgentCommand,
6
6
  writeSetupConfigFile
7
- } from "./chunk-OYGL6J2D.js";
7
+ } from "./chunk-MYA2MZVD.js";
8
8
  import {
9
9
  MCP_BRIDGE_BINARY
10
- } from "./chunk-NCWKTSRI.js";
10
+ } from "./chunk-MIMOIRXH.js";
11
11
  import {
12
12
  KEY_FILE_MODE
13
- } from "./chunk-AVYEY7Q5.js";
13
+ } from "./chunk-7DQRFOCT.js";
14
14
  import {
15
15
  CLINE_SERVER_NAME_TAKEN,
16
16
  CLINE_SETTINGS_REFUSALS,
@@ -32,10 +32,10 @@ import {
32
32
  withClinePusharyServer,
33
33
  withRefreshedClineKey,
34
34
  withoutClinePusharyServer
35
- } from "./chunk-7DJLYHXC.js";
35
+ } from "./chunk-4RAXRM4E.js";
36
36
  import {
37
37
  resolveGlobalBinary
38
- } from "./chunk-NBIAPFRB.js";
38
+ } from "./chunk-EQQK2GCR.js";
39
39
  import {
40
40
  readJsonSafe,
41
41
  writeFileAtomic,
@@ -1,17 +1,17 @@
1
1
  import {
2
2
  UNSET_IGNORED_SHELL_VALUE_STEP
3
- } from "./chunk-Y3IWISL4.js";
3
+ } from "./chunk-LPHUELFO.js";
4
4
  import {
5
5
  notificationAnswerStep
6
- } from "./chunk-O4J5GVKF.js";
6
+ } from "./chunk-2OROBVCH.js";
7
7
  import {
8
8
  matchMacAccountStep,
9
9
  retryAgentCommand
10
- } from "./chunk-OYGL6J2D.js";
10
+ } from "./chunk-MYA2MZVD.js";
11
11
  import {
12
12
  NPX_LATEST_COMMAND,
13
13
  npmExecSetupCommandFor
14
- } from "./chunk-BCYNGMS5.js";
14
+ } from "./chunk-E5LT4X66.js";
15
15
  import {
16
16
  EXIT
17
17
  } from "./chunk-BG4HHB7E.js";
@@ -21,7 +21,7 @@ import {
21
21
  import {
22
22
  compatibleProfileFor,
23
23
  isCompatibleAgentType
24
- } from "./chunk-ZLNUJLNE.js";
24
+ } from "./chunk-KMHC3PG6.js";
25
25
 
26
26
  // src/setup/closing.ts
27
27
  var ACTIVITY_URL = "pushary.com/dashboard/agent/activity";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  realpath
3
- } from "./chunk-H52M2TRV.js";
3
+ } from "./chunk-A4QPJFVF.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-NBIAPFRB.js";
15
+ } from "./chunk-EQQK2GCR.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-ZLNUJLNE.js";
28
+ } from "./chunk-KMHC3PG6.js";
29
29
 
30
30
  // src/live-capabilities.ts
31
31
  import { execFileSync } from "child_process";
@@ -4,16 +4,16 @@ import {
4
4
  } from "./chunk-WHB622LP.js";
5
5
  import {
6
6
  keyPrefix
7
- } from "./chunk-AVYEY7Q5.js";
7
+ } from "./chunk-7DQRFOCT.js";
8
8
  import {
9
9
  keyPrefixToShow
10
- } from "./chunk-VLKTJDUJ.js";
10
+ } from "./chunk-42TGZKJW.js";
11
11
  import {
12
12
  NPX_LATEST_COMMAND
13
- } from "./chunk-BCYNGMS5.js";
13
+ } from "./chunk-E5LT4X66.js";
14
14
  import {
15
15
  isValidApiKey
16
- } from "./chunk-ZLNUJLNE.js";
16
+ } from "./chunk-KMHC3PG6.js";
17
17
 
18
18
  // src/setup/key-account.ts
19
19
  var isKeyHeldByMacApp = (key, holder) => holder.macAppInstalled && holder.macAppKey === key;
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  RETRY_ACK,
6
6
  refusedReceiptMessage
7
- } from "./chunk-RVS6JPBJ.js";
7
+ } from "./chunk-OZJQXTEY.js";
8
8
 
9
9
  // src/command-receipts.ts
10
10
  import { randomUUID } from "crypto";
@@ -5,7 +5,7 @@ import {
5
5
  ensureCodexTrustsPusharyHooks,
6
6
  hermesHistoryNeedsTheCliHelper,
7
7
  recordInstalledHermesHistoryHelper
8
- } from "./chunk-CG5W5LPA.js";
8
+ } from "./chunk-WRUT4RBW.js";
9
9
  import {
10
10
  hermesReceiptPaths,
11
11
  hermesSetupPredatesThePluginFolder,
@@ -14,7 +14,7 @@ import {
14
14
  refreshHermesPluginFiles,
15
15
  refreshOpenClawPlugin,
16
16
  shippedHermesPlugin
17
- } from "./chunk-4FY7R645.js";
17
+ } from "./chunk-2NA62YF2.js";
18
18
  import {
19
19
  fxIgnoresInstructionsFile,
20
20
  fxInstructionsBody,
@@ -23,7 +23,7 @@ import {
23
23
  macAppFxBridge,
24
24
  refreshClineKey,
25
25
  switchFxHttpEntryToBridge
26
- } from "./chunk-LLHESE5J.js";
26
+ } from "./chunk-KPYMLGHD.js";
27
27
  import {
28
28
  OPENCODE_HOOK_BINARY,
29
29
  agentHookOwner,
@@ -36,16 +36,16 @@ import {
36
36
  openCodePluginDir,
37
37
  openCodeWired,
38
38
  withOpenCodeAskRules
39
- } from "./chunk-YXIGD5EM.js";
39
+ } from "./chunk-RFKP2QPM.js";
40
40
  import {
41
41
  detectClaudeVersion
42
- } from "./chunk-H52M2TRV.js";
42
+ } from "./chunk-A4QPJFVF.js";
43
43
  import {
44
44
  addCompatibleHooks,
45
45
  compatibleConfigFile,
46
46
  compatibleInstructionsFile,
47
47
  hasCompatibleHooks
48
- } from "./chunk-H2VFPD2R.js";
48
+ } from "./chunk-ENE3YCWH.js";
49
49
  import {
50
50
  GEMINI_HOOK_BINARY,
51
51
  addGeminiHooks,
@@ -57,13 +57,13 @@ import {
57
57
  geminiWired,
58
58
  hasGeminiHooks,
59
59
  planHooks
60
- } from "./chunk-642JCWTI.js";
60
+ } from "./chunk-6NIFF33D.js";
61
61
  import {
62
62
  transcriptsEnabled
63
- } from "./chunk-ZFS7EORW.js";
63
+ } from "./chunk-4XHYW7UN.js";
64
64
  import {
65
65
  KEY_FILE_MODE
66
- } from "./chunk-AVYEY7Q5.js";
66
+ } from "./chunk-7DQRFOCT.js";
67
67
  import {
68
68
  CLAUDE_CODE_PUSHARY_PERMISSION_RULES,
69
69
  CLAUDE_HOOK_BINARY,
@@ -110,7 +110,7 @@ import {
110
110
  renderAgentInstructions,
111
111
  supportedClaudeEvents,
112
112
  vscodePluginMcp
113
- } from "./chunk-7DJLYHXC.js";
113
+ } from "./chunk-4RAXRM4E.js";
114
114
  import {
115
115
  formatVersion
116
116
  } from "./chunk-6ICPEJY5.js";
@@ -118,7 +118,7 @@ import {
118
118
  hookCommandsUseBareNames,
119
119
  resolveGlobalBinDir,
120
120
  resolveGlobalBinary
121
- } from "./chunk-NBIAPFRB.js";
121
+ } from "./chunk-EQQK2GCR.js";
122
122
  import {
123
123
  readJsonSafe,
124
124
  writeFileAtomic,
@@ -128,7 +128,7 @@ import {
128
128
  HOOK_COMPATIBLE_PROFILES,
129
129
  isCompatibleAgentType,
130
130
  isRecord
131
- } from "./chunk-ZLNUJLNE.js";
131
+ } from "./chunk-KMHC3PG6.js";
132
132
 
133
133
  // src/reapply.ts
134
134
  import { dirname, join } from "path";
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  parseSseMessages
3
- } from "./chunk-DRDHWOOW.js";
3
+ } from "./chunk-ZJUYUFEA.js";
4
4
  import {
5
5
  fetchAsCredential
6
- } from "./chunk-AC5AJSGU.js";
6
+ } from "./chunk-DF6HDNIG.js";
7
7
  import {
8
8
  malformedApiKeyMessage
9
- } from "./chunk-VLKTJDUJ.js";
9
+ } from "./chunk-42TGZKJW.js";
10
10
  import {
11
11
  NPX_LATEST_COMMAND
12
- } from "./chunk-BCYNGMS5.js";
12
+ } from "./chunk-E5LT4X66.js";
13
13
 
14
14
  // src/mcp-stdio-bridge.ts
15
15
  var MCP_BRIDGE_BINARY = "pushary-mcp";
@@ -4,30 +4,30 @@ import {
4
4
  phoneApprovalSourceFor,
5
5
  rememberPhoneApproval,
6
6
  takePhoneApproval
7
- } from "./chunk-OP2ZMO4X.js";
7
+ } from "./chunk-IM35HIWM.js";
8
8
  import {
9
9
  claudeSettingsLocationFor,
10
10
  readClaudePermissionRules
11
- } from "./chunk-JQCTVTIB.js";
11
+ } from "./chunk-SY5A4BTI.js";
12
12
  import {
13
13
  defersToNativeMode
14
- } from "./chunk-WJQJUKGE.js";
14
+ } from "./chunk-TV3UAKAL.js";
15
15
  import {
16
16
  reportMachineDenial
17
- } from "./chunk-U3AXTMV7.js";
17
+ } from "./chunk-E63N5ML7.js";
18
18
  import {
19
19
  isGatingMoment,
20
20
  recordKeylessMoment
21
- } from "./chunk-MKBPHFPR.js";
21
+ } from "./chunk-QDYNEY25.js";
22
22
  import {
23
23
  isAdmitted,
24
24
  readAdmissionRules
25
- } from "./chunk-ICQYKYWS.js";
25
+ } from "./chunk-NV3DXCYB.js";
26
26
  import {
27
27
  activeHookSource,
28
28
  activeIdentity,
29
29
  namedSource
30
- } from "./chunk-H2VFPD2R.js";
30
+ } from "./chunk-ENE3YCWH.js";
31
31
  import {
32
32
  DEFAULT_SESSION,
33
33
  allow,
@@ -68,7 +68,7 @@ import {
68
68
  storedWaitDeadline,
69
69
  sweepFilesOlderThan,
70
70
  userScope
71
- } from "./chunk-ABSMY77L.js";
71
+ } from "./chunk-BOC25SJO.js";
72
72
  import {
73
73
  UNNAMED_ACTION,
74
74
  deriveAction,
@@ -79,7 +79,7 @@ import {
79
79
  patchDeletesFiles,
80
80
  permissionDeniedAction,
81
81
  scopePathFor
82
- } from "./chunk-QYR7VUU4.js";
82
+ } from "./chunk-JKWS5QQW.js";
83
83
  import {
84
84
  askUser,
85
85
  cancelQuestion,
@@ -93,30 +93,30 @@ import {
93
93
  sendNotification,
94
94
  waitForQuestion,
95
95
  withdrawQuestion
96
- } from "./chunk-OETPIQ4R.js";
96
+ } from "./chunk-CVZB2UJY.js";
97
97
  import {
98
98
  branchFor,
99
99
  projectNameFor,
100
100
  repoKeyFor,
101
101
  repositoryScopeFor
102
- } from "./chunk-U62LMG5F.js";
102
+ } from "./chunk-QKDK6C7Y.js";
103
103
  import {
104
104
  getMachineId
105
- } from "./chunk-4XTUCLYD.js";
105
+ } from "./chunk-IMKSRTFI.js";
106
106
  import {
107
107
  POSTTOOLUSE_MIRRORED_TOOLS
108
- } from "./chunk-7DJLYHXC.js";
108
+ } from "./chunk-4RAXRM4E.js";
109
109
  import {
110
110
  getApiKey,
111
111
  getBaseUrl,
112
112
  isMalformedApiKeyError
113
- } from "./chunk-VLKTJDUJ.js";
113
+ } from "./chunk-42TGZKJW.js";
114
114
  import {
115
115
  writeFileAtomic
116
116
  } from "./chunk-PM2NRK6Y.js";
117
117
  import {
118
118
  NPX_LATEST_COMMAND
119
- } from "./chunk-BCYNGMS5.js";
119
+ } from "./chunk-E5LT4X66.js";
120
120
  import {
121
121
  AGENT_QUESTION_STRATEGY,
122
122
  AGENT_QUESTION_TOOL,
@@ -185,7 +185,7 @@ import {
185
185
  terminalStaysLiveForTheCall,
186
186
  timeoutActionWithoutLocalPrompt,
187
187
  unapprovedScopeReason
188
- } from "./chunk-ZLNUJLNE.js";
188
+ } from "./chunk-KMHC3PG6.js";
189
189
 
190
190
  // src/terminal-answer-watch.ts
191
191
  import { closeSync, openSync, readSync, statSync } from "fs";
@@ -4,16 +4,16 @@ import {
4
4
  NpmMissingError,
5
5
  NpmPermissionError,
6
6
  NpmReleaseAgeError
7
- } from "./chunk-NBIAPFRB.js";
7
+ } from "./chunk-EQQK2GCR.js";
8
8
  import {
9
9
  writeFileAtomic
10
10
  } from "./chunk-PM2NRK6Y.js";
11
11
  import {
12
12
  NPX_LATEST_COMMAND
13
- } from "./chunk-BCYNGMS5.js";
13
+ } from "./chunk-E5LT4X66.js";
14
14
  import {
15
15
  readSetupAgentFailures
16
- } from "./chunk-ZLNUJLNE.js";
16
+ } from "./chunk-KMHC3PG6.js";
17
17
 
18
18
  // src/setup/config-write.ts
19
19
  var AgentConfigWriteError = class extends Error {
@@ -14,7 +14,7 @@ import {
14
14
  reachVerdict,
15
15
  reachesYou,
16
16
  verifyDelivery
17
- } from "./chunk-O4J5GVKF.js";
17
+ } from "./chunk-2OROBVCH.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-3BN74JWK.js";
32
+ } from "./chunk-UQHQ5WKT.js";
33
33
  import {
34
34
  checkApiKey
35
- } from "./chunk-5BSRXXGB.js";
35
+ } from "./chunk-Y3SW3AH4.js";
36
36
  import {
37
37
  reportedInstallSource
38
- } from "./chunk-PM4ER2NJ.js";
38
+ } from "./chunk-OX3RKATP.js";
39
39
  import {
40
40
  NPX_LATEST_COMMAND
41
- } from "./chunk-BCYNGMS5.js";
41
+ } from "./chunk-E5LT4X66.js";
42
42
  import {
43
43
  NO_PAIRING_COMPUTER,
44
44
  PAIR_TTL_SECONDS
45
- } from "./chunk-ZLNUJLNE.js";
45
+ } from "./chunk-KMHC3PG6.js";
46
46
 
47
47
  // src/onboarding.ts
48
48
  import qrcodeTerminal from "qrcode-terminal";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  isRecord
3
- } from "./chunk-ZLNUJLNE.js";
3
+ } from "./chunk-KMHC3PG6.js";
4
4
 
5
5
  // src/config-document.ts
6
6
  import { parse, stringify } from "smol-toml";
@@ -1,22 +1,22 @@
1
1
  import {
2
2
  cursorGateOwnsClaudeCall,
3
3
  readCursorGateRegistration
4
- } from "./chunk-E3CRPS7D.js";
4
+ } from "./chunk-7LCGDZB5.js";
5
5
  import {
6
6
  registerTranscript
7
- } from "./chunk-ZMXCW2N7.js";
7
+ } from "./chunk-YRIB6P5B.js";
8
8
  import {
9
9
  namedEvent
10
- } from "./chunk-H2VFPD2R.js";
10
+ } from "./chunk-ENE3YCWH.js";
11
11
  import {
12
12
  writeDegraded
13
- } from "./chunk-OETPIQ4R.js";
13
+ } from "./chunk-CVZB2UJY.js";
14
14
  import {
15
15
  claudeShapedHookInput,
16
16
  hookCompatibleProfileBySource,
17
17
  isGrokHookPayload,
18
18
  isGrokSessionEndStop
19
- } from "./chunk-ZLNUJLNE.js";
19
+ } from "./chunk-KMHC3PG6.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"];
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  configFilePath
3
- } from "./chunk-VLKTJDUJ.js";
3
+ } from "./chunk-42TGZKJW.js";
4
4
  import {
5
5
  normalizeInstallSource
6
- } from "./chunk-ZLNUJLNE.js";
6
+ } from "./chunk-KMHC3PG6.js";
7
7
 
8
8
  // src/install-source.ts
9
9
  import { readFileSync } from "fs";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  renderCommandHelp
3
- } from "./chunk-BCYNGMS5.js";
3
+ } from "./chunk-E5LT4X66.js";
4
4
  import {
5
5
  EXIT
6
6
  } from "./chunk-BG4HHB7E.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  isFinalCommandAckRefusal
3
- } from "./chunk-ZLNUJLNE.js";
3
+ } from "./chunk-KMHC3PG6.js";
4
4
 
5
5
  // src/command-ack-outcome.ts
6
6
  var SETTLED_ACK = { outcome: "settled" };
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  autoUpdateLock
3
- } from "./chunk-7DJLYHXC.js";
3
+ } from "./chunk-4RAXRM4E.js";
4
4
  import {
5
5
  installPackageGlobally,
6
6
  npmErrorMessage,
7
7
  throwIfNpmRefusesInstall
8
- } from "./chunk-NBIAPFRB.js";
8
+ } from "./chunk-EQQK2GCR.js";
9
9
  import {
10
10
  writeJsonAtomic
11
11
  } from "./chunk-PM2NRK6Y.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  HOOK_BUDGETS
3
- } from "./chunk-ZLNUJLNE.js";
3
+ } from "./chunk-KMHC3PG6.js";
4
4
 
5
5
  // src/opencode-protocol.ts
6
6
  var OPENCODE_PLUGIN_MARKER = "pushary-opencode-plugin w1";
@@ -3,24 +3,24 @@ import {
3
3
  expectedLaunchCapabilities,
4
4
  hasSpawnProvider,
5
5
  resolveControlPolicy
6
- } from "./chunk-5HHU6D5A.js";
6
+ } from "./chunk-LK6NP47P.js";
7
7
  import {
8
8
  daemonHasRemoteProof,
9
9
  daemonServiceManagerAvailable,
10
10
  hasDaemonServiceDefinition,
11
11
  readDaemonNeedsLogin,
12
12
  readDaemonStatus
13
- } from "./chunk-JLQHY75G.js";
13
+ } from "./chunk-CKRSZJZR.js";
14
14
  import {
15
15
  getMachineId
16
- } from "./chunk-4XTUCLYD.js";
16
+ } from "./chunk-IMKSRTFI.js";
17
17
  import {
18
18
  readControlMode,
19
19
  readKeyInForce
20
- } from "./chunk-AVYEY7Q5.js";
20
+ } from "./chunk-7DQRFOCT.js";
21
21
  import {
22
22
  getBaseUrl
23
- } from "./chunk-VLKTJDUJ.js";
23
+ } from "./chunk-42TGZKJW.js";
24
24
  import {
25
25
  getPackageVersion
26
26
  } from "./chunk-CXQWDQCJ.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  computerOsOfPlatform,
3
3
  isComputerAgent
4
- } from "./chunk-ZLNUJLNE.js";
4
+ } from "./chunk-KMHC3PG6.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.";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  isSafeReadOnlyCommand
3
- } from "./chunk-ZLNUJLNE.js";
3
+ } from "./chunk-KMHC3PG6.js";
4
4
 
5
5
  // src/ledger.ts
6
6
  import { appendFileSync, existsSync, mkdirSync, readFileSync, renameSync, rmSync, statSync } from "fs";