@herbertgao/pi-extensions 2026.10.6 → 2026.10.7

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 (473) hide show
  1. package/README.md +9 -13
  2. package/THIRD_PARTY_NOTICES.md +1 -53
  3. package/extensions/clef-format.mjs +113 -0
  4. package/extensions/clef.mjs +112 -0
  5. package/node_modules/@dietrichgebert/ponytail/.opencode/command/ponytail-debt.md +1 -1
  6. package/node_modules/@dietrichgebert/ponytail/.opencode/plugins/ponytail.mjs +30 -6
  7. package/node_modules/@dietrichgebert/ponytail/.qoder-plugin/plugin.json +1 -1
  8. package/node_modules/@dietrichgebert/ponytail/README.md +5 -1
  9. package/node_modules/@dietrichgebert/ponytail/hooks/claude-codex-hooks.json +3 -3
  10. package/node_modules/@dietrichgebert/ponytail/hooks/copilot-hooks.json +4 -4
  11. package/node_modules/@dietrichgebert/ponytail/hooks/ponytail-activate.js +158 -127
  12. package/node_modules/@dietrichgebert/ponytail/hooks/ponytail-config.js +5 -0
  13. package/node_modules/@dietrichgebert/ponytail/hooks/ponytail-map.js +8 -3
  14. package/node_modules/@dietrichgebert/ponytail/hooks/ponytail-runtime.js +14 -8
  15. package/node_modules/@dietrichgebert/ponytail/package.json +1 -1
  16. package/node_modules/@dietrichgebert/ponytail/pi-extension/index.js +16 -3
  17. package/node_modules/@dietrichgebert/ponytail/scripts/cursor-hooks.js +13 -3
  18. package/node_modules/@dietrichgebert/ponytail/scripts/uninstall.js +3 -2
  19. package/node_modules/@dietrichgebert/ponytail/skills/ponytail-debt/SKILL.md +3 -3
  20. package/node_modules/@herbertgao/pi-agency/package.json +2 -2
  21. package/node_modules/@herbertgao/pi-bark/package.json +2 -2
  22. package/node_modules/@herbertgao/pi-cc-extensions/README.en.md +1 -1
  23. package/node_modules/@herbertgao/pi-cc-extensions/README.md +1 -1
  24. package/node_modules/@herbertgao/pi-cc-extensions/extensions/feature/context.ts +283 -136
  25. package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/compact-mode.ts +90 -22
  26. package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/mouse/interaction.ts +66 -26
  27. package/node_modules/@herbertgao/pi-cc-extensions/package.json +5 -5
  28. package/node_modules/@herbertgao/pi-subagents/CHANGELOG.md +8 -0
  29. package/node_modules/@herbertgao/pi-subagents/docs/packages.md +211 -0
  30. package/node_modules/@herbertgao/pi-subagents/docs/rpc.md +61 -63
  31. package/node_modules/@herbertgao/pi-subagents/docs/workflows.md +24 -16
  32. package/node_modules/@herbertgao/pi-subagents/package.json +5 -5
  33. package/node_modules/@herbertgao/pi-subagents/src/agent-file-toggle.ts +51 -14
  34. package/node_modules/@herbertgao/pi-subagents/src/agent-manager.ts +123 -55
  35. package/node_modules/@herbertgao/pi-subagents/src/agent-runner.ts +144 -13
  36. package/node_modules/@herbertgao/pi-subagents/src/agent-source-badge.ts +78 -0
  37. package/node_modules/@herbertgao/pi-subagents/src/completion-outbox.ts +122 -0
  38. package/node_modules/@herbertgao/pi-subagents/src/custom-agents.ts +171 -79
  39. package/node_modules/@herbertgao/pi-subagents/src/index.ts +597 -296
  40. package/node_modules/@herbertgao/pi-subagents/src/package-resources.ts +724 -0
  41. package/node_modules/@herbertgao/pi-subagents/src/schedule.ts +1 -1
  42. package/node_modules/@herbertgao/pi-subagents/src/settings.ts +66 -0
  43. package/node_modules/@herbertgao/pi-subagents/src/types.ts +26 -4
  44. package/node_modules/@herbertgao/pi-subagents/src/ui/agent-widget.ts +2 -0
  45. package/node_modules/@herbertgao/pi-subagents/src/ui/conversation-viewer.ts +354 -32
  46. package/node_modules/@herbertgao/pi-subagents/src/ui/fleet-list.ts +33 -15
  47. package/node_modules/@herbertgao/pi-subagents/src/workflow/host.ts +6 -0
  48. package/node_modules/@herbertgao/pi-subagents/src/workflow/saved.ts +48 -2
  49. package/node_modules/@herbertgao/sol-pi/package.json +2 -2
  50. package/node_modules/@juicesharp/rpiv-ask-user-question/README.md +3 -3
  51. package/node_modules/@juicesharp/rpiv-ask-user-question/ask-user-question.ts +89 -39
  52. package/node_modules/@juicesharp/rpiv-ask-user-question/docs/configuration.md +1 -1
  53. package/node_modules/@juicesharp/rpiv-ask-user-question/docs/hosts.md +4 -4
  54. package/node_modules/@juicesharp/rpiv-ask-user-question/docs/keyboard.md +56 -23
  55. package/node_modules/@juicesharp/rpiv-ask-user-question/docs/tool-schema.md +6 -3
  56. package/node_modules/@juicesharp/rpiv-ask-user-question/locales/de.json +3 -1
  57. package/node_modules/@juicesharp/rpiv-ask-user-question/locales/en.json +3 -1
  58. package/node_modules/@juicesharp/rpiv-ask-user-question/locales/es.json +3 -1
  59. package/node_modules/@juicesharp/rpiv-ask-user-question/locales/fr.json +3 -1
  60. package/node_modules/@juicesharp/rpiv-ask-user-question/locales/pt-BR.json +3 -1
  61. package/node_modules/@juicesharp/rpiv-ask-user-question/locales/pt.json +3 -1
  62. package/node_modules/@juicesharp/rpiv-ask-user-question/locales/ru.json +3 -1
  63. package/node_modules/@juicesharp/rpiv-ask-user-question/locales/uk.json +3 -1
  64. package/node_modules/@juicesharp/rpiv-ask-user-question/locales/zh.json +3 -1
  65. package/node_modules/@juicesharp/rpiv-ask-user-question/package.json +5 -2
  66. package/node_modules/@juicesharp/rpiv-ask-user-question/presentation.ts +122 -0
  67. package/node_modules/@juicesharp/rpiv-ask-user-question/rpc-fallback.ts +73 -36
  68. package/node_modules/@juicesharp/rpiv-ask-user-question/state/build-questionnaire.ts +10 -1
  69. package/node_modules/@juicesharp/rpiv-ask-user-question/state/key-router.ts +15 -13
  70. package/node_modules/@juicesharp/rpiv-ask-user-question/state/questionnaire-session.ts +5 -1
  71. package/node_modules/@juicesharp/rpiv-ask-user-question/state/selectors/derivations.ts +15 -0
  72. package/node_modules/@juicesharp/rpiv-ask-user-question/state/selectors/projections.ts +4 -1
  73. package/node_modules/@juicesharp/rpiv-ask-user-question/state/state-reducer.ts +29 -18
  74. package/node_modules/@juicesharp/rpiv-ask-user-question/state/state.ts +1 -1
  75. package/node_modules/@juicesharp/rpiv-ask-user-question/tool/format-answer.ts +5 -2
  76. package/node_modules/@juicesharp/rpiv-ask-user-question/tool/normalize-params.ts +46 -0
  77. package/node_modules/@juicesharp/rpiv-ask-user-question/tool/response-envelope.ts +19 -8
  78. package/node_modules/@juicesharp/rpiv-ask-user-question/tool/types.ts +9 -2
  79. package/node_modules/@juicesharp/rpiv-ask-user-question/view/components/multi-select-view.ts +4 -2
  80. package/node_modules/@juicesharp/rpiv-ask-user-question/view/components/preview/preview-block-renderer.ts +56 -25
  81. package/node_modules/@juicesharp/rpiv-ask-user-question/view/components/preview/preview-pane.ts +131 -46
  82. package/node_modules/@juicesharp/rpiv-ask-user-question/view/dialog-builder.ts +94 -106
  83. package/node_modules/@juicesharp/rpiv-ask-user-question/view/dialog-copy.ts +51 -0
  84. package/node_modules/@juicesharp/rpiv-ask-user-question/view/scroll-window.ts +73 -0
  85. package/node_modules/@juicesharp/rpiv-ask-user-question/view/tab-content-strategy.ts +31 -10
  86. package/node_modules/@pi-plugins/fast-mode/dist/index.d.mts.map +1 -1
  87. package/node_modules/@pi-plugins/fast-mode/dist/index.mjs +474 -93
  88. package/node_modules/@pi-plugins/fast-mode/dist/index.mjs.map +1 -1
  89. package/node_modules/@pi-plugins/fast-mode/package.json +1 -1
  90. package/node_modules/pi-lens/CHANGELOG.md +88 -0
  91. package/node_modules/pi-lens/config/dependency-cruiser-eager-allowlist.json +3 -1
  92. package/node_modules/pi-lens/dist/{chunk-BJF25SUG.js → chunk-23WOO7TX.js} +11 -10
  93. package/node_modules/pi-lens/dist/{chunk-WATC3IQR.js → chunk-2B73ZPOK.js} +3 -3
  94. package/node_modules/pi-lens/dist/{chunk-N2IRDBZI.js → chunk-2BBLFX75.js} +101 -11
  95. package/node_modules/pi-lens/dist/{chunk-TA5L5KWQ.js → chunk-2CD5RS6M.js} +2 -2
  96. package/node_modules/pi-lens/dist/{chunk-3TTPKMEF.js → chunk-2VUQMUMT.js} +38 -37
  97. package/node_modules/pi-lens/dist/{chunk-5JHXUETW.js → chunk-3EFKIGZN.js} +3 -3
  98. package/node_modules/pi-lens/dist/chunk-3JNKMP3B.js +17 -0
  99. package/node_modules/pi-lens/dist/{chunk-6P54TMWL.js → chunk-3VPVG5SU.js} +6 -6
  100. package/node_modules/pi-lens/dist/{chunk-ZETYB3XG.js → chunk-3W7IEVVL.js} +44 -28
  101. package/node_modules/pi-lens/dist/chunk-3YN6V5TV.js +85 -0
  102. package/node_modules/pi-lens/dist/chunk-466Z26MG.js +30 -0
  103. package/node_modules/pi-lens/dist/{chunk-PCHDGUKT.js → chunk-4UNXBNE2.js} +12 -11
  104. package/node_modules/pi-lens/dist/{chunk-J7WJZ6W7.js → chunk-4W4VLAPJ.js} +12 -11
  105. package/node_modules/pi-lens/dist/{chunk-F5VLZHUW.js → chunk-52FUZI6K.js} +4 -2
  106. package/node_modules/pi-lens/dist/{chunk-H5EV3VMF.js → chunk-5NGR67U5.js} +2 -2
  107. package/node_modules/pi-lens/dist/{chunk-CBD2B5CP.js → chunk-5UCAH366.js} +21 -20
  108. package/node_modules/pi-lens/dist/{chunk-BHWHXMQ2.js → chunk-67WMNWEE.js} +9 -8
  109. package/node_modules/pi-lens/dist/{chunk-USHG4DLH.js → chunk-6C7JWPCP.js} +7 -7
  110. package/node_modules/pi-lens/dist/{chunk-VPWKF3GN.js → chunk-6GFRNVYR.js} +11 -10
  111. package/node_modules/pi-lens/dist/{chunk-3JL6IFD7.js → chunk-6SDEP3AJ.js} +9 -8
  112. package/node_modules/pi-lens/dist/{chunk-NJF2X5XF.js → chunk-6STA6Z7I.js} +19 -17
  113. package/node_modules/pi-lens/dist/{chunk-KJCWXUUS.js → chunk-724UL2TJ.js} +6 -4
  114. package/node_modules/pi-lens/dist/{chunk-MQA2YBAH.js → chunk-76MWC2K6.js} +3 -3
  115. package/node_modules/pi-lens/dist/{chunk-YLN4K6WD.js → chunk-77M37OKR.js} +10 -8
  116. package/node_modules/pi-lens/dist/{chunk-XHSCVSOL.js → chunk-7DYBLXYA.js} +3 -3
  117. package/node_modules/pi-lens/dist/{chunk-OC7LYAU5.js → chunk-AB3YYG6N.js} +24 -10
  118. package/node_modules/pi-lens/dist/{chunk-LD7WFTRX.js → chunk-ACXEQZOU.js} +16 -16
  119. package/node_modules/pi-lens/dist/{chunk-VSMJK3ZJ.js → chunk-AOHZU2BM.js} +1 -1
  120. package/node_modules/pi-lens/dist/{chunk-T4QZ6FEH.js → chunk-AW7R2GWG.js} +65 -8
  121. package/node_modules/pi-lens/dist/{chunk-GAYGGICG.js → chunk-BKE7E7TC.js} +10 -9
  122. package/node_modules/pi-lens/dist/{chunk-EUT3B22Y.js → chunk-BRGDSBJE.js} +13 -12
  123. package/node_modules/pi-lens/dist/{chunk-T54VJRAD.js → chunk-C34ZXZ7O.js} +55 -11
  124. package/node_modules/pi-lens/dist/{chunk-UGSMCQ4D.js → chunk-CHOW74WE.js} +1 -1
  125. package/node_modules/pi-lens/dist/{chunk-H2W2AXD3.js → chunk-CMMHNUZ2.js} +66 -58
  126. package/node_modules/pi-lens/dist/chunk-CSHFH5IN.js +17 -0
  127. package/node_modules/pi-lens/dist/chunk-EC47DWFA.js +56 -0
  128. package/node_modules/pi-lens/dist/{chunk-KJN4IOEJ.js → chunk-EJIUXPBX.js} +1 -1
  129. package/node_modules/pi-lens/dist/{chunk-IQZXOZ7S.js → chunk-EU63SDCG.js} +720 -334
  130. package/node_modules/pi-lens/dist/{chunk-LNOMA3MP.js → chunk-FCSOVF55.js} +107 -3
  131. package/node_modules/pi-lens/dist/{chunk-CFYISHUW.js → chunk-FLKWCIZH.js} +8 -5
  132. package/node_modules/pi-lens/dist/{chunk-OYTMZXRF.js → chunk-FMSO6RDZ.js} +16 -14
  133. package/node_modules/pi-lens/dist/{chunk-IUKPRZER.js → chunk-GAEGEPOC.js} +2 -2
  134. package/node_modules/pi-lens/dist/{chunk-6XX5HCLK.js → chunk-GBPP5P7X.js} +4 -4
  135. package/node_modules/pi-lens/dist/{chunk-TQFBZVCG.js → chunk-GXW6K4YJ.js} +1 -1
  136. package/node_modules/pi-lens/dist/{chunk-ZZUFZUQZ.js → chunk-H6MF6EVN.js} +331 -107
  137. package/node_modules/pi-lens/dist/{chunk-3JSEWUWI.js → chunk-IBGIOBEE.js} +3 -3
  138. package/node_modules/pi-lens/dist/chunk-IZSHAIJ7.js +26 -0
  139. package/node_modules/pi-lens/dist/{chunk-7ELY2CSM.js → chunk-JAU72XNY.js} +16 -14
  140. package/node_modules/pi-lens/dist/chunk-JMYYOTQG.js +77 -0
  141. package/node_modules/pi-lens/dist/{chunk-ELVWJYRV.js → chunk-JSQFTSC6.js} +12 -11
  142. package/node_modules/pi-lens/dist/{chunk-J6DFZDFA.js → chunk-KBG47GHP.js} +4 -4
  143. package/node_modules/pi-lens/dist/chunk-KDERNTCQ.js +28 -0
  144. package/node_modules/pi-lens/dist/chunk-KSX3TXSZ.js +69 -0
  145. package/node_modules/pi-lens/dist/{chunk-XGUL4SLQ.js → chunk-L3BLXZG7.js} +2 -2
  146. package/node_modules/pi-lens/dist/chunk-LOP6GRPH.js +31 -0
  147. package/node_modules/pi-lens/dist/{chunk-MTDRLSI7.js → chunk-M6HSLBWY.js} +1064 -986
  148. package/node_modules/pi-lens/dist/chunk-MQLUAEOC.js +162 -0
  149. package/node_modules/pi-lens/dist/{chunk-3MRXIJ6I.js → chunk-MRXKYPCS.js} +2 -2
  150. package/node_modules/pi-lens/dist/{chunk-D65GOCJB.js → chunk-MXGY6KPT.js} +19 -16
  151. package/node_modules/pi-lens/dist/{chunk-G3RLJYA2.js → chunk-N2H3ZPZY.js} +47 -1
  152. package/node_modules/pi-lens/dist/{chunk-HREZQCT3.js → chunk-N3X6Q4YT.js} +3 -3
  153. package/node_modules/pi-lens/dist/{chunk-HSIRMK2D.js → chunk-OCAGUNBC.js} +15 -15
  154. package/node_modules/pi-lens/dist/{chunk-ZOEYVXSV.js → chunk-OXXKQCSV.js} +6 -6
  155. package/node_modules/pi-lens/dist/{chunk-S6AMWKPC.js → chunk-P7266HLM.js} +2 -2
  156. package/node_modules/pi-lens/dist/{chunk-64LU2OVH.js → chunk-PHDMFAKM.js} +12 -2
  157. package/node_modules/pi-lens/dist/{chunk-IMSQR4WO.js → chunk-PNQDPDRC.js} +1 -1
  158. package/node_modules/pi-lens/dist/{chunk-IUR76K6A.js → chunk-Q7DUK4LX.js} +5 -5
  159. package/node_modules/pi-lens/dist/{chunk-CULQYFLU.js → chunk-QGQ5CCCG.js} +2 -2
  160. package/node_modules/pi-lens/dist/{chunk-UEAHAMEI.js → chunk-QHJ6DQ2R.js} +11 -11
  161. package/node_modules/pi-lens/dist/{chunk-BNKLYOOO.js → chunk-QILIYSJF.js} +1 -1
  162. package/node_modules/pi-lens/dist/{chunk-VYKKMYVT.js → chunk-QOBUHWHX.js} +11 -6
  163. package/node_modules/pi-lens/dist/{chunk-3PNFWVHT.js → chunk-QQNQ7SJW.js} +2 -75
  164. package/node_modules/pi-lens/dist/{chunk-7M4T5N3V.js → chunk-R3PCY3YS.js} +14 -13
  165. package/node_modules/pi-lens/dist/{chunk-MGIWSROG.js → chunk-RPLINGVB.js} +7 -7
  166. package/node_modules/pi-lens/dist/{chunk-CMU4RMJB.js → chunk-RWWYJ623.js} +10 -1
  167. package/node_modules/pi-lens/dist/{chunk-3FERWMCH.js → chunk-RXCOMYPY.js} +27 -26
  168. package/node_modules/pi-lens/dist/{chunk-7BX5DWSA.js → chunk-SAEFPSB6.js} +11 -11
  169. package/node_modules/pi-lens/dist/{chunk-N7YNJE5R.js → chunk-SQ4TVJBR.js} +10 -10
  170. package/node_modules/pi-lens/dist/{chunk-DMS52BEP.js → chunk-SS36ZX4J.js} +9 -7
  171. package/node_modules/pi-lens/dist/{chunk-JONGANYH.js → chunk-T6CPIZNT.js} +32 -30
  172. package/node_modules/pi-lens/dist/{chunk-6UYA642J.js → chunk-TYM6OUIT.js} +13 -12
  173. package/node_modules/pi-lens/dist/{chunk-ALQRYH6O.js → chunk-UXGETRP4.js} +13 -12
  174. package/node_modules/pi-lens/dist/{chunk-FGALODG3.js → chunk-UZ3TUTRV.js} +1 -1
  175. package/node_modules/pi-lens/dist/{chunk-J3FZR3YY.js → chunk-VCHXCQFG.js} +3 -3
  176. package/node_modules/pi-lens/dist/{chunk-3P4PF2BX.js → chunk-VCO24T4L.js} +34 -22
  177. package/node_modules/pi-lens/dist/{chunk-O7HZX7CA.js → chunk-VRZP76YM.js} +1 -1
  178. package/node_modules/pi-lens/dist/{chunk-VZHJS6DR.js → chunk-VSSBEUFT.js} +16 -15
  179. package/node_modules/pi-lens/dist/{chunk-U52SAGRM.js → chunk-VWCXW2E7.js} +1 -1
  180. package/node_modules/pi-lens/dist/{chunk-WW5BLB74.js → chunk-WOA4LN2R.js} +2 -2
  181. package/node_modules/pi-lens/dist/{chunk-ZMOMPX2Z.js → chunk-WU567RSC.js} +11 -10
  182. package/node_modules/pi-lens/dist/{chunk-N77WFUL7.js → chunk-XAGLWMJ4.js} +23 -22
  183. package/node_modules/pi-lens/dist/{chunk-WSEWKCXU.js → chunk-XCJN5IJU.js} +4 -4
  184. package/node_modules/pi-lens/dist/{chunk-IR6XFA5P.js → chunk-XIJZVPD5.js} +16 -14
  185. package/node_modules/pi-lens/dist/{chunk-OYOB3ZFG.js → chunk-XMSXXAHW.js} +2 -2
  186. package/node_modules/pi-lens/dist/{chunk-34OCDWOS.js → chunk-XTMJ7XDT.js} +1 -1
  187. package/node_modules/pi-lens/dist/{chunk-Z6BB4JLQ.js → chunk-XVF2VVXP.js} +5 -3
  188. package/node_modules/pi-lens/dist/{chunk-AFZYMAIV.js → chunk-YIUAVF7E.js} +37 -35
  189. package/node_modules/pi-lens/dist/{chunk-NFXP47RV.js → chunk-YSZNHOBY.js} +85 -31
  190. package/node_modules/pi-lens/dist/{chunk-V5MEBST3.js → chunk-YYOIQFRS.js} +21 -21
  191. package/node_modules/pi-lens/dist/chunk-Z527N6YQ.js +28 -0
  192. package/node_modules/pi-lens/dist/{chunk-D6YF5HKX.js → chunk-ZANLILYD.js} +22 -2
  193. package/node_modules/pi-lens/dist/{chunk-2UMYMRI3.js → chunk-ZGDGW2V3.js} +2 -2
  194. package/node_modules/pi-lens/dist/{chunk-6B5I6ICN.js → chunk-ZHFZWTZV.js} +12 -11
  195. package/node_modules/pi-lens/dist/{chunk-OEX24ECI.js → chunk-ZWFS3OEF.js} +51 -41
  196. package/node_modules/pi-lens/dist/{chunk-AXKPQ6ZI.js → chunk-ZXYDQ3TZ.js} +5 -5
  197. package/node_modules/pi-lens/dist/index.js +73783 -71033
  198. package/node_modules/pi-lens/dist/mcp/analyze-cli.js +18 -8
  199. package/node_modules/pi-lens/dist/mcp/cli.js +48 -37
  200. package/node_modules/pi-lens/dist/mcp/server.js +568 -397
  201. package/node_modules/pi-lens/dist/mcp/worker.js +67 -55
  202. package/node_modules/pi-lens/dist/probes/installer.js +20 -19
  203. package/node_modules/pi-lens/docs/astplayground.md +1 -1
  204. package/node_modules/pi-lens/docs/configuration.md +29 -0
  205. package/node_modules/pi-lens/docs/dependencies.md +3 -0
  206. package/node_modules/pi-lens/docs/features.md +2 -2
  207. package/node_modules/pi-lens/docs/globalconfig.md +2 -0
  208. package/node_modules/pi-lens/docs/language-coverage.md +2 -1
  209. package/node_modules/pi-lens/docs/lsp-capability-matrix.md +29 -7
  210. package/node_modules/pi-lens/docs/lsp-idle-eviction.md +38 -47
  211. package/node_modules/pi-lens/docs/pi-lens-fixer.md +4 -0
  212. package/node_modules/pi-lens/docs/pi-lens-merge-policy.md +17 -4
  213. package/node_modules/pi-lens/docs/pi-lens-retro.md +2 -1
  214. package/node_modules/pi-lens/docs/pi-lens-reviewer.md +18 -0
  215. package/node_modules/pi-lens/docs/pi-lens-subagent.md +7 -0
  216. package/node_modules/pi-lens/docs/real-harness.md +17 -0
  217. package/node_modules/pi-lens/docs/schema/pi-lens-config-v1.json +37 -2
  218. package/node_modules/pi-lens/docs/servercapabilities.md +15 -4
  219. package/node_modules/pi-lens/docs/settings.md +2 -1
  220. package/node_modules/pi-lens/package.json +1 -1
  221. package/node_modules/pi-provider-qoder/dist/index.js +30 -2
  222. package/node_modules/pi-provider-qoder/package.json +1 -1
  223. package/node_modules/pi-web-access/CHANGELOG.md +50 -0
  224. package/node_modules/pi-web-access/README.md +13 -7
  225. package/node_modules/pi-web-access/brave.ts +20 -2
  226. package/node_modules/pi-web-access/content-find.ts +2 -1
  227. package/node_modules/pi-web-access/dist/index.js +655 -406
  228. package/node_modules/pi-web-access/dist/mcp-cli.js +653 -416
  229. package/node_modules/pi-web-access/duckduckgo.ts +5 -1
  230. package/node_modules/pi-web-access/endpoint-pdf-extract.ts +225 -0
  231. package/node_modules/pi-web-access/extract.ts +51 -13
  232. package/node_modules/pi-web-access/fetch-params.ts +10 -0
  233. package/node_modules/pi-web-access/gemini-api.ts +15 -0
  234. package/node_modules/pi-web-access/gemini-search.ts +32 -152
  235. package/node_modules/pi-web-access/github-issue-pr.ts +80 -68
  236. package/node_modules/pi-web-access/index.ts +3 -0
  237. package/node_modules/pi-web-access/package.json +1 -1
  238. package/node_modules/pi-web-access/pdf-extract.ts +38 -4
  239. package/node_modules/pi-web-access/perplexity.ts +19 -2
  240. package/node_modules/pi-web-access/ssrf-protection.ts +24 -4
  241. package/node_modules/pi-web-access/summary-review.ts +10 -0
  242. package/node_modules/pi-web-access/tool-arguments.ts +5 -2
  243. package/node_modules/pi-web-access/video-extract.ts +6 -2
  244. package/node_modules/pi-web-access/web-tool-core.ts +53 -13
  245. package/package.json +19 -24
  246. package/node_modules/pi-jev-auto-mode/CHANGELOG.md +0 -118
  247. package/node_modules/pi-jev-auto-mode/LICENSE +0 -21
  248. package/node_modules/pi-jev-auto-mode/README.md +0 -292
  249. package/node_modules/pi-jev-auto-mode/SECURITY.md +0 -32
  250. package/node_modules/pi-jev-auto-mode/docs/calibration.md +0 -154
  251. package/node_modules/pi-jev-auto-mode/docs/design.md +0 -164
  252. package/node_modules/pi-jev-auto-mode/docs/security.md +0 -124
  253. package/node_modules/pi-jev-auto-mode/index.ts +0 -1
  254. package/node_modules/pi-jev-auto-mode/package.json +0 -72
  255. package/node_modules/pi-jev-auto-mode/src/call.ts +0 -180
  256. package/node_modules/pi-jev-auto-mode/src/decide.ts +0 -86
  257. package/node_modules/pi-jev-auto-mode/src/extension.ts +0 -881
  258. package/node_modules/pi-jev-auto-mode/src/intent.ts +0 -71
  259. package/node_modules/pi-jev-auto-mode/src/jev/availability.ts +0 -53
  260. package/node_modules/pi-jev-auto-mode/src/jev/criteria.ts +0 -19
  261. package/node_modules/pi-jev-auto-mode/src/jev/decide.ts +0 -187
  262. package/node_modules/pi-jev-auto-mode/src/jev/engine.ts +0 -165
  263. package/node_modules/pi-jev-auto-mode/src/jev/index.ts +0 -20
  264. package/node_modules/pi-jev-auto-mode/src/jev/questions.ts +0 -273
  265. package/node_modules/pi-jev-auto-mode/src/jev/response.ts +0 -64
  266. package/node_modules/pi-jev-auto-mode/src/jev/state.ts +0 -20
  267. package/node_modules/pi-jev-auto-mode/src/jev/transport.ts +0 -117
  268. package/node_modules/pi-jev-auto-mode/src/jev/types.ts +0 -46
  269. package/node_modules/pi-jev-auto-mode/src/policy.ts +0 -558
  270. package/node_modules/pi-jev-auto-mode/src/records.ts +0 -184
  271. package/node_modules/pi-jev-auto-mode/src/settings.ts +0 -349
  272. package/node_modules/pi-jev-auto-mode/src/ui.ts +0 -243
  273. package/node_modules/pi-lens/dist/chunk-2FQ62SPM.js +0 -83
  274. package/node_modules/pi-lens/dist/chunk-7AXO3ZDF.js +0 -30
  275. package/node_modules/pi-lens/dist/chunk-KMGPUKFD.js +0 -25
  276. package/node_modules/pi-lens/dist/chunk-OZJINN4O.js +0 -84
  277. package/node_modules/pi-lens/dist/chunk-RJFED73B.js +0 -79
  278. package/node_modules/pi-lens/dist/chunk-RTQNRM5X.js +0 -27
  279. package/node_modules/pi-lens/dist/chunk-VGEVL5EQ.js +0 -29
  280. package/node_modules/pi-lens/dist/chunk-WPE5FPGR.js +0 -54
  281. package/node_modules/pi-lens/dist/chunk-Z7QQA2KT.js +0 -27
  282. package/node_modules/resume-from/LICENSE +0 -21
  283. package/node_modules/resume-from/README.md +0 -167
  284. package/node_modules/resume-from/dist/adapters/claude-code/adapter.d.ts +0 -20
  285. package/node_modules/resume-from/dist/adapters/claude-code/adapter.js +0 -59
  286. package/node_modules/resume-from/dist/adapters/claude-code/contract.d.ts +0 -8
  287. package/node_modules/resume-from/dist/adapters/claude-code/contract.js +0 -4
  288. package/node_modules/resume-from/dist/adapters/claude-code/entries.d.ts +0 -30
  289. package/node_modules/resume-from/dist/adapters/claude-code/entries.js +0 -107
  290. package/node_modules/resume-from/dist/adapters/claude-code/index.d.ts +0 -3
  291. package/node_modules/resume-from/dist/adapters/claude-code/index.js +0 -2
  292. package/node_modules/resume-from/dist/adapters/claude-code/layout.d.ts +0 -29
  293. package/node_modules/resume-from/dist/adapters/claude-code/layout.js +0 -80
  294. package/node_modules/resume-from/dist/adapters/claude-code/readback.d.ts +0 -9
  295. package/node_modules/resume-from/dist/adapters/claude-code/readback.js +0 -39
  296. package/node_modules/resume-from/dist/adapters/claude-code/reader.d.ts +0 -40
  297. package/node_modules/resume-from/dist/adapters/claude-code/reader.js +0 -436
  298. package/node_modules/resume-from/dist/adapters/claude-code/redaction.d.ts +0 -26
  299. package/node_modules/resume-from/dist/adapters/claude-code/redaction.js +0 -145
  300. package/node_modules/resume-from/dist/adapters/claude-code/validation.d.ts +0 -4
  301. package/node_modules/resume-from/dist/adapters/claude-code/validation.js +0 -39
  302. package/node_modules/resume-from/dist/adapters/claude-code/writer.d.ts +0 -21
  303. package/node_modules/resume-from/dist/adapters/claude-code/writer.js +0 -306
  304. package/node_modules/resume-from/dist/adapters/codex/contract.d.ts +0 -13
  305. package/node_modules/resume-from/dist/adapters/codex/contract.js +0 -4
  306. package/node_modules/resume-from/dist/adapters/codex/index.d.ts +0 -6
  307. package/node_modules/resume-from/dist/adapters/codex/index.js +0 -43
  308. package/node_modules/resume-from/dist/adapters/codex/read.d.ts +0 -44
  309. package/node_modules/resume-from/dist/adapters/codex/read.js +0 -723
  310. package/node_modules/resume-from/dist/adapters/codex/readback.d.ts +0 -9
  311. package/node_modules/resume-from/dist/adapters/codex/readback.js +0 -47
  312. package/node_modules/resume-from/dist/adapters/codex/redaction.d.ts +0 -26
  313. package/node_modules/resume-from/dist/adapters/codex/redaction.js +0 -145
  314. package/node_modules/resume-from/dist/adapters/codex/rollout.d.ts +0 -115
  315. package/node_modules/resume-from/dist/adapters/codex/rollout.js +0 -269
  316. package/node_modules/resume-from/dist/adapters/codex/validation.d.ts +0 -7
  317. package/node_modules/resume-from/dist/adapters/codex/validation.js +0 -78
  318. package/node_modules/resume-from/dist/adapters/codex/write.d.ts +0 -17
  319. package/node_modules/resume-from/dist/adapters/codex/write.js +0 -141
  320. package/node_modules/resume-from/dist/adapters/contract.d.ts +0 -78
  321. package/node_modules/resume-from/dist/adapters/contract.js +0 -4
  322. package/node_modules/resume-from/dist/adapters/pi/adapter.d.ts +0 -15
  323. package/node_modules/resume-from/dist/adapters/pi/adapter.js +0 -213
  324. package/node_modules/resume-from/dist/adapters/pi/contract.d.ts +0 -24
  325. package/node_modules/resume-from/dist/adapters/pi/contract.js +0 -4
  326. package/node_modules/resume-from/dist/adapters/pi/format.d.ts +0 -162
  327. package/node_modules/resume-from/dist/adapters/pi/format.js +0 -223
  328. package/node_modules/resume-from/dist/adapters/pi/index.d.ts +0 -7
  329. package/node_modules/resume-from/dist/adapters/pi/index.js +0 -10
  330. package/node_modules/resume-from/dist/adapters/pi/parse.d.ts +0 -41
  331. package/node_modules/resume-from/dist/adapters/pi/parse.js +0 -371
  332. package/node_modules/resume-from/dist/adapters/pi/redaction.d.ts +0 -26
  333. package/node_modules/resume-from/dist/adapters/pi/redaction.js +0 -145
  334. package/node_modules/resume-from/dist/adapters/pi/serialize.d.ts +0 -20
  335. package/node_modules/resume-from/dist/adapters/pi/serialize.js +0 -87
  336. package/node_modules/resume-from/dist/adapters/pi/validate.d.ts +0 -14
  337. package/node_modules/resume-from/dist/adapters/pi/validate.js +0 -134
  338. package/node_modules/resume-from/dist/bin.d.ts +0 -35
  339. package/node_modules/resume-from/dist/bin.js +0 -135
  340. package/node_modules/resume-from/dist/contract.d.ts +0 -10
  341. package/node_modules/resume-from/dist/contract.js +0 -4
  342. package/node_modules/resume-from/dist/host/agents.d.ts +0 -29
  343. package/node_modules/resume-from/dist/host/agents.js +0 -20
  344. package/node_modules/resume-from/dist/host/cli/args.d.ts +0 -21
  345. package/node_modules/resume-from/dist/host/cli/args.js +0 -187
  346. package/node_modules/resume-from/dist/host/cli/contract.d.ts +0 -27
  347. package/node_modules/resume-from/dist/host/cli/contract.js +0 -4
  348. package/node_modules/resume-from/dist/host/cli/index.d.ts +0 -2
  349. package/node_modules/resume-from/dist/host/cli/index.js +0 -1
  350. package/node_modules/resume-from/dist/host/cli/presentation.d.ts +0 -2
  351. package/node_modules/resume-from/dist/host/cli/presentation.js +0 -11
  352. package/node_modules/resume-from/dist/host/cli/render.d.ts +0 -3
  353. package/node_modules/resume-from/dist/host/cli/render.js +0 -70
  354. package/node_modules/resume-from/dist/host/cli/runner.d.ts +0 -8
  355. package/node_modules/resume-from/dist/host/cli/runner.js +0 -125
  356. package/node_modules/resume-from/dist/host/contract.d.ts +0 -42
  357. package/node_modules/resume-from/dist/host/contract.js +0 -4
  358. package/node_modules/resume-from/dist/host/entry.d.ts +0 -52
  359. package/node_modules/resume-from/dist/host/entry.js +0 -91
  360. package/node_modules/resume-from/dist/host/index.d.ts +0 -11
  361. package/node_modules/resume-from/dist/host/index.js +0 -10
  362. package/node_modules/resume-from/dist/host/pi-extension/command.d.ts +0 -18
  363. package/node_modules/resume-from/dist/host/pi-extension/command.js +0 -126
  364. package/node_modules/resume-from/dist/host/pi-extension/contract.d.ts +0 -34
  365. package/node_modules/resume-from/dist/host/pi-extension/contract.js +0 -4
  366. package/node_modules/resume-from/dist/host/pi-extension/index.d.ts +0 -6
  367. package/node_modules/resume-from/dist/host/pi-extension/index.js +0 -4
  368. package/node_modules/resume-from/dist/host/pi-extension/picker.d.ts +0 -16
  369. package/node_modules/resume-from/dist/host/pi-extension/picker.js +0 -35
  370. package/node_modules/resume-from/dist/host/pi-extension/presentation.d.ts +0 -2
  371. package/node_modules/resume-from/dist/host/pi-extension/presentation.js +0 -11
  372. package/node_modules/resume-from/dist/host/pi-extension/register.d.ts +0 -25
  373. package/node_modules/resume-from/dist/host/pi-extension/register.js +0 -11
  374. package/node_modules/resume-from/dist/host/pi-extension/ui.d.ts +0 -20
  375. package/node_modules/resume-from/dist/host/pi-extension/ui.js +0 -1
  376. package/node_modules/resume-from/dist/host/profile.d.ts +0 -8
  377. package/node_modules/resume-from/dist/host/profile.js +0 -31
  378. package/node_modules/resume-from/dist/host/registry.d.ts +0 -8
  379. package/node_modules/resume-from/dist/host/registry.js +0 -33
  380. package/node_modules/resume-from/dist/host/wiring.d.ts +0 -41
  381. package/node_modules/resume-from/dist/host/wiring.js +0 -66
  382. package/node_modules/resume-from/dist/import/confirmation.d.ts +0 -9
  383. package/node_modules/resume-from/dist/import/confirmation.js +0 -27
  384. package/node_modules/resume-from/dist/import/contract.d.ts +0 -43
  385. package/node_modules/resume-from/dist/import/contract.js +0 -4
  386. package/node_modules/resume-from/dist/import/discovery/contract.d.ts +0 -63
  387. package/node_modules/resume-from/dist/import/discovery/contract.js +0 -4
  388. package/node_modules/resume-from/dist/import/discovery/errors.d.ts +0 -9
  389. package/node_modules/resume-from/dist/import/discovery/errors.js +0 -12
  390. package/node_modules/resume-from/dist/import/discovery/finder.d.ts +0 -11
  391. package/node_modules/resume-from/dist/import/discovery/finder.js +0 -269
  392. package/node_modules/resume-from/dist/import/discovery/homes.d.ts +0 -23
  393. package/node_modules/resume-from/dist/import/discovery/homes.js +0 -83
  394. package/node_modules/resume-from/dist/import/discovery/index.d.ts +0 -2
  395. package/node_modules/resume-from/dist/import/discovery/index.js +0 -2
  396. package/node_modules/resume-from/dist/import/discovery/ordering.d.ts +0 -3
  397. package/node_modules/resume-from/dist/import/discovery/ordering.js +0 -21
  398. package/node_modules/resume-from/dist/import/errors.d.ts +0 -22
  399. package/node_modules/resume-from/dist/import/errors.js +0 -20
  400. package/node_modules/resume-from/dist/import/index.d.ts +0 -3
  401. package/node_modules/resume-from/dist/import/index.js +0 -5
  402. package/node_modules/resume-from/dist/import/landing/contract.d.ts +0 -44
  403. package/node_modules/resume-from/dist/import/landing/contract.js +0 -4
  404. package/node_modules/resume-from/dist/import/landing/errors.d.ts +0 -15
  405. package/node_modules/resume-from/dist/import/landing/errors.js +0 -15
  406. package/node_modules/resume-from/dist/import/landing/handover.d.ts +0 -5
  407. package/node_modules/resume-from/dist/import/landing/handover.js +0 -12
  408. package/node_modules/resume-from/dist/import/landing/index.d.ts +0 -4
  409. package/node_modules/resume-from/dist/import/landing/index.js +0 -4
  410. package/node_modules/resume-from/dist/import/landing/lander.d.ts +0 -7
  411. package/node_modules/resume-from/dist/import/landing/lander.js +0 -133
  412. package/node_modules/resume-from/dist/import/landing/marker.d.ts +0 -9
  413. package/node_modules/resume-from/dist/import/landing/marker.js +0 -46
  414. package/node_modules/resume-from/dist/import/pipeline.d.ts +0 -28
  415. package/node_modules/resume-from/dist/import/pipeline.js +0 -154
  416. package/node_modules/resume-from/dist/import/preview/builder.d.ts +0 -6
  417. package/node_modules/resume-from/dist/import/preview/builder.js +0 -80
  418. package/node_modules/resume-from/dist/import/preview/contract.d.ts +0 -39
  419. package/node_modules/resume-from/dist/import/preview/contract.js +0 -4
  420. package/node_modules/resume-from/dist/import/preview/format.d.ts +0 -19
  421. package/node_modules/resume-from/dist/import/preview/format.js +0 -45
  422. package/node_modules/resume-from/dist/import/preview/index.d.ts +0 -2
  423. package/node_modules/resume-from/dist/import/preview/index.js +0 -1
  424. package/node_modules/resume-from/dist/import/preview/warnings.d.ts +0 -14
  425. package/node_modules/resume-from/dist/import/preview/warnings.js +0 -86
  426. package/node_modules/resume-from/dist/import/transfer/contract.d.ts +0 -48
  427. package/node_modules/resume-from/dist/import/transfer/contract.js +0 -4
  428. package/node_modules/resume-from/dist/import/transfer/index.d.ts +0 -2
  429. package/node_modules/resume-from/dist/import/transfer/index.js +0 -1
  430. package/node_modules/resume-from/dist/import/transfer/rules.d.ts +0 -3
  431. package/node_modules/resume-from/dist/import/transfer/rules.js +0 -228
  432. package/node_modules/resume-from/dist/import/wiring.d.ts +0 -24
  433. package/node_modules/resume-from/dist/import/wiring.js +0 -37
  434. package/node_modules/resume-from/dist/index.d.ts +0 -36
  435. package/node_modules/resume-from/dist/index.js +0 -36
  436. package/node_modules/resume-from/dist/platform/config/contract.d.ts +0 -35
  437. package/node_modules/resume-from/dist/platform/config/contract.js +0 -4
  438. package/node_modules/resume-from/dist/platform/config/defaults.d.ts +0 -16
  439. package/node_modules/resume-from/dist/platform/config/defaults.js +0 -22
  440. package/node_modules/resume-from/dist/platform/config/errors.d.ts +0 -9
  441. package/node_modules/resume-from/dist/platform/config/errors.js +0 -12
  442. package/node_modules/resume-from/dist/platform/config/index.d.ts +0 -5
  443. package/node_modules/resume-from/dist/platform/config/index.js +0 -6
  444. package/node_modules/resume-from/dist/platform/config/loader.d.ts +0 -10
  445. package/node_modules/resume-from/dist/platform/config/loader.js +0 -47
  446. package/node_modules/resume-from/dist/platform/config/paths.d.ts +0 -13
  447. package/node_modules/resume-from/dist/platform/config/paths.js +0 -37
  448. package/node_modules/resume-from/dist/platform/config/validate.d.ts +0 -9
  449. package/node_modules/resume-from/dist/platform/config/validate.js +0 -117
  450. package/node_modules/resume-from/dist/platform/repo/contract.d.ts +0 -36
  451. package/node_modules/resume-from/dist/platform/repo/contract.js +0 -4
  452. package/node_modules/resume-from/dist/platform/repo/git.d.ts +0 -21
  453. package/node_modules/resume-from/dist/platform/repo/git.js +0 -77
  454. package/node_modules/resume-from/dist/platform/repo/index.d.ts +0 -2
  455. package/node_modules/resume-from/dist/platform/repo/index.js +0 -1
  456. package/node_modules/resume-from/dist/platform/repo/reader.d.ts +0 -3
  457. package/node_modules/resume-from/dist/platform/repo/reader.js +0 -170
  458. package/node_modules/resume-from/dist/platform/store/contract.d.ts +0 -31
  459. package/node_modules/resume-from/dist/platform/store/contract.js +0 -4
  460. package/node_modules/resume-from/dist/platform/store/file-committer.d.ts +0 -3
  461. package/node_modules/resume-from/dist/platform/store/file-committer.js +0 -391
  462. package/node_modules/resume-from/dist/platform/store/index.d.ts +0 -2
  463. package/node_modules/resume-from/dist/platform/store/index.js +0 -2
  464. package/node_modules/resume-from/dist/platform/tokens/contract.d.ts +0 -12
  465. package/node_modules/resume-from/dist/platform/tokens/contract.js +0 -4
  466. package/node_modules/resume-from/dist/platform/tokens/estimator.d.ts +0 -12
  467. package/node_modules/resume-from/dist/platform/tokens/estimator.js +0 -111
  468. package/node_modules/resume-from/dist/platform/tokens/index.d.ts +0 -2
  469. package/node_modules/resume-from/dist/platform/tokens/index.js +0 -1
  470. package/node_modules/resume-from/dist/session/contract.d.ts +0 -116
  471. package/node_modules/resume-from/dist/session/contract.js +0 -4
  472. package/node_modules/resume-from/package.json +0 -83
  473. package/node_modules/resume-from/shims/pi/extensions/resume-from.js +0 -118
@@ -1477,6 +1477,33 @@ const compareSets = /*#__PURE__*/ makeCompareSet(compareBoth);
1477
1477
  * @since 2.0.0
1478
1478
  */
1479
1479
  const isEqual = (u) => hasProperty(u, symbol);
1480
+ /**
1481
+ * Wraps {@link equals} as an `Equivalence<A>`.
1482
+ *
1483
+ * **When to use**
1484
+ *
1485
+ * Use when you want to pass `Equal.equals` to APIs that require an
1486
+ * `Equivalence`.
1487
+ *
1488
+ * **Details**
1489
+ *
1490
+ * - Returns a function `(a: A, b: A) => boolean` that delegates to
1491
+ * {@link equals}.
1492
+ * - Pure; allocates a thin wrapper on each call.
1493
+ *
1494
+ * **Example** (Deduplicating with Equal semantics)
1495
+ *
1496
+ * ```ts import.meta.vitest
1497
+ * import { Array, Equal } from "effect"
1498
+ *
1499
+ * Array.dedupeWith([1, 2, 2, 3, 1], Equal.asEquivalence<number>()) // => [1, 2, 3]
1500
+ * ```
1501
+ *
1502
+ * @see {@link equals} — the underlying comparison function
1503
+ * @category instances
1504
+ * @since 4.0.0
1505
+ */
1506
+ const asEquivalence = () => equals$2;
1480
1507
  //#endregion
1481
1508
  //#region ../../node_modules/.pnpm/effect@4.0.0-rc.115/node_modules/effect/dist/Redactable.js
1482
1509
  /**
@@ -2819,7 +2846,7 @@ const String$5 = /*#__PURE__*/ make$25((self, that) => self < that ? -1 : 1);
2819
2846
  * @category instances
2820
2847
  * @since 4.0.0
2821
2848
  */
2822
- const Number$4 = /*#__PURE__*/ make$25((self, that) => {
2849
+ const Number$5 = /*#__PURE__*/ make$25((self, that) => {
2823
2850
  if (globalThis.Number.isNaN(self) && globalThis.Number.isNaN(that)) return 0;
2824
2851
  if (globalThis.Number.isNaN(self)) return -1;
2825
2852
  if (globalThis.Number.isNaN(that)) return 1;
@@ -2940,6 +2967,68 @@ const mapInput = /*#__PURE__*/ dual(2, (self, f) => make$25((b1, b2) => self(f(b
2940
2967
  * @since 4.0.0
2941
2968
  */
2942
2969
  const isGreaterThan$1 = (O) => dual(2, (self, that) => O(self, that) === 1);
2970
+ /**
2971
+ * Returns the minimum of two values according to the given order. If they are equal, returns the first argument.
2972
+ *
2973
+ * **When to use**
2974
+ *
2975
+ * Use when you need to select the smaller of two values according to an
2976
+ * `Order`.
2977
+ *
2978
+ * **Details**
2979
+ *
2980
+ * Returns the value that compares as less than or equal to the other value. If
2981
+ * values are equal, the first argument is returned.
2982
+ *
2983
+ * **Example** (Selecting the minimum value)
2984
+ *
2985
+ * ```ts import.meta.vitest
2986
+ * import { Order } from "effect"
2987
+ *
2988
+ * const minNumber = Order.min(Order.Number)
2989
+ *
2990
+ * minNumber(1, 2) // => 1
2991
+ * minNumber(2, 1) // => 1
2992
+ * minNumber(1, 1) // => 1
2993
+ * ```
2994
+ *
2995
+ * @see {@link max} for the maximum of two values
2996
+ * @see {@link clamp} to clamp a value between min and max
2997
+ * @category comparisons
2998
+ * @since 2.0.0
2999
+ */
3000
+ const min$1 = (O) => dual(2, (self, that) => self === that || O(self, that) < 1 ? self : that);
3001
+ /**
3002
+ * Returns the maximum of two values according to the given order. If they are equal, returns the first argument.
3003
+ *
3004
+ * **When to use**
3005
+ *
3006
+ * Use when you need to select the larger of two values according to an
3007
+ * `Order`.
3008
+ *
3009
+ * **Details**
3010
+ *
3011
+ * Returns the value that compares as greater than or equal to the other value.
3012
+ * If values are equal, the first argument is returned.
3013
+ *
3014
+ * **Example** (Selecting the maximum value)
3015
+ *
3016
+ * ```ts import.meta.vitest
3017
+ * import { Order } from "effect"
3018
+ *
3019
+ * const maxNumber = Order.max(Order.Number)
3020
+ *
3021
+ * maxNumber(1, 2) // => 2
3022
+ * maxNumber(2, 1) // => 2
3023
+ * maxNumber(1, 1) // => 1
3024
+ * ```
3025
+ *
3026
+ * @see {@link min} for the minimum of two values
3027
+ * @see {@link clamp} to clamp a value between min and max
3028
+ * @category comparisons
3029
+ * @since 2.0.0
3030
+ */
3031
+ const max$1 = (O) => dual(2, (self, that) => self === that || O(self, that) > -1 ? self : that);
2943
3032
  //#endregion
2944
3033
  //#region ../../node_modules/.pnpm/effect@4.0.0-rc.115/node_modules/effect/dist/Option.js
2945
3034
  /**
@@ -3366,7 +3455,7 @@ const ServiceProto = {
3366
3455
  .../*#__PURE__*/ Prototype({
3367
3456
  label: "Service",
3368
3457
  evaluate(fiber) {
3369
- return exitSucceed(get$2(fiber.context, this));
3458
+ return exitSucceed(get$3(fiber.context, this));
3370
3459
  }
3371
3460
  }),
3372
3461
  toJSON() {
@@ -3382,10 +3471,10 @@ const ServiceProto = {
3382
3471
  return make$24(this, self);
3383
3472
  },
3384
3473
  use(f) {
3385
- return withFiber$1((fiber) => f(get$2(fiber.context, this)));
3474
+ return withFiber$1((fiber) => f(get$3(fiber.context, this)));
3386
3475
  },
3387
3476
  useSync(f) {
3388
- return withFiber$1((fiber) => exitSucceed(f(get$2(fiber.context, this))));
3477
+ return withFiber$1((fiber) => exitSucceed(f(get$3(fiber.context, this))));
3389
3478
  }
3390
3479
  };
3391
3480
  const cacheKeys = /*#__PURE__*/ new Set();
@@ -3735,7 +3824,7 @@ const getUnsafe = /*#__PURE__*/ dual(2, (self, service) => {
3735
3824
  * @category getters
3736
3825
  * @since 2.0.0
3737
3826
  */
3738
- const get$2 = getUnsafe;
3827
+ const get$3 = getUnsafe;
3739
3828
  const defaultValueCacheKey = "~effect/Context/defaultValue";
3740
3829
  const getDefaultValue = (ref) => {
3741
3830
  if (defaultValueCacheKey in ref) return ref[defaultValueCacheKey];
@@ -4078,6 +4167,59 @@ const isFailure$1 = isFailure$2;
4078
4167
  */
4079
4168
  const isSuccess$1 = isSuccess$2;
4080
4169
  //#endregion
4170
+ //#region ../../node_modules/.pnpm/effect@4.0.0-rc.115/node_modules/effect/dist/Iterable.js
4171
+ /**
4172
+ * Returns the first element that satisfies the specified
4173
+ * predicate, or `None` if no such element exists.
4174
+ *
4175
+ * **Example** (Finding the first match)
4176
+ *
4177
+ * ```ts import.meta.vitest
4178
+ * import { Iterable, Option } from "effect"
4179
+ *
4180
+ * const numbers = [1, 3, 4, 6, 8]
4181
+ * const firstEven = Iterable.findFirst(numbers, (x) => x % 2 === 0)
4182
+ * firstEven // => Option.some(4)
4183
+ *
4184
+ * const firstGreaterThan10 = Iterable.findFirst(numbers, (x) => x > 10)
4185
+ * firstGreaterThan10 // => Option.none()
4186
+ *
4187
+ * // With index
4188
+ * const letters = ["a", "b", "c", "d"]
4189
+ * const atEvenIndex = Iterable.findFirst(letters, (_, i) => i % 2 === 0)
4190
+ * atEvenIndex // => Option.some("a")
4191
+ *
4192
+ * // Type refinement
4193
+ * const mixed: Array<string | number> = [1, "hello", 2, "world"]
4194
+ * const firstString = Iterable.findFirst(
4195
+ * mixed,
4196
+ * (x): x is string => typeof x === "string"
4197
+ * )
4198
+ * firstString // => Option.some("hello")
4199
+ *
4200
+ * // Transform during search
4201
+ * const findSquareRoot = Iterable.findFirst([1, 4, 9, 16], (x) => {
4202
+ * const sqrt = Math.sqrt(x)
4203
+ * return Number.isInteger(sqrt) ? Option.some(sqrt) : Option.none()
4204
+ * })
4205
+ * findSquareRoot // => Option.some(1)
4206
+ * ```
4207
+ *
4208
+ * @category searching
4209
+ * @since 2.0.0
4210
+ */
4211
+ const findFirst$1 = /*#__PURE__*/ dual(2, (self, f) => {
4212
+ let i = 0;
4213
+ for (const a of self) {
4214
+ const o = f(a, i);
4215
+ if (isBoolean(o)) {
4216
+ if (o) return some(a);
4217
+ } else if (isSome(o)) return o;
4218
+ i++;
4219
+ }
4220
+ return none();
4221
+ });
4222
+ //#endregion
4081
4223
  //#region ../../node_modules/.pnpm/effect@4.0.0-rc.115/node_modules/effect/dist/Record.js
4082
4224
  /**
4083
4225
  * Checks whether a given `key` exists in a record.
@@ -4095,9 +4237,38 @@ const isSuccess$1 = isSuccess$2;
4095
4237
  * @since 2.0.0
4096
4238
  */
4097
4239
  const has = /*#__PURE__*/ dual(2, (self, key) => Object.hasOwn(self, key));
4240
+ /**
4241
+ * Retrieves a value at a particular key from a record safely, returning it wrapped in an `Option`.
4242
+ *
4243
+ * **Example** (Getting a value as an Option)
4244
+ *
4245
+ * ```ts import.meta.vitest
4246
+ * import { Option, Record as R } from "effect"
4247
+ *
4248
+ * const person: Record<string, unknown> = { name: "John Doe", age: 35 }
4249
+ *
4250
+ * R.get(person, "name") // => Option.some("John Doe")
4251
+ * R.get(person, "email") // => Option.none()
4252
+ * ```
4253
+ *
4254
+ * @category getters
4255
+ * @since 2.0.0
4256
+ */
4257
+ const get$2 = /*#__PURE__*/ dual(2, (self, key) => Object.hasOwn(self, key) ? some(self[key]) : none());
4098
4258
  //#endregion
4099
4259
  //#region ../../node_modules/.pnpm/effect@4.0.0-rc.115/node_modules/effect/dist/Array.js
4100
4260
  /**
4261
+ * Works with JavaScript arrays, readonly arrays, and non-empty arrays.
4262
+ *
4263
+ * The helpers cover common collection work such as creating arrays, reading
4264
+ * elements, transforming values, sorting, grouping, splitting, combining, and
4265
+ * reducing many values to one result. Helpers that change contents return new
4266
+ * arrays and preserve non-empty array types when the result is guaranteed to
4267
+ * contain values.
4268
+ *
4269
+ * @since 2.0.0
4270
+ */
4271
+ /**
4101
4272
  * Exposes the global array constructor.
4102
4273
  *
4103
4274
  * **When to use**
@@ -4285,6 +4456,37 @@ const take$2 = /*#__PURE__*/ dual(2, (self, n) => {
4285
4456
  return input.slice(0, clampCount(n, input.length));
4286
4457
  });
4287
4458
  /**
4459
+ * Returns the first element matching a predicate, refinement, or mapping
4460
+ * function, wrapped in `Option`.
4461
+ *
4462
+ * **When to use**
4463
+ *
4464
+ * Use to scan an iterable in iteration order and return the first selected
4465
+ * element or mapped value as an `Option`.
4466
+ *
4467
+ * **Details**
4468
+ *
4469
+ * Accepts a predicate `(a, i) => boolean`, a refinement, or a function
4470
+ * `(a, i) => Option<B>` for simultaneous find-and-transform. If no element
4471
+ * matches, this returns `Option.none()`.
4472
+ *
4473
+ * **Example** (Finding the first match)
4474
+ *
4475
+ * ```ts import.meta.vitest
4476
+ * import { Array, Option } from "effect"
4477
+ *
4478
+ * Array.findFirst([1, 2, 3, 4, 5], (x) => x > 3) // => Option.some(4)
4479
+ * ```
4480
+ *
4481
+ * @see {@link findLast} — search from the end
4482
+ * @see {@link findFirstIndex} — get the index instead
4483
+ * @see {@link findFirstWithIndex} — get both element and index
4484
+ *
4485
+ * @category searching
4486
+ * @since 2.0.0
4487
+ */
4488
+ const findFirst = findFirst$1;
4489
+ /**
4288
4490
  * Sorts an array by the given `Order`, returning a new array.
4289
4491
  *
4290
4492
  * **When to use**
@@ -4366,6 +4568,56 @@ const sortBy = (...orders) => {
4366
4568
  };
4367
4569
  };
4368
4570
  /**
4571
+ * Returns a membership-test function using a custom equivalence.
4572
+ *
4573
+ * **When to use**
4574
+ *
4575
+ * Use when checking membership with caller-provided equality instead of
4576
+ * `Equal.equivalence()`.
4577
+ *
4578
+ * **Example** (Checking with custom equality)
4579
+ *
4580
+ * ```ts import.meta.vitest
4581
+ * import { Array, pipe } from "effect"
4582
+ *
4583
+ * const containsNumber = Array.containsWith((a: number, b: number) => a === b)
4584
+ *
4585
+ * pipe([1, 2, 3, 4], containsNumber(3)) // => true
4586
+ * ```
4587
+ *
4588
+ * @see {@link contains} for the `Equal.equivalence()` variant
4589
+ *
4590
+ * @category predicates
4591
+ * @since 2.0.0
4592
+ */
4593
+ const containsWith = (isEquivalent) => dual(2, (self, a) => {
4594
+ for (const i of self) if (isEquivalent(a, i)) return true;
4595
+ return false;
4596
+ });
4597
+ /**
4598
+ * Checks whether an array contains a value, using `Equal.equivalence()` for
4599
+ * comparison.
4600
+ *
4601
+ * **When to use**
4602
+ *
4603
+ * Use to check whether an iterable contains a value using Effect's default
4604
+ * equality instead of providing a comparison function.
4605
+ *
4606
+ * **Example** (Checking membership)
4607
+ *
4608
+ * ```ts import.meta.vitest
4609
+ * import { Array, pipe } from "effect"
4610
+ *
4611
+ * pipe(["a", "b", "c", "d"], Array.contains("c")) // => true
4612
+ * ```
4613
+ *
4614
+ * @see {@link containsWith} — use custom equality
4615
+ *
4616
+ * @category predicates
4617
+ * @since 2.0.0
4618
+ */
4619
+ const contains = /*#__PURE__*/ containsWith(/*#__PURE__*/ asEquivalence());
4620
+ /**
4369
4621
  * Creates an empty array.
4370
4622
  *
4371
4623
  * **When to use**
@@ -5704,7 +5956,7 @@ var FiberImpl = class {
5704
5956
  return this._dispatcher ??= this.cache.scheduler.makeDispatcher();
5705
5957
  }
5706
5958
  getRef(ref) {
5707
- return get$2(this.context, ref);
5959
+ return get$3(this.context, ref);
5708
5960
  }
5709
5961
  addObserver(cb) {
5710
5962
  if (this._exit) {
@@ -5847,17 +6099,17 @@ var FiberImpl = class {
5847
6099
  const makeFiberContextCache = (context) => {
5848
6100
  const currentTracer = getOrUndefinedUnsafe(context, TracerKey);
5849
6101
  return {
5850
- scheduler: get$2(context, Scheduler),
6102
+ scheduler: get$3(context, Scheduler),
5851
6103
  tracer: currentTracer,
5852
6104
  tracerContext: currentTracer ? currentTracer["context"] : void 0,
5853
- tracerEnabled: get$2(context, TracerEnabled),
6105
+ tracerEnabled: get$3(context, TracerEnabled),
5854
6106
  span: getOrUndefinedUnsafe(context, ParentSpanKey),
5855
- logLevel: get$2(context, CurrentLogLevel),
5856
- minimumLogLevel: get$2(context, MinimumLogLevel),
5857
- stackFrame: get$2(context, CurrentStackFrame),
6107
+ logLevel: get$3(context, CurrentLogLevel),
6108
+ minimumLogLevel: get$3(context, MinimumLogLevel),
6109
+ stackFrame: get$3(context, CurrentStackFrame),
5858
6110
  runtimeMetrics: getOrUndefinedUnsafe(context, FiberRuntimeMetricsKey),
5859
- maxOpsBeforeYield: get$2(context, MaxOpsBeforeYield),
5860
- preventYield: get$2(context, PreventSchedulerYield)
6111
+ maxOpsBeforeYield: get$3(context, MaxOpsBeforeYield),
6112
+ preventYield: get$3(context, PreventSchedulerYield)
5861
6113
  };
5862
6114
  };
5863
6115
  const deferredInterruptCont = {
@@ -6304,7 +6556,7 @@ const catchCauseFilter = /*#__PURE__*/ dual(3, (self, filter, f) => catchCause$1
6304
6556
  /** @internal */
6305
6557
  const catch_$1 = /*#__PURE__*/ dual(2, (self, f) => catchCauseFilter(self, findError, (e) => f(e)));
6306
6558
  /** @internal */
6307
- const catchIf$1 = /*#__PURE__*/ dual((args) => isEffect(args[0]), (self, predicate, f, orElse) => catchCause$1(self, (cause) => {
6559
+ const catchIf = /*#__PURE__*/ dual((args) => isEffect(args[0]), (self, predicate, f, orElse) => catchCause$1(self, (cause) => {
6308
6560
  const error = findError(cause);
6309
6561
  if (isFailure$1(error)) return failCause$3(error.failure);
6310
6562
  if (!predicate(error.success)) return orElse ? internalCall(() => orElse(error.success)) : failCause$3(cause);
@@ -6313,9 +6565,15 @@ const catchIf$1 = /*#__PURE__*/ dual((args) => isEffect(args[0]), (self, predica
6313
6565
  /** @internal */
6314
6566
  const catchTag$1 = /*#__PURE__*/ dual((args) => isEffect(args[0]), (self, k, f, orElse) => {
6315
6567
  const pred = Array.isArray(k) ? (e) => hasProperty(e, "_tag") && k.includes(e._tag) : isTagged(k);
6316
- return catchIf$1(self, pred, f, orElse);
6568
+ return catchIf(self, pred, f, orElse);
6317
6569
  });
6318
6570
  /** @internal */
6571
+ const catchReason$1 = /*#__PURE__*/ dual((args) => isEffect(args[0]), (self, errorTag, reasonTag, f, orElse) => catchIf(self, (e) => isTagged(e, errorTag) && hasProperty(e, "reason") && (orElse !== void 0 || isTagged(e.reason, reasonTag)), (e) => {
6572
+ const reason = e.reason;
6573
+ if (isTagged(reason, reasonTag)) return f(reason, e);
6574
+ return orElse ? internalCall(() => orElse(reason, e)) : fail$4(e);
6575
+ }));
6576
+ /** @internal */
6319
6577
  const mapError$1 = /*#__PURE__*/ dual(2, (self, f) => catch_$1(self, (error) => failSync(() => f(error))));
6320
6578
  /** @internal */
6321
6579
  const orDie$1 = (self) => catch_$1(self, die$1);
@@ -6999,7 +7257,7 @@ const logLevelToOrder = (level) => {
6999
7257
  }
7000
7258
  };
7001
7259
  /** @internal */
7002
- const isLogLevelGreaterThan = /*#__PURE__*/ isGreaterThan$1(/* @__PURE__ */ mapInput(Number$4, logLevelToOrder));
7260
+ const isLogLevelGreaterThan = /*#__PURE__*/ isGreaterThan$1(/* @__PURE__ */ mapInput(Number$5, logLevelToOrder));
7003
7261
  /** @internal */
7004
7262
  const CurrentLoggers = /*#__PURE__*/ Reference("effect/Logger/CurrentLoggers", { defaultValue: () => /* @__PURE__ */ new Set([defaultLogger, tracerLogger]) });
7005
7263
  /** @internal */
@@ -8633,8 +8891,105 @@ const ProtoTimeZone = {
8633
8891
  ({ ...ProtoTimeZone });
8634
8892
  /** @internal */
8635
8893
  const toDateUtc$1 = (self) => new Date(self.epochMilliseconds);
8894
+ globalThis.Number;
8895
+ /**
8896
+ * Order instance for `number` values.
8897
+ *
8898
+ * **When to use**
8899
+ *
8900
+ * Use when you need to sort or compare numbers through APIs that accept an
8901
+ * ordering instance.
8902
+ *
8903
+ * **Example** (Comparing numbers)
8904
+ *
8905
+ * ```ts import.meta.vitest
8906
+ * import { Number } from "effect"
8907
+ *
8908
+ * Number.Order(1, 2) // => -1
8909
+ * Number.Order(2, 1) // => 1
8910
+ * Number.Order(1, 1) // => 0
8911
+ * ```
8912
+ *
8913
+ * @category instances
8914
+ * @since 2.0.0
8915
+ */
8916
+ const Order$1 = Number$5;
8917
+ /**
8918
+ * Returns the minimum between two `number`s.
8919
+ *
8920
+ * **When to use**
8921
+ *
8922
+ * Use to select the smaller of two numbers.
8923
+ *
8924
+ * **Example** (Finding the minimum)
8925
+ *
8926
+ * ```ts import.meta.vitest
8927
+ * import { Number } from "effect"
8928
+ *
8929
+ * Number.min(2, 3) // => 2
8930
+ * ```
8931
+ *
8932
+ * @see {@link max} for selecting the larger value
8933
+ *
8934
+ * @category math
8935
+ * @since 2.0.0
8936
+ */
8937
+ const min = /*#__PURE__*/ min$1(Order$1);
8938
+ /**
8939
+ * Returns the maximum between two `number`s.
8940
+ *
8941
+ * **When to use**
8942
+ *
8943
+ * Use to select the larger of two numbers.
8944
+ *
8945
+ * **Example** (Finding the maximum)
8946
+ *
8947
+ * ```ts import.meta.vitest
8948
+ * import { Number } from "effect"
8949
+ *
8950
+ * Number.max(2, 3) // => 3
8951
+ * ```
8952
+ *
8953
+ * @see {@link min} for selecting the smaller value
8954
+ *
8955
+ * @category math
8956
+ * @since 2.0.0
8957
+ */
8958
+ const max = /*#__PURE__*/ max$1(Order$1);
8636
8959
  globalThis.String;
8637
8960
  /**
8961
+ * Converts a string to lowercase.
8962
+ *
8963
+ * **Example** (Converting strings to lowercase)
8964
+ *
8965
+ * ```ts import.meta.vitest
8966
+ * import { pipe, String } from "effect"
8967
+ *
8968
+ * pipe("A", String.toLowerCase) // => "a"
8969
+ * String.toLowerCase("HELLO") // => "hello"
8970
+ * ```
8971
+ *
8972
+ * @category transforming
8973
+ * @since 2.0.0
8974
+ */
8975
+ const toLowerCase = (self) => self.toLowerCase();
8976
+ /**
8977
+ * Removes whitespace from both ends of a string.
8978
+ *
8979
+ * **Example** (Trimming whitespace)
8980
+ *
8981
+ * ```ts import.meta.vitest
8982
+ * import { String } from "effect"
8983
+ *
8984
+ * String.trim(" a ") // => "a"
8985
+ * String.trim(" hello world ") // => "hello world"
8986
+ * ```
8987
+ *
8988
+ * @category transforming
8989
+ * @since 2.0.0
8990
+ */
8991
+ const trim = (self) => self.trim();
8992
+ /**
8638
8993
  * Checks whether a `string` is non-empty.
8639
8994
  *
8640
8995
  * **Example** (Checking for non-empty strings)
@@ -8666,6 +9021,26 @@ const isNonEmpty = (self) => self.length > 0;
8666
9021
  * @since 2.0.0
8667
9022
  */
8668
9023
  const startsWith = (searchString, position) => (self) => self.startsWith(searchString, position);
9024
+ /**
9025
+ * Repeats the string the specified number of times.
9026
+ *
9027
+ * **Details**
9028
+ *
9029
+ * `count` is rounded down. `NaN` and non-positive values are treated as `0`.
9030
+ *
9031
+ * **Example** (Repeating strings)
9032
+ *
9033
+ * ```ts import.meta.vitest
9034
+ * import { pipe, String } from "effect"
9035
+ *
9036
+ * pipe("a", String.repeat(5)) // => "aaaaa"
9037
+ * pipe("hello", String.repeat(3)) // => "hellohellohello"
9038
+ * ```
9039
+ *
9040
+ * @category transforming
9041
+ * @since 2.0.0
9042
+ */
9043
+ const repeat = (count) => (self) => self.repeat(normalize$1(count));
8669
9044
  //#endregion
8670
9045
  //#region ../../node_modules/.pnpm/effect@4.0.0-rc.115/node_modules/effect/dist/internal/random.js
8671
9046
  /** @internal */
@@ -9820,6 +10195,56 @@ const catch_ = catch_$1;
9820
10195
  */
9821
10196
  const catchTag = catchTag$1;
9822
10197
  /**
10198
+ * Catches a specific reason within a tagged error.
10199
+ *
10200
+ * **When to use**
10201
+ *
10202
+ * Use to handle one nested reason inside an `Effect`'s tagged error while
10203
+ * preserving the parent error shape for unmatched reasons.
10204
+ *
10205
+ * **Details**
10206
+ *
10207
+ * Use this to handle nested error causes without removing the parent error
10208
+ * from the error channel. The handler receives the unwrapped reason.
10209
+ *
10210
+ * **Example** (Handling an error reason)
10211
+ *
10212
+ * ```ts import.meta.vitest
10213
+ * import { Data, Effect } from "effect"
10214
+ *
10215
+ * class RateLimitError extends Data.TaggedError("RateLimitError")<{
10216
+ * retryAfter: number
10217
+ * }> {}
10218
+ *
10219
+ * class QuotaExceededError extends Data.TaggedError("QuotaExceededError")<{
10220
+ * limit: number
10221
+ * }> {}
10222
+ *
10223
+ * class AiError extends Data.TaggedError("AiError")<{
10224
+ * reason: RateLimitError | QuotaExceededError
10225
+ * }> {}
10226
+ *
10227
+ * const program: Effect.Effect<string, AiError> = Effect.fail(
10228
+ * new AiError({ reason: new RateLimitError({ retryAfter: 30 }) })
10229
+ * )
10230
+ *
10231
+ * // Handle rate limits specifically
10232
+ * const handled = program.pipe(
10233
+ * Effect.catchReason("AiError", "RateLimitError", (reason) =>
10234
+ * Effect.succeed(`Retry after ${reason.retryAfter}s`)
10235
+ * )
10236
+ * )
10237
+ *
10238
+ * Effect.runSync(handled) // => "Retry after 30s"
10239
+ * ```
10240
+ *
10241
+ * @see {@link catchReasons} for handling several nested reason tags
10242
+ *
10243
+ * @category error handling
10244
+ * @since 4.0.0
10245
+ */
10246
+ const catchReason = catchReason$1;
10247
+ /**
9823
10248
  * Handles both recoverable and unrecoverable errors by providing a recovery
9824
10249
  * effect.
9825
10250
  *
@@ -9865,51 +10290,6 @@ const catchTag = catchTag$1;
9865
10290
  */
9866
10291
  const catchCause = catchCause$1;
9867
10292
  /**
9868
- * Recovers from specific errors using a `Predicate` or `Refinement`.
9869
- *
9870
- * **When to use**
9871
- *
9872
- * Use when you need to recover from errors that match a condition.
9873
- *
9874
- * **Details**
9875
- *
9876
- * Use a `Refinement` for type narrowing or a `Predicate` for simple boolean
9877
- * matching. Non-matching errors re-fail with the original cause. Defects and
9878
- * interrupts are not caught.
9879
- *
9880
- * **Example** (Recovering when a predicate matches)
9881
- *
9882
- * ```ts import.meta.vitest
9883
- * import { Data, Effect, Filter } from "effect"
9884
- *
9885
- * class NotFound extends Data.TaggedError("NotFound")<{ id: string }> {}
9886
- *
9887
- * const program = Effect.fail(new NotFound({ id: "user-1" }))
9888
- *
9889
- * // With a refinement
9890
- * const recovered = program.pipe(
9891
- * Effect.catchIf(
9892
- * (error): error is NotFound => error._tag === "NotFound",
9893
- * (error) => Effect.succeed(`missing:${error.id}`)
9894
- * )
9895
- * )
9896
- *
9897
- * // With a Filter
9898
- * const recovered2 = program.pipe(
9899
- * Effect.catchFilter(
9900
- * Filter.tagged("NotFound"),
9901
- * (error) => Effect.succeed(`missing:${error.id}`)
9902
- * )
9903
- * )
9904
- *
9905
- * Effect.runSync(Effect.all([recovered, recovered2])) // => ['missing:user-1', 'missing:user-1']
9906
- * ```
9907
- *
9908
- * @category error handling
9909
- * @since 2.0.0
9910
- */
9911
- const catchIf = catchIf$1;
9912
- /**
9913
10293
  * Transforms the failure value of an effect without changing its success value.
9914
10294
  *
9915
10295
  * **When to use**
@@ -13629,7 +14009,7 @@ var RcRefImpl = class {
13629
14009
  /** @internal */
13630
14010
  const make$17 = (options) => withFiber((fiber) => {
13631
14011
  const context = fiber.context;
13632
- const scope = get$2(context, Scope);
14012
+ const scope = get$3(context, Scope);
13633
14013
  const ref = new RcRefImpl(options.acquire, context, scope, options.idleTimeToLive ? fromInputUnsafe$1(options.idleTimeToLive) : void 0);
13634
14014
  return as(addFinalizerExit(scope, () => {
13635
14015
  const close$2 = ref.state._tag === "Acquired" ? close(ref.state.scope, void_$1) : void_;
@@ -20889,26 +21269,26 @@ const orElse = orElse$1;
20889
21269
  function causeMessage(cause) {
20890
21270
  if (hasInterruptsOnly(cause)) return "Operation aborted";
20891
21271
  if (hasDies(cause)) return pretty(cause);
20892
- return cause.reasons.filter(isFailReason).map(({ error }) => {
21272
+ return pipe(cause.reasons, filter(isFailReason), map$5(({ error }) => {
20893
21273
  if (error instanceof Error) return error.message || error.name;
20894
- return typeof error === "string" ? error : toStringUnknown(error);
20895
- }).join("\n");
21274
+ return isString(error) ? error : toStringUnknown(error);
21275
+ }), join("\n"));
20896
21276
  }
20897
- async function runHandler(effect, options) {
21277
+ async function handler(effect, options) {
20898
21278
  const exit = await runPromiseExit(effect);
20899
21279
  if (isSuccess(exit)) return exit.value;
20900
21280
  if (options?.onError) return options.onError(causeMessage(exit.cause));
20901
- const die = exit.cause.reasons.find(isDieReason);
20902
- if (die !== void 0) throw die.defect;
21281
+ const die = findFirst(exit.cause.reasons, isDieReason);
21282
+ if (isSome(die)) throw die.value.defect;
20903
21283
  }
20904
21284
  //#endregion
20905
21285
  //#region ../../tooling/shared/src/config.ts
20906
- const loadExtensionConfig = fnUntraced(function* (_ctx, schema, name, _defaults) {
21286
+ const load = fnUntraced(function* (_ctx, schema, name, _defaults) {
20907
21287
  const fs = yield* FileSystem;
20908
- const file = (yield* Path$1).join(getAgentDir(), "extensions", `${name}.json`);
20909
- const contents = yield* fs.readFileString(file);
21288
+ const path = yield* Path$1;
21289
+ const contents = yield* fs.readFileString(path.join(getAgentDir(), "extensions", `${name}.json`));
20910
21290
  return yield* decodeEffect(fromJsonString(schema))(contents);
20911
- }, (load, ctx, _schema, name, defaults) => runHandler(load.pipe(catchIf((error) => error._tag === "PlatformError" && error.reason._tag === "NotFound", () => succeed$1(defaults)), provide(layer)), { onError: (message) => {
21291
+ }, (effect, ctx, _schema, name, defaults) => handler(effect.pipe(catchReason("PlatformError", "NotFound", () => succeed$1(defaults)), provide(layer)), { onError: (message) => {
20912
21292
  if (ctx.hasUI) ctx.ui.notify(`Ignoring invalid ${name} config: ${message}`, "warning");
20913
21293
  return defaults;
20914
21294
  } }));
@@ -20922,7 +21302,7 @@ function side(segments, align) {
20922
21302
  function textWidth(text) {
20923
21303
  return fromIterable$1(text).length;
20924
21304
  }
20925
- function setStatuslineSegment(ctx, key, segment) {
21305
+ function setSegment(ctx, key, segment) {
20926
21306
  const store = globalThis;
20927
21307
  store[REGISTRY_KEY] ??= /* @__PURE__ */ new Map();
20928
21308
  const segments = store[REGISTRY_KEY];
@@ -20938,25 +21318,18 @@ function setStatuslineSegment(ctx, key, segment) {
20938
21318
  render: (width) => {
20939
21319
  const left = side(segments, "left");
20940
21320
  const right = side(segments, "right");
20941
- const margin = Math.min(width, 1);
21321
+ const margin = min(width, 1);
20942
21322
  const inner = width - margin;
20943
21323
  const gap = inner - textWidth(left) - textWidth(right);
20944
21324
  const minGap = isNonEmpty(left) && isNonEmpty(right) ? 2 : 0;
20945
- const line = isNonEmpty(right) && gap >= minGap ? `${left}${" ".repeat(gap)}${right}` : pipe([left, right], filter(isNonEmpty), join(" · "), fromIterable$1, take$2(Math.max(inner, 0)), join(""));
20946
- return [" ".repeat(margin) + theme.fg("dim", line)];
21325
+ const line = isNonEmpty(right) && gap >= minGap ? `${left}${repeat(gap)(" ")}${right}` : pipe([left, right], filter(isNonEmpty), join(" · "), fromIterable$1, take$2(max(inner, 0)), join(""));
21326
+ return [repeat(margin)(" ") + theme.fg("dim", line)];
20947
21327
  }
20948
21328
  }));
20949
21329
  }
20950
21330
  //#endregion
20951
21331
  //#region src/index.ts
20952
21332
  const EXTENSION_ID = "fast-mode";
20953
- const COMMAND_ARGS = [
20954
- "on",
20955
- "off",
20956
- "status"
20957
- ];
20958
- const SEGMENT_KEY = EXTENSION_ID;
20959
- const SEGMENT_LABEL = "[fast mode]";
20960
21333
  const FastModeConfig = Struct({
20961
21334
  enabled: Boolean.pipe(withDecodingDefault(succeed$1(false))),
20962
21335
  models: ArraySchema(String$1).pipe(withDecodingDefault(succeed$1([
@@ -20998,16 +21371,17 @@ function fastMode(pi) {
20998
21371
  function checkEligibility(model) {
20999
21372
  if (!model) return Eligibility.Ineligible({ message: "no model is selected" });
21000
21373
  const key = `${model.provider}/${model.id}`;
21001
- if (!config.models.includes(key)) return Eligibility.Ineligible({ message: `${key} is not in the configured models` });
21002
- const apply = FAST_APPLICATORS[model.api];
21003
- if (!apply) return Eligibility.Ineligible({ message: `the ${model.api} API has no fast-mode support` });
21004
- return Eligibility.Eligible({ apply });
21374
+ if (!contains(config.models, key)) return Eligibility.Ineligible({ message: `${key} is not in the configured models` });
21375
+ return match$3(get$2(FAST_APPLICATORS, model.api), {
21376
+ onNone: () => Eligibility.Ineligible({ message: `the ${model.api} API has no fast-mode support` }),
21377
+ onSome: (apply) => Eligibility.Eligible({ apply })
21378
+ });
21005
21379
  }
21006
21380
  function updateStatus(ctx) {
21007
21381
  if (!ctx.hasUI) return;
21008
21382
  const active = config.showStatus && enabled && Eligibility.$is("Eligible")(checkEligibility(ctx.model));
21009
- setStatuslineSegment(ctx, SEGMENT_KEY, active ? {
21010
- text: SEGMENT_LABEL,
21383
+ setSegment(ctx, EXTENSION_ID, active ? {
21384
+ text: "[fast mode]",
21011
21385
  align: "right"
21012
21386
  } : void 0);
21013
21387
  }
@@ -21017,13 +21391,16 @@ function fastMode(pi) {
21017
21391
  const message = !enabled ? `Fast mode is off. Current model: ${name}.` : Eligibility.$match(checkEligibility(model), {
21018
21392
  Eligible: () => `Fast mode is on for ${name}.`,
21019
21393
  Ineligible: ({ message: reason }) => {
21020
- return `Fast mode is on, but inactive: ${reason}. Configured models: ${config.models.join(", ") || "none"}.`;
21394
+ return `Fast mode is on, but inactive: ${reason}. Configured models: ${match$1(config.models, {
21395
+ onEmpty: () => "none",
21396
+ onNonEmpty: join(", ")
21397
+ })}.`;
21021
21398
  }
21022
21399
  });
21023
21400
  ctx.ui.notify(message, "info");
21024
21401
  }
21025
21402
  pi.on("session_start", async (_event, ctx) => {
21026
- config = await loadExtensionConfig(ctx, FastModeConfig, EXTENSION_ID, config);
21403
+ config = await load(ctx, FastModeConfig, EXTENSION_ID, config);
21027
21404
  enabled = pi.getFlag("fast") === true || config.enabled;
21028
21405
  updateStatus(ctx);
21029
21406
  });
@@ -21045,7 +21422,11 @@ function fastMode(pi) {
21045
21422
  pi.registerCommand("fast", {
21046
21423
  description: "Toggle fast mode (faster, costlier inference) for configured models",
21047
21424
  getArgumentCompletions: (prefix) => {
21048
- const items = pipe(COMMAND_ARGS, filter(startsWith(prefix)), map$5((arg) => ({
21425
+ const items = pipe([
21426
+ "on",
21427
+ "off",
21428
+ "status"
21429
+ ], filter(startsWith(prefix)), map$5((arg) => ({
21049
21430
  value: arg,
21050
21431
  label: arg
21051
21432
  })));
@@ -21055,7 +21436,7 @@ function fastMode(pi) {
21055
21436
  });
21056
21437
  },
21057
21438
  handler: async (args, ctx) => {
21058
- value(args.trim().toLowerCase()).pipe(whenOr("", "on", "off", (cmd) => {
21439
+ value(pipe(args, trim, toLowerCase)).pipe(whenOr("", "on", "off", (cmd) => {
21059
21440
  enabled = cmd === "" ? !enabled : cmd === "on";
21060
21441
  updateStatus(ctx);
21061
21442
  notifyState(ctx);