@herbertgao/pi-extensions 2026.8.14 → 2026.9.0

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 (270) hide show
  1. package/README.md +19 -13
  2. package/THIRD_PARTY_NOTICES.md +26 -1
  3. package/node_modules/@czottmann/pi-automode/CHANGELOG.md +8 -1
  4. package/node_modules/@czottmann/pi-automode/README.md +4 -0
  5. package/node_modules/@czottmann/pi-automode/extensions/auto-mode/classifier.ts +71 -9
  6. package/node_modules/@czottmann/pi-automode/package.json +1 -1
  7. package/node_modules/@herbertgao/pi-bark/LICENSE +21 -0
  8. package/node_modules/@herbertgao/pi-bark/README.md +44 -0
  9. package/node_modules/@herbertgao/pi-bark/assets/pi-icon.png +0 -0
  10. package/node_modules/@herbertgao/pi-bark/package.json +53 -0
  11. package/node_modules/@herbertgao/pi-bark/src/index.ts +178 -0
  12. package/node_modules/@herbertgao/pi-cc-extensions/extensions/config/config.ts +20 -0
  13. package/node_modules/@herbertgao/pi-cc-extensions/extensions/config/panel.ts +46 -3
  14. package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/mouse/interaction.ts +55 -17
  15. package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/mouse/packets.ts +6 -0
  16. package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/mouse/scroll.ts +5 -0
  17. package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/result.ts +34 -30
  18. package/node_modules/@herbertgao/pi-cc-extensions/package.json +3 -3
  19. package/node_modules/@juicesharp/rpiv-ask-user-question/package.json +2 -2
  20. package/node_modules/@narumitw/pi-btw/README.md +129 -88
  21. package/node_modules/@narumitw/pi-btw/dist/index.ts +283 -59
  22. package/node_modules/@narumitw/pi-btw/dist/index.ts.map +3 -3
  23. package/node_modules/@narumitw/pi-btw/package.json +5 -8
  24. package/node_modules/@narumitw/pi-btw/src/btw.ts +31 -26
  25. package/node_modules/@narumitw/pi-btw/src/fullscreen-ui.ts +264 -24
  26. package/node_modules/@narumitw/pi-btw/src/menu.ts +34 -2
  27. package/node_modules/@narumitw/pi-btw/src/settings.ts +16 -0
  28. package/node_modules/@narumitw/pi-btw/src/text.ts +18 -0
  29. package/node_modules/@narumitw/pi-btw/src/transcript-pager.ts +5 -16
  30. package/node_modules/@narumitw/pi-caffeinate/LICENSE +21 -0
  31. package/node_modules/@narumitw/pi-caffeinate/README.md +224 -0
  32. package/node_modules/@narumitw/pi-caffeinate/dist/index.ts +1112 -0
  33. package/node_modules/@narumitw/pi-caffeinate/dist/index.ts.map +7 -0
  34. package/node_modules/@narumitw/pi-caffeinate/package.json +53 -0
  35. package/node_modules/@narumitw/pi-caffeinate/src/caffeinate.ts +811 -0
  36. package/node_modules/@narumitw/pi-caffeinate/src/dbus-inhibit.ts +153 -0
  37. package/node_modules/@narumitw/pi-caffeinate/src/index.ts +1 -0
  38. package/node_modules/@narumitw/pi-caffeinate/src/inhibitor-process.ts +43 -0
  39. package/node_modules/@narumitw/pi-caffeinate/src/inhibitors.ts +167 -0
  40. package/node_modules/@narumitw/pi-caffeinate/src/settings.ts +202 -0
  41. package/node_modules/@tifan/pi-handoff/README.md +39 -13
  42. package/node_modules/@tifan/pi-handoff/package.json +2 -2
  43. package/node_modules/@tifan/pi-handoff/src/index.ts +166 -5
  44. package/node_modules/@tifan/pi-recap/README.md +1 -1
  45. package/node_modules/@tifan/pi-recap/package.json +2 -2
  46. package/node_modules/@tifan/pi-recap/src/index.ts +15 -0
  47. package/node_modules/@tifan/pi-rename/README.md +42 -21
  48. package/node_modules/@tifan/pi-rename/package.json +1 -1
  49. package/node_modules/@tifan/pi-rename/src/index.ts +62 -11
  50. package/node_modules/@tifan/pi-rename/src/language.ts +18 -0
  51. package/node_modules/@tifan/pi-rename/src/models.ts +69 -13
  52. package/node_modules/@tifan/pi-rename/src/naming.ts +36 -7
  53. package/node_modules/@tifan/pi-rename/src/sanitize.ts +22 -14
  54. package/node_modules/pi-lens/CHANGELOG.md +320 -0
  55. package/node_modules/pi-lens/config/dependency-cruiser-eager-allowlist.json +79 -0
  56. package/node_modules/pi-lens/dist/clients/actionable-warnings-logger.js +16 -1
  57. package/node_modules/pi-lens/dist/clients/ast-grep-client.js +13 -6
  58. package/node_modules/pi-lens/dist/clients/availability-probe-flight.js +12 -0
  59. package/node_modules/pi-lens/dist/clients/biome-client.js +7 -0
  60. package/node_modules/pi-lens/dist/clients/blocker-freshness.js +20 -0
  61. package/node_modules/pi-lens/dist/clients/bounded-telemetry.js +56 -19
  62. package/node_modules/pi-lens/dist/clients/build-identity.js +95 -0
  63. package/node_modules/pi-lens/dist/clients/bus-publish.js +3 -0
  64. package/node_modules/pi-lens/dist/clients/cache/rule-cache.js +2 -1
  65. package/node_modules/pi-lens/dist/clients/cache-observability.js +2 -1
  66. package/node_modules/pi-lens/dist/clients/cascade-logger.js +15 -1
  67. package/node_modules/pi-lens/dist/clients/dead-code-client.js +14 -11
  68. package/node_modules/pi-lens/dist/clients/degradation-ledger.js +56 -4
  69. package/node_modules/pi-lens/dist/clients/demoted-finding-render.js +14 -0
  70. package/node_modules/pi-lens/dist/clients/dependency-checker.js +20 -3
  71. package/node_modules/pi-lens/dist/clients/deps/minimatch.js +1 -1
  72. package/node_modules/pi-lens/dist/clients/dispatch/collect-later-tier.js +39 -0
  73. package/node_modules/pi-lens/dist/clients/dispatch/dispatcher.js +150 -9
  74. package/node_modules/pi-lens/dist/clients/dispatch/fact-store.js +231 -9
  75. package/node_modules/pi-lens/dist/clients/dispatch/integration.js +205 -100
  76. package/node_modules/pi-lens/dist/clients/dispatch/pending-runner-findings.js +87 -0
  77. package/node_modules/pi-lens/dist/clients/dispatch/plan.js +21 -5
  78. package/node_modules/pi-lens/dist/clients/dispatch/runners/ast-grep-napi.js +174 -55
  79. package/node_modules/pi-lens/dist/clients/dispatch/runners/eslint.js +5 -1
  80. package/node_modules/pi-lens/dist/clients/dispatch/runners/helm-lint.js +16 -3
  81. package/node_modules/pi-lens/dist/clients/dispatch/runners/helm-render.js +54 -9
  82. package/node_modules/pi-lens/dist/clients/dispatch/runners/index.js +1 -3
  83. package/node_modules/pi-lens/dist/clients/dispatch/runners/lsp.js +37 -1
  84. package/node_modules/pi-lens/dist/clients/dispatch/runners/markdownlint.js +4 -1
  85. package/node_modules/pi-lens/dist/clients/dispatch/runners/oxlint.js +11 -4
  86. package/node_modules/pi-lens/dist/clients/dispatch/runners/psscriptanalyzer.js +4 -0
  87. package/node_modules/pi-lens/dist/clients/dispatch/runners/rust-clippy.js +8 -3
  88. package/node_modules/pi-lens/dist/clients/dispatch/runners/utils/runner-helpers.js +76 -25
  89. package/node_modules/pi-lens/dist/clients/dispatch/runners/utils/spawn-outcome.js +4 -0
  90. package/node_modules/pi-lens/dist/clients/dispatch/runners/utils/tool-failure.js +19 -7
  91. package/node_modules/pi-lens/dist/clients/dispatch/runners/utils/toolchain-availability.js +7 -13
  92. package/node_modules/pi-lens/dist/clients/dispatch/runners/yaml-rule-parser.js +51 -17
  93. package/node_modules/pi-lens/dist/clients/event-loop-monitor.js +66 -1
  94. package/node_modules/pi-lens/dist/clients/file-utils.js +157 -7
  95. package/node_modules/pi-lens/dist/clients/finding-delivery-gate.js +5 -0
  96. package/node_modules/pi-lens/dist/clients/formatters.js +28 -3
  97. package/node_modules/pi-lens/dist/clients/git-guard.js +197 -47
  98. package/node_modules/pi-lens/dist/clients/git-tracked-ignore.js +32 -1
  99. package/node_modules/pi-lens/dist/clients/govulncheck-client.js +5 -1
  100. package/node_modules/pi-lens/dist/clients/gzip-stage-write.js +7 -0
  101. package/node_modules/pi-lens/dist/clients/installer/index.js +131 -34
  102. package/node_modules/pi-lens/dist/clients/installer/managed-tool-refresh.js +3 -1
  103. package/node_modules/pi-lens/dist/clients/instance-reaper.js +4 -13
  104. package/node_modules/pi-lens/dist/clients/instance-registry-lock.js +145 -0
  105. package/node_modules/pi-lens/dist/clients/instance-registry.js +432 -122
  106. package/node_modules/pi-lens/dist/clients/jscpd-client.js +6 -1
  107. package/node_modules/pi-lens/dist/clients/language-profile.js +4 -2
  108. package/node_modules/pi-lens/dist/clients/latency-logger.js +19 -1
  109. package/node_modules/pi-lens/dist/clients/lens-flag-registry.js +8 -0
  110. package/node_modules/pi-lens/dist/clients/lens-map.js +3 -1
  111. package/node_modules/pi-lens/dist/clients/lsp/cascade-tier.js +4 -0
  112. package/node_modules/pi-lens/dist/clients/lsp/client.js +516 -31
  113. package/node_modules/pi-lens/dist/clients/lsp/config.js +25 -2
  114. package/node_modules/pi-lens/dist/clients/lsp/diagnostic-binding.js +9 -4
  115. package/node_modules/pi-lens/dist/clients/lsp/index.js +509 -182
  116. package/node_modules/pi-lens/dist/clients/lsp/jvm-runtime.js +5 -0
  117. package/node_modules/pi-lens/dist/clients/lsp/launch.js +36 -8
  118. package/node_modules/pi-lens/dist/clients/lsp/pending-aux-coverage.js +116 -4
  119. package/node_modules/pi-lens/dist/clients/lsp/server.js +142 -13
  120. package/node_modules/pi-lens/dist/clients/lsp/session-roots.js +99 -0
  121. package/node_modules/pi-lens/dist/clients/lsp/workspace-diagnostics-cache.js +16 -6
  122. package/node_modules/pi-lens/dist/clients/lsp/workspace-sweep-hold.js +32 -23
  123. package/node_modules/pi-lens/dist/clients/lsp-mutation.js +16 -2
  124. package/node_modules/pi-lens/dist/clients/mcp/analyze.js +12 -6
  125. package/node_modules/pi-lens/dist/clients/mcp/session.js +14 -1
  126. package/node_modules/pi-lens/dist/clients/memory-sampler.js +23 -1
  127. package/node_modules/pi-lens/dist/clients/message-end-attribution.js +30 -0
  128. package/node_modules/pi-lens/dist/clients/metrics-history.js +21 -4
  129. package/node_modules/pi-lens/dist/clients/opaque-mutation-scan.js +232 -18
  130. package/node_modules/pi-lens/dist/clients/package-manager.js +6 -18
  131. package/node_modules/pi-lens/dist/clients/path-keyed-map.js +14 -1
  132. package/node_modules/pi-lens/dist/clients/path-utils.js +32 -0
  133. package/node_modules/pi-lens/dist/clients/pipeline.js +0 -8
  134. package/node_modules/pi-lens/dist/clients/process-singletons.js +210 -0
  135. package/node_modules/pi-lens/dist/clients/project-diagnostics/runner-adapters/madge.js +2 -1
  136. package/node_modules/pi-lens/dist/clients/project-diagnostics/scanner.js +10 -4
  137. package/node_modules/pi-lens/dist/clients/project-snapshot.js +33 -11
  138. package/node_modules/pi-lens/dist/clients/read-guard-logger.js +24 -2
  139. package/node_modules/pi-lens/dist/clients/read-guard.js +74 -7
  140. package/node_modules/pi-lens/dist/clients/recent-touches.js +17 -5
  141. package/node_modules/pi-lens/dist/clients/review-graph/builder.js +639 -62
  142. package/node_modules/pi-lens/dist/clients/review-graph/tsconfig-paths.js +5 -1
  143. package/node_modules/pi-lens/dist/clients/review-graph-logger.js +21 -1
  144. package/node_modules/pi-lens/dist/clients/runtime-coordinator.js +68 -0
  145. package/node_modules/pi-lens/dist/clients/runtime-session.js +30 -12
  146. package/node_modules/pi-lens/dist/clients/runtime-tool-call.js +15 -0
  147. package/node_modules/pi-lens/dist/clients/runtime-tool-result.js +106 -7
  148. package/node_modules/pi-lens/dist/clients/runtime-turn.js +242 -27
  149. package/node_modules/pi-lens/dist/clients/safe-spawn.js +158 -18
  150. package/node_modules/pi-lens/dist/clients/security-scan-client.js +48 -17
  151. package/node_modules/pi-lens/dist/clients/session-lifecycle.js +238 -42
  152. package/node_modules/pi-lens/dist/clients/sg-runner.js +27 -15
  153. package/node_modules/pi-lens/dist/clients/shared-checkout-guard.js +338 -0
  154. package/node_modules/pi-lens/dist/clients/spawn-output-cap.js +37 -0
  155. package/node_modules/pi-lens/dist/clients/spawn-timeout-cooldown.js +15 -1
  156. package/node_modules/pi-lens/dist/clients/startup-scan.js +6 -7
  157. package/node_modules/pi-lens/dist/clients/startup-timing.js +69 -4
  158. package/node_modules/pi-lens/dist/clients/string-utils.js +20 -0
  159. package/node_modules/pi-lens/dist/clients/test-runner-client.js +419 -88
  160. package/node_modules/pi-lens/dist/clients/tool-policy.js +1 -1
  161. package/node_modules/pi-lens/dist/clients/tree-sitter-client.js +11 -5
  162. package/node_modules/pi-lens/dist/clients/tree-sitter-logger.js +17 -1
  163. package/node_modules/pi-lens/dist/clients/warm-attach.js +8 -10
  164. package/node_modules/pi-lens/dist/clients/word-index-logger.js +13 -1
  165. package/node_modules/pi-lens/dist/clients/word-index-store.js +448 -0
  166. package/node_modules/pi-lens/dist/clients/word-index.js +582 -104
  167. package/node_modules/pi-lens/dist/clients/workspace-topology.js +17 -0
  168. package/node_modules/pi-lens/dist/clients/zizmor-config.js +26 -6
  169. package/node_modules/pi-lens/dist/index.js +11243 -6651
  170. package/node_modules/pi-lens/dist/mcp/build-staleness.js +8 -7
  171. package/node_modules/pi-lens/dist/mcp/cli.js +3 -1
  172. package/node_modules/pi-lens/dist/mcp/server.js +6 -1
  173. package/node_modules/pi-lens/dist/tools/lens-diagnostics.js +4 -0
  174. package/node_modules/pi-lens/dist/tools/lsp-diagnostics.js +14 -5
  175. package/node_modules/pi-lens/dist/tools/lsp-navigation.js +3 -1
  176. package/node_modules/pi-lens/docs/agent-guide.md +4 -2
  177. package/node_modules/pi-lens/docs/ast-grep_rules_catalog.md +41 -10
  178. package/node_modules/pi-lens/docs/astplayground.md +26 -17
  179. package/node_modules/pi-lens/package.json +5 -1
  180. package/node_modules/pi-lens/rules/ast-grep-rules/rule-tests/c-no-malloc-free-test.yml +20 -0
  181. package/node_modules/pi-lens/rules/ast-grep-rules/rule-tests/cpp-no-malloc-free-test.yml +25 -0
  182. package/node_modules/pi-lens/rules/ast-grep-rules/rule-tests/cpp-no-printf-test.yml +19 -0
  183. package/node_modules/pi-lens/rules/ast-grep-rules/rule-tests/go-no-fmt-println-test.yml +19 -0
  184. package/node_modules/pi-lens/rules/ast-grep-rules/rule-tests/go-no-panic-in-lib-test.yml +17 -0
  185. package/node_modules/pi-lens/rules/ast-grep-rules/rule-tests/go-no-underscore-func-name-test.yml +18 -0
  186. package/node_modules/pi-lens/rules/ast-grep-rules/rule-tests/go-prefer-errors-is-test.yml +15 -0
  187. package/node_modules/pi-lens/rules/ast-grep-rules/rule-tests/go-prefer-string-builder-test.yml +21 -0
  188. package/node_modules/pi-lens/rules/ast-grep-rules/rule-tests/hyphenated-svg-attribute-test.yml +11 -0
  189. package/node_modules/pi-lens/rules/ast-grep-rules/rule-tests/kotlin-no-lateinit-test.yml +17 -0
  190. package/node_modules/pi-lens/rules/ast-grep-rules/rule-tests/kotlin-no-nullable-boolean-test.yml +15 -0
  191. package/node_modules/pi-lens/rules/ast-grep-rules/rule-tests/kotlin-no-println-test.yml +19 -0
  192. package/node_modules/pi-lens/rules/ast-grep-rules/rule-tests/kotlin-no-unnecessary-let-test.yml +7 -0
  193. package/node_modules/pi-lens/rules/ast-grep-rules/rule-tests/kotlin-no-unsafe-cast-test.yml +7 -0
  194. package/node_modules/pi-lens/rules/ast-grep-rules/rule-tests/kotlin-no-var-test.yml +7 -0
  195. package/node_modules/pi-lens/rules/ast-grep-rules/rule-tests/kotlin-prefer-data-class-test.yml +25 -0
  196. package/node_modules/pi-lens/rules/ast-grep-rules/rule-tests/kotlin-prefer-is-empty-test.yml +11 -0
  197. package/node_modules/pi-lens/rules/ast-grep-rules/rule-tests/no-important-test.yml +21 -0
  198. package/node_modules/pi-lens/rules/ast-grep-rules/rule-tests/no-raw-types-test.yml +30 -0
  199. package/node_modules/pi-lens/rules/ast-grep-rules/rule-tests/no-string-concat-in-loop-test.yml +100 -0
  200. package/node_modules/pi-lens/rules/ast-grep-rules/rule-tests/no-system-out-println-test.yml +7 -0
  201. package/node_modules/pi-lens/rules/ast-grep-rules/rule-tests/prefer-string-is-empty-test.yml +7 -0
  202. package/node_modules/pi-lens/rules/ast-grep-rules/rule-tests/python-optional-type-test.yml +9 -0
  203. package/node_modules/pi-lens/rules/ast-grep-rules/rule-tests/reducible-list-comprehension-test.yml +11 -0
  204. package/node_modules/pi-lens/rules/ast-grep-rules/rule-tests/ruby-symbol-to-proc-candidate-test.yml +10 -0
  205. package/node_modules/pi-lens/rules/ast-grep-rules/rule-tests/rust-no-chars-enumerate-test.yml +7 -0
  206. package/node_modules/pi-lens/rules/ast-grep-rules/rules/c-no-malloc-free.yml +39 -0
  207. package/node_modules/pi-lens/rules/ast-grep-rules/rules/cpp-no-malloc-free.yml +45 -0
  208. package/node_modules/pi-lens/rules/ast-grep-rules/rules/cpp-no-printf.yml +41 -0
  209. package/node_modules/pi-lens/rules/ast-grep-rules/rules/go-no-fmt-println.yml +43 -0
  210. package/node_modules/pi-lens/rules/ast-grep-rules/rules/go-no-panic-in-lib.yml +41 -0
  211. package/node_modules/pi-lens/rules/ast-grep-rules/rules/go-no-underscore-func-name.yml +35 -0
  212. package/node_modules/pi-lens/rules/ast-grep-rules/rules/go-prefer-errors-is.yml +40 -0
  213. package/node_modules/pi-lens/rules/ast-grep-rules/rules/go-prefer-string-builder.yml +43 -0
  214. package/node_modules/pi-lens/rules/ast-grep-rules/rules/hyphenated-svg-attribute.yml +32 -0
  215. package/node_modules/pi-lens/rules/ast-grep-rules/rules/kotlin-no-lateinit.yml +37 -0
  216. package/node_modules/pi-lens/rules/ast-grep-rules/rules/kotlin-no-nullable-boolean.yml +33 -0
  217. package/node_modules/pi-lens/rules/ast-grep-rules/rules/kotlin-no-println.yml +42 -0
  218. package/node_modules/pi-lens/rules/ast-grep-rules/rules/kotlin-no-unnecessary-let.yml +28 -0
  219. package/node_modules/pi-lens/rules/ast-grep-rules/rules/kotlin-no-unsafe-cast.yml +28 -0
  220. package/node_modules/pi-lens/rules/ast-grep-rules/rules/kotlin-no-var.yml +35 -0
  221. package/node_modules/pi-lens/rules/ast-grep-rules/rules/kotlin-prefer-data-class.yml +66 -0
  222. package/node_modules/pi-lens/rules/ast-grep-rules/rules/kotlin-prefer-is-empty.yml +35 -0
  223. package/node_modules/pi-lens/rules/ast-grep-rules/rules/no-important.yml +21 -0
  224. package/node_modules/pi-lens/rules/ast-grep-rules/rules/no-raw-types.yml +33 -0
  225. package/node_modules/pi-lens/rules/ast-grep-rules/rules/no-string-concat-in-loop.yml +90 -0
  226. package/node_modules/pi-lens/rules/ast-grep-rules/rules/no-system-out-println.yml +16 -0
  227. package/node_modules/pi-lens/rules/ast-grep-rules/rules/prefer-string-is-empty.yml +11 -0
  228. package/node_modules/pi-lens/rules/ast-grep-rules/rules/python-optional-type.yml +22 -0
  229. package/node_modules/pi-lens/rules/ast-grep-rules/rules/reducible-list-comprehension.yml +29 -0
  230. package/node_modules/pi-lens/rules/ast-grep-rules/rules/ruby-symbol-to-proc-candidate.yml +25 -0
  231. package/node_modules/pi-lens/rules/ast-grep-rules/rules/rust-no-chars-enumerate.yml +19 -0
  232. package/node_modules/pi-mcp-adapter/CHANGELOG.md +42 -0
  233. package/node_modules/pi-mcp-adapter/README.md +15 -15
  234. package/node_modules/pi-mcp-adapter/commands.ts +59 -22
  235. package/node_modules/pi-mcp-adapter/config.ts +18 -4
  236. package/node_modules/pi-mcp-adapter/direct-tools.ts +26 -6
  237. package/node_modules/pi-mcp-adapter/dist/config.d.ts +4 -0
  238. package/node_modules/pi-mcp-adapter/dist/config.js +13 -4
  239. package/node_modules/pi-mcp-adapter/dist/config.js.map +1 -1
  240. package/node_modules/pi-mcp-adapter/dist/types.d.ts +12 -4
  241. package/node_modules/pi-mcp-adapter/dist/types.js.map +1 -1
  242. package/node_modules/pi-mcp-adapter/error-signal.ts +15 -4
  243. package/node_modules/pi-mcp-adapter/errors.ts +141 -0
  244. package/node_modules/pi-mcp-adapter/host-html-template.ts +58 -5
  245. package/node_modules/pi-mcp-adapter/index.ts +2 -3
  246. package/node_modules/pi-mcp-adapter/init.ts +5 -0
  247. package/node_modules/pi-mcp-adapter/mcp-auth-flow.ts +105 -32
  248. package/node_modules/pi-mcp-adapter/mcp-panel.ts +30 -9
  249. package/node_modules/pi-mcp-adapter/mcp-setup-panel.ts +66 -28
  250. package/node_modules/pi-mcp-adapter/mcp-status.ts +2 -0
  251. package/node_modules/pi-mcp-adapter/package.json +2 -1
  252. package/node_modules/pi-mcp-adapter/proxy-modes.ts +88 -25
  253. package/node_modules/pi-mcp-adapter/sandbox-proxy-template.ts +217 -0
  254. package/node_modules/pi-mcp-adapter/server-manager.ts +343 -6
  255. package/node_modules/pi-mcp-adapter/skills/mcp-scripting/SKILL.md +1 -0
  256. package/node_modules/pi-mcp-adapter/types.ts +19 -4
  257. package/node_modules/pi-mcp-adapter/ui-resource-handler.ts +18 -2
  258. package/node_modules/pi-mcp-adapter/ui-server.ts +179 -54
  259. package/node_modules/pi-mcp-adapter/ui-session.ts +28 -8
  260. package/node_modules/pi-web-access/CHANGELOG.md +20 -0
  261. package/node_modules/pi-web-access/README.md +15 -2
  262. package/node_modules/pi-web-access/extract.ts +57 -12
  263. package/node_modules/pi-web-access/github-extract.ts +47 -3
  264. package/node_modules/pi-web-access/index.ts +1 -1
  265. package/node_modules/pi-web-access/package.json +1 -1
  266. package/node_modules/pi-web-access/page-query.ts +61 -8
  267. package/package.json +21 -17
  268. package/node_modules/@tifan/pi-titlebar-spinner/README.md +0 -24
  269. package/node_modules/@tifan/pi-titlebar-spinner/package.json +0 -39
  270. package/node_modules/@tifan/pi-titlebar-spinner/src/index.ts +0 -49
@@ -18,6 +18,8 @@ import {
18
18
  DIFF_SPLIT_MIN_WIDTH_VALUES,
19
19
  DIFF_VIEW_MODES,
20
20
  EXCLUDE_RENDERER_CANDIDATES,
21
+ EXPANDED_INPUT_MAX_LINES_VALUES,
22
+ EXPANDED_OUTPUT_MAX_LINES_VALUES,
21
23
  EXPANDED_PREVIEW_MAX_LINES_VALUES,
22
24
  formatExcludeRenderers,
23
25
  getCompactThinkingConfig,
@@ -324,6 +326,24 @@ export async function showCcstylePanel(
324
326
  submenu: (_current: string, closeSubmenu: (selected?: string) => void) =>
325
327
  buildNumberInputSubmenu(theme, expandedMaxSetting, closeSubmenu),
326
328
  };
329
+ const expandedInputSetting = {
330
+ id: "expandedInputMaxLines",
331
+ label: "Expanded Input max lines",
332
+ description: "Max Input body lines before the show-more footer appears.",
333
+ currentValue: String(config.expandedInputMaxLines),
334
+ values: [...EXPANDED_INPUT_MAX_LINES_VALUES],
335
+ submenu: (_current: string, closeSubmenu: (selected?: string) => void) =>
336
+ buildNumberInputSubmenu(theme, expandedInputSetting, closeSubmenu),
337
+ };
338
+ const expandedOutputSetting = {
339
+ id: "expandedOutputMaxLines",
340
+ label: "Expanded Output max lines",
341
+ description: "Max Output body lines before the show-more footer appears.",
342
+ currentValue: String(config.expandedOutputMaxLines),
343
+ values: [...EXPANDED_OUTPUT_MAX_LINES_VALUES],
344
+ submenu: (_current: string, closeSubmenu: (selected?: string) => void) =>
345
+ buildNumberInputSubmenu(theme, expandedOutputSetting, closeSubmenu),
346
+ };
327
347
  const thinkingTitleSetting = {
328
348
  id: "useSummaryTitlesAsThinkingTitle",
329
349
  label: "Summary title",
@@ -500,6 +520,24 @@ export async function showCcstylePanel(
500
520
  );
501
521
  expandedMaxSetting.currentValue = String(config.expandedPreviewMaxLines);
502
522
  break;
523
+ case "expandedInputMaxLines":
524
+ config.expandedInputMaxLines = pickPositiveInt(
525
+ value,
526
+ DEFAULT_CONFIG.expandedInputMaxLines,
527
+ 1,
528
+ 5_000,
529
+ );
530
+ expandedInputSetting.currentValue = String(config.expandedInputMaxLines);
531
+ break;
532
+ case "expandedOutputMaxLines":
533
+ config.expandedOutputMaxLines = pickPositiveInt(
534
+ value,
535
+ DEFAULT_CONFIG.expandedOutputMaxLines,
536
+ 1,
537
+ 5_000,
538
+ );
539
+ expandedOutputSetting.currentValue = String(config.expandedOutputMaxLines);
540
+ break;
503
541
  case "useSummaryTitlesAsThinkingTitle":
504
542
  config.useSummaryTitlesAsThinkingTitle = value === "on";
505
543
  break;
@@ -554,10 +592,8 @@ export async function showCcstylePanel(
554
592
  diffViewSetting,
555
593
  diffIndicatorSetting,
556
594
  diffSplitSetting,
557
- diffCollapsedSetting,
558
595
  writeDiffCollapsedSetting,
559
596
  diffWordWrapSetting,
560
- expandedMaxSetting,
561
597
  ],
562
598
  },
563
599
  {
@@ -573,7 +609,14 @@ export async function showCcstylePanel(
573
609
  {
574
610
  id: "ui",
575
611
  label: "UI",
576
- items: [startupHeaderSetting, scrollStepSetting],
612
+ items: [
613
+ expandedMaxSetting,
614
+ expandedInputSetting,
615
+ expandedOutputSetting,
616
+ diffCollapsedSetting,
617
+ startupHeaderSetting,
618
+ scrollStepSetting,
619
+ ],
577
620
  },
578
621
  {
579
622
  id: "feature",
@@ -18,6 +18,7 @@ import {
18
18
  collectToolComponents,
19
19
  extractToolFramePlacements,
20
20
  isSgrLeftPress,
21
+ isSgrLeftRelease,
21
22
  isToolExecutionComponent,
22
23
  parseSgrMousePackets,
23
24
  stripTerminalSequences,
@@ -35,6 +36,7 @@ import {
35
36
  isScrollbarColumnAt,
36
37
  } from "./layout.ts";
37
38
  import {
39
+ disableOfficialScrollToEnd,
38
40
  fullscreenLazyTui,
39
41
  hideScrollButton,
40
42
  isScrollBottomInput,
@@ -157,8 +159,11 @@ function updateToolSummaryHover(tui: any, packet: SgrMousePacket): void {
157
159
  }
158
160
 
159
161
  const EXPAND_PANEL_DOUBLE_CLICK_MS = 400;
162
+ const EXPAND_PANEL_CLICK_ARM_MS = 50;
160
163
  type ExpandPanelIdentity = string | object;
161
- let lastExpandPanelClick: { id: ExpandPanelIdentity; at: number } | null = null;
164
+ let pendingExpandPress: { id: ExpandPanelIdentity } | null = null;
165
+ let lastExpandClick: { id: ExpandPanelIdentity; at: number } | null = null;
166
+ let armExpandClickTimer: ReturnType<typeof setTimeout> | null = null;
162
167
 
163
168
  function expandPanelIdentity(card: any): ExpandPanelIdentity {
164
169
  return card instanceof ThinkingPreviewBlock
@@ -169,17 +174,47 @@ function expandPanelIdentity(card: any): ExpandPanelIdentity {
169
174
  function isExpandPanelDoubleClick(card: any): boolean {
170
175
  const now = Date.now();
171
176
  const id = expandPanelIdentity(card);
172
- const prev = lastExpandPanelClick;
173
- lastExpandPanelClick = { id, at: now };
174
- return Boolean(prev && prev.id === id && now - prev.at <= EXPAND_PANEL_DOUBLE_CLICK_MS);
177
+ const prev = lastExpandClick;
178
+ pendingExpandPress = { id };
179
+ if (prev && prev.id === id && now - prev.at <= EXPAND_PANEL_DOUBLE_CLICK_MS) {
180
+ pendingExpandPress = null;
181
+ lastExpandClick = null;
182
+ return true;
183
+ }
184
+ return false;
185
+ }
186
+
187
+ function completeExpandPanelClick(): void {
188
+ if (!pendingExpandPress) return;
189
+ const click = { id: pendingExpandPress.id, at: Date.now() };
190
+ pendingExpandPress = null;
191
+ if (armExpandClickTimer) clearTimeout(armExpandClickTimer);
192
+ armExpandClickTimer = setTimeout(() => {
193
+ armExpandClickTimer = null;
194
+ if (pendingExpandPress) return;
195
+ lastExpandClick = click;
196
+ }, EXPAND_PANEL_CLICK_ARM_MS);
197
+ if (
198
+ typeof armExpandClickTimer === "object" &&
199
+ armExpandClickTimer &&
200
+ "unref" in armExpandClickTimer
201
+ ) {
202
+ armExpandClickTimer.unref();
203
+ }
175
204
  }
176
205
 
177
206
  function clearExpandPanelDoubleClick(): void {
178
- lastExpandPanelClick = null;
207
+ pendingExpandPress = null;
208
+ lastExpandClick = null;
209
+ if (armExpandClickTimer) {
210
+ clearTimeout(armExpandClickTimer);
211
+ armExpandClickTimer = null;
212
+ }
179
213
  }
180
214
 
181
215
  function collapseExpandedCard(tui: any, card: any): boolean {
182
- if (!isExpandPanelDoubleClick(card)) return false;
216
+ // 单击也 consume,避免官方链再合成一次 press 把单击当成双击。
217
+ if (!isExpandPanelDoubleClick(card)) return true;
183
218
  card.setExpanded(false);
184
219
  setHoveredToolCallId(null);
185
220
  setHoveredToolGroup(null);
@@ -336,18 +371,17 @@ function handleFullscreenToolClick(tui: any, packet: SgrMousePacket): boolean {
336
371
  const plain = stripTerminalSequencesPreservingLayout(line);
337
372
  const section = view.matchShowMoreLine(plain);
338
373
  if (section) {
374
+ clearExpandPanelDoubleClick();
339
375
  const box = view.showMoreHitbox(plain);
340
- if (box && x + 1 >= box.startCol && x + 1 <= box.endCol) {
341
- return tryOpenToolIoShowMore({
342
- kind: "show-more",
343
- row: 0,
344
- startCol: box.startCol,
345
- endCol: box.endCol,
346
- component,
347
- view,
348
- section,
349
- });
350
- }
376
+ return tryOpenToolIoShowMore({
377
+ kind: "show-more",
378
+ row: 0,
379
+ startCol: box?.startCol ?? 1,
380
+ endCol: box?.endCol ?? 1,
381
+ component,
382
+ view,
383
+ section,
384
+ });
351
385
  }
352
386
  }
353
387
  // 双击收起:内部工具仍归所属 group。单击放行官方(选择/链接)。
@@ -464,6 +498,7 @@ function patchFullscreenViewportInput(tui: any): void {
464
498
  if (packets && tui.hasOverlay?.() && hasActiveTextPreview()) return undefined;
465
499
  if (packets && !tui.hasOverlay?.()) {
466
500
  for (const packet of packets) {
501
+ if (isSgrLeftRelease(packet)) completeExpandPanelClick();
467
502
  if (isSgrLeftPress(packet) && handleFullscreenToolClick(tui, packet)) {
468
503
  return { consume: true };
469
504
  }
@@ -800,6 +835,7 @@ function handleToolMouseInput(data: string): { consume: true } | undefined {
800
835
  let consumed = false;
801
836
  for (const packet of packets) {
802
837
  updateToolSummaryHover(getToolMouseTui(), packet);
838
+ if (isSgrLeftRelease(packet)) completeExpandPanelClick();
803
839
  if (!isSgrLeftPress(packet)) continue;
804
840
  if (toggleToolAtMouseClick(getToolMouseTui(), packet)) {
805
841
  consumed = true;
@@ -880,10 +916,12 @@ export function installToolMouseInteraction(
880
916
  setToolMouseTui(tui);
881
917
  setToolTuiFullscreen(fullscreenLazyTui(tui));
882
918
  if (isLazyProxyTui(tui)) {
919
+ disableOfficialScrollToEnd(tui);
883
920
  patchFullscreenViewportInput(tui);
884
921
  ensureFullscreenToolMouseMotion(tui);
885
922
  setScrollButtonWidget({
886
923
  render: (width: number) => {
924
+ disableOfficialScrollToEnd(tui);
887
925
  patchFullscreenViewportInput(tui);
888
926
  ensureFullscreenToolMouseMotion(tui);
889
927
  return renderScrollButton(width, theme);
@@ -53,6 +53,12 @@ export function isSgrLeftPress(packet: SgrMousePacket): boolean {
53
53
  return packet.final === "M" && baseButton === 0 && (packet.code & 32) === 0;
54
54
  }
55
55
 
56
+ /** 是否为左键松开。 */
57
+ export function isSgrLeftRelease(packet: SgrMousePacket): boolean {
58
+ const baseButton = packet.code & ~(4 | 8 | 16 | 32);
59
+ return packet.final === "m" && baseButton === 0 && (packet.code & 32) === 0;
60
+ }
61
+
56
62
  /** 仅剥离终端序列、保留原布局(换行/空白不动),用于命中区间计算。 */
57
63
  export function stripTerminalSequencesPreservingLayout(value: string): string {
58
64
  return value
@@ -83,6 +83,11 @@ export function fullscreenLazyTui(tui: any): boolean {
83
83
  return isLazyProxyTui(tui) && tui.mode === "fullscreen";
84
84
  }
85
85
 
86
+ /** 关掉 pi 0.85 Jump to latest overlay,避免和本仓库 dock 按钮叠两层。 */
87
+ export function disableOfficialScrollToEnd(tui: any): void {
88
+ if (typeof tui?.scrollToEndIndicator === "function") tui.scrollToEndIndicator = undefined;
89
+ }
90
+
86
91
  /** 官方 fullscreen:是否已跟随 transcript 底部(按钮隐藏条件)。 */
87
92
  export function isFullscreenAtBottom(tui: any): boolean {
88
93
  const following = tui.isFollowingOutput ?? tui.getPrimaryScrollView?.()?.isFollowingEnd ?? true;
@@ -246,7 +246,7 @@ export class ExpandedToolIoView {
246
246
  private hoveredSection: ToolIoSection | null = null;
247
247
  /** Which sections currently show the show-more affordance (after last render). */
248
248
  private truncated: { input: boolean; output: boolean } = { input: false, output: false };
249
- /** 0-based header line indexes that carry show-more after last render. */
249
+ /** 0-based body/footer line indexes that carry show-more after last render. */
250
250
  private showMoreHeaderRows: { input?: number; output?: number } = {};
251
251
 
252
252
  constructor(
@@ -306,12 +306,12 @@ export class ExpandedToolIoView {
306
306
  this.invalidate();
307
307
  }
308
308
 
309
- /** True when the plain header line is a truncated section with show-more. */
309
+ /** True when the plain footer line is a truncated section with show-more. */
310
310
  matchShowMoreLine(plainLine: string): ToolIoSection | null {
311
311
  const line = plainLine.replace(/\x1b\[[0-9;]*m/g, "");
312
- if (!line.includes(` • ${showMoreHintText()}`)) return null;
313
- if (/\bInput\b/.test(line) && this.truncated.input) return "input";
314
- if (/\bOutput\b/.test(line) && this.truncated.output) return "output";
312
+ if (!line.includes(` • ${showMoreHintText()}`) || !/\+\d+ more lines/.test(line)) return null;
313
+ if (this.truncated.input && line.includes("│")) return "input";
314
+ if (this.truncated.output) return "output";
315
315
  return null;
316
316
  }
317
317
 
@@ -355,24 +355,13 @@ export class ExpandedToolIoView {
355
355
  this.truncated = { input: false, output: false };
356
356
  this.showMoreHeaderRows = {};
357
357
 
358
- const pushHeader = (
359
- corner: "├" | "└",
360
- label: string,
361
- section: ToolIoSection,
362
- showMore: boolean,
363
- ) => {
358
+ const pushHeader = (corner: "├" | "└", label: string) => {
364
359
  const mark = theme.fg("dim", ` ${corner} `);
365
360
  const title = theme.fg(
366
361
  "accent",
367
362
  typeof theme.bold === "function" ? theme.bold(label) : label,
368
363
  );
369
- // hover 只高亮文字,圆点保持 dim(与 group hint 一致)。
370
- const more = showMore
371
- ? theme.fg("dim", " •") +
372
- theme.fg(this.hoveredSection === section ? "text" : "dim", ` ${showMoreHintText()}`)
373
- : "";
374
- if (showMore) this.showMoreHeaderRows[section] = lines.length;
375
- lines.push(truncateToWidth(mark + title + more, safeWidth, ""));
364
+ lines.push(truncateToWidth(mark + title, safeWidth, ""));
376
365
  };
377
366
 
378
367
  const pushRailLine = (styledContent: string, continued = true) => {
@@ -394,7 +383,7 @@ export class ExpandedToolIoView {
394
383
 
395
384
  const pushBody = (
396
385
  body: string,
397
- opts: { input?: boolean; limit: number; continued?: boolean },
386
+ opts: { input?: boolean; limit: number; continued?: boolean; section: ToolIoSection },
398
387
  ): boolean /* truncated */ => {
399
388
  const raw = body.replace(/\t/g, " ").replace(/\n+$/, "");
400
389
  if (!raw.trim()) {
@@ -417,7 +406,14 @@ export class ExpandedToolIoView {
417
406
  if (truncated) {
418
407
  const hidden = Math.max(0, wrapped.length - visible.length);
419
408
  if (hidden > 0) {
420
- pushRailLine(theme.fg("dim", `… +${hidden} more lines`), opts.continued);
409
+ const more =
410
+ theme.fg("dim", " •") +
411
+ theme.fg(
412
+ this.hoveredSection === opts.section ? "text" : "dim",
413
+ ` ${showMoreHintText()}`,
414
+ );
415
+ pushRailLine(theme.fg("dim", `… +${hidden} more lines`) + more, opts.continued);
416
+ this.showMoreHeaderRows[opts.section] = lines.length - 1;
421
417
  }
422
418
  }
423
419
  return truncated;
@@ -426,7 +422,6 @@ export class ExpandedToolIoView {
426
422
  const hasInput = this.inputBody.trim().length > 0;
427
423
  const outputText = this.getOutputBody();
428
424
 
429
- // Decide show-more from the same truncation rules as pushBody.
430
425
  const inputWouldTruncate =
431
426
  hasInput &&
432
427
  bodyExceedsLineLimit(this.inputBody, this.maxInputLines, contentWidth, true, theme);
@@ -441,20 +436,21 @@ export class ExpandedToolIoView {
441
436
 
442
437
  if (hasInput) {
443
438
  this.truncated.input = inputWouldTruncate;
444
- pushHeader("├", "Input", "input", inputWouldTruncate);
439
+ pushHeader("├", "Input");
445
440
  pushBody(this.inputBody, {
446
441
  input: true,
447
442
  limit: this.maxInputLines,
448
443
  continued: true,
444
+ section: "input",
449
445
  });
450
446
  pushBlankRail();
451
447
  this.truncated.output = outputWouldTruncate;
452
- pushHeader("└", "Output", "output", outputWouldTruncate);
453
- pushBody(outputText, { limit: this.maxOutputLines, continued: false });
448
+ pushHeader("└", "Output");
449
+ pushBody(outputText, { limit: this.maxOutputLines, continued: false, section: "output" });
454
450
  } else {
455
451
  this.truncated.output = outputWouldTruncate;
456
- pushHeader("└", "Output", "output", outputWouldTruncate);
457
- pushBody(outputText, { limit: this.maxOutputLines, continued: false });
452
+ pushHeader("└", "Output");
453
+ pushBody(outputText, { limit: this.maxOutputLines, continued: false, section: "output" });
458
454
  }
459
455
 
460
456
  this.cachedWidth = width;
@@ -655,16 +651,24 @@ export function renderExpandedToolResult(
655
651
  ): ExpandedToolIoView | ExpandedToolResultText | Text {
656
652
  const inputBody = formatToolInputArgs(args);
657
653
  const outputBody = body;
658
- const maxLines = config.expandedPreviewMaxLines;
654
+ const maxOutputLines = config.expandedOutputMaxLines;
655
+ const maxInputLines = config.expandedInputMaxLines;
659
656
 
660
657
  // Prefer structured Input/Output when we have args or non-empty output.
661
658
  if (inputBody.trim() || outputBody.trim()) {
662
659
  let view: ExpandedToolIoView;
663
660
  if (isExpandedToolIoView(lastComponent)) {
664
- lastComponent.setContent(inputBody, outputBody, isError, maxLines, maxLines);
661
+ lastComponent.setContent(inputBody, outputBody, isError, maxOutputLines, maxInputLines);
665
662
  view = lastComponent;
666
663
  } else {
667
- view = new ExpandedToolIoView(theme, inputBody, outputBody, isError, maxLines, maxLines);
664
+ view = new ExpandedToolIoView(
665
+ theme,
666
+ inputBody,
667
+ outputBody,
668
+ isError,
669
+ maxOutputLines,
670
+ maxInputLines,
671
+ );
668
672
  }
669
673
  if (context) rememberIoView(context, view);
670
674
  return view;
@@ -701,7 +705,7 @@ function frameViewId(view: ExpandedToolIoView): number | null {
701
705
  function withIoViewMarkers(view: ExpandedToolIoView, lines: string[]): string[] {
702
706
  const id = frameViewId(view);
703
707
  if (id === null) return lines;
704
- // Mark by exact header row from render — never scan body text for Input/Output labels.
708
+ // Mark by exact recorded show-more row from render — never scan body text heuristically.
705
709
  const marked = lines.slice();
706
710
  for (const { section, line } of view.showMoreHeaderLineIndexes()) {
707
711
  if (line < 0 || line >= marked.length) continue;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@herbertgao/pi-cc-extensions",
3
- "version": "0.8.60",
3
+ "version": "0.9.0",
4
4
  "license": "MIT",
5
5
  "description": "A Pi productivity suite with Claude Code-style UI, context inspection, and agent/session references",
6
6
  "type": "module",
@@ -69,8 +69,8 @@
69
69
  },
70
70
  "x-upstream": {
71
71
  "package": "pi-cc-extensions",
72
- "version": "0.8.68",
72
+ "version": "0.8.69",
73
73
  "repository": "https://github.com/minuque/pi-cc-extensions",
74
- "commit": "1ca144c8fa3f2b391fd76d008f0148e04bad14be"
74
+ "commit": "5d7a2666f51da9f450bd019af10200c88cc1df98"
75
75
  }
76
76
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@juicesharp/rpiv-ask-user-question",
3
- "version": "2.7.1",
3
+ "version": "2.9.0",
4
4
  "description": "Pi extension. A structured questionnaire the model can put to you when it would otherwise guess, with typed options instead of free-form replies.",
5
5
  "keywords": [
6
6
  "pi-package",
@@ -94,7 +94,7 @@
94
94
  }
95
95
  },
96
96
  "dependencies": {
97
- "@juicesharp/rpiv-config": "^2.7.1",
97
+ "@juicesharp/rpiv-config": "^2.9.0",
98
98
  "typebox": "^1.1.24"
99
99
  }
100
100
  }