@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
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TuiAltScreen.js","sourceRoot":"","sources":["../src/TuiAltScreen.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAC3E,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EACN,oBAAoB,EACpB,gBAAgB,EAChB,gBAAgB,EAEhB,iBAAiB,GAEjB,MAAM,aAAa,CAAC;AAErB,OAAO,EACN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E,MAAM,IAAI,IAAI,CAAC,qBAAqB,EAAE,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,WAAW,CAAC;QACpE,CAAC;aAAM,CAAC;YACP,MAAM,IAAI,WAAW,CAAC;QACvB,CAAC;QACD,MAAM,IAAI,uBAAuB,CAAC;QAClC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;QAE5B,IAAI,CAAC,cAAc,GAAG,MAAM,CAAC;QAC7B,IAAI,CAAC,mBAAmB,GAAG,KAAK,CAAC;QACjC,IAAI,CAAC,oBAAoB,GAAG,MAAM,CAAC;QACnC,IAAI,CAAC,aAAa,GAAG,UAAU,CAAC;IACjC,CAAC;CACD","sourcesContent":["import { AltScreenFlashContainer } from \"./components/alt-screen-flash.ts\";\nimport { ScrollView } from \"./components/scroll-view.ts\";\nimport { getKeybindings } from \"./keybindings.ts\";\nimport { isKeyRelease } from \"./keys.ts\";\nimport {\n\tgetScrollbarGeometry,\n\tgetScrollViewBox,\n\tgetScrollViewsAt,\n\ttype LayoutFrame,\n\trenderLayoutFrame,\n\ttype ScrollbarGeometry,\n} from \"./layout.ts\";\nimport type { Terminal } from \"./terminal.ts\";\nimport {\n\tdeleteAllKittyImages,\n\tgetCapabilities,\n\ttype ImageProtocol,\n\tisImageLine,\n\tsetCapabilities,\n\ttype TerminalCapabilities,\n} from \"./terminal-image.ts\";\nimport { type Component, CURSOR_MARKER, compositeTuiLine, TuiBase, VIEWPORT_TUI, type ViewportTUI } from \"./tui.ts\";\nimport {\n\textractAnsiCode,\n\tgetGraphemeCellRange,\n\tgetOsc8LinkAtColumn,\n\tsliceByColumn,\n\tstripTerminalSequences,\n\tvisibleWidth,\n} from \"./utils.ts\";\n\nconst ENTER_ALT_SCREEN = \"\\x1b[?1049h\";\nconst EXIT_ALT_SCREEN = \"\\x1b[?1049l\";\nconst DISABLE_AUTOWRAP = \"\\x1b[?7l\";\nconst ENABLE_AUTOWRAP = \"\\x1b[?7h\";\nconst ENABLE_MOUSE = \"\\x1b[?1000h\\x1b[?1002h\\x1b[?1003h\\x1b[?1004h\\x1b[?1006h\";\nconst DISABLE_MOUSE = \"\\x1b[?1006l\\x1b[?1004l\\x1b[?1003l\\x1b[?1002l\\x1b[?1000l\";\nconst FOCUS_IN = \"\\x1b[I\";\nconst FOCUS_OUT = \"\\x1b[O\";\nconst BEGIN_SYNCHRONIZED_OUTPUT = \"\\x1b[?2026h\";\nconst END_SYNCHRONIZED_OUTPUT = \"\\x1b[?2026l\";\nconst OSC133_ZONE_PREFIX = /^(?:\\x1b\\]133;[ABC](?:\\x07|\\x1b\\\\))+/;\nconst OSC133_PROMPT_START = /^\\x1b\\]133;A(?:\\x07|\\x1b\\\\)/;\nconst PAGE_SCROLL_OVERLAP = 4;\n\ninterface SelectionPoint {\n\trow: number;\n\tcol: number;\n\tscrollView?: ScrollView;\n}\n\ninterface SgrMouseEvent {\n\tbutton: number;\n\tx: number;\n\ty: number;\n\trelease: boolean;\n}\n\ninterface WheelEvent {\n\tdirection: -1 | 1;\n\tx: number;\n\ty: number;\n}\n\ninterface ScrollbarDrag {\n\tscrollView: ScrollView;\n\tgrabOffset: number;\n}\n\ninterface ScrollbarTarget {\n\tscrollView: ScrollView;\n\tgeometry: ScrollbarGeometry;\n}\n\nexport interface TuiAltScreenOptions {\n\t/** Number of logical lines moved for each mouse-wheel event. */\n\twheelScrollLines?: number;\n\t/** Capture mouse events for viewport scrolling and application-owned text selection. */\n\tmouse?: boolean;\n\t/** Open an OSC 8 hyperlink activated with a primary-button click. */\n\topenUrl?: (url: string) => void;\n}\n\n/** Alternate-screen TUI with a scrollable, application-owned viewport. */\nexport class TuiAltScreen extends TuiBase implements ViewportTUI {\n\treadonly [VIEWPORT_TUI] = true as const;\n\tprivate previousScreen: string[] = [];\n\tprivate lastDocument: string[] = [];\n\tprivate previousScreenWidth = 0;\n\tprivate previousScreenHeight = 0;\n\tprivate layoutRoot: Component | undefined;\n\tprivate currentLayout: LayoutFrame | undefined;\n\tprivate readonly implicitDocument: Component;\n\tprivate readonly implicitScrollView: ScrollView;\n\tprivate readonly flashes: AltScreenFlashContainer;\n\tprivate altScreenActive = false;\n\tprivate imageProtocol: ImageProtocol = null;\n\tprivate savedCapabilities?: TerminalCapabilities;\n\tprivate selectionAnchor?: SelectionPoint;\n\tprivate selectionFocus?: SelectionPoint;\n\tprivate selectionDragPointer?: { x: number; y: number };\n\tprivate selectionAutoScrollDirection: -1 | 0 | 1 = 0;\n\tprivate selectionAutoScrollTimer?: NodeJS.Timeout;\n\tprivate selectionPressActive = false;\n\tprivate scrollbarDrag?: ScrollbarDrag;\n\tprivate scrollbarHover?: ScrollView;\n\tprivate pressedUrl?: string;\n\tprivate selectionDragged = false;\n\tprivate readonly wheelScrollLines: number;\n\tprivate readonly mouseEnabled: boolean;\n\tprivate readonly openUrl?: (url: string) => void;\n\n\tconstructor(\n\t\tterminal: Terminal,\n\t\tshowHardwareCursor?: boolean,\n\t\tlogDirectory?: string,\n\t\toptions: TuiAltScreenOptions = {},\n\t) {\n\t\tsuper(terminal, showHardwareCursor, logDirectory);\n\t\tthis.implicitDocument = {\n\t\t\trender: (width) => super.render(width),\n\t\t\tinvalidate: () => {\n\t\t\t\tfor (const child of this.children) child.invalidate();\n\t\t\t},\n\t\t};\n\t\tthis.implicitScrollView = new ScrollView(this.implicitDocument, { follow: \"end\", primary: true });\n\t\tthis.flashes = new AltScreenFlashContainer(() => this.requestRender());\n\t\tthis.wheelScrollLines = Math.max(1, Math.floor(options.wheelScrollLines ?? 1));\n\t\tthis.mouseEnabled = options.mouse ?? true;\n\t\tthis.openUrl = options.openUrl;\n\t\tthis.addInputListener((data) => this.handleViewportInput(data));\n\t}\n\n\tget viewportTop(): number {\n\t\treturn this.getPrimaryScrollView().scrollTop;\n\t}\n\n\tget isFollowingOutput(): boolean {\n\t\treturn this.getPrimaryScrollView().isFollowingEnd;\n\t}\n\n\tsetLayoutRoot(component: Component | undefined): void {\n\t\tif (this.layoutRoot === component) return;\n\t\tthis.layoutRoot = component;\n\t\tthis.currentLayout = undefined;\n\t\tthis.requestRender();\n\t}\n\n\toverride render(width: number): string[] {\n\t\treturn this.layoutRoot?.render(width) ?? super.render(width);\n\t}\n\n\toverride invalidate(): void {\n\t\tsuper.invalidate();\n\t\tthis.layoutRoot?.invalidate();\n\t}\n\n\tprotected override getMountedRoots(): readonly Component[] {\n\t\treturn this.layoutRoot ? [this.layoutRoot] : this.children;\n\t}\n\n\tprivate getPrimaryScrollView(): ScrollView {\n\t\treturn this.currentLayout?.primaryScrollView ?? this.implicitScrollView;\n\t}\n\n\tprotected override beforeTerminalStart(): void {\n\t\tthis.stopSelectionAutoScroll();\n\t\tthis.selectionPressActive = false;\n\t\tthis.stopScrollbarHover();\n\t\tthis.stopScrollbarDrag();\n\t\tthis.flashes.dispose();\n\t\tthis.altScreenActive = true;\n\t\tconst capabilities = getCapabilities();\n\t\tthis.imageProtocol = capabilities.images;\n\t\tif (capabilities.images === \"iterm2\") {\n\t\t\tthis.savedCapabilities = capabilities;\n\t\t\tsetCapabilities({ ...capabilities, images: null });\n\t\t\tthis.invalidate();\n\t\t}\n\t\tthis.lastDocument = [];\n\t\tthis.selectionAnchor = undefined;\n\t\tthis.selectionFocus = undefined;\n\t\tthis.pressedUrl = undefined;\n\t\tthis.selectionDragged = false;\n\t\tthis.resetRenderState();\n\t\tthis.terminal.write(\n\t\t\t`${ENTER_ALT_SCREEN}${DISABLE_AUTOWRAP}${this.mouseEnabled ? ENABLE_MOUSE : \"\"}\\x1b[2J\\x1b[H\\x1b[?25l`,\n\t\t);\n\t}\n\n\tprotected override beforeTerminalStop(): void {\n\t\tthis.stopSelectionAutoScroll();\n\t\tthis.selectionPressActive = false;\n\t\tthis.stopScrollbarHover();\n\t\tthis.stopScrollbarDrag();\n\t\tthis.flashes.dispose();\n\t\tif (!this.altScreenActive) return;\n\t\tthis.terminal.write(\n\t\t\t`${BEGIN_SYNCHRONIZED_OUTPUT}${this.deleteAltScreenKittyImages()}${this.mouseEnabled ? DISABLE_MOUSE : \"\"}${ENABLE_AUTOWRAP}${END_SYNCHRONIZED_OUTPUT}`,\n\t\t);\n\t}\n\n\tprotected override afterTerminalStop(): void {\n\t\tif (!this.altScreenActive) return;\n\t\tthis.altScreenActive = false;\n\t\tconst width = Math.max(1, this.terminal.columns);\n\t\tconst documentLines = this.render(width).map((line) => line.replace(OSC133_ZONE_PREFIX, \"\"));\n\t\tthis.lastDocument = this.applyLineResets(documentLines.map((line) => line.replaceAll(CURSOR_MARKER, \"\"))).map(\n\t\t\t(line) => (isImageLine(line) || visibleWidth(line) <= width ? line : sliceByColumn(line, 0, width, true)),\n\t\t);\n\t\tlet buffer = `${BEGIN_SYNCHRONIZED_OUTPUT}${EXIT_ALT_SCREEN}${DISABLE_AUTOWRAP}`;\n\t\tfor (let row = 0; row < this.lastDocument.length; row++) {\n\t\t\tif (row > 0) buffer += \"\\r\\n\";\n\t\t\tbuffer += `\\r\\x1b[2K${this.lastDocument[row] ?? \"\"}`;\n\t\t}\n\t\tbuffer += `\\x1b[0m${ENABLE_AUTOWRAP}\\r\\n\\x1b[?25h${END_SYNCHRONIZED_OUTPUT}`;\n\t\tthis.terminal.write(buffer);\n\t\tif (this.savedCapabilities) {\n\t\t\tsetCapabilities(this.savedCapabilities);\n\t\t\tthis.savedCapabilities = undefined;\n\t\t}\n\t}\n\n\tprivate deleteAltScreenKittyImages(): string {\n\t\treturn this.imageProtocol === \"kitty\" ? deleteAllKittyImages() : \"\";\n\t}\n\n\tprotected override resetRenderState(): void {\n\t\tthis.previousScreen = [];\n\t\tthis.previousScreenWidth = 0;\n\t\tthis.previousScreenHeight = 0;\n\t\tthis.currentLayout = undefined;\n\t}\n\n\tscrollBy(lines: number): void {\n\t\tthis.getPrimaryScrollView().scrollBy(lines);\n\t\tthis.requestRender();\n\t}\n\n\tscrollToTop(): void {\n\t\tthis.getPrimaryScrollView().scrollToStart();\n\t\tthis.requestRender();\n\t}\n\n\tscrollToBottom(): void {\n\t\tthis.getPrimaryScrollView().scrollToEnd();\n\t\tthis.requestRender();\n\t}\n\n\tprivate scrollToPrompt(direction: -1 | 1): void {\n\t\tif (!this.currentLayout) return;\n\t\tconst scrollView = this.getPrimaryScrollView();\n\t\tconst lines = getScrollViewBox(this.currentLayout, scrollView)?.scrollContentLines;\n\t\tif (!lines) return;\n\n\t\tfor (let row = scrollView.scrollTop + direction; row >= 0 && row < lines.length; row += direction) {\n\t\t\tif (!OSC133_PROMPT_START.test(lines[row] ?? \"\")) continue;\n\t\t\tscrollView.scrollTo(row);\n\t\t\tthis.requestRender();\n\t\t\treturn;\n\t\t}\n\t}\n\n\t/** Show a transient message in the alternate-screen flash stack. */\n\tflash(message: string, durationMs?: number): void {\n\t\tthis.flashes.flash(message, durationMs);\n\t}\n\n\tprivate handleViewportInput(data: string): { consume?: boolean } | undefined {\n\t\tif (data === FOCUS_OUT) {\n\t\t\tconst hadActiveSelection = this.selectionPressActive;\n\t\t\tthis.selectionPressActive = false;\n\t\t\tthis.stopSelectionAutoScroll();\n\t\t\tthis.stopScrollbarHover();\n\t\t\tthis.stopScrollbarDrag();\n\t\t\tthis.pressedUrl = undefined;\n\t\t\tthis.selectionDragged = false;\n\t\t\tif (hadActiveSelection) {\n\t\t\t\tthis.selectionAnchor = undefined;\n\t\t\t\tthis.selectionFocus = undefined;\n\t\t\t}\n\t\t\tthis.requestRender();\n\t\t\treturn { consume: true };\n\t\t}\n\t\tif (data === FOCUS_IN) return { consume: true };\n\n\t\tconst wheelEvent = this.parseWheelEvent(data);\n\t\tif (wheelEvent) {\n\t\t\tthis.routeWheel(wheelEvent);\n\t\t\treturn { consume: true };\n\t\t}\n\t\tconst mouseEvent = this.parseSgrMouseEvent(data);\n\t\tif (mouseEvent) {\n\t\t\tconst handled = this.handleScrollbarMouseEvent(mouseEvent);\n\t\t\tif (!this.scrollbarDrag) this.updateScrollbarHover(mouseEvent.x, mouseEvent.y);\n\t\t\tif (!handled) this.handleSelectionMouseEvent(mouseEvent);\n\t\t\treturn { consume: true };\n\t\t}\n\t\tif (this.isMouseSequence(data)) return { consume: true };\n\n\t\tconst keybindings = getKeybindings();\n\t\tconst isRelease = isKeyRelease(data);\n\t\tif (keybindings.matches(data, \"tui.altScreen.pageUp\")) {\n\t\t\tif (!isRelease) {\n\t\t\t\tthis.scrollBy(-Math.max(1, this.getPrimaryScrollView().viewportHeight - PAGE_SCROLL_OVERLAP));\n\t\t\t}\n\t\t\treturn { consume: true };\n\t\t}\n\t\tif (keybindings.matches(data, \"tui.altScreen.pageDown\")) {\n\t\t\tif (!isRelease) {\n\t\t\t\tthis.scrollBy(Math.max(1, this.getPrimaryScrollView().viewportHeight - PAGE_SCROLL_OVERLAP));\n\t\t\t}\n\t\t\treturn { consume: true };\n\t\t}\n\t\tif (keybindings.matches(data, \"tui.altScreen.previousPrompt\")) {\n\t\t\tif (!isRelease) this.scrollToPrompt(-1);\n\t\t\treturn { consume: true };\n\t\t}\n\t\tif (keybindings.matches(data, \"tui.altScreen.nextPrompt\")) {\n\t\t\tif (!isRelease) this.scrollToPrompt(1);\n\t\t\treturn { consume: true };\n\t\t}\n\t\tif (keybindings.matches(data, \"tui.altScreen.top\")) {\n\t\t\tif (!isRelease) this.scrollToTop();\n\t\t\treturn { consume: true };\n\t\t}\n\t\tif (keybindings.matches(data, \"tui.altScreen.bottom\")) {\n\t\t\tif (!isRelease) this.scrollToBottom();\n\t\t\treturn { consume: true };\n\t\t}\n\t\treturn undefined;\n\t}\n\n\tprivate parseWheelEvent(data: string): WheelEvent | undefined {\n\t\tconst sgr = /^\\x1b\\[<(\\d+);(\\d+);(\\d+)[Mm]$/.exec(data);\n\t\tif (sgr) {\n\t\t\tconst button = Number.parseInt(sgr[1], 10);\n\t\t\tif ((button & 64) === 0) return undefined;\n\t\t\tconst direction = button & 3;\n\t\t\tif (direction !== 0 && direction !== 1) return undefined;\n\t\t\treturn {\n\t\t\t\tdirection: direction === 0 ? -1 : 1,\n\t\t\t\tx: Number.parseInt(sgr[2], 10) - 1,\n\t\t\t\ty: Number.parseInt(sgr[3], 10) - 1,\n\t\t\t};\n\t\t}\n\t\tif (data.length === 6 && data.startsWith(\"\\x1b[M\")) {\n\t\t\tconst button = data.charCodeAt(3) - 32;\n\t\t\tif ((button & 64) === 0) return undefined;\n\t\t\tconst direction = button & 3;\n\t\t\tif (direction !== 0 && direction !== 1) return undefined;\n\t\t\treturn {\n\t\t\t\tdirection: direction === 0 ? -1 : 1,\n\t\t\t\tx: data.charCodeAt(4) - 33,\n\t\t\t\ty: data.charCodeAt(5) - 33,\n\t\t\t};\n\t\t}\n\t\treturn undefined;\n\t}\n\n\tprivate routeWheel(event: WheelEvent): void {\n\t\tlet remaining = event.direction * this.wheelScrollLines;\n\t\tconst seen = new Set<ScrollView>();\n\t\tfor (const scrollView of this.currentLayout ? getScrollViewsAt(this.currentLayout, event.x, event.y) : []) {\n\t\t\tseen.add(scrollView);\n\t\t\tremaining = scrollView.scrollBy(remaining);\n\t\t\tif (remaining === 0 || scrollView.overscroll === \"contain\") break;\n\t\t}\n\t\tconst primary = this.getPrimaryScrollView();\n\t\tif (remaining !== 0 && !seen.has(primary)) primary.scrollBy(remaining);\n\t\tthis.updateScrollbarHover(event.x, event.y);\n\t\tthis.requestRender();\n\t}\n\n\tprivate parseSgrMouseEvent(data: string): SgrMouseEvent | undefined {\n\t\tconst match = /^\\x1b\\[<(\\d+);(\\d+);(\\d+)([Mm])$/.exec(data);\n\t\tif (!match) return undefined;\n\t\treturn {\n\t\t\tbutton: Number.parseInt(match[1], 10),\n\t\t\tx: Number.parseInt(match[2], 10) - 1,\n\t\t\ty: Number.parseInt(match[3], 10) - 1,\n\t\t\trelease: match[4] === \"m\",\n\t\t};\n\t}\n\n\tprivate getScrollbarTargetAt(x: number, y: number): ScrollbarTarget | undefined {\n\t\tif (this.hasOverlay() || !this.currentLayout) return undefined;\n\t\tfor (const scrollView of getScrollViewsAt(this.currentLayout, x, y)) {\n\t\t\tconst box = getScrollViewBox(this.currentLayout, scrollView);\n\t\t\tconst geometry = box ? getScrollbarGeometry(box) : undefined;\n\t\t\tif (\n\t\t\t\tgeometry &&\n\t\t\t\tx === geometry.column &&\n\t\t\t\ty >= geometry.thumbTop &&\n\t\t\t\ty < geometry.thumbTop + geometry.thumbHeight\n\t\t\t) {\n\t\t\t\treturn { scrollView, geometry };\n\t\t\t}\n\t\t}\n\t\treturn undefined;\n\t}\n\n\tprivate setScrollbarHover(scrollView: ScrollView | undefined): void {\n\t\tif (scrollView === this.scrollbarHover) return;\n\t\tthis.scrollbarHover?.setScrollbarActive(false);\n\t\tthis.scrollbarHover = scrollView;\n\t\tthis.scrollbarHover?.setScrollbarActive(true);\n\t}\n\n\tprivate updateScrollbarHover(x: number, y: number): void {\n\t\tthis.setScrollbarHover(this.getScrollbarTargetAt(x, y)?.scrollView);\n\t}\n\n\tprivate stopScrollbarHover(): void {\n\t\tthis.setScrollbarHover(undefined);\n\t}\n\n\tprivate handleScrollbarMouseEvent(event: SgrMouseEvent): boolean {\n\t\tif (this.scrollbarDrag) {\n\t\t\tif (event.release) {\n\t\t\t\tthis.stopScrollbarDrag();\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tconst box = this.currentLayout\n\t\t\t\t? getScrollViewBox(this.currentLayout, this.scrollbarDrag.scrollView)\n\t\t\t\t: undefined;\n\t\t\tconst geometry = box ? getScrollbarGeometry(box) : undefined;\n\t\t\tif (geometry) {\n\t\t\t\tconst maxThumbOffset = geometry.trackHeight - geometry.thumbHeight;\n\t\t\t\tconst thumbOffset = Math.max(\n\t\t\t\t\t0,\n\t\t\t\t\tMath.min(maxThumbOffset, event.y - geometry.trackTop - this.scrollbarDrag.grabOffset),\n\t\t\t\t);\n\t\t\t\tconst scrollTop =\n\t\t\t\t\tmaxThumbOffset === 0 ? 0 : Math.round((thumbOffset / maxThumbOffset) * geometry.maxScrollTop);\n\t\t\t\tthis.scrollbarDrag.scrollView.scrollTo(scrollTop);\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\n\t\tif (event.release || (event.button & 32) !== 0 || (event.button & 3) !== 0) return false;\n\t\tconst target = this.getScrollbarTargetAt(event.x, event.y);\n\t\tif (!target) return false;\n\t\tthis.stopSelectionAutoScroll();\n\t\tthis.selectionPressActive = false;\n\t\tthis.selectionAnchor = undefined;\n\t\tthis.selectionFocus = undefined;\n\t\tthis.pressedUrl = undefined;\n\t\tthis.selectionDragged = false;\n\t\tthis.setScrollbarHover(target.scrollView);\n\t\tthis.scrollbarDrag = {\n\t\t\tscrollView: target.scrollView,\n\t\t\tgrabOffset: event.y - target.geometry.thumbTop,\n\t\t};\n\t\treturn true;\n\t}\n\n\tprivate stopScrollbarDrag(): void {\n\t\tthis.scrollbarDrag = undefined;\n\t}\n\n\tprivate getScrollSelectionPoint(scrollView: ScrollView, x: number, y: number): SelectionPoint | undefined {\n\t\tif (!this.currentLayout) return undefined;\n\t\tconst box = getScrollViewBox(this.currentLayout, scrollView);\n\t\tif (!box || box.rect.height <= 0 || box.clip.height <= 0) return undefined;\n\t\tconst visibleTop = Math.max(0, box.rect.y, box.clip.y);\n\t\tconst visibleBottom = Math.min(\n\t\t\tthis.terminal.rows - 1,\n\t\t\tbox.rect.y + box.rect.height - 1,\n\t\t\tbox.clip.y + box.clip.height - 1,\n\t\t);\n\t\tif (visibleBottom < visibleTop) return undefined;\n\t\tconst pointerRow = Math.max(visibleTop, Math.min(visibleBottom, y));\n\t\tconst maxContentRow = Math.max(0, (box.scrollContentLines?.length ?? 1) - 1);\n\t\treturn {\n\t\t\trow: Math.max(0, Math.min(maxContentRow, scrollView.scrollTop + pointerRow - box.rect.y)),\n\t\t\tcol: Math.max(0, Math.min(box.rect.width - 1, x - box.rect.x)),\n\t\t\tscrollView,\n\t\t};\n\t}\n\n\tprivate getSelectionPoint(event: SgrMouseEvent, scrollView?: ScrollView): SelectionPoint {\n\t\tif (scrollView) {\n\t\t\tconst point = this.getScrollSelectionPoint(scrollView, event.x, event.y);\n\t\t\tif (point) return point;\n\t\t}\n\t\treturn {\n\t\t\trow: Math.max(0, Math.min(this.terminal.rows - 1, event.y)),\n\t\t\tcol: Math.max(0, Math.min(this.terminal.columns - 1, event.x)),\n\t\t};\n\t}\n\n\tprivate updateSelectionAutoScroll(event: SgrMouseEvent): void {\n\t\tconst scrollView = this.selectionAnchor?.scrollView;\n\t\tif (!scrollView || !this.currentLayout) {\n\t\t\tthis.stopSelectionAutoScroll();\n\t\t\treturn;\n\t\t}\n\t\tconst box = getScrollViewBox(this.currentLayout, scrollView);\n\t\tif (!box || box.rect.height <= 0 || box.clip.height <= 0) {\n\t\t\tthis.stopSelectionAutoScroll();\n\t\t\treturn;\n\t\t}\n\t\tconst visibleTop = Math.max(0, box.rect.y, box.clip.y);\n\t\tconst visibleBottom = Math.min(\n\t\t\tthis.terminal.rows - 1,\n\t\t\tbox.rect.y + box.rect.height - 1,\n\t\t\tbox.clip.y + box.clip.height - 1,\n\t\t);\n\t\tthis.selectionDragPointer = { x: event.x, y: event.y };\n\t\tthis.selectionAutoScrollDirection = event.y <= visibleTop ? -1 : event.y >= visibleBottom ? 1 : 0;\n\t\tif (this.selectionAutoScrollDirection === 0) {\n\t\t\tthis.stopSelectionAutoScroll();\n\t\t\treturn;\n\t\t}\n\t\tif (this.selectionAutoScrollTimer) return;\n\t\tthis.selectionAutoScrollTimer = setInterval(() => this.autoScrollSelection(), 50);\n\t\tthis.selectionAutoScrollTimer.unref();\n\t}\n\n\tprivate autoScrollSelection(): void {\n\t\tconst scrollView = this.selectionAnchor?.scrollView;\n\t\tconst pointer = this.selectionDragPointer;\n\t\tconst direction = this.selectionAutoScrollDirection;\n\t\tif (!scrollView || !pointer || direction === 0) {\n\t\t\tthis.stopSelectionAutoScroll();\n\t\t\treturn;\n\t\t}\n\t\tconst remaining = scrollView.scrollBy(direction);\n\t\tif (remaining === direction) {\n\t\t\tthis.stopSelectionAutoScroll();\n\t\t\treturn;\n\t\t}\n\t\tconst point = this.getScrollSelectionPoint(scrollView, pointer.x, pointer.y);\n\t\tif (point) this.selectionFocus = point;\n\t\tthis.requestRender();\n\t}\n\n\tprivate stopSelectionAutoScroll(): void {\n\t\tif (this.selectionAutoScrollTimer) {\n\t\t\tclearInterval(this.selectionAutoScrollTimer);\n\t\t\tthis.selectionAutoScrollTimer = undefined;\n\t\t}\n\t\tthis.selectionAutoScrollDirection = 0;\n\t\tthis.selectionDragPointer = undefined;\n\t}\n\n\tprivate handleSelectionMouseEvent(event: SgrMouseEvent): void {\n\t\tif ((event.button & 3) !== 0) return;\n\t\tconst anchorScrollView = this.selectionAnchor?.scrollView;\n\t\tconst point = this.getSelectionPoint(event, anchorScrollView);\n\t\tif (event.release) {\n\t\t\tif (!this.selectionPressActive) return;\n\t\t\tthis.selectionPressActive = false;\n\t\t\tthis.stopSelectionAutoScroll();\n\t\t\tif (!this.selectionAnchor) return;\n\t\t\tthis.selectionFocus = point;\n\t\t\tconst clickedUrl =\n\t\t\t\t!this.selectionDragged &&\n\t\t\t\tthis.selectionAnchor.scrollView === point.scrollView &&\n\t\t\t\tthis.selectionAnchor.row === point.row &&\n\t\t\t\tthis.selectionAnchor.col === point.col\n\t\t\t\t\t? this.pressedUrl\n\t\t\t\t\t: undefined;\n\t\t\tthis.pressedUrl = undefined;\n\t\t\tif (clickedUrl && this.openUrl) {\n\t\t\t\tthis.selectionAnchor = undefined;\n\t\t\t\tthis.selectionFocus = undefined;\n\t\t\t\ttry {\n\t\t\t\t\tthis.openUrl(clickedUrl);\n\t\t\t\t} catch {\n\t\t\t\t\t// URL activation is best-effort.\n\t\t\t\t}\n\t\t\t\tthis.requestRender();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis.copySelectionToClipboard();\n\t\t\tthis.requestRender();\n\t\t\treturn;\n\t\t}\n\t\tif ((event.button & 32) !== 0) {\n\t\t\tif (!this.selectionPressActive || !this.selectionAnchor) return;\n\t\t\tthis.selectionDragged = true;\n\t\t\tthis.pressedUrl = undefined;\n\t\t\tthis.selectionFocus = point;\n\t\t\tthis.updateSelectionAutoScroll(event);\n\t\t\tthis.requestRender();\n\t\t\treturn;\n\t\t}\n\t\tthis.stopSelectionAutoScroll();\n\t\tthis.selectionPressActive = true;\n\t\tconst scrollView =\n\t\t\t!this.hasOverlay() && this.currentLayout\n\t\t\t\t? getScrollViewsAt(this.currentLayout, event.x, event.y)[0]\n\t\t\t\t: undefined;\n\t\tconst anchor = this.getSelectionPoint(event, scrollView);\n\t\tthis.selectionAnchor = anchor;\n\t\tthis.selectionFocus = anchor;\n\t\tthis.selectionDragged = false;\n\t\tthis.pressedUrl = getOsc8LinkAtColumn(\n\t\t\tthis.previousScreen[Math.max(0, Math.min(this.terminal.rows - 1, event.y))] ?? \"\",\n\t\t\tMath.max(0, Math.min(this.terminal.columns - 1, event.x)),\n\t\t);\n\t\tthis.requestRender();\n\t}\n\n\tprivate getSelectionBounds(): { start: SelectionPoint; end: SelectionPoint } | undefined {\n\t\tif (!this.selectionAnchor || !this.selectionFocus) return undefined;\n\t\tif (this.selectionAnchor.scrollView !== this.selectionFocus.scrollView) return undefined;\n\t\tconst anchorBeforeFocus =\n\t\t\tthis.selectionAnchor.row < this.selectionFocus.row ||\n\t\t\t(this.selectionAnchor.row === this.selectionFocus.row && this.selectionAnchor.col < this.selectionFocus.col);\n\t\tif (\n\t\t\tthis.selectionAnchor.row === this.selectionFocus.row &&\n\t\t\tthis.selectionAnchor.col === this.selectionFocus.col\n\t\t) {\n\t\t\treturn undefined;\n\t\t}\n\t\treturn anchorBeforeFocus\n\t\t\t? { start: this.selectionAnchor, end: this.selectionFocus }\n\t\t\t: { start: this.selectionFocus, end: this.selectionAnchor };\n\t}\n\n\tprivate getSelectionColumns(\n\t\tline: string,\n\t\trow: number,\n\t\tselection: { start: SelectionPoint; end: SelectionPoint },\n\t\tminColumn = 0,\n\t\tmaxColumn = visibleWidth(line),\n\t): { start: number; end: number } {\n\t\tconst lineWidth = visibleWidth(line);\n\t\tlet start = Math.max(0, minColumn);\n\t\tlet end = Math.min(lineWidth, maxColumn);\n\t\tif (row === selection.start.row) {\n\t\t\tstart = getGraphemeCellRange(line, selection.start.col)?.start ?? Math.min(selection.start.col, lineWidth);\n\t\t}\n\t\tif (row === selection.end.row) {\n\t\t\tend = getGraphemeCellRange(line, selection.end.col)?.end ?? Math.min(selection.end.col + 1, lineWidth);\n\t\t}\n\t\treturn { start: Math.max(minColumn, start), end: Math.min(maxColumn, end) };\n\t}\n\n\tprivate copySelectionToClipboard(): void {\n\t\tconst selection = this.getSelectionBounds();\n\t\tif (!selection) return;\n\t\tlet sourceLines: readonly string[] = this.previousScreen;\n\t\tif (selection.start.scrollView) {\n\t\t\tif (!this.currentLayout) return;\n\t\t\tconst box = getScrollViewBox(this.currentLayout, selection.start.scrollView);\n\t\t\tif (!box?.scrollContentLines) return;\n\t\t\tsourceLines = box.scrollContentLines;\n\t\t}\n\t\tconst lines: string[] = [];\n\t\tfor (let row = selection.start.row; row <= selection.end.row; row++) {\n\t\t\tconst line = sourceLines[row] ?? \"\";\n\t\t\tconst columns = this.getSelectionColumns(line, row, selection);\n\t\t\tlines.push(\n\t\t\t\tstripTerminalSequences(\n\t\t\t\t\tsliceByColumn(line, columns.start, Math.max(0, columns.end - columns.start), true),\n\t\t\t\t).trimEnd(),\n\t\t\t);\n\t\t}\n\t\tconst text = lines.join(\"\\n\");\n\t\tif (text.length === 0) return;\n\t\tthis.terminal.write(`\\x1b]52;c;${Buffer.from(text).toString(\"base64\")}\\x07`);\n\t\tthis.flash(\"Copied!\");\n\t}\n\n\tprivate applySelectionHighlight(text: string): string {\n\t\tlet result = \"\\x1b[7m\";\n\t\tlet index = 0;\n\t\twhile (index < text.length) {\n\t\t\tconst ansi = extractAnsiCode(text, index);\n\t\t\tif (!ansi) {\n\t\t\t\tresult += text[index];\n\t\t\t\tindex += 1;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tresult += ansi.code;\n\t\t\tif (ansi.code.endsWith(\"m\")) result += \"\\x1b[7m\";\n\t\t\tindex += ansi.length;\n\t\t}\n\t\treturn `${result}\\x1b[27m`;\n\t}\n\n\tprivate applySelection(screen: string[], layout = this.currentLayout): string[] {\n\t\tconst selection = this.getSelectionBounds();\n\t\tif (!selection) return screen;\n\t\tlet screenSelection = selection;\n\t\tlet minRow = 0;\n\t\tlet maxRow = screen.length - 1;\n\t\tlet minColumn = 0;\n\t\tlet maxColumn = this.terminal.columns;\n\t\tif (selection.start.scrollView) {\n\t\t\tif (!layout) return screen;\n\t\t\tconst box = getScrollViewBox(layout, selection.start.scrollView);\n\t\t\tif (!box) return screen;\n\t\t\tminRow = Math.max(0, box.rect.y, box.clip.y);\n\t\t\tmaxRow = Math.min(screen.length - 1, box.rect.y + box.rect.height - 1, box.clip.y + box.clip.height - 1);\n\t\t\tminColumn = Math.max(0, box.rect.x, box.clip.x);\n\t\t\tmaxColumn = Math.min(this.terminal.columns, box.rect.x + box.rect.width, box.clip.x + box.clip.width);\n\t\t\tscreenSelection = {\n\t\t\t\tstart: {\n\t\t\t\t\trow: box.rect.y + selection.start.row - selection.start.scrollView.scrollTop,\n\t\t\t\t\tcol: box.rect.x + selection.start.col,\n\t\t\t\t\tscrollView: selection.start.scrollView,\n\t\t\t\t},\n\t\t\t\tend: {\n\t\t\t\t\trow: box.rect.y + selection.end.row - selection.start.scrollView.scrollTop,\n\t\t\t\t\tcol: box.rect.x + selection.end.col,\n\t\t\t\t\tscrollView: selection.start.scrollView,\n\t\t\t\t},\n\t\t\t};\n\t\t}\n\t\treturn screen.map((line, row) => {\n\t\t\tif (\n\t\t\t\trow < minRow ||\n\t\t\t\trow > maxRow ||\n\t\t\t\trow < screenSelection.start.row ||\n\t\t\t\trow > screenSelection.end.row ||\n\t\t\t\tisImageLine(line)\n\t\t\t) {\n\t\t\t\treturn line;\n\t\t\t}\n\t\t\tconst lineWidth = visibleWidth(line);\n\t\t\tconst columns = this.getSelectionColumns(line, row, screenSelection, minColumn, maxColumn);\n\t\t\tif (columns.end <= columns.start) return line;\n\t\t\tconst before = sliceByColumn(line, 0, columns.start, true);\n\t\t\tconst selected = sliceByColumn(line, columns.start, columns.end - columns.start, true);\n\t\t\tconst after = sliceByColumn(line, columns.end, Math.max(0, lineWidth - columns.end), true);\n\t\t\treturn `${before}${this.applySelectionHighlight(selected)}${after}`;\n\t\t});\n\t}\n\n\tprivate isMouseSequence(data: string): boolean {\n\t\treturn /^\\x1b\\[<\\d+;\\d+;\\d+[Mm]$/.test(data) || (data.length === 6 && data.startsWith(\"\\x1b[M\"));\n\t}\n\n\tprivate compositeFlashes(screen: string[], width: number, height: number): string[] {\n\t\tconst flashLines = this.flashes.render(width).slice(-height);\n\t\tif (flashLines.length === 0) return screen;\n\t\tconst result = [...screen];\n\t\twhile (result.length < height) result.push(\"\");\n\t\tfor (let row = 0; row < flashLines.length; row++) {\n\t\t\tconst line = flashLines[row]!;\n\t\t\tconst flashWidth = visibleWidth(line);\n\t\t\tif (flashWidth === 0) continue;\n\t\t\tresult[row] = compositeTuiLine(result[row] ?? \"\", line, width - flashWidth, flashWidth, width);\n\t\t}\n\t\treturn result;\n\t}\n\n\tprotected override doRender(): void {\n\t\tif (this.stopped || !this.altScreenActive) return;\n\t\tconst width = Math.max(1, this.terminal.columns);\n\t\tconst height = Math.max(1, this.terminal.rows);\n\t\tconst root = this.layoutRoot ?? this.implicitScrollView;\n\t\tconst nextLayout = renderLayoutFrame(root, width, height, () => this.requestRender());\n\t\tlet screen = nextLayout.lines.map((line) => line.replace(OSC133_ZONE_PREFIX, \"\"));\n\t\tscreen = this.compositeOverlays(screen, width, height);\n\t\tif (screen.length > height) screen = screen.slice(screen.length - height);\n\t\tscreen = this.applySelection(screen, nextLayout);\n\t\tscreen = this.compositeFlashes(screen, width, height);\n\n\t\tconst cursorPos = this.extractCursorPosition(screen, height);\n\t\tscreen = this.applyLineResets(screen).map((line) => {\n\t\t\tif (isImageLine(line) || visibleWidth(line) <= width) return line;\n\t\t\treturn sliceByColumn(line, 0, width, true);\n\t\t});\n\n\t\tconst fullRedraw =\n\t\t\tthis.previousScreen.length === 0 || this.previousScreenWidth !== width || this.previousScreenHeight !== height;\n\t\tconst imagesNeedRedraw = screen.some(\n\t\t\t(line, row) =>\n\t\t\t\tline !== this.previousScreen[row] && (isImageLine(line) || isImageLine(this.previousScreen[row] ?? \"\")),\n\t\t);\n\n\t\tlet buffer = BEGIN_SYNCHRONIZED_OUTPUT;\n\t\tif (fullRedraw) {\n\t\t\tthis.fullRedrawCount += 1;\n\t\t\tbuffer += `${this.deleteAltScreenKittyImages()}\\x1b[2J`;\n\t\t} else if (imagesNeedRedraw) {\n\t\t\tbuffer += this.imageProtocol === \"iterm2\" ? \"\\x1b[2J\" : this.deleteAltScreenKittyImages();\n\t\t}\n\n\t\tfor (let row = 0; row < height; row++) {\n\t\t\tif (!fullRedraw && !imagesNeedRedraw && screen[row] === this.previousScreen[row]) continue;\n\t\t\tbuffer += `\\x1b[${row + 1};1H\\x1b[2K${screen[row] ?? \"\"}`;\n\t\t}\n\n\t\tif (cursorPos) {\n\t\t\tbuffer += `\\x1b[${cursorPos.row + 1};${Math.min(width, cursorPos.col) + 1}H`;\n\t\t\tbuffer += this.getShowHardwareCursor() ? \"\\x1b[?25h\" : \"\\x1b[?25l\";\n\t\t} else {\n\t\t\tbuffer += \"\\x1b[?25l\";\n\t\t}\n\t\tbuffer += END_SYNCHRONIZED_OUTPUT;\n\t\tthis.terminal.write(buffer);\n\n\t\tthis.previousScreen = screen;\n\t\tthis.previousScreenWidth = width;\n\t\tthis.previousScreenHeight = height;\n\t\tthis.currentLayout = nextLayout;\n\t}\n}\n"]}
@@ -0,0 +1,5 @@
1
+ import { TuiBase } from "./tui.ts";
2
+ /** TUI implementation that renders into the terminal's main screen and scrollback. */
3
+ export declare class TuiMainScreen extends TuiBase {
4
+ }
5
+ //# sourceMappingURL=TuiMainScreen.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TuiMainScreen.d.ts","sourceRoot":"","sources":["../src/TuiMainScreen.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAEnC,sFAAsF;AACtF,qBAAa,aAAc,SAAQ,OAAO;CAAG"}
@@ -0,0 +1,5 @@
1
+ import { TuiBase } from "./tui.js";
2
+ /** TUI implementation that renders into the terminal's main screen and scrollback. */
3
+ export class TuiMainScreen extends TuiBase {
4
+ }
5
+ //# sourceMappingURL=TuiMainScreen.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TuiMainScreen.js","sourceRoot":"","sources":["../src/TuiMainScreen.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAEnC,sFAAsF;AACtF,MAAM,OAAO,aAAc,SAAQ,OAAO;CAAG","sourcesContent":["import { TuiBase } from \"./tui.ts\";\n\n/** TUI implementation that renders into the terminal's main screen and scrollback. */\nexport class TuiMainScreen extends TuiBase {}\n"]}
@@ -0,0 +1,13 @@
1
+ import type { Component } from "../tui.ts";
2
+ /** Transient messages composited by the alternate-screen renderer. */
3
+ export declare class AltScreenFlashContainer implements Component {
4
+ private readonly entries;
5
+ private nextId;
6
+ private readonly requestRender;
7
+ constructor(requestRender: () => void);
8
+ flash(message: string, durationMs?: number): void;
9
+ dispose(): void;
10
+ invalidate(): void;
11
+ render(width: number): string[];
12
+ }
13
+ //# sourceMappingURL=alt-screen-flash.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"alt-screen-flash.d.ts","sourceRoot":"","sources":["../../src/components/alt-screen-flash.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAW3C,sEAAsE;AACtE,qBAAa,uBAAwB,YAAW,SAAS;IACxD,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAoB;IAC5C,OAAO,CAAC,MAAM,CAAK;IACnB,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAa;IAE3C,YAAY,aAAa,EAAE,MAAM,IAAI,EAEpC;IAED,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,SAAsB,GAAG,IAAI,CAc7D;IAED,OAAO,IAAI,IAAI,CAGd;IAED,UAAU,IAAI,IAAI,CAAG;IAErB,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,CAK9B;CACD"}
@@ -0,0 +1,36 @@
1
+ import { truncateToWidth } from "../utils.js";
2
+ const DEFAULT_DURATION_MS = 1000;
3
+ /** Transient messages composited by the alternate-screen renderer. */
4
+ export class AltScreenFlashContainer {
5
+ constructor(requestRender) {
6
+ this.entries = [];
7
+ this.nextId = 0;
8
+ this.requestRender = requestRender;
9
+ }
10
+ flash(message, durationMs = DEFAULT_DURATION_MS) {
11
+ const id = this.nextId++;
12
+ const timer = setTimeout(() => {
13
+ const index = this.entries.findIndex((entry) => entry.id === id);
14
+ if (index === -1)
15
+ return;
16
+ this.entries.splice(index, 1);
17
+ this.requestRender();
18
+ }, Math.max(0, durationMs));
19
+ timer.unref();
20
+ this.entries.push({ id, message, timer });
21
+ this.requestRender();
22
+ }
23
+ dispose() {
24
+ for (const entry of this.entries)
25
+ clearTimeout(entry.timer);
26
+ this.entries.length = 0;
27
+ }
28
+ invalidate() { }
29
+ render(width) {
30
+ return this.entries.map((entry) => {
31
+ const message = truncateToWidth(` ${entry.message} `, width, "");
32
+ return `\x1b[7m${message}\x1b[27m`;
33
+ });
34
+ }
35
+ }
36
+ //# sourceMappingURL=alt-screen-flash.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"alt-screen-flash.js","sourceRoot":"","sources":["../../src/components/alt-screen-flash.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAE9C,MAAM,mBAAmB,GAAG,IAAI,CAAC;AAQjC,sEAAsE;AACtE,MAAM,OAAO,uBAAuB;IAKnC,YAAY,aAAyB;QAJpB,YAAO,GAAiB,EAAE,CAAC;QACpC,WAAM,GAAG,CAAC,CAAC;QAIlB,IAAI,CAAC,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ts\";\nimport { truncateToWidth } from \"../utils.ts\";\n\nconst DEFAULT_DURATION_MS = 1000;\n\ninterface FlashEntry {\n\tid: number;\n\tmessage: string;\n\ttimer: NodeJS.Timeout;\n}\n\n/** Transient messages composited by the alternate-screen renderer. */\nexport class AltScreenFlashContainer implements Component {\n\tprivate readonly entries: FlashEntry[] = [];\n\tprivate nextId = 0;\n\tprivate readonly requestRender: () => void;\n\n\tconstructor(requestRender: () => void) {\n\t\tthis.requestRender = requestRender;\n\t}\n\n\tflash(message: string, durationMs = DEFAULT_DURATION_MS): void {\n\t\tconst id = this.nextId++;\n\t\tconst timer = setTimeout(\n\t\t\t() => {\n\t\t\t\tconst index = this.entries.findIndex((entry) => entry.id === id);\n\t\t\t\tif (index === -1) return;\n\t\t\t\tthis.entries.splice(index, 1);\n\t\t\t\tthis.requestRender();\n\t\t\t},\n\t\t\tMath.max(0, durationMs),\n\t\t);\n\t\ttimer.unref();\n\t\tthis.entries.push({ id, message, timer });\n\t\tthis.requestRender();\n\t}\n\n\tdispose(): void {\n\t\tfor (const entry of this.entries) clearTimeout(entry.timer);\n\t\tthis.entries.length = 0;\n\t}\n\n\tinvalidate(): void {}\n\n\trender(width: number): string[] {\n\t\treturn this.entries.map((entry) => {\n\t\t\tconst message = truncateToWidth(` ${entry.message} `, width, \"\");\n\t\t\treturn `\\x1b[7m${message}\\x1b[27m`;\n\t\t});\n\t}\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"editor.d.ts","sourceRoot":"","sources":["../../src/components/editor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAA2B,MAAM,oBAAoB,CAAC;AAIxF,OAAO,EACN,KAAK,gBAAgB,EAKrB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,KAAK,SAAS,EAAiB,KAAK,SAAS,EAAE,KAAK,GAAG,EAAE,MAAM,WAAW,CAAC;AAWpF,OAAO,EAA4C,KAAK,eAAe,EAAE,MAAM,kBAAkB,CAAC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wB;IAuBtC,OAAO,CAAC,gCAAgC;IAaxC,OAAO,CAAC,yBAAyB;YAUnB,sBAAsB;IAoDpC,OAAO,CAAC,4BAA4B;IAgBpC,OAAO,CAAC,4BAA4B;IAYpC,OAAO,CAAC,yBAAyB;IAUjC,OAAO,CAAC,mBAAmB;IAM3B,OAAO,CAAC,kBAAkB;IAKnB,qBAAqB,IAAI,OAAO,CAEtC;IAED,OAAO,CAAC,kBAAkB;CAI1B"}
@@ -422,6 +422,7 @@ export class Editor {
422
422
  // hardware cursor for IME candidate-window placement even while
423
423
  // autocomplete (e.g. slash-command menu) is visible.
424
424
  const emitCursorMarker = this.focused;
425
+ const drawFakeCursor = !this.tui.getShowHardwareCursor();
425
426
  for (const layoutLine of visibleLines) {
426
427
  let displayText = layoutLine.text;
427
428
  let lineVisibleWidth = visibleWidth(layoutLine.text);
@@ -432,7 +433,10 @@ export class Editor {
432
433
  const after = displayText.slice(layoutLine.cursorPos);
433
434
  // Hardware cursor marker (zero-width, emitted before fake cursor for IME positioning)
434
435
  const marker = emitCursorMarker ? CURSOR_MARKER : "";
435
- if (after.length > 0) {
436
+ if (!drawFakeCursor) {
437
+ displayText = before + marker + after;
438
+ }
439
+ else if (after.length > 0) {
436
440
  // Cursor is on a character (grapheme) - replace it with highlighted version
437
441
  // Get the first grapheme from 'after'
438
442
  const afterGraphemes = [...this.segment(after, "grapheme")];