@herbertgao/pi-extensions 2026.11.10 → 2026.11.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (296) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/README.md +10 -10
  3. package/THIRD_PARTY_NOTICES.md +3 -3
  4. package/node_modules/@herbertgao/pi-cc-extensions/CHANGELOG.md +16 -0
  5. package/node_modules/@herbertgao/pi-cc-extensions/README.en.md +3 -4
  6. package/node_modules/@herbertgao/pi-cc-extensions/README.md +3 -4
  7. package/node_modules/@herbertgao/pi-cc-extensions/extensions/feature/agent-summary/core.ts +22 -15
  8. package/node_modules/@herbertgao/pi-cc-extensions/extensions/feature/agent-summary/index.ts +22 -8
  9. package/node_modules/@herbertgao/pi-cc-extensions/extensions/feature/context.ts +0 -29
  10. package/node_modules/@herbertgao/pi-cc-extensions/extensions/feature/shell/prompt-editor.ts +5 -2
  11. package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/compact-mode.ts +73 -47
  12. package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/mouse/interaction.ts +3 -2
  13. package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/codemode.ts +0 -40
  14. package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/diff/diff-parse.ts +4 -1
  15. package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/grouping.ts +79 -18
  16. package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/tool-io.ts +0 -5
  17. package/node_modules/@herbertgao/pi-cc-extensions/extensions/utils/ansi-text.ts +18 -4
  18. package/node_modules/@herbertgao/pi-cc-extensions/extensions/utils/format.ts +15 -0
  19. package/node_modules/@herbertgao/pi-cc-extensions/package.json +4 -4
  20. package/node_modules/@herbertgao/pi-impeccable/CHANGELOG.md +12 -0
  21. package/node_modules/@herbertgao/pi-impeccable/README.md +2 -2
  22. package/node_modules/@herbertgao/pi-impeccable/package.json +4 -4
  23. package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/SKILL.md +4 -2
  24. package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/adapt.md +2 -2
  25. package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/animate.md +17 -0
  26. package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/audit.md +12 -1
  27. package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/audit.native.md +4 -0
  28. package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/critique-rubric.md +496 -0
  29. package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/critique.md +13 -505
  30. package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/degraded/documenter.md +1 -1
  31. package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/degraded/finish-reviewer.md +1 -1
  32. package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/degraded/motion-reviewer.md +29 -0
  33. package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/distill.md +1 -1
  34. package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/document.md +3 -1
  35. package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/foundations.md +44 -0
  36. package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/hooks.md +3 -3
  37. package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/live-setup.md +1 -1
  38. package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/live.md +26 -12
  39. package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/new-work-comp.md +24 -0
  40. package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/new-work-world.md +20 -0
  41. package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/new-work.md +9 -37
  42. package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/onboard.md +7 -6
  43. package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/overdrive.md +2 -2
  44. package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/quieter.md +1 -1
  45. package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/typeset.md +6 -0
  46. package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/visualize.md +1 -1
  47. package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/scripts/VERSION +1 -1
  48. package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/scripts/engine-checksums.txt +5 -5
  49. package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/scripts/impeccable +69 -16
  50. package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/scripts/impeccable.cmd +55 -7
  51. package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/scripts/live-browser.js +51 -22
  52. package/node_modules/@herbertgao/pi-subagents/CHANGELOG.md +6 -0
  53. package/node_modules/@herbertgao/pi-subagents/README.md +27 -9
  54. package/node_modules/@herbertgao/pi-subagents/docs/workflows.md +11 -11
  55. package/node_modules/@herbertgao/pi-subagents/package.json +4 -4
  56. package/node_modules/@herbertgao/pi-subagents/src/agent-manager.ts +13 -0
  57. package/node_modules/@herbertgao/pi-subagents/src/agent-runner.ts +51 -32
  58. package/node_modules/@herbertgao/pi-subagents/src/default-agents.ts +7 -0
  59. package/node_modules/@herbertgao/pi-subagents/src/index.ts +334 -893
  60. package/node_modules/@herbertgao/pi-subagents/src/nested-tools.ts +4 -1
  61. package/node_modules/@herbertgao/pi-subagents/src/prompts.ts +13 -0
  62. package/node_modules/@herbertgao/pi-subagents/src/schedule-store.ts +18 -13
  63. package/node_modules/@herbertgao/pi-subagents/src/schedule.ts +25 -5
  64. package/node_modules/@herbertgao/pi-subagents/src/settings.ts +215 -69
  65. package/node_modules/@herbertgao/pi-subagents/src/types.ts +17 -0
  66. package/node_modules/@herbertgao/pi-subagents/src/ui/agent-widget.ts +9 -0
  67. package/node_modules/@herbertgao/pi-subagents/src/ui/agents-menu.ts +705 -0
  68. package/node_modules/@herbertgao/pi-subagents/src/ui/settings-menu.ts +361 -0
  69. package/node_modules/@herbertgao/pi-subagents/src/ui/viewer-keys.ts +1 -1
  70. package/node_modules/pi-antigravity/README.md +58 -9
  71. package/node_modules/pi-antigravity/docs/reader-guarantees.md +35 -0
  72. package/node_modules/pi-antigravity/package.json +15 -6
  73. package/node_modules/pi-antigravity/src/client/client.ts +63 -14
  74. package/node_modules/pi-antigravity/src/client/enterprise.ts +150 -0
  75. package/node_modules/pi-antigravity/src/client/index.ts +1 -0
  76. package/node_modules/pi-antigravity/src/diagnostics/diagnostics.ts +7 -0
  77. package/node_modules/pi-antigravity/src/features/generate-image.ts +56 -2
  78. package/node_modules/pi-antigravity/src/features/read-url-content.ts +124 -0
  79. package/node_modules/pi-antigravity/src/image/image.ts +16 -2
  80. package/node_modules/pi-antigravity/src/index.ts +145 -2
  81. package/node_modules/pi-antigravity/src/models/discovery.ts +3 -4
  82. package/node_modules/pi-antigravity/src/models/grouping.ts +39 -15
  83. package/node_modules/pi-antigravity/src/models/models.ts +126 -14
  84. package/node_modules/pi-antigravity/src/stream/stream.ts +189 -30
  85. package/node_modules/pi-antigravity/src/types/types.ts +30 -1
  86. package/node_modules/pi-antigravity/src/usage/usage.ts +58 -0
  87. package/node_modules/pi-antigravity/src/utils/address.ts +180 -0
  88. package/node_modules/pi-antigravity/src/utils/credits.ts +149 -0
  89. package/node_modules/pi-antigravity/src/utils/html.ts +31 -0
  90. package/node_modules/pi-antigravity/src/utils/index.ts +2 -0
  91. package/node_modules/pi-antigravity/src/utils/security.ts +172 -13
  92. package/node_modules/pi-antigravity/src/utils/text.ts +66 -0
  93. package/node_modules/pi-antigravity/src/utils/util.ts +5 -4
  94. package/node_modules/pi-antigravity/src/web-fetch/document.ts +83 -0
  95. package/node_modules/pi-antigravity/src/web-fetch/fences.ts +24 -0
  96. package/node_modules/pi-antigravity/src/web-fetch/header.ts +97 -0
  97. package/node_modules/pi-antigravity/src/web-fetch/index.ts +3 -0
  98. package/node_modules/pi-antigravity/src/web-fetch/inspect.ts +328 -0
  99. package/node_modules/pi-antigravity/src/web-fetch/limits.ts +4 -0
  100. package/node_modules/pi-antigravity/src/web-fetch/markdown.ts +744 -0
  101. package/node_modules/pi-antigravity/src/web-fetch/mdn.ts +164 -0
  102. package/node_modules/pi-antigravity/src/web-fetch/media.ts +11 -0
  103. package/node_modules/pi-antigravity/src/web-fetch/metadata.ts +9 -0
  104. package/node_modules/pi-antigravity/src/web-fetch/representation.ts +93 -0
  105. package/node_modules/pi-antigravity/src/web-fetch/save.ts +71 -0
  106. package/node_modules/pi-antigravity/src/web-fetch/sites.ts +138 -0
  107. package/node_modules/pi-antigravity/src/web-fetch/vendor.d.ts +9 -0
  108. package/node_modules/pi-antigravity/src/web-fetch/web-fetch.ts +957 -0
  109. package/node_modules/pi-antigravity/tsconfig.json +2 -2
  110. package/node_modules/pi-commandcode-provider/CHANGELOG.md +21 -1
  111. package/node_modules/pi-commandcode-provider/README.md +2 -2
  112. package/node_modules/pi-commandcode-provider/index.ts +2 -1
  113. package/node_modules/pi-commandcode-provider/package.json +5 -4
  114. package/node_modules/pi-commandcode-provider/src/commandcode-catalog.ts +15 -9
  115. package/node_modules/pi-commandcode-provider/src/oauth.ts +69 -12
  116. package/node_modules/pi-commandcode-provider/src/pricing.ts +8 -1
  117. package/node_modules/pi-commandcode-provider/src/responses-compat.ts +137 -0
  118. package/node_modules/pi-lens/CHANGELOG-USER.md +6 -6
  119. package/node_modules/pi-lens/CHANGELOG.md +172 -0
  120. package/node_modules/pi-lens/README.md +103 -217
  121. package/node_modules/pi-lens/dist/{chunk-KXDQD34C.js → chunk-27JQHK7Y.js} +1 -1
  122. package/node_modules/pi-lens/dist/{chunk-W6VLB6LL.js → chunk-2APSZHHI.js} +61 -3
  123. package/node_modules/pi-lens/dist/{chunk-5EEWCJG7.js → chunk-2H5GHZKC.js} +8 -8
  124. package/node_modules/pi-lens/dist/{chunk-TS5EIWEF.js → chunk-2H7NFZ4Q.js} +11 -11
  125. package/node_modules/pi-lens/dist/{chunk-6GWCYEP7.js → chunk-37IDWT6O.js} +64 -16
  126. package/node_modules/pi-lens/dist/{chunk-OEPWTSUG.js → chunk-3PAS2ERX.js} +8 -8
  127. package/node_modules/pi-lens/dist/{chunk-ET3DSSFZ.js → chunk-3PO4YYOX.js} +9 -17
  128. package/node_modules/pi-lens/dist/{chunk-C6V2DSZZ.js → chunk-3QXFUP6T.js} +11 -11
  129. package/node_modules/pi-lens/dist/{chunk-HWMNTQBJ.js → chunk-3TSMQZG6.js} +32 -11
  130. package/node_modules/pi-lens/dist/{chunk-QY6J2FTK.js → chunk-4DAHGU3V.js} +15 -14
  131. package/node_modules/pi-lens/dist/{chunk-PCREZ4HJ.js → chunk-4IZZEN63.js} +33 -34
  132. package/node_modules/pi-lens/dist/{chunk-OYXD2MOM.js → chunk-5HBQL7DH.js} +2 -2
  133. package/node_modules/pi-lens/dist/{chunk-B4FAFEBP.js → chunk-5JB4WENL.js} +1 -1
  134. package/node_modules/pi-lens/dist/chunk-5YJXF2IS.js +56 -0
  135. package/node_modules/pi-lens/dist/{chunk-GHATCG2A.js → chunk-6CFSDLHE.js} +22 -18
  136. package/node_modules/pi-lens/dist/{chunk-FVQKX5KI.js → chunk-6E5QLMWI.js} +24 -22
  137. package/node_modules/pi-lens/dist/{chunk-AVBEPUCD.js → chunk-6GLMMGCX.js} +2 -2
  138. package/node_modules/pi-lens/dist/{chunk-YTXFNCVN.js → chunk-74AMPWNC.js} +2 -2
  139. package/node_modules/pi-lens/dist/{chunk-K2GV34T2.js → chunk-7CLWC2UH.js} +26 -37
  140. package/node_modules/pi-lens/dist/{chunk-MOEWCPMC.js → chunk-7DPXUPRF.js} +2 -2
  141. package/node_modules/pi-lens/dist/{chunk-7BEADGAZ.js → chunk-7U36VQL6.js} +2 -2
  142. package/node_modules/pi-lens/dist/{chunk-PPYUBO6Y.js → chunk-7WKVCZI4.js} +1 -1
  143. package/node_modules/pi-lens/dist/{chunk-ILC2B7IJ.js → chunk-7ZVTFLCC.js} +10 -10
  144. package/node_modules/pi-lens/dist/{chunk-IT7MFVGP.js → chunk-ADYQRETD.js} +2 -2
  145. package/node_modules/pi-lens/dist/{chunk-NCDH2JB7.js → chunk-ARTYCUGF.js} +25 -10
  146. package/node_modules/pi-lens/dist/{chunk-Z6WTLVUL.js → chunk-AXAR5ZW2.js} +225 -104
  147. package/node_modules/pi-lens/dist/{chunk-PK3GDU4M.js → chunk-AZG5UJYY.js} +1 -1
  148. package/node_modules/pi-lens/dist/{chunk-NRVWLTOY.js → chunk-B2OXE4AH.js} +60 -21
  149. package/node_modules/pi-lens/dist/{chunk-ORYQGVC3.js → chunk-B42AIWPJ.js} +2 -2
  150. package/node_modules/pi-lens/dist/{chunk-IC4L65U7.js → chunk-BBSDJTOV.js} +12 -13
  151. package/node_modules/pi-lens/dist/{chunk-HJWF7CGW.js → chunk-BKWFDWYM.js} +16 -16
  152. package/node_modules/pi-lens/dist/{chunk-D2ZYRI7M.js → chunk-C5PLBTNR.js} +1 -1
  153. package/node_modules/pi-lens/dist/{chunk-SRXYSLMW.js → chunk-CQY2HEH7.js} +1 -1
  154. package/node_modules/pi-lens/dist/{chunk-7424ANRU.js → chunk-CXQYK4YT.js} +1 -1
  155. package/node_modules/pi-lens/dist/{chunk-HYR25MV3.js → chunk-CZJGAOKL.js} +8 -7
  156. package/node_modules/pi-lens/dist/{chunk-DIIDMDZU.js → chunk-DCA2MXVQ.js} +11 -11
  157. package/node_modules/pi-lens/dist/{chunk-K2LD6YNH.js → chunk-DFKOA74L.js} +9 -9
  158. package/node_modules/pi-lens/dist/{chunk-AYDE7RFV.js → chunk-DI4AZZNY.js} +2 -2
  159. package/node_modules/pi-lens/dist/{chunk-6EXGCXM5.js → chunk-G53LBDNU.js} +99 -5
  160. package/node_modules/pi-lens/dist/chunk-GCSDF5IE.js +27 -0
  161. package/node_modules/pi-lens/dist/{chunk-5KLRCUDT.js → chunk-H5API74E.js} +6 -6
  162. package/node_modules/pi-lens/dist/chunk-HBX55MWO.js +27 -0
  163. package/node_modules/pi-lens/dist/{chunk-JRSS6KM4.js → chunk-HIJ4CHFF.js} +2 -2
  164. package/node_modules/pi-lens/dist/{chunk-3MHY4BQY.js → chunk-HIRBC72R.js} +4 -4
  165. package/node_modules/pi-lens/dist/{chunk-F7AMFFVK.js → chunk-HRLF35WL.js} +8 -8
  166. package/node_modules/pi-lens/dist/{chunk-HSTN27NR.js → chunk-I2FYOZNW.js} +9 -9
  167. package/node_modules/pi-lens/dist/{chunk-5FDUKJZO.js → chunk-I3NZVAMN.js} +9 -9
  168. package/node_modules/pi-lens/dist/{chunk-NZINZCHB.js → chunk-INBK3HIT.js} +3 -3
  169. package/node_modules/pi-lens/dist/{chunk-PXGVB2CY.js → chunk-J2ZB5MDS.js} +20 -18
  170. package/node_modules/pi-lens/dist/{chunk-HYDJUVOE.js → chunk-JGUDT5KD.js} +4 -4
  171. package/node_modules/pi-lens/dist/chunk-JOIKBUQN.js +88 -0
  172. package/node_modules/pi-lens/dist/{chunk-AZXTLZHE.js → chunk-K4Z7MK6T.js} +169 -165
  173. package/node_modules/pi-lens/dist/{chunk-WTSQKJAR.js → chunk-K7O6AHSJ.js} +10 -10
  174. package/node_modules/pi-lens/dist/{chunk-S6ZQFPOX.js → chunk-KNJH6WJQ.js} +6 -6
  175. package/node_modules/pi-lens/dist/{chunk-SUIZOCSY.js → chunk-KNSOA43J.js} +1 -1
  176. package/node_modules/pi-lens/dist/{chunk-3QMLB4TI.js → chunk-KXGTLAUW.js} +2 -2
  177. package/node_modules/pi-lens/dist/{chunk-OHEUOWYT.js → chunk-KZ732ZVW.js} +1 -1
  178. package/node_modules/pi-lens/dist/{chunk-G3LR6V6N.js → chunk-L6BDRYUK.js} +19 -17
  179. package/node_modules/pi-lens/dist/{chunk-OVPR3GQ6.js → chunk-LGH2HHZG.js} +24 -6
  180. package/node_modules/pi-lens/dist/{chunk-3R3Z54J7.js → chunk-LOEJFTF2.js} +1 -1
  181. package/node_modules/pi-lens/dist/{chunk-HGEE5LDW.js → chunk-LQQNFCQJ.js} +1 -1
  182. package/node_modules/pi-lens/dist/chunk-LVLPA32Q.js +810 -0
  183. package/node_modules/pi-lens/dist/chunk-M2YMBT5G.js +73 -0
  184. package/node_modules/pi-lens/dist/{chunk-Z2W5YJBW.js → chunk-MJRGPEQ5.js} +11 -11
  185. package/node_modules/pi-lens/dist/{chunk-3EIZMRXI.js → chunk-MOAVEPC4.js} +10 -10
  186. package/node_modules/pi-lens/dist/{chunk-TOOXNL6M.js → chunk-NGNBJIUO.js} +7 -7
  187. package/node_modules/pi-lens/dist/{chunk-AGEQRJ5A.js → chunk-NHA5K226.js} +1 -1
  188. package/node_modules/pi-lens/dist/{chunk-YLW26OHX.js → chunk-NNEQOC3U.js} +31 -59
  189. package/node_modules/pi-lens/dist/{chunk-ZWZD4TJ5.js → chunk-O2MHF7QM.js} +35 -36
  190. package/node_modules/pi-lens/dist/{chunk-PTJXMYRY.js → chunk-OLWGYBYT.js} +15 -16
  191. package/node_modules/pi-lens/dist/{chunk-JKAVKTMY.js → chunk-OZQQ3AIR.js} +17 -20
  192. package/node_modules/pi-lens/dist/{chunk-6JLNZ6DP.js → chunk-P5MSLVUW.js} +10 -10
  193. package/node_modules/pi-lens/dist/{chunk-OF2YGDUE.js → chunk-PFJLYRO3.js} +37 -38
  194. package/node_modules/pi-lens/dist/chunk-PKWEBMCA.js +2957 -0
  195. package/node_modules/pi-lens/dist/{chunk-JLMS7EMD.js → chunk-PPQHMSPH.js} +16 -15
  196. package/node_modules/pi-lens/dist/{chunk-6EIV3H7O.js → chunk-PQF6YGYB.js} +12 -5
  197. package/node_modules/pi-lens/dist/{chunk-VU2PRGRI.js → chunk-PQXUZYTQ.js} +4 -4
  198. package/node_modules/pi-lens/dist/{chunk-MV6ST2KT.js → chunk-Q7J3JYJ2.js} +13 -12
  199. package/node_modules/pi-lens/dist/{chunk-BMMRLJA4.js → chunk-QE5DJ7MX.js} +27 -10
  200. package/node_modules/pi-lens/dist/{chunk-IZ36G463.js → chunk-QE7BJQ6K.js} +7 -7
  201. package/node_modules/pi-lens/dist/{chunk-E5SSUV2A.js → chunk-QMWKSYWB.js} +4 -4
  202. package/node_modules/pi-lens/dist/{chunk-QJ4T73J5.js → chunk-QV3JPCMK.js} +1 -1
  203. package/node_modules/pi-lens/dist/{chunk-3PMLYGJN.js → chunk-R4L7KZ7R.js} +5 -5
  204. package/node_modules/pi-lens/dist/{chunk-7ZVEFWOE.js → chunk-RIH3UBK4.js} +10 -10
  205. package/node_modules/pi-lens/dist/{chunk-T5EGSBM2.js → chunk-RJ3APNIP.js} +3 -3
  206. package/node_modules/pi-lens/dist/{chunk-AAIVSSUU.js → chunk-S6MCMD27.js} +35 -12
  207. package/node_modules/pi-lens/dist/{chunk-SF7KSXB5.js → chunk-SCU62JLX.js} +6 -6
  208. package/node_modules/pi-lens/dist/{chunk-FDLGJFAE.js → chunk-SDYLT45T.js} +3 -3
  209. package/node_modules/pi-lens/dist/chunk-TFKN5EIR.js +27 -0
  210. package/node_modules/pi-lens/dist/{chunk-Y7XMKBFP.js → chunk-TKOFTLGB.js} +34 -26
  211. package/node_modules/pi-lens/dist/chunk-TQWRH25U.js +35 -0
  212. package/node_modules/pi-lens/dist/{chunk-DZSQXG66.js → chunk-TWEOJE3D.js} +277 -62
  213. package/node_modules/pi-lens/dist/{chunk-R67WQ5RY.js → chunk-UN72ZAJ5.js} +8 -8
  214. package/node_modules/pi-lens/dist/{chunk-AD7JDEI6.js → chunk-UNP6Y4JV.js} +16 -16
  215. package/node_modules/pi-lens/dist/{chunk-D6ANA6YU.js → chunk-VGRGW4UL.js} +63 -55
  216. package/node_modules/pi-lens/dist/{chunk-DFAY7JUN.js → chunk-VSQT6IHZ.js} +2 -2
  217. package/node_modules/pi-lens/dist/{chunk-7T64QA5D.js → chunk-VWEBZ2JV.js} +39 -38
  218. package/node_modules/pi-lens/dist/{chunk-HRQTYU2T.js → chunk-W26QZ3OM.js} +1 -1
  219. package/node_modules/pi-lens/dist/{chunk-2HWVG3IM.js → chunk-XDNWR7SG.js} +2 -2
  220. package/node_modules/pi-lens/dist/{chunk-75TVYCQW.js → chunk-XSC3BCN3.js} +5 -5
  221. package/node_modules/pi-lens/dist/{chunk-ME6MF2N2.js → chunk-YCR6ZYTE.js} +1 -1
  222. package/node_modules/pi-lens/dist/{chunk-LD7SXICE.js → chunk-ZI7YHV6I.js} +5 -5
  223. package/node_modules/pi-lens/dist/{chunk-E3PNZDPH.js → chunk-ZQSSO7LO.js} +33 -1
  224. package/node_modules/pi-lens/dist/{chunk-T6PPK3T6.js → chunk-ZULZS2I6.js} +385 -407
  225. package/node_modules/pi-lens/dist/index.js +6508 -5413
  226. package/node_modules/pi-lens/dist/mcp/analyze-cli.js +9 -9
  227. package/node_modules/pi-lens/dist/mcp/cli.js +39 -38
  228. package/node_modules/pi-lens/dist/mcp/server.js +602 -345
  229. package/node_modules/pi-lens/dist/mcp/worker.js +57 -58
  230. package/node_modules/pi-lens/dist/probes/installer.js +19 -17
  231. package/node_modules/pi-lens/docs/architecture.md +113 -0
  232. package/node_modules/pi-lens/docs/ast-grep_rules_catalog.md +2 -2
  233. package/node_modules/pi-lens/docs/ci.md +18 -4
  234. package/node_modules/pi-lens/docs/defect-shapes.md +41 -3
  235. package/node_modules/pi-lens/docs/dependencies.md +10 -10
  236. package/node_modules/pi-lens/docs/features.md +3 -3
  237. package/node_modules/pi-lens/docs/invariants/dispatch-runners.md +13 -1
  238. package/node_modules/pi-lens/docs/invariants/lsp-trust-exec.md +19 -0
  239. package/node_modules/pi-lens/docs/language-coverage.md +39 -0
  240. package/node_modules/pi-lens/docs/lsp-capability-matrix.md +10 -4
  241. package/node_modules/pi-lens/docs/lsp-idle-eviction.md +1 -1
  242. package/node_modules/pi-lens/docs/pi-lens-fixer.md +4 -0
  243. package/node_modules/pi-lens/docs/pi-lens-merge-policy.md +1 -1
  244. package/node_modules/pi-lens/docs/pi-lens-reviewer.md +4 -5
  245. package/node_modules/pi-lens/docs/pi-lens-subagent.md +5 -2
  246. package/node_modules/pi-lens/docs/prose-standard.md +112 -0
  247. package/node_modules/pi-lens/docs/servercapabilities.md +1 -1
  248. package/node_modules/pi-lens/docs/usage.md +50 -0
  249. package/node_modules/pi-lens/package.json +1 -1
  250. package/node_modules/pi-lens/rules/ast-grep-rules/rule-tests/array-callback-return-js-test.yml +23 -0
  251. package/node_modules/pi-lens/rules/ast-grep-rules/rule-tests/array-callback-return-test.yml +23 -0
  252. package/node_modules/pi-lens/rules/ast-grep-rules/rule-tests/no-negation-in-equality-check-js-test.yml +8 -0
  253. package/node_modules/pi-lens/rules/ast-grep-rules/rule-tests/no-negation-in-equality-check-test.yml +8 -0
  254. package/node_modules/pi-lens/rules/ast-grep-rules/rule-tests/unchecked-throwing-call-js-test.yml +16 -0
  255. package/node_modules/pi-lens/rules/ast-grep-rules/rule-tests/unchecked-throwing-call-test.yml +16 -0
  256. package/node_modules/pi-lens/rules/ast-grep-rules/rules/array-callback-return-js.yml +8 -0
  257. package/node_modules/pi-lens/rules/ast-grep-rules/rules/array-callback-return.yml +8 -0
  258. package/node_modules/pi-lens/rules/ast-grep-rules/rules/no-negation-in-equality-check-js.yml +17 -5
  259. package/node_modules/pi-lens/rules/ast-grep-rules/rules/no-negation-in-equality-check.yml +17 -5
  260. package/node_modules/pi-lens/rules/ast-grep-rules/rules/unchecked-throwing-call-js.yml +8 -1
  261. package/node_modules/pi-lens/rules/ast-grep-rules/rules/unchecked-throwing-call.yml +8 -1
  262. package/node_modules/pi-lens/rules/tree-sitter-queries/typescript/ts-react-antipatterns.yml +8 -0
  263. package/node_modules/pi-web-access/CHANGELOG.md +29 -0
  264. package/node_modules/pi-web-access/README.md +35 -15
  265. package/node_modules/pi-web-access/anysearch.ts +7 -3
  266. package/node_modules/pi-web-access/autom.ts +196 -0
  267. package/node_modules/pi-web-access/cloro.ts +254 -0
  268. package/node_modules/pi-web-access/curator-page.ts +7 -1
  269. package/node_modules/pi-web-access/curator-server.ts +3 -0
  270. package/node_modules/pi-web-access/dist/index.js +12931 -12111
  271. package/node_modules/pi-web-access/dist/mcp-cli.js +1188 -416
  272. package/node_modules/pi-web-access/domain-filter-normalization.ts +30 -0
  273. package/node_modules/pi-web-access/duckduckgo-rate-limit.ts +144 -34
  274. package/node_modules/pi-web-access/duckduckgo.ts +11 -3
  275. package/node_modules/pi-web-access/extract.ts +60 -4
  276. package/node_modules/pi-web-access/gemini-search.ts +25 -5
  277. package/node_modules/pi-web-access/index.ts +9 -1
  278. package/node_modules/pi-web-access/package.json +2 -2
  279. package/node_modules/pi-web-access/page-query.ts +12 -3
  280. package/node_modules/pi-web-access/specstream.ts +276 -0
  281. package/node_modules/pi-web-access/tool-activation.ts +21 -6
  282. package/node_modules/pi-web-access/utils.ts +4 -0
  283. package/node_modules/pi-web-access/video-extract.ts +2 -2
  284. package/node_modules/pi-web-access/web-tool-core.ts +24 -5
  285. package/node_modules/pi-web-access/youtube-extract.ts +2 -2
  286. package/package.json +11 -8
  287. package/node_modules/pi-lens/dist/chunk-3VWEZ6H2.js +0 -72
  288. package/node_modules/pi-lens/dist/chunk-7KWI5UHL.js +0 -28
  289. package/node_modules/pi-lens/dist/chunk-7M64NTAK.js +0 -38
  290. package/node_modules/pi-lens/dist/chunk-BEIPWPVR.js +0 -1037
  291. package/node_modules/pi-lens/dist/chunk-D7OEGXDX.js +0 -2417
  292. package/node_modules/pi-lens/dist/chunk-KUDUKKQE.js +0 -89
  293. package/node_modules/pi-lens/dist/chunk-TM3A3K7T.js +0 -28
  294. package/node_modules/pi-lens/dist/chunk-VD7MQFEV.js +0 -56
  295. package/node_modules/pi-lens/dist/chunk-YLHJWAQS.js +0 -256
  296. package/node_modules/pi-lens/dist/chunk-YULIERZW.js +0 -27
@@ -3,7 +3,7 @@
3
3
  "target": "ES2022",
4
4
  "module": "ESNext",
5
5
  "moduleResolution": "Bundler",
6
- "lib": ["ES2022"],
6
+ "lib": ["ES2022", "DOM", "DOM.Iterable"],
7
7
  "strict": true,
8
8
  "skipLibCheck": true,
9
9
  "noEmit": true,
@@ -17,5 +17,5 @@
17
17
  "forceConsistentCasingInFileNames": true,
18
18
  "types": ["node"]
19
19
  },
20
- "include": ["src/**/*.ts"]
20
+ "include": ["src/**/*.ts", "scripts/test-web-fetch.ts", "scripts/test-reader-foundations.ts"]
21
21
  }
@@ -1,6 +1,26 @@
1
1
  # Changelog
2
2
 
3
- ## Unreleased
3
+ ## 0.8.4 - 2026-11-15
4
+
5
+ - Stop handing revoked or rotated API keys back on refresh. `refreshToken` used to return the stored key unchanged with a new ten-year expiry. On Oh My Pi, that let OMP keep selecting a dead `/login` credential over a valid one, and every request failed with `401 Invalid 'Authorization' header or token`. Refresh now checks the key against `whoami` first, and a `401` there fails the refresh with the message `401 invalid_token`. OMP forces a refresh after a `401`; when the refresh fails with that message, it signs the credential out and uses the next stored one. A network error or 5xx response from `whoami` fails the refresh with its own error, which OMP treats as temporary and does not sign out. pi refreshes only on expiry, so it runs the new check only then. ([#217](https://github.com/patlux/pi-commandcode-provider/pull/217))
6
+ - Refresh the capability snapshot to `command-code@1.89.1`: advertise image input, reasoning and selectable efforts for `claude-fable-5-2`, `google/gemini-4-carbon`, `meta/muse-ember` and `thinkingmachines/inkling-2-small:free`; raise Inkling 2 Small's output limit to 131,072 tokens; drop stale capability metadata for the retired `reflection/beam:free` and `stealth/crouton-alpha`. Public pricing checks pass for all 98 advertised models; prices and endpoint routing are unchanged. ([#218](https://github.com/patlux/pi-commandcode-provider/pull/218))
7
+
8
+ ### Contributors
9
+
10
+ - @mrshu — reported and fixed revoked-key refresh handling on Oh My Pi, preserved the host cancellation contract, and added regression tests ([#217](https://github.com/patlux/pi-commandcode-provider/pull/217)).
11
+ - @pierreraby — reviewed and validated the OAuth fix, refreshed the capability catalog with regression tests ([#218](https://github.com/patlux/pi-commandcode-provider/pull/218)), and prepared this release.
12
+
13
+ ## 0.8.3 - 2026-11-13
14
+
15
+ - Tag the Responses `system`/`developer` and `user` items with the item-level `type: "message"` the Provider API adapter requires for `zai-org/GLM-5.3`, which answered `400 invalid_request: input item is missing type` on the first turn. The rewrite is limited to the models known to need the verbose form, so every other model keeps the exact body the host sends. ([#214](https://github.com/patlux/pi-commandcode-provider/issues/214), [#215](https://github.com/patlux/pi-commandcode-provider/pull/215))
16
+ - Drop the inert `reasoning` block pi sends when thinking is off for `zai-org/GLM-5.3` and `mistral/mistral-large-4`, which reject `effort: "none"` with `unsupported output_config.effort` and `reasoning_effort none is not supported for this model`. Omitting the field succeeds; declaring `off: null` would clamp to the lowest allowed level and silently force reasoning on. The repair table is per-model and evidence-driven, so no other model's request body changes. ([#214](https://github.com/patlux/pi-commandcode-provider/issues/214), [#215](https://github.com/patlux/pi-commandcode-provider/pull/215))
17
+ - Add the live Provider API addition `thinkingmachines/inkling-2-small:free` to the reviewed pricing snapshot at zero cost, free while the free tier lasts with no fixed expiry published, and refresh the 98-model API and pricing snapshots to 2026-11-13. The model is already usable through the live `/provider/v1/models` response with a zero estimate and an unknown-price warning; static capability metadata stays at `command-code@1.88.5`, so it remains text-only without reasoning or effort flags until upstream ships it. ([#213](https://github.com/patlux/pi-commandcode-provider/pull/213))
18
+
19
+ ### Contributors
20
+
21
+ - @ThomasByr — reported the `zai-org/GLM-5.3` failures on the Responses endpoint with a minimal reproduction ([#214](https://github.com/patlux/pi-commandcode-provider/issues/214)).
22
+ - @sandexzx — refreshed the reviewed pricing snapshot for `thinkingmachines/inkling-2-small:free` ([#213](https://github.com/patlux/pi-commandcode-provider/pull/213)).
23
+ - @pierreraby — isolated and proved both wire causes against the live Provider API, swept all 74 `/responses` models to bound the blast radius, implemented the per-model repair table with tests, and prepared this release.
4
24
 
5
25
  ## 0.8.2 - 2026-11-11
6
26
 
@@ -51,7 +51,7 @@ Run `/login` in pi or OMP. Select **Use a subscription**, then **Command Code**.
51
51
 
52
52
  If automatic transfer from the browser fails, copy the API key shown by Command Code and paste it into the terminal prompt.
53
53
 
54
- On Oh My Pi, `/login` stores those credentials in OMP's credential store and chat uses them directly. If chat still returns `401 Invalid 'Authorization' header`, restart OMP after `/login` and confirm `/commandcode-quota` shows your account.
54
+ On Oh My Pi, `/login` stores those credentials in OMP's credential store and chat uses them directly. When the Provider API rejects a stored login with `401`, OMP asks the provider to refresh it, and the provider checks the key against `whoami`. If Command Code no longer accepts the key, OMP signs that login out with the warning "A Command Code account was signed out automatically" and uses the next stored credential. If chat still returns `401 Invalid 'Authorization' header`, run `/login` again, restart OMP, and confirm `/commandcode-quota` shows your account.
55
55
 
56
56
  ### Environment variable
57
57
 
@@ -180,7 +180,7 @@ The following environment variables are intended for tests, local mocks, and com
180
180
 
181
181
  ## Image input
182
182
 
183
- The provider advertises image input only for models marked with the `image` input modality in the official Command Code CLI model catalog. The capability snapshot currently follows `command-code@1.88.5`; unknown models default to text-only until their upstream metadata is reviewed. A daily GitHub Actions job synchronizes the CLI version, image capabilities, reasoning flags, reasoning efforts, and model-specific output limits with the latest published CLI package, also dropping manual effort overrides that upstream has published itself, and opens or updates a reviewable pull request when they change. Pricing remains manually reviewed because temporary promotions and long-context tiers require explicit review.
183
+ The provider advertises image input only for models marked with the `image` input modality in the official Command Code CLI model catalog. The capability snapshot currently follows `command-code@1.89.1`; unknown models default to text-only until their upstream metadata is reviewed. A daily GitHub Actions job synchronizes the CLI version, image capabilities, reasoning flags, reasoning efforts, and model-specific output limits with the latest published CLI package, also dropping manual effort overrides that upstream has published itself, and opens or updates a reviewable pull request when they change. Pricing remains manually reviewed because temporary promotions and long-context tiers require explicit review.
184
184
 
185
185
  For vision-capable models, Pi's native provider adapters forward image blocks from user messages and tool results using the documented OpenAI or Anthropic message schema. Unknown and text-only models remain marked text-only in Pi.
186
186
 
@@ -47,6 +47,7 @@ import { normalizeCommandCodeMessage } from "./src/overflow.ts"
47
47
  import { MODEL_COSTS, ZERO_MODEL_COST } from "./src/pricing.ts"
48
48
  import { registerCommandCodeQuota } from "./src/quota-command.ts"
49
49
  import { normalizeCommandCodeResponsesResponse } from "./src/responses-stream.ts"
50
+ import { withResponsesWireRepairs } from "./src/responses-compat.ts"
50
51
  import { createCommandCodeRuntime } from "./src/runtime.ts"
51
52
  import {
52
53
  compatForEndpoint,
@@ -360,7 +361,7 @@ export default async function (pi: ExtensionAPI) {
360
361
  fetch: async (...args: Parameters<typeof fetch>) => {
361
362
  streamWarning = undefined
362
363
  return normalizeCommandCodeResponsesResponse(
363
- await (resolvedOptions?.fetch ?? fetch)(...args),
364
+ await (resolvedOptions?.fetch ?? fetch)(...withResponsesWireRepairs(args)),
364
365
  (warning) => {
365
366
  streamWarning = warning
366
367
  },
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-commandcode-provider",
3
- "version": "0.8.2",
3
+ "version": "0.8.4",
4
4
  "description": "pi custom provider for Command Code API (commandcode.ai)",
5
5
  "type": "module",
6
6
  "keywords": [
@@ -29,7 +29,7 @@
29
29
  "LICENSE"
30
30
  ],
31
31
  "scripts": {
32
- "test": "npm run typecheck && npm run test:diagnostics && npm run test:routing && node --test tests/test-release.mjs tests/test-maintenance-alert.mjs tests/test-pi-child-cleanup.mjs tests/test-entrypoint-typecheck.mjs tests/test-host-protocol-helpers.mjs && tsx tests/test-package-manifest.ts && tsx tests/test-api-key.ts && tsx tests/test-pure-functions.ts && tsx tests/test-models.ts && tsx tests/test-model-metadata-check.ts && tsx tests/test-runtime.ts && tsx tests/test-pricing.ts && tsx tests/test-pricing-check.ts && tsx tests/test-cost.ts && tsx tests/test-oauth.ts && tsx tests/test-overflow.ts && tsx tests/test-quota.ts && tsx tests/test-quota-command.ts && tsx tests/test-usage.ts && tsx tests/test-transport.ts && node tests/test-pi-isolated.mjs && node tests/test-pi-authenticated.mjs && node tests/test-pi-local.mjs && node tests/test-omp-compat.mjs && node tests/test-host-protocols.mjs && node tests/test-endpoint-routing.mjs",
32
+ "test": "npm run typecheck && npm run test:diagnostics && npm run test:routing && node --test tests/test-release.mjs tests/test-maintenance-alert.mjs tests/test-pi-child-cleanup.mjs tests/test-entrypoint-typecheck.mjs tests/test-host-protocol-helpers.mjs && tsx tests/test-package-manifest.ts && tsx tests/test-api-key.ts && tsx tests/test-pure-functions.ts && tsx tests/test-models.ts && tsx tests/test-model-metadata-check.ts && tsx tests/test-runtime.ts && tsx tests/test-pricing.ts && tsx tests/test-pricing-check.ts && tsx tests/test-cost.ts && tsx tests/test-oauth.ts && tsx tests/test-overflow.ts && tsx tests/test-quota.ts && tsx tests/test-quota-command.ts && tsx tests/test-usage.ts && tsx tests/test-transport.ts && tsx tests/test-responses-compat.ts && node tests/test-pi-isolated.mjs && node tests/test-pi-authenticated.mjs && node tests/test-pi-local.mjs && node tests/test-omp-compat.mjs && node tests/test-host-protocols.mjs && node tests/test-endpoint-routing.mjs",
33
33
  "typecheck": "tsc --noEmit",
34
34
  "typecheck:entrypoint": "node scripts/typecheck-entrypoint.mjs",
35
35
  "format:check": "prettier --check '**/*.{ts,mjs,json,md}'",
@@ -41,7 +41,7 @@
41
41
  "sync:commandcode-catalog": "tsx .github/scripts/check-commandcode-model-metadata.ts command-code@latest --write",
42
42
  "test:quota": "tsx tests/test-quota.ts && tsx tests/test-quota-command.ts && tsx tests/test-usage.ts",
43
43
  "test:usage": "tsx tests/test-usage.ts",
44
- "test:unit": "npm run test:diagnostics && npm run test:routing && tsx tests/test-api-key.ts && tsx tests/test-pure-functions.ts && tsx tests/test-models.ts && tsx tests/test-model-metadata-check.ts && tsx tests/test-runtime.ts && tsx tests/test-pricing.ts && tsx tests/test-pricing-check.ts && tsx tests/test-cost.ts && tsx tests/test-oauth.ts && tsx tests/test-overflow.ts && tsx tests/test-quota.ts && tsx tests/test-quota-command.ts && tsx tests/test-usage.ts && tsx tests/test-transport.ts",
44
+ "test:unit": "npm run test:diagnostics && npm run test:routing && tsx tests/test-api-key.ts && tsx tests/test-pure-functions.ts && tsx tests/test-models.ts && tsx tests/test-model-metadata-check.ts && tsx tests/test-runtime.ts && tsx tests/test-pricing.ts && tsx tests/test-pricing-check.ts && tsx tests/test-cost.ts && tsx tests/test-oauth.ts && tsx tests/test-overflow.ts && tsx tests/test-quota.ts && tsx tests/test-quota-command.ts && tsx tests/test-usage.ts && tsx tests/test-transport.ts && tsx tests/test-responses-compat.ts",
45
45
  "test:api-key": "tsx tests/test-api-key.ts",
46
46
  "test:models": "tsx tests/test-models.ts && tsx tests/test-model-metadata-check.ts",
47
47
  "test:diagnostics": "tsx tests/test-diagnostics.ts",
@@ -64,7 +64,8 @@
64
64
  "test:e2e:live:goat": "node scripts/live-e2e-profile.mjs goat",
65
65
  "test:e2e:live:provider": "node scripts/live-e2e-profile.mjs provider",
66
66
  "test:e2e:live:all": "node scripts/live-e2e-profile.mjs goat provider",
67
- "test:cost": "tsx tests/test-cost.ts"
67
+ "test:cost": "tsx tests/test-cost.ts",
68
+ "test:responses-compat": "tsx tests/test-responses-compat.ts"
68
69
  },
69
70
  "pi": {
70
71
  "extensions": [
@@ -1,4 +1,4 @@
1
- export const COMMAND_CODE_CLI_VERSION = "1.88.5"
1
+ export const COMMAND_CODE_CLI_VERSION = "1.89.1"
2
2
 
3
3
  export type CommandCodeInputType = "text" | "image"
4
4
  export type CommandCodeReasoningEffort =
@@ -11,12 +11,13 @@ export type CommandCodeReasoningEffort =
11
11
  | "max"
12
12
 
13
13
  /**
14
- * Generated from command-code@1.88.5 by `npm run sync:commandcode-catalog`.
14
+ * Generated from command-code@1.89.1 by `npm run sync:commandcode-catalog`.
15
15
  * Do not edit manually.
16
16
  */
17
17
  export const MODEL_INPUT_MODALITIES: Readonly<Record<string, readonly CommandCodeInputType[]>> = {
18
18
  "claude-fable-5": ["text", "image"],
19
19
  "claude-fable-5-1": ["text", "image"],
20
+ "claude-fable-5-2": ["text", "image"],
20
21
  "claude-haiku-4-5-20251001": ["text", "image"],
21
22
  "claude-haiku-5-5": ["text", "image"],
22
23
  "claude-opus-4-7": ["text", "image"],
@@ -37,6 +38,7 @@ export const MODEL_INPUT_MODALITIES: Readonly<Record<string, readonly CommandCod
37
38
  "google/gemini-3.7-flash": ["text", "image"],
38
39
  "google/gemini-3.8-flash": ["text", "image"],
39
40
  "google/gemini-4-argon": ["text", "image"],
41
+ "google/gemini-4-carbon": ["text", "image"],
40
42
  "gpt-5.3-codex": ["text", "image"],
41
43
  "gpt-5.4": ["text", "image"],
42
44
  "gpt-5.4-mini": ["text", "image"],
@@ -49,6 +51,7 @@ export const MODEL_INPUT_MODALITIES: Readonly<Record<string, readonly CommandCod
49
51
  "gpt-6-sol": ["text", "image"],
50
52
  "gpt-6.1-sol": ["text", "image"],
51
53
  "gpt-6.1-terra": ["text", "image"],
54
+ "meta/muse-ember": ["text", "image"],
52
55
  "meta/muse-spark-1.1": ["text", "image"],
53
56
  "meta/muse-spark-1.2": ["text", "image"],
54
57
  "meta/muse-spark-1.2-contributor": ["text", "image"],
@@ -77,10 +80,10 @@ export const MODEL_INPUT_MODALITIES: Readonly<Record<string, readonly CommandCod
77
80
  "Qwen/Qwen3.8-Max-Prime": ["text", "image"],
78
81
  "Qwen/Qwen3.8-Omni-Flash": ["text", "image"],
79
82
  "sakana/fugu-ultra": ["text", "image"],
80
- "stealth/crouton-alpha": ["text", "image"],
81
83
  "stepfun/Step-3.7-Flash": ["text", "image"],
82
84
  "stepfun/Step-5-Preview": ["text", "image"],
83
85
  "thinkingmachines/inkling": ["text", "image"],
86
+ "thinkingmachines/inkling-2-small:free": ["text", "image"],
84
87
  "thinkingmachines/inkling-small": ["text", "image"],
85
88
  "xai/grok-4.5": ["text", "image"],
86
89
  "xai/grok-4.6": ["text", "image"],
@@ -95,6 +98,7 @@ export const MODEL_INPUT_MODALITIES: Readonly<Record<string, readonly CommandCod
95
98
  export const MODEL_REASONING: Readonly<Record<string, true>> = {
96
99
  "claude-fable-5": true,
97
100
  "claude-fable-5-1": true,
101
+ "claude-fable-5-2": true,
98
102
  "claude-haiku-5-5": true,
99
103
  "claude-opus-4-7": true,
100
104
  "claude-opus-4-8": true,
@@ -117,6 +121,7 @@ export const MODEL_REASONING: Readonly<Record<string, true>> = {
117
121
  "google/gemini-3.7-flash": true,
118
122
  "google/gemini-3.8-flash": true,
119
123
  "google/gemini-4-argon": true,
124
+ "google/gemini-4-carbon": true,
120
125
  "gpt-5.3-codex": true,
121
126
  "gpt-5.4": true,
122
127
  "gpt-5.4-mini": true,
@@ -132,6 +137,7 @@ export const MODEL_REASONING: Readonly<Record<string, true>> = {
132
137
  "inclusionai/ling-3.1-flash": true,
133
138
  "inclusionai/ling-3.1-flash-1019": true,
134
139
  "meituan/LongCat-2.0": true,
140
+ "meta/muse-ember": true,
135
141
  "meta/muse-spark-1.1": true,
136
142
  "meta/muse-spark-1.2": true,
137
143
  "meta/muse-spark-1.2-contributor": true,
@@ -160,9 +166,7 @@ export const MODEL_REASONING: Readonly<Record<string, true>> = {
160
166
  "Qwen/Qwen3.8-Max-0902": true,
161
167
  "Qwen/Qwen3.8-Max-Prime": true,
162
168
  "Qwen/Qwen3.8-Omni-Flash": true,
163
- "reflection/beam:free": true,
164
169
  "sakana/fugu-ultra": true,
165
- "stealth/crouton-alpha": true,
166
170
  "stealth/glyph-cluster:free": true,
167
171
  "stepfun/Step-3.5-Flash": true,
168
172
  "stepfun/Step-3.7-Flash": true,
@@ -170,6 +174,7 @@ export const MODEL_REASONING: Readonly<Record<string, true>> = {
170
174
  "tencent/hy3-paid": true,
171
175
  "tencent/hy4-preview": true,
172
176
  "thinkingmachines/inkling": true,
177
+ "thinkingmachines/inkling-2-small:free": true,
173
178
  "thinkingmachines/inkling-small": true,
174
179
  "xai/grok-4.5": true,
175
180
  "xai/grok-4.6": true,
@@ -183,6 +188,7 @@ export const MODEL_REASONING: Readonly<Record<string, true>> = {
183
188
  export const MODEL_EFFORTS: Readonly<Record<string, readonly CommandCodeReasoningEffort[]>> = {
184
189
  "claude-fable-5": ["low", "medium", "high", "xhigh", "max"],
185
190
  "claude-fable-5-1": ["low", "medium", "high", "xhigh", "max"],
191
+ "claude-fable-5-2": ["low", "medium", "high", "xhigh", "max"],
186
192
  "claude-haiku-5-5": ["low", "medium", "high", "xhigh", "max"],
187
193
  "claude-opus-4-7": ["low", "medium", "high", "xhigh", "max"],
188
194
  "claude-opus-4-8": ["low", "medium", "high", "xhigh", "max"],
@@ -205,6 +211,7 @@ export const MODEL_EFFORTS: Readonly<Record<string, readonly CommandCodeReasonin
205
211
  "google/gemini-3.7-flash": ["low", "medium", "high"],
206
212
  "google/gemini-3.8-flash": ["low", "medium", "high"],
207
213
  "google/gemini-4-argon": ["low", "medium", "high"],
214
+ "google/gemini-4-carbon": ["low", "medium", "high"],
208
215
  "gpt-5.3-codex": ["low", "medium", "high", "xhigh"],
209
216
  "gpt-5.4": ["low", "medium", "high", "xhigh"],
210
217
  "gpt-5.4-mini": ["low", "medium", "high"],
@@ -219,6 +226,7 @@ export const MODEL_EFFORTS: Readonly<Record<string, readonly CommandCodeReasonin
219
226
  "gpt-6.1-terra": ["low", "medium", "high", "xhigh", "max"],
220
227
  "inclusionai/ling-3.1-flash": ["low", "medium", "high"],
221
228
  "inclusionai/ling-3.1-flash-1019": ["low", "medium", "high"],
229
+ "meta/muse-ember": ["low", "medium", "high", "xhigh", "max"],
222
230
  "meta/muse-spark-1.1": ["low", "medium", "high", "xhigh"],
223
231
  "meta/muse-spark-1.2": ["low", "medium", "high", "xhigh"],
224
232
  "meta/muse-spark-1.2-contributor": ["low", "medium", "high", "xhigh"],
@@ -238,12 +246,11 @@ export const MODEL_EFFORTS: Readonly<Record<string, readonly CommandCodeReasonin
238
246
  "Qwen/Qwen3.8-Max-0902": ["low", "medium", "xhigh"],
239
247
  "Qwen/Qwen3.8-Max-Prime": ["low", "medium", "xhigh"],
240
248
  "Qwen/Qwen3.8-Omni-Flash": ["low", "medium", "xhigh"],
241
- "reflection/beam:free": ["low", "medium", "high", "xhigh", "max"],
242
249
  "sakana/fugu-ultra": ["high", "xhigh"],
243
- "stealth/crouton-alpha": ["low", "medium", "high", "xhigh", "max"],
244
250
  "stealth/glyph-cluster:free": ["low", "medium", "high", "xhigh"],
245
251
  "stepfun/Step-5-Preview": ["low", "medium", "high"],
246
252
  "tencent/hy4-preview": ["low", "medium", "high"],
253
+ "thinkingmachines/inkling-2-small:free": ["low", "medium", "high", "max"],
247
254
  "xai/grok-4.5": ["low", "medium", "high"],
248
255
  "xai/grok-4.6": ["low", "medium", "high", "xhigh"],
249
256
  "xai/grok-4.7": ["low", "medium", "high", "xhigh"],
@@ -260,9 +267,8 @@ export const MODEL_MAX_OUTPUT_TOKENS: Readonly<Record<string, number>> = {
260
267
  "Qwen/Qwen3.8-27B": 32_768,
261
268
  "Qwen/Qwen3.8-Max-Prime": 131_072,
262
269
  "Qwen/Qwen3.8-Omni-Flash": 131_072,
263
- "reflection/beam:free": 131_072,
264
- "stealth/crouton-alpha": 943_718,
265
270
  "stealth/glyph-cluster:free": 256_000,
271
+ "thinkingmachines/inkling-2-small:free": 131_072,
266
272
  "z-ai/glm-5.3-flash": 131_072,
267
273
  "z-ai/glm-5.3-flashx": 131_072,
268
274
  }
@@ -108,34 +108,69 @@ export function validationApiBase(env: NodeJS.ProcessEnv = process.env): string
108
108
  return providerApiBase.replace(/\/provider\/v1\/?$/, "")
109
109
  }
110
110
 
111
+ /** Thrown when `whoami` answers `401`: Command Code does not accept the key. */
112
+ export class InvalidApiKeyError extends Error {
113
+ constructor() {
114
+ super("Invalid Command Code API key")
115
+ this.name = "InvalidApiKeyError"
116
+ }
117
+ }
118
+
119
+ export type ValidateApiKeyOptions = {
120
+ fetchImpl?: typeof fetch
121
+ apiBase?: string
122
+ timeoutMs?: number
123
+ /** Caller cancellation, e.g. the host's refresh signal. */
124
+ signal?: AbortSignal
125
+ }
126
+
111
127
  export async function validateApiKey(
112
128
  apiKey: string,
113
- options: { fetchImpl?: typeof fetch; apiBase?: string; timeoutMs?: number } = {},
129
+ options: ValidateApiKeyOptions = {},
114
130
  ): Promise<void> {
115
131
  const timeoutMs = options.timeoutMs ?? VALIDATE_API_KEY_TIMEOUT_MS
116
132
  // AbortSignal is cooperative: a custom fetch may ignore it, so the deadline
117
- // also races the request. /login must never hang on a stalled whoami.
133
+ // and caller cancellation also race the request. /login must never hang on
134
+ // a stalled whoami.
118
135
  const controller = new AbortController()
119
136
  let rejectDeadline: ((error: Error) => void) | undefined
120
137
  const deadline = new Promise<never>((_resolve, reject) => {
121
138
  rejectDeadline = reject
122
139
  })
123
- const timer = setTimeout(() => {
124
- const error = new Error(
125
- `Could not validate the Command Code API key: request timed out after ${timeoutMs}ms`,
126
- )
140
+ const stop = (error: Error) => {
127
141
  controller.abort(error)
128
142
  rejectDeadline?.(error)
129
- }, timeoutMs)
143
+ }
144
+ const timer = setTimeout(
145
+ () =>
146
+ stop(
147
+ new Error(
148
+ `Could not validate the Command Code API key: request timed out after ${timeoutMs}ms`,
149
+ ),
150
+ ),
151
+ timeoutMs,
152
+ )
153
+ const onAbort = () => {
154
+ const reason = options.signal?.reason
155
+ stop(
156
+ reason instanceof Error
157
+ ? reason
158
+ : new Error("Could not validate the Command Code API key: request was aborted"),
159
+ )
160
+ }
161
+ if (options.signal?.aborted) onAbort()
162
+ else options.signal?.addEventListener("abort", onAbort, { once: true })
130
163
 
131
164
  let response: Response
132
165
  try {
166
+ // `deadline` goes first so an already-aborted signal wins over a fetch
167
+ // that settles immediately.
133
168
  response = await Promise.race([
169
+ deadline,
134
170
  (options.fetchImpl ?? fetch)(`${options.apiBase ?? validationApiBase()}/alpha/whoami`, {
135
171
  headers: { Authorization: `Bearer ${apiKey}` },
136
172
  signal: controller.signal,
137
173
  }),
138
- deadline,
139
174
  ])
140
175
  } catch (error) {
141
176
  if (controller.signal.aborted && controller.signal.reason instanceof Error) {
@@ -146,9 +181,10 @@ export async function validateApiKey(
146
181
  )
147
182
  } finally {
148
183
  clearTimeout(timer)
184
+ options.signal?.removeEventListener("abort", onAbort)
149
185
  }
150
186
 
151
- if (response.status === 401) throw new Error("Invalid Command Code API key")
187
+ if (response.status === 401) throw new InvalidApiKeyError()
152
188
  if (!response.ok) {
153
189
  throw new Error(`Could not validate the Command Code API key (${response.status})`)
154
190
  }
@@ -248,10 +284,31 @@ export async function login(callbacks: OAuthLoginCallbacks): Promise<OAuthCreden
248
284
  }
249
285
 
250
286
  /**
251
- * Command Code API keys don't expire, so "refresh" is a no-op.
252
- * Returns the same credentials with an updated far-future expiry.
287
+ * Command Code API keys don't expire, so a successful refresh returns the
288
+ * same key with a new expiry date far in the future. pi refreshes on expiry,
289
+ * and Oh My Pi also forces a refresh after the Provider API answers `401`.
290
+ * Refresh therefore checks the key against `whoami` first, so that a revoked
291
+ * or rotated key fails the refresh instead of coming back with a new expiry.
292
+ * The error message contains `401` and `invalid_token`, which Oh My Pi matches
293
+ * to sign out the stored credential. Network errors, 5xx responses and
294
+ * cancellation through the host's `signal` are rethrown unchanged and do not
295
+ * contain either. `options` exists for tests; hosts pass only the signal.
253
296
  */
254
- export async function refreshToken(credentials: OAuthCredentials): Promise<OAuthCredentials> {
297
+ export async function refreshToken(
298
+ credentials: OAuthCredentials,
299
+ signal?: AbortSignal,
300
+ options: Omit<ValidateApiKeyOptions, "signal"> = {},
301
+ ): Promise<OAuthCredentials> {
302
+ try {
303
+ await validateApiKey(credentials.refresh, { ...options, signal })
304
+ } catch (error) {
305
+ if (error instanceof InvalidApiKeyError) {
306
+ throw new Error(
307
+ "Command Code rejected the stored API key (401 invalid_token); run /login again",
308
+ )
309
+ }
310
+ throw error
311
+ }
255
312
  return credentialsFromApiKey(credentials.refresh)
256
313
  }
257
314
 
@@ -20,7 +20,7 @@ export interface TemporaryPricing {
20
20
  }
21
21
 
22
22
  export const PRICING_SOURCE_URL = "https://commandcode.ai/docs/resources/pricing-limits"
23
- export const PRICING_LAST_VERIFIED = "2026-11-11"
23
+ export const PRICING_LAST_VERIFIED = "2026-11-13"
24
24
 
25
25
  export const ZERO_MODEL_COST: CommandCodeModelCost = {
26
26
  input: 0,
@@ -41,6 +41,13 @@ export const MODEL_COSTS: Readonly<Record<string, CommandCodeModelCost>> = {
41
41
  // Free models
42
42
  // Free while the stealth preview lasts; no fixed expiry is published.
43
43
  "stealth/glyph-cluster:free": { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 },
44
+ // Free while the free tier lasts; no fixed expiry is published.
45
+ "thinkingmachines/inkling-2-small:free": {
46
+ input: 0,
47
+ output: 0,
48
+ cacheRead: 0,
49
+ cacheWrite: 0,
50
+ },
44
51
 
45
52
  // Open and open-weight models
46
53
  "inclusionai/ling-3.1-flash-1019": { input: 0.3, output: 0.9, cacheRead: 0.06, cacheWrite: 0 },
@@ -0,0 +1,137 @@
1
+ /**
2
+ * Repairs two Provider API wire quirks the host encoder cannot express.
3
+ *
4
+ * ## 1. Untagged message items
5
+ *
6
+ * pi-ai tags only non-message items (`type: "message"` for assistant text,
7
+ * `function_call`, `function_call_output`, `reasoning`, ...). The leading
8
+ * `system`/`developer` item and every `user` item go out as a bare
9
+ * `{ role, content }` pair. OpenAI accepts that shorthand, but the adapter in
10
+ * front of some models rejects the whole request with
11
+ * `400 invalid_request: input item is missing type` (issue #214,
12
+ * `zai-org/GLM-5.3`). A sweep of all 74 `/responses` models with a minimal text
13
+ * request showed GLM-5.3 is the only one refusing the shorthand, so the rewrite
14
+ * is allowlisted rather than applied to every backend.
15
+ *
16
+ * ## 2. `reasoning.effort: "none"`
17
+ *
18
+ * When thinking is off, pi-ai emits `reasoning: { effort: "none" }` (it reads
19
+ * the level from `thinkingLevelMap`, which has no `off` entry). Some models
20
+ * reject that value — `zai-org/GLM-5.3` with
21
+ * `unsupported output_config.effort: none`, `mistral/mistral-large-4` with
22
+ * `reasoning_effort none is not supported for this model` — while omitting the
23
+ * `reasoning` field entirely succeeds. Declaring `off: null` in
24
+ * `thinkingLevelMap` is not a fix: pi then clamps to the lowest allowed level and
25
+ * sends `effort: "low"`, silently forcing reasoning on. So the field is dropped
26
+ * here instead.
27
+ *
28
+ * Both transforms are no-ops for every other model, for invalid JSON, and for
29
+ * bodies whose shape is not the expected object, because a malformed rewrite
30
+ * would turn a model-specific 400 into a failure for every backend.
31
+ */
32
+
33
+ /** Model ID -> repairs to apply. Keep it evidence-driven and short. */
34
+ export interface ResponsesWireRepair {
35
+ /** Needs an explicit `type: "message"` on role-carrying input items. */
36
+ messageItemType?: boolean
37
+ /** Rejects `reasoning.effort: "none"`; the field is dropped in that case. */
38
+ dropNoneEffort?: boolean
39
+ }
40
+
41
+ /**
42
+ * Per-model repairs. An entry is only added once a live request shows the
43
+ * failure, because none of this is verifiable from the test suite alone.
44
+ */
45
+ export const RESPONSES_WIRE_REPAIRS: Readonly<Record<string, ResponsesWireRepair>> = {
46
+ "zai-org/GLM-5.3": { messageItemType: true, dropNoneEffort: true },
47
+ "mistral/mistral-large-4": { dropNoneEffort: true },
48
+ }
49
+
50
+ /** Roles that carry an item-level `message` type in the Responses schema. */
51
+ const MESSAGE_ROLES: ReadonlySet<string> = new Set(["system", "developer", "user", "assistant"])
52
+
53
+ function isRecord(value: unknown): value is Record<string, unknown> {
54
+ return typeof value === "object" && value !== null && !Array.isArray(value)
55
+ }
56
+
57
+ /** Tags every role-carrying input item that has no `type` yet. */
58
+ function tagMessageItems(body: Record<string, unknown>): boolean {
59
+ if (!Array.isArray(body.input)) return false
60
+ let changed = false
61
+ body.input = body.input.map((item) => {
62
+ if (!isRecord(item) || "type" in item) return item
63
+ if (typeof item.role !== "string" || !MESSAGE_ROLES.has(item.role)) return item
64
+ if (item.content === undefined) return item
65
+ changed = true
66
+ return { type: "message", ...item }
67
+ })
68
+ return changed
69
+ }
70
+
71
+ /** Returns a copy without `reasoning` when the block only says `effort: "none"`. */
72
+ function withoutInertReasoning(body: Record<string, unknown>): Record<string, unknown> | undefined {
73
+ const reasoning = body.reasoning
74
+ if (!isRecord(reasoning)) return undefined
75
+ if (Object.keys(reasoning).length !== 1 || reasoning.effort !== "none") return undefined
76
+ const { reasoning: _dropped, ...rest } = body
77
+ return rest
78
+ }
79
+
80
+ /**
81
+ * Applies the repairs for `model`.
82
+ *
83
+ * Returns the original string when nothing changed, so callers can hand the
84
+ * exact bytes through instead of a re-serialized copy.
85
+ */
86
+ export function rewriteResponsesBody(
87
+ body: string,
88
+ repairs: Readonly<Record<string, ResponsesWireRepair>> = RESPONSES_WIRE_REPAIRS,
89
+ ): string {
90
+ let parsed: unknown
91
+ try {
92
+ parsed = JSON.parse(body)
93
+ } catch {
94
+ return body
95
+ }
96
+ if (!isRecord(parsed)) return body
97
+ const model = parsed.model
98
+ if (typeof model !== "string" || !Object.hasOwn(repairs, model)) return body
99
+ const repair = repairs[model]
100
+ if (repair.messageItemType !== true && repair.dropNoneEffort !== true) return body
101
+ // Work on copies so a no-op repair never mutates the parsed object.
102
+ let next: Record<string, unknown> = parsed
103
+ let changed = false
104
+ if (repair.messageItemType === true) {
105
+ const tagged = { ...next }
106
+ if (tagMessageItems(tagged)) {
107
+ next = tagged
108
+ changed = true
109
+ }
110
+ }
111
+ if (repair.dropNoneEffort === true) {
112
+ const pruned = withoutInertReasoning(next)
113
+ if (pruned !== undefined) {
114
+ next = pruned
115
+ changed = true
116
+ }
117
+ }
118
+ return changed ? JSON.stringify(next) : body
119
+ }
120
+
121
+ /**
122
+ * Applies {@link rewriteResponsesBody} to the arguments the host passes to
123
+ * `fetch`. Decoded bodies and `Request` objects pass through untouched, and the
124
+ * stale `content-length` is dropped so the transport recomputes it.
125
+ */
126
+ export function withResponsesWireRepairs(
127
+ args: Parameters<typeof fetch>,
128
+ repairs: Readonly<Record<string, ResponsesWireRepair>> = RESPONSES_WIRE_REPAIRS,
129
+ ): Parameters<typeof fetch> {
130
+ const [input, init] = args
131
+ if (typeof init?.body !== "string") return args
132
+ const body = rewriteResponsesBody(init.body, repairs)
133
+ if (body === init.body) return args
134
+ const headers = new Headers(init.headers)
135
+ headers.delete("content-length")
136
+ return [input, { ...init, body, headers }]
137
+ }
@@ -1,5 +1,11 @@
1
1
  # User changelog
2
2
 
3
+ ## [4.5.0] - 2026-11-14
4
+
5
+ 31 fixes, 2 other changes.
6
+
7
+ Full notes: https://github.com/apmantza/pi-lens/releases/tag/v4.5.0
8
+
3
9
  ## [4.4.12] - 2026-11-10
4
10
 
5
11
  1 feature, 2 fixes.
@@ -23,9 +29,3 @@ Full notes: https://github.com/apmantza/pi-lens/releases/tag/v4.4.10
23
29
  3 features, 29 fixes, 8 other changes.
24
30
 
25
31
  Full notes: https://github.com/apmantza/pi-lens/releases/tag/v4.4.9
26
-
27
- ## [4.4.8] - 2026-11-01
28
-
29
- 1 feature, 28 fixes, 6 other changes.
30
-
31
- Full notes: https://github.com/apmantza/pi-lens/releases/tag/v4.4.8