@code-yeongyu/senpi 2026.7.31 → 2026.8.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 (1370) hide show
  1. package/CHANGELOG.md +270 -0
  2. package/README.md +1 -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 +27 -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 +85 -14
  27. package/dist/core/agent-session.d.ts.map +1 -1
  28. package/dist/core/agent-session.js +445 -78
  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/build.d.ts.map +1 -1
  35. package/dist/core/dynamic-prompt/build.js +4 -0
  36. package/dist/core/dynamic-prompt/build.js.map +1 -1
  37. package/dist/core/dynamic-prompt/verification.d.ts +2 -2
  38. package/dist/core/dynamic-prompt/verification.d.ts.map +1 -1
  39. package/dist/core/dynamic-prompt/verification.js +2 -2
  40. package/dist/core/dynamic-prompt/verification.js.map +1 -1
  41. package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/account-command.d.ts +2 -2
  42. package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/account-command.d.ts.map +1 -1
  43. package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/account-command.js +25 -25
  44. package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/account-command.js.map +1 -1
  45. package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/account-events.d.ts.map +1 -1
  46. package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/account-events.js.map +1 -1
  47. package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/account-management.d.ts +1 -1
  48. package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/account-management.d.ts.map +1 -1
  49. package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/account-management.js +2 -2
  50. package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/account-management.js.map +1 -1
  51. package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/accounts.d.ts +9 -9
  52. package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/accounts.d.ts.map +1 -1
  53. package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/accounts.js +2 -2
  54. package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/accounts.js.map +1 -1
  55. package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/affinity.d.ts +1 -1
  56. package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/affinity.d.ts.map +1 -1
  57. package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/affinity.js +3 -3
  58. package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/affinity.js.map +1 -1
  59. package/dist/core/extensions/builtin/claude-sdk-oauth/auth-attempt.d.ts +21 -0
  60. package/dist/core/extensions/builtin/claude-sdk-oauth/auth-attempt.d.ts.map +1 -0
  61. package/dist/core/extensions/builtin/claude-sdk-oauth/auth-attempt.js +30 -0
  62. package/dist/core/extensions/builtin/claude-sdk-oauth/auth-attempt.js.map +1 -0
  63. package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/auth-lane.d.ts +8 -4
  64. package/dist/core/extensions/builtin/claude-sdk-oauth/auth-lane.d.ts.map +1 -0
  65. package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/auth-lane.js +34 -25
  66. package/dist/core/extensions/builtin/claude-sdk-oauth/auth-lane.js.map +1 -0
  67. package/dist/core/extensions/builtin/claude-sdk-oauth/bounded-queue.d.ts +17 -0
  68. package/dist/core/extensions/builtin/claude-sdk-oauth/bounded-queue.d.ts.map +1 -0
  69. package/dist/core/extensions/builtin/claude-sdk-oauth/bounded-queue.js +56 -0
  70. package/dist/core/extensions/builtin/claude-sdk-oauth/bounded-queue.js.map +1 -0
  71. package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/custom-tools-schema.d.ts.map +1 -1
  72. package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/custom-tools-schema.js.map +1 -1
  73. package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/custom-tools.d.ts.map +1 -1
  74. package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/custom-tools.js.map +1 -1
  75. package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/errors.d.ts +1 -1
  76. package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/errors.d.ts.map +1 -1
  77. package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/errors.js +1 -1
  78. package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/errors.js.map +1 -1
  79. package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/executable.d.ts.map +1 -1
  80. package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/executable.js.map +1 -1
  81. package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/failover.d.ts.map +1 -1
  82. package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/failover.js +1 -1
  83. package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/failover.js.map +1 -1
  84. package/dist/core/extensions/builtin/claude-sdk-oauth/guidance.d.ts +14 -0
  85. package/dist/core/extensions/builtin/claude-sdk-oauth/guidance.d.ts.map +1 -0
  86. package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/guidance.js +37 -1
  87. package/dist/core/extensions/builtin/claude-sdk-oauth/guidance.js.map +1 -0
  88. package/dist/core/extensions/builtin/claude-sdk-oauth/index.d.ts +4 -0
  89. package/dist/core/extensions/builtin/claude-sdk-oauth/index.d.ts.map +1 -0
  90. package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/index.js +12 -10
  91. package/dist/core/extensions/builtin/claude-sdk-oauth/index.js.map +1 -0
  92. package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/oauth-login.d.ts +3 -3
  93. package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/oauth-login.d.ts.map +1 -1
  94. package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/oauth-login.js +2 -2
  95. package/dist/core/extensions/builtin/claude-sdk-oauth/oauth-login.js.map +1 -0
  96. package/dist/core/extensions/builtin/claude-sdk-oauth/options.d.ts +18 -0
  97. package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/options.d.ts.map +1 -1
  98. package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/options.js +70 -10
  99. package/dist/core/extensions/builtin/claude-sdk-oauth/options.js.map +1 -0
  100. package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/prompt-bridge.d.ts.map +1 -1
  101. package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/prompt-bridge.js +32 -19
  102. package/dist/core/extensions/builtin/claude-sdk-oauth/prompt-bridge.js.map +1 -0
  103. package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/sdk-boundary.d.ts +2 -0
  104. package/dist/core/extensions/builtin/claude-sdk-oauth/sdk-boundary.d.ts.map +1 -0
  105. package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/sdk-boundary.js.map +1 -1
  106. package/dist/core/extensions/builtin/claude-sdk-oauth/session-binding.d.ts +32 -0
  107. package/dist/core/extensions/builtin/claude-sdk-oauth/session-binding.d.ts.map +1 -0
  108. package/dist/core/extensions/builtin/claude-sdk-oauth/session-binding.js +43 -0
  109. package/dist/core/extensions/builtin/claude-sdk-oauth/session-binding.js.map +1 -0
  110. package/dist/core/extensions/builtin/claude-sdk-oauth/session-commit-boundary.d.ts +18 -0
  111. package/dist/core/extensions/builtin/claude-sdk-oauth/session-commit-boundary.d.ts.map +1 -0
  112. package/dist/core/extensions/builtin/claude-sdk-oauth/session-commit-boundary.js +46 -0
  113. package/dist/core/extensions/builtin/claude-sdk-oauth/session-commit-boundary.js.map +1 -0
  114. package/dist/core/extensions/builtin/claude-sdk-oauth/session-continuity.d.ts +81 -0
  115. package/dist/core/extensions/builtin/claude-sdk-oauth/session-continuity.d.ts.map +1 -0
  116. package/dist/core/extensions/builtin/claude-sdk-oauth/session-continuity.js +127 -0
  117. package/dist/core/extensions/builtin/claude-sdk-oauth/session-continuity.js.map +1 -0
  118. package/dist/core/extensions/builtin/claude-sdk-oauth/session-entry-annotations.d.ts +10 -0
  119. package/dist/core/extensions/builtin/claude-sdk-oauth/session-entry-annotations.d.ts.map +1 -0
  120. package/dist/core/extensions/builtin/claude-sdk-oauth/session-entry-annotations.js +34 -0
  121. package/dist/core/extensions/builtin/claude-sdk-oauth/session-entry-annotations.js.map +1 -0
  122. package/dist/core/extensions/builtin/claude-sdk-oauth/session-observability.d.ts +56 -0
  123. package/dist/core/extensions/builtin/claude-sdk-oauth/session-observability.d.ts.map +1 -0
  124. package/dist/core/extensions/builtin/claude-sdk-oauth/session-observability.js +174 -0
  125. package/dist/core/extensions/builtin/claude-sdk-oauth/session-observability.js.map +1 -0
  126. package/dist/core/extensions/builtin/claude-sdk-oauth/session-reaper.d.ts +24 -0
  127. package/dist/core/extensions/builtin/claude-sdk-oauth/session-reaper.d.ts.map +1 -0
  128. package/dist/core/extensions/builtin/claude-sdk-oauth/session-reaper.js +34 -0
  129. package/dist/core/extensions/builtin/claude-sdk-oauth/session-reaper.js.map +1 -0
  130. package/dist/core/extensions/builtin/claude-sdk-oauth/session-reattach.d.ts +34 -0
  131. package/dist/core/extensions/builtin/claude-sdk-oauth/session-reattach.d.ts.map +1 -0
  132. package/dist/core/extensions/builtin/claude-sdk-oauth/session-reattach.js +85 -0
  133. package/dist/core/extensions/builtin/claude-sdk-oauth/session-reattach.js.map +1 -0
  134. package/dist/core/extensions/builtin/claude-sdk-oauth/session-registry-pump.d.ts +19 -0
  135. package/dist/core/extensions/builtin/claude-sdk-oauth/session-registry-pump.d.ts.map +1 -0
  136. package/dist/core/extensions/builtin/claude-sdk-oauth/session-registry-pump.js +176 -0
  137. package/dist/core/extensions/builtin/claude-sdk-oauth/session-registry-pump.js.map +1 -0
  138. package/dist/core/extensions/builtin/claude-sdk-oauth/session-registry-state.d.ts +18 -0
  139. package/dist/core/extensions/builtin/claude-sdk-oauth/session-registry-state.d.ts.map +1 -0
  140. package/dist/core/extensions/builtin/claude-sdk-oauth/session-registry-state.js +33 -0
  141. package/dist/core/extensions/builtin/claude-sdk-oauth/session-registry-state.js.map +1 -0
  142. package/dist/core/extensions/builtin/claude-sdk-oauth/session-registry-wiring.d.ts +3 -0
  143. package/dist/core/extensions/builtin/claude-sdk-oauth/session-registry-wiring.d.ts.map +1 -0
  144. package/dist/core/extensions/builtin/claude-sdk-oauth/session-registry-wiring.js +76 -0
  145. package/dist/core/extensions/builtin/claude-sdk-oauth/session-registry-wiring.js.map +1 -0
  146. package/dist/core/extensions/builtin/claude-sdk-oauth/session-registry.d.ts +87 -0
  147. package/dist/core/extensions/builtin/claude-sdk-oauth/session-registry.d.ts.map +1 -0
  148. package/dist/core/extensions/builtin/claude-sdk-oauth/session-registry.js +259 -0
  149. package/dist/core/extensions/builtin/claude-sdk-oauth/session-registry.js.map +1 -0
  150. package/dist/core/extensions/builtin/claude-sdk-oauth/session-stream.d.ts +19 -0
  151. package/dist/core/extensions/builtin/claude-sdk-oauth/session-stream.d.ts.map +1 -0
  152. package/dist/core/extensions/builtin/claude-sdk-oauth/session-stream.js +192 -0
  153. package/dist/core/extensions/builtin/claude-sdk-oauth/session-stream.js.map +1 -0
  154. package/dist/core/extensions/builtin/claude-sdk-oauth/session-sync.d.ts +20 -0
  155. package/dist/core/extensions/builtin/claude-sdk-oauth/session-sync.d.ts.map +1 -0
  156. package/dist/core/extensions/builtin/claude-sdk-oauth/session-sync.js +132 -0
  157. package/dist/core/extensions/builtin/claude-sdk-oauth/session-sync.js.map +1 -0
  158. package/dist/core/extensions/builtin/claude-sdk-oauth/session-turn-claim.d.ts +14 -0
  159. package/dist/core/extensions/builtin/claude-sdk-oauth/session-turn-claim.d.ts.map +1 -0
  160. package/dist/core/extensions/builtin/claude-sdk-oauth/session-turn-claim.js +42 -0
  161. package/dist/core/extensions/builtin/claude-sdk-oauth/session-turn-claim.js.map +1 -0
  162. package/dist/core/extensions/builtin/claude-sdk-oauth/session-turn-types.d.ts +32 -0
  163. package/dist/core/extensions/builtin/claude-sdk-oauth/session-turn-types.d.ts.map +1 -0
  164. package/dist/core/extensions/builtin/claude-sdk-oauth/session-turn-types.js +8 -0
  165. package/dist/core/extensions/builtin/claude-sdk-oauth/session-turn-types.js.map +1 -0
  166. package/dist/core/extensions/builtin/claude-sdk-oauth/settings.d.ts +28 -0
  167. package/dist/core/extensions/builtin/claude-sdk-oauth/settings.d.ts.map +1 -0
  168. package/dist/core/extensions/builtin/claude-sdk-oauth/settings.js +107 -0
  169. package/dist/core/extensions/builtin/claude-sdk-oauth/settings.js.map +1 -0
  170. package/dist/core/extensions/builtin/claude-sdk-oauth/stream-events.d.ts +16 -0
  171. package/dist/core/extensions/builtin/claude-sdk-oauth/stream-events.d.ts.map +1 -0
  172. package/dist/core/extensions/builtin/claude-sdk-oauth/stream-events.js +92 -0
  173. package/dist/core/extensions/builtin/claude-sdk-oauth/stream-events.js.map +1 -0
  174. package/dist/core/extensions/builtin/claude-sdk-oauth/stream-guidance.d.ts +2 -0
  175. package/dist/core/extensions/builtin/claude-sdk-oauth/stream-guidance.d.ts.map +1 -0
  176. package/dist/core/extensions/builtin/claude-sdk-oauth/stream-guidance.js +10 -0
  177. package/dist/core/extensions/builtin/claude-sdk-oauth/stream-guidance.js.map +1 -0
  178. package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/stream-protocol.d.ts.map +1 -1
  179. package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/stream-protocol.js.map +1 -1
  180. package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/stream.d.ts +1 -1
  181. package/dist/core/extensions/builtin/claude-sdk-oauth/stream.d.ts.map +1 -0
  182. package/dist/core/extensions/builtin/claude-sdk-oauth/stream.js +208 -0
  183. package/dist/core/extensions/builtin/claude-sdk-oauth/stream.js.map +1 -0
  184. package/dist/core/extensions/builtin/claude-sdk-oauth/system-prompt.d.ts +3 -0
  185. package/dist/core/extensions/builtin/claude-sdk-oauth/system-prompt.d.ts.map +1 -0
  186. package/dist/core/extensions/builtin/claude-sdk-oauth/system-prompt.js +25 -0
  187. package/dist/core/extensions/builtin/claude-sdk-oauth/system-prompt.js.map +1 -0
  188. package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/tool-watch.d.ts +1 -1
  189. package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/tool-watch.d.ts.map +1 -1
  190. package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/tool-watch.js +2 -2
  191. package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/tool-watch.js.map +1 -1
  192. package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/tools.d.ts +1 -0
  193. package/dist/core/extensions/builtin/claude-sdk-oauth/tools.d.ts.map +1 -0
  194. package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/tools.js +1 -0
  195. package/dist/core/extensions/builtin/claude-sdk-oauth/tools.js.map +1 -0
  196. package/dist/core/extensions/builtin/compaction/checkpoint-state.d.ts +18 -1
  197. package/dist/core/extensions/builtin/compaction/checkpoint-state.d.ts.map +1 -1
  198. package/dist/core/extensions/builtin/compaction/checkpoint-state.js +32 -0
  199. package/dist/core/extensions/builtin/compaction/checkpoint-state.js.map +1 -1
  200. package/dist/core/extensions/builtin/compaction/deterministic-fallback.d.ts +18 -0
  201. package/dist/core/extensions/builtin/compaction/deterministic-fallback.d.ts.map +1 -0
  202. package/dist/core/extensions/builtin/compaction/deterministic-fallback.js +73 -0
  203. package/dist/core/extensions/builtin/compaction/deterministic-fallback.js.map +1 -0
  204. package/dist/core/extensions/builtin/compaction/idle-retry.d.ts +21 -0
  205. package/dist/core/extensions/builtin/compaction/idle-retry.d.ts.map +1 -0
  206. package/dist/core/extensions/builtin/compaction/idle-retry.js +24 -0
  207. package/dist/core/extensions/builtin/compaction/idle-retry.js.map +1 -0
  208. package/dist/core/extensions/builtin/compaction/index.d.ts.map +1 -1
  209. package/dist/core/extensions/builtin/compaction/index.js +119 -15
  210. package/dist/core/extensions/builtin/compaction/index.js.map +1 -1
  211. package/dist/core/extensions/builtin/compaction/lane-policy.d.ts +71 -0
  212. package/dist/core/extensions/builtin/compaction/lane-policy.d.ts.map +1 -0
  213. package/dist/core/extensions/builtin/compaction/lane-policy.js +94 -0
  214. package/dist/core/extensions/builtin/compaction/lane-policy.js.map +1 -0
  215. package/dist/core/extensions/builtin/compaction/log.d.ts.map +1 -1
  216. package/dist/core/extensions/builtin/compaction/log.js +1 -0
  217. package/dist/core/extensions/builtin/compaction/log.js.map +1 -1
  218. package/dist/core/extensions/builtin/compaction/overflow-retry.d.ts +59 -0
  219. package/dist/core/extensions/builtin/compaction/overflow-retry.d.ts.map +1 -0
  220. package/dist/core/extensions/builtin/compaction/overflow-retry.js +155 -0
  221. package/dist/core/extensions/builtin/compaction/overflow-retry.js.map +1 -0
  222. package/dist/core/extensions/builtin/compaction/speculative.d.ts +4 -1
  223. package/dist/core/extensions/builtin/compaction/speculative.d.ts.map +1 -1
  224. package/dist/core/extensions/builtin/compaction/speculative.js +39 -115
  225. package/dist/core/extensions/builtin/compaction/speculative.js.map +1 -1
  226. package/dist/core/extensions/builtin/compaction/task-intent.d.ts +2 -6
  227. package/dist/core/extensions/builtin/compaction/task-intent.d.ts.map +1 -1
  228. package/dist/core/extensions/builtin/compaction/task-intent.js +10 -9
  229. package/dist/core/extensions/builtin/compaction/task-intent.js.map +1 -1
  230. package/dist/core/extensions/builtin/compaction/transient-failure.d.ts.map +1 -1
  231. package/dist/core/extensions/builtin/compaction/transient-failure.js +3 -0
  232. package/dist/core/extensions/builtin/compaction/transient-failure.js.map +1 -1
  233. package/dist/core/extensions/builtin/goal/continuation-recovery.d.ts +6 -0
  234. package/dist/core/extensions/builtin/goal/continuation-recovery.d.ts.map +1 -0
  235. package/dist/core/extensions/builtin/goal/continuation-recovery.js +20 -0
  236. package/dist/core/extensions/builtin/goal/continuation-recovery.js.map +1 -0
  237. package/dist/core/extensions/builtin/goal/continuation.d.ts +2 -4
  238. package/dist/core/extensions/builtin/goal/continuation.d.ts.map +1 -1
  239. package/dist/core/extensions/builtin/goal/continuation.js +2 -8
  240. package/dist/core/extensions/builtin/goal/continuation.js.map +1 -1
  241. package/dist/core/extensions/builtin/goal/direct-input-lifecycle.d.ts +19 -0
  242. package/dist/core/extensions/builtin/goal/direct-input-lifecycle.d.ts.map +1 -0
  243. package/dist/core/extensions/builtin/goal/direct-input-lifecycle.js +48 -0
  244. package/dist/core/extensions/builtin/goal/direct-input-lifecycle.js.map +1 -0
  245. package/dist/core/extensions/builtin/goal/index.d.ts.map +1 -1
  246. package/dist/core/extensions/builtin/goal/index.js +17 -15
  247. package/dist/core/extensions/builtin/goal/index.js.map +1 -1
  248. package/dist/core/extensions/builtin/goal/lifecycle-helpers.d.ts.map +1 -1
  249. package/dist/core/extensions/builtin/goal/lifecycle-helpers.js +12 -10
  250. package/dist/core/extensions/builtin/goal/lifecycle-helpers.js.map +1 -1
  251. package/dist/core/extensions/builtin/goal/monitor-continuation.d.ts +5 -1
  252. package/dist/core/extensions/builtin/goal/monitor-continuation.d.ts.map +1 -1
  253. package/dist/core/extensions/builtin/goal/monitor-continuation.js +94 -52
  254. package/dist/core/extensions/builtin/goal/monitor-continuation.js.map +1 -1
  255. package/dist/core/extensions/builtin/goal/persistence.d.ts +16 -0
  256. package/dist/core/extensions/builtin/goal/persistence.d.ts.map +1 -1
  257. package/dist/core/extensions/builtin/goal/persistence.js +185 -11
  258. package/dist/core/extensions/builtin/goal/persistence.js.map +1 -1
  259. package/dist/core/extensions/builtin/goal/ui.d.ts +1 -0
  260. package/dist/core/extensions/builtin/goal/ui.d.ts.map +1 -1
  261. package/dist/core/extensions/builtin/goal/ui.js +11 -2
  262. package/dist/core/extensions/builtin/goal/ui.js.map +1 -1
  263. package/dist/core/extensions/builtin/gpt-apply-patch/apply.d.ts +1 -0
  264. package/dist/core/extensions/builtin/gpt-apply-patch/apply.d.ts.map +1 -1
  265. package/dist/core/extensions/builtin/gpt-apply-patch/apply.js +13 -1
  266. package/dist/core/extensions/builtin/gpt-apply-patch/apply.js.map +1 -1
  267. package/dist/core/extensions/builtin/gpt-apply-patch/extension.d.ts.map +1 -1
  268. package/dist/core/extensions/builtin/gpt-apply-patch/extension.js +15 -0
  269. package/dist/core/extensions/builtin/gpt-apply-patch/extension.js.map +1 -1
  270. package/dist/core/extensions/builtin/gpt-apply-patch/index.d.ts +1 -1
  271. package/dist/core/extensions/builtin/gpt-apply-patch/index.d.ts.map +1 -1
  272. package/dist/core/extensions/builtin/gpt-apply-patch/index.js +1 -1
  273. package/dist/core/extensions/builtin/gpt-apply-patch/index.js.map +1 -1
  274. package/dist/core/extensions/builtin/gpt-apply-patch/tool.d.ts +1 -0
  275. package/dist/core/extensions/builtin/gpt-apply-patch/tool.d.ts.map +1 -1
  276. package/dist/core/extensions/builtin/gpt-apply-patch/tool.js +53 -8
  277. package/dist/core/extensions/builtin/gpt-apply-patch/tool.js.map +1 -1
  278. package/dist/core/extensions/builtin/index.d.ts.map +1 -1
  279. package/dist/core/extensions/builtin/index.js +5 -2
  280. package/dist/core/extensions/builtin/index.js.map +1 -1
  281. package/dist/core/extensions/builtin/loop-guard/detectors.d.ts +31 -0
  282. package/dist/core/extensions/builtin/loop-guard/detectors.d.ts.map +1 -0
  283. package/dist/core/extensions/builtin/loop-guard/detectors.js +152 -0
  284. package/dist/core/extensions/builtin/loop-guard/detectors.js.map +1 -0
  285. package/dist/core/extensions/builtin/loop-guard/index.d.ts +3 -0
  286. package/dist/core/extensions/builtin/loop-guard/index.d.ts.map +1 -0
  287. package/dist/core/extensions/builtin/loop-guard/index.js +31 -0
  288. package/dist/core/extensions/builtin/loop-guard/index.js.map +1 -0
  289. package/dist/core/extensions/builtin/loop-guard/notice.d.ts +5 -0
  290. package/dist/core/extensions/builtin/loop-guard/notice.d.ts.map +1 -0
  291. package/dist/core/extensions/builtin/loop-guard/notice.js +42 -0
  292. package/dist/core/extensions/builtin/loop-guard/notice.js.map +1 -0
  293. package/dist/core/extensions/builtin/loop-guard/policy.d.ts +30 -0
  294. package/dist/core/extensions/builtin/loop-guard/policy.d.ts.map +1 -0
  295. package/dist/core/extensions/builtin/loop-guard/policy.js +30 -0
  296. package/dist/core/extensions/builtin/loop-guard/policy.js.map +1 -0
  297. package/dist/core/extensions/builtin/loop-guard/renderer.d.ts +4 -0
  298. package/dist/core/extensions/builtin/loop-guard/renderer.d.ts.map +1 -0
  299. package/dist/core/extensions/builtin/loop-guard/renderer.js +50 -0
  300. package/dist/core/extensions/builtin/loop-guard/renderer.js.map +1 -0
  301. package/dist/core/extensions/builtin/loop-guard/similarity.d.ts +13 -0
  302. package/dist/core/extensions/builtin/loop-guard/similarity.d.ts.map +1 -0
  303. package/dist/core/extensions/builtin/loop-guard/similarity.js +51 -0
  304. package/dist/core/extensions/builtin/loop-guard/similarity.js.map +1 -0
  305. package/dist/core/extensions/builtin/loop-guard/tracker.d.ts +13 -0
  306. package/dist/core/extensions/builtin/loop-guard/tracker.d.ts.map +1 -0
  307. package/dist/core/extensions/builtin/loop-guard/tracker.js +39 -0
  308. package/dist/core/extensions/builtin/loop-guard/tracker.js.map +1 -0
  309. package/dist/core/extensions/builtin/mcp/health.d.ts.map +1 -1
  310. package/dist/core/extensions/builtin/mcp/health.js +2 -1
  311. package/dist/core/extensions/builtin/mcp/health.js.map +1 -1
  312. package/dist/core/extensions/builtin/monitor-state-event.d.ts +10 -0
  313. package/dist/core/extensions/builtin/monitor-state-event.d.ts.map +1 -1
  314. package/dist/core/extensions/builtin/monitor-state-event.js.map +1 -1
  315. package/dist/core/extensions/builtin/prompt-preset/deepseek-v4-flash-0731.d.ts +3 -0
  316. package/dist/core/extensions/builtin/prompt-preset/deepseek-v4-flash-0731.d.ts.map +1 -0
  317. package/dist/core/extensions/builtin/prompt-preset/deepseek-v4-flash-0731.js +10 -0
  318. package/dist/core/extensions/builtin/prompt-preset/deepseek-v4-flash-0731.js.map +1 -0
  319. package/dist/core/extensions/builtin/prompt-preset/deepseek-v4-flash.d.ts +3 -0
  320. package/dist/core/extensions/builtin/prompt-preset/deepseek-v4-flash.d.ts.map +1 -0
  321. package/dist/core/extensions/builtin/prompt-preset/deepseek-v4-flash.js +10 -0
  322. package/dist/core/extensions/builtin/prompt-preset/deepseek-v4-flash.js.map +1 -0
  323. package/dist/core/extensions/builtin/prompt-preset/deepseek-v4-pro.d.ts +3 -0
  324. package/dist/core/extensions/builtin/prompt-preset/deepseek-v4-pro.d.ts.map +1 -0
  325. package/dist/core/extensions/builtin/prompt-preset/deepseek-v4-pro.js +11 -0
  326. package/dist/core/extensions/builtin/prompt-preset/deepseek-v4-pro.js.map +1 -0
  327. package/dist/core/extensions/builtin/prompt-preset/deepseek-v4.d.ts +13 -0
  328. package/dist/core/extensions/builtin/prompt-preset/deepseek-v4.d.ts.map +1 -0
  329. package/dist/core/extensions/builtin/prompt-preset/deepseek-v4.js +60 -0
  330. package/dist/core/extensions/builtin/prompt-preset/deepseek-v4.js.map +1 -0
  331. package/dist/core/extensions/builtin/prompt-preset/gpt-5.6.d.ts +1 -1
  332. package/dist/core/extensions/builtin/prompt-preset/gpt-5.6.d.ts.map +1 -1
  333. package/dist/core/extensions/builtin/prompt-preset/gpt-5.6.js +5 -3
  334. package/dist/core/extensions/builtin/prompt-preset/gpt-5.6.js.map +1 -1
  335. package/dist/core/extensions/builtin/prompt-preset/index.d.ts.map +1 -1
  336. package/dist/core/extensions/builtin/prompt-preset/index.js +8 -4
  337. package/dist/core/extensions/builtin/prompt-preset/index.js.map +1 -1
  338. package/dist/core/extensions/builtin/prompt-preset/kimi-k3.d.ts.map +1 -1
  339. package/dist/core/extensions/builtin/prompt-preset/kimi-k3.js +8 -1
  340. package/dist/core/extensions/builtin/prompt-preset/kimi-k3.js.map +1 -1
  341. package/dist/core/extensions/builtin/prompt-preset/presets.d.ts.map +1 -1
  342. package/dist/core/extensions/builtin/prompt-preset/presets.js +42 -0
  343. package/dist/core/extensions/builtin/prompt-preset/presets.js.map +1 -1
  344. package/dist/core/extensions/builtin/prompt-preset/settings.d.ts +1 -1
  345. package/dist/core/extensions/builtin/prompt-preset/settings.d.ts.map +1 -1
  346. package/dist/core/extensions/builtin/prompt-preset/settings.js +3 -0
  347. package/dist/core/extensions/builtin/prompt-preset/settings.js.map +1 -1
  348. package/dist/core/extensions/builtin/recommended-models/index.d.ts.map +1 -1
  349. package/dist/core/extensions/builtin/recommended-models/index.js +2 -1
  350. package/dist/core/extensions/builtin/recommended-models/index.js.map +1 -1
  351. package/dist/core/extensions/builtin/rules/index.js +4 -3
  352. package/dist/core/extensions/builtin/rules/index.js.map +1 -1
  353. package/dist/core/extensions/builtin/rules/rules/constants.d.ts +11 -0
  354. package/dist/core/extensions/builtin/rules/rules/constants.d.ts.map +1 -1
  355. package/dist/core/extensions/builtin/rules/rules/constants.js +11 -0
  356. package/dist/core/extensions/builtin/rules/rules/constants.js.map +1 -1
  357. package/dist/core/extensions/builtin/rules/rules/formatter.d.ts.map +1 -1
  358. package/dist/core/extensions/builtin/rules/rules/formatter.js +15 -1
  359. package/dist/core/extensions/builtin/rules/rules/formatter.js.map +1 -1
  360. package/dist/core/extensions/builtin/service-tier.d.ts.map +1 -1
  361. package/dist/core/extensions/builtin/service-tier.js +23 -21
  362. package/dist/core/extensions/builtin/service-tier.js.map +1 -1
  363. package/dist/core/extensions/builtin/terminal/extension.d.ts.map +1 -1
  364. package/dist/core/extensions/builtin/terminal/extension.js +21 -7
  365. package/dist/core/extensions/builtin/terminal/extension.js.map +1 -1
  366. package/dist/core/extensions/builtin/terminal/monitor-notify.d.ts.map +1 -1
  367. package/dist/core/extensions/builtin/terminal/monitor-notify.js +42 -5
  368. package/dist/core/extensions/builtin/terminal/monitor-notify.js.map +1 -1
  369. package/dist/core/extensions/builtin/terminal/monitor-registry.d.ts +2 -0
  370. package/dist/core/extensions/builtin/terminal/monitor-registry.d.ts.map +1 -1
  371. package/dist/core/extensions/builtin/terminal/monitor-registry.js +2 -0
  372. package/dist/core/extensions/builtin/terminal/monitor-registry.js.map +1 -1
  373. package/dist/core/extensions/builtin/terminal/monitor-status-ticker.d.ts +37 -0
  374. package/dist/core/extensions/builtin/terminal/monitor-status-ticker.d.ts.map +1 -0
  375. package/dist/core/extensions/builtin/terminal/monitor-status-ticker.js +61 -0
  376. package/dist/core/extensions/builtin/terminal/monitor-status-ticker.js.map +1 -0
  377. package/dist/core/extensions/builtin/terminal/monitor-status.d.ts +9 -1
  378. package/dist/core/extensions/builtin/terminal/monitor-status.d.ts.map +1 -1
  379. package/dist/core/extensions/builtin/terminal/monitor-status.js +35 -2
  380. package/dist/core/extensions/builtin/terminal/monitor-status.js.map +1 -1
  381. package/dist/core/extensions/builtin/terminal/tools/context.d.ts +1 -1
  382. package/dist/core/extensions/builtin/terminal/tools/context.d.ts.map +1 -1
  383. package/dist/core/extensions/builtin/terminal/tools/context.js.map +1 -1
  384. package/dist/core/extensions/builtin/terminal/tools/monitor.d.ts.map +1 -1
  385. package/dist/core/extensions/builtin/terminal/tools/monitor.js +2 -1
  386. package/dist/core/extensions/builtin/terminal/tools/monitor.js.map +1 -1
  387. package/dist/core/extensions/builtin/todotools/commands.d.ts +2 -2
  388. package/dist/core/extensions/builtin/todotools/commands.d.ts.map +1 -1
  389. package/dist/core/extensions/builtin/todotools/commands.js.map +1 -1
  390. package/dist/core/extensions/builtin/todotools/index.d.ts.map +1 -1
  391. package/dist/core/extensions/builtin/todotools/index.js +6 -3
  392. package/dist/core/extensions/builtin/todotools/index.js.map +1 -1
  393. package/dist/core/extensions/builtin/todotools/state.d.ts +1 -1
  394. package/dist/core/extensions/builtin/todotools/state.d.ts.map +1 -1
  395. package/dist/core/extensions/builtin/todotools/state.js +1 -1
  396. package/dist/core/extensions/builtin/todotools/state.js.map +1 -1
  397. package/dist/core/extensions/builtin/todotools/todo-widget-component.d.ts +19 -0
  398. package/dist/core/extensions/builtin/todotools/todo-widget-component.d.ts.map +1 -0
  399. package/dist/core/extensions/builtin/todotools/todo-widget-component.js +78 -0
  400. package/dist/core/extensions/builtin/todotools/todo-widget-component.js.map +1 -0
  401. package/dist/core/extensions/builtin/todotools/todo-widget.d.ts +13 -1
  402. package/dist/core/extensions/builtin/todotools/todo-widget.d.ts.map +1 -1
  403. package/dist/core/extensions/builtin/todotools/todo-widget.js +32 -14
  404. package/dist/core/extensions/builtin/todotools/todo-widget.js.map +1 -1
  405. package/dist/core/extensions/builtin/todotools/tools/todo.d.ts +2 -2
  406. package/dist/core/extensions/builtin/todotools/tools/todo.d.ts.map +1 -1
  407. package/dist/core/extensions/builtin/todotools/tools/todo.js +1 -1
  408. package/dist/core/extensions/builtin/todotools/tools/todo.js.map +1 -1
  409. package/dist/core/extensions/builtin/tool-pair-guard/index.d.ts.map +1 -1
  410. package/dist/core/extensions/builtin/tool-pair-guard/index.js +1 -1
  411. package/dist/core/extensions/builtin/tool-pair-guard/index.js.map +1 -1
  412. package/dist/core/extensions/builtin/tps.d.ts.map +1 -1
  413. package/dist/core/extensions/builtin/tps.js +5 -2
  414. package/dist/core/extensions/builtin/tps.js.map +1 -1
  415. package/dist/core/extensions/builtin/ttsr/builtin-rules.d.ts +4 -0
  416. package/dist/core/extensions/builtin/ttsr/builtin-rules.d.ts.map +1 -0
  417. package/dist/core/extensions/builtin/ttsr/builtin-rules.js +20 -0
  418. package/dist/core/extensions/builtin/ttsr/builtin-rules.js.map +1 -0
  419. package/dist/core/extensions/builtin/ttsr/commands.js +9 -1
  420. package/dist/core/extensions/builtin/ttsr/commands.js.map +1 -1
  421. package/dist/core/extensions/builtin/ttsr/index.d.ts.map +1 -1
  422. package/dist/core/extensions/builtin/ttsr/index.js +4 -3
  423. package/dist/core/extensions/builtin/ttsr/index.js.map +1 -1
  424. package/dist/core/extensions/builtin/ttsr/manager.js +1 -1
  425. package/dist/core/extensions/builtin/ttsr/manager.js.map +1 -1
  426. package/dist/core/extensions/builtin/websearch/websearch/config.d.ts.map +1 -1
  427. package/dist/core/extensions/builtin/websearch/websearch/config.js +1 -0
  428. package/dist/core/extensions/builtin/websearch/websearch/config.js.map +1 -1
  429. package/dist/core/extensions/builtin/websearch/websearch/native.d.ts.map +1 -1
  430. package/dist/core/extensions/builtin/websearch/websearch/native.js +16 -5
  431. package/dist/core/extensions/builtin/websearch/websearch/native.js.map +1 -1
  432. package/dist/core/extensions/builtin/websearch/websearch/provider-endpoints.d.ts.map +1 -1
  433. package/dist/core/extensions/builtin/websearch/websearch/provider-endpoints.js +1 -0
  434. package/dist/core/extensions/builtin/websearch/websearch/provider-endpoints.js.map +1 -1
  435. package/dist/core/extensions/builtin/websearch/websearch/providers/anthropic.d.ts +4 -1
  436. package/dist/core/extensions/builtin/websearch/websearch/providers/anthropic.d.ts.map +1 -1
  437. package/dist/core/extensions/builtin/websearch/websearch/providers/anthropic.js +44 -37
  438. package/dist/core/extensions/builtin/websearch/websearch/providers/anthropic.js.map +1 -1
  439. package/dist/core/extensions/builtin/websearch/websearch/providers/deepseek.d.ts +3 -0
  440. package/dist/core/extensions/builtin/websearch/websearch/providers/deepseek.d.ts.map +1 -0
  441. package/dist/core/extensions/builtin/websearch/websearch/providers/deepseek.js +12 -0
  442. package/dist/core/extensions/builtin/websearch/websearch/providers/deepseek.js.map +1 -0
  443. package/dist/core/extensions/builtin/websearch/websearch/providers.d.ts.map +1 -1
  444. package/dist/core/extensions/builtin/websearch/websearch/providers.js +2 -0
  445. package/dist/core/extensions/builtin/websearch/websearch/providers.js.map +1 -1
  446. package/dist/core/extensions/builtin/websearch/websearch/renderers.d.ts.map +1 -1
  447. package/dist/core/extensions/builtin/websearch/websearch/renderers.js +3 -3
  448. package/dist/core/extensions/builtin/websearch/websearch/renderers.js.map +1 -1
  449. package/dist/core/extensions/builtin/websearch/websearch/search.d.ts.map +1 -1
  450. package/dist/core/extensions/builtin/websearch/websearch/search.js +1 -3
  451. package/dist/core/extensions/builtin/websearch/websearch/search.js.map +1 -1
  452. package/dist/core/extensions/builtin/websearch/websearch/tool.js +2 -2
  453. package/dist/core/extensions/builtin/websearch/websearch/tool.js.map +1 -1
  454. package/dist/core/extensions/builtin/websearch/websearch/types.d.ts +1 -1
  455. package/dist/core/extensions/builtin/websearch/websearch/types.d.ts.map +1 -1
  456. package/dist/core/extensions/builtin/websearch/websearch/types.js.map +1 -1
  457. package/dist/core/extensions/index.d.ts +1 -1
  458. package/dist/core/extensions/index.d.ts.map +1 -1
  459. package/dist/core/extensions/index.js.map +1 -1
  460. package/dist/core/extensions/loader.d.ts.map +1 -1
  461. package/dist/core/extensions/loader.js +19 -18
  462. package/dist/core/extensions/loader.js.map +1 -1
  463. package/dist/core/extensions/runner.d.ts +5 -2
  464. package/dist/core/extensions/runner.d.ts.map +1 -1
  465. package/dist/core/extensions/runner.js +21 -1
  466. package/dist/core/extensions/runner.js.map +1 -1
  467. package/dist/core/extensions/types.d.ts +38 -2
  468. package/dist/core/extensions/types.d.ts.map +1 -1
  469. package/dist/core/extensions/types.js.map +1 -1
  470. package/dist/core/footer-data-provider.d.ts +10 -0
  471. package/dist/core/footer-data-provider.d.ts.map +1 -1
  472. package/dist/core/footer-data-provider.js +1 -1
  473. package/dist/core/footer-data-provider.js.map +1 -1
  474. package/dist/core/keybindings.d.ts +24 -0
  475. package/dist/core/keybindings.d.ts.map +1 -1
  476. package/dist/core/model-registry.d.ts +2 -1
  477. package/dist/core/model-registry.d.ts.map +1 -1
  478. package/dist/core/model-registry.js +3 -0
  479. package/dist/core/model-registry.js.map +1 -1
  480. package/dist/core/model-resolver.js +2 -2
  481. package/dist/core/model-resolver.js.map +1 -1
  482. package/dist/core/model-runtime.d.ts +2 -0
  483. package/dist/core/model-runtime.d.ts.map +1 -1
  484. package/dist/core/model-runtime.js.map +1 -1
  485. package/dist/core/package-manager.d.ts +0 -1
  486. package/dist/core/package-manager.d.ts.map +1 -1
  487. package/dist/core/package-manager.js +18 -34
  488. package/dist/core/package-manager.js.map +1 -1
  489. package/dist/core/pi-manifest.d.ts +9 -0
  490. package/dist/core/pi-manifest.d.ts.map +1 -0
  491. package/dist/core/pi-manifest.js +25 -0
  492. package/dist/core/pi-manifest.js.map +1 -0
  493. package/dist/core/resource-loader.d.ts +15 -0
  494. package/dist/core/resource-loader.d.ts.map +1 -1
  495. package/dist/core/resource-loader.js +55 -6
  496. package/dist/core/resource-loader.js.map +1 -1
  497. package/dist/core/retry-fallback/hint-policy.d.ts +29 -0
  498. package/dist/core/retry-fallback/hint-policy.d.ts.map +1 -0
  499. package/dist/core/retry-fallback/hint-policy.js +54 -0
  500. package/dist/core/retry-fallback/hint-policy.js.map +1 -0
  501. package/dist/core/retry-fallback/probe-scheduler.d.ts +60 -0
  502. package/dist/core/retry-fallback/probe-scheduler.d.ts.map +1 -0
  503. package/dist/core/retry-fallback/probe-scheduler.js +206 -0
  504. package/dist/core/retry-fallback/probe-scheduler.js.map +1 -0
  505. package/dist/core/retry-fallback/settings.d.ts +9 -0
  506. package/dist/core/retry-fallback/settings.d.ts.map +1 -1
  507. package/dist/core/retry-fallback/settings.js +14 -0
  508. package/dist/core/retry-fallback/settings.js.map +1 -1
  509. package/dist/core/settings-manager.d.ts +10 -1
  510. package/dist/core/settings-manager.d.ts.map +1 -1
  511. package/dist/core/settings-manager.js +21 -1
  512. package/dist/core/settings-manager.js.map +1 -1
  513. package/dist/core/thinking-levels.d.ts +5 -0
  514. package/dist/core/thinking-levels.d.ts.map +1 -1
  515. package/dist/core/thinking-levels.js +9 -39
  516. package/dist/core/thinking-levels.js.map +1 -1
  517. package/dist/extensions/llama/provider.js +1 -1
  518. package/dist/extensions/llama/provider.js.map +1 -1
  519. package/dist/index.d.ts +2 -2
  520. package/dist/index.d.ts.map +1 -1
  521. package/dist/index.js.map +1 -1
  522. package/dist/main.d.ts.map +1 -1
  523. package/dist/main.js +44 -0
  524. package/dist/main.js.map +1 -1
  525. package/dist/modes/app-server/server/account.d.ts +1 -1
  526. package/dist/modes/app-server/server/account.js +1 -1
  527. package/dist/modes/app-server/server/account.js.map +1 -1
  528. package/dist/modes/app-server/server/server-core.js +1 -1
  529. package/dist/modes/app-server/server/server-core.js.map +1 -1
  530. package/dist/modes/interactive/compaction-queue-transfer.d.ts +2 -0
  531. package/dist/modes/interactive/compaction-queue-transfer.d.ts.map +1 -1
  532. package/dist/modes/interactive/compaction-queue-transfer.js.map +1 -1
  533. package/dist/modes/interactive/components/assistant-message.d.ts +5 -2
  534. package/dist/modes/interactive/components/assistant-message.d.ts.map +1 -1
  535. package/dist/modes/interactive/components/assistant-message.js +16 -4
  536. package/dist/modes/interactive/components/assistant-message.js.map +1 -1
  537. package/dist/modes/interactive/components/continuity-notice.d.ts +21 -0
  538. package/dist/modes/interactive/components/continuity-notice.d.ts.map +1 -0
  539. package/dist/modes/interactive/components/continuity-notice.js +58 -0
  540. package/dist/modes/interactive/components/continuity-notice.js.map +1 -0
  541. package/dist/modes/interactive/components/footer.d.ts.map +1 -1
  542. package/dist/modes/interactive/components/footer.js +9 -5
  543. package/dist/modes/interactive/components/footer.js.map +1 -1
  544. package/dist/modes/interactive/components/markdown-transform.d.ts +3 -0
  545. package/dist/modes/interactive/components/markdown-transform.d.ts.map +1 -0
  546. package/dist/modes/interactive/components/markdown-transform.js +19 -0
  547. package/dist/modes/interactive/components/markdown-transform.js.map +1 -0
  548. package/dist/modes/interactive/components/model-selector.d.ts.map +1 -1
  549. package/dist/modes/interactive/components/model-selector.js +4 -1
  550. package/dist/modes/interactive/components/model-selector.js.map +1 -1
  551. package/dist/modes/interactive/components/settings-selector.d.ts +6 -2
  552. package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
  553. package/dist/modes/interactive/components/settings-selector.js +20 -0
  554. package/dist/modes/interactive/components/settings-selector.js.map +1 -1
  555. package/dist/modes/interactive/components/user-message.d.ts +3 -1
  556. package/dist/modes/interactive/components/user-message.d.ts.map +1 -1
  557. package/dist/modes/interactive/components/user-message.js +8 -2
  558. package/dist/modes/interactive/components/user-message.js.map +1 -1
  559. package/dist/modes/interactive/help-content.d.ts.map +1 -1
  560. package/dist/modes/interactive/help-content.js +1 -0
  561. package/dist/modes/interactive/help-content.js.map +1 -1
  562. package/dist/modes/interactive/interactive-mode.d.ts +21 -0
  563. package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  564. package/dist/modes/interactive/interactive-mode.js +189 -62
  565. package/dist/modes/interactive/interactive-mode.js.map +1 -1
  566. package/dist/modes/interactive/risky-main-model-warning.d.ts +1 -1
  567. package/dist/modes/interactive/risky-main-model-warning.d.ts.map +1 -1
  568. package/dist/modes/interactive/risky-main-model-warning.js +1 -1
  569. package/dist/modes/interactive/risky-main-model-warning.js.map +1 -1
  570. package/dist/modes/interactive/theme/dark.json +1 -0
  571. package/dist/modes/interactive/theme/grok-day.json +1 -0
  572. package/dist/modes/interactive/theme/grok-night.json +1 -0
  573. package/dist/modes/interactive/theme/light.json +1 -0
  574. package/dist/modes/interactive/theme/theme-schema.json +5 -1
  575. package/dist/modes/interactive/theme/theme.d.ts +2 -2
  576. package/dist/modes/interactive/theme/theme.d.ts.map +1 -1
  577. package/dist/modes/interactive/theme/theme.js +13 -3
  578. package/dist/modes/interactive/theme/theme.js.map +1 -1
  579. package/dist/modes/rpc/connection-handler.d.ts.map +1 -1
  580. package/dist/modes/rpc/connection-handler.js +16 -3
  581. package/dist/modes/rpc/connection-handler.js.map +1 -1
  582. package/dist/utils/clipboard.d.ts +1 -1
  583. package/dist/utils/clipboard.d.ts.map +1 -1
  584. package/dist/utils/clipboard.js +22 -2
  585. package/dist/utils/clipboard.js.map +1 -1
  586. package/docs/AGENTS.md +1 -6
  587. package/docs/custom-provider.md +10 -3
  588. package/docs/development.md +1 -2
  589. package/docs/extensions.md +34 -1
  590. package/docs/keybindings.md +13 -0
  591. package/docs/mcp.md +63 -4
  592. package/docs/models.md +1 -0
  593. package/docs/providers.md +41 -5
  594. package/docs/release-guide.md +7 -5
  595. package/docs/session-format.md +2 -0
  596. package/docs/settings.md +3 -1
  597. package/docs/skills.md +29 -0
  598. package/docs/themes.md +5 -3
  599. package/docs/usage.md +5 -0
  600. package/examples/extensions/custom-compaction.ts +1 -2
  601. package/examples/extensions/custom-provider-anthropic/index.ts +8 -2
  602. package/examples/extensions/doom-overlay/wad-finder.ts +7 -3
  603. package/examples/extensions/handoff.ts +2 -3
  604. package/examples/extensions/overlay-test.ts +1 -1
  605. package/examples/extensions/qna.ts +2 -2
  606. package/examples/rpc-extension-ui.ts +11 -2
  607. package/examples/sdk/02-custom-model.ts +1 -2
  608. package/examples/sdk/12-full-control.ts +2 -0
  609. package/node_modules/@code-yeongyu/senpi-codemode/CHANGELOG.md +45 -0
  610. package/node_modules/@code-yeongyu/senpi-codemode/README.md +6 -3
  611. package/node_modules/@code-yeongyu/senpi-codemode/package.json +3 -3
  612. package/node_modules/@code-yeongyu/senpi-codemode/src/extension/eval-status-ticker.ts +79 -0
  613. package/node_modules/@code-yeongyu/senpi-codemode/src/extension/eval-status.ts +36 -3
  614. package/node_modules/@code-yeongyu/senpi-codemode/src/index.ts +26 -12
  615. package/node_modules/@code-yeongyu/senpi-codemode/src/tool/cell-execution.ts +146 -0
  616. package/node_modules/@code-yeongyu/senpi-codemode/src/tool/cell-handler.ts +21 -119
  617. package/node_modules/@code-yeongyu/senpi-codemode/src/tool/cell-runtime.ts +157 -0
  618. package/node_modules/@code-yeongyu/senpi-codemode/src/tool/detached-cell-manager.ts +62 -208
  619. package/node_modules/@code-yeongyu/senpi-codemode/src/tool/detached-cell-notification.ts +98 -0
  620. package/node_modules/@code-yeongyu/senpi-codemode/src/tool/detached-cell-snapshot.ts +81 -0
  621. package/node_modules/@code-yeongyu/senpi-codemode/src/tool/detached-cell-state.ts +24 -0
  622. package/node_modules/@code-yeongyu/senpi-codemode/src/tool/detached-eval-result.ts +140 -0
  623. package/node_modules/@code-yeongyu/senpi-codemode/src/tool/detached-notification-queue.ts +53 -0
  624. package/node_modules/@code-yeongyu/senpi-codemode/src/tool/eval-request.ts +45 -0
  625. package/node_modules/@code-yeongyu/senpi-codemode/src/tool/eval-tool-options.ts +45 -0
  626. package/node_modules/@code-yeongyu/senpi-codemode/src/tool/eval-tool.ts +20 -342
  627. package/node_modules/@earendil-works/pi-agent-core/dist/agent-loop.d.ts.map +1 -1
  628. package/node_modules/@earendil-works/pi-agent-core/dist/agent-loop.js +1 -0
  629. package/node_modules/@earendil-works/pi-agent-core/dist/agent-loop.js.map +1 -1
  630. package/node_modules/@earendil-works/pi-agent-core/dist/harness/agent-harness.d.ts +14 -3
  631. package/node_modules/@earendil-works/pi-agent-core/dist/harness/agent-harness.d.ts.map +1 -1
  632. package/node_modules/@earendil-works/pi-agent-core/dist/harness/agent-harness.js +156 -67
  633. package/node_modules/@earendil-works/pi-agent-core/dist/harness/agent-harness.js.map +1 -1
  634. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/array-session-reader.d.ts +3 -0
  635. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/array-session-reader.d.ts.map +1 -0
  636. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/array-session-reader.js +70 -0
  637. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/array-session-reader.js.map +1 -0
  638. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/fork.d.ts +4 -0
  639. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/fork.d.ts.map +1 -0
  640. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/fork.js +22 -0
  641. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/fork.js.map +1 -0
  642. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl-store.d.ts +13 -0
  643. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl-store.d.ts.map +1 -0
  644. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl-store.js +304 -0
  645. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl-store.js.map +1 -0
  646. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/keyed-operation-queue.d.ts +17 -0
  647. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/keyed-operation-queue.d.ts.map +1 -0
  648. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/keyed-operation-queue.js +60 -0
  649. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/keyed-operation-queue.js.map +1 -0
  650. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory-store.d.ts +6 -0
  651. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory-store.d.ts.map +1 -0
  652. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory-store.js +107 -0
  653. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory-store.js.map +1 -0
  654. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repository.d.ts +28 -0
  655. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repository.d.ts.map +1 -0
  656. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repository.js +61 -0
  657. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repository.js.map +1 -0
  658. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/search-backend.d.ts +8 -0
  659. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/search-backend.d.ts.map +1 -0
  660. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/search-backend.js +22 -0
  661. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/search-backend.js.map +1 -0
  662. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/session.d.ts +6 -10
  663. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/session.d.ts.map +1 -1
  664. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/session.js +154 -77
  665. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/session.js.map +1 -1
  666. package/node_modules/@earendil-works/pi-agent-core/dist/harness/types.d.ts +49 -23
  667. package/node_modules/@earendil-works/pi-agent-core/dist/harness/types.d.ts.map +1 -1
  668. package/node_modules/@earendil-works/pi-agent-core/dist/harness/types.js.map +1 -1
  669. package/node_modules/@earendil-works/pi-agent-core/dist/index.d.ts +6 -6
  670. package/node_modules/@earendil-works/pi-agent-core/dist/index.d.ts.map +1 -1
  671. package/node_modules/@earendil-works/pi-agent-core/dist/index.js +6 -6
  672. package/node_modules/@earendil-works/pi-agent-core/dist/index.js.map +1 -1
  673. package/node_modules/@earendil-works/pi-agent-core/dist/proxy.js +1 -1
  674. package/node_modules/@earendil-works/pi-agent-core/dist/proxy.js.map +1 -1
  675. package/node_modules/@earendil-works/pi-agent-core/package.json +4 -4
  676. package/node_modules/@earendil-works/pi-ai/README.md +2 -1
  677. package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.d.ts.map +1 -1
  678. package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.js +56 -25
  679. package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.js.map +1 -1
  680. package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-tool-pairs.d.ts +3 -0
  681. package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-tool-pairs.d.ts.map +1 -0
  682. package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-tool-pairs.js +134 -0
  683. package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-tool-pairs.js.map +1 -0
  684. package/node_modules/@earendil-works/pi-ai/dist/api/azure-openai-responses.d.ts.map +1 -1
  685. package/node_modules/@earendil-works/pi-ai/dist/api/azure-openai-responses.js +7 -3
  686. package/node_modules/@earendil-works/pi-ai/dist/api/azure-openai-responses.js.map +1 -1
  687. package/node_modules/@earendil-works/pi-ai/dist/api/bedrock-converse-stream.d.ts.map +1 -1
  688. package/node_modules/@earendil-works/pi-ai/dist/api/bedrock-converse-stream.js +64 -4
  689. package/node_modules/@earendil-works/pi-ai/dist/api/bedrock-converse-stream.js.map +1 -1
  690. package/node_modules/@earendil-works/pi-ai/dist/api/google-generative-ai.d.ts.map +1 -1
  691. package/node_modules/@earendil-works/pi-ai/dist/api/google-generative-ai.js +12 -2
  692. package/node_modules/@earendil-works/pi-ai/dist/api/google-generative-ai.js.map +1 -1
  693. package/node_modules/@earendil-works/pi-ai/dist/api/google-shared.d.ts.map +1 -1
  694. package/node_modules/@earendil-works/pi-ai/dist/api/google-shared.js +13 -6
  695. package/node_modules/@earendil-works/pi-ai/dist/api/google-shared.js.map +1 -1
  696. package/node_modules/@earendil-works/pi-ai/dist/api/google-vertex.d.ts.map +1 -1
  697. package/node_modules/@earendil-works/pi-ai/dist/api/google-vertex.js +12 -2
  698. package/node_modules/@earendil-works/pi-ai/dist/api/google-vertex.js.map +1 -1
  699. package/node_modules/@earendil-works/pi-ai/dist/api/mistral-conversations.d.ts.map +1 -1
  700. package/node_modules/@earendil-works/pi-ai/dist/api/mistral-conversations.js +19 -10
  701. package/node_modules/@earendil-works/pi-ai/dist/api/mistral-conversations.js.map +1 -1
  702. package/node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses/fallback-state.d.ts +24 -0
  703. package/node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses/fallback-state.d.ts.map +1 -0
  704. package/node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses/fallback-state.js +70 -0
  705. package/node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses/fallback-state.js.map +1 -0
  706. package/node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses.d.ts +2 -16
  707. package/node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses.d.ts.map +1 -1
  708. package/node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses.js +94 -105
  709. package/node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses.js.map +1 -1
  710. package/node_modules/@earendil-works/pi-ai/dist/api/openai-completions.d.ts.map +1 -1
  711. package/node_modules/@earendil-works/pi-ai/dist/api/openai-completions.js +19 -10
  712. package/node_modules/@earendil-works/pi-ai/dist/api/openai-completions.js.map +1 -1
  713. package/node_modules/@earendil-works/pi-ai/dist/api/openai-prompt-cache.d.ts +1 -0
  714. package/node_modules/@earendil-works/pi-ai/dist/api/openai-prompt-cache.d.ts.map +1 -1
  715. package/node_modules/@earendil-works/pi-ai/dist/api/openai-prompt-cache.js +7 -0
  716. package/node_modules/@earendil-works/pi-ai/dist/api/openai-prompt-cache.js.map +1 -1
  717. package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses-shared.d.ts.map +1 -1
  718. package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses-shared.js +11 -1
  719. package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses-shared.js.map +1 -1
  720. package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses.d.ts.map +1 -1
  721. package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses.js +9 -5
  722. package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses.js.map +1 -1
  723. package/node_modules/@earendil-works/pi-ai/dist/api/openrouter-images.js +3 -2
  724. package/node_modules/@earendil-works/pi-ai/dist/api/openrouter-images.js.map +1 -1
  725. package/node_modules/@earendil-works/pi-ai/dist/api/pi-messages.js +2 -2
  726. package/node_modules/@earendil-works/pi-ai/dist/api/pi-messages.js.map +1 -1
  727. package/node_modules/@earendil-works/pi-ai/dist/api/simple-options.d.ts.map +1 -1
  728. package/node_modules/@earendil-works/pi-ai/dist/api/simple-options.js +1 -0
  729. package/node_modules/@earendil-works/pi-ai/dist/api/simple-options.js.map +1 -1
  730. package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/openrouter.d.ts +3 -1
  731. package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/openrouter.d.ts.map +1 -1
  732. package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/openrouter.js +81 -26
  733. package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/openrouter.js.map +1 -1
  734. package/node_modules/@earendil-works/pi-ai/dist/auth/resolve.d.ts +2 -0
  735. package/node_modules/@earendil-works/pi-ai/dist/auth/resolve.d.ts.map +1 -1
  736. package/node_modules/@earendil-works/pi-ai/dist/auth/resolve.js +16 -8
  737. package/node_modules/@earendil-works/pi-ai/dist/auth/resolve.js.map +1 -1
  738. package/node_modules/@earendil-works/pi-ai/dist/index.d.ts +1 -0
  739. package/node_modules/@earendil-works/pi-ai/dist/index.d.ts.map +1 -1
  740. package/node_modules/@earendil-works/pi-ai/dist/index.js +1 -0
  741. package/node_modules/@earendil-works/pi-ai/dist/index.js.map +1 -1
  742. package/node_modules/@earendil-works/pi-ai/dist/model.d.ts +2 -1
  743. package/node_modules/@earendil-works/pi-ai/dist/model.d.ts.map +1 -1
  744. package/node_modules/@earendil-works/pi-ai/dist/model.js.map +1 -1
  745. package/node_modules/@earendil-works/pi-ai/dist/models.d.ts +14 -0
  746. package/node_modules/@earendil-works/pi-ai/dist/models.d.ts.map +1 -1
  747. package/node_modules/@earendil-works/pi-ai/dist/models.js +95 -19
  748. package/node_modules/@earendil-works/pi-ai/dist/models.js.map +1 -1
  749. package/node_modules/@earendil-works/pi-ai/dist/providers/data/.manifest.json +1 -1
  750. package/node_modules/@earendil-works/pi-ai/dist/providers/data/amazon-bedrock.json +1 -1
  751. package/node_modules/@earendil-works/pi-ai/dist/providers/data/azure-openai-responses.json +1 -1
  752. package/node_modules/@earendil-works/pi-ai/dist/providers/data/cloudflare-ai-gateway.json +1 -1
  753. package/node_modules/@earendil-works/pi-ai/dist/providers/data/fireworks.json +1 -1
  754. package/node_modules/@earendil-works/pi-ai/dist/providers/data/github-copilot.json +1 -1
  755. package/node_modules/@earendil-works/pi-ai/dist/providers/data/huggingface.json +1 -1
  756. package/node_modules/@earendil-works/pi-ai/dist/providers/data/mistral.json +1 -1
  757. package/node_modules/@earendil-works/pi-ai/dist/providers/data/openai-codex.json +1 -1
  758. package/node_modules/@earendil-works/pi-ai/dist/providers/data/openai.json +1 -1
  759. package/node_modules/@earendil-works/pi-ai/dist/providers/data/opencode-go.json +1 -1
  760. package/node_modules/@earendil-works/pi-ai/dist/providers/data/opencode.json +1 -1
  761. package/node_modules/@earendil-works/pi-ai/dist/providers/data/openrouter.json +1 -1
  762. package/node_modules/@earendil-works/pi-ai/dist/providers/data/qwen-token-plan-cn.json +1 -1
  763. package/node_modules/@earendil-works/pi-ai/dist/providers/data/qwen-token-plan.json +1 -1
  764. package/node_modules/@earendil-works/pi-ai/dist/providers/data/together.json +1 -1
  765. package/node_modules/@earendil-works/pi-ai/dist/providers/data/vercel-ai-gateway.json +1 -1
  766. package/node_modules/@earendil-works/pi-ai/dist/providers/data/zai-coding-cn.json +1 -1
  767. package/node_modules/@earendil-works/pi-ai/dist/providers/data/zai.json +1 -1
  768. package/node_modules/@earendil-works/pi-ai/dist/providers/faux.d.ts.map +1 -1
  769. package/node_modules/@earendil-works/pi-ai/dist/providers/faux.js +4 -1
  770. package/node_modules/@earendil-works/pi-ai/dist/providers/faux.js.map +1 -1
  771. package/node_modules/@earendil-works/pi-ai/dist/providers/opencode-go.js +1 -1
  772. package/node_modules/@earendil-works/pi-ai/dist/providers/opencode-go.js.map +1 -1
  773. package/node_modules/@earendil-works/pi-ai/dist/types.d.ts +18 -1
  774. package/node_modules/@earendil-works/pi-ai/dist/types.d.ts.map +1 -1
  775. package/node_modules/@earendil-works/pi-ai/dist/types.js.map +1 -1
  776. package/node_modules/@earendil-works/pi-ai/dist/utils/error-body.d.ts.map +1 -1
  777. package/node_modules/@earendil-works/pi-ai/dist/utils/error-body.js +23 -4
  778. package/node_modules/@earendil-works/pi-ai/dist/utils/error-body.js.map +1 -1
  779. package/node_modules/@earendil-works/pi-ai/dist/utils/prompt-cache-ttl.d.ts.map +1 -1
  780. package/node_modules/@earendil-works/pi-ai/dist/utils/prompt-cache-ttl.js +10 -1
  781. package/node_modules/@earendil-works/pi-ai/dist/utils/prompt-cache-ttl.js.map +1 -1
  782. package/node_modules/@earendil-works/pi-ai/dist/utils/provider-retry.d.ts +3 -0
  783. package/node_modules/@earendil-works/pi-ai/dist/utils/provider-retry.d.ts.map +1 -1
  784. package/node_modules/@earendil-works/pi-ai/dist/utils/provider-retry.js +13 -12
  785. package/node_modules/@earendil-works/pi-ai/dist/utils/provider-retry.js.map +1 -1
  786. package/node_modules/@earendil-works/pi-ai/dist/utils/retry-hint.d.ts +24 -0
  787. package/node_modules/@earendil-works/pi-ai/dist/utils/retry-hint.d.ts.map +1 -0
  788. package/node_modules/@earendil-works/pi-ai/dist/utils/retry-hint.js +233 -0
  789. package/node_modules/@earendil-works/pi-ai/dist/utils/retry-hint.js.map +1 -0
  790. package/node_modules/@earendil-works/pi-ai/dist/utils/unavailable-tool-text.d.ts +3 -0
  791. package/node_modules/@earendil-works/pi-ai/dist/utils/unavailable-tool-text.d.ts.map +1 -0
  792. package/node_modules/@earendil-works/pi-ai/dist/utils/unavailable-tool-text.js +36 -0
  793. package/node_modules/@earendil-works/pi-ai/dist/utils/unavailable-tool-text.js.map +1 -0
  794. package/node_modules/@earendil-works/pi-ai/package.json +10 -6
  795. package/node_modules/@earendil-works/pi-client/CHANGELOG.md +7 -0
  796. package/node_modules/@earendil-works/pi-client/README.md +64 -0
  797. package/node_modules/@earendil-works/pi-client/dist/client.d.ts +25 -0
  798. package/node_modules/@earendil-works/pi-client/dist/client.d.ts.map +1 -0
  799. package/node_modules/@earendil-works/pi-client/dist/client.js +386 -0
  800. package/node_modules/@earendil-works/pi-client/dist/client.js.map +1 -0
  801. package/node_modules/@earendil-works/pi-client/dist/connection.d.ts +25 -0
  802. package/node_modules/@earendil-works/pi-client/dist/connection.d.ts.map +1 -0
  803. package/node_modules/@earendil-works/pi-client/dist/connection.js +204 -0
  804. package/node_modules/@earendil-works/pi-client/dist/connection.js.map +1 -0
  805. package/node_modules/@earendil-works/pi-client/dist/errors.d.ts +23 -0
  806. package/node_modules/@earendil-works/pi-client/dist/errors.d.ts.map +1 -0
  807. package/node_modules/@earendil-works/pi-client/dist/errors.js +42 -0
  808. package/node_modules/@earendil-works/pi-client/dist/errors.js.map +1 -0
  809. package/node_modules/@earendil-works/pi-client/dist/index.d.ts +6 -0
  810. package/node_modules/@earendil-works/pi-client/dist/index.d.ts.map +1 -0
  811. package/node_modules/@earendil-works/pi-client/dist/index.js +3 -0
  812. package/node_modules/@earendil-works/pi-client/dist/index.js.map +1 -0
  813. package/node_modules/@earendil-works/pi-client/dist/promise.d.ts +8 -0
  814. package/node_modules/@earendil-works/pi-client/dist/promise.d.ts.map +1 -0
  815. package/node_modules/@earendil-works/pi-client/dist/promise.js +11 -0
  816. package/node_modules/@earendil-works/pi-client/dist/promise.js.map +1 -0
  817. package/node_modules/@earendil-works/pi-client/dist/session-handle.d.ts +54 -0
  818. package/node_modules/@earendil-works/pi-client/dist/session-handle.d.ts.map +1 -0
  819. package/node_modules/@earendil-works/pi-client/dist/session-handle.js +50 -0
  820. package/node_modules/@earendil-works/pi-client/dist/session-handle.js.map +1 -0
  821. package/node_modules/@earendil-works/pi-client/dist/state.d.ts +22 -0
  822. package/node_modules/@earendil-works/pi-client/dist/state.d.ts.map +1 -0
  823. package/node_modules/@earendil-works/pi-client/dist/state.js +149 -0
  824. package/node_modules/@earendil-works/pi-client/dist/state.js.map +1 -0
  825. package/node_modules/@earendil-works/pi-client/dist/transport.d.ts +17 -0
  826. package/node_modules/@earendil-works/pi-client/dist/transport.d.ts.map +1 -0
  827. package/node_modules/@earendil-works/pi-client/dist/transport.js +2 -0
  828. package/node_modules/@earendil-works/pi-client/dist/transport.js.map +1 -0
  829. package/node_modules/@earendil-works/pi-client/dist/types.d.ts +23 -0
  830. package/node_modules/@earendil-works/pi-client/dist/types.d.ts.map +1 -0
  831. package/node_modules/@earendil-works/pi-client/dist/types.js +2 -0
  832. package/node_modules/@earendil-works/pi-client/dist/types.js.map +1 -0
  833. package/node_modules/@earendil-works/pi-client/dist/unix.d.ts +8 -0
  834. package/node_modules/@earendil-works/pi-client/dist/unix.d.ts.map +1 -0
  835. package/node_modules/@earendil-works/pi-client/dist/unix.js +151 -0
  836. package/node_modules/@earendil-works/pi-client/dist/unix.js.map +1 -0
  837. package/node_modules/@earendil-works/pi-client/package.json +56 -0
  838. package/node_modules/@earendil-works/pi-protocol/README.md +68 -0
  839. package/node_modules/@earendil-works/pi-protocol/dist/cbor/decoder.d.ts +4 -0
  840. package/node_modules/@earendil-works/pi-protocol/dist/cbor/decoder.d.ts.map +1 -0
  841. package/node_modules/@earendil-works/pi-protocol/dist/cbor/decoder.js +163 -0
  842. package/node_modules/@earendil-works/pi-protocol/dist/cbor/decoder.js.map +1 -0
  843. package/node_modules/@earendil-works/pi-protocol/dist/cbor/encoder.d.ts +4 -0
  844. package/node_modules/@earendil-works/pi-protocol/dist/cbor/encoder.d.ts.map +1 -0
  845. package/node_modules/@earendil-works/pi-protocol/dist/cbor/encoder.js +199 -0
  846. package/node_modules/@earendil-works/pi-protocol/dist/cbor/encoder.js.map +1 -0
  847. package/node_modules/@earendil-works/pi-protocol/dist/cbor/index.d.ts +4 -0
  848. package/node_modules/@earendil-works/pi-protocol/dist/cbor/index.d.ts.map +1 -0
  849. package/node_modules/@earendil-works/pi-protocol/dist/cbor/index.js +4 -0
  850. package/node_modules/@earendil-works/pi-protocol/dist/cbor/index.js.map +1 -0
  851. package/node_modules/@earendil-works/pi-protocol/dist/cbor/options.d.ts +26 -0
  852. package/node_modules/@earendil-works/pi-protocol/dist/cbor/options.d.ts.map +1 -0
  853. package/node_modules/@earendil-works/pi-protocol/dist/cbor/options.js +29 -0
  854. package/node_modules/@earendil-works/pi-protocol/dist/cbor/options.js.map +1 -0
  855. package/node_modules/@earendil-works/pi-protocol/dist/codec.d.ts +29 -0
  856. package/node_modules/@earendil-works/pi-protocol/dist/codec.d.ts.map +1 -0
  857. package/node_modules/@earendil-works/pi-protocol/dist/codec.js +140 -0
  858. package/node_modules/@earendil-works/pi-protocol/dist/codec.js.map +1 -0
  859. package/node_modules/@earendil-works/pi-protocol/dist/framing.d.ts +29 -0
  860. package/node_modules/@earendil-works/pi-protocol/dist/framing.d.ts.map +1 -0
  861. package/node_modules/@earendil-works/pi-protocol/dist/framing.js +152 -0
  862. package/node_modules/@earendil-works/pi-protocol/dist/framing.js.map +1 -0
  863. package/node_modules/@earendil-works/pi-protocol/dist/index.d.ts +5 -0
  864. package/node_modules/@earendil-works/pi-protocol/dist/index.d.ts.map +1 -0
  865. package/node_modules/@earendil-works/pi-protocol/dist/index.js +5 -0
  866. package/node_modules/@earendil-works/pi-protocol/dist/index.js.map +1 -0
  867. package/node_modules/@earendil-works/pi-protocol/dist/schemas.d.ts +13818 -0
  868. package/node_modules/@earendil-works/pi-protocol/dist/schemas.d.ts.map +1 -0
  869. package/node_modules/@earendil-works/pi-protocol/dist/schemas.js +382 -0
  870. package/node_modules/@earendil-works/pi-protocol/dist/schemas.js.map +1 -0
  871. package/node_modules/@earendil-works/pi-protocol/package.json +48 -0
  872. package/node_modules/@earendil-works/pi-pty/package.json +2 -2
  873. package/node_modules/@earendil-works/pi-tui/README.md +77 -14
  874. package/node_modules/@earendil-works/pi-tui/dist/TuiAltScreen.d.ts +83 -0
  875. package/node_modules/@earendil-works/pi-tui/dist/TuiAltScreen.d.ts.map +1 -0
  876. package/node_modules/@earendil-works/pi-tui/dist/TuiAltScreen.js +687 -0
  877. package/node_modules/@earendil-works/pi-tui/dist/TuiAltScreen.js.map +1 -0
  878. package/node_modules/@earendil-works/pi-tui/dist/TuiMainScreen.d.ts +5 -0
  879. package/node_modules/@earendil-works/pi-tui/dist/TuiMainScreen.d.ts.map +1 -0
  880. package/node_modules/@earendil-works/pi-tui/dist/TuiMainScreen.js +5 -0
  881. package/node_modules/@earendil-works/pi-tui/dist/TuiMainScreen.js.map +1 -0
  882. package/node_modules/@earendil-works/pi-tui/dist/components/alt-screen-flash.d.ts +13 -0
  883. package/node_modules/@earendil-works/pi-tui/dist/components/alt-screen-flash.d.ts.map +1 -0
  884. package/node_modules/@earendil-works/pi-tui/dist/components/alt-screen-flash.js +36 -0
  885. package/node_modules/@earendil-works/pi-tui/dist/components/alt-screen-flash.js.map +1 -0
  886. package/node_modules/@earendil-works/pi-tui/dist/components/h-stack.d.ts +7 -0
  887. package/node_modules/@earendil-works/pi-tui/dist/components/h-stack.d.ts.map +1 -0
  888. package/node_modules/@earendil-works/pi-tui/dist/components/h-stack.js +43 -0
  889. package/node_modules/@earendil-works/pi-tui/dist/components/h-stack.js.map +1 -0
  890. package/node_modules/@earendil-works/pi-tui/dist/components/image.d.ts.map +1 -1
  891. package/node_modules/@earendil-works/pi-tui/dist/components/image.js +4 -4
  892. package/node_modules/@earendil-works/pi-tui/dist/components/image.js.map +1 -1
  893. package/node_modules/@earendil-works/pi-tui/dist/components/markdown.d.ts +2 -0
  894. package/node_modules/@earendil-works/pi-tui/dist/components/markdown.d.ts.map +1 -1
  895. package/node_modules/@earendil-works/pi-tui/dist/components/markdown.js +3 -2
  896. package/node_modules/@earendil-works/pi-tui/dist/components/markdown.js.map +1 -1
  897. package/node_modules/@earendil-works/pi-tui/dist/components/scroll-view.d.ts +51 -0
  898. package/node_modules/@earendil-works/pi-tui/dist/components/scroll-view.d.ts.map +1 -0
  899. package/node_modules/@earendil-works/pi-tui/dist/components/scroll-view.js +163 -0
  900. package/node_modules/@earendil-works/pi-tui/dist/components/scroll-view.js.map +1 -0
  901. package/node_modules/@earendil-works/pi-tui/dist/components/settings-list.d.ts.map +1 -1
  902. package/node_modules/@earendil-works/pi-tui/dist/components/settings-list.js +3 -6
  903. package/node_modules/@earendil-works/pi-tui/dist/components/settings-list.js.map +1 -1
  904. package/node_modules/@earendil-works/pi-tui/dist/components/stack.d.ts +32 -0
  905. package/node_modules/@earendil-works/pi-tui/dist/components/stack.d.ts.map +1 -0
  906. package/node_modules/@earendil-works/pi-tui/dist/components/stack.js +109 -0
  907. package/node_modules/@earendil-works/pi-tui/dist/components/stack.js.map +1 -0
  908. package/node_modules/@earendil-works/pi-tui/dist/components/v-stack.d.ts +8 -0
  909. package/node_modules/@earendil-works/pi-tui/dist/components/v-stack.d.ts.map +1 -0
  910. package/node_modules/@earendil-works/pi-tui/dist/components/v-stack.js +21 -0
  911. package/node_modules/@earendil-works/pi-tui/dist/components/v-stack.js.map +1 -0
  912. package/node_modules/@earendil-works/pi-tui/dist/index.d.ts +10 -4
  913. package/node_modules/@earendil-works/pi-tui/dist/index.d.ts.map +1 -1
  914. package/node_modules/@earendil-works/pi-tui/dist/index.js +10 -4
  915. package/node_modules/@earendil-works/pi-tui/dist/index.js.map +1 -1
  916. package/node_modules/@earendil-works/pi-tui/dist/keybindings.d.ts +30 -0
  917. package/node_modules/@earendil-works/pi-tui/dist/keybindings.d.ts.map +1 -1
  918. package/node_modules/@earendil-works/pi-tui/dist/keybindings.js +18 -0
  919. package/node_modules/@earendil-works/pi-tui/dist/keybindings.js.map +1 -1
  920. package/node_modules/@earendil-works/pi-tui/dist/layout-node.d.ts +40 -0
  921. package/node_modules/@earendil-works/pi-tui/dist/layout-node.d.ts.map +1 -0
  922. package/node_modules/@earendil-works/pi-tui/dist/layout-node.js +6 -0
  923. package/node_modules/@earendil-works/pi-tui/dist/layout-node.js.map +1 -0
  924. package/node_modules/@earendil-works/pi-tui/dist/layout.d.ts +40 -0
  925. package/node_modules/@earendil-works/pi-tui/dist/layout.d.ts.map +1 -0
  926. package/node_modules/@earendil-works/pi-tui/dist/layout.js +315 -0
  927. package/node_modules/@earendil-works/pi-tui/dist/layout.js.map +1 -0
  928. package/node_modules/@earendil-works/pi-tui/dist/mux.js +1 -1
  929. package/node_modules/@earendil-works/pi-tui/dist/mux.js.map +1 -1
  930. package/node_modules/@earendil-works/pi-tui/dist/terminal-image.d.ts +10 -0
  931. package/node_modules/@earendil-works/pi-tui/dist/terminal-image.d.ts.map +1 -1
  932. package/node_modules/@earendil-works/pi-tui/dist/terminal-image.js +61 -3
  933. package/node_modules/@earendil-works/pi-tui/dist/terminal-image.js.map +1 -1
  934. package/node_modules/@earendil-works/pi-tui/dist/terminal-text.d.ts +1 -0
  935. package/node_modules/@earendil-works/pi-tui/dist/terminal-text.d.ts.map +1 -1
  936. package/node_modules/@earendil-works/pi-tui/dist/terminal-text.js +12 -2
  937. package/node_modules/@earendil-works/pi-tui/dist/terminal-text.js.map +1 -1
  938. package/node_modules/@earendil-works/pi-tui/dist/tui.d.ts +37 -16
  939. package/node_modules/@earendil-works/pi-tui/dist/tui.d.ts.map +1 -1
  940. package/node_modules/@earendil-works/pi-tui/dist/tui.js +89 -21
  941. package/node_modules/@earendil-works/pi-tui/dist/tui.js.map +1 -1
  942. package/node_modules/@earendil-works/pi-tui/dist/utils.d.ts +10 -0
  943. package/node_modules/@earendil-works/pi-tui/dist/utils.d.ts.map +1 -1
  944. package/node_modules/@earendil-works/pi-tui/dist/utils.js +95 -4
  945. package/node_modules/@earendil-works/pi-tui/dist/utils.js.map +1 -1
  946. package/node_modules/@earendil-works/pi-tui/package.json +2 -2
  947. package/node_modules/typebox/build/compile/validator.d.mts +3 -11
  948. package/node_modules/typebox/build/compile/validator.mjs +6 -36
  949. package/node_modules/typebox/build/error/errors.d.mts +1 -7
  950. package/node_modules/typebox/build/format/_idna.mjs +36 -6
  951. package/node_modules/typebox/build/format/_puny.mjs +4 -1
  952. package/node_modules/typebox/build/format/uuid.d.mts +2 -2
  953. package/node_modules/typebox/build/format/uuid.mjs +3 -3
  954. package/node_modules/typebox/build/guard/emit.d.mts +0 -4
  955. package/node_modules/typebox/build/guard/emit.mjs +0 -8
  956. package/node_modules/typebox/build/guard/guard.d.mts +5 -9
  957. package/node_modules/typebox/build/guard/guard.mjs +10 -15
  958. package/node_modules/typebox/build/guard/string.mjs +16 -4
  959. package/node_modules/typebox/build/schema/engine/_functions.mjs +34 -15
  960. package/node_modules/typebox/build/schema/engine/boolean.d.mts +3 -3
  961. package/node_modules/typebox/build/schema/engine/boolean.mjs +4 -4
  962. package/node_modules/typebox/build/schema/engine/index.d.mts +0 -1
  963. package/node_modules/typebox/build/schema/engine/index.mjs +0 -1
  964. package/node_modules/typebox/build/schema/engine/schema.mjs +6 -11
  965. package/node_modules/typebox/build/schema/engine/type.mjs +14 -18
  966. package/node_modules/typebox/build/schema/types/dependencies.mjs +1 -1
  967. package/node_modules/typebox/build/schema/types/index.d.mts +0 -1
  968. package/node_modules/typebox/build/schema/types/index.mjs +0 -1
  969. package/node_modules/typebox/build/schema/types/schema.d.mts +1 -1
  970. package/node_modules/typebox/build/schema/types/schema.mjs +2 -2
  971. package/node_modules/typebox/build/system/locale/ar_001.mjs +0 -1
  972. package/node_modules/typebox/build/system/locale/bn_BD.mjs +0 -1
  973. package/node_modules/typebox/build/system/locale/cs_CZ.mjs +0 -1
  974. package/node_modules/typebox/build/system/locale/de_DE.mjs +0 -1
  975. package/node_modules/typebox/build/system/locale/el_GR.mjs +0 -1
  976. package/node_modules/typebox/build/system/locale/en_US.mjs +0 -1
  977. package/node_modules/typebox/build/system/locale/es_419.mjs +0 -1
  978. package/node_modules/typebox/build/system/locale/es_AR.mjs +0 -1
  979. package/node_modules/typebox/build/system/locale/es_ES.mjs +0 -1
  980. package/node_modules/typebox/build/system/locale/es_MX.mjs +0 -1
  981. package/node_modules/typebox/build/system/locale/fa_IR.mjs +0 -1
  982. package/node_modules/typebox/build/system/locale/fil_PH.mjs +0 -1
  983. package/node_modules/typebox/build/system/locale/fr_CA.mjs +0 -1
  984. package/node_modules/typebox/build/system/locale/fr_FR.mjs +0 -1
  985. package/node_modules/typebox/build/system/locale/ha_NG.mjs +0 -1
  986. package/node_modules/typebox/build/system/locale/hi_IN.mjs +0 -1
  987. package/node_modules/typebox/build/system/locale/hu_HU.mjs +0 -1
  988. package/node_modules/typebox/build/system/locale/id_ID.mjs +0 -1
  989. package/node_modules/typebox/build/system/locale/it_IT.mjs +0 -1
  990. package/node_modules/typebox/build/system/locale/ja_JP.mjs +0 -1
  991. package/node_modules/typebox/build/system/locale/ko_KR.mjs +0 -1
  992. package/node_modules/typebox/build/system/locale/ms_MY.mjs +0 -1
  993. package/node_modules/typebox/build/system/locale/nl_NL.mjs +0 -1
  994. package/node_modules/typebox/build/system/locale/pl_PL.mjs +0 -1
  995. package/node_modules/typebox/build/system/locale/pt_BR.mjs +0 -1
  996. package/node_modules/typebox/build/system/locale/pt_PT.mjs +0 -1
  997. package/node_modules/typebox/build/system/locale/ro_RO.mjs +0 -1
  998. package/node_modules/typebox/build/system/locale/ru_RU.mjs +0 -1
  999. package/node_modules/typebox/build/system/locale/sv_SE.mjs +0 -1
  1000. package/node_modules/typebox/build/system/locale/sw_TZ.mjs +0 -1
  1001. package/node_modules/typebox/build/system/locale/th_TH.mjs +0 -1
  1002. package/node_modules/typebox/build/system/locale/tr_TR.mjs +0 -1
  1003. package/node_modules/typebox/build/system/locale/uk_UA.mjs +0 -1
  1004. package/node_modules/typebox/build/system/locale/ur_PK.mjs +0 -1
  1005. package/node_modules/typebox/build/system/locale/vi_VN.mjs +0 -1
  1006. package/node_modules/typebox/build/system/locale/yo_NG.mjs +0 -1
  1007. package/node_modules/typebox/build/system/locale/zh_Hans.mjs +0 -1
  1008. package/node_modules/typebox/build/system/locale/zh_Hant.mjs +0 -1
  1009. package/node_modules/typebox/build/system/memory/clone.d.mts +2 -3
  1010. package/node_modules/typebox/build/system/memory/clone.mjs +73 -26
  1011. package/node_modules/typebox/build/system/settings/settings.d.mts +15 -0
  1012. package/node_modules/typebox/build/system/settings/settings.mjs +3 -1
  1013. package/node_modules/typebox/build/type/action/_add_immutable.d.mts +11 -0
  1014. package/node_modules/typebox/build/type/action/_add_immutable.mjs +11 -0
  1015. package/node_modules/typebox/build/type/action/_add_optional.d.mts +11 -0
  1016. package/node_modules/typebox/build/type/action/_add_optional.mjs +11 -0
  1017. package/node_modules/typebox/build/type/action/_add_readonly.d.mts +11 -0
  1018. package/node_modules/typebox/build/type/action/_add_readonly.mjs +11 -0
  1019. package/node_modules/typebox/build/type/action/_remove_immutable.d.mts +11 -0
  1020. package/node_modules/typebox/build/type/action/_remove_immutable.mjs +11 -0
  1021. package/node_modules/typebox/build/type/action/_remove_optional.d.mts +11 -0
  1022. package/node_modules/typebox/build/type/action/_remove_optional.mjs +11 -0
  1023. package/node_modules/typebox/build/type/action/_remove_readonly.d.mts +11 -0
  1024. package/node_modules/typebox/build/type/action/_remove_readonly.mjs +11 -0
  1025. package/node_modules/typebox/build/type/action/conditional.d.mts +2 -3
  1026. package/node_modules/typebox/build/type/action/conditional.mjs +2 -1
  1027. package/node_modules/typebox/build/type/action/index.d.mts +7 -4
  1028. package/node_modules/typebox/build/type/action/index.mjs +7 -4
  1029. package/node_modules/typebox/build/type/action/mapped.d.mts +2 -3
  1030. package/node_modules/typebox/build/type/action/mapped.mjs +2 -1
  1031. package/node_modules/typebox/build/type/action/module.d.mts +8 -7
  1032. package/node_modules/typebox/build/type/action/module.mjs +7 -6
  1033. package/node_modules/typebox/build/type/action/readonly_object.mjs +3 -0
  1034. package/node_modules/typebox/build/type/action/with.d.mts +11 -0
  1035. package/node_modules/typebox/build/type/action/with.mjs +11 -0
  1036. package/node_modules/typebox/build/type/engine/call/distribute_arguments.mjs +1 -1
  1037. package/node_modules/typebox/build/type/engine/call/instantiate.d.mts +1 -3
  1038. package/node_modules/typebox/build/type/engine/call/instantiate.mjs +3 -2
  1039. package/node_modules/typebox/build/type/engine/call/resolve_arguments.mjs +2 -2
  1040. package/node_modules/typebox/build/type/engine/constructor_parameters/instantiate.d.mts +3 -4
  1041. package/node_modules/typebox/build/type/engine/constructor_parameters/instantiate.mjs +2 -1
  1042. package/node_modules/typebox/build/type/engine/cyclic/candidates.d.mts +2 -3
  1043. package/node_modules/typebox/build/type/engine/cyclic/candidates.mjs +3 -6
  1044. package/node_modules/typebox/build/type/engine/cyclic/check.d.mts +6 -9
  1045. package/node_modules/typebox/build/type/engine/cyclic/check.mjs +10 -16
  1046. package/node_modules/typebox/build/type/engine/cyclic/dependencies.d.mts +1 -4
  1047. package/node_modules/typebox/build/type/engine/cyclic/dependencies.mjs +9 -15
  1048. package/node_modules/typebox/build/type/engine/cyclic/extends.d.mts +1 -4
  1049. package/node_modules/typebox/build/type/engine/cyclic/extends.mjs +8 -14
  1050. package/node_modules/typebox/build/type/engine/cyclic/instantiate.d.mts +2 -5
  1051. package/node_modules/typebox/build/type/engine/cyclic/instantiate.mjs +3 -2
  1052. package/node_modules/typebox/build/type/engine/enum/index.d.mts +0 -1
  1053. package/node_modules/typebox/build/type/engine/enum/index.mjs +0 -1
  1054. package/node_modules/typebox/build/type/engine/evaluate/broaden.d.mts +1 -2
  1055. package/node_modules/typebox/build/type/engine/evaluate/broaden.mjs +2 -6
  1056. package/node_modules/typebox/build/type/engine/evaluate/composite.d.mts +10 -6
  1057. package/node_modules/typebox/build/type/engine/evaluate/composite.mjs +10 -6
  1058. package/node_modules/typebox/build/type/engine/evaluate/distribute.d.mts +2 -1
  1059. package/node_modules/typebox/build/type/engine/evaluate/distribute.mjs +3 -3
  1060. package/node_modules/typebox/build/type/engine/evaluate/evaluate.d.mts +17 -5
  1061. package/node_modules/typebox/build/type/engine/evaluate/evaluate.mjs +34 -8
  1062. package/node_modules/typebox/build/type/engine/exclude/operation.d.mts +5 -6
  1063. package/node_modules/typebox/build/type/engine/exclude/operation.mjs +11 -12
  1064. package/node_modules/typebox/build/type/engine/extract/operation.d.mts +5 -6
  1065. package/node_modules/typebox/build/type/engine/extract/operation.mjs +11 -12
  1066. package/node_modules/typebox/build/type/engine/immutable/instantiate_add.d.mts +10 -0
  1067. package/node_modules/typebox/build/type/engine/immutable/instantiate_add.mjs +14 -0
  1068. package/node_modules/typebox/build/type/engine/immutable/instantiate_remove.d.mts +10 -0
  1069. package/node_modules/typebox/build/type/engine/immutable/instantiate_remove.mjs +14 -0
  1070. package/node_modules/typebox/build/type/engine/index.d.mts +2 -2
  1071. package/node_modules/typebox/build/type/engine/index.mjs +2 -2
  1072. package/node_modules/typebox/build/type/engine/indexable/from_dependent.d.mts +5 -0
  1073. package/node_modules/typebox/build/type/engine/indexable/from_dependent.mjs +8 -0
  1074. package/node_modules/typebox/build/type/engine/indexable/from_enum.d.mts +3 -3
  1075. package/node_modules/typebox/build/type/engine/indexable/from_enum.mjs +4 -4
  1076. package/node_modules/typebox/build/type/engine/indexable/from_template_literal.d.mts +2 -2
  1077. package/node_modules/typebox/build/type/engine/indexable/from_template_literal.mjs +3 -3
  1078. package/node_modules/typebox/build/type/engine/indexable/from_type.d.mts +3 -1
  1079. package/node_modules/typebox/build/type/engine/indexable/from_type.mjs +9 -6
  1080. package/node_modules/typebox/build/type/engine/indexed/instantiate.d.mts +2 -1
  1081. package/node_modules/typebox/build/type/engine/indexed/instantiate.mjs +5 -2
  1082. package/node_modules/typebox/build/type/engine/instantiate.d.mts +44 -31
  1083. package/node_modules/typebox/build/type/engine/instantiate.mjs +82 -83
  1084. package/node_modules/typebox/build/type/engine/interface/instantiate.d.mts +3 -6
  1085. package/node_modules/typebox/build/type/engine/intrinsics/from_template_literal.d.mts +2 -2
  1086. package/node_modules/typebox/build/type/engine/intrinsics/from_template_literal.mjs +3 -3
  1087. package/node_modules/typebox/build/type/engine/keyof/instantiate.d.mts +2 -1
  1088. package/node_modules/typebox/build/type/engine/keyof/instantiate.mjs +5 -1
  1089. package/node_modules/typebox/build/type/engine/mapped/mapped_operation.d.mts +4 -4
  1090. package/node_modules/typebox/build/type/engine/mapped/mapped_operation.mjs +3 -3
  1091. package/node_modules/typebox/build/type/engine/mapped/mapped_variants.d.mts +5 -4
  1092. package/node_modules/typebox/build/type/engine/mapped/mapped_variants.mjs +10 -5
  1093. package/node_modules/typebox/build/type/engine/module/instantiate.d.mts +7 -9
  1094. package/node_modules/typebox/build/type/engine/module/instantiate.mjs +17 -15
  1095. package/node_modules/typebox/build/type/engine/object/from_dependent.d.mts +5 -0
  1096. package/node_modules/typebox/build/type/engine/object/from_dependent.mjs +8 -0
  1097. package/node_modules/typebox/build/type/engine/object/from_type.d.mts +3 -1
  1098. package/node_modules/typebox/build/type/engine/object/from_type.mjs +8 -5
  1099. package/node_modules/typebox/build/type/engine/object/from_union.mjs +2 -2
  1100. package/node_modules/typebox/build/type/engine/optional/instantiate_add.d.mts +10 -0
  1101. package/node_modules/typebox/build/type/engine/optional/instantiate_add.mjs +14 -0
  1102. package/node_modules/typebox/build/type/engine/optional/instantiate_remove.d.mts +10 -0
  1103. package/node_modules/typebox/build/type/engine/optional/instantiate_remove.mjs +14 -0
  1104. package/node_modules/typebox/build/type/engine/parameters/instantiate.d.mts +3 -4
  1105. package/node_modules/typebox/build/type/engine/parameters/instantiate.mjs +2 -1
  1106. package/node_modules/typebox/build/type/engine/partial/from_dependent.d.mts +5 -0
  1107. package/node_modules/typebox/build/type/engine/partial/from_dependent.mjs +8 -0
  1108. package/node_modules/typebox/build/type/engine/partial/from_intersect.d.mts +1 -1
  1109. package/node_modules/typebox/build/type/engine/partial/from_intersect.mjs +3 -2
  1110. package/node_modules/typebox/build/type/engine/partial/from_object.d.mts +2 -2
  1111. package/node_modules/typebox/build/type/engine/partial/from_object.mjs +2 -2
  1112. package/node_modules/typebox/build/type/engine/partial/from_type.d.mts +3 -1
  1113. package/node_modules/typebox/build/type/engine/partial/from_type.mjs +7 -4
  1114. package/node_modules/typebox/build/type/engine/priority/index.d.mts +1 -0
  1115. package/node_modules/typebox/build/type/engine/priority/index.mjs +1 -0
  1116. package/node_modules/typebox/build/type/engine/priority/priority.d.mts +20 -0
  1117. package/node_modules/typebox/build/type/engine/priority/priority.mjs +28 -0
  1118. package/node_modules/typebox/build/type/engine/readonly/instantiate_add.d.mts +10 -0
  1119. package/node_modules/typebox/build/type/engine/readonly/instantiate_add.mjs +14 -0
  1120. package/node_modules/typebox/build/type/engine/readonly/instantiate_remove.d.mts +10 -0
  1121. package/node_modules/typebox/build/type/engine/readonly/instantiate_remove.mjs +14 -0
  1122. package/node_modules/typebox/build/type/engine/readonly_object/from_array.d.mts +2 -2
  1123. package/node_modules/typebox/build/type/engine/readonly_object/from_array.mjs +2 -2
  1124. package/node_modules/typebox/build/type/engine/readonly_object/from_dependent.d.mts +5 -0
  1125. package/node_modules/typebox/build/type/engine/readonly_object/from_dependent.mjs +8 -0
  1126. package/node_modules/typebox/build/type/engine/readonly_object/from_intersect.d.mts +1 -1
  1127. package/node_modules/typebox/build/type/engine/readonly_object/from_intersect.mjs +3 -2
  1128. package/node_modules/typebox/build/type/engine/readonly_object/from_object.d.mts +2 -2
  1129. package/node_modules/typebox/build/type/engine/readonly_object/from_object.mjs +2 -2
  1130. package/node_modules/typebox/build/type/engine/readonly_object/from_tuple.d.mts +2 -2
  1131. package/node_modules/typebox/build/type/engine/readonly_object/from_tuple.mjs +2 -2
  1132. package/node_modules/typebox/build/type/engine/readonly_object/from_type.d.mts +3 -1
  1133. package/node_modules/typebox/build/type/engine/readonly_object/from_type.mjs +8 -5
  1134. package/node_modules/typebox/build/type/engine/record/from_key_enum.d.mts +2 -2
  1135. package/node_modules/typebox/build/type/engine/record/from_key_enum.mjs +2 -2
  1136. package/node_modules/typebox/build/type/engine/record/from_key_template_literal.d.mts +2 -2
  1137. package/node_modules/typebox/build/type/engine/record/from_key_template_literal.mjs +2 -2
  1138. package/node_modules/typebox/build/type/engine/ref/instantiate.d.mts +3 -3
  1139. package/node_modules/typebox/build/type/engine/ref/instantiate.mjs +6 -6
  1140. package/node_modules/typebox/build/type/engine/required/from_dependent.d.mts +5 -0
  1141. package/node_modules/typebox/build/type/engine/required/from_dependent.mjs +8 -0
  1142. package/node_modules/typebox/build/type/engine/required/from_intersect.d.mts +1 -1
  1143. package/node_modules/typebox/build/type/engine/required/from_intersect.mjs +3 -2
  1144. package/node_modules/typebox/build/type/engine/required/from_object.d.mts +2 -2
  1145. package/node_modules/typebox/build/type/engine/required/from_object.mjs +2 -2
  1146. package/node_modules/typebox/build/type/engine/required/from_type.d.mts +3 -1
  1147. package/node_modules/typebox/build/type/engine/required/from_type.mjs +7 -4
  1148. package/node_modules/typebox/build/type/engine/template_literal/decode.mjs +3 -3
  1149. package/node_modules/typebox/build/type/engine/template_literal/encode.d.mts +2 -2
  1150. package/node_modules/typebox/build/type/engine/template_literal/encode.mjs +6 -6
  1151. package/node_modules/typebox/build/type/engine/template_literal/is_finite.mjs +1 -1
  1152. package/node_modules/typebox/build/type/engine/template_literal/is_pattern.mjs +1 -0
  1153. package/node_modules/typebox/build/type/engine/this/expand_this.d.mts +1 -4
  1154. package/node_modules/typebox/build/type/engine/this/expand_this.mjs +7 -13
  1155. package/node_modules/typebox/build/type/engine/with/instantiate.d.mts +8 -0
  1156. package/node_modules/typebox/build/type/engine/{options → with}/instantiate.mjs +5 -5
  1157. package/node_modules/typebox/build/type/extends/dependent.d.mts +6 -0
  1158. package/node_modules/typebox/build/type/extends/dependent.mjs +6 -0
  1159. package/node_modules/typebox/build/type/extends/enum.d.mts +4 -4
  1160. package/node_modules/typebox/build/type/extends/enum.mjs +3 -2
  1161. package/node_modules/typebox/build/type/extends/extends_left.d.mts +5 -7
  1162. package/node_modules/typebox/build/type/extends/extends_left.mjs +24 -27
  1163. package/node_modules/typebox/build/type/extends/extends_right.d.mts +7 -5
  1164. package/node_modules/typebox/build/type/extends/extends_right.mjs +20 -15
  1165. package/node_modules/typebox/build/type/extends/inference.mjs +1 -1
  1166. package/node_modules/typebox/build/type/extends/object.d.mts +8 -1
  1167. package/node_modules/typebox/build/type/extends/object.mjs +25 -3
  1168. package/node_modules/typebox/build/type/extends/parameters.mjs +2 -2
  1169. package/node_modules/typebox/build/type/extends/record.d.mts +13 -0
  1170. package/node_modules/typebox/build/type/extends/record.mjs +23 -0
  1171. package/node_modules/typebox/build/type/extends/template_literal.d.mts +3 -3
  1172. package/node_modules/typebox/build/type/extends/template_literal.mjs +3 -3
  1173. package/node_modules/typebox/build/type/extends/tuple.d.mts +3 -6
  1174. package/node_modules/typebox/build/type/extends/tuple.mjs +6 -5
  1175. package/node_modules/typebox/build/type/extends/union.mjs +2 -2
  1176. package/node_modules/typebox/build/type/script/mapping.d.mts +86 -98
  1177. package/node_modules/typebox/build/type/script/mapping.mjs +95 -92
  1178. package/node_modules/typebox/build/type/script/parser.d.mts +42 -40
  1179. package/node_modules/typebox/build/type/script/parser.mjs +23 -22
  1180. package/node_modules/typebox/build/type/script/script.d.mts +3 -4
  1181. package/node_modules/typebox/build/type/script/script.mjs +3 -2
  1182. package/node_modules/typebox/build/type/script/token/internal/guard.d.mts +1 -1
  1183. package/node_modules/typebox/build/type/script/token/internal/guard.mjs +1 -1
  1184. package/node_modules/typebox/build/type/script/token/internal/take.mjs +1 -1
  1185. package/node_modules/typebox/build/type/script/token/until.mjs +2 -2
  1186. package/node_modules/typebox/build/type/types/_codec.d.mts +12 -12
  1187. package/node_modules/typebox/build/type/types/_codec.mjs +0 -1
  1188. package/node_modules/typebox/build/type/types/_immutable.d.mts +2 -9
  1189. package/node_modules/typebox/build/type/types/_immutable.mjs +2 -10
  1190. package/node_modules/typebox/build/type/types/_optional.d.mts +2 -9
  1191. package/node_modules/typebox/build/type/types/_optional.mjs +2 -11
  1192. package/node_modules/typebox/build/type/types/_readonly.d.mts +2 -9
  1193. package/node_modules/typebox/build/type/types/_readonly.mjs +2 -10
  1194. package/node_modules/typebox/build/type/types/_refine.d.mts +8 -10
  1195. package/node_modules/typebox/build/type/types/_refine.mjs +1 -2
  1196. package/node_modules/typebox/build/type/types/call.d.mts +3 -3
  1197. package/node_modules/typebox/build/type/types/call.mjs +3 -2
  1198. package/node_modules/typebox/build/type/types/deferred.d.mts +1 -0
  1199. package/node_modules/typebox/build/type/types/deferred.mjs +1 -1
  1200. package/node_modules/typebox/build/type/types/dependent.d.mts +17 -0
  1201. package/node_modules/typebox/build/type/types/dependent.mjs +24 -0
  1202. package/node_modules/typebox/build/type/types/enum.d.mts +3 -1
  1203. package/node_modules/typebox/build/type/types/enum.mjs +5 -0
  1204. package/node_modules/typebox/build/type/types/index.d.mts +1 -4
  1205. package/node_modules/typebox/build/type/types/index.mjs +1 -4
  1206. package/node_modules/typebox/build/type/types/number.d.mts +1 -1
  1207. package/node_modules/typebox/build/type/types/number.mjs +1 -1
  1208. package/node_modules/typebox/build/type/types/record.d.mts +13 -7
  1209. package/node_modules/typebox/build/type/types/record.mjs +15 -9
  1210. package/node_modules/typebox/build/type/types/static.d.mts +2 -5
  1211. package/node_modules/typebox/build/typebox.d.mts +3 -7
  1212. package/node_modules/typebox/build/typebox.mjs +3 -7
  1213. package/node_modules/typebox/build/value/clean/clean.mjs +4 -2
  1214. package/node_modules/typebox/build/value/clean/from_intersect.mjs +2 -2
  1215. package/node_modules/typebox/build/value/clean/from_type.mjs +8 -10
  1216. package/node_modules/typebox/build/value/clean/from_union.d.mts +1 -1
  1217. package/node_modules/typebox/build/value/clean/from_union.mjs +1 -2
  1218. package/node_modules/typebox/build/value/clone/clone.mjs +2 -73
  1219. package/node_modules/typebox/build/value/codec/decode.mjs +4 -2
  1220. package/node_modules/typebox/build/value/codec/encode.mjs +4 -2
  1221. package/node_modules/typebox/build/value/codec/from_array.mjs +1 -4
  1222. package/node_modules/typebox/build/value/codec/from_object.mjs +1 -4
  1223. package/node_modules/typebox/build/value/codec/from_record.mjs +2 -7
  1224. package/node_modules/typebox/build/value/codec/from_tuple.mjs +1 -4
  1225. package/node_modules/typebox/build/value/codec/from_union.mjs +2 -3
  1226. package/node_modules/typebox/build/value/convert/from_enum.mjs +3 -4
  1227. package/node_modules/typebox/build/value/convert/from_template_literal.d.mts +1 -1
  1228. package/node_modules/typebox/build/value/convert/from_template_literal.mjs +2 -3
  1229. package/node_modules/typebox/build/value/convert/from_type.mjs +19 -21
  1230. package/node_modules/typebox/build/value/create/from_enum.mjs +2 -2
  1231. package/node_modules/typebox/build/value/create/from_type.mjs +23 -31
  1232. package/node_modules/typebox/build/value/default/from_object.mjs +1 -1
  1233. package/node_modules/typebox/build/value/default/from_type.mjs +8 -10
  1234. package/node_modules/typebox/build/value/errors/errors.d.mts +2 -2
  1235. package/node_modules/typebox/build/value/errors/errors.mjs +1 -1
  1236. package/node_modules/typebox/build/value/index.d.mts +0 -1
  1237. package/node_modules/typebox/build/value/index.mjs +0 -1
  1238. package/node_modules/typebox/build/value/repair/from_enum.mjs +2 -3
  1239. package/node_modules/typebox/build/value/repair/from_type.mjs +24 -22
  1240. package/node_modules/typebox/build/value/shared/union_priority_sort.d.mts +6 -2
  1241. package/node_modules/typebox/build/value/shared/union_priority_sort.mjs +62 -26
  1242. package/node_modules/typebox/build/value/value.d.mts +0 -1
  1243. package/node_modules/typebox/build/value/value.mjs +0 -1
  1244. package/node_modules/typebox/package.json +33 -33
  1245. package/node_modules/typebox/readme.md +117 -103
  1246. package/package.json +20 -10
  1247. package/dist/core/extensions/builtin/claude-agent-sdk/auth-lane.d.ts.map +0 -1
  1248. package/dist/core/extensions/builtin/claude-agent-sdk/auth-lane.js.map +0 -1
  1249. package/dist/core/extensions/builtin/claude-agent-sdk/guidance.d.ts +0 -6
  1250. package/dist/core/extensions/builtin/claude-agent-sdk/guidance.d.ts.map +0 -1
  1251. package/dist/core/extensions/builtin/claude-agent-sdk/guidance.js.map +0 -1
  1252. package/dist/core/extensions/builtin/claude-agent-sdk/index.d.ts +0 -4
  1253. package/dist/core/extensions/builtin/claude-agent-sdk/index.d.ts.map +0 -1
  1254. package/dist/core/extensions/builtin/claude-agent-sdk/index.js.map +0 -1
  1255. package/dist/core/extensions/builtin/claude-agent-sdk/oauth-login.js.map +0 -1
  1256. package/dist/core/extensions/builtin/claude-agent-sdk/options.d.ts +0 -16
  1257. package/dist/core/extensions/builtin/claude-agent-sdk/options.js.map +0 -1
  1258. package/dist/core/extensions/builtin/claude-agent-sdk/prompt-bridge.js.map +0 -1
  1259. package/dist/core/extensions/builtin/claude-agent-sdk/sdk-boundary.d.ts.map +0 -1
  1260. package/dist/core/extensions/builtin/claude-agent-sdk/settings.d.ts +0 -15
  1261. package/dist/core/extensions/builtin/claude-agent-sdk/settings.d.ts.map +0 -1
  1262. package/dist/core/extensions/builtin/claude-agent-sdk/settings.js +0 -41
  1263. package/dist/core/extensions/builtin/claude-agent-sdk/settings.js.map +0 -1
  1264. package/dist/core/extensions/builtin/claude-agent-sdk/stream.d.ts.map +0 -1
  1265. package/dist/core/extensions/builtin/claude-agent-sdk/stream.js +0 -229
  1266. package/dist/core/extensions/builtin/claude-agent-sdk/stream.js.map +0 -1
  1267. package/dist/core/extensions/builtin/claude-agent-sdk/tools.d.ts.map +0 -1
  1268. package/dist/core/extensions/builtin/claude-agent-sdk/tools.js.map +0 -1
  1269. package/dist/core/extensions/builtin/tool-pair-guard/sanitize-anthropic-payload.d.ts +0 -3
  1270. package/dist/core/extensions/builtin/tool-pair-guard/sanitize-anthropic-payload.d.ts.map +0 -1
  1271. package/dist/core/extensions/builtin/tool-pair-guard/sanitize-anthropic-payload.js +0 -75
  1272. package/dist/core/extensions/builtin/tool-pair-guard/sanitize-anthropic-payload.js.map +0 -1
  1273. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl-repo.d.ts +0 -26
  1274. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl-repo.d.ts.map +0 -1
  1275. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl-repo.js +0 -100
  1276. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl-repo.js.map +0 -1
  1277. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl-storage.d.ts +0 -42
  1278. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl-storage.d.ts.map +0 -1
  1279. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl-storage.js +0 -286
  1280. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl-storage.js.map +0 -1
  1281. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory-repo.d.ts +0 -18
  1282. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory-repo.d.ts.map +0 -1
  1283. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory-repo.js +0 -44
  1284. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory-repo.js.map +0 -1
  1285. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory-storage.d.ts +0 -33
  1286. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory-storage.d.ts.map +0 -1
  1287. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory-storage.js +0 -163
  1288. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory-storage.js.map +0 -1
  1289. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo-utils.d.ts +0 -11
  1290. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo-utils.d.ts.map +0 -1
  1291. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo-utils.js +0 -39
  1292. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo-utils.js.map +0 -1
  1293. package/node_modules/typebox/build/schema/engine/_guard.d.mts +0 -6
  1294. package/node_modules/typebox/build/schema/engine/_guard.mjs +0 -26
  1295. package/node_modules/typebox/build/schema/types/_guard.d.mts +0 -10
  1296. package/node_modules/typebox/build/schema/types/_guard.mjs +0 -16
  1297. package/node_modules/typebox/build/type/action/_optional.d.mts +0 -19
  1298. package/node_modules/typebox/build/type/action/_optional.mjs +0 -40
  1299. package/node_modules/typebox/build/type/action/_readonly.d.mts +0 -19
  1300. package/node_modules/typebox/build/type/action/_readonly.mjs +0 -40
  1301. package/node_modules/typebox/build/type/action/awaited.d.mts +0 -15
  1302. package/node_modules/typebox/build/type/action/awaited.mjs +0 -15
  1303. package/node_modules/typebox/build/type/action/options.d.mts +0 -11
  1304. package/node_modules/typebox/build/type/action/options.mjs +0 -11
  1305. package/node_modules/typebox/build/type/engine/awaited/instantiate.d.mts +0 -11
  1306. package/node_modules/typebox/build/type/engine/awaited/instantiate.mjs +0 -20
  1307. package/node_modules/typebox/build/type/engine/enum/enum_to_union.d.mts +0 -14
  1308. package/node_modules/typebox/build/type/engine/enum/enum_to_union.mjs +0 -24
  1309. package/node_modules/typebox/build/type/engine/options/index.d.mts +0 -1
  1310. package/node_modules/typebox/build/type/engine/options/index.mjs +0 -1
  1311. package/node_modules/typebox/build/type/engine/options/instantiate.d.mts +0 -8
  1312. package/node_modules/typebox/build/type/extends/async_iterator.d.mts +0 -7
  1313. package/node_modules/typebox/build/type/extends/async_iterator.mjs +0 -9
  1314. package/node_modules/typebox/build/type/extends/iterator.d.mts +0 -7
  1315. package/node_modules/typebox/build/type/extends/iterator.mjs +0 -9
  1316. package/node_modules/typebox/build/type/extends/promise.d.mts +0 -7
  1317. package/node_modules/typebox/build/type/extends/promise.mjs +0 -9
  1318. package/node_modules/typebox/build/type/types/async_iterator.d.mts +0 -20
  1319. package/node_modules/typebox/build/type/types/async_iterator.mjs +0 -28
  1320. package/node_modules/typebox/build/type/types/base.d.mts +0 -50
  1321. package/node_modules/typebox/build/type/types/base.mjs +0 -84
  1322. package/node_modules/typebox/build/type/types/iterator.d.mts +0 -20
  1323. package/node_modules/typebox/build/type/types/iterator.mjs +0 -28
  1324. package/node_modules/typebox/build/type/types/promise.d.mts +0 -21
  1325. package/node_modules/typebox/build/type/types/promise.mjs +0 -29
  1326. package/node_modules/typebox/build/value/clean/from_base.d.mts +0 -2
  1327. package/node_modules/typebox/build/value/clean/from_base.mjs +0 -4
  1328. package/node_modules/typebox/build/value/convert/from_base.d.mts +0 -2
  1329. package/node_modules/typebox/build/value/convert/from_base.mjs +0 -4
  1330. package/node_modules/typebox/build/value/create/from_async_iterator.d.mts +0 -2
  1331. package/node_modules/typebox/build/value/create/from_async_iterator.mjs +0 -5
  1332. package/node_modules/typebox/build/value/create/from_base.d.mts +0 -2
  1333. package/node_modules/typebox/build/value/create/from_base.mjs +0 -4
  1334. package/node_modules/typebox/build/value/create/from_iterator.d.mts +0 -2
  1335. package/node_modules/typebox/build/value/create/from_iterator.mjs +0 -5
  1336. package/node_modules/typebox/build/value/create/from_promise.d.mts +0 -2
  1337. package/node_modules/typebox/build/value/create/from_promise.mjs +0 -5
  1338. package/node_modules/typebox/build/value/default/from_base.d.mts +0 -2
  1339. package/node_modules/typebox/build/value/default/from_base.mjs +0 -5
  1340. package/node_modules/typebox/build/value/mutate/error.d.mts +0 -3
  1341. package/node_modules/typebox/build/value/mutate/error.mjs +0 -6
  1342. package/node_modules/typebox/build/value/mutate/from_array.d.mts +0 -2
  1343. package/node_modules/typebox/build/value/mutate/from_array.mjs +0 -16
  1344. package/node_modules/typebox/build/value/mutate/from_object.d.mts +0 -2
  1345. package/node_modules/typebox/build/value/mutate/from_object.mjs +0 -40
  1346. package/node_modules/typebox/build/value/mutate/from_unknown.d.mts +0 -2
  1347. package/node_modules/typebox/build/value/mutate/from_unknown.mjs +0 -7
  1348. package/node_modules/typebox/build/value/mutate/from_value.d.mts +0 -2
  1349. package/node_modules/typebox/build/value/mutate/from_value.mjs +0 -12
  1350. package/node_modules/typebox/build/value/mutate/index.d.mts +0 -1
  1351. package/node_modules/typebox/build/value/mutate/index.mjs +0 -1
  1352. package/node_modules/typebox/build/value/mutate/mutate.d.mts +0 -11
  1353. package/node_modules/typebox/build/value/mutate/mutate.mjs +0 -41
  1354. package/node_modules/typebox/build/value/repair/from_base.d.mts +0 -2
  1355. package/node_modules/typebox/build/value/repair/from_base.mjs +0 -8
  1356. /package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/account-events.d.ts +0 -0
  1357. /package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/account-events.js +0 -0
  1358. /package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/custom-tools-schema.d.ts +0 -0
  1359. /package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/custom-tools-schema.js +0 -0
  1360. /package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/custom-tools.d.ts +0 -0
  1361. /package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/custom-tools.js +0 -0
  1362. /package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/executable.d.ts +0 -0
  1363. /package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/executable.js +0 -0
  1364. /package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/failover.d.ts +0 -0
  1365. /package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/prompt-bridge.d.ts +0 -0
  1366. /package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/sdk-boundary.js +0 -0
  1367. /package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/stream-protocol.d.ts +0 -0
  1368. /package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/stream-protocol.js +0 -0
  1369. /package/node_modules/typebox/build/type/engine/{awaited → with}/index.d.mts +0 -0
  1370. /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,oBAAoB,EACpB,eAAe,EAEf,WAAW,EACX,eAAe,GAEf,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAkB,aAAa,EAAE,gBAAgB,EAAE,OAAO,EAAE,YAAY,EAAoB,MAAM,UAAU,CAAC;AACpH,OAAO,EACN,eAAe,EACf,oBAAoB,EACpB,mBAAmB,EACnB,aAAa,EACb,sBAAsB,EACtB,YAAY,GACZ,MAAM,YAAY,CAAC;AAEpB,MAAM,gBAAgB,GAAG,aAAa,CAAC;AACvC,MAAM,eAAe,GAAG,aAAa,CAAC;AACtC,MAAM,gBAAgB,GAAG,UAAU,CAAC;AACpC,MAAM,eAAe,GAAG,UAAU,CAAC;AACnC,MAAM,YAAY,GAAG,yDAAyD,CAAC;AAC/E,MAAM,aAAa,GAAG,yDAAyD,CAAC;AAChF,MAAM,QAAQ,GAAG,QAAQ,CAAC;AAC1B,MAAM,SAAS,GAAG,QAAQ,CAAC;AAC3B,MAAM,yBAAyB,GAAG,aAAa,CAAC;AAChD,MAAM,uBAAuB,GAAG,aAAa,CAAC;AAC9C,MAAM,kBAAkB,GAAG,sCAAsC,CAAC;AACl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,CAAC;QAC3F,CAAC;QAED,KAAK,IAAI,GAAG,GAAG,CAAC,EAAE,GAAG,GAAG,MAAM,EAAE,GAAG,EAAE,EAAE,CAAC;YACvC,IAAI,CAAC,UAAU,IAAI,CAAC,gBAAgB,IAAI,MAAM,CAAC,GAAG,CAAC,KAAK,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC;gBAAE,SAAS;YAC3F,MAAM,IAAI,QAAQ,GAAG,GAAG,CAAC,aAAa,MAAM,CAAC,GAAG,CAAC,IAAI,EAAE,EAAE,CAAC;QAC3D,CAAC;QAED,IAAI,SAAS,EAAE,CAAC;YACf,MAAM,IAAI,QAAQ,SAAS,CAAC,GAAG,GAAG,CAAC,IAAI,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,SAAS,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC;YAC7E,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,aAAa,GAAG,aAAa,CAAC;IACpC,CAAC;IAED,KAAK,CAAC,OAAe,EAAE,UAAU,GAAG,mBAAmB;QACtD,MAAM,EAAE,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC;QACzB,MAAM,KAAK,GAAG,UAAU,CACvB,GAAG,EAAE;YACJ,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC;YACjE,IAAI,KAAK,KAAK,CAAC,CAAC;gBAAE,OAAO;YACzB,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;YAC9B,IAAI,CAAC,aAAa,EAAE,CAAC;QACtB,CAAC,EACD,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,UAAU,CAAC,CACvB,CAAC;QACF,KAAK,CAAC,KAAK,EAAE,CAAC;QACd,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,CAAC;QAC1C,IAAI,CAAC,aAAa,EAAE,CAAC;IACtB,CAAC;IAED,OAAO;QACN,KAAK,MAAM,KAAK,IAAI,IAAI,CAAC,OAAO;YAAE,YAAY,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QAC5D,IAAI,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC;IACzB,CAAC;IAED,UAAU,KAAU,CAAC;IAErB,MAAM,CAAC,KAAa;QACnB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE;YACjC,MAAM,OAAO,GAAG,eAAe,CAAC,IAAI,KAAK,CAAC,OAAO,GAAG,EAAE,KAAK,EAAE,EAAE,CAAC,CAAC;YACjE,OAAO,UAAU,OAAO,UAAU,CAAC;QACpC,CAAC,CAAC,CAAC;IACJ,CAAC;CACD","sourcesContent":["import type { Component } from \"../tui.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"]}
@@ -0,0 +1,7 @@
1
+ import { Stack, type StackChild, type StackOptions } from "./stack.ts";
2
+ export declare class HStack extends Stack {
3
+ protected readonly layoutType: "hstack";
4
+ constructor(children?: StackChild[], options?: StackOptions);
5
+ render(width: number): string[];
6
+ }
7
+ //# sourceMappingURL=h-stack.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"h-stack.d.ts","sourceRoot":"","sources":["../../src/components/h-stack.ts"],"names":[],"mappings":"AAEA,OAAO,EAAsB,KAAK,EAAE,KAAK,UAAU,EAAE,KAAK,YAAY,EAAuB,MAAM,YAAY,CAAC;AAEhH,qBAAa,MAAO,SAAQ,KAAK;IAChC,SAAS,CAAC,QAAQ,CAAC,UAAU,EAAG,QAAQ,CAAU;IAElD,YAAY,QAAQ,GAAE,UAAU,EAAO,EAAE,OAAO,GAAE,YAAiB,EAElE;IAEQ,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,CA+BvC;CACD"}
@@ -0,0 +1,43 @@
1
+ import { compositeTuiLine } from "../tui.js";
2
+ import { visibleWidth } from "../utils.js";
3
+ import { allocateStackSizes, Stack, visibleStackEntries } from "./stack.js";
4
+ export class HStack extends Stack {
5
+ constructor(children = [], options = {}) {
6
+ super(children, options);
7
+ this.layoutType = "hstack";
8
+ }
9
+ render(width) {
10
+ const safeWidth = Math.max(1, width);
11
+ const viewport = { width: safeWidth, height: Number.MAX_SAFE_INTEGER };
12
+ const entries = visibleStackEntries(this.entries, viewport);
13
+ if (entries.length === 0)
14
+ return [];
15
+ const intrinsicWidths = entries.map((entry) => {
16
+ const lines = entry.component.render(safeWidth);
17
+ return lines.reduce((max, line) => Math.max(max, visibleWidth(line)), 0);
18
+ });
19
+ const widths = allocateStackSizes(entries, intrinsicWidths, safeWidth, this.gap);
20
+ const rendered = entries.map((entry, index) => widths[index] === 0 ? [] : entry.component.render(widths[index]));
21
+ const height = rendered.reduce((max, lines) => Math.max(max, lines.length), 0);
22
+ const result = Array.from({ length: height }, () => "");
23
+ let x = 0;
24
+ for (let index = 0; index < rendered.length; index++) {
25
+ const lines = rendered[index];
26
+ const childWidth = widths[index];
27
+ let offset = 0;
28
+ if (this.align === "center")
29
+ offset = Math.floor((height - lines.length) / 2);
30
+ else if (this.align === "end")
31
+ offset = height - lines.length;
32
+ for (let row = 0; row < lines.length; row++) {
33
+ const target = row + offset;
34
+ if (target < 0 || target >= result.length)
35
+ continue;
36
+ result[target] = compositeTuiLine(result[target], lines[row], x, childWidth, safeWidth);
37
+ }
38
+ x += childWidth + this.gap;
39
+ }
40
+ return result;
41
+ }
42
+ }
43
+ //# sourceMappingURL=h-stack.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"h-stack.js","sourceRoot":"","sources":["../../src/components/h-stack.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,kBAAkB,EAAE,KAAK,EAAsC,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAEhH,MAAM,OAAO,MAAO,SAAQ,KAAK;IAGhC,YAAY,QAAQ,GAAiB,EAAE,EAAE,OAAO,GAAiB,EAAE;QAClE,KAAK,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;QAHP,eAAU,GAAG,QAAiB,CAAC;IAIlD,CAAC;IAEQ,MAAM,CAAC,KAAa;QAC5B,MAAM,SAAS,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC;QACrC,MAAM,QAAQ,GAAG,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,CAAC,gBAAgB,EAAE,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,GAAG,QAAQ,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE,CAAC;YACtD,MAAM,KAAK,GAAG,QAAQ,CAAC,KAAK,CAAE,CAAC;YAC/B,MAAM,UAAU,GAAG,MAAM,CAAC,KAAK,CAAE,CAAC;YAClC,IAAI,MAAM,GAAG,CAAC,CAAC;YACf,IAAI,IAAI,CAAC,KAAK,KAAK,QAAQ;gBAAE,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;iBACzE,IAAI,IAAI,CAAC,KAAK,KAAK,KAAK;gBAAE,MAAM,GAAG,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC;YAC9D,KAAK,IAAI,GAAG,GAAG,CAAC,EAAE,GAAG,GAAG,KAAK,CAAC,MAAM,EAAE,GAAG,EAAE,EAAE,CAAC;gBAC7C,MAAM,MAAM,GAAG,GAAG,GAAG,MAAM,CAAC;gBAC5B,IAAI,MAAM,GAAG,CAAC,IAAI,MAAM,IAAI,MAAM,CAAC,MAAM;oBAAE,SAAS;gBACpD,MAAM,CAAC,MAAM,CAAC,GAAG,gBAAgB,CAAC,MAAM,CAAC,MAAM,CAAE,EAAE,KAAK,CAAC,GAAG,CAAE,EAAE,CAAC,EAAE,UAAU,EAAE,SAAS,CAAC,CAAC;YAC3F,CAAC;YACD,CAAC,IAAI,UAAU,GAAG,IAAI,CAAC,GAAG,CAAC;QAC5B,CAAC;QACD,OAAO,MAAM,CAAC;IACf,CAAC;CACD","sourcesContent":["import { compositeTuiLine } from \"../tui.ts\";\nimport { visibleWidth } from \"../utils.ts\";\nimport { allocateStackSizes, Stack, type StackChild, type StackOptions, visibleStackEntries } from \"./stack.ts\";\n\nexport class HStack extends Stack {\n\tprotected readonly layoutType = \"hstack\" as const;\n\n\tconstructor(children: StackChild[] = [], options: StackOptions = {}) {\n\t\tsuper(children, options);\n\t}\n\n\toverride render(width: number): string[] {\n\t\tconst safeWidth = Math.max(1, width);\n\t\tconst viewport = { width: safeWidth, height: Number.MAX_SAFE_INTEGER };\n\t\tconst entries = visibleStackEntries(this.entries, viewport);\n\t\tif (entries.length === 0) return [];\n\n\t\tconst intrinsicWidths = entries.map((entry) => {\n\t\t\tconst lines = entry.component.render(safeWidth);\n\t\t\treturn lines.reduce((max, line) => Math.max(max, visibleWidth(line)), 0);\n\t\t});\n\t\tconst widths = allocateStackSizes(entries, intrinsicWidths, safeWidth, this.gap);\n\t\tconst rendered = entries.map((entry, index) =>\n\t\t\twidths[index] === 0 ? [] : entry.component.render(widths[index]!),\n\t\t);\n\t\tconst height = rendered.reduce((max, lines) => Math.max(max, lines.length), 0);\n\t\tconst result = Array.from({ length: height }, () => \"\");\n\t\tlet x = 0;\n\t\tfor (let index = 0; index < rendered.length; index++) {\n\t\t\tconst lines = rendered[index]!;\n\t\t\tconst childWidth = widths[index]!;\n\t\t\tlet offset = 0;\n\t\t\tif (this.align === \"center\") offset = Math.floor((height - lines.length) / 2);\n\t\t\telse if (this.align === \"end\") offset = height - lines.length;\n\t\t\tfor (let row = 0; row < lines.length; row++) {\n\t\t\t\tconst target = row + offset;\n\t\t\t\tif (target < 0 || target >= result.length) continue;\n\t\t\t\tresult[target] = compositeTuiLine(result[target]!, lines[row]!, x, childWidth, safeWidth);\n\t\t\t}\n\t\t\tx += childWidth + this.gap;\n\t\t}\n\t\treturn result;\n\t}\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"image.d.ts","sourceRoot":"","sources":["../../src/components/image.ts"],"names":[],"mappings":"AAAA,OAAO,EAKN,KAAK,eAAe,EAEpB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAE3C,MAAM,WAAW,UAAU;IAC1B,aAAa,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,CAAC;CACvC;AAED,MAAM,WAAW,YAAY;IAC5B,aAAa,CAAC,EAAE,MAAM,CAA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,OAAO,CAAC,UAAU,CAAS;IAC3B,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,UAAU,CAAkB;IACpC,OAAO,CAAC,KAAK,CAAa;IAC1B,OAAO,CAAC,OAAO,CAAe;IAC9B,OAAO,CAAC,OAAO,CAAC,CAAS;IAEzB,OAAO,CAAC,WAAW,CAAC,CAAW;IAC/B,OAAO,CAAC,WAAW,CAAC,CAAS;IAE7B,YACC,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,UAAU,EACjB,OAAO,GAAE,YAAiB,EAC1B,UAAU,CAAC,EAAE,eAAe,EAQ5B;IAED,0DAA0D;IAC1D,UAAU,IAAI,MAAM,GAAG,SAAS,CAE/B;IAED,UAAU,IAAI,IAAI,CAGjB;IAED,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,CAsE9B;CACD"}
@@ -1,5 +1,5 @@
1
- import { allocateImageId, getCapabilities, getCellDimensions, getImageDimensions, renderImage, } from "../terminal-image.js";
2
- import { imageFallback } from "../terminal-text.js";
1
+ import { allocateImageId, getCapabilities, getCellDimensions, getImageDimensions, imageFallback, renderImage, } from "../terminal-image.js";
2
+ import { truncateToWidth } from "../utils.js";
3
3
  export class Image {
4
4
  constructor(base64Data, mimeType, theme, options = {}, dimensions) {
5
5
  this.base64Data = base64Data;
@@ -73,12 +73,12 @@ export class Image {
73
73
  }
74
74
  else {
75
75
  const fallback = imageFallback(this.mimeType, this.dimensions, this.options.filename);
76
- lines = [this.theme.fallbackColor(fallback)];
76
+ lines = [truncateToWidth(this.theme.fallbackColor(fallback), width)];
77
77
  }
78
78
  }
79
79
  else {
80
80
  const fallback = imageFallback(this.mimeType, this.dimensions, this.options.filename);
81
- lines = [this.theme.fallbackColor(fallback)];
81
+ lines = [truncateToWidth(this.theme.fallbackColor(fallback), width)];
82
82
  }
83
83
  this.cachedLines = lines;
84
84
  this.cachedWidth = width;
@@ -1 +1 @@
1
- {"version":3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AC,CAAC;QAC9C,CAAC;QAED,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC;QACzB,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC;QAEzB,OAAO,KAAK,CAAC;IACd,CAAC;CACD","sourcesContent":["import {\n\tallocateImageId,\n\tgetCapabilities,\n\tgetCellDimensions,\n\tgetImageDimensions,\n\ttype ImageDimensions,\n\trenderImage,\n} from \"../terminal-image.ts\";\nimport { imageFallback } from \"../terminal-text.ts\";\nimport type { Component } from \"../tui.ts\";\n\nexport interface ImageTheme {\n\tfallbackColor: (str: string) => string;\n}\n\nexport interface ImageOptions {\n\tmaxWidthCells?: number;\n\tmaxHeightCells?: number;\n\tfilename?: string;\n\t/** Kitty image ID. If provided, reuses this ID (for animations/updates). */\n\timageId?: number;\n}\n\nexport class Image implements Component {\n\tprivate base64Data: string;\n\tprivate mimeType: string;\n\tprivate dimensions: ImageDimensions;\n\tprivate theme: ImageTheme;\n\tprivate options: ImageOptions;\n\tprivate imageId?: number;\n\n\tprivate cachedLines?: string[];\n\tprivate cachedWidth?: number;\n\n\tconstructor(\n\t\tbase64Data: string,\n\t\tmimeType: string,\n\t\ttheme: ImageTheme,\n\t\toptions: ImageOptions = {},\n\t\tdimensions?: ImageDimensions,\n\t) {\n\t\tthis.base64Data = base64Data;\n\t\tthis.mimeType = mimeType;\n\t\tthis.theme = theme;\n\t\tthis.options = options;\n\t\tthis.dimensions = dimensions || getImageDimensions(base64Data, mimeType) || { widthPx: 800, heightPx: 600 };\n\t\tthis.imageId = options.imageId;\n\t}\n\n\t/** Get the Kitty image ID used by this image (if any). */\n\tgetImageId(): number | undefined {\n\t\treturn this.imageId;\n\t}\n\n\tinvalidate(): void {\n\t\tthis.cachedLines = undefined;\n\t\tthis.cachedWidth = undefined;\n\t}\n\n\trender(width: number): string[] {\n\t\tif (this.cachedLines && this.cachedWidth === width) {\n\t\t\treturn this.cachedLines;\n\t\t}\n\n\t\tconst maxWidth = Math.max(1, Math.min(width - 2, this.options.maxWidthCells ?? 60));\n\t\tconst cellDimensions = getCellDimensions();\n\t\tconst defaultMaxHeight = Math.max(1, Math.ceil((maxWidth * cellDimensions.widthPx) / cellDimensions.heightPx));\n\t\tconst maxHeight = this.options.maxHeightCells ?? defaultMaxHeight;\n\n\t\tconst caps = getCapabilities();\n\t\tlet lines: string[];\n\n\t\tif (caps.images) {\n\t\t\tif (caps.images === \"kitty\" && this.imageId === undefined) {\n\t\t\t\tthis.imageId = allocateImageId();\n\t\t\t}\n\t\t\tconst result = renderImage(this.base64Data, this.dimensions, {\n\t\t\t\tmaxWidthCells: maxWidth,\n\t\t\t\tmaxHeightCells: maxHeight,\n\t\t\t\timageId: this.imageId,\n\t\t\t\tmoveCursor: false,\n\t\t\t});\n\n\t\t\tif (result) {\n\t\t\t\t// Store the image ID for later cleanup\n\t\t\t\tif (result.imageId) {\n\t\t\t\t\tthis.imageId = result.imageId;\n\t\t\t\t}\n\n\t\t\t\tif (caps.images === \"kitty\" && result.lines) {\n\t\t\t\t\t// Unicode placeholder placement (tmux passthrough): each row is a\n\t\t\t\t\t// real text line of placeholder cells; the first row also carries\n\t\t\t\t\t// the virtual-placement transmission.\n\t\t\t\t\tlines = result.lines;\n\t\t\t\t} else if (caps.images === \"kitty\") {\n\t\t\t\t\t// For Kitty: C=1 prevents cursor movement.\n\t\t\t\t\t// Don't need the cursor movement.\n\t\t\t\t\tlines = [result.sequence];\n\n\t\t\t\t\t// Return `rows` lines so TUI accounts for image height.\n\t\t\t\t\tfor (let i = 0; i < result.rows - 1; i++) {\n\t\t\t\t\t\tlines.push(\"\");\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// Return `rows` lines so TUI accounts for image height.\n\t\t\t\t\t// First (rows-1) lines are empty and cleared before the image is drawn.\n\t\t\t\t\t// Last line: move cursor back up, draw the image, then move back down\n\t\t\t\t\t// so TUI cursor accounting stays inside the scroll area.\n\t\t\t\t\tlines = [];\n\t\t\t\t\tfor (let i = 0; i < result.rows - 1; i++) {\n\t\t\t\t\t\tlines.push(\"\");\n\t\t\t\t\t}\n\t\t\t\t\tconst rowOffset = result.rows - 1;\n\t\t\t\t\tconst moveUp = rowOffset > 0 ? `\\x1b[${rowOffset}A` : \"\";\n\t\t\t\t\tlines.push(moveUp + result.sequence);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tconst fallback = imageFallback(this.mimeType, this.dimensions, this.options.filename);\n\t\t\t\tlines = [this.theme.fallbackColor(fallback)];\n\t\t\t}\n\t\t} else {\n\t\t\tconst fallback = imageFallback(this.mimeType, this.dimensions, this.options.filename);\n\t\t\tlines = [this.theme.fallbackColor(fallback)];\n\t\t}\n\n\t\tthis.cachedLines = lines;\n\t\tthis.cachedWidth = width;\n\n\t\treturn lines;\n\t}\n}\n"]}
1
+ {"version":3,"file":"image.js","sourceRoot":"","sources":["../../src/components/image.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,eAAe,EACf,eAAe,EACf,iBAAiB,EACjB,kBAAkB,EAElB,aAAa,EACb,WAAW,GACX,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAc9C,MAAM,OAAO,KAAK;IAWjB,YACC,UAAkB,EAClB,QAAgB,EAChB,KAAiB,EACjB,OAAO,GAAiB,EAAE,EAC1B,UAA4B;QAE5B,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,UAAU,GAAG,UAAU,IAAI,kBAAkB,CAAC,UAAU,EAAE,QAAQ,CAAC,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC;QAC5G,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;IAChC,CAAC;IAED,0DAA0D;IAC1D,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,CAAC,CAAC;gBACtC,CAAC;YACF,CAAC;iBAAM,CAAC;gBACP,MAAM,QAAQ,GAAG,aAAa,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;gBACtF,KAAK,GAAG,CAAC,eAAe,CAAC,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,QAAQ,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC;YACtE,CAAC;QACF,CAAC;aAAM,CAAC;YACP,MAAM,QAAQ,GAAG,aAAa,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;YACtF,KAAK,GAAG,CAAC,eAAe,CAAC,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,QAAQ,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC;QACtE,CAAC;QAED,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC;QACzB,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC;QAEzB,OAAO,KAAK,CAAC;IACd,CAAC;CACD","sourcesContent":["import {\n\tallocateImageId,\n\tgetCapabilities,\n\tgetCellDimensions,\n\tgetImageDimensions,\n\ttype ImageDimensions,\n\timageFallback,\n\trenderImage,\n} from \"../terminal-image.ts\";\nimport type { Component } from \"../tui.ts\";\nimport { truncateToWidth } from \"../utils.ts\";\n\nexport interface ImageTheme {\n\tfallbackColor: (str: string) => string;\n}\n\nexport interface ImageOptions {\n\tmaxWidthCells?: number;\n\tmaxHeightCells?: number;\n\tfilename?: string;\n\t/** Kitty image ID. If provided, reuses this ID (for animations/updates). */\n\timageId?: number;\n}\n\nexport class Image implements Component {\n\tprivate base64Data: string;\n\tprivate mimeType: string;\n\tprivate dimensions: ImageDimensions;\n\tprivate theme: ImageTheme;\n\tprivate options: ImageOptions;\n\tprivate imageId?: number;\n\n\tprivate cachedLines?: string[];\n\tprivate cachedWidth?: number;\n\n\tconstructor(\n\t\tbase64Data: string,\n\t\tmimeType: string,\n\t\ttheme: ImageTheme,\n\t\toptions: ImageOptions = {},\n\t\tdimensions?: ImageDimensions,\n\t) {\n\t\tthis.base64Data = base64Data;\n\t\tthis.mimeType = mimeType;\n\t\tthis.theme = theme;\n\t\tthis.options = options;\n\t\tthis.dimensions = dimensions || getImageDimensions(base64Data, mimeType) || { widthPx: 800, heightPx: 600 };\n\t\tthis.imageId = options.imageId;\n\t}\n\n\t/** Get the Kitty image ID used by this image (if any). */\n\tgetImageId(): number | undefined {\n\t\treturn this.imageId;\n\t}\n\n\tinvalidate(): void {\n\t\tthis.cachedLines = undefined;\n\t\tthis.cachedWidth = undefined;\n\t}\n\n\trender(width: number): string[] {\n\t\tif (this.cachedLines && this.cachedWidth === width) {\n\t\t\treturn this.cachedLines;\n\t\t}\n\n\t\tconst maxWidth = Math.max(1, Math.min(width - 2, this.options.maxWidthCells ?? 60));\n\t\tconst cellDimensions = getCellDimensions();\n\t\tconst defaultMaxHeight = Math.max(1, Math.ceil((maxWidth * cellDimensions.widthPx) / cellDimensions.heightPx));\n\t\tconst maxHeight = this.options.maxHeightCells ?? defaultMaxHeight;\n\n\t\tconst caps = getCapabilities();\n\t\tlet lines: string[];\n\n\t\tif (caps.images) {\n\t\t\tif (caps.images === \"kitty\" && this.imageId === undefined) {\n\t\t\t\tthis.imageId = allocateImageId();\n\t\t\t}\n\t\t\tconst result = renderImage(this.base64Data, this.dimensions, {\n\t\t\t\tmaxWidthCells: maxWidth,\n\t\t\t\tmaxHeightCells: maxHeight,\n\t\t\t\timageId: this.imageId,\n\t\t\t\tmoveCursor: false,\n\t\t\t});\n\n\t\t\tif (result) {\n\t\t\t\t// Store the image ID for later cleanup\n\t\t\t\tif (result.imageId) {\n\t\t\t\t\tthis.imageId = result.imageId;\n\t\t\t\t}\n\n\t\t\t\tif (caps.images === \"kitty\" && result.lines) {\n\t\t\t\t\t// Unicode placeholder placement (tmux passthrough): each row is a\n\t\t\t\t\t// real text line of placeholder cells; the first row also carries\n\t\t\t\t\t// the virtual-placement transmission.\n\t\t\t\t\tlines = result.lines;\n\t\t\t\t} else if (caps.images === \"kitty\") {\n\t\t\t\t\t// For Kitty: C=1 prevents cursor movement.\n\t\t\t\t\t// Don't need the cursor movement.\n\t\t\t\t\tlines = [result.sequence];\n\n\t\t\t\t\t// Return `rows` lines so TUI accounts for image height.\n\t\t\t\t\tfor (let i = 0; i < result.rows - 1; i++) {\n\t\t\t\t\t\tlines.push(\"\");\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// Return `rows` lines so TUI accounts for image height.\n\t\t\t\t\t// First (rows-1) lines are empty and cleared before the image is drawn.\n\t\t\t\t\t// Last line: move cursor back up, draw the image, then move back down\n\t\t\t\t\t// so TUI cursor accounting stays inside the scroll area.\n\t\t\t\t\tlines = [];\n\t\t\t\t\tfor (let i = 0; i < result.rows - 1; i++) {\n\t\t\t\t\t\tlines.push(\"\");\n\t\t\t\t\t}\n\t\t\t\t\tconst rowOffset = result.rows - 1;\n\t\t\t\t\tconst moveUp = rowOffset > 0 ? `\\x1b[${rowOffset}A` : \"\";\n\t\t\t\t\tlines.push(moveUp + result.sequence);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tconst fallback = imageFallback(this.mimeType, this.dimensions, this.options.filename);\n\t\t\t\tlines = [truncateToWidth(this.theme.fallbackColor(fallback), width)];\n\t\t\t}\n\t\t} else {\n\t\t\tconst fallback = imageFallback(this.mimeType, this.dimensions, this.options.filename);\n\t\t\tlines = [truncateToWidth(this.theme.fallbackColor(fallback), width)];\n\t\t}\n\n\t\tthis.cachedLines = lines;\n\t\tthis.cachedWidth = width;\n\n\t\treturn lines;\n\t}\n}\n"]}
@@ -48,6 +48,8 @@ export interface MarkdownOptions {
48
48
  preserveOrderedListMarkers?: boolean;
49
49
  /** Preserve source backslash escapes instead of normalizing escaped punctuation. */
50
50
  preserveBackslashEscapes?: boolean;
51
+ /** Transform source Markdown before parsing, with the exact width available for content. */
52
+ transform?: (markdown: string, availableWidth: number) => string;
51
53
  }
52
54
  export declare class Markdown implements Component {
53
55
  private text;
@@ -1 +1 @@
1
- {"version":3,"file":"markdown.d.ts","sourceRoot":"","sources":["../../src/components/markdown.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AA2V3C,wBAAgB,gBAAgB,IAAI,IAAI,CAKvC;AAED,wBAAgB,6BAA6B,IAAI,MAAM,CAEtD;AAED,wBAAgB,+BAA+B,IAAI,IAAI,CAEtD;AAED;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAChC,gCAAgC;IAChC,KAAK,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;IACjC,gCAAgC;IAChC,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;IACnC,gBAAgB;IAChB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,kBAAkB;IAClB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,yBAAyB;IACzB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,qBAAqB;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;;GAGG;AACH,MAAM,WAAW,aAAa;IAC7B,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;IAClC,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;IAC/B,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;IAClC,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;IAC/B,SAAS,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;IACpC,eAAe,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;IAC1C,KAAK,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAA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IACH,OAAO,CAAC,mBAAmB;IAY3B;;;;;OAKG;IACH,OAAO,CAAC,YAAY;IAIpB;;;OAGG;IACH,OAAO,CAAC,WAAW;CA6KnB"}
@@ -349,8 +349,9 @@ export class Markdown {
349
349
  }
350
350
  // Calculate available width for content (subtract horizontal padding)
351
351
  const contentWidth = Math.max(1, width - this.paddingX * 2);
352
+ const text = this.options.transform?.(this.text, contentWidth) ?? this.text;
352
353
  // Don't render anything if there's no actual text
353
- if (!this.text || this.text.trim() === "") {
354
+ if (!text || text.trim() === "") {
354
355
  const result = [];
355
356
  // Update cache
356
357
  this.cachedText = this.text;
@@ -359,7 +360,7 @@ export class Markdown {
359
360
  return result;
360
361
  }
361
362
  // Replace tabs with 3 spaces for consistent rendering
362
- const normalizedText = this.text.replace(/\t/g, " ");
363
+ const normalizedText = text.replace(/\t/g, " ");
363
364
  const normalizedContentKey = contentKey(normalizedText);
364
365
  const styleKey = this.defaultTextStyle ? objectId(this.defaultTextStyle) : -1;
365
366
  const renderKey = [