@herbertgao/pi-extensions 2026.9.5 → 2026.9.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (276) hide show
  1. package/README.md +5 -22
  2. package/THIRD_PARTY_NOTICES.md +0 -4
  3. package/node_modules/@herbertgao/sol-pi/docs/compatibility.md +1 -1
  4. package/node_modules/@herbertgao/sol-pi/package.json +1 -1
  5. package/node_modules/@herbertgao/sol-pi/src/sol-pi/extensions/action-fusion/index.ts +0 -5
  6. package/node_modules/@herbertgao/sol-pi/src/sol-pi/extensions/online-context-compact/state.ts +3 -1
  7. package/node_modules/@narumitw/pi-btw/README.md +2 -0
  8. package/node_modules/@narumitw/pi-btw/dist/index.ts +284 -365
  9. package/node_modules/@narumitw/pi-btw/dist/index.ts.map +3 -3
  10. package/node_modules/@narumitw/pi-btw/package.json +52 -53
  11. package/node_modules/@narumitw/pi-btw/src/bring-to-main.ts +494 -547
  12. package/node_modules/@narumitw/pi-btw/src/btw.ts +814 -856
  13. package/node_modules/@narumitw/pi-btw/src/fullscreen-ui.ts +673 -674
  14. package/node_modules/@narumitw/pi-btw/src/keybindings.ts +228 -270
  15. package/node_modules/@narumitw/pi-btw/src/main-tree-picker.ts +309 -318
  16. package/node_modules/@narumitw/pi-btw/src/menu.ts +416 -454
  17. package/node_modules/@narumitw/pi-btw/src/settings.ts +203 -219
  18. package/node_modules/@narumitw/pi-btw/src/side-thread.ts +173 -201
  19. package/node_modules/@narumitw/pi-btw/src/text.ts +21 -23
  20. package/node_modules/@narumitw/pi-btw/src/transcript-markdown.ts +65 -0
  21. package/node_modules/@narumitw/pi-btw/src/transcript-pager.ts +611 -662
  22. package/node_modules/pi-lens/CHANGELOG.md +239 -0
  23. package/node_modules/pi-lens/config/dependency-cruiser-eager-allowlist.json +3 -0
  24. package/node_modules/pi-lens/dist/clients/actionable-warnings.js +30 -4
  25. package/node_modules/pi-lens/dist/clients/agent-behavior-client.js +2 -0
  26. package/node_modules/pi-lens/dist/clients/bash-file-access.js +26 -0
  27. package/node_modules/pi-lens/dist/clients/biome-client.js +1 -1
  28. package/node_modules/pi-lens/dist/clients/blocker-freshness.js +403 -35
  29. package/node_modules/pi-lens/dist/clients/bootstrap.js +6 -1
  30. package/node_modules/pi-lens/dist/clients/cascade-format.js +200 -4
  31. package/node_modules/pi-lens/dist/clients/code-quality-warnings.js +10 -2
  32. package/node_modules/pi-lens/dist/clients/degradation-ledger.js +16 -1
  33. package/node_modules/pi-lens/dist/clients/diagnostic-dispositions.js +12 -1
  34. package/node_modules/pi-lens/dist/clients/dispatch/ast-grep-catalog.js +65 -0
  35. package/node_modules/pi-lens/dist/clients/dispatch/auxiliary-lsp.js +28 -0
  36. package/node_modules/pi-lens/dist/clients/dispatch/dispatcher.js +9 -2
  37. package/node_modules/pi-lens/dist/clients/dispatch/finding-policy.js +222 -0
  38. package/node_modules/pi-lens/dist/clients/dispatch/indent-detect.js +389 -13
  39. package/node_modules/pi-lens/dist/clients/dispatch/integration.js +175 -25
  40. package/node_modules/pi-lens/dist/clients/dispatch/rule-ignores.js +62 -0
  41. package/node_modules/pi-lens/dist/clients/dispatch/runners/ast-grep-napi.js +21 -41
  42. package/node_modules/pi-lens/dist/clients/dispatch/runners/biome-check.js +6 -1
  43. package/node_modules/pi-lens/dist/clients/dispatch/runners/rust-clippy.js +7 -7
  44. package/node_modules/pi-lens/dist/clients/dispatch/runners/shfmt.js +2 -12
  45. package/node_modules/pi-lens/dist/clients/dispatch/runners/tree-sitter.js +2 -21
  46. package/node_modules/pi-lens/dist/clients/dispatch/runners/utils/runner-helpers.js +1 -1
  47. package/node_modules/pi-lens/dist/clients/dispatch/types.js +4 -1
  48. package/node_modules/pi-lens/dist/clients/disposition-publish.js +1 -0
  49. package/node_modules/pi-lens/dist/clients/effective-config.js +1 -1
  50. package/node_modules/pi-lens/dist/clients/file-kinds.js +26 -1
  51. package/node_modules/pi-lens/dist/clients/file-role.js +21 -21
  52. package/node_modules/pi-lens/dist/clients/file-utils.js +156 -10
  53. package/node_modules/pi-lens/dist/clients/finding-delivery-gate.js +56 -9
  54. package/node_modules/pi-lens/dist/clients/format-service.js +39 -21
  55. package/node_modules/pi-lens/dist/clients/formatters.js +60 -13
  56. package/node_modules/pi-lens/dist/clients/generation-guard.js +2 -2
  57. package/node_modules/pi-lens/dist/clients/git-guard.js +11 -3
  58. package/node_modules/pi-lens/dist/clients/indent-retarget.js +78 -8
  59. package/node_modules/pi-lens/dist/clients/installer/index.js +333 -114
  60. package/node_modules/pi-lens/dist/clients/instance-reaper-state.js +7 -0
  61. package/node_modules/pi-lens/dist/clients/instance-reaper.js +20 -10
  62. package/node_modules/pi-lens/dist/clients/language-profile.js +23 -1
  63. package/node_modules/pi-lens/dist/clients/language-registry.js +5 -1
  64. package/node_modules/pi-lens/dist/clients/latency-logger.js +4 -1
  65. package/node_modules/pi-lens/dist/clients/lens-engine.js +12 -3
  66. package/node_modules/pi-lens/dist/clients/lens-events.js +2 -1
  67. package/node_modules/pi-lens/dist/clients/lens-flag-registry.js +79 -0
  68. package/node_modules/pi-lens/dist/clients/live-bus-emitter.js +2 -1
  69. package/node_modules/pi-lens/dist/clients/lsp/client.js +25 -21
  70. package/node_modules/pi-lens/dist/clients/lsp/config.js +2 -2
  71. package/node_modules/pi-lens/dist/clients/lsp/index.js +7 -0
  72. package/node_modules/pi-lens/dist/clients/lsp/launch.js +16 -4
  73. package/node_modules/pi-lens/dist/clients/lsp/server.js +19 -2
  74. package/node_modules/pi-lens/dist/clients/lsp/workspace-diagnostics-cache.js +2 -1
  75. package/node_modules/pi-lens/dist/clients/lsp-mutation.js +5 -3
  76. package/node_modules/pi-lens/dist/clients/map-with-concurrency.js +12 -8
  77. package/node_modules/pi-lens/dist/clients/mcp/session.js +36 -4
  78. package/node_modules/pi-lens/dist/clients/ndjson-logger.js +24 -7
  79. package/node_modules/pi-lens/dist/clients/observed-mutation.js +40 -2
  80. package/node_modules/pi-lens/dist/clients/opaque-mutation-scan.js +23 -3
  81. package/node_modules/pi-lens/dist/clients/opengrep-client.js +110 -15
  82. package/node_modules/pi-lens/dist/clients/path-utils.js +123 -3
  83. package/node_modules/pi-lens/dist/clients/performance-report.js +5 -1
  84. package/node_modules/pi-lens/dist/clients/php-cs-fixer-config.js +1 -1
  85. package/node_modules/pi-lens/dist/clients/pipeline.js +74 -5
  86. package/node_modules/pi-lens/dist/clients/project-diagnostics/cache.js +37 -5
  87. package/node_modules/pi-lens/dist/clients/project-diagnostics/fresh-fetch.js +145 -18
  88. package/node_modules/pi-lens/dist/clients/project-diagnostics/runner-adapters/dead-code.js +4 -1
  89. package/node_modules/pi-lens/dist/clients/project-diagnostics/scanner.js +59 -3
  90. package/node_modules/pi-lens/dist/clients/project-lens-config.js +45 -2
  91. package/node_modules/pi-lens/dist/clients/read-guard.js +70 -11
  92. package/node_modules/pi-lens/dist/clients/resource-sampler.js +147 -9
  93. package/node_modules/pi-lens/dist/clients/ruff-client.js +1 -1
  94. package/node_modules/pi-lens/dist/clients/runtime-agent-end.js +33 -5
  95. package/node_modules/pi-lens/dist/clients/runtime-context.js +6 -2
  96. package/node_modules/pi-lens/dist/clients/runtime-coordinator.js +77 -7
  97. package/node_modules/pi-lens/dist/clients/runtime-session.js +21 -2
  98. package/node_modules/pi-lens/dist/clients/runtime-tool-call.js +43 -12
  99. package/node_modules/pi-lens/dist/clients/runtime-tool-result.js +330 -85
  100. package/node_modules/pi-lens/dist/clients/runtime-turn.js +147 -17
  101. package/node_modules/pi-lens/dist/clients/safe-spawn.js +258 -5
  102. package/node_modules/pi-lens/dist/clients/scratch-tree-policy.js +6 -0
  103. package/node_modules/pi-lens/dist/clients/session-event-guard.js +50 -5
  104. package/node_modules/pi-lens/dist/clients/sg-runner.js +23 -11
  105. package/node_modules/pi-lens/dist/clients/sgconfig.js +79 -2
  106. package/node_modules/pi-lens/dist/clients/test-runner-client.js +6 -41
  107. package/node_modules/pi-lens/dist/clients/test-runner-delivery.js +43 -0
  108. package/node_modules/pi-lens/dist/clients/tool-agreement.js +423 -0
  109. package/node_modules/pi-lens/dist/clients/tool-config.js +50 -0
  110. package/node_modules/pi-lens/dist/clients/tool-cwd.js +47 -76
  111. package/node_modules/pi-lens/dist/clients/tool-policy.js +163 -7
  112. package/node_modules/pi-lens/dist/clients/tree-sitter-client.js +120 -0
  113. package/node_modules/pi-lens/dist/clients/tree-sitter-query-loader.js +127 -189
  114. package/node_modules/pi-lens/dist/clients/widget-state.js +98 -0
  115. package/node_modules/pi-lens/dist/clients/word-index.js +5 -2
  116. package/node_modules/pi-lens/dist/clients/write-ordering-guard.js +7 -0
  117. package/node_modules/pi-lens/dist/index.js +27416 -24153
  118. package/node_modules/pi-lens/dist/mcp/server.js +5 -2
  119. package/node_modules/pi-lens/dist/tools/lens-diagnostic-mark.js +7 -1
  120. package/node_modules/pi-lens/dist/tools/lens-diagnostics.js +168 -53
  121. package/node_modules/pi-lens/dist/tools/lsp-diagnostics.js +244 -72
  122. package/node_modules/pi-lens/docs/audit1.md +5 -5
  123. package/node_modules/pi-lens/docs/dependencies.md +11 -0
  124. package/node_modules/pi-lens/docs/dispositions.md +52 -0
  125. package/node_modules/pi-lens/docs/environment-variables.md +2 -2
  126. package/node_modules/pi-lens/docs/features.md +4 -4
  127. package/node_modules/pi-lens/docs/globalconfig.md +3 -1
  128. package/node_modules/pi-lens/docs/language-coverage.md +1 -0
  129. package/node_modules/pi-lens/docs/pi-lens-fixer.md +53 -94
  130. package/node_modules/pi-lens/docs/pi-lens-investigator.md +43 -38
  131. package/node_modules/pi-lens/docs/pi-lens-retro.md +97 -0
  132. package/node_modules/pi-lens/docs/pi-lens-reviewer.md +53 -66
  133. package/node_modules/pi-lens/docs/release-qa-baseline.md +22 -0
  134. package/node_modules/pi-lens/docs/settings.md +7 -4
  135. package/node_modules/pi-lens/docs/tree-sitter_rules_catalog.md +1 -1
  136. package/node_modules/pi-lens/docs/usage.md +2 -0
  137. package/node_modules/pi-lens/package.json +1 -1
  138. package/node_modules/pi-lens/rules/tree-sitter-queries/typescript/sql-injection.yml +24 -12
  139. package/node_modules/pi-lens/scripts/analyze-pi-lens-logs.mjs +40 -0
  140. package/node_modules/pi-lens/skills/pi-lens-ast-grep/SKILL.md +15 -0
  141. package/node_modules/pi-lens/skills/pi-lens-lsp-navigation/SKILL.md +7 -0
  142. package/package.json +6 -17
  143. package/examples/pi-footer.json +0 -275
  144. package/node_modules/@czottmann/pi-automode/CHANGELOG.md +0 -70
  145. package/node_modules/@czottmann/pi-automode/LICENSE.md +0 -21
  146. package/node_modules/@czottmann/pi-automode/README.md +0 -215
  147. package/node_modules/@czottmann/pi-automode/docs/GLOSSARY.md +0 -39
  148. package/node_modules/@czottmann/pi-automode/docs/adr/ADR-001-permission-precedence-and-trust-boundaries.md +0 -46
  149. package/node_modules/@czottmann/pi-automode/docs/adr/ADR-002-global-config-in-extension-data-directory.md +0 -60
  150. package/node_modules/@czottmann/pi-automode/docs/adr/INDEX.md +0 -6
  151. package/node_modules/@czottmann/pi-automode/docs/automode-classifier-flow.md +0 -428
  152. package/node_modules/@czottmann/pi-automode/docs/configuration.md +0 -171
  153. package/node_modules/@czottmann/pi-automode/docs/defaults.md +0 -178
  154. package/node_modules/@czottmann/pi-automode/docs/diagnostics.md +0 -90
  155. package/node_modules/@czottmann/pi-automode/docs/observability-logging.md +0 -160
  156. package/node_modules/@czottmann/pi-automode/examples/automode.local.json +0 -44
  157. package/node_modules/@czottmann/pi-automode/extensions/auto-mode/bash.ts +0 -692
  158. package/node_modules/@czottmann/pi-automode/extensions/auto-mode/classifier.ts +0 -852
  159. package/node_modules/@czottmann/pi-automode/extensions/auto-mode/config.ts +0 -904
  160. package/node_modules/@czottmann/pi-automode/extensions/auto-mode/constants.ts +0 -228
  161. package/node_modules/@czottmann/pi-automode/extensions/auto-mode/extension.ts +0 -954
  162. package/node_modules/@czottmann/pi-automode/extensions/auto-mode/hard-deny.ts +0 -429
  163. package/node_modules/@czottmann/pi-automode/extensions/auto-mode/log.ts +0 -173
  164. package/node_modules/@czottmann/pi-automode/extensions/auto-mode/model-selector.ts +0 -113
  165. package/node_modules/@czottmann/pi-automode/extensions/auto-mode/model.ts +0 -13
  166. package/node_modules/@czottmann/pi-automode/extensions/auto-mode/paths.ts +0 -297
  167. package/node_modules/@czottmann/pi-automode/extensions/auto-mode/permissions.ts +0 -623
  168. package/node_modules/@czottmann/pi-automode/extensions/auto-mode/state.ts +0 -102
  169. package/node_modules/@czottmann/pi-automode/extensions/auto-mode/transcript.ts +0 -236
  170. package/node_modules/@czottmann/pi-automode/extensions/auto-mode/types.ts +0 -205
  171. package/node_modules/@czottmann/pi-automode/extensions/auto-mode/utils.ts +0 -54
  172. package/node_modules/@czottmann/pi-automode/extensions/auto-mode.ts +0 -26
  173. package/node_modules/@czottmann/pi-automode/package.json +0 -61
  174. package/node_modules/@czottmann/pi-automode/skills/automode-diagnostics/SKILL.md +0 -63
  175. package/node_modules/@luxusai/pi-hindsight/CHANGELOG.md +0 -376
  176. package/node_modules/@luxusai/pi-hindsight/README.md +0 -92
  177. package/node_modules/@luxusai/pi-hindsight/docs/adr/001-memory-lifecycle-and-scope.md +0 -56
  178. package/node_modules/@luxusai/pi-hindsight/docs/adr/002-explicit-routing-strategy-seam.md +0 -169
  179. package/node_modules/@luxusai/pi-hindsight/docs/adr/003-tui-memory-mode-vocabulary.md +0 -107
  180. package/node_modules/@luxusai/pi-hindsight/docs/adr/004-lifeos-dual-bank-design.md +0 -89
  181. package/node_modules/@luxusai/pi-hindsight/docs/adr/005-domain-banks-and-agent-first-surface.md +0 -189
  182. package/node_modules/@luxusai/pi-hindsight/docs/assets/logos/pi-hindsight-logo-dark.webp +0 -0
  183. package/node_modules/@luxusai/pi-hindsight/docs/assets/logos/pi-hindsight-logo-dark@2x.webp +0 -0
  184. package/node_modules/@luxusai/pi-hindsight/docs/coding-memory-evaluation.md +0 -54
  185. package/node_modules/@luxusai/pi-hindsight/docs/compatibility.md +0 -75
  186. package/node_modules/@luxusai/pi-hindsight/docs/hindsight-core-functions.md +0 -300
  187. package/node_modules/@luxusai/pi-hindsight/docs/mission-and-mental-model-quality.md +0 -158
  188. package/node_modules/@luxusai/pi-hindsight/docs/next-opt-out-design.md +0 -164
  189. package/node_modules/@luxusai/pi-hindsight/docs/risky-memory-modes.md +0 -139
  190. package/node_modules/@luxusai/pi-hindsight/docs/starter-mental-model-suggestions.md +0 -74
  191. package/node_modules/@luxusai/pi-hindsight/docs/surface-reference.md +0 -261
  192. package/node_modules/@luxusai/pi-hindsight/extensions/banks/bank-operations.ts +0 -151
  193. package/node_modules/@luxusai/pi-hindsight/extensions/banks/bank-selection.ts +0 -18
  194. package/node_modules/@luxusai/pi-hindsight/extensions/banks/bank-settings-presenter.ts +0 -46
  195. package/node_modules/@luxusai/pi-hindsight/extensions/banks/bank-templates.ts +0 -383
  196. package/node_modules/@luxusai/pi-hindsight/extensions/banks/banking.ts +0 -240
  197. package/node_modules/@luxusai/pi-hindsight/extensions/banks/knowledge-page-seed.ts +0 -176
  198. package/node_modules/@luxusai/pi-hindsight/extensions/banks/retain-strategies.ts +0 -178
  199. package/node_modules/@luxusai/pi-hindsight/extensions/client/client-retry.ts +0 -41
  200. package/node_modules/@luxusai/pi-hindsight/extensions/client/client.ts +0 -386
  201. package/node_modules/@luxusai/pi-hindsight/extensions/client/fetch-compat.ts +0 -39
  202. package/node_modules/@luxusai/pi-hindsight/extensions/client/timeout.ts +0 -34
  203. package/node_modules/@luxusai/pi-hindsight/extensions/config/config-defaults.ts +0 -140
  204. package/node_modules/@luxusai/pi-hindsight/extensions/config/config-editing-model.ts +0 -61
  205. package/node_modules/@luxusai/pi-hindsight/extensions/config/config-editing-registry.ts +0 -925
  206. package/node_modules/@luxusai/pi-hindsight/extensions/config/config-field-paths.ts +0 -247
  207. package/node_modules/@luxusai/pi-hindsight/extensions/config/config-normalize.ts +0 -547
  208. package/node_modules/@luxusai/pi-hindsight/extensions/config/config-writer.ts +0 -480
  209. package/node_modules/@luxusai/pi-hindsight/extensions/config/config.ts +0 -182
  210. package/node_modules/@luxusai/pi-hindsight/extensions/config/setup-gate.ts +0 -86
  211. package/node_modules/@luxusai/pi-hindsight/extensions/imports/import-execute.ts +0 -1010
  212. package/node_modules/@luxusai/pi-hindsight/extensions/imports/import-parse.ts +0 -175
  213. package/node_modules/@luxusai/pi-hindsight/extensions/imports/import-plan.ts +0 -425
  214. package/node_modules/@luxusai/pi-hindsight/extensions/imports/import-presentation.ts +0 -210
  215. package/node_modules/@luxusai/pi-hindsight/extensions/imports/import-sessions.ts +0 -817
  216. package/node_modules/@luxusai/pi-hindsight/extensions/index.ts +0 -25
  217. package/node_modules/@luxusai/pi-hindsight/extensions/lifecycle/git-seed.ts +0 -319
  218. package/node_modules/@luxusai/pi-hindsight/extensions/lifecycle/memory-lifecycle-recall.ts +0 -196
  219. package/node_modules/@luxusai/pi-hindsight/extensions/lifecycle/memory-lifecycle-retain.ts +0 -189
  220. package/node_modules/@luxusai/pi-hindsight/extensions/lifecycle/memory-lifecycle-runtime.ts +0 -65
  221. package/node_modules/@luxusai/pi-hindsight/extensions/lifecycle/memory-lifecycle.ts +0 -260
  222. package/node_modules/@luxusai/pi-hindsight/extensions/lifecycle/mental-models.ts +0 -244
  223. package/node_modules/@luxusai/pi-hindsight/extensions/lifecycle/observation-scopes.ts +0 -59
  224. package/node_modules/@luxusai/pi-hindsight/extensions/lifecycle/recall-cleanup.ts +0 -82
  225. package/node_modules/@luxusai/pi-hindsight/extensions/lifecycle/recall-visibility.ts +0 -45
  226. package/node_modules/@luxusai/pi-hindsight/extensions/lifecycle/recall.ts +0 -331
  227. package/node_modules/@luxusai/pi-hindsight/extensions/lifecycle/retain-cursor.ts +0 -354
  228. package/node_modules/@luxusai/pi-hindsight/extensions/lifecycle/retain-job-builder.ts +0 -66
  229. package/node_modules/@luxusai/pi-hindsight/extensions/lifecycle/retain-receipts.ts +0 -132
  230. package/node_modules/@luxusai/pi-hindsight/extensions/lifecycle/retain.ts +0 -228
  231. package/node_modules/@luxusai/pi-hindsight/extensions/operations/memory-bank-template-operations.ts +0 -74
  232. package/node_modules/@luxusai/pi-hindsight/extensions/operations/memory-config-operations.ts +0 -16
  233. package/node_modules/@luxusai/pi-hindsight/extensions/operations/memory-control-operations.ts +0 -648
  234. package/node_modules/@luxusai/pi-hindsight/extensions/operations/memory-diagnostics-operations.ts +0 -105
  235. package/node_modules/@luxusai/pi-hindsight/extensions/operations/memory-identity.ts +0 -68
  236. package/node_modules/@luxusai/pi-hindsight/extensions/operations/memory-operation-service.ts +0 -71
  237. package/node_modules/@luxusai/pi-hindsight/extensions/operations/memory-operation-types.ts +0 -13
  238. package/node_modules/@luxusai/pi-hindsight/extensions/operations/memory-recall-operations.ts +0 -162
  239. package/node_modules/@luxusai/pi-hindsight/extensions/operations/memory-retain-operations.ts +0 -131
  240. package/node_modules/@luxusai/pi-hindsight/extensions/operations/memory-scope.ts +0 -104
  241. package/node_modules/@luxusai/pi-hindsight/extensions/operations/memory-session-operations.ts +0 -37
  242. package/node_modules/@luxusai/pi-hindsight/extensions/operations/operation-catalog.ts +0 -893
  243. package/node_modules/@luxusai/pi-hindsight/extensions/operations/reflect-presenter.ts +0 -35
  244. package/node_modules/@luxusai/pi-hindsight/extensions/operations/scope-migrate.ts +0 -177
  245. package/node_modules/@luxusai/pi-hindsight/extensions/operations/tools.ts +0 -7
  246. package/node_modules/@luxusai/pi-hindsight/extensions/queue/flush-presenter.ts +0 -21
  247. package/node_modules/@luxusai/pi-hindsight/extensions/queue/jsonl-queue-store.ts +0 -112
  248. package/node_modules/@luxusai/pi-hindsight/extensions/queue/queue-delivery.ts +0 -111
  249. package/node_modules/@luxusai/pi-hindsight/extensions/queue/queue-lock.ts +0 -214
  250. package/node_modules/@luxusai/pi-hindsight/extensions/queue/queue-operations.ts +0 -70
  251. package/node_modules/@luxusai/pi-hindsight/extensions/queue/queue.ts +0 -392
  252. package/node_modules/@luxusai/pi-hindsight/extensions/tui/bank-template-presentation.ts +0 -45
  253. package/node_modules/@luxusai/pi-hindsight/extensions/tui/commands.ts +0 -9
  254. package/node_modules/@luxusai/pi-hindsight/extensions/tui/guided-setup.ts +0 -860
  255. package/node_modules/@luxusai/pi-hindsight/extensions/tui/prefill-input.ts +0 -105
  256. package/node_modules/@luxusai/pi-hindsight/extensions/tui/setup-flow.ts +0 -189
  257. package/node_modules/@luxusai/pi-hindsight/extensions/tui/setup-server-probe.ts +0 -299
  258. package/node_modules/@luxusai/pi-hindsight/extensions/tui/setup-tui-actions.ts +0 -201
  259. package/node_modules/@luxusai/pi-hindsight/extensions/tui/setup-tui-facts.ts +0 -47
  260. package/node_modules/@luxusai/pi-hindsight/extensions/tui/setup-tui-render.ts +0 -239
  261. package/node_modules/@luxusai/pi-hindsight/extensions/tui/setup-tui-types.ts +0 -50
  262. package/node_modules/@luxusai/pi-hindsight/extensions/tui/setup-tui.ts +0 -259
  263. package/node_modules/@luxusai/pi-hindsight/extensions/tui/tool-presenters.ts +0 -77
  264. package/node_modules/@luxusai/pi-hindsight/extensions/types.ts +0 -534
  265. package/node_modules/@luxusai/pi-hindsight/extensions/utils/diagnostics.ts +0 -319
  266. package/node_modules/@luxusai/pi-hindsight/extensions/utils/messages.ts +0 -325
  267. package/node_modules/@luxusai/pi-hindsight/extensions/utils/sanitize.ts +0 -42
  268. package/node_modules/@luxusai/pi-hindsight/extensions/utils/session-memory-meta.ts +0 -244
  269. package/node_modules/@luxusai/pi-hindsight/extensions/utils/session-operations.ts +0 -56
  270. package/node_modules/@luxusai/pi-hindsight/extensions/utils/session.ts +0 -50
  271. package/node_modules/@luxusai/pi-hindsight/extensions/utils/status-fields.ts +0 -167
  272. package/node_modules/@luxusai/pi-hindsight/extensions/utils/status-health.ts +0 -207
  273. package/node_modules/@luxusai/pi-hindsight/extensions/utils/status.ts +0 -120
  274. package/node_modules/@luxusai/pi-hindsight/extensions/version.ts +0 -8
  275. package/node_modules/@luxusai/pi-hindsight/package.json +0 -118
  276. package/node_modules/@luxusai/pi-hindsight/skills/hindsight-memory-doctor/SKILL.md +0 -75
@@ -1,176 +0,0 @@
1
- /**
2
- * Idempotent knowledge-page taxonomy seeding for coding banks.
3
- *
4
- * Pages are created via the knowledge-base API (not bare mental_models in the bank template).
5
- * When the client/server lacks knowledge-page methods, seeding degrades cleanly.
6
- */
7
- import type { HindsightLikeClient } from "../types.js";
8
- import {
9
- KNOWLEDGE_PAGE_MAX_TOKENS,
10
- KNOWLEDGE_PAGE_SEEDS,
11
- KNOWLEDGE_PAGE_TRIGGER,
12
- type KnowledgePageSeed,
13
- } from "./retain-strategies.js";
14
-
15
- export const KNOWLEDGE_PAGES_UNAVAILABLE = "knowledge_pages_unavailable" as const;
16
-
17
- export class KnowledgePagesUnavailableError extends Error {
18
- readonly code = KNOWLEDGE_PAGES_UNAVAILABLE;
19
- constructor(message = "Hindsight server does not support knowledge pages") {
20
- super(message);
21
- this.name = "KnowledgePagesUnavailableError";
22
- }
23
- }
24
-
25
- export interface SeedKnowledgePagesArgs {
26
- client: HindsightLikeClient;
27
- bankId: string;
28
- /** Extra tags merged onto each page (e.g. source:pi, project:<id>). */
29
- baseTags?: string[];
30
- dryRun?: boolean;
31
- /** Override seed list (tests). */
32
- seeds?: readonly KnowledgePageSeed[];
33
- }
34
-
35
- export interface SeedKnowledgePagesResult {
36
- bankId: string;
37
- dryRun: boolean;
38
- available: boolean;
39
- reason?: typeof KNOWLEDGE_PAGES_UNAVAILABLE | "no_create_method";
40
- wouldCreate?: Array<{ name: string; tags: string[] }>;
41
- created: Array<{ name: string; result?: unknown }>;
42
- skippedExisting: string[];
43
- errors: Array<{ name: string; error: string }>;
44
- }
45
-
46
- function isNotFoundOrUnavailable(error: unknown): boolean {
47
- if (error instanceof KnowledgePagesUnavailableError) return true;
48
- if (typeof error !== "object" || !error) return false;
49
- const fields = error as {
50
- status?: unknown;
51
- statusCode?: unknown;
52
- code?: unknown;
53
- message?: unknown;
54
- };
55
- const status = fields.status ?? fields.statusCode;
56
- if (status === 404 || status === 405 || status === 501) return true;
57
- if (fields.code === KNOWLEDGE_PAGES_UNAVAILABLE) return true;
58
- const msg = typeof fields.message === "string" ? fields.message : "";
59
- return /\b404\b|\b405\b|\b501\b|not found|knowledge.?pages?.*(unavail|not support)/i.test(msg);
60
- }
61
-
62
- function collectPageNames(tree: unknown, out = new Set<string>()): Set<string> {
63
- if (!tree) return out;
64
- const nodes = Array.isArray(tree)
65
- ? tree
66
- : typeof tree === "object" && tree !== null
67
- ? ((tree as { roots?: unknown[]; children?: unknown[] }).roots ??
68
- (tree as { children?: unknown[] }).children ??
69
- [])
70
- : [];
71
- for (const node of nodes) {
72
- if (!node || typeof node !== "object") continue;
73
- const rec = node as { kind?: string; name?: string; children?: unknown[] };
74
- if (rec.kind === "page" && typeof rec.name === "string") out.add(rec.name);
75
- if (Array.isArray(rec.children)) collectPageNames(rec.children, out);
76
- }
77
- return out;
78
- }
79
-
80
- /**
81
- * Seed the fixed five-page knowledge taxonomy. Idempotent by page name (skips existing).
82
- * Never throws for capability gaps — returns available:false instead.
83
- */
84
- export async function seedKnowledgePages(
85
- args: SeedKnowledgePagesArgs,
86
- ): Promise<SeedKnowledgePagesResult> {
87
- const dryRun = args.dryRun ?? false;
88
- const seeds = args.seeds ?? KNOWLEDGE_PAGE_SEEDS;
89
- const baseTags = args.baseTags ?? ["source:pi"];
90
- const empty: SeedKnowledgePagesResult = {
91
- bankId: args.bankId,
92
- dryRun,
93
- available: false,
94
- created: [],
95
- skippedExisting: [],
96
- errors: [],
97
- };
98
-
99
- if (!args.client.createKnowledgePage) {
100
- return { ...empty, reason: "no_create_method" };
101
- }
102
-
103
- let existing = new Set<string>();
104
- if (args.client.getKnowledgeBaseTree) {
105
- try {
106
- const tree = await args.client.getKnowledgeBaseTree(args.bankId);
107
- existing = collectPageNames(tree);
108
- } catch (error) {
109
- if (isNotFoundOrUnavailable(error)) {
110
- return { ...empty, reason: KNOWLEDGE_PAGES_UNAVAILABLE };
111
- }
112
- // Tree probe failed for another reason — still try create (best effort).
113
- }
114
- }
115
-
116
- const wouldCreate: Array<{ name: string; tags: string[] }> = [];
117
- const created: Array<{ name: string; result?: unknown }> = [];
118
- const skippedExisting: string[] = [];
119
- const errors: Array<{ name: string; error: string }> = [];
120
-
121
- for (const seed of seeds) {
122
- if (existing.has(seed.name)) {
123
- skippedExisting.push(seed.name);
124
- continue;
125
- }
126
- const tags = [...new Set([...seed.tags, ...baseTags])];
127
- wouldCreate.push({ name: seed.name, tags });
128
- if (dryRun) continue;
129
- try {
130
- const result = await args.client.createKnowledgePage!(
131
- args.bankId,
132
- seed.name,
133
- seed.source_query,
134
- {
135
- tags,
136
- maxTokens: KNOWLEDGE_PAGE_MAX_TOKENS,
137
- trigger: {
138
- mode: "delta",
139
- refreshAfterConsolidation: KNOWLEDGE_PAGE_TRIGGER.refresh_after_consolidation,
140
- factTypes: [...KNOWLEDGE_PAGE_TRIGGER.fact_types],
141
- excludeMentalModels: true,
142
- },
143
- },
144
- );
145
- created.push({ name: seed.name, result });
146
- existing.add(seed.name);
147
- } catch (error) {
148
- if (isNotFoundOrUnavailable(error)) {
149
- return {
150
- bankId: args.bankId,
151
- dryRun,
152
- available: false,
153
- reason: KNOWLEDGE_PAGES_UNAVAILABLE,
154
- wouldCreate,
155
- created,
156
- skippedExisting,
157
- errors,
158
- };
159
- }
160
- errors.push({
161
- name: seed.name,
162
- error: error instanceof Error ? error.message : String(error),
163
- });
164
- }
165
- }
166
-
167
- return {
168
- bankId: args.bankId,
169
- dryRun,
170
- available: true,
171
- ...(dryRun ? { wouldCreate } : {}),
172
- created,
173
- skippedExisting,
174
- errors,
175
- };
176
- }
@@ -1,178 +0,0 @@
1
- /**
2
- * Named retain strategies and knowledge entity-label taxonomy.
3
- *
4
- * Aligned with @vectorize-io/hindsight-coding-agents bank-template practices, adapted for Pi:
5
- * default strategy is conversation (live Pi sessions), not git.
6
- * Pages are seeded separately (knowledge-base API) — not as bare mental_models in the template.
7
- */
8
-
9
- /** Per-strategy retain config accepted by BankTemplateConfig.retain_strategies. */
10
- export type RetainStrategyConfig = {
11
- retain_mission?: string;
12
- retain_extraction_mode?: string;
13
- retain_chunk_size?: number;
14
- retain_custom_instructions?: string;
15
- };
16
-
17
- export const GIT_RETAIN_MISSION =
18
- "You are ingesting a single git commit: its message and its full diff. Extract the concrete " +
19
- "technical DECISION and the CAUSE/INVARIANT it encodes, bound to the specific code entities " +
20
- "(functions, methods, files) and behaviors it changes. Preserve exact identifiers, paths, and " +
21
- "literal values verbatim. Capture both WHAT changed and WHY. Issue/PR references (#123, GH-123) " +
22
- "are load-bearing: keep them VERBATIM in the fact text and emit each as an ENTITY.";
23
-
24
- export const GITLOG_RETAIN_MISSION =
25
- "You are ingesting an aggregated block of git commit MESSAGES ONLY (no diffs) — the project's " +
26
- "recent commit-message history, newest first. Extract the project's INITIATIVES, FEATURES, " +
27
- "ENHANCEMENTS, and notable themes over time. Do NOT extract per-line code detail. Group related " +
28
- "commits into a coherent initiative/theme where messages make that clear; preserve exact " +
29
- "identifiers and issue/PR references VERBATIM and emit each as an ENTITY.";
30
-
31
- export const CONVERSATION_RETAIN_MISSION =
32
- "You are ingesting a developer conversation as a JSONL transcript (one {role, content} turn per line): the " +
33
- "user's requests, the assistant's narration, and compact tool-action turns (name + target only). " +
34
- "It may be a SHORT decision chat or a LONG working session — scale facts to the substance, never " +
35
- "to the message count. Extract the FEWEST facts that capture the OUTCOME: settled DECISIONS and " +
36
- "their exact rules/values (quote literals VERBATIM); concrete CHANGES to specific code entities; " +
37
- "problems and how they were resolved; conventions or invariants established; at most one fact for " +
38
- "a notable REJECTED alternative. CRITICAL: a conversation REVISES itself — record ONLY the FINAL " +
39
- "state as what is in effect; a superseded proposal appears ONLY inside the rejected fact, NEVER as " +
40
- "its own 'decided' fact; if the same setting changes several times keep only the LAST. Do NOT emit " +
41
- "one fact per message or per intermediate proposal. Keep issue/PR references VERBATIM and emit each " +
42
- "as an ENTITY. Do not invent; capture only what was actually settled.";
43
-
44
- export const DOCUMENT_RETAIN_MISSION =
45
- "You are ingesting a standalone document (notes, docs, or structural findings). Extract the " +
46
- "concrete facts, concepts, and structure it describes. Preserve identifiers and paths verbatim.";
47
-
48
- export const PI_RETAIN_STRATEGIES: Record<string, RetainStrategyConfig> = {
49
- git: {
50
- retain_mission: GIT_RETAIN_MISSION,
51
- retain_extraction_mode: "verbose",
52
- },
53
- gitlog: {
54
- retain_mission: GITLOG_RETAIN_MISSION,
55
- retain_extraction_mode: "verbose",
56
- retain_chunk_size: 12_000,
57
- },
58
- conversation: {
59
- retain_mission: CONVERSATION_RETAIN_MISSION,
60
- retain_extraction_mode: "verbose",
61
- retain_chunk_size: 12_000,
62
- },
63
- document: {
64
- retain_mission: DOCUMENT_RETAIN_MISSION,
65
- retain_extraction_mode: "verbose",
66
- retain_chunk_size: 12_000,
67
- },
68
- survey: {
69
- retain_extraction_mode: "custom",
70
- retain_custom_instructions:
71
- "This document belongs to a Hindsight codebase-survey lifecycle. Apply ONE of two rules: " +
72
- "(1) If the content is an internal status marker — it says it is an internal marker, or " +
73
- "merely announces that a survey started/completed — extract NOTHING: return an empty list of facts. " +
74
- "(2) Otherwise the content is survey FINDINGS: extract concrete structural facts (components, " +
75
- "responsibilities, conventions, tech stack), preserving identifiers verbatim.",
76
- retain_chunk_size: 12_000,
77
- },
78
- };
79
-
80
- /** Fixed knowledge-tier entity labels (tag: true → knowledge:<value> on facts). */
81
- export const KNOWLEDGE_ENTITY_LABELS: {
82
- key: string;
83
- type: "multi-values";
84
- optional: boolean;
85
- tag: boolean;
86
- description: string;
87
- values: Array<{ value: string; description: string }>;
88
- } = {
89
- key: "knowledge",
90
- type: "multi-values",
91
- optional: true,
92
- tag: true,
93
- description:
94
- "Routing labels for this project's Hindsight KNOWLEDGE PAGES — curated summaries of durable " +
95
- "engineering knowledge. Mark a fact only when it is durable, reusable knowledge a developer " +
96
- "would still want in future sessions. Leave EMPTY for routine or transient facts. MOST facts " +
97
- "should get no label here.",
98
- values: [
99
- {
100
- value: "feature-work",
101
- description:
102
- "A new feature, initiative, or enhancement being planned or built — not routine bug-fixes.",
103
- },
104
- {
105
- value: "decision",
106
- description: "A technical decision that will constrain future work, with its rationale.",
107
- },
108
- {
109
- value: "convention",
110
- description:
111
- "An established way this project does things — naming, structure, testing, or patterns.",
112
- },
113
- {
114
- value: "component",
115
- description:
116
- "What a module, file, service, or subsystem is responsible for, or how components relate.",
117
- },
118
- {
119
- value: "concept",
120
- description:
121
- "A domain concept, key abstraction, or project vocabulary a contributor must understand.",
122
- },
123
- ],
124
- };
125
-
126
- /** Seed taxonomy for knowledge pages (used by knowledge seed path; not bare mental models). */
127
- export interface KnowledgePageSeed {
128
- name: string;
129
- source_query: string;
130
- tags: string[];
131
- }
132
-
133
- export const KNOWLEDGE_PAGE_SEEDS: readonly KnowledgePageSeed[] = [
134
- {
135
- name: "Component map",
136
- source_query:
137
- "From this project's commit history and past discussions, what are the main " +
138
- "components/modules/subsystems, what is each responsible for, and how do they relate?",
139
- tags: ["knowledge:component"],
140
- },
141
- {
142
- name: "Core concepts",
143
- source_query:
144
- "What are the core concepts, domain abstractions, and key entities in this project — " +
145
- "the vocabulary a developer must understand?",
146
- tags: ["knowledge:concept"],
147
- },
148
- {
149
- name: "Conventions and patterns",
150
- source_query:
151
- "What conventions, idioms, and recurring patterns does this project follow — testing, " +
152
- "error handling, naming, structure, and how changes are typically made?",
153
- tags: ["knowledge:convention"],
154
- },
155
- {
156
- name: "Key decisions and rationale",
157
- source_query:
158
- "What are the significant technical decisions made in this project and the rationale " +
159
- "behind them — the durable 'why we do it this way' a developer should know?",
160
- tags: ["knowledge:decision"],
161
- },
162
- {
163
- name: "Initiatives and enhancements",
164
- source_query:
165
- "Based on this repository's history and discussions, what are the major initiatives, " +
166
- "features, and enhancements the project has worked on? Summarize themes over time.",
167
- tags: ["knowledge:feature-work"],
168
- },
169
- ] as const;
170
-
171
- export const KNOWLEDGE_PAGE_MAX_TOKENS = 4096;
172
- export const KNOWLEDGE_PAGE_TRIGGER = {
173
- fact_types: ["world", "experience", "observation"] as const,
174
- refresh_after_consolidation: true,
175
- };
176
-
177
- /** Default strategy for live Pi session retains. */
178
- export const LIVE_SESSION_RETAIN_STRATEGY = "conversation" as const;
@@ -1,41 +0,0 @@
1
- export interface HindsightRestError extends Error {
2
- status?: number;
3
- body?: unknown;
4
- }
5
-
6
- export function isRetryableError(error: unknown): boolean {
7
- if (!(error instanceof Error)) return false;
8
- const status =
9
- (error as HindsightRestError).status ?? (error as { statusCode?: number }).statusCode;
10
- if (typeof status === "number" && status >= 500) return true;
11
- if (error.message.includes("timed out")) return true;
12
- if (error.message.includes("fetch failed")) return true;
13
- if (error.message.includes("ECONNREFUSED")) return true;
14
- if (error.message.includes("ENOTFOUND")) return true;
15
- if (error.message.includes("ETIMEDOUT")) return true;
16
- if (error.message.includes("ECONNRESET")) return true;
17
- return false;
18
- }
19
-
20
- export async function withRetry<T>(
21
- operation: string,
22
- fn: () => Promise<T>,
23
- maxRetries = 3,
24
- baseDelayMs = 1000,
25
- ): Promise<T> {
26
- let lastError: Error | undefined;
27
- for (let attempt = 0; attempt <= maxRetries; attempt++) {
28
- if (attempt > 0) {
29
- const jitter = Math.random() * baseDelayMs * 0.5;
30
- const delay = baseDelayMs * 2 ** (attempt - 1) + jitter;
31
- await new Promise((resolve) => setTimeout(resolve, delay));
32
- }
33
- try {
34
- return await fn();
35
- } catch (error) {
36
- if (!isRetryableError(error)) throw error;
37
- lastError = error as Error;
38
- }
39
- }
40
- throw lastError ?? new Error(`${operation} failed after retries`);
41
- }