@code-yeongyu/senpi 2026.8.1 → 2026.8.3-3

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 (1053) hide show
  1. package/CHANGELOG.md +74 -0
  2. package/README.md +10 -0
  3. package/dist/cli/args.d.ts +2 -0
  4. package/dist/cli/args.d.ts.map +1 -1
  5. package/dist/cli/args.js +28 -0
  6. package/dist/cli/args.js.map +1 -1
  7. package/dist/cli/credential-print.d.ts +23 -0
  8. package/dist/cli/credential-print.d.ts.map +1 -0
  9. package/dist/cli/credential-print.js +116 -0
  10. package/dist/cli/credential-print.js.map +1 -0
  11. package/dist/client/index.d.ts +3 -0
  12. package/dist/client/index.d.ts.map +1 -0
  13. package/dist/client/index.js +3 -0
  14. package/dist/client/index.js.map +1 -0
  15. package/dist/client/remote-session.d.ts +53 -0
  16. package/dist/client/remote-session.d.ts.map +1 -0
  17. package/dist/client/remote-session.js +340 -0
  18. package/dist/client/remote-session.js.map +1 -0
  19. package/dist/client/transcript.d.ts +12 -0
  20. package/dist/client/transcript.d.ts.map +1 -0
  21. package/dist/client/transcript.js +98 -0
  22. package/dist/client/transcript.js.map +1 -0
  23. package/dist/core/agent-session-runtime.d.ts.map +1 -1
  24. package/dist/core/agent-session-runtime.js +3 -0
  25. package/dist/core/agent-session-runtime.js.map +1 -1
  26. package/dist/core/agent-session.d.ts +40 -1
  27. package/dist/core/agent-session.d.ts.map +1 -1
  28. package/dist/core/agent-session.js +434 -53
  29. package/dist/core/agent-session.js.map +1 -1
  30. package/dist/core/auth-storage.d.ts +5 -0
  31. package/dist/core/auth-storage.d.ts.map +1 -1
  32. package/dist/core/auth-storage.js +72 -11
  33. package/dist/core/auth-storage.js.map +1 -1
  34. package/dist/core/dynamic-prompt/verification.d.ts +2 -2
  35. package/dist/core/dynamic-prompt/verification.d.ts.map +1 -1
  36. package/dist/core/dynamic-prompt/verification.js +2 -2
  37. package/dist/core/dynamic-prompt/verification.js.map +1 -1
  38. package/dist/core/extensions/builtin/claude-sdk-oauth/bounded-queue.d.ts +17 -0
  39. package/dist/core/extensions/builtin/claude-sdk-oauth/bounded-queue.d.ts.map +1 -0
  40. package/dist/core/extensions/builtin/claude-sdk-oauth/bounded-queue.js +56 -0
  41. package/dist/core/extensions/builtin/claude-sdk-oauth/bounded-queue.js.map +1 -0
  42. package/dist/core/extensions/builtin/claude-sdk-oauth/sdk-boundary.d.ts +1 -0
  43. package/dist/core/extensions/builtin/claude-sdk-oauth/sdk-boundary.d.ts.map +1 -1
  44. package/dist/core/extensions/builtin/claude-sdk-oauth/sdk-boundary.js.map +1 -1
  45. package/dist/core/extensions/builtin/claude-sdk-oauth/session-binding.d.ts +32 -0
  46. package/dist/core/extensions/builtin/claude-sdk-oauth/session-binding.d.ts.map +1 -0
  47. package/dist/core/extensions/builtin/claude-sdk-oauth/session-binding.js +43 -0
  48. package/dist/core/extensions/builtin/claude-sdk-oauth/session-binding.js.map +1 -0
  49. package/dist/core/extensions/builtin/claude-sdk-oauth/session-commit-boundary.d.ts +18 -0
  50. package/dist/core/extensions/builtin/claude-sdk-oauth/session-commit-boundary.d.ts.map +1 -0
  51. package/dist/core/extensions/builtin/claude-sdk-oauth/session-commit-boundary.js +46 -0
  52. package/dist/core/extensions/builtin/claude-sdk-oauth/session-commit-boundary.js.map +1 -0
  53. package/dist/core/extensions/builtin/claude-sdk-oauth/session-continuity.d.ts +81 -0
  54. package/dist/core/extensions/builtin/claude-sdk-oauth/session-continuity.d.ts.map +1 -0
  55. package/dist/core/extensions/builtin/claude-sdk-oauth/session-continuity.js +127 -0
  56. package/dist/core/extensions/builtin/claude-sdk-oauth/session-continuity.js.map +1 -0
  57. package/dist/core/extensions/builtin/claude-sdk-oauth/session-entry-annotations.d.ts +10 -0
  58. package/dist/core/extensions/builtin/claude-sdk-oauth/session-entry-annotations.d.ts.map +1 -0
  59. package/dist/core/extensions/builtin/claude-sdk-oauth/session-entry-annotations.js +34 -0
  60. package/dist/core/extensions/builtin/claude-sdk-oauth/session-entry-annotations.js.map +1 -0
  61. package/dist/core/extensions/builtin/claude-sdk-oauth/session-observability.d.ts +56 -0
  62. package/dist/core/extensions/builtin/claude-sdk-oauth/session-observability.d.ts.map +1 -0
  63. package/dist/core/extensions/builtin/claude-sdk-oauth/session-observability.js +174 -0
  64. package/dist/core/extensions/builtin/claude-sdk-oauth/session-observability.js.map +1 -0
  65. package/dist/core/extensions/builtin/claude-sdk-oauth/session-reaper.d.ts +24 -0
  66. package/dist/core/extensions/builtin/claude-sdk-oauth/session-reaper.d.ts.map +1 -0
  67. package/dist/core/extensions/builtin/claude-sdk-oauth/session-reaper.js +34 -0
  68. package/dist/core/extensions/builtin/claude-sdk-oauth/session-reaper.js.map +1 -0
  69. package/dist/core/extensions/builtin/claude-sdk-oauth/session-reattach.d.ts +34 -0
  70. package/dist/core/extensions/builtin/claude-sdk-oauth/session-reattach.d.ts.map +1 -0
  71. package/dist/core/extensions/builtin/claude-sdk-oauth/session-reattach.js +85 -0
  72. package/dist/core/extensions/builtin/claude-sdk-oauth/session-reattach.js.map +1 -0
  73. package/dist/core/extensions/builtin/claude-sdk-oauth/session-registry-pump.d.ts +2 -13
  74. package/dist/core/extensions/builtin/claude-sdk-oauth/session-registry-pump.d.ts.map +1 -1
  75. package/dist/core/extensions/builtin/claude-sdk-oauth/session-registry-pump.js +34 -55
  76. package/dist/core/extensions/builtin/claude-sdk-oauth/session-registry-pump.js.map +1 -1
  77. package/dist/core/extensions/builtin/claude-sdk-oauth/session-registry-wiring.d.ts.map +1 -1
  78. package/dist/core/extensions/builtin/claude-sdk-oauth/session-registry-wiring.js +35 -93
  79. package/dist/core/extensions/builtin/claude-sdk-oauth/session-registry-wiring.js.map +1 -1
  80. package/dist/core/extensions/builtin/claude-sdk-oauth/session-registry.d.ts +13 -11
  81. package/dist/core/extensions/builtin/claude-sdk-oauth/session-registry.d.ts.map +1 -1
  82. package/dist/core/extensions/builtin/claude-sdk-oauth/session-registry.js +44 -55
  83. package/dist/core/extensions/builtin/claude-sdk-oauth/session-registry.js.map +1 -1
  84. package/dist/core/extensions/builtin/claude-sdk-oauth/session-stream.d.ts +3 -1
  85. package/dist/core/extensions/builtin/claude-sdk-oauth/session-stream.d.ts.map +1 -1
  86. package/dist/core/extensions/builtin/claude-sdk-oauth/session-stream.js +101 -126
  87. package/dist/core/extensions/builtin/claude-sdk-oauth/session-stream.js.map +1 -1
  88. package/dist/core/extensions/builtin/claude-sdk-oauth/session-sync.d.ts +2 -31
  89. package/dist/core/extensions/builtin/claude-sdk-oauth/session-sync.d.ts.map +1 -1
  90. package/dist/core/extensions/builtin/claude-sdk-oauth/session-sync.js +26 -98
  91. package/dist/core/extensions/builtin/claude-sdk-oauth/session-sync.js.map +1 -1
  92. package/dist/core/extensions/builtin/claude-sdk-oauth/session-turn-claim.d.ts +14 -0
  93. package/dist/core/extensions/builtin/claude-sdk-oauth/session-turn-claim.d.ts.map +1 -0
  94. package/dist/core/extensions/builtin/claude-sdk-oauth/session-turn-claim.js +42 -0
  95. package/dist/core/extensions/builtin/claude-sdk-oauth/session-turn-claim.js.map +1 -0
  96. package/dist/core/extensions/builtin/claude-sdk-oauth/session-turn-types.d.ts +32 -0
  97. package/dist/core/extensions/builtin/claude-sdk-oauth/session-turn-types.d.ts.map +1 -0
  98. package/dist/core/extensions/builtin/claude-sdk-oauth/session-turn-types.js +8 -0
  99. package/dist/core/extensions/builtin/claude-sdk-oauth/session-turn-types.js.map +1 -0
  100. package/dist/core/extensions/builtin/claude-sdk-oauth/stream-events.d.ts +16 -0
  101. package/dist/core/extensions/builtin/claude-sdk-oauth/stream-events.d.ts.map +1 -0
  102. package/dist/core/extensions/builtin/claude-sdk-oauth/stream-events.js +92 -0
  103. package/dist/core/extensions/builtin/claude-sdk-oauth/stream-events.js.map +1 -0
  104. package/dist/core/extensions/builtin/claude-sdk-oauth/stream.d.ts.map +1 -1
  105. package/dist/core/extensions/builtin/claude-sdk-oauth/stream.js +48 -88
  106. package/dist/core/extensions/builtin/claude-sdk-oauth/stream.js.map +1 -1
  107. package/dist/core/extensions/builtin/claude-sdk-oauth/tools.d.ts +1 -0
  108. package/dist/core/extensions/builtin/claude-sdk-oauth/tools.d.ts.map +1 -1
  109. package/dist/core/extensions/builtin/claude-sdk-oauth/tools.js +1 -0
  110. package/dist/core/extensions/builtin/claude-sdk-oauth/tools.js.map +1 -1
  111. package/dist/core/extensions/builtin/compaction/checkpoint-state.d.ts +18 -1
  112. package/dist/core/extensions/builtin/compaction/checkpoint-state.d.ts.map +1 -1
  113. package/dist/core/extensions/builtin/compaction/checkpoint-state.js +32 -0
  114. package/dist/core/extensions/builtin/compaction/checkpoint-state.js.map +1 -1
  115. package/dist/core/extensions/builtin/compaction/deterministic-fallback.d.ts +1 -1
  116. package/dist/core/extensions/builtin/compaction/deterministic-fallback.d.ts.map +1 -1
  117. package/dist/core/extensions/builtin/compaction/deterministic-fallback.js +4 -0
  118. package/dist/core/extensions/builtin/compaction/deterministic-fallback.js.map +1 -1
  119. package/dist/core/extensions/builtin/compaction/idle-retry.d.ts +21 -0
  120. package/dist/core/extensions/builtin/compaction/idle-retry.d.ts.map +1 -0
  121. package/dist/core/extensions/builtin/compaction/idle-retry.js +24 -0
  122. package/dist/core/extensions/builtin/compaction/idle-retry.js.map +1 -0
  123. package/dist/core/extensions/builtin/compaction/index.d.ts.map +1 -1
  124. package/dist/core/extensions/builtin/compaction/index.js +91 -13
  125. package/dist/core/extensions/builtin/compaction/index.js.map +1 -1
  126. package/dist/core/extensions/builtin/compaction/lane-policy.d.ts +71 -0
  127. package/dist/core/extensions/builtin/compaction/lane-policy.d.ts.map +1 -0
  128. package/dist/core/extensions/builtin/compaction/lane-policy.js +94 -0
  129. package/dist/core/extensions/builtin/compaction/lane-policy.js.map +1 -0
  130. package/dist/core/extensions/builtin/compaction/log.d.ts.map +1 -1
  131. package/dist/core/extensions/builtin/compaction/log.js +1 -0
  132. package/dist/core/extensions/builtin/compaction/log.js.map +1 -1
  133. package/dist/core/extensions/builtin/compaction/overflow-retry.d.ts +59 -0
  134. package/dist/core/extensions/builtin/compaction/overflow-retry.d.ts.map +1 -0
  135. package/dist/core/extensions/builtin/compaction/overflow-retry.js +155 -0
  136. package/dist/core/extensions/builtin/compaction/overflow-retry.js.map +1 -0
  137. package/dist/core/extensions/builtin/compaction/speculative.d.ts.map +1 -1
  138. package/dist/core/extensions/builtin/compaction/speculative.js +17 -98
  139. package/dist/core/extensions/builtin/compaction/speculative.js.map +1 -1
  140. package/dist/core/extensions/builtin/compaction/transient-failure.d.ts.map +1 -1
  141. package/dist/core/extensions/builtin/compaction/transient-failure.js +3 -0
  142. package/dist/core/extensions/builtin/compaction/transient-failure.js.map +1 -1
  143. package/dist/core/extensions/builtin/goal/continuation.d.ts +2 -1
  144. package/dist/core/extensions/builtin/goal/continuation.d.ts.map +1 -1
  145. package/dist/core/extensions/builtin/goal/continuation.js +2 -1
  146. package/dist/core/extensions/builtin/goal/continuation.js.map +1 -1
  147. package/dist/core/extensions/builtin/goal/index.d.ts.map +1 -1
  148. package/dist/core/extensions/builtin/goal/index.js +14 -1
  149. package/dist/core/extensions/builtin/goal/index.js.map +1 -1
  150. package/dist/core/extensions/builtin/goal/monitor-continuation.d.ts +3 -2
  151. package/dist/core/extensions/builtin/goal/monitor-continuation.d.ts.map +1 -1
  152. package/dist/core/extensions/builtin/goal/monitor-continuation.js +89 -46
  153. package/dist/core/extensions/builtin/goal/monitor-continuation.js.map +1 -1
  154. package/dist/core/extensions/builtin/goal/wait-progress.d.ts +11 -0
  155. package/dist/core/extensions/builtin/goal/wait-progress.d.ts.map +1 -0
  156. package/dist/core/extensions/builtin/goal/wait-progress.js +30 -0
  157. package/dist/core/extensions/builtin/goal/wait-progress.js.map +1 -0
  158. package/dist/core/extensions/builtin/goal/wait-ticker.d.ts +38 -0
  159. package/dist/core/extensions/builtin/goal/wait-ticker.d.ts.map +1 -0
  160. package/dist/core/extensions/builtin/goal/wait-ticker.js +71 -0
  161. package/dist/core/extensions/builtin/goal/wait-ticker.js.map +1 -0
  162. package/dist/core/extensions/builtin/gpt-apply-patch/apply.d.ts +1 -0
  163. package/dist/core/extensions/builtin/gpt-apply-patch/apply.d.ts.map +1 -1
  164. package/dist/core/extensions/builtin/gpt-apply-patch/apply.js +13 -1
  165. package/dist/core/extensions/builtin/gpt-apply-patch/apply.js.map +1 -1
  166. package/dist/core/extensions/builtin/gpt-apply-patch/index.d.ts +1 -1
  167. package/dist/core/extensions/builtin/gpt-apply-patch/index.d.ts.map +1 -1
  168. package/dist/core/extensions/builtin/gpt-apply-patch/index.js +1 -1
  169. package/dist/core/extensions/builtin/gpt-apply-patch/index.js.map +1 -1
  170. package/dist/core/extensions/builtin/gpt-apply-patch/tool.d.ts +1 -0
  171. package/dist/core/extensions/builtin/gpt-apply-patch/tool.d.ts.map +1 -1
  172. package/dist/core/extensions/builtin/gpt-apply-patch/tool.js +23 -5
  173. package/dist/core/extensions/builtin/gpt-apply-patch/tool.js.map +1 -1
  174. package/dist/core/extensions/builtin/loop-guard/detectors.d.ts.map +1 -1
  175. package/dist/core/extensions/builtin/loop-guard/detectors.js +42 -1
  176. package/dist/core/extensions/builtin/loop-guard/detectors.js.map +1 -1
  177. package/dist/core/extensions/builtin/mcp/health.d.ts.map +1 -1
  178. package/dist/core/extensions/builtin/mcp/health.js +2 -1
  179. package/dist/core/extensions/builtin/mcp/health.js.map +1 -1
  180. package/dist/core/extensions/builtin/prompt-preset/gpt-5.6.d.ts +1 -1
  181. package/dist/core/extensions/builtin/prompt-preset/gpt-5.6.d.ts.map +1 -1
  182. package/dist/core/extensions/builtin/prompt-preset/gpt-5.6.js +5 -3
  183. package/dist/core/extensions/builtin/prompt-preset/gpt-5.6.js.map +1 -1
  184. package/dist/core/extensions/builtin/prompt-preset/kimi-k3.d.ts.map +1 -1
  185. package/dist/core/extensions/builtin/prompt-preset/kimi-k3.js +8 -1
  186. package/dist/core/extensions/builtin/prompt-preset/kimi-k3.js.map +1 -1
  187. package/dist/core/extensions/builtin/rules/config.d.ts +3 -0
  188. package/dist/core/extensions/builtin/rules/config.d.ts.map +1 -0
  189. package/dist/core/extensions/builtin/rules/config.js +24 -0
  190. package/dist/core/extensions/builtin/rules/config.js.map +1 -0
  191. package/dist/core/extensions/builtin/rules/index.d.ts.map +1 -1
  192. package/dist/core/extensions/builtin/rules/index.js +5 -3
  193. package/dist/core/extensions/builtin/rules/index.js.map +1 -1
  194. package/dist/core/extensions/builtin/rules/rules/formatter.d.ts.map +1 -1
  195. package/dist/core/extensions/builtin/rules/rules/formatter.js +21 -5
  196. package/dist/core/extensions/builtin/rules/rules/formatter.js.map +1 -1
  197. package/dist/core/extensions/builtin/rules/rules/types.d.ts +1 -1
  198. package/dist/core/extensions/builtin/rules/rules/types.js.map +1 -1
  199. package/dist/core/extensions/builtin/service-tier.d.ts.map +1 -1
  200. package/dist/core/extensions/builtin/service-tier.js +2 -3
  201. package/dist/core/extensions/builtin/service-tier.js.map +1 -1
  202. package/dist/core/extensions/builtin/terminal/tools/context.d.ts +1 -1
  203. package/dist/core/extensions/builtin/terminal/tools/context.d.ts.map +1 -1
  204. package/dist/core/extensions/builtin/terminal/tools/context.js.map +1 -1
  205. package/dist/core/extensions/builtin/terminal/tools/monitor.d.ts.map +1 -1
  206. package/dist/core/extensions/builtin/terminal/tools/monitor.js +1 -0
  207. package/dist/core/extensions/builtin/terminal/tools/monitor.js.map +1 -1
  208. package/dist/core/extensions/builtin/tool-pair-guard/index.d.ts.map +1 -1
  209. package/dist/core/extensions/builtin/tool-pair-guard/index.js +1 -1
  210. package/dist/core/extensions/builtin/tool-pair-guard/index.js.map +1 -1
  211. package/dist/core/extensions/index.d.ts +1 -1
  212. package/dist/core/extensions/index.d.ts.map +1 -1
  213. package/dist/core/extensions/index.js.map +1 -1
  214. package/dist/core/extensions/loader.d.ts.map +1 -1
  215. package/dist/core/extensions/loader.js +14 -18
  216. package/dist/core/extensions/loader.js.map +1 -1
  217. package/dist/core/extensions/runner.d.ts +4 -1
  218. package/dist/core/extensions/runner.d.ts.map +1 -1
  219. package/dist/core/extensions/runner.js +18 -0
  220. package/dist/core/extensions/runner.js.map +1 -1
  221. package/dist/core/extensions/types.d.ts +16 -1
  222. package/dist/core/extensions/types.d.ts.map +1 -1
  223. package/dist/core/extensions/types.js.map +1 -1
  224. package/dist/core/footer-data-provider.d.ts +10 -0
  225. package/dist/core/footer-data-provider.d.ts.map +1 -1
  226. package/dist/core/footer-data-provider.js +1 -1
  227. package/dist/core/footer-data-provider.js.map +1 -1
  228. package/dist/core/keybindings.d.ts +24 -0
  229. package/dist/core/keybindings.d.ts.map +1 -1
  230. package/dist/core/model-registry.d.ts +2 -1
  231. package/dist/core/model-registry.d.ts.map +1 -1
  232. package/dist/core/model-registry.js +3 -0
  233. package/dist/core/model-registry.js.map +1 -1
  234. package/dist/core/model-resolver.d.ts.map +1 -1
  235. package/dist/core/model-resolver.js +1 -0
  236. package/dist/core/model-resolver.js.map +1 -1
  237. package/dist/core/model-runtime.d.ts +2 -0
  238. package/dist/core/model-runtime.d.ts.map +1 -1
  239. package/dist/core/model-runtime.js +2 -2
  240. package/dist/core/model-runtime.js.map +1 -1
  241. package/dist/core/package-manager.d.ts +0 -1
  242. package/dist/core/package-manager.d.ts.map +1 -1
  243. package/dist/core/package-manager.js +18 -34
  244. package/dist/core/package-manager.js.map +1 -1
  245. package/dist/core/pi-manifest.d.ts +9 -0
  246. package/dist/core/pi-manifest.d.ts.map +1 -0
  247. package/dist/core/pi-manifest.js +25 -0
  248. package/dist/core/pi-manifest.js.map +1 -0
  249. package/dist/core/provider-composer.d.ts.map +1 -1
  250. package/dist/core/provider-composer.js +8 -3
  251. package/dist/core/provider-composer.js.map +1 -1
  252. package/dist/core/provider-display-names.d.ts.map +1 -1
  253. package/dist/core/provider-display-names.js +1 -0
  254. package/dist/core/provider-display-names.js.map +1 -1
  255. package/dist/core/resource-loader.d.ts +15 -0
  256. package/dist/core/resource-loader.d.ts.map +1 -1
  257. package/dist/core/resource-loader.js +55 -6
  258. package/dist/core/resource-loader.js.map +1 -1
  259. package/dist/core/retry-fallback/hint-policy.d.ts +29 -0
  260. package/dist/core/retry-fallback/hint-policy.d.ts.map +1 -0
  261. package/dist/core/retry-fallback/hint-policy.js +54 -0
  262. package/dist/core/retry-fallback/hint-policy.js.map +1 -0
  263. package/dist/core/retry-fallback/probe-scheduler.d.ts +60 -0
  264. package/dist/core/retry-fallback/probe-scheduler.d.ts.map +1 -0
  265. package/dist/core/retry-fallback/probe-scheduler.js +206 -0
  266. package/dist/core/retry-fallback/probe-scheduler.js.map +1 -0
  267. package/dist/core/retry-fallback/settings.d.ts +9 -0
  268. package/dist/core/retry-fallback/settings.d.ts.map +1 -1
  269. package/dist/core/retry-fallback/settings.js +14 -0
  270. package/dist/core/retry-fallback/settings.js.map +1 -1
  271. package/dist/core/session-log.js +1 -1
  272. package/dist/core/session-log.js.map +1 -1
  273. package/dist/core/settings-manager.d.ts +10 -1
  274. package/dist/core/settings-manager.d.ts.map +1 -1
  275. package/dist/core/settings-manager.js +21 -1
  276. package/dist/core/settings-manager.js.map +1 -1
  277. package/dist/extensions/llama/provider.js +1 -1
  278. package/dist/extensions/llama/provider.js.map +1 -1
  279. package/dist/index.d.ts +2 -2
  280. package/dist/index.d.ts.map +1 -1
  281. package/dist/index.js.map +1 -1
  282. package/dist/main.d.ts.map +1 -1
  283. package/dist/main.js +44 -0
  284. package/dist/main.js.map +1 -1
  285. package/dist/modes/interactive/components/assistant-message.d.ts +5 -2
  286. package/dist/modes/interactive/components/assistant-message.d.ts.map +1 -1
  287. package/dist/modes/interactive/components/assistant-message.js +16 -4
  288. package/dist/modes/interactive/components/assistant-message.js.map +1 -1
  289. package/dist/modes/interactive/components/continuity-notice.d.ts +21 -0
  290. package/dist/modes/interactive/components/continuity-notice.d.ts.map +1 -0
  291. package/dist/modes/interactive/components/continuity-notice.js +58 -0
  292. package/dist/modes/interactive/components/continuity-notice.js.map +1 -0
  293. package/dist/modes/interactive/components/custom-editor.d.ts +5 -0
  294. package/dist/modes/interactive/components/custom-editor.d.ts.map +1 -1
  295. package/dist/modes/interactive/components/custom-editor.js +22 -1
  296. package/dist/modes/interactive/components/custom-editor.js.map +1 -1
  297. package/dist/modes/interactive/components/markdown-transform.d.ts +3 -0
  298. package/dist/modes/interactive/components/markdown-transform.d.ts.map +1 -0
  299. package/dist/modes/interactive/components/markdown-transform.js +19 -0
  300. package/dist/modes/interactive/components/markdown-transform.js.map +1 -0
  301. package/dist/modes/interactive/components/model-selector.d.ts.map +1 -1
  302. package/dist/modes/interactive/components/model-selector.js +4 -1
  303. package/dist/modes/interactive/components/model-selector.js.map +1 -1
  304. package/dist/modes/interactive/components/settings-selector.d.ts +6 -2
  305. package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
  306. package/dist/modes/interactive/components/settings-selector.js +20 -0
  307. package/dist/modes/interactive/components/settings-selector.js.map +1 -1
  308. package/dist/modes/interactive/components/user-message.d.ts +3 -1
  309. package/dist/modes/interactive/components/user-message.d.ts.map +1 -1
  310. package/dist/modes/interactive/components/user-message.js +8 -2
  311. package/dist/modes/interactive/components/user-message.js.map +1 -1
  312. package/dist/modes/interactive/help-content.d.ts.map +1 -1
  313. package/dist/modes/interactive/help-content.js +1 -0
  314. package/dist/modes/interactive/help-content.js.map +1 -1
  315. package/dist/modes/interactive/interactive-mode.d.ts +21 -0
  316. package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  317. package/dist/modes/interactive/interactive-mode.js +151 -50
  318. package/dist/modes/interactive/interactive-mode.js.map +1 -1
  319. package/dist/modes/interactive/theme/dark.json +1 -0
  320. package/dist/modes/interactive/theme/grok-day.json +1 -0
  321. package/dist/modes/interactive/theme/grok-night.json +1 -0
  322. package/dist/modes/interactive/theme/light.json +1 -0
  323. package/dist/modes/interactive/theme/theme-schema.json +5 -1
  324. package/dist/modes/interactive/theme/theme.d.ts +2 -2
  325. package/dist/modes/interactive/theme/theme.d.ts.map +1 -1
  326. package/dist/modes/interactive/theme/theme.js +13 -3
  327. package/dist/modes/interactive/theme/theme.js.map +1 -1
  328. package/dist/modes/rpc/connection-handler.d.ts.map +1 -1
  329. package/dist/modes/rpc/connection-handler.js +13 -0
  330. package/dist/modes/rpc/connection-handler.js.map +1 -1
  331. package/dist/utils/clipboard.d.ts +1 -1
  332. package/dist/utils/clipboard.d.ts.map +1 -1
  333. package/dist/utils/clipboard.js +22 -2
  334. package/dist/utils/clipboard.js.map +1 -1
  335. package/docs/AGENTS.md +1 -6
  336. package/docs/custom-provider.md +10 -3
  337. package/docs/development.md +1 -2
  338. package/docs/extensions.md +24 -1
  339. package/docs/keybindings.md +13 -0
  340. package/docs/mcp.md +63 -4
  341. package/docs/models.md +1 -0
  342. package/docs/providers.md +39 -0
  343. package/docs/release-guide.md +5 -3
  344. package/docs/session-format.md +2 -0
  345. package/docs/settings.md +2 -0
  346. package/docs/skills.md +29 -0
  347. package/docs/themes.md +5 -3
  348. package/docs/usage.md +5 -0
  349. package/examples/extensions/custom-compaction.ts +1 -2
  350. package/examples/extensions/custom-provider-anthropic/index.ts +8 -2
  351. package/examples/extensions/doom-overlay/wad-finder.ts +7 -3
  352. package/examples/extensions/handoff.ts +2 -3
  353. package/examples/extensions/qna.ts +2 -2
  354. package/examples/rpc-extension-ui.ts +11 -2
  355. package/examples/sdk/02-custom-model.ts +1 -2
  356. package/examples/sdk/12-full-control.ts +2 -0
  357. package/node_modules/@code-yeongyu/senpi-codemode/CHANGELOG.md +36 -0
  358. package/node_modules/@code-yeongyu/senpi-codemode/package.json +4 -4
  359. package/node_modules/@earendil-works/pi-agent-core/dist/harness/agent-harness.d.ts +14 -3
  360. package/node_modules/@earendil-works/pi-agent-core/dist/harness/agent-harness.d.ts.map +1 -1
  361. package/node_modules/@earendil-works/pi-agent-core/dist/harness/agent-harness.js +156 -67
  362. package/node_modules/@earendil-works/pi-agent-core/dist/harness/agent-harness.js.map +1 -1
  363. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/array-session-reader.d.ts +3 -0
  364. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/array-session-reader.d.ts.map +1 -0
  365. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/array-session-reader.js +70 -0
  366. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/array-session-reader.js.map +1 -0
  367. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/fork.d.ts +4 -0
  368. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/fork.d.ts.map +1 -0
  369. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/fork.js +22 -0
  370. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/fork.js.map +1 -0
  371. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl-store.d.ts +13 -0
  372. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl-store.d.ts.map +1 -0
  373. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl-store.js +304 -0
  374. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl-store.js.map +1 -0
  375. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/keyed-operation-queue.d.ts +17 -0
  376. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/keyed-operation-queue.d.ts.map +1 -0
  377. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/keyed-operation-queue.js +60 -0
  378. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/keyed-operation-queue.js.map +1 -0
  379. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory-store.d.ts +6 -0
  380. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory-store.d.ts.map +1 -0
  381. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory-store.js +107 -0
  382. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory-store.js.map +1 -0
  383. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repository.d.ts +28 -0
  384. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repository.d.ts.map +1 -0
  385. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repository.js +61 -0
  386. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repository.js.map +1 -0
  387. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/search-backend.d.ts +8 -0
  388. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/search-backend.d.ts.map +1 -0
  389. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/search-backend.js +22 -0
  390. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/search-backend.js.map +1 -0
  391. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/session.d.ts +6 -10
  392. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/session.d.ts.map +1 -1
  393. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/session.js +154 -77
  394. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/session.js.map +1 -1
  395. package/node_modules/@earendil-works/pi-agent-core/dist/harness/types.d.ts +49 -23
  396. package/node_modules/@earendil-works/pi-agent-core/dist/harness/types.d.ts.map +1 -1
  397. package/node_modules/@earendil-works/pi-agent-core/dist/harness/types.js.map +1 -1
  398. package/node_modules/@earendil-works/pi-agent-core/dist/index.d.ts +6 -6
  399. package/node_modules/@earendil-works/pi-agent-core/dist/index.d.ts.map +1 -1
  400. package/node_modules/@earendil-works/pi-agent-core/dist/index.js +6 -6
  401. package/node_modules/@earendil-works/pi-agent-core/dist/index.js.map +1 -1
  402. package/node_modules/@earendil-works/pi-agent-core/dist/proxy.js +1 -1
  403. package/node_modules/@earendil-works/pi-agent-core/dist/proxy.js.map +1 -1
  404. package/node_modules/@earendil-works/pi-agent-core/package.json +4 -4
  405. package/node_modules/@earendil-works/pi-ai/README.md +5 -2
  406. package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.d.ts.map +1 -1
  407. package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.js +46 -10
  408. package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.js.map +1 -1
  409. package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-tool-pairs.d.ts +3 -0
  410. package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-tool-pairs.d.ts.map +1 -0
  411. package/{dist/core/extensions/builtin/tool-pair-guard/sanitize-anthropic-payload.js → node_modules/@earendil-works/pi-ai/dist/api/anthropic-tool-pairs.js} +3 -3
  412. package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-tool-pairs.js.map +1 -0
  413. package/node_modules/@earendil-works/pi-ai/dist/api/azure-openai-responses.d.ts.map +1 -1
  414. package/node_modules/@earendil-works/pi-ai/dist/api/azure-openai-responses.js +5 -1
  415. package/node_modules/@earendil-works/pi-ai/dist/api/azure-openai-responses.js.map +1 -1
  416. package/node_modules/@earendil-works/pi-ai/dist/api/bedrock-converse-stream.d.ts.map +1 -1
  417. package/node_modules/@earendil-works/pi-ai/dist/api/bedrock-converse-stream.js +64 -4
  418. package/node_modules/@earendil-works/pi-ai/dist/api/bedrock-converse-stream.js.map +1 -1
  419. package/node_modules/@earendil-works/pi-ai/dist/api/google-generative-ai.d.ts.map +1 -1
  420. package/node_modules/@earendil-works/pi-ai/dist/api/google-generative-ai.js +12 -2
  421. package/node_modules/@earendil-works/pi-ai/dist/api/google-generative-ai.js.map +1 -1
  422. package/node_modules/@earendil-works/pi-ai/dist/api/google-shared.d.ts.map +1 -1
  423. package/node_modules/@earendil-works/pi-ai/dist/api/google-shared.js +13 -6
  424. package/node_modules/@earendil-works/pi-ai/dist/api/google-shared.js.map +1 -1
  425. package/node_modules/@earendil-works/pi-ai/dist/api/google-vertex.d.ts.map +1 -1
  426. package/node_modules/@earendil-works/pi-ai/dist/api/google-vertex.js +12 -2
  427. package/node_modules/@earendil-works/pi-ai/dist/api/google-vertex.js.map +1 -1
  428. package/node_modules/@earendil-works/pi-ai/dist/api/mistral-conversations.d.ts.map +1 -1
  429. package/node_modules/@earendil-works/pi-ai/dist/api/mistral-conversations.js +19 -10
  430. package/node_modules/@earendil-works/pi-ai/dist/api/mistral-conversations.js.map +1 -1
  431. package/node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses.d.ts.map +1 -1
  432. package/node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses.js +84 -47
  433. package/node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses.js.map +1 -1
  434. package/node_modules/@earendil-works/pi-ai/dist/api/openai-completions.d.ts.map +1 -1
  435. package/node_modules/@earendil-works/pi-ai/dist/api/openai-completions.js +18 -9
  436. package/node_modules/@earendil-works/pi-ai/dist/api/openai-completions.js.map +1 -1
  437. package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses-shared.d.ts.map +1 -1
  438. package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses-shared.js +11 -1
  439. package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses-shared.js.map +1 -1
  440. package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses.d.ts.map +1 -1
  441. package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses.js +7 -3
  442. package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses.js.map +1 -1
  443. package/node_modules/@earendil-works/pi-ai/dist/api/openrouter-images.js +3 -2
  444. package/node_modules/@earendil-works/pi-ai/dist/api/openrouter-images.js.map +1 -1
  445. package/node_modules/@earendil-works/pi-ai/dist/api/pi-messages.js +2 -2
  446. package/node_modules/@earendil-works/pi-ai/dist/api/pi-messages.js.map +1 -1
  447. package/node_modules/@earendil-works/pi-ai/dist/api/simple-options.d.ts.map +1 -1
  448. package/node_modules/@earendil-works/pi-ai/dist/api/simple-options.js +1 -0
  449. package/node_modules/@earendil-works/pi-ai/dist/api/simple-options.js.map +1 -1
  450. package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/openrouter.d.ts +3 -1
  451. package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/openrouter.d.ts.map +1 -1
  452. package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/openrouter.js +81 -26
  453. package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/openrouter.js.map +1 -1
  454. package/node_modules/@earendil-works/pi-ai/dist/auth/resolve.d.ts +2 -0
  455. package/node_modules/@earendil-works/pi-ai/dist/auth/resolve.d.ts.map +1 -1
  456. package/node_modules/@earendil-works/pi-ai/dist/auth/resolve.js +16 -8
  457. package/node_modules/@earendil-works/pi-ai/dist/auth/resolve.js.map +1 -1
  458. package/node_modules/@earendil-works/pi-ai/dist/env-api-keys.d.ts.map +1 -1
  459. package/node_modules/@earendil-works/pi-ai/dist/env-api-keys.js +1 -0
  460. package/node_modules/@earendil-works/pi-ai/dist/env-api-keys.js.map +1 -1
  461. package/node_modules/@earendil-works/pi-ai/dist/index.d.ts +1 -0
  462. package/node_modules/@earendil-works/pi-ai/dist/index.d.ts.map +1 -1
  463. package/node_modules/@earendil-works/pi-ai/dist/index.js +1 -0
  464. package/node_modules/@earendil-works/pi-ai/dist/index.js.map +1 -1
  465. package/node_modules/@earendil-works/pi-ai/dist/models.js +1 -1
  466. package/node_modules/@earendil-works/pi-ai/dist/models.js.map +1 -1
  467. package/node_modules/@earendil-works/pi-ai/dist/providers/all.d.ts +2 -1
  468. package/node_modules/@earendil-works/pi-ai/dist/providers/all.d.ts.map +1 -1
  469. package/node_modules/@earendil-works/pi-ai/dist/providers/all.js +3 -1
  470. package/node_modules/@earendil-works/pi-ai/dist/providers/all.js.map +1 -1
  471. package/node_modules/@earendil-works/pi-ai/dist/providers/data/.manifest.json +1 -1
  472. package/node_modules/@earendil-works/pi-ai/dist/providers/data/cloudflare-ai-gateway.json +1 -1
  473. package/node_modules/@earendil-works/pi-ai/dist/providers/data/fireworks.json +1 -1
  474. package/node_modules/@earendil-works/pi-ai/dist/providers/data/github-copilot.json +1 -1
  475. package/node_modules/@earendil-works/pi-ai/dist/providers/data/huggingface.json +1 -1
  476. package/node_modules/@earendil-works/pi-ai/dist/providers/data/mistral.json +1 -1
  477. package/node_modules/@earendil-works/pi-ai/dist/providers/data/openai-codex.json +1 -1
  478. package/node_modules/@earendil-works/pi-ai/dist/providers/data/openai.json +1 -1
  479. package/node_modules/@earendil-works/pi-ai/dist/providers/data/opencode-go.json +1 -1
  480. package/node_modules/@earendil-works/pi-ai/dist/providers/data/opencode.json +1 -1
  481. package/node_modules/@earendil-works/pi-ai/dist/providers/data/openrouter.json +1 -1
  482. package/node_modules/@earendil-works/pi-ai/dist/providers/data/qwen-token-plan-cn.json +1 -1
  483. package/node_modules/@earendil-works/pi-ai/dist/providers/data/qwen-token-plan.json +1 -1
  484. package/node_modules/@earendil-works/pi-ai/dist/providers/data/together.json +1 -1
  485. package/node_modules/@earendil-works/pi-ai/dist/providers/data/vercel-ai-gateway.json +1 -1
  486. package/node_modules/@earendil-works/pi-ai/dist/providers/data/zai-coding-cn.json +1 -1
  487. package/node_modules/@earendil-works/pi-ai/dist/providers/data/zai.json +1 -1
  488. package/node_modules/@earendil-works/pi-ai/dist/providers/faux.d.ts.map +1 -1
  489. package/node_modules/@earendil-works/pi-ai/dist/providers/faux.js +4 -1
  490. package/node_modules/@earendil-works/pi-ai/dist/providers/faux.js.map +1 -1
  491. package/node_modules/@earendil-works/pi-ai/dist/providers/ollama.d.ts +9 -0
  492. package/node_modules/@earendil-works/pi-ai/dist/providers/ollama.d.ts.map +1 -0
  493. package/node_modules/@earendil-works/pi-ai/dist/providers/ollama.js +142 -0
  494. package/node_modules/@earendil-works/pi-ai/dist/providers/ollama.js.map +1 -0
  495. package/node_modules/@earendil-works/pi-ai/dist/providers/opencode-go.js +1 -1
  496. package/node_modules/@earendil-works/pi-ai/dist/providers/opencode-go.js.map +1 -1
  497. package/node_modules/@earendil-works/pi-ai/dist/types.d.ts +14 -2
  498. package/node_modules/@earendil-works/pi-ai/dist/types.d.ts.map +1 -1
  499. package/node_modules/@earendil-works/pi-ai/dist/types.js.map +1 -1
  500. package/node_modules/@earendil-works/pi-ai/dist/utils/error-body.d.ts.map +1 -1
  501. package/node_modules/@earendil-works/pi-ai/dist/utils/error-body.js +23 -4
  502. package/node_modules/@earendil-works/pi-ai/dist/utils/error-body.js.map +1 -1
  503. package/node_modules/@earendil-works/pi-ai/dist/utils/prompt-cache-ttl.d.ts.map +1 -1
  504. package/node_modules/@earendil-works/pi-ai/dist/utils/prompt-cache-ttl.js +10 -1
  505. package/node_modules/@earendil-works/pi-ai/dist/utils/prompt-cache-ttl.js.map +1 -1
  506. package/node_modules/@earendil-works/pi-ai/dist/utils/provider-retry.d.ts +3 -0
  507. package/node_modules/@earendil-works/pi-ai/dist/utils/provider-retry.d.ts.map +1 -1
  508. package/node_modules/@earendil-works/pi-ai/dist/utils/provider-retry.js +13 -12
  509. package/node_modules/@earendil-works/pi-ai/dist/utils/provider-retry.js.map +1 -1
  510. package/node_modules/@earendil-works/pi-ai/dist/utils/retry-hint.d.ts +24 -0
  511. package/node_modules/@earendil-works/pi-ai/dist/utils/retry-hint.d.ts.map +1 -0
  512. package/node_modules/@earendil-works/pi-ai/dist/utils/retry-hint.js +233 -0
  513. package/node_modules/@earendil-works/pi-ai/dist/utils/retry-hint.js.map +1 -0
  514. package/node_modules/@earendil-works/pi-ai/package.json +10 -6
  515. package/node_modules/@earendil-works/pi-pty/package.json +2 -2
  516. package/node_modules/@earendil-works/pi-tui/README.md +77 -14
  517. package/node_modules/@earendil-works/pi-tui/dist/TuiAltScreen.d.ts +83 -0
  518. package/node_modules/@earendil-works/pi-tui/dist/TuiAltScreen.d.ts.map +1 -0
  519. package/node_modules/@earendil-works/pi-tui/dist/TuiAltScreen.js +687 -0
  520. package/node_modules/@earendil-works/pi-tui/dist/TuiAltScreen.js.map +1 -0
  521. package/node_modules/@earendil-works/pi-tui/dist/TuiMainScreen.d.ts +5 -0
  522. package/node_modules/@earendil-works/pi-tui/dist/TuiMainScreen.d.ts.map +1 -0
  523. package/node_modules/@earendil-works/pi-tui/dist/TuiMainScreen.js +5 -0
  524. package/node_modules/@earendil-works/pi-tui/dist/TuiMainScreen.js.map +1 -0
  525. package/node_modules/@earendil-works/pi-tui/dist/components/alt-screen-flash.d.ts +13 -0
  526. package/node_modules/@earendil-works/pi-tui/dist/components/alt-screen-flash.d.ts.map +1 -0
  527. package/node_modules/@earendil-works/pi-tui/dist/components/alt-screen-flash.js +36 -0
  528. package/node_modules/@earendil-works/pi-tui/dist/components/alt-screen-flash.js.map +1 -0
  529. package/node_modules/@earendil-works/pi-tui/dist/components/editor.d.ts.map +1 -1
  530. package/node_modules/@earendil-works/pi-tui/dist/components/editor.js +5 -1
  531. package/node_modules/@earendil-works/pi-tui/dist/components/editor.js.map +1 -1
  532. package/node_modules/@earendil-works/pi-tui/dist/components/h-stack.d.ts +7 -0
  533. package/node_modules/@earendil-works/pi-tui/dist/components/h-stack.d.ts.map +1 -0
  534. package/node_modules/@earendil-works/pi-tui/dist/components/h-stack.js +43 -0
  535. package/node_modules/@earendil-works/pi-tui/dist/components/h-stack.js.map +1 -0
  536. package/node_modules/@earendil-works/pi-tui/dist/components/image.d.ts.map +1 -1
  537. package/node_modules/@earendil-works/pi-tui/dist/components/image.js +4 -4
  538. package/node_modules/@earendil-works/pi-tui/dist/components/image.js.map +1 -1
  539. package/node_modules/@earendil-works/pi-tui/dist/components/markdown.d.ts +2 -0
  540. package/node_modules/@earendil-works/pi-tui/dist/components/markdown.d.ts.map +1 -1
  541. package/node_modules/@earendil-works/pi-tui/dist/components/markdown.js +3 -2
  542. package/node_modules/@earendil-works/pi-tui/dist/components/markdown.js.map +1 -1
  543. package/node_modules/@earendil-works/pi-tui/dist/components/scroll-view.d.ts +51 -0
  544. package/node_modules/@earendil-works/pi-tui/dist/components/scroll-view.d.ts.map +1 -0
  545. package/node_modules/@earendil-works/pi-tui/dist/components/scroll-view.js +163 -0
  546. package/node_modules/@earendil-works/pi-tui/dist/components/scroll-view.js.map +1 -0
  547. package/node_modules/@earendil-works/pi-tui/dist/components/settings-list.d.ts.map +1 -1
  548. package/node_modules/@earendil-works/pi-tui/dist/components/settings-list.js +3 -6
  549. package/node_modules/@earendil-works/pi-tui/dist/components/settings-list.js.map +1 -1
  550. package/node_modules/@earendil-works/pi-tui/dist/components/stack.d.ts +32 -0
  551. package/node_modules/@earendil-works/pi-tui/dist/components/stack.d.ts.map +1 -0
  552. package/node_modules/@earendil-works/pi-tui/dist/components/stack.js +109 -0
  553. package/node_modules/@earendil-works/pi-tui/dist/components/stack.js.map +1 -0
  554. package/node_modules/@earendil-works/pi-tui/dist/components/v-stack.d.ts +8 -0
  555. package/node_modules/@earendil-works/pi-tui/dist/components/v-stack.d.ts.map +1 -0
  556. package/node_modules/@earendil-works/pi-tui/dist/components/v-stack.js +21 -0
  557. package/node_modules/@earendil-works/pi-tui/dist/components/v-stack.js.map +1 -0
  558. package/node_modules/@earendil-works/pi-tui/dist/index.d.ts +10 -4
  559. package/node_modules/@earendil-works/pi-tui/dist/index.d.ts.map +1 -1
  560. package/node_modules/@earendil-works/pi-tui/dist/index.js +10 -4
  561. package/node_modules/@earendil-works/pi-tui/dist/index.js.map +1 -1
  562. package/node_modules/@earendil-works/pi-tui/dist/keybindings.d.ts +30 -0
  563. package/node_modules/@earendil-works/pi-tui/dist/keybindings.d.ts.map +1 -1
  564. package/node_modules/@earendil-works/pi-tui/dist/keybindings.js +18 -0
  565. package/node_modules/@earendil-works/pi-tui/dist/keybindings.js.map +1 -1
  566. package/node_modules/@earendil-works/pi-tui/dist/layout-node.d.ts +40 -0
  567. package/node_modules/@earendil-works/pi-tui/dist/layout-node.d.ts.map +1 -0
  568. package/node_modules/@earendil-works/pi-tui/dist/layout-node.js +6 -0
  569. package/node_modules/@earendil-works/pi-tui/dist/layout-node.js.map +1 -0
  570. package/node_modules/@earendil-works/pi-tui/dist/layout.d.ts +40 -0
  571. package/node_modules/@earendil-works/pi-tui/dist/layout.d.ts.map +1 -0
  572. package/node_modules/@earendil-works/pi-tui/dist/layout.js +315 -0
  573. package/node_modules/@earendil-works/pi-tui/dist/layout.js.map +1 -0
  574. package/node_modules/@earendil-works/pi-tui/dist/slash-command-autocomplete.d.ts.map +1 -1
  575. package/node_modules/@earendil-works/pi-tui/dist/slash-command-autocomplete.js +36 -8
  576. package/node_modules/@earendil-works/pi-tui/dist/slash-command-autocomplete.js.map +1 -1
  577. package/node_modules/@earendil-works/pi-tui/dist/terminal-image.d.ts +10 -0
  578. package/node_modules/@earendil-works/pi-tui/dist/terminal-image.d.ts.map +1 -1
  579. package/node_modules/@earendil-works/pi-tui/dist/terminal-image.js +61 -3
  580. package/node_modules/@earendil-works/pi-tui/dist/terminal-image.js.map +1 -1
  581. package/node_modules/@earendil-works/pi-tui/dist/terminal-text.d.ts +1 -0
  582. package/node_modules/@earendil-works/pi-tui/dist/terminal-text.d.ts.map +1 -1
  583. package/node_modules/@earendil-works/pi-tui/dist/terminal-text.js +12 -2
  584. package/node_modules/@earendil-works/pi-tui/dist/terminal-text.js.map +1 -1
  585. package/node_modules/@earendil-works/pi-tui/dist/tui.d.ts +38 -16
  586. package/node_modules/@earendil-works/pi-tui/dist/tui.d.ts.map +1 -1
  587. package/node_modules/@earendil-works/pi-tui/dist/tui.js +121 -51
  588. package/node_modules/@earendil-works/pi-tui/dist/tui.js.map +1 -1
  589. package/node_modules/@earendil-works/pi-tui/dist/utils.d.ts +10 -0
  590. package/node_modules/@earendil-works/pi-tui/dist/utils.d.ts.map +1 -1
  591. package/node_modules/@earendil-works/pi-tui/dist/utils.js +95 -4
  592. package/node_modules/@earendil-works/pi-tui/dist/utils.js.map +1 -1
  593. package/node_modules/@earendil-works/pi-tui/package.json +2 -2
  594. package/node_modules/typebox/build/compile/validator.d.mts +3 -11
  595. package/node_modules/typebox/build/compile/validator.mjs +6 -36
  596. package/node_modules/typebox/build/error/errors.d.mts +1 -7
  597. package/node_modules/typebox/build/format/_idna.mjs +36 -6
  598. package/node_modules/typebox/build/format/_puny.mjs +4 -1
  599. package/node_modules/typebox/build/format/uuid.d.mts +2 -2
  600. package/node_modules/typebox/build/format/uuid.mjs +3 -3
  601. package/node_modules/typebox/build/guard/emit.d.mts +0 -4
  602. package/node_modules/typebox/build/guard/emit.mjs +0 -8
  603. package/node_modules/typebox/build/guard/guard.d.mts +5 -9
  604. package/node_modules/typebox/build/guard/guard.mjs +10 -15
  605. package/node_modules/typebox/build/guard/string.mjs +16 -4
  606. package/node_modules/typebox/build/schema/engine/_functions.mjs +34 -15
  607. package/node_modules/typebox/build/schema/engine/boolean.d.mts +3 -3
  608. package/node_modules/typebox/build/schema/engine/boolean.mjs +4 -4
  609. package/node_modules/typebox/build/schema/engine/index.d.mts +0 -1
  610. package/node_modules/typebox/build/schema/engine/index.mjs +0 -1
  611. package/node_modules/typebox/build/schema/engine/schema.mjs +6 -11
  612. package/node_modules/typebox/build/schema/engine/type.mjs +14 -18
  613. package/node_modules/typebox/build/schema/types/dependencies.mjs +1 -1
  614. package/node_modules/typebox/build/schema/types/index.d.mts +0 -1
  615. package/node_modules/typebox/build/schema/types/index.mjs +0 -1
  616. package/node_modules/typebox/build/schema/types/schema.d.mts +1 -1
  617. package/node_modules/typebox/build/schema/types/schema.mjs +2 -2
  618. package/node_modules/typebox/build/system/locale/ar_001.mjs +0 -1
  619. package/node_modules/typebox/build/system/locale/bn_BD.mjs +0 -1
  620. package/node_modules/typebox/build/system/locale/cs_CZ.mjs +0 -1
  621. package/node_modules/typebox/build/system/locale/de_DE.mjs +0 -1
  622. package/node_modules/typebox/build/system/locale/el_GR.mjs +0 -1
  623. package/node_modules/typebox/build/system/locale/en_US.mjs +0 -1
  624. package/node_modules/typebox/build/system/locale/es_419.mjs +0 -1
  625. package/node_modules/typebox/build/system/locale/es_AR.mjs +0 -1
  626. package/node_modules/typebox/build/system/locale/es_ES.mjs +0 -1
  627. package/node_modules/typebox/build/system/locale/es_MX.mjs +0 -1
  628. package/node_modules/typebox/build/system/locale/fa_IR.mjs +0 -1
  629. package/node_modules/typebox/build/system/locale/fil_PH.mjs +0 -1
  630. package/node_modules/typebox/build/system/locale/fr_CA.mjs +0 -1
  631. package/node_modules/typebox/build/system/locale/fr_FR.mjs +0 -1
  632. package/node_modules/typebox/build/system/locale/ha_NG.mjs +0 -1
  633. package/node_modules/typebox/build/system/locale/hi_IN.mjs +0 -1
  634. package/node_modules/typebox/build/system/locale/hu_HU.mjs +0 -1
  635. package/node_modules/typebox/build/system/locale/id_ID.mjs +0 -1
  636. package/node_modules/typebox/build/system/locale/it_IT.mjs +0 -1
  637. package/node_modules/typebox/build/system/locale/ja_JP.mjs +0 -1
  638. package/node_modules/typebox/build/system/locale/ko_KR.mjs +0 -1
  639. package/node_modules/typebox/build/system/locale/ms_MY.mjs +0 -1
  640. package/node_modules/typebox/build/system/locale/nl_NL.mjs +0 -1
  641. package/node_modules/typebox/build/system/locale/pl_PL.mjs +0 -1
  642. package/node_modules/typebox/build/system/locale/pt_BR.mjs +0 -1
  643. package/node_modules/typebox/build/system/locale/pt_PT.mjs +0 -1
  644. package/node_modules/typebox/build/system/locale/ro_RO.mjs +0 -1
  645. package/node_modules/typebox/build/system/locale/ru_RU.mjs +0 -1
  646. package/node_modules/typebox/build/system/locale/sv_SE.mjs +0 -1
  647. package/node_modules/typebox/build/system/locale/sw_TZ.mjs +0 -1
  648. package/node_modules/typebox/build/system/locale/th_TH.mjs +0 -1
  649. package/node_modules/typebox/build/system/locale/tr_TR.mjs +0 -1
  650. package/node_modules/typebox/build/system/locale/uk_UA.mjs +0 -1
  651. package/node_modules/typebox/build/system/locale/ur_PK.mjs +0 -1
  652. package/node_modules/typebox/build/system/locale/vi_VN.mjs +0 -1
  653. package/node_modules/typebox/build/system/locale/yo_NG.mjs +0 -1
  654. package/node_modules/typebox/build/system/locale/zh_Hans.mjs +0 -1
  655. package/node_modules/typebox/build/system/locale/zh_Hant.mjs +0 -1
  656. package/node_modules/typebox/build/system/memory/clone.d.mts +2 -3
  657. package/node_modules/typebox/build/system/memory/clone.mjs +73 -26
  658. package/node_modules/typebox/build/system/settings/settings.d.mts +15 -0
  659. package/node_modules/typebox/build/system/settings/settings.mjs +3 -1
  660. package/node_modules/typebox/build/type/action/_add_immutable.d.mts +11 -0
  661. package/node_modules/typebox/build/type/action/_add_immutable.mjs +11 -0
  662. package/node_modules/typebox/build/type/action/_add_optional.d.mts +11 -0
  663. package/node_modules/typebox/build/type/action/_add_optional.mjs +11 -0
  664. package/node_modules/typebox/build/type/action/_add_readonly.d.mts +11 -0
  665. package/node_modules/typebox/build/type/action/_add_readonly.mjs +11 -0
  666. package/node_modules/typebox/build/type/action/_remove_immutable.d.mts +11 -0
  667. package/node_modules/typebox/build/type/action/_remove_immutable.mjs +11 -0
  668. package/node_modules/typebox/build/type/action/_remove_optional.d.mts +11 -0
  669. package/node_modules/typebox/build/type/action/_remove_optional.mjs +11 -0
  670. package/node_modules/typebox/build/type/action/_remove_readonly.d.mts +11 -0
  671. package/node_modules/typebox/build/type/action/_remove_readonly.mjs +11 -0
  672. package/node_modules/typebox/build/type/action/conditional.d.mts +2 -3
  673. package/node_modules/typebox/build/type/action/conditional.mjs +2 -1
  674. package/node_modules/typebox/build/type/action/index.d.mts +7 -4
  675. package/node_modules/typebox/build/type/action/index.mjs +7 -4
  676. package/node_modules/typebox/build/type/action/mapped.d.mts +2 -3
  677. package/node_modules/typebox/build/type/action/mapped.mjs +2 -1
  678. package/node_modules/typebox/build/type/action/module.d.mts +8 -7
  679. package/node_modules/typebox/build/type/action/module.mjs +7 -6
  680. package/node_modules/typebox/build/type/action/readonly_object.mjs +3 -0
  681. package/node_modules/typebox/build/type/action/with.d.mts +11 -0
  682. package/node_modules/typebox/build/type/action/with.mjs +11 -0
  683. package/node_modules/typebox/build/type/engine/call/distribute_arguments.mjs +1 -1
  684. package/node_modules/typebox/build/type/engine/call/instantiate.d.mts +1 -3
  685. package/node_modules/typebox/build/type/engine/call/instantiate.mjs +3 -2
  686. package/node_modules/typebox/build/type/engine/call/resolve_arguments.mjs +2 -2
  687. package/node_modules/typebox/build/type/engine/constructor_parameters/instantiate.d.mts +3 -4
  688. package/node_modules/typebox/build/type/engine/constructor_parameters/instantiate.mjs +2 -1
  689. package/node_modules/typebox/build/type/engine/cyclic/candidates.d.mts +2 -3
  690. package/node_modules/typebox/build/type/engine/cyclic/candidates.mjs +3 -6
  691. package/node_modules/typebox/build/type/engine/cyclic/check.d.mts +6 -9
  692. package/node_modules/typebox/build/type/engine/cyclic/check.mjs +10 -16
  693. package/node_modules/typebox/build/type/engine/cyclic/dependencies.d.mts +1 -4
  694. package/node_modules/typebox/build/type/engine/cyclic/dependencies.mjs +9 -15
  695. package/node_modules/typebox/build/type/engine/cyclic/extends.d.mts +1 -4
  696. package/node_modules/typebox/build/type/engine/cyclic/extends.mjs +8 -14
  697. package/node_modules/typebox/build/type/engine/cyclic/instantiate.d.mts +2 -5
  698. package/node_modules/typebox/build/type/engine/cyclic/instantiate.mjs +3 -2
  699. package/node_modules/typebox/build/type/engine/enum/index.d.mts +0 -1
  700. package/node_modules/typebox/build/type/engine/enum/index.mjs +0 -1
  701. package/node_modules/typebox/build/type/engine/evaluate/broaden.d.mts +1 -2
  702. package/node_modules/typebox/build/type/engine/evaluate/broaden.mjs +2 -6
  703. package/node_modules/typebox/build/type/engine/evaluate/composite.d.mts +10 -6
  704. package/node_modules/typebox/build/type/engine/evaluate/composite.mjs +10 -6
  705. package/node_modules/typebox/build/type/engine/evaluate/distribute.d.mts +2 -1
  706. package/node_modules/typebox/build/type/engine/evaluate/distribute.mjs +3 -3
  707. package/node_modules/typebox/build/type/engine/evaluate/evaluate.d.mts +17 -5
  708. package/node_modules/typebox/build/type/engine/evaluate/evaluate.mjs +34 -8
  709. package/node_modules/typebox/build/type/engine/exclude/operation.d.mts +5 -6
  710. package/node_modules/typebox/build/type/engine/exclude/operation.mjs +11 -12
  711. package/node_modules/typebox/build/type/engine/extract/operation.d.mts +5 -6
  712. package/node_modules/typebox/build/type/engine/extract/operation.mjs +11 -12
  713. package/node_modules/typebox/build/type/engine/immutable/instantiate_add.d.mts +10 -0
  714. package/node_modules/typebox/build/type/engine/immutable/instantiate_add.mjs +14 -0
  715. package/node_modules/typebox/build/type/engine/immutable/instantiate_remove.d.mts +10 -0
  716. package/node_modules/typebox/build/type/engine/immutable/instantiate_remove.mjs +14 -0
  717. package/node_modules/typebox/build/type/engine/index.d.mts +2 -2
  718. package/node_modules/typebox/build/type/engine/index.mjs +2 -2
  719. package/node_modules/typebox/build/type/engine/indexable/from_dependent.d.mts +5 -0
  720. package/node_modules/typebox/build/type/engine/indexable/from_dependent.mjs +8 -0
  721. package/node_modules/typebox/build/type/engine/indexable/from_enum.d.mts +3 -3
  722. package/node_modules/typebox/build/type/engine/indexable/from_enum.mjs +4 -4
  723. package/node_modules/typebox/build/type/engine/indexable/from_template_literal.d.mts +2 -2
  724. package/node_modules/typebox/build/type/engine/indexable/from_template_literal.mjs +3 -3
  725. package/node_modules/typebox/build/type/engine/indexable/from_type.d.mts +3 -1
  726. package/node_modules/typebox/build/type/engine/indexable/from_type.mjs +9 -6
  727. package/node_modules/typebox/build/type/engine/indexed/instantiate.d.mts +2 -1
  728. package/node_modules/typebox/build/type/engine/indexed/instantiate.mjs +5 -2
  729. package/node_modules/typebox/build/type/engine/instantiate.d.mts +44 -31
  730. package/node_modules/typebox/build/type/engine/instantiate.mjs +82 -83
  731. package/node_modules/typebox/build/type/engine/interface/instantiate.d.mts +3 -6
  732. package/node_modules/typebox/build/type/engine/intrinsics/from_template_literal.d.mts +2 -2
  733. package/node_modules/typebox/build/type/engine/intrinsics/from_template_literal.mjs +3 -3
  734. package/node_modules/typebox/build/type/engine/keyof/instantiate.d.mts +2 -1
  735. package/node_modules/typebox/build/type/engine/keyof/instantiate.mjs +5 -1
  736. package/node_modules/typebox/build/type/engine/mapped/mapped_operation.d.mts +4 -4
  737. package/node_modules/typebox/build/type/engine/mapped/mapped_operation.mjs +3 -3
  738. package/node_modules/typebox/build/type/engine/mapped/mapped_variants.d.mts +5 -4
  739. package/node_modules/typebox/build/type/engine/mapped/mapped_variants.mjs +10 -5
  740. package/node_modules/typebox/build/type/engine/module/instantiate.d.mts +7 -9
  741. package/node_modules/typebox/build/type/engine/module/instantiate.mjs +17 -15
  742. package/node_modules/typebox/build/type/engine/object/from_dependent.d.mts +5 -0
  743. package/node_modules/typebox/build/type/engine/object/from_dependent.mjs +8 -0
  744. package/node_modules/typebox/build/type/engine/object/from_type.d.mts +3 -1
  745. package/node_modules/typebox/build/type/engine/object/from_type.mjs +8 -5
  746. package/node_modules/typebox/build/type/engine/object/from_union.mjs +2 -2
  747. package/node_modules/typebox/build/type/engine/optional/instantiate_add.d.mts +10 -0
  748. package/node_modules/typebox/build/type/engine/optional/instantiate_add.mjs +14 -0
  749. package/node_modules/typebox/build/type/engine/optional/instantiate_remove.d.mts +10 -0
  750. package/node_modules/typebox/build/type/engine/optional/instantiate_remove.mjs +14 -0
  751. package/node_modules/typebox/build/type/engine/parameters/instantiate.d.mts +3 -4
  752. package/node_modules/typebox/build/type/engine/parameters/instantiate.mjs +2 -1
  753. package/node_modules/typebox/build/type/engine/partial/from_dependent.d.mts +5 -0
  754. package/node_modules/typebox/build/type/engine/partial/from_dependent.mjs +8 -0
  755. package/node_modules/typebox/build/type/engine/partial/from_intersect.d.mts +1 -1
  756. package/node_modules/typebox/build/type/engine/partial/from_intersect.mjs +3 -2
  757. package/node_modules/typebox/build/type/engine/partial/from_object.d.mts +2 -2
  758. package/node_modules/typebox/build/type/engine/partial/from_object.mjs +2 -2
  759. package/node_modules/typebox/build/type/engine/partial/from_type.d.mts +3 -1
  760. package/node_modules/typebox/build/type/engine/partial/from_type.mjs +7 -4
  761. package/node_modules/typebox/build/type/engine/priority/index.d.mts +1 -0
  762. package/node_modules/typebox/build/type/engine/priority/index.mjs +1 -0
  763. package/node_modules/typebox/build/type/engine/priority/priority.d.mts +20 -0
  764. package/node_modules/typebox/build/type/engine/priority/priority.mjs +28 -0
  765. package/node_modules/typebox/build/type/engine/readonly/instantiate_add.d.mts +10 -0
  766. package/node_modules/typebox/build/type/engine/readonly/instantiate_add.mjs +14 -0
  767. package/node_modules/typebox/build/type/engine/readonly/instantiate_remove.d.mts +10 -0
  768. package/node_modules/typebox/build/type/engine/readonly/instantiate_remove.mjs +14 -0
  769. package/node_modules/typebox/build/type/engine/readonly_object/from_array.d.mts +2 -2
  770. package/node_modules/typebox/build/type/engine/readonly_object/from_array.mjs +2 -2
  771. package/node_modules/typebox/build/type/engine/readonly_object/from_dependent.d.mts +5 -0
  772. package/node_modules/typebox/build/type/engine/readonly_object/from_dependent.mjs +8 -0
  773. package/node_modules/typebox/build/type/engine/readonly_object/from_intersect.d.mts +1 -1
  774. package/node_modules/typebox/build/type/engine/readonly_object/from_intersect.mjs +3 -2
  775. package/node_modules/typebox/build/type/engine/readonly_object/from_object.d.mts +2 -2
  776. package/node_modules/typebox/build/type/engine/readonly_object/from_object.mjs +2 -2
  777. package/node_modules/typebox/build/type/engine/readonly_object/from_tuple.d.mts +2 -2
  778. package/node_modules/typebox/build/type/engine/readonly_object/from_tuple.mjs +2 -2
  779. package/node_modules/typebox/build/type/engine/readonly_object/from_type.d.mts +3 -1
  780. package/node_modules/typebox/build/type/engine/readonly_object/from_type.mjs +8 -5
  781. package/node_modules/typebox/build/type/engine/record/from_key_enum.d.mts +2 -2
  782. package/node_modules/typebox/build/type/engine/record/from_key_enum.mjs +2 -2
  783. package/node_modules/typebox/build/type/engine/record/from_key_template_literal.d.mts +2 -2
  784. package/node_modules/typebox/build/type/engine/record/from_key_template_literal.mjs +2 -2
  785. package/node_modules/typebox/build/type/engine/ref/instantiate.d.mts +3 -3
  786. package/node_modules/typebox/build/type/engine/ref/instantiate.mjs +6 -6
  787. package/node_modules/typebox/build/type/engine/required/from_dependent.d.mts +5 -0
  788. package/node_modules/typebox/build/type/engine/required/from_dependent.mjs +8 -0
  789. package/node_modules/typebox/build/type/engine/required/from_intersect.d.mts +1 -1
  790. package/node_modules/typebox/build/type/engine/required/from_intersect.mjs +3 -2
  791. package/node_modules/typebox/build/type/engine/required/from_object.d.mts +2 -2
  792. package/node_modules/typebox/build/type/engine/required/from_object.mjs +2 -2
  793. package/node_modules/typebox/build/type/engine/required/from_type.d.mts +3 -1
  794. package/node_modules/typebox/build/type/engine/required/from_type.mjs +7 -4
  795. package/node_modules/typebox/build/type/engine/template_literal/decode.mjs +3 -3
  796. package/node_modules/typebox/build/type/engine/template_literal/encode.d.mts +2 -2
  797. package/node_modules/typebox/build/type/engine/template_literal/encode.mjs +6 -6
  798. package/node_modules/typebox/build/type/engine/template_literal/is_finite.mjs +1 -1
  799. package/node_modules/typebox/build/type/engine/template_literal/is_pattern.mjs +1 -0
  800. package/node_modules/typebox/build/type/engine/this/expand_this.d.mts +1 -4
  801. package/node_modules/typebox/build/type/engine/this/expand_this.mjs +7 -13
  802. package/node_modules/typebox/build/type/engine/with/instantiate.d.mts +8 -0
  803. package/node_modules/typebox/build/type/engine/{options → with}/instantiate.mjs +5 -5
  804. package/node_modules/typebox/build/type/extends/dependent.d.mts +6 -0
  805. package/node_modules/typebox/build/type/extends/dependent.mjs +6 -0
  806. package/node_modules/typebox/build/type/extends/enum.d.mts +4 -4
  807. package/node_modules/typebox/build/type/extends/enum.mjs +3 -2
  808. package/node_modules/typebox/build/type/extends/extends_left.d.mts +5 -7
  809. package/node_modules/typebox/build/type/extends/extends_left.mjs +24 -27
  810. package/node_modules/typebox/build/type/extends/extends_right.d.mts +7 -5
  811. package/node_modules/typebox/build/type/extends/extends_right.mjs +20 -15
  812. package/node_modules/typebox/build/type/extends/inference.mjs +1 -1
  813. package/node_modules/typebox/build/type/extends/object.d.mts +8 -1
  814. package/node_modules/typebox/build/type/extends/object.mjs +25 -3
  815. package/node_modules/typebox/build/type/extends/parameters.mjs +2 -2
  816. package/node_modules/typebox/build/type/extends/record.d.mts +13 -0
  817. package/node_modules/typebox/build/type/extends/record.mjs +23 -0
  818. package/node_modules/typebox/build/type/extends/template_literal.d.mts +3 -3
  819. package/node_modules/typebox/build/type/extends/template_literal.mjs +3 -3
  820. package/node_modules/typebox/build/type/extends/tuple.d.mts +3 -6
  821. package/node_modules/typebox/build/type/extends/tuple.mjs +6 -5
  822. package/node_modules/typebox/build/type/extends/union.mjs +2 -2
  823. package/node_modules/typebox/build/type/script/mapping.d.mts +86 -98
  824. package/node_modules/typebox/build/type/script/mapping.mjs +95 -92
  825. package/node_modules/typebox/build/type/script/parser.d.mts +42 -40
  826. package/node_modules/typebox/build/type/script/parser.mjs +23 -22
  827. package/node_modules/typebox/build/type/script/script.d.mts +3 -4
  828. package/node_modules/typebox/build/type/script/script.mjs +3 -2
  829. package/node_modules/typebox/build/type/script/token/internal/guard.d.mts +1 -1
  830. package/node_modules/typebox/build/type/script/token/internal/guard.mjs +1 -1
  831. package/node_modules/typebox/build/type/script/token/internal/take.mjs +1 -1
  832. package/node_modules/typebox/build/type/script/token/until.mjs +2 -2
  833. package/node_modules/typebox/build/type/types/_codec.d.mts +12 -12
  834. package/node_modules/typebox/build/type/types/_codec.mjs +0 -1
  835. package/node_modules/typebox/build/type/types/_immutable.d.mts +2 -9
  836. package/node_modules/typebox/build/type/types/_immutable.mjs +2 -10
  837. package/node_modules/typebox/build/type/types/_optional.d.mts +2 -9
  838. package/node_modules/typebox/build/type/types/_optional.mjs +2 -11
  839. package/node_modules/typebox/build/type/types/_readonly.d.mts +2 -9
  840. package/node_modules/typebox/build/type/types/_readonly.mjs +2 -10
  841. package/node_modules/typebox/build/type/types/_refine.d.mts +8 -10
  842. package/node_modules/typebox/build/type/types/_refine.mjs +1 -2
  843. package/node_modules/typebox/build/type/types/call.d.mts +3 -3
  844. package/node_modules/typebox/build/type/types/call.mjs +3 -2
  845. package/node_modules/typebox/build/type/types/deferred.d.mts +1 -0
  846. package/node_modules/typebox/build/type/types/deferred.mjs +1 -1
  847. package/node_modules/typebox/build/type/types/dependent.d.mts +17 -0
  848. package/node_modules/typebox/build/type/types/dependent.mjs +24 -0
  849. package/node_modules/typebox/build/type/types/enum.d.mts +3 -1
  850. package/node_modules/typebox/build/type/types/enum.mjs +5 -0
  851. package/node_modules/typebox/build/type/types/index.d.mts +1 -4
  852. package/node_modules/typebox/build/type/types/index.mjs +1 -4
  853. package/node_modules/typebox/build/type/types/number.d.mts +1 -1
  854. package/node_modules/typebox/build/type/types/number.mjs +1 -1
  855. package/node_modules/typebox/build/type/types/record.d.mts +13 -7
  856. package/node_modules/typebox/build/type/types/record.mjs +15 -9
  857. package/node_modules/typebox/build/type/types/static.d.mts +2 -5
  858. package/node_modules/typebox/build/typebox.d.mts +3 -7
  859. package/node_modules/typebox/build/typebox.mjs +3 -7
  860. package/node_modules/typebox/build/value/clean/clean.mjs +4 -2
  861. package/node_modules/typebox/build/value/clean/from_intersect.mjs +2 -2
  862. package/node_modules/typebox/build/value/clean/from_type.mjs +8 -10
  863. package/node_modules/typebox/build/value/clean/from_union.d.mts +1 -1
  864. package/node_modules/typebox/build/value/clean/from_union.mjs +1 -2
  865. package/node_modules/typebox/build/value/clone/clone.mjs +2 -73
  866. package/node_modules/typebox/build/value/codec/decode.mjs +4 -2
  867. package/node_modules/typebox/build/value/codec/encode.mjs +4 -2
  868. package/node_modules/typebox/build/value/codec/from_array.mjs +1 -4
  869. package/node_modules/typebox/build/value/codec/from_object.mjs +1 -4
  870. package/node_modules/typebox/build/value/codec/from_record.mjs +2 -7
  871. package/node_modules/typebox/build/value/codec/from_tuple.mjs +1 -4
  872. package/node_modules/typebox/build/value/codec/from_union.mjs +2 -3
  873. package/node_modules/typebox/build/value/convert/from_enum.mjs +3 -4
  874. package/node_modules/typebox/build/value/convert/from_template_literal.d.mts +1 -1
  875. package/node_modules/typebox/build/value/convert/from_template_literal.mjs +2 -3
  876. package/node_modules/typebox/build/value/convert/from_type.mjs +19 -21
  877. package/node_modules/typebox/build/value/create/from_enum.mjs +2 -2
  878. package/node_modules/typebox/build/value/create/from_type.mjs +23 -31
  879. package/node_modules/typebox/build/value/default/from_object.mjs +1 -1
  880. package/node_modules/typebox/build/value/default/from_type.mjs +8 -10
  881. package/node_modules/typebox/build/value/errors/errors.d.mts +2 -2
  882. package/node_modules/typebox/build/value/errors/errors.mjs +1 -1
  883. package/node_modules/typebox/build/value/index.d.mts +0 -1
  884. package/node_modules/typebox/build/value/index.mjs +0 -1
  885. package/node_modules/typebox/build/value/repair/from_enum.mjs +2 -3
  886. package/node_modules/typebox/build/value/repair/from_type.mjs +24 -22
  887. package/node_modules/typebox/build/value/shared/union_priority_sort.d.mts +6 -2
  888. package/node_modules/typebox/build/value/shared/union_priority_sort.mjs +62 -26
  889. package/node_modules/typebox/build/value/value.d.mts +0 -1
  890. package/node_modules/typebox/build/value/value.mjs +0 -1
  891. package/node_modules/typebox/package.json +33 -33
  892. package/node_modules/typebox/readme.md +117 -103
  893. package/package.json +16 -11
  894. package/vendor/pi-client/client.d.ts +25 -0
  895. package/vendor/pi-client/client.d.ts.map +1 -0
  896. package/vendor/pi-client/client.js +386 -0
  897. package/vendor/pi-client/client.js.map +1 -0
  898. package/vendor/pi-client/connection.d.ts +25 -0
  899. package/vendor/pi-client/connection.d.ts.map +1 -0
  900. package/vendor/pi-client/connection.js +204 -0
  901. package/vendor/pi-client/connection.js.map +1 -0
  902. package/vendor/pi-client/errors.d.ts +23 -0
  903. package/vendor/pi-client/errors.d.ts.map +1 -0
  904. package/vendor/pi-client/errors.js +42 -0
  905. package/vendor/pi-client/errors.js.map +1 -0
  906. package/vendor/pi-client/index.d.ts +6 -0
  907. package/vendor/pi-client/index.d.ts.map +1 -0
  908. package/vendor/pi-client/index.js +3 -0
  909. package/vendor/pi-client/index.js.map +1 -0
  910. package/vendor/pi-client/promise.d.ts +8 -0
  911. package/vendor/pi-client/promise.d.ts.map +1 -0
  912. package/vendor/pi-client/promise.js +11 -0
  913. package/vendor/pi-client/promise.js.map +1 -0
  914. package/vendor/pi-client/session-handle.d.ts +54 -0
  915. package/vendor/pi-client/session-handle.d.ts.map +1 -0
  916. package/vendor/pi-client/session-handle.js +50 -0
  917. package/vendor/pi-client/session-handle.js.map +1 -0
  918. package/vendor/pi-client/state.d.ts +22 -0
  919. package/vendor/pi-client/state.d.ts.map +1 -0
  920. package/vendor/pi-client/state.js +149 -0
  921. package/vendor/pi-client/state.js.map +1 -0
  922. package/vendor/pi-client/transport.d.ts +17 -0
  923. package/vendor/pi-client/transport.d.ts.map +1 -0
  924. package/vendor/pi-client/transport.js +2 -0
  925. package/vendor/pi-client/transport.js.map +1 -0
  926. package/vendor/pi-client/types.d.ts +23 -0
  927. package/vendor/pi-client/types.d.ts.map +1 -0
  928. package/vendor/pi-client/types.js +2 -0
  929. package/vendor/pi-client/types.js.map +1 -0
  930. package/vendor/pi-client/unix.d.ts +8 -0
  931. package/vendor/pi-client/unix.d.ts.map +1 -0
  932. package/vendor/pi-client/unix.js +151 -0
  933. package/vendor/pi-client/unix.js.map +1 -0
  934. package/vendor/pi-protocol/cbor/decoder.d.ts +4 -0
  935. package/vendor/pi-protocol/cbor/decoder.d.ts.map +1 -0
  936. package/vendor/pi-protocol/cbor/decoder.js +163 -0
  937. package/vendor/pi-protocol/cbor/decoder.js.map +1 -0
  938. package/vendor/pi-protocol/cbor/encoder.d.ts +4 -0
  939. package/vendor/pi-protocol/cbor/encoder.d.ts.map +1 -0
  940. package/vendor/pi-protocol/cbor/encoder.js +199 -0
  941. package/vendor/pi-protocol/cbor/encoder.js.map +1 -0
  942. package/vendor/pi-protocol/cbor/index.d.ts +4 -0
  943. package/vendor/pi-protocol/cbor/index.d.ts.map +1 -0
  944. package/vendor/pi-protocol/cbor/index.js +4 -0
  945. package/vendor/pi-protocol/cbor/index.js.map +1 -0
  946. package/vendor/pi-protocol/cbor/options.d.ts +26 -0
  947. package/vendor/pi-protocol/cbor/options.d.ts.map +1 -0
  948. package/vendor/pi-protocol/cbor/options.js +29 -0
  949. package/vendor/pi-protocol/cbor/options.js.map +1 -0
  950. package/vendor/pi-protocol/codec.d.ts +29 -0
  951. package/vendor/pi-protocol/codec.d.ts.map +1 -0
  952. package/vendor/pi-protocol/codec.js +140 -0
  953. package/vendor/pi-protocol/codec.js.map +1 -0
  954. package/vendor/pi-protocol/framing.d.ts +29 -0
  955. package/vendor/pi-protocol/framing.d.ts.map +1 -0
  956. package/vendor/pi-protocol/framing.js +152 -0
  957. package/vendor/pi-protocol/framing.js.map +1 -0
  958. package/vendor/pi-protocol/index.d.ts +5 -0
  959. package/vendor/pi-protocol/index.d.ts.map +1 -0
  960. package/vendor/pi-protocol/index.js +5 -0
  961. package/vendor/pi-protocol/index.js.map +1 -0
  962. package/vendor/pi-protocol/schemas.d.ts +13818 -0
  963. package/vendor/pi-protocol/schemas.d.ts.map +1 -0
  964. package/vendor/pi-protocol/schemas.js +382 -0
  965. package/vendor/pi-protocol/schemas.js.map +1 -0
  966. package/dist/core/extensions/builtin/tool-pair-guard/sanitize-anthropic-payload.d.ts +0 -3
  967. package/dist/core/extensions/builtin/tool-pair-guard/sanitize-anthropic-payload.d.ts.map +0 -1
  968. package/dist/core/extensions/builtin/tool-pair-guard/sanitize-anthropic-payload.js.map +0 -1
  969. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl-repo.d.ts +0 -26
  970. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl-repo.d.ts.map +0 -1
  971. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl-repo.js +0 -100
  972. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl-repo.js.map +0 -1
  973. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl-storage.d.ts +0 -42
  974. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl-storage.d.ts.map +0 -1
  975. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl-storage.js +0 -286
  976. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl-storage.js.map +0 -1
  977. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory-repo.d.ts +0 -18
  978. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory-repo.d.ts.map +0 -1
  979. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory-repo.js +0 -44
  980. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory-repo.js.map +0 -1
  981. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory-storage.d.ts +0 -33
  982. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory-storage.d.ts.map +0 -1
  983. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory-storage.js +0 -163
  984. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory-storage.js.map +0 -1
  985. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo-utils.d.ts +0 -11
  986. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo-utils.d.ts.map +0 -1
  987. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo-utils.js +0 -39
  988. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo-utils.js.map +0 -1
  989. package/node_modules/typebox/build/schema/engine/_guard.d.mts +0 -6
  990. package/node_modules/typebox/build/schema/engine/_guard.mjs +0 -26
  991. package/node_modules/typebox/build/schema/types/_guard.d.mts +0 -10
  992. package/node_modules/typebox/build/schema/types/_guard.mjs +0 -16
  993. package/node_modules/typebox/build/type/action/_optional.d.mts +0 -19
  994. package/node_modules/typebox/build/type/action/_optional.mjs +0 -40
  995. package/node_modules/typebox/build/type/action/_readonly.d.mts +0 -19
  996. package/node_modules/typebox/build/type/action/_readonly.mjs +0 -40
  997. package/node_modules/typebox/build/type/action/awaited.d.mts +0 -15
  998. package/node_modules/typebox/build/type/action/awaited.mjs +0 -15
  999. package/node_modules/typebox/build/type/action/options.d.mts +0 -11
  1000. package/node_modules/typebox/build/type/action/options.mjs +0 -11
  1001. package/node_modules/typebox/build/type/engine/awaited/instantiate.d.mts +0 -11
  1002. package/node_modules/typebox/build/type/engine/awaited/instantiate.mjs +0 -20
  1003. package/node_modules/typebox/build/type/engine/enum/enum_to_union.d.mts +0 -14
  1004. package/node_modules/typebox/build/type/engine/enum/enum_to_union.mjs +0 -24
  1005. package/node_modules/typebox/build/type/engine/options/index.d.mts +0 -1
  1006. package/node_modules/typebox/build/type/engine/options/index.mjs +0 -1
  1007. package/node_modules/typebox/build/type/engine/options/instantiate.d.mts +0 -8
  1008. package/node_modules/typebox/build/type/extends/async_iterator.d.mts +0 -7
  1009. package/node_modules/typebox/build/type/extends/async_iterator.mjs +0 -9
  1010. package/node_modules/typebox/build/type/extends/iterator.d.mts +0 -7
  1011. package/node_modules/typebox/build/type/extends/iterator.mjs +0 -9
  1012. package/node_modules/typebox/build/type/extends/promise.d.mts +0 -7
  1013. package/node_modules/typebox/build/type/extends/promise.mjs +0 -9
  1014. package/node_modules/typebox/build/type/types/async_iterator.d.mts +0 -20
  1015. package/node_modules/typebox/build/type/types/async_iterator.mjs +0 -28
  1016. package/node_modules/typebox/build/type/types/base.d.mts +0 -50
  1017. package/node_modules/typebox/build/type/types/base.mjs +0 -84
  1018. package/node_modules/typebox/build/type/types/iterator.d.mts +0 -20
  1019. package/node_modules/typebox/build/type/types/iterator.mjs +0 -28
  1020. package/node_modules/typebox/build/type/types/promise.d.mts +0 -21
  1021. package/node_modules/typebox/build/type/types/promise.mjs +0 -29
  1022. package/node_modules/typebox/build/value/clean/from_base.d.mts +0 -2
  1023. package/node_modules/typebox/build/value/clean/from_base.mjs +0 -4
  1024. package/node_modules/typebox/build/value/convert/from_base.d.mts +0 -2
  1025. package/node_modules/typebox/build/value/convert/from_base.mjs +0 -4
  1026. package/node_modules/typebox/build/value/create/from_async_iterator.d.mts +0 -2
  1027. package/node_modules/typebox/build/value/create/from_async_iterator.mjs +0 -5
  1028. package/node_modules/typebox/build/value/create/from_base.d.mts +0 -2
  1029. package/node_modules/typebox/build/value/create/from_base.mjs +0 -4
  1030. package/node_modules/typebox/build/value/create/from_iterator.d.mts +0 -2
  1031. package/node_modules/typebox/build/value/create/from_iterator.mjs +0 -5
  1032. package/node_modules/typebox/build/value/create/from_promise.d.mts +0 -2
  1033. package/node_modules/typebox/build/value/create/from_promise.mjs +0 -5
  1034. package/node_modules/typebox/build/value/default/from_base.d.mts +0 -2
  1035. package/node_modules/typebox/build/value/default/from_base.mjs +0 -5
  1036. package/node_modules/typebox/build/value/mutate/error.d.mts +0 -3
  1037. package/node_modules/typebox/build/value/mutate/error.mjs +0 -6
  1038. package/node_modules/typebox/build/value/mutate/from_array.d.mts +0 -2
  1039. package/node_modules/typebox/build/value/mutate/from_array.mjs +0 -16
  1040. package/node_modules/typebox/build/value/mutate/from_object.d.mts +0 -2
  1041. package/node_modules/typebox/build/value/mutate/from_object.mjs +0 -40
  1042. package/node_modules/typebox/build/value/mutate/from_unknown.d.mts +0 -2
  1043. package/node_modules/typebox/build/value/mutate/from_unknown.mjs +0 -7
  1044. package/node_modules/typebox/build/value/mutate/from_value.d.mts +0 -2
  1045. package/node_modules/typebox/build/value/mutate/from_value.mjs +0 -12
  1046. package/node_modules/typebox/build/value/mutate/index.d.mts +0 -1
  1047. package/node_modules/typebox/build/value/mutate/index.mjs +0 -1
  1048. package/node_modules/typebox/build/value/mutate/mutate.d.mts +0 -11
  1049. package/node_modules/typebox/build/value/mutate/mutate.mjs +0 -41
  1050. package/node_modules/typebox/build/value/repair/from_base.d.mts +0 -2
  1051. package/node_modules/typebox/build/value/repair/from_base.mjs +0 -8
  1052. /package/node_modules/typebox/build/type/engine/{awaited → with}/index.d.mts +0 -0
  1053. /package/node_modules/typebox/build/type/engine/{awaited → with}/index.mjs +0 -0
@@ -22,20 +22,17 @@ function parseKittyImageHeader(line) {
22
22
  return undefined;
23
23
  const ids = [];
24
24
  let rows = 1;
25
- const params = line.slice(paramsStart, paramsEnd);
26
- for (const param of params.split(",")) {
25
+ for (const param of line.slice(paramsStart, paramsEnd).split(",")) {
27
26
  const [key, value] = param.split("=", 2);
28
27
  if (value === undefined)
29
28
  continue;
30
29
  const numberValue = Number(value);
31
30
  if (!Number.isInteger(numberValue) || numberValue <= 0 || numberValue > 0xffffffff)
32
31
  continue;
33
- if (key === "i") {
32
+ if (key === "i")
34
33
  ids.push(numberValue);
35
- }
36
- else if (key === "r") {
34
+ else if (key === "r")
37
35
  rows = numberValue;
38
- }
39
36
  }
40
37
  return { ids, rows };
41
38
  }
@@ -45,6 +42,9 @@ function extractKittyImageIds(line) {
45
42
  function extractKittyImageRows(line) {
46
43
  return parseKittyImageHeader(line)?.rows ?? 1;
47
44
  }
45
+ function isTermuxSession() {
46
+ return Boolean(process.env.TERMUX_VERSION);
47
+ }
48
48
  /** Type guard to check if a component implements Focusable */
49
49
  export function isFocusable(component) {
50
50
  return component !== null && "focused" in component;
@@ -56,6 +56,9 @@ export function isFocusable(component) {
56
56
  * TUI finds and strips this marker, then positions the hardware cursor there.
57
57
  */
58
58
  export const CURSOR_MARKER = "\x1b_pi:c\x07";
59
+ const FAKE_CURSOR_START = "\x1b[7m";
60
+ const FAKE_CURSOR_END = "\x1b[27m";
61
+ const FAKE_CURSOR_RESET = "\x1b[0m";
59
62
  export { visibleWidth };
60
63
  const renderErrorLoggedClasses = new Set();
61
64
  let renderErrorLogWrites = 0;
@@ -186,9 +189,6 @@ function parseSizeValue(value, referenceSize) {
186
189
  }
187
190
  return undefined;
188
191
  }
189
- function isTermuxSession() {
190
- return Boolean(process.env.TERMUX_VERSION);
191
- }
192
192
  /**
193
193
  * Container - a component that contains other components
194
194
  */
@@ -258,12 +258,47 @@ export class Container {
258
258
  /**
259
259
  * TUI - Main class for managing terminal UI with differential rendering
260
260
  */
261
- export class TUI extends Container {
261
+ const SEGMENT_RESET = "\x1b[0m\x1b]8;;\x07";
262
+ /** Composite overlay content into a terminal line at a fixed column. */
263
+ export function compositeTuiLine(baseLine, overlayLine, startCol, overlayWidth, totalWidth) {
264
+ if (isImageLine(baseLine) && visibleWidth(baseLine) === 0)
265
+ return baseLine;
266
+ const placeholderIndex = baseLine.indexOf("\u{10eeee}");
267
+ const protocolEnd = placeholderIndex === -1 ? -1 : baseLine.lastIndexOf("\x1b\\", placeholderIndex);
268
+ const protocolPrefix = protocolEnd === -1 ? "" : baseLine.slice(0, protocolEnd + 2);
269
+ const afterStart = startCol + overlayWidth;
270
+ const base = extractSegments(baseLine, startCol, afterStart, totalWidth - afterStart, true);
271
+ const overlay = sliceWithWidth(overlayLine, 0, overlayWidth, true);
272
+ const beforePad = Math.max(0, startCol - base.beforeWidth);
273
+ const overlayPad = Math.max(0, overlayWidth - overlay.width);
274
+ const actualBeforeWidth = Math.max(startCol, base.beforeWidth);
275
+ const actualOverlayWidth = Math.max(overlayWidth, overlay.width);
276
+ const afterTarget = Math.max(0, totalWidth - actualBeforeWidth - actualOverlayWidth);
277
+ const afterPad = Math.max(0, afterTarget - base.afterWidth);
278
+ const result = base.before +
279
+ " ".repeat(beforePad) +
280
+ SEGMENT_RESET +
281
+ overlay.text +
282
+ " ".repeat(overlayPad) +
283
+ SEGMENT_RESET +
284
+ base.after +
285
+ " ".repeat(afterPad);
286
+ const composited = visibleWidth(result) <= totalWidth ? result : sliceByColumn(result, 0, totalWidth, true);
287
+ return protocolPrefix + composited;
288
+ }
289
+ export const VIEWPORT_TUI = Symbol.for("@earendil-works/pi-tui/viewport");
290
+ export function isViewportTUI(tui) {
291
+ return tui[VIEWPORT_TUI] === true;
292
+ }
293
+ export class TuiBase extends Container {
262
294
  /** Minimum interval between scheduled renders. Default preserves the historic ~60fps cap. */
263
295
  #minRenderIntervalMs;
264
296
  #lastCursorVisibility;
297
+ get hasOverlayEntries() {
298
+ return this.overlayStack.length > 0;
299
+ }
265
300
  #muxDetector;
266
- constructor(terminal, options) {
301
+ constructor(terminal, options, logDirectory) {
267
302
  super();
268
303
  this.previousLines = [];
269
304
  this.previousRawLines = [];
@@ -300,10 +335,16 @@ export class TUI extends Container {
300
335
  // Preserve existing positional boolean callers while allowing explicit render-policy overrides.
301
336
  const normalizedOptions = typeof options === "boolean" ? { showHardwareCursor: options } : (options ?? {});
302
337
  this.#muxDetector = normalizedOptions.muxDetector ?? isMultiplexerSession;
338
+ this.logDirectory = logDirectory ?? path.join(os.homedir(), ".senpi", "agent");
303
339
  if (normalizedOptions.showHardwareCursor !== undefined) {
304
340
  this.showHardwareCursor = normalizedOptions.showHardwareCursor;
305
341
  }
306
342
  }
343
+ resetRenderState() { }
344
+ beforeTerminalStart() { }
345
+ afterTerminalStart() { }
346
+ beforeTerminalStop() { }
347
+ afterTerminalStop() { }
307
348
  get fullRedraws() {
308
349
  return this.fullRedrawCount;
309
350
  }
@@ -317,9 +358,6 @@ export class TUI extends Container {
317
358
  if (this.showHardwareCursor === enabled)
318
359
  return;
319
360
  this.showHardwareCursor = enabled;
320
- if (!enabled) {
321
- this.#setCursorVisibility(false);
322
- }
323
361
  this.requestRender();
324
362
  }
325
363
  getClearOnShrink() {
@@ -433,8 +471,11 @@ export class TUI extends Container {
433
471
  }
434
472
  }
435
473
  }
474
+ getMountedRoots() {
475
+ return this.children;
476
+ }
436
477
  isComponentMounted(component) {
437
- return this.children.some((child) => this.containsComponent(child, component));
478
+ return this.getMountedRoots().some((child) => this.containsComponent(child, component));
438
479
  }
439
480
  containsComponent(root, target) {
440
481
  if (root === target)
@@ -596,7 +637,9 @@ export class TUI extends Container {
596
637
  this.renderRequested = false;
597
638
  this.inputRenderPending = false;
598
639
  this.#lastCursorVisibility = undefined;
599
- this.terminal.start((data) => this.handleInput(data), () => this.requestRender());
640
+ this.beforeTerminalStart();
641
+ this.terminal.start((data) => this.handleTerminalInput(data), () => this.requestRender());
642
+ this.afterTerminalStart();
600
643
  if (process.env.TMUX)
601
644
  this.terminal.write(ENABLE_FOCUS_REPORTING);
602
645
  this.#setCursorVisibility(false);
@@ -650,10 +693,14 @@ export class TUI extends Container {
650
693
  if (this.terminalColorSchemeNotificationsEnabled) {
651
694
  this.terminal.write("\x1b[?2031l");
652
695
  }
696
+ this.beforeTerminalStop();
653
697
  // Move cursor to the end of the content to prevent overwriting/artifacts on exit
654
698
  if (this.previousLines.length > 0) {
655
- // Overwrite the inverted cursor with a normal space to clear the artifact
656
- this.terminal.write(" ");
699
+ // Only overwrite the cursor cell when the last published frame kept the hardware cursor hidden;
700
+ // a pending visibility change has not rendered yet and must not erase content.
701
+ if (this.#lastCursorVisibility === false) {
702
+ this.terminal.write(" ");
703
+ }
657
704
  const targetRow = this.previousLines.length; // Line after the last content
658
705
  const lineDiff = targetRow - this.hardwareCursorRow;
659
706
  if (lineDiff > 0) {
@@ -669,6 +716,8 @@ export class TUI extends Container {
669
716
  if (process.env.TMUX)
670
717
  this.terminal.write(DISABLE_FOCUS_REPORTING);
671
718
  this.terminal.stop();
719
+ this.afterTerminalStop();
720
+ this.resetRenderState();
672
721
  this.#lastCursorVisibility = undefined;
673
722
  this.previousLines = [];
674
723
  this.previousRawLines = [];
@@ -694,6 +743,7 @@ export class TUI extends Container {
694
743
  requestRender(force = false, source = "unknown") {
695
744
  if (force) {
696
745
  this.inputRenderPending = false;
746
+ this.resetRenderState();
697
747
  this.previousLines = [];
698
748
  this.previousRawLines = [];
699
749
  this.previousWidth = -1; // -1 triggers widthChanged, forcing a full clear
@@ -773,7 +823,7 @@ export class TUI extends Container {
773
823
  this.lastRenderAt = performance.now();
774
824
  this.doRender();
775
825
  }
776
- handleInput(data) {
826
+ handleTerminalInput(data) {
777
827
  const focus = consumeTmuxFocusEvent(data);
778
828
  if (focus.event !== null) {
779
829
  resetCapabilitiesCache();
@@ -1107,7 +1157,10 @@ export class TUI extends Container {
1107
1157
  this.normalizeMemo.set(line, normalized);
1108
1158
  return { line: normalized, normalized: true };
1109
1159
  }
1110
- applyLineResets(lines, mode = "full") {
1160
+ applyLineResets(lines) {
1161
+ return this.applyLineResetResult(lines).lines;
1162
+ }
1163
+ applyLineResetResult(lines, mode = "full") {
1111
1164
  const previousMemo = this.normalizeMemo;
1112
1165
  const nextMemo = new Map();
1113
1166
  const normalizedLines = [];
@@ -1141,7 +1194,7 @@ export class TUI extends Container {
1141
1194
  this.previousLines.length === 0 ||
1142
1195
  this.previousLines.length !== rawLines.length ||
1143
1196
  this.previousRawLines.length !== rawLines.length) {
1144
- return this.applyLineResets(rawLines);
1197
+ return this.applyLineResetResult(rawLines);
1145
1198
  }
1146
1199
  const windowStart = Math.max(0, viewportTop - VIEWPORT_RENDER_OVERSCAN);
1147
1200
  const windowEnd = Math.min(rawLines.length, viewportTop + height + VIEWPORT_RENDER_OVERSCAN);
@@ -1154,7 +1207,7 @@ export class TUI extends Container {
1154
1207
  firstRawChanged = i;
1155
1208
  }
1156
1209
  if (i < windowStart || i >= windowEnd) {
1157
- return this.applyLineResets(rawLines, "escaped");
1210
+ return this.applyLineResetResult(rawLines, "escaped");
1158
1211
  }
1159
1212
  }
1160
1213
  const lines = this.previousLines.slice();
@@ -1323,13 +1376,12 @@ export class TUI extends Container {
1323
1376
  buffer += row.content;
1324
1377
  finalPaintedScreenRow = row.screenRow;
1325
1378
  }
1326
- buffer += TUI.FRAME_END;
1379
+ const finalCursorRow = plan.viewportTop + finalPaintedScreenRow;
1380
+ buffer = this.finishFrame(buffer, cursorPos, newLines.length, finalCursorRow);
1327
1381
  this.terminal.write(buffer);
1328
1382
  this.cursorRow = Math.max(0, newLines.length - 1);
1329
- this.hardwareCursorRow = plan.viewportTop + finalPaintedScreenRow;
1330
1383
  this.maxLinesRendered = Math.max(this.maxLinesRendered, newLines.length);
1331
1384
  this.previousViewportTop = plan.viewportTop;
1332
- this.positionHardwareCursor(cursorPos, newLines.length);
1333
1385
  this.setPreviousLines(newLines, rawLines);
1334
1386
  this.previousKittyImageIds = this.collectKittyImageIds(newLines);
1335
1387
  this.previousWidth = width;
@@ -1352,13 +1404,11 @@ export class TUI extends Container {
1352
1404
  buffer += `\r\x1b[2K${TUI.SEGMENT_RESET}`;
1353
1405
  buffer += newLines[row] ?? "";
1354
1406
  }
1355
- buffer += TUI.FRAME_END;
1407
+ buffer = this.finishFrame(buffer, cursorPos, newLines.length, bufferLength - 1);
1356
1408
  this.terminal.write(buffer);
1357
1409
  this.cursorRow = Math.max(0, newLines.length - 1);
1358
- this.hardwareCursorRow = bufferLength - 1;
1359
1410
  this.maxLinesRendered = newLines.length;
1360
1411
  this.previousViewportTop = Math.max(0, bufferLength - height);
1361
- this.positionHardwareCursor(cursorPos, newLines.length);
1362
1412
  this.setPreviousLines(newLines, rawLines);
1363
1413
  this.previousKittyImageIds = this.collectKittyImageIds(newLines);
1364
1414
  this.previousWidth = width;
@@ -1381,14 +1431,13 @@ export class TUI extends Container {
1381
1431
  buffer += `\r\x1b[2K${TUI.SEGMENT_RESET}`;
1382
1432
  buffer += newLines[viewportTop + row] ?? "";
1383
1433
  }
1384
- buffer += TUI.FRAME_END;
1434
+ const finalCursorRow = viewportTop + Math.max(0, height - 1);
1435
+ buffer = this.finishFrame(buffer, cursorPos, newLines.length, finalCursorRow);
1385
1436
  this.terminal.write(buffer);
1386
1437
  this.muxViewportRepaintCount += 1;
1387
1438
  this.cursorRow = Math.max(0, newLines.length - 1);
1388
- this.hardwareCursorRow = viewportTop + Math.max(0, height - 1);
1389
1439
  this.maxLinesRendered = newLines.length;
1390
1440
  this.previousViewportTop = viewportTop;
1391
- this.positionHardwareCursor(cursorPos, newLines.length);
1392
1441
  this.setPreviousLines(newLines, rawLines);
1393
1442
  this.previousKittyImageIds = this.collectKittyImageIds(newLines);
1394
1443
  this.previousWidth = width;
@@ -1455,8 +1504,22 @@ export class TUI extends Container {
1455
1504
  // Calculate visual column (width of text before marker)
1456
1505
  const beforeMarker = line.slice(0, markerIndex);
1457
1506
  const col = visibleWidth(beforeMarker);
1458
- // Strip marker from the line
1459
- lines[row] = line.slice(0, markerIndex) + line.slice(markerIndex + CURSOR_MARKER.length);
1507
+ let afterMarker = line.slice(markerIndex + CURSOR_MARKER.length);
1508
+ if (this.showHardwareCursor && afterMarker.startsWith(FAKE_CURSOR_START)) {
1509
+ const fakeCursorEnd = afterMarker.indexOf(FAKE_CURSOR_END, FAKE_CURSOR_START.length);
1510
+ const fakeCursorReset = afterMarker.indexOf(FAKE_CURSOR_RESET, FAKE_CURSOR_START.length);
1511
+ if (fakeCursorReset !== -1 && (fakeCursorEnd === -1 || fakeCursorReset < fakeCursorEnd)) {
1512
+ // Keep a full reset because it may also terminate styles surrounding the fake cursor.
1513
+ afterMarker = afterMarker.slice(FAKE_CURSOR_START.length);
1514
+ }
1515
+ else if (fakeCursorEnd !== -1) {
1516
+ afterMarker =
1517
+ afterMarker.slice(FAKE_CURSOR_START.length, fakeCursorEnd) +
1518
+ afterMarker.slice(fakeCursorEnd + FAKE_CURSOR_END.length);
1519
+ }
1520
+ }
1521
+ // Strip marker and any colocated fake cursor styling when the hardware cursor owns the position.
1522
+ lines[row] = beforeMarker + afterMarker;
1460
1523
  return { row, col };
1461
1524
  }
1462
1525
  }
@@ -1522,10 +1585,10 @@ export class TUI extends Container {
1522
1585
  }
1523
1586
  buffer += line;
1524
1587
  }
1525
- buffer += TUI.FRAME_END;
1588
+ const finalCursorRow = Math.max(0, newLines.length - 1);
1589
+ buffer = this.finishFrame(buffer, cursorPos, newLines.length, finalCursorRow);
1526
1590
  this.terminal.write(buffer);
1527
1591
  this.cursorRow = Math.max(0, newLines.length - 1);
1528
- this.hardwareCursorRow = this.cursorRow;
1529
1592
  // Reset max lines when clearing, otherwise track growth
1530
1593
  if (clear) {
1531
1594
  this.maxLinesRendered = newLines.length;
@@ -1535,7 +1598,6 @@ export class TUI extends Container {
1535
1598
  }
1536
1599
  const bufferLength = Math.max(height, newLines.length);
1537
1600
  this.previousViewportTop = Math.max(0, bufferLength - height);
1538
- this.positionHardwareCursor(cursorPos, newLines.length);
1539
1601
  this.setPreviousLines(newLines, rawLines);
1540
1602
  this.previousKittyImageIds = this.collectKittyImageIds(newLines);
1541
1603
  this.previousWidth = width;
@@ -1545,8 +1607,9 @@ export class TUI extends Container {
1545
1607
  const logRedraw = (reason) => {
1546
1608
  if (!debugRedraw)
1547
1609
  return;
1548
- const logPath = path.join(os.homedir(), ".senpi", "agent", "senpi-debug.log");
1610
+ const logPath = path.join(this.logDirectory, "pi-debug.log");
1549
1611
  const msg = `[${new Date().toISOString()}] fullRender: ${reason} (prev=${this.previousLines.length}, new=${newLines.length}, height=${height})\n`;
1612
+ fs.mkdirSync(path.dirname(logPath), { recursive: true });
1550
1613
  fs.appendFileSync(logPath, msg, { encoding: "utf8", mode: DIAGNOSTIC_LOG_MODE });
1551
1614
  chmodDiagnosticLogBestEffort(logPath);
1552
1615
  };
@@ -1667,12 +1730,13 @@ export class TUI extends Container {
1667
1730
  if (moveBack > 0) {
1668
1731
  buffer += `\x1b[${moveBack}A`;
1669
1732
  }
1670
- buffer += TUI.FRAME_END;
1733
+ buffer = this.finishFrame(buffer, cursorPos, newLines.length, targetRow);
1671
1734
  this.terminal.write(buffer);
1672
1735
  this.cursorRow = targetRow;
1673
- this.hardwareCursorRow = targetRow;
1674
1736
  }
1675
- this.positionHardwareCursor(cursorPos, newLines.length);
1737
+ else {
1738
+ this.positionHardwareCursor(cursorPos, newLines.length);
1739
+ }
1676
1740
  this.setPreviousLines(newLines, rawLines);
1677
1741
  this.previousKittyImageIds = this.collectKittyImageIds(newLines);
1678
1742
  this.previousWidth = width;
@@ -1736,13 +1800,12 @@ export class TUI extends Container {
1736
1800
  buffer += `\r\x1b[2K${TUI.SEGMENT_RESET}`;
1737
1801
  buffer += newLines[viewportTop + row] ?? "";
1738
1802
  }
1739
- buffer += TUI.FRAME_END;
1803
+ const finalCursorRow = viewportTop + Math.max(0, height - 1);
1804
+ buffer = this.finishFrame(buffer, cursorPos, newLines.length, finalCursorRow);
1740
1805
  this.terminal.write(buffer);
1741
1806
  this.cursorRow = Math.max(0, newLines.length - 1);
1742
- this.hardwareCursorRow = viewportTop + Math.max(0, height - 1);
1743
1807
  this.maxLinesRendered = Math.max(this.maxLinesRendered, newLines.length);
1744
1808
  this.previousViewportTop = viewportTop;
1745
- this.positionHardwareCursor(cursorPos, newLines.length);
1746
1809
  this.setPreviousLines(newLines, rawLines);
1747
1810
  this.previousKittyImageIds = this.collectKittyImageIds(newLines);
1748
1811
  this.previousWidth = width;
@@ -1857,7 +1920,7 @@ export class TUI extends Container {
1857
1920
  // Move cursor back to end of new content
1858
1921
  buffer += `\x1b[${extraLines}A`;
1859
1922
  }
1860
- buffer += TUI.FRAME_END;
1923
+ buffer = this.finishFrame(buffer, cursorPos, newLines.length, finalCursorRow);
1861
1924
  if (process.env.PI_TUI_DEBUG === "1") {
1862
1925
  const debugDir = "/tmp/tui";
1863
1926
  fs.mkdirSync(debugDir, { recursive: true });
@@ -1893,12 +1956,9 @@ export class TUI extends Container {
1893
1956
  // cursorRow tracks end of content (for viewport calculation)
1894
1957
  // hardwareCursorRow tracks actual terminal cursor position (for movement)
1895
1958
  this.cursorRow = Math.max(0, newLines.length - 1);
1896
- this.hardwareCursorRow = finalCursorRow;
1897
1959
  // Track terminal's working area (grows but doesn't shrink unless cleared)
1898
1960
  this.maxLinesRendered = Math.max(this.maxLinesRendered, newLines.length);
1899
1961
  this.previousViewportTop = Math.max(prevViewportTop, finalCursorRow - height + 1);
1900
- // Position hardware cursor for IME
1901
- this.positionHardwareCursor(cursorPos, newLines.length);
1902
1962
  this.setPreviousLines(newLines, rawLines);
1903
1963
  if (needsKittyImageExpansion) {
1904
1964
  this.previousKittyImageIds = this.collectKittyImageIds(newLines);
@@ -1911,7 +1971,7 @@ export class TUI extends Container {
1911
1971
  * @param cursorPos The cursor position extracted from rendered output, or null
1912
1972
  * @param totalLines Total number of rendered lines
1913
1973
  */
1914
- positionHardwareCursor(cursorPos, totalLines) {
1974
+ buildHardwareCursorSequence(cursorPos, totalLines) {
1915
1975
  let buffer = "";
1916
1976
  if (!cursorPos || totalLines <= 0) {
1917
1977
  if (this.#lastCursorVisibility !== false) {
@@ -1939,9 +1999,16 @@ export class TUI extends Container {
1939
1999
  this.#lastCursorVisibility = this.showHardwareCursor;
1940
2000
  }
1941
2001
  }
1942
- if (buffer) {
1943
- this.terminal.write(buffer);
1944
- }
2002
+ return buffer;
2003
+ }
2004
+ finishFrame(buffer, cursorPos, totalLines, hardwareCursorRow) {
2005
+ this.hardwareCursorRow = hardwareCursorRow;
2006
+ return buffer + this.buildHardwareCursorSequence(cursorPos, totalLines) + TUI.FRAME_END;
2007
+ }
2008
+ positionHardwareCursor(cursorPos, totalLines) {
2009
+ const buffer = this.buildHardwareCursorSequence(cursorPos, totalLines);
2010
+ if (buffer)
2011
+ this.terminal.write(TUI.FRAME_BEGIN + buffer + TUI.FRAME_END);
1945
2012
  }
1946
2013
  /**
1947
2014
  * Query the terminal's default background color with OSC 11 (`ESC ] 11 ; ? BEL`).
@@ -1996,4 +2063,7 @@ export class TUI extends Container {
1996
2063
  });
1997
2064
  }
1998
2065
  }
2066
+ /** Legacy main-screen renderer export. */
2067
+ export class TUI extends TuiBase {
2068
+ }
1999
2069
  //# sourceMappingURL=tui.js.map