@herbertgao/pi-extensions 2026.9.2 → 2026.9.4

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 (255) hide show
  1. package/README.md +4 -2
  2. package/THIRD_PARTY_NOTICES.md +49 -0
  3. package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/compact-mode.ts +3 -2
  4. package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/default-mode.ts +16 -11
  5. package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/diff/diff-renderer.ts +20 -6
  6. package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/grouping.ts +12 -7
  7. package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/result.ts +98 -0
  8. package/node_modules/@herbertgao/pi-cc-extensions/package.json +3 -3
  9. package/node_modules/@herbertgao/sol-pi/LICENSE +19 -0
  10. package/node_modules/@herbertgao/sol-pi/README.md +159 -0
  11. package/node_modules/@herbertgao/sol-pi/SECURITY.md +26 -0
  12. package/node_modules/@herbertgao/sol-pi/THIRD_PARTY_NOTICES.md +19 -0
  13. package/node_modules/@herbertgao/sol-pi/agents-install.md +150 -0
  14. package/node_modules/@herbertgao/sol-pi/assets/sol-pi-hero.png +0 -0
  15. package/node_modules/@herbertgao/sol-pi/docs/compatibility.md +69 -0
  16. package/node_modules/@herbertgao/sol-pi/docs/configuration.md +75 -0
  17. package/node_modules/@herbertgao/sol-pi/package.json +76 -0
  18. package/node_modules/@herbertgao/sol-pi/scripts/check-pi-compat.mjs +32 -0
  19. package/node_modules/@herbertgao/sol-pi/scripts/check-sol-pi-config.mjs +120 -0
  20. package/node_modules/@herbertgao/sol-pi/sol-pi.example.json +10 -0
  21. package/node_modules/@herbertgao/sol-pi/src/sol-pi/config.ts +135 -0
  22. package/node_modules/@herbertgao/sol-pi/src/sol-pi/extensions/action-fusion/file-queue.ts +74 -0
  23. package/node_modules/@herbertgao/sol-pi/src/sol-pi/extensions/action-fusion/index.ts +185 -0
  24. package/node_modules/@herbertgao/sol-pi/src/sol-pi/extensions/action-fusion/then-run.ts +128 -0
  25. package/node_modules/@herbertgao/sol-pi/src/sol-pi/extensions/evidence-preserving-reducer/archive.ts +53 -0
  26. package/node_modules/@herbertgao/sol-pi/src/sol-pi/extensions/evidence-preserving-reducer/candidate.ts +101 -0
  27. package/node_modules/@herbertgao/sol-pi/src/sol-pi/extensions/evidence-preserving-reducer/config.ts +71 -0
  28. package/node_modules/@herbertgao/sol-pi/src/sol-pi/extensions/evidence-preserving-reducer/index.ts +220 -0
  29. package/node_modules/@herbertgao/sol-pi/src/sol-pi/extensions/evidence-preserving-reducer/journal.ts +25 -0
  30. package/node_modules/@herbertgao/sol-pi/src/sol-pi/extensions/evidence-preserving-reducer/provider.ts +164 -0
  31. package/node_modules/@herbertgao/sol-pi/src/sol-pi/extensions/evidence-preserving-reducer/receipt.ts +177 -0
  32. package/node_modules/@herbertgao/sol-pi/src/sol-pi/extensions/observation-pack/index.ts +227 -0
  33. package/node_modules/@herbertgao/sol-pi/src/sol-pi/extensions/observation-pack/ledger.ts +20 -0
  34. package/node_modules/@herbertgao/sol-pi/src/sol-pi/extensions/observation-pack/observation.ts +252 -0
  35. package/node_modules/@herbertgao/sol-pi/src/sol-pi/extensions/online-context-compact/economics.ts +237 -0
  36. package/node_modules/@herbertgao/sol-pi/src/sol-pi/extensions/online-context-compact/extension.ts +455 -0
  37. package/node_modules/@herbertgao/sol-pi/src/sol-pi/extensions/online-context-compact/index.ts +49 -0
  38. package/node_modules/@herbertgao/sol-pi/src/sol-pi/extensions/online-context-compact/plan.ts +79 -0
  39. package/node_modules/@herbertgao/sol-pi/src/sol-pi/extensions/online-context-compact/state.ts +208 -0
  40. package/node_modules/@herbertgao/sol-pi/src/sol-pi/extensions/online-context-compact/tools.ts +100 -0
  41. package/node_modules/@herbertgao/sol-pi/src/sol-pi/index.ts +42 -0
  42. package/node_modules/@herbertgao/sol-pi/src/sol-pi/runtime-paths.ts +17 -0
  43. package/node_modules/@herbertgao/sol-pi/src/sol-pi/tui.ts +71 -0
  44. package/node_modules/@narumitw/pi-btw/dist/index.ts +12 -2
  45. package/node_modules/@narumitw/pi-btw/dist/index.ts.map +2 -2
  46. package/node_modules/@narumitw/pi-btw/package.json +1 -1
  47. package/node_modules/@narumitw/pi-btw/src/btw.ts +13 -2
  48. package/node_modules/pi-antigravity/LICENSE +21 -0
  49. package/node_modules/pi-antigravity/README.md +194 -0
  50. package/node_modules/pi-antigravity/package.json +67 -0
  51. package/node_modules/pi-antigravity/src/auth/index.ts +14 -0
  52. package/node_modules/pi-antigravity/src/auth/oauth.ts +442 -0
  53. package/node_modules/pi-antigravity/src/client/client.ts +561 -0
  54. package/node_modules/pi-antigravity/src/client/index.ts +1 -0
  55. package/node_modules/pi-antigravity/src/diagnostics/diagnostics.ts +96 -0
  56. package/node_modules/pi-antigravity/src/diagnostics/index.ts +1 -0
  57. package/node_modules/pi-antigravity/src/image/image.ts +336 -0
  58. package/node_modules/pi-antigravity/src/image/index.ts +1 -0
  59. package/node_modules/pi-antigravity/src/index.ts +280 -0
  60. package/node_modules/pi-antigravity/src/models/discovery.ts +154 -0
  61. package/node_modules/pi-antigravity/src/models/grouping.ts +424 -0
  62. package/node_modules/pi-antigravity/src/models/index.ts +3 -0
  63. package/node_modules/pi-antigravity/src/models/models.ts +500 -0
  64. package/node_modules/pi-antigravity/src/stream/index.ts +1 -0
  65. package/node_modules/pi-antigravity/src/stream/stream.ts +1460 -0
  66. package/node_modules/pi-antigravity/src/types/enums.ts +42 -0
  67. package/node_modules/pi-antigravity/src/types/index.ts +2 -0
  68. package/node_modules/pi-antigravity/src/types/types.ts +292 -0
  69. package/node_modules/pi-antigravity/src/usage/index.ts +1 -0
  70. package/node_modules/pi-antigravity/src/usage/usage.ts +371 -0
  71. package/node_modules/pi-antigravity/src/utils/http.ts +91 -0
  72. package/node_modules/pi-antigravity/src/utils/index.ts +3 -0
  73. package/node_modules/pi-antigravity/src/utils/security.ts +73 -0
  74. package/node_modules/pi-antigravity/src/utils/util.ts +132 -0
  75. package/node_modules/pi-antigravity/tsconfig.json +21 -0
  76. package/node_modules/pi-lens/CHANGELOG.md +176 -0
  77. package/node_modules/pi-lens/README.md +13 -8
  78. package/node_modules/pi-lens/config/dependency-cruiser-eager-allowlist.json +3 -1
  79. package/node_modules/pi-lens/dist/clients/analysed-root.js +1 -0
  80. package/node_modules/pi-lens/dist/clients/ast-grep-tool-logger.js +1 -1
  81. package/node_modules/pi-lens/dist/clients/biome-client.js +13 -2
  82. package/node_modules/pi-lens/dist/clients/bounded-telemetry.js +2 -0
  83. package/node_modules/pi-lens/dist/clients/cache-observability.js +122 -1
  84. package/node_modules/pi-lens/dist/clients/complexity-client.js +5 -0
  85. package/node_modules/pi-lens/dist/clients/config-diagnostic-codes.js +2 -0
  86. package/node_modules/pi-lens/dist/clients/config-resolve.js +6 -3
  87. package/node_modules/pi-lens/dist/clients/config-schema.js +17 -0
  88. package/node_modules/pi-lens/dist/clients/config-warn.js +2 -2
  89. package/node_modules/pi-lens/dist/clients/dead-code-client.js +8 -1
  90. package/node_modules/pi-lens/dist/clients/dependency-checker.js +5 -1
  91. package/node_modules/pi-lens/dist/clients/dispatch/dispatcher.js +38 -15
  92. package/node_modules/pi-lens/dist/clients/dispatch/facts/function-facts.js +1 -1
  93. package/node_modules/pi-lens/dist/clients/dispatch/facts/import-facts.js +5 -1
  94. package/node_modules/pi-lens/dist/clients/dispatch/runners/actionlint.js +2 -1
  95. package/node_modules/pi-lens/dist/clients/dispatch/runners/biome-check.js +2 -3
  96. package/node_modules/pi-lens/dist/clients/dispatch/runners/cpp-check.js +4 -3
  97. package/node_modules/pi-lens/dist/clients/dispatch/runners/credo.js +2 -1
  98. package/node_modules/pi-lens/dist/clients/dispatch/runners/cue-vet.js +2 -1
  99. package/node_modules/pi-lens/dist/clients/dispatch/runners/dart-analyze.js +2 -1
  100. package/node_modules/pi-lens/dist/clients/dispatch/runners/detekt.js +2 -1
  101. package/node_modules/pi-lens/dist/clients/dispatch/runners/dotnet-build.js +2 -1
  102. package/node_modules/pi-lens/dist/clients/dispatch/runners/elixir-check.js +2 -1
  103. package/node_modules/pi-lens/dist/clients/dispatch/runners/eslint.js +2 -1
  104. package/node_modules/pi-lens/dist/clients/dispatch/runners/fish-indent.js +2 -1
  105. package/node_modules/pi-lens/dist/clients/dispatch/runners/gleam-check.js +2 -1
  106. package/node_modules/pi-lens/dist/clients/dispatch/runners/go-vet.js +2 -1
  107. package/node_modules/pi-lens/dist/clients/dispatch/runners/golangci-lint.js +2 -1
  108. package/node_modules/pi-lens/dist/clients/dispatch/runners/hadolint.js +2 -1
  109. package/node_modules/pi-lens/dist/clients/dispatch/runners/helm-lint.js +3 -1
  110. package/node_modules/pi-lens/dist/clients/dispatch/runners/helm-render.js +2 -1
  111. package/node_modules/pi-lens/dist/clients/dispatch/runners/htmlhint.js +2 -1
  112. package/node_modules/pi-lens/dist/clients/dispatch/runners/javac.js +2 -1
  113. package/node_modules/pi-lens/dist/clients/dispatch/runners/ktlint.js +2 -1
  114. package/node_modules/pi-lens/dist/clients/dispatch/runners/lsp.js +19 -1
  115. package/node_modules/pi-lens/dist/clients/dispatch/runners/markdownlint.js +3 -2
  116. package/node_modules/pi-lens/dist/clients/dispatch/runners/mypy.js +2 -1
  117. package/node_modules/pi-lens/dist/clients/dispatch/runners/oxlint.js +2 -1
  118. package/node_modules/pi-lens/dist/clients/dispatch/runners/php-lint.js +2 -1
  119. package/node_modules/pi-lens/dist/clients/dispatch/runners/phpstan.js +2 -1
  120. package/node_modules/pi-lens/dist/clients/dispatch/runners/prisma-validate.js +2 -1
  121. package/node_modules/pi-lens/dist/clients/dispatch/runners/psscriptanalyzer.js +12 -12
  122. package/node_modules/pi-lens/dist/clients/dispatch/runners/pyright.js +2 -1
  123. package/node_modules/pi-lens/dist/clients/dispatch/runners/rubocop.js +2 -1
  124. package/node_modules/pi-lens/dist/clients/dispatch/runners/ruff.js +2 -2
  125. package/node_modules/pi-lens/dist/clients/dispatch/runners/rust-clippy.js +12 -11
  126. package/node_modules/pi-lens/dist/clients/dispatch/runners/shellcheck.js +2 -1
  127. package/node_modules/pi-lens/dist/clients/dispatch/runners/shfmt.js +2 -1
  128. package/node_modules/pi-lens/dist/clients/dispatch/runners/spellcheck.js +2 -2
  129. package/node_modules/pi-lens/dist/clients/dispatch/runners/spotbugs.js +2 -1
  130. package/node_modules/pi-lens/dist/clients/dispatch/runners/sqlfluff.js +3 -2
  131. package/node_modules/pi-lens/dist/clients/dispatch/runners/stylelint.js +3 -2
  132. package/node_modules/pi-lens/dist/clients/dispatch/runners/swiftlint.js +2 -1
  133. package/node_modules/pi-lens/dist/clients/dispatch/runners/taplo.js +2 -1
  134. package/node_modules/pi-lens/dist/clients/dispatch/runners/terragrunt.js +2 -1
  135. package/node_modules/pi-lens/dist/clients/dispatch/runners/tflint.js +2 -1
  136. package/node_modules/pi-lens/dist/clients/dispatch/runners/trivy-config.js +2 -1
  137. package/node_modules/pi-lens/dist/clients/dispatch/runners/utils/availability-policy.js +5 -0
  138. package/node_modules/pi-lens/dist/clients/dispatch/runners/utils/candidate-probe.js +2 -2
  139. package/node_modules/pi-lens/dist/clients/dispatch/runners/utils/runner-helpers.js +8 -2
  140. package/node_modules/pi-lens/dist/clients/dispatch/runners/vale.js +2 -1
  141. package/node_modules/pi-lens/dist/clients/dispatch/runners/yamllint.js +4 -3
  142. package/node_modules/pi-lens/dist/clients/dispatch/runners/zig-check.js +2 -1
  143. package/node_modules/pi-lens/dist/clients/effective-config.js +12 -2
  144. package/node_modules/pi-lens/dist/clients/extension-log.js +2 -0
  145. package/node_modules/pi-lens/dist/clients/file-role.js +18 -1
  146. package/node_modules/pi-lens/dist/clients/finding-delivery-gate.js +4 -0
  147. package/node_modules/pi-lens/dist/clients/formatters.js +54 -188
  148. package/node_modules/pi-lens/dist/clients/generation-guard.js +4 -0
  149. package/node_modules/pi-lens/dist/clients/gitleaks-client.js +42 -6
  150. package/node_modules/pi-lens/dist/clients/govulncheck-client.js +48 -7
  151. package/node_modules/pi-lens/dist/clients/installer/index.js +196 -52
  152. package/node_modules/pi-lens/dist/clients/jscpd-client.js +9 -1
  153. package/node_modules/pi-lens/dist/clients/knip-client.js +9 -2
  154. package/node_modules/pi-lens/dist/clients/language-profile.js +12 -2
  155. package/node_modules/pi-lens/dist/clients/latency-logger.js +2 -0
  156. package/node_modules/pi-lens/dist/clients/lens-config.js +4 -0
  157. package/node_modules/pi-lens/dist/clients/lsp/config.js +36 -7
  158. package/node_modules/pi-lens/dist/clients/lsp/diagnostic-binding.js +24 -1
  159. package/node_modules/pi-lens/dist/clients/lsp/document-drift.js +78 -0
  160. package/node_modules/pi-lens/dist/clients/lsp/index.js +281 -45
  161. package/node_modules/pi-lens/dist/clients/lsp/server.js +62 -15
  162. package/node_modules/pi-lens/dist/clients/lsp/workspace-diagnostics-cache.js +37 -4
  163. package/node_modules/pi-lens/dist/clients/mcp/analyze.js +3 -0
  164. package/node_modules/pi-lens/dist/clients/mcp/session.js +2 -0
  165. package/node_modules/pi-lens/dist/clients/opengrep-client.js +2 -0
  166. package/node_modules/pi-lens/dist/clients/package-manager.js +2 -1
  167. package/node_modules/pi-lens/dist/clients/php-cs-fixer-config.js +8 -3
  168. package/node_modules/pi-lens/dist/clients/pipeline.js +3 -2
  169. package/node_modules/pi-lens/dist/clients/project-diagnostics/fresh-fetch.js +38 -10
  170. package/node_modules/pi-lens/dist/clients/project-diagnostics/runner-adapters/gitleaks.js +10 -9
  171. package/node_modules/pi-lens/dist/clients/project-lens-config.js +3 -0
  172. package/node_modules/pi-lens/dist/clients/read-guard-logger.js +2 -0
  173. package/node_modules/pi-lens/dist/clients/review-graph-logger.js +2 -0
  174. package/node_modules/pi-lens/dist/clients/ruff-client.js +18 -9
  175. package/node_modules/pi-lens/dist/clients/runtime-agent-end.js +9 -0
  176. package/node_modules/pi-lens/dist/clients/runtime-coordinator.js +5 -0
  177. package/node_modules/pi-lens/dist/clients/runtime-session.js +13 -4
  178. package/node_modules/pi-lens/dist/clients/runtime-tool-result.js +4 -1
  179. package/node_modules/pi-lens/dist/clients/runtime-turn.js +48 -1
  180. package/node_modules/pi-lens/dist/clients/security-scan-client.js +2 -2
  181. package/node_modules/pi-lens/dist/clients/session-event-guard.js +69 -1
  182. package/node_modules/pi-lens/dist/clients/sg-runner.js +2 -1
  183. package/node_modules/pi-lens/dist/clients/situational-tool-telemetry.js +108 -0
  184. package/node_modules/pi-lens/dist/clients/test-runner-client.js +291 -76
  185. package/node_modules/pi-lens/dist/clients/tool-config.js +199 -0
  186. package/node_modules/pi-lens/dist/clients/tool-cwd.js +299 -0
  187. package/node_modules/pi-lens/dist/clients/tool-probe.js +53 -0
  188. package/node_modules/pi-lens/dist/clients/tool-set-policy.js +42 -0
  189. package/node_modules/pi-lens/dist/clients/trivy-client.js +9 -1
  190. package/node_modules/pi-lens/dist/clients/turn-context.js +52 -0
  191. package/node_modules/pi-lens/dist/clients/widget-state.js +4 -3
  192. package/node_modules/pi-lens/dist/index.js +21969 -20005
  193. package/node_modules/pi-lens/dist/mcp/analyze-cli.js +3 -2
  194. package/node_modules/pi-lens/dist/mcp/server.js +135 -159
  195. package/node_modules/pi-lens/dist/tools/activate-tools.js +10 -7
  196. package/node_modules/pi-lens/dist/tools/ast-grep-outline.js +2 -13
  197. package/node_modules/pi-lens/dist/tools/ast-grep-replace.js +8 -13
  198. package/node_modules/pi-lens/dist/tools/ast-grep-search.js +83 -39
  199. package/node_modules/pi-lens/dist/tools/effective-config.js +4 -3
  200. package/node_modules/pi-lens/dist/tools/lens-diagnostic-mark.js +1 -10
  201. package/node_modules/pi-lens/dist/tools/lens-diagnostics.js +353 -85
  202. package/node_modules/pi-lens/dist/tools/lsp-diagnostics.js +21 -110
  203. package/node_modules/pi-lens/dist/tools/lsp-navigation.js +20 -44
  204. package/node_modules/pi-lens/dist/tools/module-report.js +5 -9
  205. package/node_modules/pi-lens/dist/tools/project-report.js +9 -17
  206. package/node_modules/pi-lens/dist/tools/render-compact.js +280 -1
  207. package/node_modules/pi-lens/dist/tools/symbol-search.js +2 -2
  208. package/node_modules/pi-lens/docs/agent-guide.md +3 -4
  209. package/node_modules/pi-lens/docs/agent-tools.md +46 -22
  210. package/node_modules/pi-lens/docs/configuration.md +9 -0
  211. package/node_modules/pi-lens/docs/environment-variables.md +0 -5
  212. package/node_modules/pi-lens/docs/features.md +5 -5
  213. package/node_modules/pi-lens/docs/globalconfig.md +11 -1
  214. package/node_modules/pi-lens/docs/mcp.md +13 -1
  215. package/node_modules/pi-lens/docs/pi-lens-fixer.md +71 -0
  216. package/node_modules/pi-lens/docs/pi-lens-investigator.md +15 -0
  217. package/node_modules/pi-lens/docs/pi-lens-monitor.md +88 -0
  218. package/node_modules/pi-lens/docs/pi-lens-reviewer.md +35 -0
  219. package/node_modules/pi-lens/docs/pi-lens-subagent.md +12 -4
  220. package/node_modules/pi-lens/docs/public-api-stability.md +1 -0
  221. package/node_modules/pi-lens/docs/real-harness.md +46 -0
  222. package/node_modules/pi-lens/docs/release-qa-baseline.md +5 -1
  223. package/node_modules/pi-lens/docs/servercapabilities.md +1 -6
  224. package/node_modules/pi-lens/docs/settings.md +37 -2
  225. package/node_modules/pi-lens/docs/tools_improvement2.md +4 -4
  226. package/node_modules/pi-lens/docs/tree-sitter_rules_catalog.md +1 -1
  227. package/node_modules/pi-lens/docs/usage.md +13 -3
  228. package/node_modules/pi-lens/package.json +10 -1
  229. package/node_modules/pi-lens/rules/tree-sitter-queries/typescript/sql-injection.yml +7 -3
  230. package/node_modules/pi-lens/skills/pi-lens-ast-grep/SKILL.md +8 -6
  231. package/node_modules/pi-lens/skills/pi-lens-lsp-navigation/SKILL.md +19 -9
  232. package/node_modules/pi-web-access/CHANGELOG.md +29 -0
  233. package/node_modules/pi-web-access/README.md +33 -22
  234. package/node_modules/pi-web-access/abortable.ts +17 -0
  235. package/node_modules/pi-web-access/crawl4ai.ts +204 -0
  236. package/node_modules/pi-web-access/credential-source.ts +1 -0
  237. package/node_modules/pi-web-access/curator-page.ts +20 -2
  238. package/node_modules/pi-web-access/curator-run.ts +44 -0
  239. package/node_modules/pi-web-access/curator-server.ts +3 -1
  240. package/node_modules/pi-web-access/duckduckgo.ts +1 -1
  241. package/node_modules/pi-web-access/extract.ts +57 -12
  242. package/node_modules/pi-web-access/fetch-params.ts +1 -1
  243. package/node_modules/pi-web-access/gemini-search.ts +9 -5
  244. package/node_modules/pi-web-access/index.ts +25 -18
  245. package/node_modules/pi-web-access/openai-search.ts +35 -13
  246. package/node_modules/pi-web-access/package.json +2 -2
  247. package/node_modules/pi-web-access/page-query.ts +5 -2
  248. package/node_modules/pi-web-access/query-rewrite.ts +5 -2
  249. package/node_modules/pi-web-access/serpapi.ts +220 -0
  250. package/node_modules/pi-web-access/ssrf-protection.ts +5 -1
  251. package/node_modules/pi-web-access/storage.ts +10 -0
  252. package/node_modules/pi-web-access/summary-review.ts +34 -21
  253. package/node_modules/pi-web-access/utils.ts +6 -4
  254. package/package.json +11 -5
  255. package/node_modules/pi-lens/dist/tools/ast-dump.js +0 -103
package/README.md CHANGED
@@ -10,12 +10,14 @@ pi install npm:@herbertgao/pi-extensions
10
10
 
11
11
  Requires Node.js 24 or newer and Pi 0.84.4 or newer.
12
12
 
13
- The package bundles 4 active `@herbertgao/*` child packages—`pi-bark`, `pi-cc-extensions`, `resume-from`, and `pi-subagents`—plus the following upstream packages under their original names:
13
+ The package bundles 6 active `@herbertgao/*` child packages—`pi-bark`, `pi-cc-extensions`, `resume-from`, `pi-subagents`, `sol-pi`, and the maintained Antigravity provider mirror—plus the following upstream packages under their original names:
14
14
 
15
+ - `pi-antigravity@0.7.2`
15
16
  - `@dietrichgebert/ponytail@4.9.0`
16
17
  - `@juicesharp/rpiv-ask-user-question@2.8.0`
17
18
  - `@luxusai/pi-hindsight@0.12.0`
18
19
  - `@narumitw/pi-btw@0.57.0`
20
+
19
21
  - `@narumitw/pi-caffeinate@0.49.7`
20
22
  - `@pi-plugins/fast-mode@0.1.10`
21
23
  - `@tifan/pi-copy-response@0.2.6`
@@ -40,7 +42,7 @@ Pi loads their extensions and skills through `node_modules/` paths inside one pa
40
42
 
41
43
  `@narumitw/pi-caffeinate@0.49.7` uses the host platform's sleep inhibitor during each Pi agent run. On macOS, `/caffeinate sleep` keeps the system awake while allowing the display to sleep; `/caffeinate display` also keeps the display awake. It releases the inhibitor when the run or session ends.
42
44
 
43
- `@herbertgao/resume-from@0.2.0` keeps Claude Code sessions associated with their original repository when the active transcript later moves into a nested cwd. `pi-lens@4.1.3` expands language routing and bounds retained diagnostic facts across multi-root sessions. `pi-automode@1.15.0` preserves dynamic providers on legacy registries. `pi-web-access@0.27.0` adds configurable fetch deadlines and answer models plus isolated GitHub clone runtimes. Preferred Thinking 1.0.1 preserves an explicit subagent `--thinking` choice. Deprecated `@tifan/pi-titlebar-spinner` is no longer bundled; Rename remains the single owner of Herdr tab naming.
45
+ `@herbertgao/resume-from@0.2.0` keeps Claude Code sessions associated with their original repository when the active transcript later moves into a nested cwd. `@herbertgao/sol-pi@0.1.0` adds opt-in Action Fusion, ObservationPack, Evidence-Preserving Reducer, and Online Context Compact; see its [configuration guide](../sol-pi/docs/configuration.md). `pi-lens@4.1.3` expands language routing and bounds retained diagnostic facts across multi-root sessions. `pi-automode@1.15.0` preserves dynamic providers on legacy registries. `pi-web-access@0.27.0` adds configurable fetch deadlines and answer models plus isolated GitHub clone runtimes. Preferred Thinking 1.0.1 preserves an explicit subagent `--thinking` choice. Deprecated `@tifan/pi-titlebar-spinner` is no longer bundled; Rename remains the single owner of Herdr tab naming.
44
46
 
45
47
  `pi-stash` is no longer bundled: `/btw` already preserves the main editor draft while handling side questions outside the main conversation. Prior `@herbertgao/pi-stash` releases remain available but are no longer maintained here.
46
48
 
@@ -63,3 +63,52 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
63
63
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
64
64
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
65
65
  SOFTWARE.
66
+
67
+ ## `@herbertgao/sol-pi`
68
+
69
+ The aggregate bundles [`@herbertgao/sol-pi`](https://github.com/HerbertGao/pi-extensions/tree/master/packages/sol-pi) version 0.1.0. Its source is republished from [`NVlabs/SoL-Pi`](https://github.com/NVlabs/SoL-Pi) under the MIT license:
70
+
71
+ Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
72
+
73
+ Permission is hereby granted, free of charge, to any person obtaining a
74
+ copy of this software and associated documentation files (the "Software"),
75
+ to deal in the Software without restriction, including without limitation
76
+ the rights to use, copy, modify, merge, publish, distribute, sublicense,
77
+ and/or sell copies of the Software, and to permit persons to whom the
78
+ Software is furnished to do so, subject to the following conditions:
79
+
80
+ The above copyright notice and this permission notice shall be included in
81
+ all copies or substantial portions of the Software.
82
+
83
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
84
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
85
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
86
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
87
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
88
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
89
+ THE SOFTWARE.
90
+
91
+ ## `pi-antigravity`
92
+
93
+ The aggregate bundles the MIT-licensed [`pi-antigravity`](https://github.com/Rahularya01/pi-antigravity) package version 0.7.2 under its original attribution:
94
+
95
+ MIT License
96
+
97
+ Copyright (c) 2026 Rahul Arya
98
+
99
+ Permission is hereby granted, free of charge, to any person obtaining a copy
100
+ of this software and associated documentation files (the "Software"), to deal
101
+ in the Software without restriction, including without limitation the rights
102
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
103
+ copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
104
+
105
+ The above copyright notice and this permission notice shall be included in all
106
+ copies or substantial portions of the Software.
107
+
108
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
109
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
110
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
111
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
112
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
113
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
114
+ THE SOFTWARE.
@@ -34,8 +34,8 @@ import {
34
34
  import { renderRichToolResult } from "./tool/diff/index.ts";
35
35
  import type { WriteExecutionMetadataStore } from "./tool/diff/write-execution.ts";
36
36
  import {
37
+ formatDisplayPath,
37
38
  insetComponent,
38
- oneLine,
39
39
  renderExpandedToolResult,
40
40
  scheduleAnimation,
41
41
  } from "./tool/result.ts";
@@ -552,7 +552,8 @@ function compactEditWriteLine(
552
552
  visibleWidth(statsText) +
553
553
  visibleWidth(hintText);
554
554
  const pathWidth = Math.max(0, width - fixedWidth - (path ? 1 : 0));
555
- const pathPart = pathWidth > 0 && path ? ` ${oneLine(path, pathWidth)}` : "";
555
+ const pathPart =
556
+ pathWidth > 0 && path ? ` ${formatDisplayPath(path, component.cwd, pathWidth)}` : "";
556
557
  const line = `${iconPart}${namePart}${theme.fg("toolTitle", pathPart)}${statsStyled}${hintText ? theme.fg("dim", hintText) : ""}`;
557
558
  return ["", truncateToWidth(line, width, "")];
558
559
  }
@@ -10,12 +10,13 @@ import { config, getToolDisplayConfig, type CompactStyleMode } from "../config/c
10
10
  import { isToolCallHovered } from "./mouse/interaction.ts";
11
11
  import {
12
12
  countLines,
13
+ fitToolCallSummary,
13
14
  hasExpandableDetail,
14
- headTruncateToWidth,
15
15
  insetComponent,
16
16
  isToolExpanded,
17
17
  oneLine,
18
18
  outputLineCount,
19
+ pathSummary,
19
20
  pendingIcon,
20
21
  renderCollapsedToolResultToWidth,
21
22
  renderExpandedToolResult,
@@ -26,6 +27,7 @@ import {
26
27
  textFromResult,
27
28
  toolIconColor,
28
29
  toolViewportWidth,
30
+ type ToolCallSummary,
29
31
  } from "./tool/result.ts";
30
32
  import { showMoreHintText } from "./show-more-hint.ts";
31
33
  import { renderRichToolResult, type WriteExecutionMetadataStore } from "./tool/diff/index.ts";
@@ -152,7 +154,8 @@ function singleToolCallSummary(
152
154
  toolName: string,
153
155
  label: string,
154
156
  args: any,
155
- ): { main: string; detail: string } {
157
+ cwd?: string,
158
+ ): ToolCallSummary {
156
159
  const title = label === toolName ? humanizeToolLabel(label) : label;
157
160
  if (!args || typeof args !== "object") return { main: title, detail: "" };
158
161
  const name = toolName.toLowerCase();
@@ -201,14 +204,17 @@ function singleToolCallSummary(
201
204
  args.offset !== undefined ? `offset=${args.offset}` : "",
202
205
  args.limit !== undefined ? `limit=${args.limit}` : "",
203
206
  ].filter(Boolean);
204
- return {
205
- main: `${title}${args.path ? ` ${oneLine(args.path)}` : ""}`,
206
- detail: details.length ? ` (${details.join(", ")})` : "",
207
- };
207
+ const detail = details.length ? ` (${details.join(", ")})` : "";
208
+ if (typeof args.path === "string" && args.path) {
209
+ return pathSummary(title, args.path, cwd, detail);
210
+ }
211
+ return { main: title, detail };
212
+ }
213
+ const preferredPath = args.path ?? args.file_path;
214
+ if (typeof preferredPath === "string" && preferredPath) {
215
+ return pathSummary(title, preferredPath, cwd);
208
216
  }
209
217
  const preferred =
210
- args.path ??
211
- args.file_path ??
212
218
  args.command ??
213
219
  args.query ??
214
220
  args.question ??
@@ -324,7 +330,7 @@ function createCcstyleTool(
324
330
  visualState === "success"
325
331
  ? `${BRIGHT_GREEN}${rawIcon}${ANSI_FG_RESET}`
326
332
  : theme.fg(toolIconColor(context), rawIcon);
327
- const summary = singleToolCallSummary(toolName, label, args);
333
+ const summary = singleToolCallSummary(toolName, label, args, context?.cwd);
328
334
  let cachedWidth: number | undefined;
329
335
  let cachedLine: string | undefined;
330
336
  return {
@@ -334,8 +340,7 @@ function createCcstyleTool(
334
340
  const callWidth = Math.max(0, viewportWidth - visibleWidth(icon) - 2);
335
341
  const mainWidth = Math.max(0, callWidth - visibleWidth(summary.detail));
336
342
  cachedWidth = width;
337
- // 纯文本先截断再着色(省略号不带 ANSI);从头截断,与多 tool 一致
338
- const line = ` ${icon} ${theme.fg("toolTitle", headTruncateToWidth(summary.main, mainWidth))}${theme.fg("dim", summary.detail)}`;
343
+ const line = ` ${icon} ${theme.fg("toolTitle", fitToolCallSummary(summary, mainWidth))}${theme.fg("dim", summary.detail)}`;
339
344
  cachedLine = truncateToWidth(line, viewportWidth, "");
340
345
  return [cachedLine];
341
346
  },
@@ -52,7 +52,7 @@ interface DiffTheme {
52
52
  type DiffLineKind = "add" | "remove" | "context";
53
53
  type DiffEntryKind = "line" | "meta" | "hunk" | "file";
54
54
 
55
- interface DiffLineEntry {
55
+ export interface DiffLineEntry {
56
56
  kind: "line";
57
57
  lineKind: DiffLineKind;
58
58
  oldLineNumber: number | null;
@@ -72,7 +72,7 @@ interface DiffMetaEntry {
72
72
 
73
73
  type ParsedDiffEntry = DiffLineEntry | DiffMetaEntry;
74
74
 
75
- interface ParsedDiff {
75
+ export interface ParsedDiff {
76
76
  entries: ParsedDiffEntry[];
77
77
  stats: DiffStats;
78
78
  }
@@ -131,7 +131,9 @@ type CodeLineHighlighter = (line: string, entry: DiffLineEntry) => string;
131
131
 
132
132
  const CANONICAL_LINE_PATTERN = /^([+\- ])(\s*\d+)\|(.*)$/;
133
133
  const HASHLINE_ANCHOR_LINE_PATTERN = /^([+\- ])(\s*\d+)#([A-Za-z0-9]+| {2}):(.*)$/;
134
+ // Pi 仍使用空格分隔的行号格式;仅在无 hunk 头时可安全识别。
134
135
  const LEGACY_LINE_PATTERN = /^([+\- ])(\s*\d+)\s(.*)$/;
136
+ const PI_OMISSION_LINE_PATTERN = /^ {3,}\.\.\.$/;
135
137
  const HUNK_HEADER_PATTERN = /^@@\s+-(\d+)(?:,(\d+))?\s+\+(\d+)(?:,(\d+))?\s+@@(.*)$/;
136
138
  const SPLIT_SEPARATOR = " │ ";
137
139
  const MIN_LINE_NUMBER_WIDTH = 2;
@@ -374,7 +376,10 @@ function toParsedDiffLine(
374
376
  return { lineKind: "context", lineNumber: normalizedLineNumber, content };
375
377
  }
376
378
 
377
- function parseCanonicalDiffLine(line: string): {
379
+ function parseCanonicalDiffLine(
380
+ line: string,
381
+ allowPiFormat: boolean,
382
+ ): {
378
383
  lineKind: DiffLineKind;
379
384
  lineNumber: string;
380
385
  content: string;
@@ -393,7 +398,7 @@ function parseCanonicalDiffLine(line: string): {
393
398
  }
394
399
 
395
400
  const canonicalMatch = line.match(CANONICAL_LINE_PATTERN);
396
- const legacyMatch = canonicalMatch ? null : line.match(LEGACY_LINE_PATTERN);
401
+ const legacyMatch = canonicalMatch || !allowPiFormat ? null : line.match(LEGACY_LINE_PATTERN);
397
402
  const matched = canonicalMatch ?? legacyMatch;
398
403
  if (!matched) {
399
404
  return null;
@@ -486,7 +491,7 @@ function ensureImplicitHunk(currentHunk: number): number {
486
491
  return currentHunk > 0 ? currentHunk : 1;
487
492
  }
488
493
 
489
- function parseDiff(diffText: string): ParsedDiff {
494
+ export function parseDiff(diffText: string): ParsedDiff {
490
495
  const stats: DiffStats = {
491
496
  added: 0,
492
497
  removed: 0,
@@ -505,12 +510,14 @@ function parseDiff(diffText: string): ParsedDiff {
505
510
  let oldLineCursor: number | null = null;
506
511
  let newLineCursor: number | null = null;
507
512
  let lineNumberDelta = 0;
513
+ let hasHunkHeader = false;
508
514
 
509
515
  for (const rawLine of diffText.replace(/\r/g, "").split("\n")) {
510
516
  stats.lines++;
511
517
 
512
518
  const hunkMatch = rawLine.match(HUNK_HEADER_PATTERN);
513
519
  if (hunkMatch) {
520
+ hasHunkHeader = true;
514
521
  hunkIndex++;
515
522
  stats.hunks = Math.max(stats.hunks, hunkIndex);
516
523
  oldLineCursor = toNumber(hunkMatch[1]);
@@ -535,7 +542,14 @@ function parseDiff(diffText: string): ParsedDiff {
535
542
  lineNumberDelta = 0;
536
543
  }
537
544
 
538
- const canonical = parseCanonicalDiffLine(rawLine);
545
+ // Pi 用空白行号填充省略上下文;它不是源码行,也不推进行号游标。
546
+ if (!hasHunkHeader && PI_OMISSION_LINE_PATTERN.test(rawLine)) {
547
+ entries.push(createMetaEntry(rawLine, hunkIndex));
548
+ continue;
549
+ }
550
+
551
+ // Pi 无 hunk 头时的数字行号与 unified hunk 中的数字源码文本存在歧义。
552
+ const canonical = parseCanonicalDiffLine(rawLine, !hasHunkHeader);
539
553
  if (canonical) {
540
554
  hunkIndex = ensureImplicitHunk(hunkIndex);
541
555
  stats.hunks = Math.max(stats.hunks, hunkIndex);
@@ -8,6 +8,7 @@ import {
8
8
  } from "@earendil-works/pi-tui";
9
9
  import { TOOL_LOADING_INTERVAL_MS, toolLoadingIcon } from "../../utils/tool-loading-icon.ts";
10
10
  import { sanitizeToolResultText } from "../../utils/tool-result-sanitize.ts";
11
+ import { fitToolCallSummary, pathSummary, type ToolCallSummary } from "./result.ts";
11
12
  import { isToolTuiFullscreen, showMoreHintText } from "../show-more-hint.ts";
12
13
 
13
14
  const PATCH_KEY = Symbol.for("pi.ccstyle.tool-grouping-patch");
@@ -172,7 +173,7 @@ function humanizeToolName(name: string): string {
172
173
  .replace(/\b\w/g, (char) => char.toUpperCase());
173
174
  }
174
175
 
175
- function toolSummary(tool: any): { main: string; detail: string } {
176
+ function toolSummary(tool: any): ToolCallSummary {
176
177
  const name = toolName(tool);
177
178
  const lowerName = name.toLowerCase();
178
179
  const args = tool?.args ?? {};
@@ -232,10 +233,11 @@ function toolSummary(tool: any): { main: string; detail: string } {
232
233
  args.offset !== undefined ? `offset=${args.offset}` : "",
233
234
  args.limit !== undefined ? `limit=${args.limit}` : "",
234
235
  ].filter(Boolean);
235
- return {
236
- main: `Read ${oneLine(args.path || "...")}`,
237
- detail: details.length ? ` (${details.join(", ")})` : "",
238
- };
236
+ const detail = details.length ? ` (${details.join(", ")})` : "";
237
+ if (typeof args.path === "string" && args.path) {
238
+ return pathSummary("Read", args.path, tool?.cwd, detail);
239
+ }
240
+ return { main: "Read ...", detail };
239
241
  }
240
242
  if (name === "bash") return { main: `Bash ${oneLine(args.command || "...")}`, detail: "" };
241
243
  if (name === "grep") {
@@ -456,11 +458,14 @@ export class ToolGroupComponent extends Container {
456
458
  const continuation = index === total - 1 ? " " : "│ ";
457
459
  if (!this._expanded) {
458
460
  const summary = toolSummary(tool);
461
+ const prefix = ` ${fg("dim", branch)} ${fg(color, statusIcon(toolStatus))} `;
462
+ const detail = fg("dim", summary.detail);
463
+ const mainWidth = Math.max(0, width - visibleWidth(prefix) - visibleWidth(detail));
459
464
  lines.push(
460
465
  truncateToWidth(
461
- ` ${fg("dim", branch)} ${fg(color, statusIcon(toolStatus))} ${fg("toolTitle", summary.main)}${fg("dim", summary.detail)}`,
466
+ `${prefix}${fg("toolTitle", fitToolCallSummary(summary, mainWidth))}${detail}`,
462
467
  width,
463
- "",
468
+ "",
464
469
  ),
465
470
  );
466
471
  continue;
@@ -1,4 +1,5 @@
1
1
  import { Text, truncateToWidth, visibleWidth, wrapTextWithAnsi } from "@earendil-works/pi-tui";
2
+ import { posix, win32 } from "node:path";
2
3
  import { inspect } from "node:util";
3
4
  import { config } from "../../config/config.ts";
4
5
  import { showMoreHintText } from "../show-more-hint.ts";
@@ -557,6 +558,103 @@ export function middleTruncateToWidth(text: string, width: number): string {
557
558
  return `${left}…${right}`;
558
559
  }
559
560
 
561
+ export type ToolCallSummary = {
562
+ main: string;
563
+ detail: string;
564
+ /** 路径摘要保留结构,供最终渲染按实际宽度优先保留文件名。 */
565
+ path?: { prefix: string; value: string };
566
+ };
567
+
568
+ function pathApi(value: string) {
569
+ if (win32.isAbsolute(value)) return win32;
570
+ if (posix.isAbsolute(value)) return posix;
571
+ return undefined;
572
+ }
573
+
574
+ /** cwd 内绝对路径转相对路径;cwd 外路径保持不变。 */
575
+ export function displayPath(value: unknown, cwd?: string): string {
576
+ const text = oneLine(value, 4096);
577
+ const base = cwd ? oneLine(cwd, 4096) : "";
578
+ const api = pathApi(text);
579
+ if (!api || !base || !api.isAbsolute(base)) return text;
580
+ const relative = api.relative(base, text);
581
+ if (!relative) return api.basename(text) || ".";
582
+ if (relative === ".." || relative.startsWith(`..${api.sep}`) || api.isAbsolute(relative)) {
583
+ return text;
584
+ }
585
+ return relative;
586
+ }
587
+
588
+ function headToWidth(text: string, width: number, ellipsis = ""): string {
589
+ if (visibleWidth(text) <= width) return text;
590
+ if (width <= 0) return "";
591
+ const suffix = visibleWidth(ellipsis) <= width ? ellipsis : "";
592
+ const contentWidth = width - visibleWidth(suffix);
593
+ let head = "";
594
+ for (const char of Array.from(text)) {
595
+ if (visibleWidth(head + char) > contentWidth) break;
596
+ head += char;
597
+ }
598
+ return head + suffix;
599
+ }
600
+
601
+ function tailToWidth(text: string, width: number): string {
602
+ if (width <= 0) return "";
603
+ let tail = "";
604
+ for (const char of Array.from(text).reverse()) {
605
+ if (visibleWidth(char + tail) > width) break;
606
+ tail = char + tail;
607
+ }
608
+ return tail;
609
+ }
610
+
611
+ /** 中间截断路径:目录保留开头,末尾优先完整保留文件名。 */
612
+ export function truncatePathToWidth(path: string, width: number): string {
613
+ if (visibleWidth(path) <= width) return path;
614
+ if (width <= 1) return width === 1 ? "…" : "";
615
+ const separatorIndex = Math.max(path.lastIndexOf("/"), path.lastIndexOf("\\"));
616
+ const filename = separatorIndex >= 0 ? path.slice(separatorIndex + 1) : path;
617
+ const filenameWidth = visibleWidth(filename);
618
+ if (separatorIndex >= 0 && filenameWidth + 1 <= width) {
619
+ const separator = path[separatorIndex]!;
620
+ const suffix = `${separator}${filename}`;
621
+ const prefixWidth = width - visibleWidth(suffix) - 1;
622
+ const prefix = headToWidth(path.slice(0, separatorIndex), Math.max(0, prefixWidth));
623
+ return `${prefix}…${prefix ? suffix : filename}`;
624
+ }
625
+ const leftWidth = Math.max(1, Math.floor((width - 1) * 0.45));
626
+ const rightWidth = Math.max(0, width - leftWidth - 1);
627
+ return `${headToWidth(filename, leftWidth)}…${tailToWidth(filename, rightWidth)}`;
628
+ }
629
+
630
+ /** 路径展示的统一入口:相对化后按当前可用宽度中间截断。 */
631
+ export function formatDisplayPath(value: unknown, cwd: string | undefined, width: number): string {
632
+ return truncatePathToWidth(displayPath(value, cwd), Math.max(0, Math.floor(width)));
633
+ }
634
+
635
+ /** 按最终终端宽度渲染摘要;路径摘要不会再被整行头部截断。 */
636
+ export function fitToolCallSummary(summary: ToolCallSummary, width: number): string {
637
+ if (!summary.path) return headTruncateToWidth(summary.main, width);
638
+ const prefix = summary.path.prefix;
639
+ const pathWidth = Math.max(0, width - visibleWidth(prefix) - 1);
640
+ if (pathWidth <= 0) return headTruncateToWidth(prefix, width);
641
+ return `${prefix} ${truncatePathToWidth(summary.path.value, pathWidth)}`;
642
+ }
643
+
644
+ export function pathSummary(
645
+ prefix: string,
646
+ value: unknown,
647
+ cwd: string | undefined,
648
+ detail = "",
649
+ ): ToolCallSummary {
650
+ const path = displayPath(value, cwd);
651
+ return {
652
+ main: `${prefix} ${path}`,
653
+ detail,
654
+ path: { prefix, value: path },
655
+ };
656
+ }
657
+
560
658
  /** Pretty-print tool call args for the expanded Input section. */
561
659
  export function formatToolInputArgs(args: unknown, maxChars = 8_000): string {
562
660
  if (args === undefined || args === null) return "";
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@herbertgao/pi-cc-extensions",
3
- "version": "0.9.0",
3
+ "version": "0.9.1",
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.69",
72
+ "version": "0.8.70",
73
73
  "repository": "https://github.com/minuque/pi-cc-extensions",
74
- "commit": "5d7a2666f51da9f450bd019af10200c88cc1df98"
74
+ "commit": "9f200064951ffb148ecec2e1cf0dab7a2940f823"
75
75
  }
76
76
  }
@@ -0,0 +1,19 @@
1
+ Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a
4
+ copy of this software and associated documentation files (the "Software"),
5
+ to deal in the Software without restriction, including without limitation
6
+ the rights to use, copy, modify, merge, publish, distribute, sublicense,
7
+ and/or sell copies of the Software, and to permit persons to whom the
8
+ Software is furnished to do so, subject to the following conditions:
9
+
10
+ The above copyright notice and this permission notice shall be included in
11
+ all copies or substantial portions of the Software.
12
+
13
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
16
+ THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
18
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
19
+ DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,159 @@
1
+ <p align="center">
2
+ <img src="assets/sol-pi-hero.png" width="100%" alt="SoL-Pi: Scaling Auto-Research Loops for Efficient Agent Harnesses" />
3
+ </p>
4
+
5
+ # ⚡ SoL-Pi: Scaling Auto-Research Loops for Efficient Agent Harnesses
6
+
7
+ <p align="center">
8
+ <a href="#getting-started"><img src="https://img.shields.io/badge/Getting%20Started-Install-76B900" alt="Getting Started" /></a>
9
+ <a href="docs/configuration.md"><img src="https://img.shields.io/badge/Docs-Configuration-555555" alt="Configuration" /></a>
10
+ <a href="https://nvlabs.github.io/SoL-Pi/"><img src="https://img.shields.io/badge/Blog-SoL--Pi-76B900" alt="SoL-Pi Blog" /></a>
11
+ <a href="LICENSE"><img src="https://img.shields.io/badge/License-MIT-blue.svg" alt="MIT License" /></a>
12
+ </p>
13
+
14
+ > [!NOTE]
15
+ > This package republishes the MIT-licensed SoL-Pi source from [NVlabs/SoL-Pi](https://github.com/NVlabs/SoL-Pi) at the reviewed commit recorded in `package.json`. It is maintained here as `@herbertgao/sol-pi`, not an official distribution of Pi or NVIDIA.
16
+ >
17
+ > The package is independently loadable and is bundled by `@herbertgao/pi-extensions`; its aggregate entry is covered by the collection smoke test.
18
+
19
+ ## 💡 TL;DR
20
+
21
+ **Spend less without making the agent do less useful work.**
22
+
23
+ SoL-Pi is a standalone extension for Pi that packages four reusable efficiency mechanisms discovered through scaled auto-research loops. It reduces repeated model turns, context replay, oversized observations, and unnecessary long-log reading while preserving the work and evidence an agent needs to finish a task.
24
+
25
+ SoL-Pi installs on top of an unmodified Pi release. Every mechanism is opt-in and disabled by default.
26
+
27
+ ## Introduction
28
+
29
+ Long-running coding agents accumulate repeated work. A file edit is often followed by a predictable validation command. Large tool results are replayed long after their first use. Completed subtasks remain in active context, and a frontier model may spend a full request reading a log when only a few lines affect the next decision.
30
+
31
+ SoL-Pi grew out of a broader question from our auto-research work: before scaling agent loops, can agents first make the harness itself more efficient? The search focused on constrained efficiency: reducing token traffic, inference work, and agent turns without stopping early, skipping verification, or hiding evidence.
32
+
33
+ The standalone release contains four mechanisms that survived that process. They operate at different parts of the harness and compose through Pi's public extension APIs.
34
+
35
+ ## What SoL-Pi Adds
36
+
37
+ | Area | Mechanism | What changes |
38
+ | --- | --- | --- |
39
+ | Tools | **Action Fusion** | An edit or write can run its follow-up validation command in the same tool call. |
40
+ | Observations | **ObservationPack** | Repeated large text results become stable handles with exact paged recall. |
41
+ | Delegation | **Evidence-Preserving Reducer** | Long diagnostic logs become compact receipts only when every retained quotation matches the archived source. |
42
+ | Context | **Online Context Compact** | Completed plan steps become candidate points for Pi's native compaction, subject to economic and window-pressure checks; after a successful compaction, Pi continues the task in a new turn. |
43
+
44
+ The mechanisms share four rules:
45
+
46
+ - **No Pi patches.** SoL-Pi imports public Pi APIs and does not vendor the Pi source tree.
47
+ - **Explicit opt-in.** A missing configuration leaves every mechanism disabled.
48
+ - **Preserve evidence.** Original observations remain available locally, and reducer failures leave the original result unchanged.
49
+ - **Use Pi's runtime choices.** Authentication, provider URLs, the main model, and shell behavior remain under Pi's control.
50
+
51
+ ## Technical Details and Core Insights
52
+
53
+ Read the [SoL-Pi blog](https://nvlabs.github.io/SoL-Pi/) for a deeper look at the technical details, design rationale, and core insights behind SoL-Pi, including how auto-research led to the four efficiency mechanisms and how they work.
54
+
55
+ ## Getting Started
56
+
57
+ ### Requirements
58
+
59
+ - Node.js 22.19 or newer
60
+ - npm
61
+ - `@earendil-works/pi-coding-agent` 0.84.2
62
+
63
+ ### Install
64
+
65
+ Install the tested Pi release:
66
+
67
+ ```bash
68
+ npm install --global @earendil-works/pi-coding-agent@0.84.2
69
+ ```
70
+
71
+ Then install SoL-Pi directly from [NVlabs/SoL-Pi](https://github.com/NVlabs/SoL-Pi):
72
+
73
+ ```bash
74
+ pi install git:github.com/NVlabs/SoL-Pi
75
+ ```
76
+
77
+ To install it only for the current project, use the project-local scope:
78
+
79
+ ```bash
80
+ pi install git:github.com/NVlabs/SoL-Pi --local --approve
81
+ ```
82
+
83
+ ### Configure
84
+
85
+ SoL-Pi uses a single effective configuration. With the official Pi distribution, it looks for a `sol-pi.json` file in the following locations, in order:
86
+
87
+ 1. `.pi/sol-pi.json` in the current project, if the project is trusted and the file exists;
88
+ 2. `~/.pi/agent/sol-pi.json` otherwise.
89
+
90
+ If neither file exists, SoL-Pi uses its built-in defaults. The project-level configuration takes precedence over the user-level configuration; the two files are not merged.
91
+
92
+ The following conservative configuration enables only the two local mechanisms that make no additional model calls and do not stop an active run:
93
+
94
+ ```json
95
+ {
96
+ "version": 1,
97
+ "actionFusion": true,
98
+ "observationPack": true,
99
+ "evidencePreservingReducer": false,
100
+ "onlineContextCompact": false,
101
+ "cacheWriteReadRatio": 12.5
102
+ }
103
+ ```
104
+
105
+ Enable additional mechanisms only after reviewing their configuration and security implications. SoL-Pi uses no dedicated environment variables; feature flags, the reducer provider/model route, and the compaction ratio are configured in `sol-pi.json`.
106
+
107
+ For the complete schema, see [Configuration](docs/configuration.md). Coding agents and automated environments should follow the canonical [agent installation and configuration protocol](agents-install.md). Its all-enabled profile is checked with `scripts/check-sol-pi-config.mjs --require-all-enabled`.
108
+
109
+ ## Storage and Security
110
+
111
+ ObservationPack and Evidence-Preserving Reducer store session-specific archives under:
112
+
113
+ ```text
114
+ <session-directory>/sol-pi/<session-id>/
115
+ ├── observation-pack/
116
+ └── evidence-preserving-reducer/
117
+ ```
118
+
119
+ They archive eligible source material in this directory. The archived copies remain local and are not automatically deleted when the Pi session ends.
120
+
121
+ Online Context Compact stores its state in Pi's session log. After a successful compaction, it starts a new turn and automatically continues the active task. Cancelling the run or exiting Pi does not trigger automatic continuation.
122
+
123
+ Evidence-Preserving Reducer may send eligible diagnostic-log content to its configured reducer model using Pi-managed authentication. Review [SECURITY.md](SECURITY.md) before enabling it. Do not enable remote reduction for logs that must remain local.
124
+
125
+ ## Documentation
126
+
127
+ | Document | Purpose |
128
+ | --- | --- |
129
+ | [Configuration](docs/configuration.md) | Config search order, schema, defaults, and trust behavior |
130
+ | [Compatibility](docs/compatibility.md) | Supported Pi APIs and standalone integration details |
131
+ | [Security](SECURITY.md) | Local storage, remote reduction, and sensitive behavior |
132
+ | [Agent installation](agents-install.md) | Reproducible installation and all-enabled validation procedure |
133
+
134
+ ## Development
135
+
136
+ Install from the lockfile and run the complete source checks:
137
+
138
+ ```bash
139
+ npm ci --ignore-scripts
140
+ npm run check
141
+ npm audit --audit-level=high
142
+ node scripts/check-pi-compat.mjs
143
+ ```
144
+
145
+ `npm run check` covers TypeScript, the complete test suite, and package inspection. The development dependency set is pinned to Pi 0.84.2; runtime Pi packages remain peer dependencies so Pi owns their installation and upgrades.
146
+
147
+ ## Project Status
148
+
149
+ SoL-Pi is developed and maintained by NVIDIA as a standalone extension for Pi.
150
+
151
+ External code contributions are not accepted at this time. Bug reports and private security reports remain welcome through the channels described in [CONTRIBUTING.md](CONTRIBUTING.md) and [SECURITY.md](SECURITY.md).
152
+
153
+ ## Acknowledgements
154
+
155
+ SoL-Pi builds on the public extension interfaces provided by [Pi](https://github.com/earendil-works/pi). Pi remains an independent upstream project and is not vendored into this repository.
156
+
157
+ ## License
158
+
159
+ SoL-Pi is released under the [MIT License](LICENSE).
@@ -0,0 +1,26 @@
1
+ # Security Policy
2
+
3
+ SoL-Pi is a Pi extension. It runs with the filesystem, process, network, and credential permissions of the Pi process that loads it. SoL-Pi is not a sandbox or permission boundary.
4
+
5
+ ## Sensitive behavior
6
+
7
+ - Action Fusion can modify files and run shell commands requested by the model.
8
+ - ObservationPack stores large tool results under Pi's session directory.
9
+ - Evidence-Preserving Reducer archives diagnostic logs locally and, when explicitly enabled, sends eligible logs through the configured reducer model using Pi-managed authentication.
10
+ - The reducer skips text matching its likely-secret detector, but that detector is a precaution rather than a complete secret scanner. Do not enable remote reduction for workloads whose logs must remain local.
11
+ - Online Context Compact stores plan and compaction state in Pi's session log; see below.
12
+ - Project-local `.pi/sol-pi.json` files should be used only in trusted repositories.
13
+
14
+ ## Online Context Compact data
15
+
16
+ Online Context Compact is off by default. When enabled, every `update_plan` call appends a versioned custom state entry to Pi's session log. The latest valid entry holds the model-authored plan, concise progress fields, request counts, token-growth estimates, and compaction debt. These values can include paths, command names, and design notes and should be treated as sensitive as the rest of the conversation. After a successful compaction, the extension also writes one hidden, generic custom message that tells the assistant to rebuild its plan; the reminder contains no task-specific data.
17
+
18
+ The extension creates no sidecar, attestation, payload-capture, or research-instrumentation files. State entries do not enter the model context; only the generic post-compaction reminder does. Deleting the Pi session removes both kinds of persisted Online Context Compact data.
19
+
20
+ Evidence-Preserving Reducer may temporarily read an overlong bash result from outside its session archive. It accepts only a regular, non-symlink `pi-bash-*.log` file directly inside the operating system's temporary directory and copies eligible content into the session-specific archive before any nested model call.
21
+
22
+ ## Reporting a vulnerability
23
+
24
+ Use the repository's GitHub Security Advisories page to submit a private report. Do not open a public issue for a suspected vulnerability.
25
+
26
+ Include the affected commit or version, configuration, impact, reproduction steps, and any available mitigation. Reports about Pi itself should be sent to the upstream Pi project.