@herbertgao/pi-extensions 2026.10.5 → 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.
- package/README.md +10 -14
- package/THIRD_PARTY_NOTICES.md +1 -53
- package/extensions/clef-format.mjs +113 -0
- package/extensions/clef.mjs +112 -0
- package/node_modules/@dietrichgebert/ponytail/.opencode/command/ponytail-debt.md +1 -1
- package/node_modules/@dietrichgebert/ponytail/.opencode/plugins/ponytail.mjs +30 -6
- package/node_modules/@dietrichgebert/ponytail/.qoder-plugin/plugin.json +1 -1
- package/node_modules/@dietrichgebert/ponytail/README.md +5 -1
- package/node_modules/@dietrichgebert/ponytail/hooks/claude-codex-hooks.json +3 -3
- package/node_modules/@dietrichgebert/ponytail/hooks/copilot-hooks.json +4 -4
- package/node_modules/@dietrichgebert/ponytail/hooks/ponytail-activate.js +158 -127
- package/node_modules/@dietrichgebert/ponytail/hooks/ponytail-config.js +5 -0
- package/node_modules/@dietrichgebert/ponytail/hooks/ponytail-map.js +8 -3
- package/node_modules/@dietrichgebert/ponytail/hooks/ponytail-runtime.js +14 -8
- package/node_modules/@dietrichgebert/ponytail/package.json +1 -1
- package/node_modules/@dietrichgebert/ponytail/pi-extension/index.js +16 -3
- package/node_modules/@dietrichgebert/ponytail/scripts/cursor-hooks.js +13 -3
- package/node_modules/@dietrichgebert/ponytail/scripts/uninstall.js +3 -2
- package/node_modules/@dietrichgebert/ponytail/skills/ponytail-debt/SKILL.md +3 -3
- package/node_modules/@herbertgao/pi-agency/package.json +2 -2
- package/node_modules/@herbertgao/pi-bark/package.json +2 -2
- package/node_modules/@herbertgao/pi-cc-extensions/README.en.md +1 -2
- package/node_modules/@herbertgao/pi-cc-extensions/README.md +1 -2
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/config/config.ts +5 -0
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/config/panel.ts +22 -0
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/feature/agent-summary/core.ts +2 -3
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/feature/compact-thinking.ts +1 -1
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/feature/context.ts +396 -146
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/feature/reference/index.ts +2 -0
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/feature/reference/subagent.ts +3 -0
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/feature/shell/footer.ts +10 -6
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/feature/shell/token-rate.ts +15 -3
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/feature/shell/working-message.ts +2 -23
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/compact-mode.ts +195 -77
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/default-mode.ts +23 -471
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/index.ts +6 -3
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/markdown-enhance.ts +16 -83
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/mouse/hover.ts +1 -1
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/mouse/interaction.ts +68 -28
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/mouse/packets.ts +1 -1
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/mouse/sticky-prompt.ts +53 -5
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/ask-user-question.ts +1 -1
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/ccstyle-tool.ts +467 -0
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/codemode.ts +1 -1
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/diff/ansi-utils.ts +1 -24
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/diff/diff-edit-render.ts +1 -1
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/diff/diff-limits.ts +1 -1
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/diff/diff-text.ts +2 -1
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/diff/diff-write-render.ts +1 -1
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/diff/line-width-safety.ts +1 -1
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/grouping.ts +53 -34
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/message-display.ts +1 -1
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/names.ts +41 -1
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/result.ts +2 -862
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/tool-io.ts +735 -0
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/tool-state.ts +138 -0
- package/node_modules/@herbertgao/pi-cc-extensions/package.json +6 -5
- package/node_modules/@herbertgao/pi-cc-extensions/themes/cc-dark.json +1 -1
- package/node_modules/@herbertgao/pi-cc-extensions/themes/cc-light.json +2 -2
- package/node_modules/@herbertgao/pi-subagents/CHANGELOG.md +8 -0
- package/node_modules/@herbertgao/pi-subagents/docs/packages.md +211 -0
- package/node_modules/@herbertgao/pi-subagents/docs/rpc.md +61 -63
- package/node_modules/@herbertgao/pi-subagents/docs/workflows.md +24 -16
- package/node_modules/@herbertgao/pi-subagents/package.json +6 -5
- package/node_modules/@herbertgao/pi-subagents/src/agent-file-toggle.ts +51 -14
- package/node_modules/@herbertgao/pi-subagents/src/agent-manager.ts +123 -55
- package/node_modules/@herbertgao/pi-subagents/src/agent-runner.ts +144 -13
- package/node_modules/@herbertgao/pi-subagents/src/agent-source-badge.ts +78 -0
- package/node_modules/@herbertgao/pi-subagents/src/completion-outbox.ts +122 -0
- package/node_modules/@herbertgao/pi-subagents/src/custom-agents.ts +171 -79
- package/node_modules/@herbertgao/pi-subagents/src/index.ts +597 -296
- package/node_modules/@herbertgao/pi-subagents/src/package-resources.ts +724 -0
- package/node_modules/@herbertgao/pi-subagents/src/schedule.ts +1 -1
- package/node_modules/@herbertgao/pi-subagents/src/settings.ts +66 -0
- package/node_modules/@herbertgao/pi-subagents/src/types.ts +26 -4
- package/node_modules/@herbertgao/pi-subagents/src/ui/agent-widget.ts +2 -0
- package/node_modules/@herbertgao/pi-subagents/src/ui/conversation-viewer.ts +354 -32
- package/node_modules/@herbertgao/pi-subagents/src/ui/fleet-list.ts +33 -15
- package/node_modules/@herbertgao/pi-subagents/src/workflow/host.ts +6 -0
- package/node_modules/@herbertgao/pi-subagents/src/workflow/saved.ts +48 -2
- package/node_modules/@herbertgao/sol-pi/README.md +3 -3
- package/node_modules/@herbertgao/sol-pi/THIRD_PARTY_NOTICES.md +4 -4
- package/node_modules/@herbertgao/sol-pi/agents-install.md +3 -3
- package/node_modules/@herbertgao/sol-pi/docs/compatibility.md +1 -1
- package/node_modules/@herbertgao/sol-pi/package.json +2 -2
- package/node_modules/@juicesharp/rpiv-ask-user-question/README.md +3 -3
- package/node_modules/@juicesharp/rpiv-ask-user-question/ask-user-question.ts +89 -39
- package/node_modules/@juicesharp/rpiv-ask-user-question/docs/configuration.md +1 -1
- package/node_modules/@juicesharp/rpiv-ask-user-question/docs/hosts.md +4 -4
- package/node_modules/@juicesharp/rpiv-ask-user-question/docs/keyboard.md +56 -23
- package/node_modules/@juicesharp/rpiv-ask-user-question/docs/tool-schema.md +6 -3
- package/node_modules/@juicesharp/rpiv-ask-user-question/locales/de.json +3 -1
- package/node_modules/@juicesharp/rpiv-ask-user-question/locales/en.json +3 -1
- package/node_modules/@juicesharp/rpiv-ask-user-question/locales/es.json +3 -1
- package/node_modules/@juicesharp/rpiv-ask-user-question/locales/fr.json +3 -1
- package/node_modules/@juicesharp/rpiv-ask-user-question/locales/pt-BR.json +3 -1
- package/node_modules/@juicesharp/rpiv-ask-user-question/locales/pt.json +3 -1
- package/node_modules/@juicesharp/rpiv-ask-user-question/locales/ru.json +3 -1
- package/node_modules/@juicesharp/rpiv-ask-user-question/locales/uk.json +3 -1
- package/node_modules/@juicesharp/rpiv-ask-user-question/locales/zh.json +3 -1
- package/node_modules/@juicesharp/rpiv-ask-user-question/package.json +5 -2
- package/node_modules/@juicesharp/rpiv-ask-user-question/presentation.ts +122 -0
- package/node_modules/@juicesharp/rpiv-ask-user-question/rpc-fallback.ts +73 -36
- package/node_modules/@juicesharp/rpiv-ask-user-question/state/build-questionnaire.ts +10 -1
- package/node_modules/@juicesharp/rpiv-ask-user-question/state/key-router.ts +15 -13
- package/node_modules/@juicesharp/rpiv-ask-user-question/state/questionnaire-session.ts +5 -1
- package/node_modules/@juicesharp/rpiv-ask-user-question/state/selectors/derivations.ts +15 -0
- package/node_modules/@juicesharp/rpiv-ask-user-question/state/selectors/projections.ts +4 -1
- package/node_modules/@juicesharp/rpiv-ask-user-question/state/state-reducer.ts +29 -18
- package/node_modules/@juicesharp/rpiv-ask-user-question/state/state.ts +1 -1
- package/node_modules/@juicesharp/rpiv-ask-user-question/tool/format-answer.ts +5 -2
- package/node_modules/@juicesharp/rpiv-ask-user-question/tool/normalize-params.ts +46 -0
- package/node_modules/@juicesharp/rpiv-ask-user-question/tool/response-envelope.ts +19 -8
- package/node_modules/@juicesharp/rpiv-ask-user-question/tool/types.ts +9 -2
- package/node_modules/@juicesharp/rpiv-ask-user-question/view/components/multi-select-view.ts +4 -2
- package/node_modules/@juicesharp/rpiv-ask-user-question/view/components/preview/preview-block-renderer.ts +56 -25
- package/node_modules/@juicesharp/rpiv-ask-user-question/view/components/preview/preview-pane.ts +131 -46
- package/node_modules/@juicesharp/rpiv-ask-user-question/view/dialog-builder.ts +94 -106
- package/node_modules/@juicesharp/rpiv-ask-user-question/view/dialog-copy.ts +51 -0
- package/node_modules/@juicesharp/rpiv-ask-user-question/view/scroll-window.ts +73 -0
- package/node_modules/@juicesharp/rpiv-ask-user-question/view/tab-content-strategy.ts +31 -10
- package/node_modules/@pi-plugins/fast-mode/dist/index.d.mts.map +1 -1
- package/node_modules/@pi-plugins/fast-mode/dist/index.mjs +474 -93
- package/node_modules/@pi-plugins/fast-mode/dist/index.mjs.map +1 -1
- package/node_modules/@pi-plugins/fast-mode/package.json +1 -1
- package/node_modules/pi-lens/CHANGELOG.md +88 -0
- package/node_modules/pi-lens/config/dependency-cruiser-eager-allowlist.json +3 -1
- package/node_modules/pi-lens/dist/{chunk-BJF25SUG.js → chunk-23WOO7TX.js} +11 -10
- package/node_modules/pi-lens/dist/{chunk-WATC3IQR.js → chunk-2B73ZPOK.js} +3 -3
- package/node_modules/pi-lens/dist/{chunk-N2IRDBZI.js → chunk-2BBLFX75.js} +101 -11
- package/node_modules/pi-lens/dist/{chunk-TA5L5KWQ.js → chunk-2CD5RS6M.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-3TTPKMEF.js → chunk-2VUQMUMT.js} +38 -37
- package/node_modules/pi-lens/dist/{chunk-5JHXUETW.js → chunk-3EFKIGZN.js} +3 -3
- package/node_modules/pi-lens/dist/chunk-3JNKMP3B.js +17 -0
- package/node_modules/pi-lens/dist/{chunk-6P54TMWL.js → chunk-3VPVG5SU.js} +6 -6
- package/node_modules/pi-lens/dist/{chunk-ZETYB3XG.js → chunk-3W7IEVVL.js} +44 -28
- package/node_modules/pi-lens/dist/chunk-3YN6V5TV.js +85 -0
- package/node_modules/pi-lens/dist/chunk-466Z26MG.js +30 -0
- package/node_modules/pi-lens/dist/{chunk-PCHDGUKT.js → chunk-4UNXBNE2.js} +12 -11
- package/node_modules/pi-lens/dist/{chunk-J7WJZ6W7.js → chunk-4W4VLAPJ.js} +12 -11
- package/node_modules/pi-lens/dist/{chunk-F5VLZHUW.js → chunk-52FUZI6K.js} +4 -2
- package/node_modules/pi-lens/dist/{chunk-H5EV3VMF.js → chunk-5NGR67U5.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-CBD2B5CP.js → chunk-5UCAH366.js} +21 -20
- package/node_modules/pi-lens/dist/{chunk-BHWHXMQ2.js → chunk-67WMNWEE.js} +9 -8
- package/node_modules/pi-lens/dist/{chunk-USHG4DLH.js → chunk-6C7JWPCP.js} +7 -7
- package/node_modules/pi-lens/dist/{chunk-VPWKF3GN.js → chunk-6GFRNVYR.js} +11 -10
- package/node_modules/pi-lens/dist/{chunk-3JL6IFD7.js → chunk-6SDEP3AJ.js} +9 -8
- package/node_modules/pi-lens/dist/{chunk-NJF2X5XF.js → chunk-6STA6Z7I.js} +19 -17
- package/node_modules/pi-lens/dist/{chunk-KJCWXUUS.js → chunk-724UL2TJ.js} +6 -4
- package/node_modules/pi-lens/dist/{chunk-MQA2YBAH.js → chunk-76MWC2K6.js} +3 -3
- package/node_modules/pi-lens/dist/{chunk-YLN4K6WD.js → chunk-77M37OKR.js} +10 -8
- package/node_modules/pi-lens/dist/{chunk-XHSCVSOL.js → chunk-7DYBLXYA.js} +3 -3
- package/node_modules/pi-lens/dist/{chunk-OC7LYAU5.js → chunk-AB3YYG6N.js} +24 -10
- package/node_modules/pi-lens/dist/{chunk-LD7WFTRX.js → chunk-ACXEQZOU.js} +16 -16
- package/node_modules/pi-lens/dist/{chunk-VSMJK3ZJ.js → chunk-AOHZU2BM.js} +1 -1
- package/node_modules/pi-lens/dist/{chunk-T4QZ6FEH.js → chunk-AW7R2GWG.js} +65 -8
- package/node_modules/pi-lens/dist/{chunk-GAYGGICG.js → chunk-BKE7E7TC.js} +10 -9
- package/node_modules/pi-lens/dist/{chunk-EUT3B22Y.js → chunk-BRGDSBJE.js} +13 -12
- package/node_modules/pi-lens/dist/{chunk-T54VJRAD.js → chunk-C34ZXZ7O.js} +55 -11
- package/node_modules/pi-lens/dist/{chunk-UGSMCQ4D.js → chunk-CHOW74WE.js} +1 -1
- package/node_modules/pi-lens/dist/{chunk-H2W2AXD3.js → chunk-CMMHNUZ2.js} +66 -58
- package/node_modules/pi-lens/dist/chunk-CSHFH5IN.js +17 -0
- package/node_modules/pi-lens/dist/chunk-EC47DWFA.js +56 -0
- package/node_modules/pi-lens/dist/{chunk-KJN4IOEJ.js → chunk-EJIUXPBX.js} +1 -1
- package/node_modules/pi-lens/dist/{chunk-IQZXOZ7S.js → chunk-EU63SDCG.js} +720 -334
- package/node_modules/pi-lens/dist/{chunk-LNOMA3MP.js → chunk-FCSOVF55.js} +107 -3
- package/node_modules/pi-lens/dist/{chunk-CFYISHUW.js → chunk-FLKWCIZH.js} +8 -5
- package/node_modules/pi-lens/dist/{chunk-OYTMZXRF.js → chunk-FMSO6RDZ.js} +16 -14
- package/node_modules/pi-lens/dist/{chunk-IUKPRZER.js → chunk-GAEGEPOC.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-6XX5HCLK.js → chunk-GBPP5P7X.js} +4 -4
- package/node_modules/pi-lens/dist/{chunk-TQFBZVCG.js → chunk-GXW6K4YJ.js} +1 -1
- package/node_modules/pi-lens/dist/{chunk-ZZUFZUQZ.js → chunk-H6MF6EVN.js} +331 -107
- package/node_modules/pi-lens/dist/{chunk-3JSEWUWI.js → chunk-IBGIOBEE.js} +3 -3
- package/node_modules/pi-lens/dist/chunk-IZSHAIJ7.js +26 -0
- package/node_modules/pi-lens/dist/{chunk-7ELY2CSM.js → chunk-JAU72XNY.js} +16 -14
- package/node_modules/pi-lens/dist/chunk-JMYYOTQG.js +77 -0
- package/node_modules/pi-lens/dist/{chunk-ELVWJYRV.js → chunk-JSQFTSC6.js} +12 -11
- package/node_modules/pi-lens/dist/{chunk-J6DFZDFA.js → chunk-KBG47GHP.js} +4 -4
- package/node_modules/pi-lens/dist/chunk-KDERNTCQ.js +28 -0
- package/node_modules/pi-lens/dist/chunk-KSX3TXSZ.js +69 -0
- package/node_modules/pi-lens/dist/{chunk-XGUL4SLQ.js → chunk-L3BLXZG7.js} +2 -2
- package/node_modules/pi-lens/dist/chunk-LOP6GRPH.js +31 -0
- package/node_modules/pi-lens/dist/{chunk-MTDRLSI7.js → chunk-M6HSLBWY.js} +1064 -986
- package/node_modules/pi-lens/dist/chunk-MQLUAEOC.js +162 -0
- package/node_modules/pi-lens/dist/{chunk-3MRXIJ6I.js → chunk-MRXKYPCS.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-D65GOCJB.js → chunk-MXGY6KPT.js} +19 -16
- package/node_modules/pi-lens/dist/{chunk-G3RLJYA2.js → chunk-N2H3ZPZY.js} +47 -1
- package/node_modules/pi-lens/dist/{chunk-HREZQCT3.js → chunk-N3X6Q4YT.js} +3 -3
- package/node_modules/pi-lens/dist/{chunk-HSIRMK2D.js → chunk-OCAGUNBC.js} +15 -15
- package/node_modules/pi-lens/dist/{chunk-ZOEYVXSV.js → chunk-OXXKQCSV.js} +6 -6
- package/node_modules/pi-lens/dist/{chunk-S6AMWKPC.js → chunk-P7266HLM.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-64LU2OVH.js → chunk-PHDMFAKM.js} +12 -2
- package/node_modules/pi-lens/dist/{chunk-IMSQR4WO.js → chunk-PNQDPDRC.js} +1 -1
- package/node_modules/pi-lens/dist/{chunk-IUR76K6A.js → chunk-Q7DUK4LX.js} +5 -5
- package/node_modules/pi-lens/dist/{chunk-CULQYFLU.js → chunk-QGQ5CCCG.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-UEAHAMEI.js → chunk-QHJ6DQ2R.js} +11 -11
- package/node_modules/pi-lens/dist/{chunk-BNKLYOOO.js → chunk-QILIYSJF.js} +1 -1
- package/node_modules/pi-lens/dist/{chunk-VYKKMYVT.js → chunk-QOBUHWHX.js} +11 -6
- package/node_modules/pi-lens/dist/{chunk-3PNFWVHT.js → chunk-QQNQ7SJW.js} +2 -75
- package/node_modules/pi-lens/dist/{chunk-7M4T5N3V.js → chunk-R3PCY3YS.js} +14 -13
- package/node_modules/pi-lens/dist/{chunk-MGIWSROG.js → chunk-RPLINGVB.js} +7 -7
- package/node_modules/pi-lens/dist/{chunk-CMU4RMJB.js → chunk-RWWYJ623.js} +10 -1
- package/node_modules/pi-lens/dist/{chunk-3FERWMCH.js → chunk-RXCOMYPY.js} +27 -26
- package/node_modules/pi-lens/dist/{chunk-7BX5DWSA.js → chunk-SAEFPSB6.js} +11 -11
- package/node_modules/pi-lens/dist/{chunk-N7YNJE5R.js → chunk-SQ4TVJBR.js} +10 -10
- package/node_modules/pi-lens/dist/{chunk-DMS52BEP.js → chunk-SS36ZX4J.js} +9 -7
- package/node_modules/pi-lens/dist/{chunk-JONGANYH.js → chunk-T6CPIZNT.js} +32 -30
- package/node_modules/pi-lens/dist/{chunk-6UYA642J.js → chunk-TYM6OUIT.js} +13 -12
- package/node_modules/pi-lens/dist/{chunk-ALQRYH6O.js → chunk-UXGETRP4.js} +13 -12
- package/node_modules/pi-lens/dist/{chunk-FGALODG3.js → chunk-UZ3TUTRV.js} +1 -1
- package/node_modules/pi-lens/dist/{chunk-J3FZR3YY.js → chunk-VCHXCQFG.js} +3 -3
- package/node_modules/pi-lens/dist/{chunk-3P4PF2BX.js → chunk-VCO24T4L.js} +34 -22
- package/node_modules/pi-lens/dist/{chunk-O7HZX7CA.js → chunk-VRZP76YM.js} +1 -1
- package/node_modules/pi-lens/dist/{chunk-VZHJS6DR.js → chunk-VSSBEUFT.js} +16 -15
- package/node_modules/pi-lens/dist/{chunk-U52SAGRM.js → chunk-VWCXW2E7.js} +1 -1
- package/node_modules/pi-lens/dist/{chunk-WW5BLB74.js → chunk-WOA4LN2R.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-ZMOMPX2Z.js → chunk-WU567RSC.js} +11 -10
- package/node_modules/pi-lens/dist/{chunk-N77WFUL7.js → chunk-XAGLWMJ4.js} +23 -22
- package/node_modules/pi-lens/dist/{chunk-WSEWKCXU.js → chunk-XCJN5IJU.js} +4 -4
- package/node_modules/pi-lens/dist/{chunk-IR6XFA5P.js → chunk-XIJZVPD5.js} +16 -14
- package/node_modules/pi-lens/dist/{chunk-OYOB3ZFG.js → chunk-XMSXXAHW.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-34OCDWOS.js → chunk-XTMJ7XDT.js} +1 -1
- package/node_modules/pi-lens/dist/{chunk-Z6BB4JLQ.js → chunk-XVF2VVXP.js} +5 -3
- package/node_modules/pi-lens/dist/{chunk-AFZYMAIV.js → chunk-YIUAVF7E.js} +37 -35
- package/node_modules/pi-lens/dist/{chunk-NFXP47RV.js → chunk-YSZNHOBY.js} +85 -31
- package/node_modules/pi-lens/dist/{chunk-V5MEBST3.js → chunk-YYOIQFRS.js} +21 -21
- package/node_modules/pi-lens/dist/chunk-Z527N6YQ.js +28 -0
- package/node_modules/pi-lens/dist/{chunk-D6YF5HKX.js → chunk-ZANLILYD.js} +22 -2
- package/node_modules/pi-lens/dist/{chunk-2UMYMRI3.js → chunk-ZGDGW2V3.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-6B5I6ICN.js → chunk-ZHFZWTZV.js} +12 -11
- package/node_modules/pi-lens/dist/{chunk-OEX24ECI.js → chunk-ZWFS3OEF.js} +51 -41
- package/node_modules/pi-lens/dist/{chunk-AXKPQ6ZI.js → chunk-ZXYDQ3TZ.js} +5 -5
- package/node_modules/pi-lens/dist/index.js +73783 -71033
- package/node_modules/pi-lens/dist/mcp/analyze-cli.js +18 -8
- package/node_modules/pi-lens/dist/mcp/cli.js +48 -37
- package/node_modules/pi-lens/dist/mcp/server.js +568 -397
- package/node_modules/pi-lens/dist/mcp/worker.js +67 -55
- package/node_modules/pi-lens/dist/probes/installer.js +20 -19
- package/node_modules/pi-lens/docs/astplayground.md +1 -1
- package/node_modules/pi-lens/docs/configuration.md +29 -0
- package/node_modules/pi-lens/docs/dependencies.md +3 -0
- package/node_modules/pi-lens/docs/features.md +2 -2
- package/node_modules/pi-lens/docs/globalconfig.md +2 -0
- package/node_modules/pi-lens/docs/language-coverage.md +2 -1
- package/node_modules/pi-lens/docs/lsp-capability-matrix.md +29 -7
- package/node_modules/pi-lens/docs/lsp-idle-eviction.md +38 -47
- package/node_modules/pi-lens/docs/pi-lens-fixer.md +4 -0
- package/node_modules/pi-lens/docs/pi-lens-merge-policy.md +17 -4
- package/node_modules/pi-lens/docs/pi-lens-retro.md +2 -1
- package/node_modules/pi-lens/docs/pi-lens-reviewer.md +18 -0
- package/node_modules/pi-lens/docs/pi-lens-subagent.md +7 -0
- package/node_modules/pi-lens/docs/real-harness.md +17 -0
- package/node_modules/pi-lens/docs/schema/pi-lens-config-v1.json +37 -2
- package/node_modules/pi-lens/docs/servercapabilities.md +15 -4
- package/node_modules/pi-lens/docs/settings.md +2 -1
- package/node_modules/pi-lens/package.json +1 -1
- package/node_modules/pi-provider-qoder/dist/index.js +30 -2
- package/node_modules/pi-provider-qoder/package.json +1 -1
- package/node_modules/pi-web-access/CHANGELOG.md +50 -0
- package/node_modules/pi-web-access/README.md +13 -7
- package/node_modules/pi-web-access/brave.ts +20 -2
- package/node_modules/pi-web-access/content-find.ts +2 -1
- package/node_modules/pi-web-access/dist/index.js +655 -406
- package/node_modules/pi-web-access/dist/mcp-cli.js +653 -416
- package/node_modules/pi-web-access/duckduckgo.ts +5 -1
- package/node_modules/pi-web-access/endpoint-pdf-extract.ts +225 -0
- package/node_modules/pi-web-access/extract.ts +51 -13
- package/node_modules/pi-web-access/fetch-params.ts +10 -0
- package/node_modules/pi-web-access/gemini-api.ts +15 -0
- package/node_modules/pi-web-access/gemini-search.ts +32 -152
- package/node_modules/pi-web-access/github-issue-pr.ts +80 -68
- package/node_modules/pi-web-access/index.ts +3 -0
- package/node_modules/pi-web-access/package.json +1 -1
- package/node_modules/pi-web-access/pdf-extract.ts +38 -4
- package/node_modules/pi-web-access/perplexity.ts +19 -2
- package/node_modules/pi-web-access/ssrf-protection.ts +24 -4
- package/node_modules/pi-web-access/summary-review.ts +10 -0
- package/node_modules/pi-web-access/tool-arguments.ts +5 -2
- package/node_modules/pi-web-access/video-extract.ts +6 -2
- package/node_modules/pi-web-access/web-tool-core.ts +53 -13
- package/package.json +19 -24
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/show-more-hint.ts +0 -48
- package/node_modules/pi-jev-auto-mode/CHANGELOG.md +0 -118
- package/node_modules/pi-jev-auto-mode/LICENSE +0 -21
- package/node_modules/pi-jev-auto-mode/README.md +0 -292
- package/node_modules/pi-jev-auto-mode/SECURITY.md +0 -32
- package/node_modules/pi-jev-auto-mode/docs/calibration.md +0 -154
- package/node_modules/pi-jev-auto-mode/docs/design.md +0 -164
- package/node_modules/pi-jev-auto-mode/docs/security.md +0 -124
- package/node_modules/pi-jev-auto-mode/index.ts +0 -1
- package/node_modules/pi-jev-auto-mode/package.json +0 -72
- package/node_modules/pi-jev-auto-mode/src/call.ts +0 -180
- package/node_modules/pi-jev-auto-mode/src/decide.ts +0 -86
- package/node_modules/pi-jev-auto-mode/src/extension.ts +0 -881
- package/node_modules/pi-jev-auto-mode/src/intent.ts +0 -71
- package/node_modules/pi-jev-auto-mode/src/jev/availability.ts +0 -53
- package/node_modules/pi-jev-auto-mode/src/jev/criteria.ts +0 -19
- package/node_modules/pi-jev-auto-mode/src/jev/decide.ts +0 -187
- package/node_modules/pi-jev-auto-mode/src/jev/engine.ts +0 -165
- package/node_modules/pi-jev-auto-mode/src/jev/index.ts +0 -20
- package/node_modules/pi-jev-auto-mode/src/jev/questions.ts +0 -273
- package/node_modules/pi-jev-auto-mode/src/jev/response.ts +0 -64
- package/node_modules/pi-jev-auto-mode/src/jev/state.ts +0 -20
- package/node_modules/pi-jev-auto-mode/src/jev/transport.ts +0 -117
- package/node_modules/pi-jev-auto-mode/src/jev/types.ts +0 -46
- package/node_modules/pi-jev-auto-mode/src/policy.ts +0 -558
- package/node_modules/pi-jev-auto-mode/src/records.ts +0 -184
- package/node_modules/pi-jev-auto-mode/src/settings.ts +0 -349
- package/node_modules/pi-jev-auto-mode/src/ui.ts +0 -243
- package/node_modules/pi-lens/dist/chunk-2FQ62SPM.js +0 -83
- package/node_modules/pi-lens/dist/chunk-7AXO3ZDF.js +0 -30
- package/node_modules/pi-lens/dist/chunk-KMGPUKFD.js +0 -25
- package/node_modules/pi-lens/dist/chunk-OZJINN4O.js +0 -84
- package/node_modules/pi-lens/dist/chunk-RJFED73B.js +0 -79
- package/node_modules/pi-lens/dist/chunk-RTQNRM5X.js +0 -27
- package/node_modules/pi-lens/dist/chunk-VGEVL5EQ.js +0 -29
- package/node_modules/pi-lens/dist/chunk-WPE5FPGR.js +0 -54
- package/node_modules/pi-lens/dist/chunk-Z7QQA2KT.js +0 -27
- package/node_modules/resume-from/LICENSE +0 -21
- package/node_modules/resume-from/README.md +0 -167
- package/node_modules/resume-from/dist/adapters/claude-code/adapter.d.ts +0 -20
- package/node_modules/resume-from/dist/adapters/claude-code/adapter.js +0 -59
- package/node_modules/resume-from/dist/adapters/claude-code/contract.d.ts +0 -8
- package/node_modules/resume-from/dist/adapters/claude-code/contract.js +0 -4
- package/node_modules/resume-from/dist/adapters/claude-code/entries.d.ts +0 -30
- package/node_modules/resume-from/dist/adapters/claude-code/entries.js +0 -107
- package/node_modules/resume-from/dist/adapters/claude-code/index.d.ts +0 -3
- package/node_modules/resume-from/dist/adapters/claude-code/index.js +0 -2
- package/node_modules/resume-from/dist/adapters/claude-code/layout.d.ts +0 -29
- package/node_modules/resume-from/dist/adapters/claude-code/layout.js +0 -80
- package/node_modules/resume-from/dist/adapters/claude-code/readback.d.ts +0 -9
- package/node_modules/resume-from/dist/adapters/claude-code/readback.js +0 -39
- package/node_modules/resume-from/dist/adapters/claude-code/reader.d.ts +0 -40
- package/node_modules/resume-from/dist/adapters/claude-code/reader.js +0 -436
- package/node_modules/resume-from/dist/adapters/claude-code/redaction.d.ts +0 -26
- package/node_modules/resume-from/dist/adapters/claude-code/redaction.js +0 -145
- package/node_modules/resume-from/dist/adapters/claude-code/validation.d.ts +0 -4
- package/node_modules/resume-from/dist/adapters/claude-code/validation.js +0 -39
- package/node_modules/resume-from/dist/adapters/claude-code/writer.d.ts +0 -21
- package/node_modules/resume-from/dist/adapters/claude-code/writer.js +0 -306
- package/node_modules/resume-from/dist/adapters/codex/contract.d.ts +0 -13
- package/node_modules/resume-from/dist/adapters/codex/contract.js +0 -4
- package/node_modules/resume-from/dist/adapters/codex/index.d.ts +0 -6
- package/node_modules/resume-from/dist/adapters/codex/index.js +0 -43
- package/node_modules/resume-from/dist/adapters/codex/read.d.ts +0 -44
- package/node_modules/resume-from/dist/adapters/codex/read.js +0 -723
- package/node_modules/resume-from/dist/adapters/codex/readback.d.ts +0 -9
- package/node_modules/resume-from/dist/adapters/codex/readback.js +0 -47
- package/node_modules/resume-from/dist/adapters/codex/redaction.d.ts +0 -26
- package/node_modules/resume-from/dist/adapters/codex/redaction.js +0 -145
- package/node_modules/resume-from/dist/adapters/codex/rollout.d.ts +0 -115
- package/node_modules/resume-from/dist/adapters/codex/rollout.js +0 -269
- package/node_modules/resume-from/dist/adapters/codex/validation.d.ts +0 -7
- package/node_modules/resume-from/dist/adapters/codex/validation.js +0 -78
- package/node_modules/resume-from/dist/adapters/codex/write.d.ts +0 -17
- package/node_modules/resume-from/dist/adapters/codex/write.js +0 -141
- package/node_modules/resume-from/dist/adapters/contract.d.ts +0 -78
- package/node_modules/resume-from/dist/adapters/contract.js +0 -4
- package/node_modules/resume-from/dist/adapters/pi/adapter.d.ts +0 -15
- package/node_modules/resume-from/dist/adapters/pi/adapter.js +0 -213
- package/node_modules/resume-from/dist/adapters/pi/contract.d.ts +0 -24
- package/node_modules/resume-from/dist/adapters/pi/contract.js +0 -4
- package/node_modules/resume-from/dist/adapters/pi/format.d.ts +0 -162
- package/node_modules/resume-from/dist/adapters/pi/format.js +0 -223
- package/node_modules/resume-from/dist/adapters/pi/index.d.ts +0 -7
- package/node_modules/resume-from/dist/adapters/pi/index.js +0 -10
- package/node_modules/resume-from/dist/adapters/pi/parse.d.ts +0 -41
- package/node_modules/resume-from/dist/adapters/pi/parse.js +0 -371
- package/node_modules/resume-from/dist/adapters/pi/redaction.d.ts +0 -26
- package/node_modules/resume-from/dist/adapters/pi/redaction.js +0 -145
- package/node_modules/resume-from/dist/adapters/pi/serialize.d.ts +0 -20
- package/node_modules/resume-from/dist/adapters/pi/serialize.js +0 -87
- package/node_modules/resume-from/dist/adapters/pi/validate.d.ts +0 -14
- package/node_modules/resume-from/dist/adapters/pi/validate.js +0 -134
- package/node_modules/resume-from/dist/bin.d.ts +0 -35
- package/node_modules/resume-from/dist/bin.js +0 -135
- package/node_modules/resume-from/dist/contract.d.ts +0 -10
- package/node_modules/resume-from/dist/contract.js +0 -4
- package/node_modules/resume-from/dist/host/agents.d.ts +0 -29
- package/node_modules/resume-from/dist/host/agents.js +0 -20
- package/node_modules/resume-from/dist/host/cli/args.d.ts +0 -21
- package/node_modules/resume-from/dist/host/cli/args.js +0 -187
- package/node_modules/resume-from/dist/host/cli/contract.d.ts +0 -27
- package/node_modules/resume-from/dist/host/cli/contract.js +0 -4
- package/node_modules/resume-from/dist/host/cli/index.d.ts +0 -2
- package/node_modules/resume-from/dist/host/cli/index.js +0 -1
- package/node_modules/resume-from/dist/host/cli/presentation.d.ts +0 -2
- package/node_modules/resume-from/dist/host/cli/presentation.js +0 -11
- package/node_modules/resume-from/dist/host/cli/render.d.ts +0 -3
- package/node_modules/resume-from/dist/host/cli/render.js +0 -70
- package/node_modules/resume-from/dist/host/cli/runner.d.ts +0 -8
- package/node_modules/resume-from/dist/host/cli/runner.js +0 -125
- package/node_modules/resume-from/dist/host/contract.d.ts +0 -42
- package/node_modules/resume-from/dist/host/contract.js +0 -4
- package/node_modules/resume-from/dist/host/entry.d.ts +0 -52
- package/node_modules/resume-from/dist/host/entry.js +0 -91
- package/node_modules/resume-from/dist/host/index.d.ts +0 -11
- package/node_modules/resume-from/dist/host/index.js +0 -10
- package/node_modules/resume-from/dist/host/pi-extension/command.d.ts +0 -18
- package/node_modules/resume-from/dist/host/pi-extension/command.js +0 -126
- package/node_modules/resume-from/dist/host/pi-extension/contract.d.ts +0 -34
- package/node_modules/resume-from/dist/host/pi-extension/contract.js +0 -4
- package/node_modules/resume-from/dist/host/pi-extension/index.d.ts +0 -6
- package/node_modules/resume-from/dist/host/pi-extension/index.js +0 -4
- package/node_modules/resume-from/dist/host/pi-extension/picker.d.ts +0 -16
- package/node_modules/resume-from/dist/host/pi-extension/picker.js +0 -35
- package/node_modules/resume-from/dist/host/pi-extension/presentation.d.ts +0 -2
- package/node_modules/resume-from/dist/host/pi-extension/presentation.js +0 -11
- package/node_modules/resume-from/dist/host/pi-extension/register.d.ts +0 -25
- package/node_modules/resume-from/dist/host/pi-extension/register.js +0 -11
- package/node_modules/resume-from/dist/host/pi-extension/ui.d.ts +0 -20
- package/node_modules/resume-from/dist/host/pi-extension/ui.js +0 -1
- package/node_modules/resume-from/dist/host/profile.d.ts +0 -8
- package/node_modules/resume-from/dist/host/profile.js +0 -31
- package/node_modules/resume-from/dist/host/registry.d.ts +0 -8
- package/node_modules/resume-from/dist/host/registry.js +0 -33
- package/node_modules/resume-from/dist/host/wiring.d.ts +0 -41
- package/node_modules/resume-from/dist/host/wiring.js +0 -66
- package/node_modules/resume-from/dist/import/confirmation.d.ts +0 -9
- package/node_modules/resume-from/dist/import/confirmation.js +0 -27
- package/node_modules/resume-from/dist/import/contract.d.ts +0 -43
- package/node_modules/resume-from/dist/import/contract.js +0 -4
- package/node_modules/resume-from/dist/import/discovery/contract.d.ts +0 -63
- package/node_modules/resume-from/dist/import/discovery/contract.js +0 -4
- package/node_modules/resume-from/dist/import/discovery/errors.d.ts +0 -9
- package/node_modules/resume-from/dist/import/discovery/errors.js +0 -12
- package/node_modules/resume-from/dist/import/discovery/finder.d.ts +0 -11
- package/node_modules/resume-from/dist/import/discovery/finder.js +0 -269
- package/node_modules/resume-from/dist/import/discovery/homes.d.ts +0 -23
- package/node_modules/resume-from/dist/import/discovery/homes.js +0 -83
- package/node_modules/resume-from/dist/import/discovery/index.d.ts +0 -2
- package/node_modules/resume-from/dist/import/discovery/index.js +0 -2
- package/node_modules/resume-from/dist/import/discovery/ordering.d.ts +0 -3
- package/node_modules/resume-from/dist/import/discovery/ordering.js +0 -21
- package/node_modules/resume-from/dist/import/errors.d.ts +0 -22
- package/node_modules/resume-from/dist/import/errors.js +0 -20
- package/node_modules/resume-from/dist/import/index.d.ts +0 -3
- package/node_modules/resume-from/dist/import/index.js +0 -5
- package/node_modules/resume-from/dist/import/landing/contract.d.ts +0 -44
- package/node_modules/resume-from/dist/import/landing/contract.js +0 -4
- package/node_modules/resume-from/dist/import/landing/errors.d.ts +0 -15
- package/node_modules/resume-from/dist/import/landing/errors.js +0 -15
- package/node_modules/resume-from/dist/import/landing/handover.d.ts +0 -5
- package/node_modules/resume-from/dist/import/landing/handover.js +0 -12
- package/node_modules/resume-from/dist/import/landing/index.d.ts +0 -4
- package/node_modules/resume-from/dist/import/landing/index.js +0 -4
- package/node_modules/resume-from/dist/import/landing/lander.d.ts +0 -7
- package/node_modules/resume-from/dist/import/landing/lander.js +0 -133
- package/node_modules/resume-from/dist/import/landing/marker.d.ts +0 -9
- package/node_modules/resume-from/dist/import/landing/marker.js +0 -46
- package/node_modules/resume-from/dist/import/pipeline.d.ts +0 -28
- package/node_modules/resume-from/dist/import/pipeline.js +0 -154
- package/node_modules/resume-from/dist/import/preview/builder.d.ts +0 -6
- package/node_modules/resume-from/dist/import/preview/builder.js +0 -80
- package/node_modules/resume-from/dist/import/preview/contract.d.ts +0 -39
- package/node_modules/resume-from/dist/import/preview/contract.js +0 -4
- package/node_modules/resume-from/dist/import/preview/format.d.ts +0 -19
- package/node_modules/resume-from/dist/import/preview/format.js +0 -45
- package/node_modules/resume-from/dist/import/preview/index.d.ts +0 -2
- package/node_modules/resume-from/dist/import/preview/index.js +0 -1
- package/node_modules/resume-from/dist/import/preview/warnings.d.ts +0 -14
- package/node_modules/resume-from/dist/import/preview/warnings.js +0 -86
- package/node_modules/resume-from/dist/import/transfer/contract.d.ts +0 -48
- package/node_modules/resume-from/dist/import/transfer/contract.js +0 -4
- package/node_modules/resume-from/dist/import/transfer/index.d.ts +0 -2
- package/node_modules/resume-from/dist/import/transfer/index.js +0 -1
- package/node_modules/resume-from/dist/import/transfer/rules.d.ts +0 -3
- package/node_modules/resume-from/dist/import/transfer/rules.js +0 -228
- package/node_modules/resume-from/dist/import/wiring.d.ts +0 -24
- package/node_modules/resume-from/dist/import/wiring.js +0 -37
- package/node_modules/resume-from/dist/index.d.ts +0 -36
- package/node_modules/resume-from/dist/index.js +0 -36
- package/node_modules/resume-from/dist/platform/config/contract.d.ts +0 -35
- package/node_modules/resume-from/dist/platform/config/contract.js +0 -4
- package/node_modules/resume-from/dist/platform/config/defaults.d.ts +0 -16
- package/node_modules/resume-from/dist/platform/config/defaults.js +0 -22
- package/node_modules/resume-from/dist/platform/config/errors.d.ts +0 -9
- package/node_modules/resume-from/dist/platform/config/errors.js +0 -12
- package/node_modules/resume-from/dist/platform/config/index.d.ts +0 -5
- package/node_modules/resume-from/dist/platform/config/index.js +0 -6
- package/node_modules/resume-from/dist/platform/config/loader.d.ts +0 -10
- package/node_modules/resume-from/dist/platform/config/loader.js +0 -47
- package/node_modules/resume-from/dist/platform/config/paths.d.ts +0 -13
- package/node_modules/resume-from/dist/platform/config/paths.js +0 -37
- package/node_modules/resume-from/dist/platform/config/validate.d.ts +0 -9
- package/node_modules/resume-from/dist/platform/config/validate.js +0 -117
- package/node_modules/resume-from/dist/platform/repo/contract.d.ts +0 -36
- package/node_modules/resume-from/dist/platform/repo/contract.js +0 -4
- package/node_modules/resume-from/dist/platform/repo/git.d.ts +0 -21
- package/node_modules/resume-from/dist/platform/repo/git.js +0 -77
- package/node_modules/resume-from/dist/platform/repo/index.d.ts +0 -2
- package/node_modules/resume-from/dist/platform/repo/index.js +0 -1
- package/node_modules/resume-from/dist/platform/repo/reader.d.ts +0 -3
- package/node_modules/resume-from/dist/platform/repo/reader.js +0 -170
- package/node_modules/resume-from/dist/platform/store/contract.d.ts +0 -31
- package/node_modules/resume-from/dist/platform/store/contract.js +0 -4
- package/node_modules/resume-from/dist/platform/store/file-committer.d.ts +0 -3
- package/node_modules/resume-from/dist/platform/store/file-committer.js +0 -391
- package/node_modules/resume-from/dist/platform/store/index.d.ts +0 -2
- package/node_modules/resume-from/dist/platform/store/index.js +0 -2
- package/node_modules/resume-from/dist/platform/tokens/contract.d.ts +0 -12
- package/node_modules/resume-from/dist/platform/tokens/contract.js +0 -4
- package/node_modules/resume-from/dist/platform/tokens/estimator.d.ts +0 -12
- package/node_modules/resume-from/dist/platform/tokens/estimator.js +0 -111
- package/node_modules/resume-from/dist/platform/tokens/index.d.ts +0 -2
- package/node_modules/resume-from/dist/platform/tokens/index.js +0 -1
- package/node_modules/resume-from/dist/session/contract.d.ts +0 -116
- package/node_modules/resume-from/dist/session/contract.js +0 -4
- package/node_modules/resume-from/package.json +0 -83
- 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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
6102
|
+
scheduler: get$3(context, Scheduler),
|
|
5851
6103
|
tracer: currentTracer,
|
|
5852
6104
|
tracerContext: currentTracer ? currentTracer["context"] : void 0,
|
|
5853
|
-
tracerEnabled: get$
|
|
6105
|
+
tracerEnabled: get$3(context, TracerEnabled),
|
|
5854
6106
|
span: getOrUndefinedUnsafe(context, ParentSpanKey),
|
|
5855
|
-
logLevel: get$
|
|
5856
|
-
minimumLogLevel: get$
|
|
5857
|
-
stackFrame: get$
|
|
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$
|
|
5860
|
-
preventYield: get$
|
|
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
|
|
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
|
|
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$
|
|
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$
|
|
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
|
|
21272
|
+
return pipe(cause.reasons, filter(isFailReason), map$5(({ error }) => {
|
|
20893
21273
|
if (error instanceof Error) return error.message || error.name;
|
|
20894
|
-
return
|
|
20895
|
-
})
|
|
21274
|
+
return isString(error) ? error : toStringUnknown(error);
|
|
21275
|
+
}), join("\n"));
|
|
20896
21276
|
}
|
|
20897
|
-
async function
|
|
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
|
|
20902
|
-
if (die
|
|
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
|
|
21286
|
+
const load = fnUntraced(function* (_ctx, schema, name, _defaults) {
|
|
20907
21287
|
const fs = yield* FileSystem;
|
|
20908
|
-
const
|
|
20909
|
-
const contents = yield* fs.readFileString(
|
|
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
|
-
}, (
|
|
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
|
|
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 =
|
|
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}${
|
|
20946
|
-
return [
|
|
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
|
|
21002
|
-
|
|
21003
|
-
|
|
21004
|
-
|
|
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
|
-
|
|
21010
|
-
text:
|
|
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
|
|
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
|
|
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(
|
|
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
|
|
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);
|