@herbertgao/pi-extensions 2026.10.6 → 2026.10.8
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 +11 -15
- package/THIRD_PARTY_NOTICES.md +2 -54
- 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 +29 -28
- package/node_modules/@herbertgao/pi-cc-extensions/README.md +7 -7
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/config/config.ts +16 -27
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/config/panel.ts +49 -48
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/feature/compact-thinking.ts +2 -3
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/feature/context.ts +228 -141
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/feature/reference/index.ts +2 -3
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/feature/shell/footer-layout.ts +105 -23
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/feature/shell/footer.ts +59 -43
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/feature/shell/prompt-editor.ts +96 -0
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/index.ts +6 -0
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/compact-mode.ts +124 -54
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/default-mode.ts +7 -4
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/mouse/interaction.ts +69 -28
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/mouse/scroll.ts +23 -8
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/mouse/sticky-prompt.ts +2 -2
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/ccstyle-tool.ts +24 -12
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/codemode.ts +121 -6
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/diff/diff-limits.ts +3 -2
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/diff/diff-palette.ts +39 -8
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/diff/diff-presentation.ts +2 -2
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/grouping.ts +13 -13
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/message-display.ts +3 -2
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/names.ts +49 -49
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/result.ts +24 -0
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/tool-state.ts +51 -2
- package/node_modules/@herbertgao/pi-cc-extensions/package.json +5 -5
- package/node_modules/@herbertgao/pi-cc-extensions/themes/cc-dark.json +71 -70
- package/node_modules/@herbertgao/pi-cc-extensions/themes/cc-light.json +71 -70
- 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 +5 -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/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/@tifan/pi-inline-skills/package.json +5 -1
- package/node_modules/@tifan/pi-inline-skills/src/index.ts +5 -2
- 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 +166 -33
- package/node_modules/pi-provider-qoder/package.json +1 -1
- package/node_modules/pi-typesafe/README.md +3 -3
- package/node_modules/pi-typesafe/dist/backends.d.ts +7 -2
- package/node_modules/pi-typesafe/dist/backends.js +42 -0
- package/node_modules/pi-typesafe/dist/batch.d.ts +10 -6
- package/node_modules/pi-typesafe/dist/batch.js +20 -9
- package/node_modules/pi-typesafe/dist/client.d.ts +4 -1
- package/node_modules/pi-typesafe/dist/client.js +5 -4
- package/node_modules/pi-typesafe/dist/index.d.ts +2 -2
- package/node_modules/pi-typesafe/dist/index.js +1 -1
- package/node_modules/pi-typesafe/dist/schema.d.ts +18 -3
- package/node_modules/pi-typesafe/dist/schema.js +29 -3
- package/node_modules/pi-typesafe/package.json +1 -1
- package/node_modules/pi-web-access/CHANGELOG.md +66 -0
- package/node_modules/pi-web-access/README.md +17 -8
- 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 +668 -408
- package/node_modules/pi-web-access/dist/mcp-cli.js +666 -418
- 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 +54 -14
- 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/searxng.ts +2 -1
- package/node_modules/pi-web-access/ssrf-protection.ts +35 -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 +21 -26
- 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
|
@@ -52,6 +52,11 @@ a brief supplies only `lane=<name>`, scope, and the grant.
|
|
|
52
52
|
|
|
53
53
|
## Verification
|
|
54
54
|
|
|
55
|
+
For each new or changed `vi.mock` or hand-built double of a `clients/` module,
|
|
56
|
+
check whether a real test seam exists (`set*`, `adopt*`, or `reset*`). If it
|
|
57
|
+
does, treat the double as a finding and require the behavior to run through the
|
|
58
|
+
real seam. Check that every gate the diff adds is exercised through that path.
|
|
59
|
+
|
|
55
60
|
- **Name the behaviour population.** When a change replaces, moves, or widens
|
|
56
61
|
a lifecycle, dispatch, or ownership seam, run EVERY suite that exercises the
|
|
57
62
|
behaviour the seam governs and name the list; a curated file set cannot
|
|
@@ -73,6 +78,11 @@ a brief supplies only `lane=<name>`, scope, and the grant.
|
|
|
73
78
|
a review input.
|
|
74
79
|
- Repeat the pattern and population sweeps. Check blast radius, bounded
|
|
75
80
|
observability, changelog, commit, and PR-body requirements.
|
|
81
|
+
- Re-run the PR's `## Class sweep` search yourself and widen it when the
|
|
82
|
+
named shape is broader than the touched seam (#4273, #4268).
|
|
83
|
+
- On a bug-closing PR, check the `## Detection` lesson: the layer named under
|
|
84
|
+
`Should have been caught by:` must be one that would actually have caught
|
|
85
|
+
the bug, and `Gap:` must be a real issue, test, or reason (#4288).
|
|
76
86
|
- For LSP, dispatch, cache, runner, or tool changes, test one non-TypeScript
|
|
77
87
|
registry entry through the same seam.
|
|
78
88
|
- On a net-count fold, mutate every predicate the deleted sibling used to
|
|
@@ -210,3 +220,11 @@ merge-order interactions with other open PRs, plus:
|
|
|
210
220
|
- Cleared categories (one compact list) and exact-head identity.
|
|
211
221
|
|
|
212
222
|
Use short, active, plain prose.
|
|
223
|
+
|
|
224
|
+
## Documentation and prose standard
|
|
225
|
+
|
|
226
|
+
Apply this standard to PR and issue bodies, review comments, commit messages, documentation, and changelog entries. Lead with the outcome. Remove words that do no work. Use active voice and present tense. Use second person for instructions, and use the imperative for steps. Keep one idea per sentence, with about 20–25 words and no more than 30 words. Use consistent terminology and sentence-case headings. Define acronyms on first use. Prefer plain words over jargon. Avoid `please`, filler, noun piles, nested parentheticals, and em-dash chains. Use the Oxford comma.
|
|
227
|
+
|
|
228
|
+
The mechanical rules are checked by `scripts/check-prose.mjs`. The checker ignores fenced code, inline code, URLs, quoted log lines, blockquotes, and tables. It blocks long sentences, filler, and title-case headings. It warns on passive voice. The CLI accepts a body file or standard input and supports `--json`.
|
|
229
|
+
|
|
230
|
+
Reviewers judge clarity, terminology, active voice, sentence structure, and whether each list uses parallel grammar. Treat a mechanically clean result as necessary, not sufficient. Report prose that obscures the outcome or makes a user infer the action.
|
|
@@ -8,6 +8,8 @@ holds the pi-lens rules every role shares, for every runner and model. The
|
|
|
8
8
|
principles apply throughout and are not restated; project files win on
|
|
9
9
|
conflict.
|
|
10
10
|
|
|
11
|
+
User-facing prose follows the live standard in `docs/pi-lens-reviewer.md`.
|
|
12
|
+
|
|
11
13
|
## Worktree and Git
|
|
12
14
|
|
|
13
15
|
Work only in the assigned worktree. Before editing, verify its absolute path,
|
|
@@ -222,6 +224,11 @@ runner's own notes say which mode lifts it). Run Vitest as
|
|
|
222
224
|
tree-sitter grammar prefetch hangs offline, verify through direct probes of the
|
|
223
225
|
built code and say so; the orchestrator re-runs the files outside the sandbox.
|
|
224
226
|
|
|
227
|
+
A worker may call a red "sandbox" only with the same test names red on
|
|
228
|
+
`origin/master` in the same worktree, under the same env vars (including
|
|
229
|
+
`GITHUB_ACTIONS` when the test reads it). The plegma git guard reds hundreds
|
|
230
|
+
of fixture tests, and a real red hidden among them reaches CI (#4308).
|
|
231
|
+
|
|
225
232
|
## Follow-ups
|
|
226
233
|
|
|
227
234
|
Fold a review follow-up into the same PR when it shares the seam or files, is
|
|
@@ -12,6 +12,23 @@ process boundary that an in-process test cannot observe.
|
|
|
12
12
|
4. Call `awaitToolResult("<tool>")` for every expected tool result.
|
|
13
13
|
5. Add the test to `realHarnessInclude` and the real-process-spawn ratchet.
|
|
14
14
|
|
|
15
|
+
## Persisted-session restart
|
|
16
|
+
|
|
17
|
+
Pass `persistedSession: true` when a scenario must cross a process boundary.
|
|
18
|
+
The harness creates `--session-dir <home>/sessions` and exposes `pi.resume()`;
|
|
19
|
+
that operation closes stdin on the first child and starts a second child with
|
|
20
|
+
the installed pi CLI's `--continue` flag. The RPC documentation defines
|
|
21
|
+
`new_session` and `clone`, but no resume RPC; `--continue` is therefore the
|
|
22
|
+
authoritative resume operation for this lane. `pi.quit()` closes stdin without
|
|
23
|
+
removing the probe home, so final shutdown records can be read before the
|
|
24
|
+
`withRealPi` cleanup.
|
|
25
|
+
|
|
26
|
+
Before either orderly stdin close, the harness waits for `latency.log` to keep
|
|
27
|
+
the same size and mtime for 250 ms, bounded by 5 seconds. This protects the
|
|
28
|
+
logger's intentional exit-flush replay trade (#935): closing while its last
|
|
29
|
+
async append is in flight can duplicate that final lifecycle row. A timeout is
|
|
30
|
+
an explicit harness failure, not a reason to proceed with an unstable log.
|
|
31
|
+
|
|
15
32
|
Scripts contain turns. Each turn contains text or typed tool-call actions.
|
|
16
33
|
Malformed scripts fail validation before the child starts.
|
|
17
34
|
|
|
@@ -94,7 +94,24 @@
|
|
|
94
94
|
"serverOverrides": {
|
|
95
95
|
"type": "object",
|
|
96
96
|
"x-stability": "experimental",
|
|
97
|
-
"additionalProperties":
|
|
97
|
+
"additionalProperties": {
|
|
98
|
+
"type": "object",
|
|
99
|
+
"additionalProperties": true,
|
|
100
|
+
"x-stability": "experimental",
|
|
101
|
+
"properties": {
|
|
102
|
+
"command": { "x-stability": "experimental" },
|
|
103
|
+
"env": {
|
|
104
|
+
"type": "object",
|
|
105
|
+
"additionalProperties": { "type": "string", "x-stability": "experimental" },
|
|
106
|
+
"x-stability": "experimental"
|
|
107
|
+
},
|
|
108
|
+
"initializationOptions": {
|
|
109
|
+
"type": "object",
|
|
110
|
+
"additionalProperties": true,
|
|
111
|
+
"x-stability": "experimental"
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
98
115
|
},
|
|
99
116
|
"disabledServers": {
|
|
100
117
|
"type": "array",
|
|
@@ -500,7 +517,25 @@
|
|
|
500
517
|
"x-stability": "stable"
|
|
501
518
|
},
|
|
502
519
|
"rules": {
|
|
503
|
-
"
|
|
520
|
+
"type": "object",
|
|
521
|
+
"additionalProperties": {
|
|
522
|
+
"type": "object",
|
|
523
|
+
"additionalProperties": true,
|
|
524
|
+
"properties": {
|
|
525
|
+
"threshold": { "type": "number", "x-stability": "experimental" },
|
|
526
|
+
"disable": { "x-stability": "experimental" },
|
|
527
|
+
"select": { "x-stability": "experimental" },
|
|
528
|
+
"ignorePaths": {
|
|
529
|
+
"type": "array",
|
|
530
|
+
"items": { "type": "string", "minLength": 1, "x-stability": "experimental" },
|
|
531
|
+
"x-merge-strategy": "append",
|
|
532
|
+
"x-deny": "array-union",
|
|
533
|
+
"x-stability": "experimental"
|
|
534
|
+
}
|
|
535
|
+
},
|
|
536
|
+
"x-stability": "experimental"
|
|
537
|
+
},
|
|
538
|
+
"x-stability": "experimental"
|
|
504
539
|
},
|
|
505
540
|
"maxProjectFiles": {
|
|
506
541
|
"x-stability": "stable"
|
|
@@ -6,7 +6,7 @@ server's `initialize` handshake. Generated by `node scripts/server-capabilities.
|
|
|
6
6
|
absent on the generating host are listed under *Unavailable* — run in a
|
|
7
7
|
provisioned environment (the nightly) to capture those rows.
|
|
8
8
|
|
|
9
|
-
_Last generated: 2026-10-
|
|
9
|
+
_Last generated: 2026-10-10 on linux; 29 servers captured, 19 unavailable._
|
|
10
10
|
|
|
11
11
|
## Diagnostic mode + navigation/edit operations
|
|
12
12
|
|
|
@@ -58,9 +58,6 @@ Legend: ✓ advertised, · not. **mode** = document diagnostics (`pull` = `textD
|
|
|
58
58
|
|
|
59
59
|
## Raw advertised capability keys
|
|
60
60
|
|
|
61
|
-
Top-level keys of each server's `ServerCapabilities` — the full advertised
|
|
62
|
-
surface, including providers pi-lens does not yet consume.
|
|
63
|
-
|
|
64
61
|
- **ast-grep**: codeActionProvider, executeCommandProvider, hoverProvider, textDocumentSync
|
|
65
62
|
- **bash**: codeActionProvider, completionProvider, definitionProvider, documentFormattingProvider, documentHighlightProvider, documentSymbolProvider, hoverProvider, referencesProvider, renameProvider, textDocumentSync, workspaceSymbolProvider
|
|
66
63
|
- **clojure**: callHierarchyProvider, codeActionProvider, codeLensProvider, completionProvider, declarationProvider, definitionProvider, documentFormattingProvider, documentHighlightProvider, documentRangeFormattingProvider, documentSymbolProvider, executeCommandProvider, experimental, foldingRangeProvider, hoverProvider, implementationProvider, linkedEditingRangeProvider, referencesProvider, renameProvider, selectionRangeProvider, semanticTokensProvider, signatureHelpProvider, textDocumentSync, workspace, workspaceSymbolProvider
|
|
@@ -102,6 +99,9 @@ surface, including providers pi-lens does not yet consume.
|
|
|
102
99
|
- **yaml**: codeActionProvider, codeLensProvider, completionProvider, definitionProvider, documentFormattingProvider, documentLinkProvider, documentOnTypeFormattingProvider, documentRangeFormattingProvider, documentSymbolProvider, executeCommandProvider, foldingRangeProvider, hoverProvider, renameProvider, selectionRangeProvider, textDocumentSync, workspace
|
|
103
100
|
- **zig**: codeActionProvider, colorProvider, completionProvider, declarationProvider, definitionProvider, documentFormattingProvider, documentHighlightProvider, documentRangeFormattingProvider, documentSymbolProvider, foldingRangeProvider, hoverProvider, implementationProvider, inlayHintProvider, positionEncoding, referencesProvider, renameProvider, selectionRangeProvider, semanticTokensProvider, signatureHelpProvider, textDocumentSync, typeDefinitionProvider, workspace, workspaceSymbolProvider
|
|
104
101
|
- **zizmor**: textDocumentSync
|
|
102
|
+
Top-level keys of each server's `ServerCapabilities` — the full advertised
|
|
103
|
+
surface, including providers pi-lens does not yet consume.
|
|
104
|
+
|
|
105
105
|
|
|
106
106
|
## Advertised executeCommand allowlists
|
|
107
107
|
|
|
@@ -130,11 +130,22 @@ surface, including providers pi-lens does not yet consume.
|
|
|
130
130
|
Toolchain/binary not installed here, so capabilities weren't captured
|
|
131
131
|
(many are the toolchain-gated family tracked in #241):
|
|
132
132
|
|
|
133
|
+
- @prisma/language-server
|
|
134
|
+
- @vue/language-server
|
|
135
|
+
- bash-language-server
|
|
133
136
|
- elixir-ls
|
|
137
|
+
- fake custom lua server
|
|
138
|
+
- fish-lsp
|
|
134
139
|
- haskell-language-server
|
|
140
|
+
- intelephense
|
|
135
141
|
- jdtls
|
|
136
142
|
- jdtls + lombok javaagent
|
|
137
143
|
- nixd
|
|
138
144
|
- ocamllsp
|
|
145
|
+
- pyright
|
|
139
146
|
- shuck
|
|
140
147
|
- sourcekit-lsp
|
|
148
|
+
- svelte-language-server
|
|
149
|
+
- vscode-css-language-server
|
|
150
|
+
- vscode-html-language-server
|
|
151
|
+
- yaml-language-server
|
|
@@ -145,8 +145,9 @@ field docs.
|
|
|
145
145
|
| `actionableWarnings.autoFix.maxFixes` | global | `5` | Cap on quickfixes applied per turn (`0` = report only) |
|
|
146
146
|
| `rules.high-complexity.threshold` | project | `15` | Cyclomatic-complexity threshold |
|
|
147
147
|
| `rules.high-fan-out.threshold` | project | `20` | Distinct-function-call threshold |
|
|
148
|
-
| `rules.<id>.disable` | project | absent | Disable diagnostics for a rule (output-only filter, project-wide; same normalization as `pi-lens-ignore`) |
|
|
148
|
+
| `rules.<id>.disable` | global + project | absent | Disable diagnostics for a rule (output-only filter, project-wide; same normalization as `pi-lens-ignore`) |
|
|
149
149
|
| `rules.<id>.select` | project | absent | Allowlist of rule ids (output-only filter, project-wide across every key; disable wins over select) |
|
|
150
|
+
| `rules.<id>.ignorePaths` | global + project | `[]` | Experimental rule-scoped globs relative to the project root; matching files skip that rule's scan and output. Entries are monotonic across tiers. |
|
|
150
151
|
| `maxProjectFiles` | project | `2000` | Base scale knob; derives five subsystem size budgets |
|
|
151
152
|
| `reviewGraph.maxFiles` | project | derived (clamped `100`–`20000`) | Explicit review-graph file budget |
|
|
152
153
|
| `trivy.enabled` / `trivy.minSeverity` | project | off | Opt-in Trivy vulnerability scanning |
|
|
@@ -1,26 +1,129 @@
|
|
|
1
1
|
// src/auth/oauth.ts
|
|
2
|
+
import { existsSync as existsSync4, mkdirSync as mkdirSync4, readFileSync as readFileSync4, writeFileSync as writeFileSync4 } from "node:fs";
|
|
3
|
+
import { homedir as homedir4 } from "node:os";
|
|
4
|
+
import { dirname as dirname4, join as join4 } from "node:path";
|
|
5
|
+
import * as PiCodingAgent from "@earendil-works/pi-coding-agent";
|
|
6
|
+
|
|
7
|
+
// src/catalog.ts
|
|
2
8
|
import { existsSync as existsSync3, mkdirSync as mkdirSync3, readFileSync as readFileSync3, writeFileSync as writeFileSync3 } from "node:fs";
|
|
3
9
|
import { homedir as homedir3 } from "node:os";
|
|
4
10
|
import { dirname as dirname3, join as join3 } from "node:path";
|
|
5
|
-
import * as PiCodingAgent from "@earendil-works/pi-coding-agent";
|
|
6
11
|
|
|
7
|
-
// src/
|
|
12
|
+
// src/cosy.ts
|
|
13
|
+
import crypto from "node:crypto";
|
|
8
14
|
import { existsSync as existsSync2, mkdirSync as mkdirSync2, readFileSync as readFileSync2, writeFileSync as writeFileSync2 } from "node:fs";
|
|
9
15
|
import { homedir as homedir2 } from "node:os";
|
|
10
16
|
import { dirname as dirname2, join as join2 } from "node:path";
|
|
11
17
|
|
|
12
|
-
// src/cosy.ts
|
|
13
|
-
import crypto from "node:crypto";
|
|
18
|
+
// src/cosy-version.ts
|
|
14
19
|
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
15
20
|
import { homedir } from "node:os";
|
|
16
21
|
import { dirname, join } from "node:path";
|
|
22
|
+
var BUNDLED_GATEWAY_COSY_VERSION = "1.1.72";
|
|
23
|
+
var QODER_CLI_RELEASES_URL = "https://repo.qoder.com/repos/QoderAI/changelog-CLI/releases?per_page=5&page=1";
|
|
24
|
+
var CACHE_FILE = "qoder-cosy-version-cache.json";
|
|
25
|
+
var REFRESH_INTERVAL_MS = 24 * 60 * 60 * 1e3;
|
|
26
|
+
var FETCH_TIMEOUT_MS = 5e3;
|
|
27
|
+
function getHomeDir() {
|
|
28
|
+
return process.env.HOME || process.env.USERPROFILE || homedir();
|
|
29
|
+
}
|
|
30
|
+
function getCosyVersionCachePath() {
|
|
31
|
+
return join(getHomeDir(), ".pi", "agent", CACHE_FILE);
|
|
32
|
+
}
|
|
33
|
+
var cosyVersionMem = /* @__PURE__ */ new Map();
|
|
34
|
+
function readCosyVersionCache() {
|
|
35
|
+
const cachePath = getCosyVersionCachePath();
|
|
36
|
+
if (cosyVersionMem.has(cachePath)) {
|
|
37
|
+
return cosyVersionMem.get(cachePath) ?? null;
|
|
38
|
+
}
|
|
39
|
+
if (!existsSync(cachePath)) {
|
|
40
|
+
cosyVersionMem.set(cachePath, null);
|
|
41
|
+
return null;
|
|
42
|
+
}
|
|
43
|
+
try {
|
|
44
|
+
const data = JSON.parse(readFileSync(cachePath, "utf8"));
|
|
45
|
+
cosyVersionMem.set(cachePath, data);
|
|
46
|
+
return data;
|
|
47
|
+
} catch {
|
|
48
|
+
cosyVersionMem.set(cachePath, null);
|
|
49
|
+
return null;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
function writeCosyVersionCache(data) {
|
|
53
|
+
const cachePath = getCosyVersionCachePath();
|
|
54
|
+
try {
|
|
55
|
+
mkdirSync(dirname(cachePath), { recursive: true });
|
|
56
|
+
writeFileSync(cachePath, JSON.stringify(data, null, 2), "utf-8");
|
|
57
|
+
} catch {
|
|
58
|
+
}
|
|
59
|
+
cosyVersionMem.set(cachePath, data);
|
|
60
|
+
}
|
|
61
|
+
function isCliVersion(value) {
|
|
62
|
+
return typeof value === "string" && /^\d+\.\d+\.\d+$/.test(value);
|
|
63
|
+
}
|
|
64
|
+
function compareCliVersions(a, b2) {
|
|
65
|
+
const pa = a.split(".").map(Number);
|
|
66
|
+
const pb = b2.split(".").map(Number);
|
|
67
|
+
for (let i = 0; i < 3; i++) {
|
|
68
|
+
if (pa[i] !== pb[i]) return pa[i] - pb[i];
|
|
69
|
+
}
|
|
70
|
+
return 0;
|
|
71
|
+
}
|
|
72
|
+
function getGatewayCosyVersion() {
|
|
73
|
+
const cached = readCosyVersionCache()?.version;
|
|
74
|
+
if (isCliVersion(cached) && compareCliVersions(cached, BUNDLED_GATEWAY_COSY_VERSION) >= 0) {
|
|
75
|
+
return cached;
|
|
76
|
+
}
|
|
77
|
+
return BUNDLED_GATEWAY_COSY_VERSION;
|
|
78
|
+
}
|
|
79
|
+
var refreshInFlight = null;
|
|
80
|
+
async function refreshGatewayCosyVersion(options) {
|
|
81
|
+
const now = options?.now ?? Date.now();
|
|
82
|
+
const checkedAt = readCosyVersionCache()?.checkedAt;
|
|
83
|
+
if (!options?.force && typeof checkedAt === "number" && now - checkedAt < REFRESH_INTERVAL_MS) {
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
if (refreshInFlight) return refreshInFlight;
|
|
87
|
+
refreshInFlight = (async () => {
|
|
88
|
+
try {
|
|
89
|
+
const controller = new AbortController();
|
|
90
|
+
const timer = setTimeout(() => controller.abort(), FETCH_TIMEOUT_MS);
|
|
91
|
+
let releases;
|
|
92
|
+
try {
|
|
93
|
+
const response = await fetch(QODER_CLI_RELEASES_URL, {
|
|
94
|
+
headers: { Accept: "application/vnd.github.v3+json" },
|
|
95
|
+
signal: controller.signal
|
|
96
|
+
});
|
|
97
|
+
if (!response.ok) return;
|
|
98
|
+
releases = await response.json();
|
|
99
|
+
} finally {
|
|
100
|
+
clearTimeout(timer);
|
|
101
|
+
}
|
|
102
|
+
if (!Array.isArray(releases)) return;
|
|
103
|
+
const latest = releases.find(
|
|
104
|
+
(release) => release && !release.draft && !release.prerelease && isCliVersion(release.tag_name)
|
|
105
|
+
);
|
|
106
|
+
const stampedAt = Date.now();
|
|
107
|
+
if (latest && compareCliVersions(latest.tag_name, getGatewayCosyVersion()) > 0) {
|
|
108
|
+
writeCosyVersionCache({ version: latest.tag_name, checkedAt: stampedAt });
|
|
109
|
+
} else {
|
|
110
|
+
writeCosyVersionCache({ version: readCosyVersionCache()?.version, checkedAt: stampedAt });
|
|
111
|
+
}
|
|
112
|
+
} catch {
|
|
113
|
+
} finally {
|
|
114
|
+
refreshInFlight = null;
|
|
115
|
+
}
|
|
116
|
+
})();
|
|
117
|
+
return refreshInFlight;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
// src/cosy.ts
|
|
17
121
|
var qoderRSAPublicKey = `-----BEGIN PUBLIC KEY-----
|
|
18
122
|
MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDA8iMH5c02LilrsERw9t6Pv5Nc
|
|
19
123
|
4k6Pz1EaDicBMpdpxKduSZu5OANqUq8er4GM95omAGIOPOh+Nx0spthYA2BqGz+l
|
|
20
124
|
6HRkPJ7S236FZz73In/KVuLnwI8JJ2CbuJap8kvheCCZpmAWpb/cPx/3Vr/J6I17
|
|
21
125
|
XcW+ML9FoCI6AOvOzwIDAQAB
|
|
22
126
|
-----END PUBLIC KEY-----`;
|
|
23
|
-
var QODER_GATEWAY_COSY_VERSION = "1.1.38";
|
|
24
127
|
var QODER_OPENAPI_COSY_VERSION = "1.0.1";
|
|
25
128
|
var QODER_CLIENT_TYPE = "5";
|
|
26
129
|
var QoderDataPolicy = "disagree";
|
|
@@ -49,16 +152,16 @@ function computeSigPath(urlStr) {
|
|
|
49
152
|
}
|
|
50
153
|
return sigPath;
|
|
51
154
|
}
|
|
52
|
-
function
|
|
53
|
-
return process.env.HOME || process.env.USERPROFILE ||
|
|
155
|
+
function getHomeDir2() {
|
|
156
|
+
return process.env.HOME || process.env.USERPROFILE || homedir2();
|
|
54
157
|
}
|
|
55
158
|
function getMachineId() {
|
|
56
|
-
const home =
|
|
57
|
-
const paths = [
|
|
159
|
+
const home = getHomeDir2();
|
|
160
|
+
const paths = [join2(home, ".qoder", ".auth", "machine_id"), join2(home, ".pi", "agent", "qoder-machine-id")];
|
|
58
161
|
for (const p of paths) {
|
|
59
|
-
if (
|
|
162
|
+
if (existsSync2(p)) {
|
|
60
163
|
try {
|
|
61
|
-
const val =
|
|
164
|
+
const val = readFileSync2(p, "utf8").trim();
|
|
62
165
|
if (val) return val;
|
|
63
166
|
} catch {
|
|
64
167
|
}
|
|
@@ -67,8 +170,8 @@ function getMachineId() {
|
|
|
67
170
|
const newId = crypto.randomUUID();
|
|
68
171
|
try {
|
|
69
172
|
const savePath = paths[1];
|
|
70
|
-
|
|
71
|
-
|
|
173
|
+
mkdirSync2(dirname2(savePath), { recursive: true });
|
|
174
|
+
writeFileSync2(savePath, newId, "utf8");
|
|
72
175
|
} catch {
|
|
73
176
|
}
|
|
74
177
|
return newId;
|
|
@@ -92,11 +195,12 @@ function buildAuthHeaders(body, requestURL, creds) {
|
|
|
92
195
|
const cosyKey = rsaEncryptBase64(aesKey);
|
|
93
196
|
const timestamp = Math.floor(Date.now() / 1e3).toString();
|
|
94
197
|
const requestId = crypto.randomUUID();
|
|
198
|
+
const cosyVersion = getGatewayCosyVersion();
|
|
95
199
|
const cosyPayload = {
|
|
96
200
|
version: "v1",
|
|
97
201
|
requestId,
|
|
98
202
|
info: infoB64,
|
|
99
|
-
cosyVersion
|
|
203
|
+
cosyVersion,
|
|
100
204
|
ideVersion: ""
|
|
101
205
|
};
|
|
102
206
|
const payloadB64 = Buffer.from(JSON.stringify(cosyPayload)).toString("base64");
|
|
@@ -111,7 +215,7 @@ function buildAuthHeaders(body, requestURL, creds) {
|
|
|
111
215
|
"Cosy-Key": cosyKey,
|
|
112
216
|
"Cosy-User": creds.userID,
|
|
113
217
|
"Cosy-Date": timestamp,
|
|
114
|
-
"Cosy-Version":
|
|
218
|
+
"Cosy-Version": cosyVersion,
|
|
115
219
|
"Cosy-Machineid": machineID,
|
|
116
220
|
"Cosy-Machinetoken": machineID,
|
|
117
221
|
"Cosy-Machinetype": QoderMachineTypeMagic,
|
|
@@ -204,11 +308,11 @@ function getQoderDevicePollURL(nonce, codeVerifier) {
|
|
|
204
308
|
var ZERO_COST = Object.freeze({ input: 0, output: 0, cacheRead: 0, cacheWrite: 0 });
|
|
205
309
|
var MAX_OUTPUT_TOKENS = 131072;
|
|
206
310
|
var DEFAULT_CONTEXT_WINDOW = 1e6;
|
|
207
|
-
function
|
|
208
|
-
return process.env.HOME || process.env.USERPROFILE ||
|
|
311
|
+
function getHomeDir3() {
|
|
312
|
+
return process.env.HOME || process.env.USERPROFILE || homedir3();
|
|
209
313
|
}
|
|
210
314
|
function getQoderCachePath(mode) {
|
|
211
|
-
return
|
|
315
|
+
return join3(getHomeDir3(), ".pi", "agent", getQoderRegionConfig(mode).modelCacheFile);
|
|
212
316
|
}
|
|
213
317
|
var modelCacheMem = /* @__PURE__ */ new Map();
|
|
214
318
|
function readParsedModelCache(mode) {
|
|
@@ -216,12 +320,12 @@ function readParsedModelCache(mode) {
|
|
|
216
320
|
if (modelCacheMem.has(cachePath)) {
|
|
217
321
|
return modelCacheMem.get(cachePath) ?? null;
|
|
218
322
|
}
|
|
219
|
-
if (!
|
|
323
|
+
if (!existsSync3(cachePath)) {
|
|
220
324
|
modelCacheMem.set(cachePath, null);
|
|
221
325
|
return null;
|
|
222
326
|
}
|
|
223
327
|
try {
|
|
224
|
-
const data = JSON.parse(
|
|
328
|
+
const data = JSON.parse(readFileSync3(cachePath, "utf8"));
|
|
225
329
|
modelCacheMem.set(cachePath, data);
|
|
226
330
|
return data;
|
|
227
331
|
} catch {
|
|
@@ -231,8 +335,8 @@ function readParsedModelCache(mode) {
|
|
|
231
335
|
}
|
|
232
336
|
function writeParsedModelCache(mode, data) {
|
|
233
337
|
const cachePath = getQoderCachePath(mode);
|
|
234
|
-
|
|
235
|
-
|
|
338
|
+
mkdirSync3(dirname3(cachePath), { recursive: true });
|
|
339
|
+
writeFileSync3(cachePath, JSON.stringify(data, null, 2), "utf-8");
|
|
236
340
|
modelCacheMem.set(cachePath, data);
|
|
237
341
|
}
|
|
238
342
|
function toQoderModelId(displayName) {
|
|
@@ -695,6 +799,7 @@ function isCacheStale(mode) {
|
|
|
695
799
|
async function updateQoderModelsCache(authToken, userID, name, email, mode) {
|
|
696
800
|
const modelListURL = getQoderModelListURL(mode);
|
|
697
801
|
try {
|
|
802
|
+
await refreshGatewayCosyVersion();
|
|
698
803
|
const headers = buildAuthHeaders(null, modelListURL, {
|
|
699
804
|
userID,
|
|
700
805
|
authToken,
|
|
@@ -1011,11 +1116,11 @@ async function runDeviceFlow(callbacks) {
|
|
|
1011
1116
|
// src/auth/oauth.ts
|
|
1012
1117
|
var AuthStorage2 = PiCodingAgent.AuthStorage;
|
|
1013
1118
|
var identityCache = /* @__PURE__ */ new Map();
|
|
1014
|
-
function
|
|
1015
|
-
return process.env.HOME || process.env.USERPROFILE ||
|
|
1119
|
+
function getHomeDir4() {
|
|
1120
|
+
return process.env.HOME || process.env.USERPROFILE || homedir4();
|
|
1016
1121
|
}
|
|
1017
1122
|
function getAuthFilePath() {
|
|
1018
|
-
return
|
|
1123
|
+
return join4(getHomeDir4(), ".pi", "agent", "auth.json");
|
|
1019
1124
|
}
|
|
1020
1125
|
var authFileMem;
|
|
1021
1126
|
function readAuthFileCached() {
|
|
@@ -1024,12 +1129,12 @@ function readAuthFileCached() {
|
|
|
1024
1129
|
if (authFileMem === null) return null;
|
|
1025
1130
|
if (authFileMem.path === authPath) return authFileMem.data;
|
|
1026
1131
|
}
|
|
1027
|
-
if (!
|
|
1132
|
+
if (!existsSync4(authPath)) {
|
|
1028
1133
|
authFileMem = null;
|
|
1029
1134
|
return null;
|
|
1030
1135
|
}
|
|
1031
1136
|
try {
|
|
1032
|
-
const data = JSON.parse(
|
|
1137
|
+
const data = JSON.parse(readFileSync4(authPath, "utf-8"));
|
|
1033
1138
|
authFileMem = { path: authPath, data };
|
|
1034
1139
|
return data;
|
|
1035
1140
|
} catch {
|
|
@@ -1047,14 +1152,14 @@ function getQoderPatForMode(mode) {
|
|
|
1047
1152
|
function saveCredentialsToAuthFile(providerID, credentials) {
|
|
1048
1153
|
try {
|
|
1049
1154
|
const authPath = getAuthFilePath();
|
|
1050
|
-
const dir =
|
|
1051
|
-
if (!
|
|
1052
|
-
|
|
1155
|
+
const dir = dirname4(authPath);
|
|
1156
|
+
if (!existsSync4(dir)) {
|
|
1157
|
+
mkdirSync4(dir, { recursive: true, mode: 448 });
|
|
1053
1158
|
}
|
|
1054
1159
|
const existing = readAuthFileCached();
|
|
1055
1160
|
const auth = existing ? { ...existing } : {};
|
|
1056
1161
|
auth[providerID] = { type: "oauth", ...credentials };
|
|
1057
|
-
|
|
1162
|
+
writeFileSync4(authPath, JSON.stringify(auth, null, 2), { encoding: "utf-8", mode: 384 });
|
|
1058
1163
|
authFileMem = { path: authPath, data: auth };
|
|
1059
1164
|
const q2 = credentials;
|
|
1060
1165
|
if (q2.access && q2.userID) {
|
|
@@ -9548,6 +9653,33 @@ var ThinkingTagParser = class {
|
|
|
9548
9653
|
}
|
|
9549
9654
|
};
|
|
9550
9655
|
|
|
9656
|
+
// src/protocol/tool-call-id.ts
|
|
9657
|
+
import { createHash } from "node:crypto";
|
|
9658
|
+
var VALID_WIRE_ID = /^[a-zA-Z0-9_-]{1,64}$/;
|
|
9659
|
+
var RESERVED_WIRE_ID = /^qtc_[0-9a-f]{60}$/;
|
|
9660
|
+
function digestToolCallId(original) {
|
|
9661
|
+
return `qtc_${createHash("sha256").update("qoder-tool-call-id:v1\0").update(original).digest("hex").slice(0, 60)}`;
|
|
9662
|
+
}
|
|
9663
|
+
function createQoderToolCallIdMapper(digest = digestToolCallId) {
|
|
9664
|
+
const byOriginal = /* @__PURE__ */ new Map();
|
|
9665
|
+
const byWire = /* @__PURE__ */ new Map();
|
|
9666
|
+
return (original) => {
|
|
9667
|
+
if (typeof original !== "string" || original.length === 0) {
|
|
9668
|
+
throw new Error("Qoder tool call ID must be a non-empty string");
|
|
9669
|
+
}
|
|
9670
|
+
const cached = byOriginal.get(original);
|
|
9671
|
+
if (cached !== void 0) return cached;
|
|
9672
|
+
const wireId = VALID_WIRE_ID.test(original) && !RESERVED_WIRE_ID.test(original) ? original : digest(original);
|
|
9673
|
+
const owner = byWire.get(wireId);
|
|
9674
|
+
if (owner !== void 0 && owner !== original) {
|
|
9675
|
+
throw new Error("Qoder tool call ID mapping collision");
|
|
9676
|
+
}
|
|
9677
|
+
byOriginal.set(original, wireId);
|
|
9678
|
+
byWire.set(wireId, original);
|
|
9679
|
+
return wireId;
|
|
9680
|
+
};
|
|
9681
|
+
}
|
|
9682
|
+
|
|
9551
9683
|
// src/protocol/transform.ts
|
|
9552
9684
|
function getContentText(msg) {
|
|
9553
9685
|
if (typeof msg.content === "string") return msg.content;
|
|
@@ -9576,6 +9708,7 @@ function transformTools(tools) {
|
|
|
9576
9708
|
}
|
|
9577
9709
|
function transformMessagesForQoder(messages) {
|
|
9578
9710
|
const normalizedMessages = [];
|
|
9711
|
+
const mapToolCallId = createQoderToolCallIdMapper();
|
|
9579
9712
|
const droppedToolCallIds = /* @__PURE__ */ new Set();
|
|
9580
9713
|
for (let i = 0; i < messages.length; i++) {
|
|
9581
9714
|
const msg = messages[i];
|
|
@@ -9635,7 +9768,7 @@ function transformMessagesForQoder(messages) {
|
|
|
9635
9768
|
} else if (block.type === "toolCall") {
|
|
9636
9769
|
const tc = block;
|
|
9637
9770
|
toolCalls.push({
|
|
9638
|
-
id: tc.id,
|
|
9771
|
+
id: mapToolCallId(tc.id),
|
|
9639
9772
|
type: "function",
|
|
9640
9773
|
function: {
|
|
9641
9774
|
name: tc.name,
|
|
@@ -9668,7 +9801,7 @@ function transformMessagesForQoder(messages) {
|
|
|
9668
9801
|
if (droppedToolCallIds.has(tr.toolCallId)) continue;
|
|
9669
9802
|
normalizedMessages.push({
|
|
9670
9803
|
role: "tool",
|
|
9671
|
-
tool_call_id: tr.toolCallId,
|
|
9804
|
+
tool_call_id: mapToolCallId(tr.toolCallId),
|
|
9672
9805
|
content: getContentText(tr)
|
|
9673
9806
|
});
|
|
9674
9807
|
for (const img of getContentImages(tr)) {
|
|
@@ -85,7 +85,7 @@ An enabled extension with no usable key looks exactly like a working one — one
|
|
|
85
85
|
|
|
86
86
|
The environment may lower an explicit cap but never raise it. A reached cap raises a `budget` error naming the cap, the amount used, and the day.
|
|
87
87
|
|
|
88
|
-
Need more than one request? `evaluateAll(request)` asks any number of questions about one state (over 32 are chunked and fanned out), and `evaluateMany(requests)` runs several requests at once. Both preserve order, bound concurrency, never throw, and stop submitting once the budget is gone. [`pi-typesafe/calibrate`](docs/api.md#calibration-pi-typesafecalibrate) turns labelled cases into thresholds with AUC, a sweep, and a replay runner.
|
|
88
|
+
Need more than one request? `evaluateAll(request)` asks any number of questions about one state (over the backend's limit, 32 or 16 on SubQ, are chunked and fanned out), and `evaluateMany(requests)` runs several requests at once. Both preserve order, bound concurrency, never throw, and stop submitting once the budget is gone. [`pi-typesafe/calibrate`](docs/api.md#calibration-pi-typesafecalibrate) turns labelled cases into thresholds with AUC, a sweep, and a replay runner.
|
|
89
89
|
|
|
90
90
|
## Commands
|
|
91
91
|
|
|
@@ -117,7 +117,7 @@ The main model can answer any of these questions in prose. It is slower, costs m
|
|
|
117
117
|
Only the state and questions you (or the agent, once enabled) submit, to `https://api.typesafe.ai` only. No files, conversation history, or telemetry. Error messages never include upstream response bodies, headers, keys, or your submitted state.
|
|
118
118
|
|
|
119
119
|
**Limits?**
|
|
120
|
-
Per request: 32 questions and 64 KiB of JSON. Per session: 20 attempts, 15-second timeout, no automatic retries. Per day: no cap unless you set one. Session limits reset when a session starts or reloads; daily counters live in `~/.pi/agent/pi-typesafe/usage.json` and roll over at local midnight. The SDK's `TYPESAFE_BASE_URL` and `TYPESAFE_LOG_LEVEL` overrides are ignored.
|
|
120
|
+
Per request: 32 questions (16 on SubQ) and 64 KiB of JSON. Per session: 20 attempts, 15-second timeout, no automatic retries. Per day: no cap unless you set one. Session limits reset when a session starts or reloads; daily counters live in `~/.pi/agent/pi-typesafe/usage.json` and roll over at local midnight. The SDK's `TYPESAFE_BASE_URL` and `TYPESAFE_LOG_LEVEL` overrides are ignored.
|
|
121
121
|
|
|
122
122
|
## For extension authors
|
|
123
123
|
|
|
@@ -142,7 +142,7 @@ if (!answer.ok) return { skipped: answer.errorCode === "budget" }; // never thr
|
|
|
142
142
|
|
|
143
143
|
Your extension owns its own user consent and budget; `/typesafe enable` applies only to this package's tool. Check `authState()` rather than your own consent flag before you report that judgments are on.
|
|
144
144
|
|
|
145
|
-
Judgments can also go through OpenRouter: `createTypeSafe({ backend: "openrouter" })` sends them to `openrouter.ai` with the key from `OPENROUTER_API_KEY`. Command Code serves the same protocol: `createTypeSafe({ backend: "commandcode" })` sends them to `api.commandcode.ai` with the key from `COMMANDCODE_API_KEY` and the model `typesafe/jev`. So does Liquid AI: `createTypeSafe({ backend: "liquid" })` sends them to `api.liquid.ai` with the key from `LIQUID_API_KEY` and the model `d1:free`, which is free; pass `model: "d1"` for the paid model, priced at $0.040 per million input tokens. Liquid counts the state once per question, where TypeSafe counts it once per request, so a request with N questions costs about N times the state on Liquid. Speed, measured on 2026-10-03 with one request at a time: `d1:free` took a median of about 14 seconds and sometimes failed with HTTP 504 after about 46 seconds, while `d1` took about 0.5 seconds. With `d1:free`, raise `timeoutMs` above its 15-second default, or pass `model: "d1"`. Or pass a `BackendEndpoint` object as `backend` to name any host that serves the protocol: it brings its own key variable, never reads `TYPESAFE_API_KEY`, and `backendHost()` reports its destination host for your consent text. These backends have no login store, so `/typesafe login` does not apply to them. Pass the same `backend` to `authState`, `keySituation`, and `ensureApiKey`, or the status you report describes the TypeSafe key while the requests use another one. The `/typesafe` commands and the `typesafe_evaluate` tool always use the TypeSafe backend. Every export — the client, `ask`, batching, the usage ledger, auth state, and the `pi-typesafe/calibrate` and `pi-typesafe/ui` entry points — is in [docs/api.md](docs/api.md).
|
|
145
|
+
Judgments can also go through OpenRouter: `createTypeSafe({ backend: "openrouter" })` sends them to `openrouter.ai` with the key from `OPENROUTER_API_KEY`. Command Code serves the same protocol: `createTypeSafe({ backend: "commandcode" })` sends them to `api.commandcode.ai` with the key from `COMMANDCODE_API_KEY` and the model `typesafe/jev`. So does Liquid AI: `createTypeSafe({ backend: "liquid" })` sends them to `api.liquid.ai` with the key from `LIQUID_API_KEY` and the model `d1:free`, which is free; pass `model: "d1"` for the paid model, priced at $0.040 per million input tokens. Liquid counts the state once per question, where TypeSafe counts it once per request, so a request with N questions costs about N times the state on Liquid. Speed, measured on 2026-10-03 with one request at a time: `d1:free` took a median of about 14 seconds and sometimes failed with HTTP 504 after about 46 seconds, while `d1` took about 0.5 seconds. With `d1:free`, raise `timeoutMs` above its 15-second default, or pass `model: "d1"`. SubQ too: `createTypeSafe({ backend: "subq" })` sends them to `api.subq.ai` with the key from `SUBQ_API_KEY` and the model `subq-snap-preview`, priced at $0.05 per million input tokens. SubQ takes at most 16 questions in one request, a Choice of at least 2 options, and a Score of at most 10 levels: `evaluate` refuses a larger request before it sends it, `evaluateAll` splits to 16, and `client.limits` tells you the limit without a request. Or pass a `BackendEndpoint` object as `backend` to name any host that serves the protocol: it brings its own key variable, never reads `TYPESAFE_API_KEY`, and `backendHost()` reports its destination host for your consent text. These backends have no login store, so `/typesafe login` does not apply to them. Pass the same `backend` to `authState`, `keySituation`, and `ensureApiKey`, or the status you report describes the TypeSafe key while the requests use another one. The `/typesafe` commands and the `typesafe_evaluate` tool always use the TypeSafe backend. Every export — the client, `ask`, batching, the usage ledger, auth state, and the `pi-typesafe/calibrate` and `pi-typesafe/ui` entry points — is in [docs/api.md](docs/api.md).
|
|
146
146
|
|
|
147
147
|
## Development
|
|
148
148
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import type { BackendLimits } from "./schema.js";
|
|
2
|
+
export type TypeSafeBackend = "typesafe" | "openrouter" | "commandcode" | "liquid" | "subq";
|
|
2
3
|
export interface BackendConfig {
|
|
3
|
-
/** Human name for status lines: "TypeSafe", "OpenRouter", "Command Code", "Liquid AI". */
|
|
4
|
+
/** Human name for status lines: "TypeSafe", "OpenRouter", "Command Code", "Liquid AI", "SubQ". */
|
|
4
5
|
label: string;
|
|
5
6
|
host: string;
|
|
6
7
|
/** The environment variable that carries this backend's key. Absent means the TypeSafe key resolution applies. */
|
|
@@ -15,6 +16,8 @@ export interface BackendConfig {
|
|
|
15
16
|
modelsIdField?: string;
|
|
16
17
|
/** Whether the model list checks the key. A public list accepts any key, so it proves nothing. Absent means it does. */
|
|
17
18
|
modelsVerifyKey?: boolean;
|
|
19
|
+
/** What one request may ask, where the backend accepts less than the schema. An absent field keeps the schema's bound. */
|
|
20
|
+
limits?: Readonly<Partial<BackendLimits>>;
|
|
18
21
|
}
|
|
19
22
|
/** A registry entry: a backend config that can also name a price per model. Caller-supplied endpoints carry none. */
|
|
20
23
|
export interface RegistryBackendConfig extends BackendConfig {
|
|
@@ -41,6 +44,8 @@ export interface ResolvedBackend extends RegistryBackendConfig {
|
|
|
41
44
|
readonly defaultModel?: string;
|
|
42
45
|
/** Always explicit after resolution. */
|
|
43
46
|
readonly modelsVerifyKey: boolean;
|
|
47
|
+
/** Every limit explicit: the backend's own, else the schema's bound. */
|
|
48
|
+
readonly limits: BackendLimits;
|
|
44
49
|
}
|
|
45
50
|
/** The backend every key and auth function assumes when none is named. */
|
|
46
51
|
export declare const DEFAULT_BACKEND: TypeSafeBackend;
|