@code-yeongyu/senpi 2026.8.1 → 2026.8.3-3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1053) hide show
  1. package/CHANGELOG.md +74 -0
  2. package/README.md +10 -0
  3. package/dist/cli/args.d.ts +2 -0
  4. package/dist/cli/args.d.ts.map +1 -1
  5. package/dist/cli/args.js +28 -0
  6. package/dist/cli/args.js.map +1 -1
  7. package/dist/cli/credential-print.d.ts +23 -0
  8. package/dist/cli/credential-print.d.ts.map +1 -0
  9. package/dist/cli/credential-print.js +116 -0
  10. package/dist/cli/credential-print.js.map +1 -0
  11. package/dist/client/index.d.ts +3 -0
  12. package/dist/client/index.d.ts.map +1 -0
  13. package/dist/client/index.js +3 -0
  14. package/dist/client/index.js.map +1 -0
  15. package/dist/client/remote-session.d.ts +53 -0
  16. package/dist/client/remote-session.d.ts.map +1 -0
  17. package/dist/client/remote-session.js +340 -0
  18. package/dist/client/remote-session.js.map +1 -0
  19. package/dist/client/transcript.d.ts +12 -0
  20. package/dist/client/transcript.d.ts.map +1 -0
  21. package/dist/client/transcript.js +98 -0
  22. package/dist/client/transcript.js.map +1 -0
  23. package/dist/core/agent-session-runtime.d.ts.map +1 -1
  24. package/dist/core/agent-session-runtime.js +3 -0
  25. package/dist/core/agent-session-runtime.js.map +1 -1
  26. package/dist/core/agent-session.d.ts +40 -1
  27. package/dist/core/agent-session.d.ts.map +1 -1
  28. package/dist/core/agent-session.js +434 -53
  29. package/dist/core/agent-session.js.map +1 -1
  30. package/dist/core/auth-storage.d.ts +5 -0
  31. package/dist/core/auth-storage.d.ts.map +1 -1
  32. package/dist/core/auth-storage.js +72 -11
  33. package/dist/core/auth-storage.js.map +1 -1
  34. package/dist/core/dynamic-prompt/verification.d.ts +2 -2
  35. package/dist/core/dynamic-prompt/verification.d.ts.map +1 -1
  36. package/dist/core/dynamic-prompt/verification.js +2 -2
  37. package/dist/core/dynamic-prompt/verification.js.map +1 -1
  38. package/dist/core/extensions/builtin/claude-sdk-oauth/bounded-queue.d.ts +17 -0
  39. package/dist/core/extensions/builtin/claude-sdk-oauth/bounded-queue.d.ts.map +1 -0
  40. package/dist/core/extensions/builtin/claude-sdk-oauth/bounded-queue.js +56 -0
  41. package/dist/core/extensions/builtin/claude-sdk-oauth/bounded-queue.js.map +1 -0
  42. package/dist/core/extensions/builtin/claude-sdk-oauth/sdk-boundary.d.ts +1 -0
  43. package/dist/core/extensions/builtin/claude-sdk-oauth/sdk-boundary.d.ts.map +1 -1
  44. package/dist/core/extensions/builtin/claude-sdk-oauth/sdk-boundary.js.map +1 -1
  45. package/dist/core/extensions/builtin/claude-sdk-oauth/session-binding.d.ts +32 -0
  46. package/dist/core/extensions/builtin/claude-sdk-oauth/session-binding.d.ts.map +1 -0
  47. package/dist/core/extensions/builtin/claude-sdk-oauth/session-binding.js +43 -0
  48. package/dist/core/extensions/builtin/claude-sdk-oauth/session-binding.js.map +1 -0
  49. package/dist/core/extensions/builtin/claude-sdk-oauth/session-commit-boundary.d.ts +18 -0
  50. package/dist/core/extensions/builtin/claude-sdk-oauth/session-commit-boundary.d.ts.map +1 -0
  51. package/dist/core/extensions/builtin/claude-sdk-oauth/session-commit-boundary.js +46 -0
  52. package/dist/core/extensions/builtin/claude-sdk-oauth/session-commit-boundary.js.map +1 -0
  53. package/dist/core/extensions/builtin/claude-sdk-oauth/session-continuity.d.ts +81 -0
  54. package/dist/core/extensions/builtin/claude-sdk-oauth/session-continuity.d.ts.map +1 -0
  55. package/dist/core/extensions/builtin/claude-sdk-oauth/session-continuity.js +127 -0
  56. package/dist/core/extensions/builtin/claude-sdk-oauth/session-continuity.js.map +1 -0
  57. package/dist/core/extensions/builtin/claude-sdk-oauth/session-entry-annotations.d.ts +10 -0
  58. package/dist/core/extensions/builtin/claude-sdk-oauth/session-entry-annotations.d.ts.map +1 -0
  59. package/dist/core/extensions/builtin/claude-sdk-oauth/session-entry-annotations.js +34 -0
  60. package/dist/core/extensions/builtin/claude-sdk-oauth/session-entry-annotations.js.map +1 -0
  61. package/dist/core/extensions/builtin/claude-sdk-oauth/session-observability.d.ts +56 -0
  62. package/dist/core/extensions/builtin/claude-sdk-oauth/session-observability.d.ts.map +1 -0
  63. package/dist/core/extensions/builtin/claude-sdk-oauth/session-observability.js +174 -0
  64. package/dist/core/extensions/builtin/claude-sdk-oauth/session-observability.js.map +1 -0
  65. package/dist/core/extensions/builtin/claude-sdk-oauth/session-reaper.d.ts +24 -0
  66. package/dist/core/extensions/builtin/claude-sdk-oauth/session-reaper.d.ts.map +1 -0
  67. package/dist/core/extensions/builtin/claude-sdk-oauth/session-reaper.js +34 -0
  68. package/dist/core/extensions/builtin/claude-sdk-oauth/session-reaper.js.map +1 -0
  69. package/dist/core/extensions/builtin/claude-sdk-oauth/session-reattach.d.ts +34 -0
  70. package/dist/core/extensions/builtin/claude-sdk-oauth/session-reattach.d.ts.map +1 -0
  71. package/dist/core/extensions/builtin/claude-sdk-oauth/session-reattach.js +85 -0
  72. package/dist/core/extensions/builtin/claude-sdk-oauth/session-reattach.js.map +1 -0
  73. package/dist/core/extensions/builtin/claude-sdk-oauth/session-registry-pump.d.ts +2 -13
  74. package/dist/core/extensions/builtin/claude-sdk-oauth/session-registry-pump.d.ts.map +1 -1
  75. package/dist/core/extensions/builtin/claude-sdk-oauth/session-registry-pump.js +34 -55
  76. package/dist/core/extensions/builtin/claude-sdk-oauth/session-registry-pump.js.map +1 -1
  77. package/dist/core/extensions/builtin/claude-sdk-oauth/session-registry-wiring.d.ts.map +1 -1
  78. package/dist/core/extensions/builtin/claude-sdk-oauth/session-registry-wiring.js +35 -93
  79. package/dist/core/extensions/builtin/claude-sdk-oauth/session-registry-wiring.js.map +1 -1
  80. package/dist/core/extensions/builtin/claude-sdk-oauth/session-registry.d.ts +13 -11
  81. package/dist/core/extensions/builtin/claude-sdk-oauth/session-registry.d.ts.map +1 -1
  82. package/dist/core/extensions/builtin/claude-sdk-oauth/session-registry.js +44 -55
  83. package/dist/core/extensions/builtin/claude-sdk-oauth/session-registry.js.map +1 -1
  84. package/dist/core/extensions/builtin/claude-sdk-oauth/session-stream.d.ts +3 -1
  85. package/dist/core/extensions/builtin/claude-sdk-oauth/session-stream.d.ts.map +1 -1
  86. package/dist/core/extensions/builtin/claude-sdk-oauth/session-stream.js +101 -126
  87. package/dist/core/extensions/builtin/claude-sdk-oauth/session-stream.js.map +1 -1
  88. package/dist/core/extensions/builtin/claude-sdk-oauth/session-sync.d.ts +2 -31
  89. package/dist/core/extensions/builtin/claude-sdk-oauth/session-sync.d.ts.map +1 -1
  90. package/dist/core/extensions/builtin/claude-sdk-oauth/session-sync.js +26 -98
  91. package/dist/core/extensions/builtin/claude-sdk-oauth/session-sync.js.map +1 -1
  92. package/dist/core/extensions/builtin/claude-sdk-oauth/session-turn-claim.d.ts +14 -0
  93. package/dist/core/extensions/builtin/claude-sdk-oauth/session-turn-claim.d.ts.map +1 -0
  94. package/dist/core/extensions/builtin/claude-sdk-oauth/session-turn-claim.js +42 -0
  95. package/dist/core/extensions/builtin/claude-sdk-oauth/session-turn-claim.js.map +1 -0
  96. package/dist/core/extensions/builtin/claude-sdk-oauth/session-turn-types.d.ts +32 -0
  97. package/dist/core/extensions/builtin/claude-sdk-oauth/session-turn-types.d.ts.map +1 -0
  98. package/dist/core/extensions/builtin/claude-sdk-oauth/session-turn-types.js +8 -0
  99. package/dist/core/extensions/builtin/claude-sdk-oauth/session-turn-types.js.map +1 -0
  100. package/dist/core/extensions/builtin/claude-sdk-oauth/stream-events.d.ts +16 -0
  101. package/dist/core/extensions/builtin/claude-sdk-oauth/stream-events.d.ts.map +1 -0
  102. package/dist/core/extensions/builtin/claude-sdk-oauth/stream-events.js +92 -0
  103. package/dist/core/extensions/builtin/claude-sdk-oauth/stream-events.js.map +1 -0
  104. package/dist/core/extensions/builtin/claude-sdk-oauth/stream.d.ts.map +1 -1
  105. package/dist/core/extensions/builtin/claude-sdk-oauth/stream.js +48 -88
  106. package/dist/core/extensions/builtin/claude-sdk-oauth/stream.js.map +1 -1
  107. package/dist/core/extensions/builtin/claude-sdk-oauth/tools.d.ts +1 -0
  108. package/dist/core/extensions/builtin/claude-sdk-oauth/tools.d.ts.map +1 -1
  109. package/dist/core/extensions/builtin/claude-sdk-oauth/tools.js +1 -0
  110. package/dist/core/extensions/builtin/claude-sdk-oauth/tools.js.map +1 -1
  111. package/dist/core/extensions/builtin/compaction/checkpoint-state.d.ts +18 -1
  112. package/dist/core/extensions/builtin/compaction/checkpoint-state.d.ts.map +1 -1
  113. package/dist/core/extensions/builtin/compaction/checkpoint-state.js +32 -0
  114. package/dist/core/extensions/builtin/compaction/checkpoint-state.js.map +1 -1
  115. package/dist/core/extensions/builtin/compaction/deterministic-fallback.d.ts +1 -1
  116. package/dist/core/extensions/builtin/compaction/deterministic-fallback.d.ts.map +1 -1
  117. package/dist/core/extensions/builtin/compaction/deterministic-fallback.js +4 -0
  118. package/dist/core/extensions/builtin/compaction/deterministic-fallback.js.map +1 -1
  119. package/dist/core/extensions/builtin/compaction/idle-retry.d.ts +21 -0
  120. package/dist/core/extensions/builtin/compaction/idle-retry.d.ts.map +1 -0
  121. package/dist/core/extensions/builtin/compaction/idle-retry.js +24 -0
  122. package/dist/core/extensions/builtin/compaction/idle-retry.js.map +1 -0
  123. package/dist/core/extensions/builtin/compaction/index.d.ts.map +1 -1
  124. package/dist/core/extensions/builtin/compaction/index.js +91 -13
  125. package/dist/core/extensions/builtin/compaction/index.js.map +1 -1
  126. package/dist/core/extensions/builtin/compaction/lane-policy.d.ts +71 -0
  127. package/dist/core/extensions/builtin/compaction/lane-policy.d.ts.map +1 -0
  128. package/dist/core/extensions/builtin/compaction/lane-policy.js +94 -0
  129. package/dist/core/extensions/builtin/compaction/lane-policy.js.map +1 -0
  130. package/dist/core/extensions/builtin/compaction/log.d.ts.map +1 -1
  131. package/dist/core/extensions/builtin/compaction/log.js +1 -0
  132. package/dist/core/extensions/builtin/compaction/log.js.map +1 -1
  133. package/dist/core/extensions/builtin/compaction/overflow-retry.d.ts +59 -0
  134. package/dist/core/extensions/builtin/compaction/overflow-retry.d.ts.map +1 -0
  135. package/dist/core/extensions/builtin/compaction/overflow-retry.js +155 -0
  136. package/dist/core/extensions/builtin/compaction/overflow-retry.js.map +1 -0
  137. package/dist/core/extensions/builtin/compaction/speculative.d.ts.map +1 -1
  138. package/dist/core/extensions/builtin/compaction/speculative.js +17 -98
  139. package/dist/core/extensions/builtin/compaction/speculative.js.map +1 -1
  140. package/dist/core/extensions/builtin/compaction/transient-failure.d.ts.map +1 -1
  141. package/dist/core/extensions/builtin/compaction/transient-failure.js +3 -0
  142. package/dist/core/extensions/builtin/compaction/transient-failure.js.map +1 -1
  143. package/dist/core/extensions/builtin/goal/continuation.d.ts +2 -1
  144. package/dist/core/extensions/builtin/goal/continuation.d.ts.map +1 -1
  145. package/dist/core/extensions/builtin/goal/continuation.js +2 -1
  146. package/dist/core/extensions/builtin/goal/continuation.js.map +1 -1
  147. package/dist/core/extensions/builtin/goal/index.d.ts.map +1 -1
  148. package/dist/core/extensions/builtin/goal/index.js +14 -1
  149. package/dist/core/extensions/builtin/goal/index.js.map +1 -1
  150. package/dist/core/extensions/builtin/goal/monitor-continuation.d.ts +3 -2
  151. package/dist/core/extensions/builtin/goal/monitor-continuation.d.ts.map +1 -1
  152. package/dist/core/extensions/builtin/goal/monitor-continuation.js +89 -46
  153. package/dist/core/extensions/builtin/goal/monitor-continuation.js.map +1 -1
  154. package/dist/core/extensions/builtin/goal/wait-progress.d.ts +11 -0
  155. package/dist/core/extensions/builtin/goal/wait-progress.d.ts.map +1 -0
  156. package/dist/core/extensions/builtin/goal/wait-progress.js +30 -0
  157. package/dist/core/extensions/builtin/goal/wait-progress.js.map +1 -0
  158. package/dist/core/extensions/builtin/goal/wait-ticker.d.ts +38 -0
  159. package/dist/core/extensions/builtin/goal/wait-ticker.d.ts.map +1 -0
  160. package/dist/core/extensions/builtin/goal/wait-ticker.js +71 -0
  161. package/dist/core/extensions/builtin/goal/wait-ticker.js.map +1 -0
  162. package/dist/core/extensions/builtin/gpt-apply-patch/apply.d.ts +1 -0
  163. package/dist/core/extensions/builtin/gpt-apply-patch/apply.d.ts.map +1 -1
  164. package/dist/core/extensions/builtin/gpt-apply-patch/apply.js +13 -1
  165. package/dist/core/extensions/builtin/gpt-apply-patch/apply.js.map +1 -1
  166. package/dist/core/extensions/builtin/gpt-apply-patch/index.d.ts +1 -1
  167. package/dist/core/extensions/builtin/gpt-apply-patch/index.d.ts.map +1 -1
  168. package/dist/core/extensions/builtin/gpt-apply-patch/index.js +1 -1
  169. package/dist/core/extensions/builtin/gpt-apply-patch/index.js.map +1 -1
  170. package/dist/core/extensions/builtin/gpt-apply-patch/tool.d.ts +1 -0
  171. package/dist/core/extensions/builtin/gpt-apply-patch/tool.d.ts.map +1 -1
  172. package/dist/core/extensions/builtin/gpt-apply-patch/tool.js +23 -5
  173. package/dist/core/extensions/builtin/gpt-apply-patch/tool.js.map +1 -1
  174. package/dist/core/extensions/builtin/loop-guard/detectors.d.ts.map +1 -1
  175. package/dist/core/extensions/builtin/loop-guard/detectors.js +42 -1
  176. package/dist/core/extensions/builtin/loop-guard/detectors.js.map +1 -1
  177. package/dist/core/extensions/builtin/mcp/health.d.ts.map +1 -1
  178. package/dist/core/extensions/builtin/mcp/health.js +2 -1
  179. package/dist/core/extensions/builtin/mcp/health.js.map +1 -1
  180. package/dist/core/extensions/builtin/prompt-preset/gpt-5.6.d.ts +1 -1
  181. package/dist/core/extensions/builtin/prompt-preset/gpt-5.6.d.ts.map +1 -1
  182. package/dist/core/extensions/builtin/prompt-preset/gpt-5.6.js +5 -3
  183. package/dist/core/extensions/builtin/prompt-preset/gpt-5.6.js.map +1 -1
  184. package/dist/core/extensions/builtin/prompt-preset/kimi-k3.d.ts.map +1 -1
  185. package/dist/core/extensions/builtin/prompt-preset/kimi-k3.js +8 -1
  186. package/dist/core/extensions/builtin/prompt-preset/kimi-k3.js.map +1 -1
  187. package/dist/core/extensions/builtin/rules/config.d.ts +3 -0
  188. package/dist/core/extensions/builtin/rules/config.d.ts.map +1 -0
  189. package/dist/core/extensions/builtin/rules/config.js +24 -0
  190. package/dist/core/extensions/builtin/rules/config.js.map +1 -0
  191. package/dist/core/extensions/builtin/rules/index.d.ts.map +1 -1
  192. package/dist/core/extensions/builtin/rules/index.js +5 -3
  193. package/dist/core/extensions/builtin/rules/index.js.map +1 -1
  194. package/dist/core/extensions/builtin/rules/rules/formatter.d.ts.map +1 -1
  195. package/dist/core/extensions/builtin/rules/rules/formatter.js +21 -5
  196. package/dist/core/extensions/builtin/rules/rules/formatter.js.map +1 -1
  197. package/dist/core/extensions/builtin/rules/rules/types.d.ts +1 -1
  198. package/dist/core/extensions/builtin/rules/rules/types.js.map +1 -1
  199. package/dist/core/extensions/builtin/service-tier.d.ts.map +1 -1
  200. package/dist/core/extensions/builtin/service-tier.js +2 -3
  201. package/dist/core/extensions/builtin/service-tier.js.map +1 -1
  202. package/dist/core/extensions/builtin/terminal/tools/context.d.ts +1 -1
  203. package/dist/core/extensions/builtin/terminal/tools/context.d.ts.map +1 -1
  204. package/dist/core/extensions/builtin/terminal/tools/context.js.map +1 -1
  205. package/dist/core/extensions/builtin/terminal/tools/monitor.d.ts.map +1 -1
  206. package/dist/core/extensions/builtin/terminal/tools/monitor.js +1 -0
  207. package/dist/core/extensions/builtin/terminal/tools/monitor.js.map +1 -1
  208. package/dist/core/extensions/builtin/tool-pair-guard/index.d.ts.map +1 -1
  209. package/dist/core/extensions/builtin/tool-pair-guard/index.js +1 -1
  210. package/dist/core/extensions/builtin/tool-pair-guard/index.js.map +1 -1
  211. package/dist/core/extensions/index.d.ts +1 -1
  212. package/dist/core/extensions/index.d.ts.map +1 -1
  213. package/dist/core/extensions/index.js.map +1 -1
  214. package/dist/core/extensions/loader.d.ts.map +1 -1
  215. package/dist/core/extensions/loader.js +14 -18
  216. package/dist/core/extensions/loader.js.map +1 -1
  217. package/dist/core/extensions/runner.d.ts +4 -1
  218. package/dist/core/extensions/runner.d.ts.map +1 -1
  219. package/dist/core/extensions/runner.js +18 -0
  220. package/dist/core/extensions/runner.js.map +1 -1
  221. package/dist/core/extensions/types.d.ts +16 -1
  222. package/dist/core/extensions/types.d.ts.map +1 -1
  223. package/dist/core/extensions/types.js.map +1 -1
  224. package/dist/core/footer-data-provider.d.ts +10 -0
  225. package/dist/core/footer-data-provider.d.ts.map +1 -1
  226. package/dist/core/footer-data-provider.js +1 -1
  227. package/dist/core/footer-data-provider.js.map +1 -1
  228. package/dist/core/keybindings.d.ts +24 -0
  229. package/dist/core/keybindings.d.ts.map +1 -1
  230. package/dist/core/model-registry.d.ts +2 -1
  231. package/dist/core/model-registry.d.ts.map +1 -1
  232. package/dist/core/model-registry.js +3 -0
  233. package/dist/core/model-registry.js.map +1 -1
  234. package/dist/core/model-resolver.d.ts.map +1 -1
  235. package/dist/core/model-resolver.js +1 -0
  236. package/dist/core/model-resolver.js.map +1 -1
  237. package/dist/core/model-runtime.d.ts +2 -0
  238. package/dist/core/model-runtime.d.ts.map +1 -1
  239. package/dist/core/model-runtime.js +2 -2
  240. package/dist/core/model-runtime.js.map +1 -1
  241. package/dist/core/package-manager.d.ts +0 -1
  242. package/dist/core/package-manager.d.ts.map +1 -1
  243. package/dist/core/package-manager.js +18 -34
  244. package/dist/core/package-manager.js.map +1 -1
  245. package/dist/core/pi-manifest.d.ts +9 -0
  246. package/dist/core/pi-manifest.d.ts.map +1 -0
  247. package/dist/core/pi-manifest.js +25 -0
  248. package/dist/core/pi-manifest.js.map +1 -0
  249. package/dist/core/provider-composer.d.ts.map +1 -1
  250. package/dist/core/provider-composer.js +8 -3
  251. package/dist/core/provider-composer.js.map +1 -1
  252. package/dist/core/provider-display-names.d.ts.map +1 -1
  253. package/dist/core/provider-display-names.js +1 -0
  254. package/dist/core/provider-display-names.js.map +1 -1
  255. package/dist/core/resource-loader.d.ts +15 -0
  256. package/dist/core/resource-loader.d.ts.map +1 -1
  257. package/dist/core/resource-loader.js +55 -6
  258. package/dist/core/resource-loader.js.map +1 -1
  259. package/dist/core/retry-fallback/hint-policy.d.ts +29 -0
  260. package/dist/core/retry-fallback/hint-policy.d.ts.map +1 -0
  261. package/dist/core/retry-fallback/hint-policy.js +54 -0
  262. package/dist/core/retry-fallback/hint-policy.js.map +1 -0
  263. package/dist/core/retry-fallback/probe-scheduler.d.ts +60 -0
  264. package/dist/core/retry-fallback/probe-scheduler.d.ts.map +1 -0
  265. package/dist/core/retry-fallback/probe-scheduler.js +206 -0
  266. package/dist/core/retry-fallback/probe-scheduler.js.map +1 -0
  267. package/dist/core/retry-fallback/settings.d.ts +9 -0
  268. package/dist/core/retry-fallback/settings.d.ts.map +1 -1
  269. package/dist/core/retry-fallback/settings.js +14 -0
  270. package/dist/core/retry-fallback/settings.js.map +1 -1
  271. package/dist/core/session-log.js +1 -1
  272. package/dist/core/session-log.js.map +1 -1
  273. package/dist/core/settings-manager.d.ts +10 -1
  274. package/dist/core/settings-manager.d.ts.map +1 -1
  275. package/dist/core/settings-manager.js +21 -1
  276. package/dist/core/settings-manager.js.map +1 -1
  277. package/dist/extensions/llama/provider.js +1 -1
  278. package/dist/extensions/llama/provider.js.map +1 -1
  279. package/dist/index.d.ts +2 -2
  280. package/dist/index.d.ts.map +1 -1
  281. package/dist/index.js.map +1 -1
  282. package/dist/main.d.ts.map +1 -1
  283. package/dist/main.js +44 -0
  284. package/dist/main.js.map +1 -1
  285. package/dist/modes/interactive/components/assistant-message.d.ts +5 -2
  286. package/dist/modes/interactive/components/assistant-message.d.ts.map +1 -1
  287. package/dist/modes/interactive/components/assistant-message.js +16 -4
  288. package/dist/modes/interactive/components/assistant-message.js.map +1 -1
  289. package/dist/modes/interactive/components/continuity-notice.d.ts +21 -0
  290. package/dist/modes/interactive/components/continuity-notice.d.ts.map +1 -0
  291. package/dist/modes/interactive/components/continuity-notice.js +58 -0
  292. package/dist/modes/interactive/components/continuity-notice.js.map +1 -0
  293. package/dist/modes/interactive/components/custom-editor.d.ts +5 -0
  294. package/dist/modes/interactive/components/custom-editor.d.ts.map +1 -1
  295. package/dist/modes/interactive/components/custom-editor.js +22 -1
  296. package/dist/modes/interactive/components/custom-editor.js.map +1 -1
  297. package/dist/modes/interactive/components/markdown-transform.d.ts +3 -0
  298. package/dist/modes/interactive/components/markdown-transform.d.ts.map +1 -0
  299. package/dist/modes/interactive/components/markdown-transform.js +19 -0
  300. package/dist/modes/interactive/components/markdown-transform.js.map +1 -0
  301. package/dist/modes/interactive/components/model-selector.d.ts.map +1 -1
  302. package/dist/modes/interactive/components/model-selector.js +4 -1
  303. package/dist/modes/interactive/components/model-selector.js.map +1 -1
  304. package/dist/modes/interactive/components/settings-selector.d.ts +6 -2
  305. package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
  306. package/dist/modes/interactive/components/settings-selector.js +20 -0
  307. package/dist/modes/interactive/components/settings-selector.js.map +1 -1
  308. package/dist/modes/interactive/components/user-message.d.ts +3 -1
  309. package/dist/modes/interactive/components/user-message.d.ts.map +1 -1
  310. package/dist/modes/interactive/components/user-message.js +8 -2
  311. package/dist/modes/interactive/components/user-message.js.map +1 -1
  312. package/dist/modes/interactive/help-content.d.ts.map +1 -1
  313. package/dist/modes/interactive/help-content.js +1 -0
  314. package/dist/modes/interactive/help-content.js.map +1 -1
  315. package/dist/modes/interactive/interactive-mode.d.ts +21 -0
  316. package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  317. package/dist/modes/interactive/interactive-mode.js +151 -50
  318. package/dist/modes/interactive/interactive-mode.js.map +1 -1
  319. package/dist/modes/interactive/theme/dark.json +1 -0
  320. package/dist/modes/interactive/theme/grok-day.json +1 -0
  321. package/dist/modes/interactive/theme/grok-night.json +1 -0
  322. package/dist/modes/interactive/theme/light.json +1 -0
  323. package/dist/modes/interactive/theme/theme-schema.json +5 -1
  324. package/dist/modes/interactive/theme/theme.d.ts +2 -2
  325. package/dist/modes/interactive/theme/theme.d.ts.map +1 -1
  326. package/dist/modes/interactive/theme/theme.js +13 -3
  327. package/dist/modes/interactive/theme/theme.js.map +1 -1
  328. package/dist/modes/rpc/connection-handler.d.ts.map +1 -1
  329. package/dist/modes/rpc/connection-handler.js +13 -0
  330. package/dist/modes/rpc/connection-handler.js.map +1 -1
  331. package/dist/utils/clipboard.d.ts +1 -1
  332. package/dist/utils/clipboard.d.ts.map +1 -1
  333. package/dist/utils/clipboard.js +22 -2
  334. package/dist/utils/clipboard.js.map +1 -1
  335. package/docs/AGENTS.md +1 -6
  336. package/docs/custom-provider.md +10 -3
  337. package/docs/development.md +1 -2
  338. package/docs/extensions.md +24 -1
  339. package/docs/keybindings.md +13 -0
  340. package/docs/mcp.md +63 -4
  341. package/docs/models.md +1 -0
  342. package/docs/providers.md +39 -0
  343. package/docs/release-guide.md +5 -3
  344. package/docs/session-format.md +2 -0
  345. package/docs/settings.md +2 -0
  346. package/docs/skills.md +29 -0
  347. package/docs/themes.md +5 -3
  348. package/docs/usage.md +5 -0
  349. package/examples/extensions/custom-compaction.ts +1 -2
  350. package/examples/extensions/custom-provider-anthropic/index.ts +8 -2
  351. package/examples/extensions/doom-overlay/wad-finder.ts +7 -3
  352. package/examples/extensions/handoff.ts +2 -3
  353. package/examples/extensions/qna.ts +2 -2
  354. package/examples/rpc-extension-ui.ts +11 -2
  355. package/examples/sdk/02-custom-model.ts +1 -2
  356. package/examples/sdk/12-full-control.ts +2 -0
  357. package/node_modules/@code-yeongyu/senpi-codemode/CHANGELOG.md +36 -0
  358. package/node_modules/@code-yeongyu/senpi-codemode/package.json +4 -4
  359. package/node_modules/@earendil-works/pi-agent-core/dist/harness/agent-harness.d.ts +14 -3
  360. package/node_modules/@earendil-works/pi-agent-core/dist/harness/agent-harness.d.ts.map +1 -1
  361. package/node_modules/@earendil-works/pi-agent-core/dist/harness/agent-harness.js +156 -67
  362. package/node_modules/@earendil-works/pi-agent-core/dist/harness/agent-harness.js.map +1 -1
  363. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/array-session-reader.d.ts +3 -0
  364. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/array-session-reader.d.ts.map +1 -0
  365. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/array-session-reader.js +70 -0
  366. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/array-session-reader.js.map +1 -0
  367. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/fork.d.ts +4 -0
  368. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/fork.d.ts.map +1 -0
  369. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/fork.js +22 -0
  370. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/fork.js.map +1 -0
  371. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl-store.d.ts +13 -0
  372. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl-store.d.ts.map +1 -0
  373. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl-store.js +304 -0
  374. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl-store.js.map +1 -0
  375. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/keyed-operation-queue.d.ts +17 -0
  376. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/keyed-operation-queue.d.ts.map +1 -0
  377. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/keyed-operation-queue.js +60 -0
  378. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/keyed-operation-queue.js.map +1 -0
  379. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory-store.d.ts +6 -0
  380. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory-store.d.ts.map +1 -0
  381. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory-store.js +107 -0
  382. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory-store.js.map +1 -0
  383. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repository.d.ts +28 -0
  384. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repository.d.ts.map +1 -0
  385. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repository.js +61 -0
  386. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repository.js.map +1 -0
  387. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/search-backend.d.ts +8 -0
  388. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/search-backend.d.ts.map +1 -0
  389. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/search-backend.js +22 -0
  390. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/search-backend.js.map +1 -0
  391. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/session.d.ts +6 -10
  392. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/session.d.ts.map +1 -1
  393. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/session.js +154 -77
  394. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/session.js.map +1 -1
  395. package/node_modules/@earendil-works/pi-agent-core/dist/harness/types.d.ts +49 -23
  396. package/node_modules/@earendil-works/pi-agent-core/dist/harness/types.d.ts.map +1 -1
  397. package/node_modules/@earendil-works/pi-agent-core/dist/harness/types.js.map +1 -1
  398. package/node_modules/@earendil-works/pi-agent-core/dist/index.d.ts +6 -6
  399. package/node_modules/@earendil-works/pi-agent-core/dist/index.d.ts.map +1 -1
  400. package/node_modules/@earendil-works/pi-agent-core/dist/index.js +6 -6
  401. package/node_modules/@earendil-works/pi-agent-core/dist/index.js.map +1 -1
  402. package/node_modules/@earendil-works/pi-agent-core/dist/proxy.js +1 -1
  403. package/node_modules/@earendil-works/pi-agent-core/dist/proxy.js.map +1 -1
  404. package/node_modules/@earendil-works/pi-agent-core/package.json +4 -4
  405. package/node_modules/@earendil-works/pi-ai/README.md +5 -2
  406. package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.d.ts.map +1 -1
  407. package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.js +46 -10
  408. package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.js.map +1 -1
  409. package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-tool-pairs.d.ts +3 -0
  410. package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-tool-pairs.d.ts.map +1 -0
  411. package/{dist/core/extensions/builtin/tool-pair-guard/sanitize-anthropic-payload.js → node_modules/@earendil-works/pi-ai/dist/api/anthropic-tool-pairs.js} +3 -3
  412. package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-tool-pairs.js.map +1 -0
  413. package/node_modules/@earendil-works/pi-ai/dist/api/azure-openai-responses.d.ts.map +1 -1
  414. package/node_modules/@earendil-works/pi-ai/dist/api/azure-openai-responses.js +5 -1
  415. package/node_modules/@earendil-works/pi-ai/dist/api/azure-openai-responses.js.map +1 -1
  416. package/node_modules/@earendil-works/pi-ai/dist/api/bedrock-converse-stream.d.ts.map +1 -1
  417. package/node_modules/@earendil-works/pi-ai/dist/api/bedrock-converse-stream.js +64 -4
  418. package/node_modules/@earendil-works/pi-ai/dist/api/bedrock-converse-stream.js.map +1 -1
  419. package/node_modules/@earendil-works/pi-ai/dist/api/google-generative-ai.d.ts.map +1 -1
  420. package/node_modules/@earendil-works/pi-ai/dist/api/google-generative-ai.js +12 -2
  421. package/node_modules/@earendil-works/pi-ai/dist/api/google-generative-ai.js.map +1 -1
  422. package/node_modules/@earendil-works/pi-ai/dist/api/google-shared.d.ts.map +1 -1
  423. package/node_modules/@earendil-works/pi-ai/dist/api/google-shared.js +13 -6
  424. package/node_modules/@earendil-works/pi-ai/dist/api/google-shared.js.map +1 -1
  425. package/node_modules/@earendil-works/pi-ai/dist/api/google-vertex.d.ts.map +1 -1
  426. package/node_modules/@earendil-works/pi-ai/dist/api/google-vertex.js +12 -2
  427. package/node_modules/@earendil-works/pi-ai/dist/api/google-vertex.js.map +1 -1
  428. package/node_modules/@earendil-works/pi-ai/dist/api/mistral-conversations.d.ts.map +1 -1
  429. package/node_modules/@earendil-works/pi-ai/dist/api/mistral-conversations.js +19 -10
  430. package/node_modules/@earendil-works/pi-ai/dist/api/mistral-conversations.js.map +1 -1
  431. package/node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses.d.ts.map +1 -1
  432. package/node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses.js +84 -47
  433. package/node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses.js.map +1 -1
  434. package/node_modules/@earendil-works/pi-ai/dist/api/openai-completions.d.ts.map +1 -1
  435. package/node_modules/@earendil-works/pi-ai/dist/api/openai-completions.js +18 -9
  436. package/node_modules/@earendil-works/pi-ai/dist/api/openai-completions.js.map +1 -1
  437. package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses-shared.d.ts.map +1 -1
  438. package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses-shared.js +11 -1
  439. package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses-shared.js.map +1 -1
  440. package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses.d.ts.map +1 -1
  441. package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses.js +7 -3
  442. package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses.js.map +1 -1
  443. package/node_modules/@earendil-works/pi-ai/dist/api/openrouter-images.js +3 -2
  444. package/node_modules/@earendil-works/pi-ai/dist/api/openrouter-images.js.map +1 -1
  445. package/node_modules/@earendil-works/pi-ai/dist/api/pi-messages.js +2 -2
  446. package/node_modules/@earendil-works/pi-ai/dist/api/pi-messages.js.map +1 -1
  447. package/node_modules/@earendil-works/pi-ai/dist/api/simple-options.d.ts.map +1 -1
  448. package/node_modules/@earendil-works/pi-ai/dist/api/simple-options.js +1 -0
  449. package/node_modules/@earendil-works/pi-ai/dist/api/simple-options.js.map +1 -1
  450. package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/openrouter.d.ts +3 -1
  451. package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/openrouter.d.ts.map +1 -1
  452. package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/openrouter.js +81 -26
  453. package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/openrouter.js.map +1 -1
  454. package/node_modules/@earendil-works/pi-ai/dist/auth/resolve.d.ts +2 -0
  455. package/node_modules/@earendil-works/pi-ai/dist/auth/resolve.d.ts.map +1 -1
  456. package/node_modules/@earendil-works/pi-ai/dist/auth/resolve.js +16 -8
  457. package/node_modules/@earendil-works/pi-ai/dist/auth/resolve.js.map +1 -1
  458. package/node_modules/@earendil-works/pi-ai/dist/env-api-keys.d.ts.map +1 -1
  459. package/node_modules/@earendil-works/pi-ai/dist/env-api-keys.js +1 -0
  460. package/node_modules/@earendil-works/pi-ai/dist/env-api-keys.js.map +1 -1
  461. package/node_modules/@earendil-works/pi-ai/dist/index.d.ts +1 -0
  462. package/node_modules/@earendil-works/pi-ai/dist/index.d.ts.map +1 -1
  463. package/node_modules/@earendil-works/pi-ai/dist/index.js +1 -0
  464. package/node_modules/@earendil-works/pi-ai/dist/index.js.map +1 -1
  465. package/node_modules/@earendil-works/pi-ai/dist/models.js +1 -1
  466. package/node_modules/@earendil-works/pi-ai/dist/models.js.map +1 -1
  467. package/node_modules/@earendil-works/pi-ai/dist/providers/all.d.ts +2 -1
  468. package/node_modules/@earendil-works/pi-ai/dist/providers/all.d.ts.map +1 -1
  469. package/node_modules/@earendil-works/pi-ai/dist/providers/all.js +3 -1
  470. package/node_modules/@earendil-works/pi-ai/dist/providers/all.js.map +1 -1
  471. package/node_modules/@earendil-works/pi-ai/dist/providers/data/.manifest.json +1 -1
  472. package/node_modules/@earendil-works/pi-ai/dist/providers/data/cloudflare-ai-gateway.json +1 -1
  473. package/node_modules/@earendil-works/pi-ai/dist/providers/data/fireworks.json +1 -1
  474. package/node_modules/@earendil-works/pi-ai/dist/providers/data/github-copilot.json +1 -1
  475. package/node_modules/@earendil-works/pi-ai/dist/providers/data/huggingface.json +1 -1
  476. package/node_modules/@earendil-works/pi-ai/dist/providers/data/mistral.json +1 -1
  477. package/node_modules/@earendil-works/pi-ai/dist/providers/data/openai-codex.json +1 -1
  478. package/node_modules/@earendil-works/pi-ai/dist/providers/data/openai.json +1 -1
  479. package/node_modules/@earendil-works/pi-ai/dist/providers/data/opencode-go.json +1 -1
  480. package/node_modules/@earendil-works/pi-ai/dist/providers/data/opencode.json +1 -1
  481. package/node_modules/@earendil-works/pi-ai/dist/providers/data/openrouter.json +1 -1
  482. package/node_modules/@earendil-works/pi-ai/dist/providers/data/qwen-token-plan-cn.json +1 -1
  483. package/node_modules/@earendil-works/pi-ai/dist/providers/data/qwen-token-plan.json +1 -1
  484. package/node_modules/@earendil-works/pi-ai/dist/providers/data/together.json +1 -1
  485. package/node_modules/@earendil-works/pi-ai/dist/providers/data/vercel-ai-gateway.json +1 -1
  486. package/node_modules/@earendil-works/pi-ai/dist/providers/data/zai-coding-cn.json +1 -1
  487. package/node_modules/@earendil-works/pi-ai/dist/providers/data/zai.json +1 -1
  488. package/node_modules/@earendil-works/pi-ai/dist/providers/faux.d.ts.map +1 -1
  489. package/node_modules/@earendil-works/pi-ai/dist/providers/faux.js +4 -1
  490. package/node_modules/@earendil-works/pi-ai/dist/providers/faux.js.map +1 -1
  491. package/node_modules/@earendil-works/pi-ai/dist/providers/ollama.d.ts +9 -0
  492. package/node_modules/@earendil-works/pi-ai/dist/providers/ollama.d.ts.map +1 -0
  493. package/node_modules/@earendil-works/pi-ai/dist/providers/ollama.js +142 -0
  494. package/node_modules/@earendil-works/pi-ai/dist/providers/ollama.js.map +1 -0
  495. package/node_modules/@earendil-works/pi-ai/dist/providers/opencode-go.js +1 -1
  496. package/node_modules/@earendil-works/pi-ai/dist/providers/opencode-go.js.map +1 -1
  497. package/node_modules/@earendil-works/pi-ai/dist/types.d.ts +14 -2
  498. package/node_modules/@earendil-works/pi-ai/dist/types.d.ts.map +1 -1
  499. package/node_modules/@earendil-works/pi-ai/dist/types.js.map +1 -1
  500. package/node_modules/@earendil-works/pi-ai/dist/utils/error-body.d.ts.map +1 -1
  501. package/node_modules/@earendil-works/pi-ai/dist/utils/error-body.js +23 -4
  502. package/node_modules/@earendil-works/pi-ai/dist/utils/error-body.js.map +1 -1
  503. package/node_modules/@earendil-works/pi-ai/dist/utils/prompt-cache-ttl.d.ts.map +1 -1
  504. package/node_modules/@earendil-works/pi-ai/dist/utils/prompt-cache-ttl.js +10 -1
  505. package/node_modules/@earendil-works/pi-ai/dist/utils/prompt-cache-ttl.js.map +1 -1
  506. package/node_modules/@earendil-works/pi-ai/dist/utils/provider-retry.d.ts +3 -0
  507. package/node_modules/@earendil-works/pi-ai/dist/utils/provider-retry.d.ts.map +1 -1
  508. package/node_modules/@earendil-works/pi-ai/dist/utils/provider-retry.js +13 -12
  509. package/node_modules/@earendil-works/pi-ai/dist/utils/provider-retry.js.map +1 -1
  510. package/node_modules/@earendil-works/pi-ai/dist/utils/retry-hint.d.ts +24 -0
  511. package/node_modules/@earendil-works/pi-ai/dist/utils/retry-hint.d.ts.map +1 -0
  512. package/node_modules/@earendil-works/pi-ai/dist/utils/retry-hint.js +233 -0
  513. package/node_modules/@earendil-works/pi-ai/dist/utils/retry-hint.js.map +1 -0
  514. package/node_modules/@earendil-works/pi-ai/package.json +10 -6
  515. package/node_modules/@earendil-works/pi-pty/package.json +2 -2
  516. package/node_modules/@earendil-works/pi-tui/README.md +77 -14
  517. package/node_modules/@earendil-works/pi-tui/dist/TuiAltScreen.d.ts +83 -0
  518. package/node_modules/@earendil-works/pi-tui/dist/TuiAltScreen.d.ts.map +1 -0
  519. package/node_modules/@earendil-works/pi-tui/dist/TuiAltScreen.js +687 -0
  520. package/node_modules/@earendil-works/pi-tui/dist/TuiAltScreen.js.map +1 -0
  521. package/node_modules/@earendil-works/pi-tui/dist/TuiMainScreen.d.ts +5 -0
  522. package/node_modules/@earendil-works/pi-tui/dist/TuiMainScreen.d.ts.map +1 -0
  523. package/node_modules/@earendil-works/pi-tui/dist/TuiMainScreen.js +5 -0
  524. package/node_modules/@earendil-works/pi-tui/dist/TuiMainScreen.js.map +1 -0
  525. package/node_modules/@earendil-works/pi-tui/dist/components/alt-screen-flash.d.ts +13 -0
  526. package/node_modules/@earendil-works/pi-tui/dist/components/alt-screen-flash.d.ts.map +1 -0
  527. package/node_modules/@earendil-works/pi-tui/dist/components/alt-screen-flash.js +36 -0
  528. package/node_modules/@earendil-works/pi-tui/dist/components/alt-screen-flash.js.map +1 -0
  529. package/node_modules/@earendil-works/pi-tui/dist/components/editor.d.ts.map +1 -1
  530. package/node_modules/@earendil-works/pi-tui/dist/components/editor.js +5 -1
  531. package/node_modules/@earendil-works/pi-tui/dist/components/editor.js.map +1 -1
  532. package/node_modules/@earendil-works/pi-tui/dist/components/h-stack.d.ts +7 -0
  533. package/node_modules/@earendil-works/pi-tui/dist/components/h-stack.d.ts.map +1 -0
  534. package/node_modules/@earendil-works/pi-tui/dist/components/h-stack.js +43 -0
  535. package/node_modules/@earendil-works/pi-tui/dist/components/h-stack.js.map +1 -0
  536. package/node_modules/@earendil-works/pi-tui/dist/components/image.d.ts.map +1 -1
  537. package/node_modules/@earendil-works/pi-tui/dist/components/image.js +4 -4
  538. package/node_modules/@earendil-works/pi-tui/dist/components/image.js.map +1 -1
  539. package/node_modules/@earendil-works/pi-tui/dist/components/markdown.d.ts +2 -0
  540. package/node_modules/@earendil-works/pi-tui/dist/components/markdown.d.ts.map +1 -1
  541. package/node_modules/@earendil-works/pi-tui/dist/components/markdown.js +3 -2
  542. package/node_modules/@earendil-works/pi-tui/dist/components/markdown.js.map +1 -1
  543. package/node_modules/@earendil-works/pi-tui/dist/components/scroll-view.d.ts +51 -0
  544. package/node_modules/@earendil-works/pi-tui/dist/components/scroll-view.d.ts.map +1 -0
  545. package/node_modules/@earendil-works/pi-tui/dist/components/scroll-view.js +163 -0
  546. package/node_modules/@earendil-works/pi-tui/dist/components/scroll-view.js.map +1 -0
  547. package/node_modules/@earendil-works/pi-tui/dist/components/settings-list.d.ts.map +1 -1
  548. package/node_modules/@earendil-works/pi-tui/dist/components/settings-list.js +3 -6
  549. package/node_modules/@earendil-works/pi-tui/dist/components/settings-list.js.map +1 -1
  550. package/node_modules/@earendil-works/pi-tui/dist/components/stack.d.ts +32 -0
  551. package/node_modules/@earendil-works/pi-tui/dist/components/stack.d.ts.map +1 -0
  552. package/node_modules/@earendil-works/pi-tui/dist/components/stack.js +109 -0
  553. package/node_modules/@earendil-works/pi-tui/dist/components/stack.js.map +1 -0
  554. package/node_modules/@earendil-works/pi-tui/dist/components/v-stack.d.ts +8 -0
  555. package/node_modules/@earendil-works/pi-tui/dist/components/v-stack.d.ts.map +1 -0
  556. package/node_modules/@earendil-works/pi-tui/dist/components/v-stack.js +21 -0
  557. package/node_modules/@earendil-works/pi-tui/dist/components/v-stack.js.map +1 -0
  558. package/node_modules/@earendil-works/pi-tui/dist/index.d.ts +10 -4
  559. package/node_modules/@earendil-works/pi-tui/dist/index.d.ts.map +1 -1
  560. package/node_modules/@earendil-works/pi-tui/dist/index.js +10 -4
  561. package/node_modules/@earendil-works/pi-tui/dist/index.js.map +1 -1
  562. package/node_modules/@earendil-works/pi-tui/dist/keybindings.d.ts +30 -0
  563. package/node_modules/@earendil-works/pi-tui/dist/keybindings.d.ts.map +1 -1
  564. package/node_modules/@earendil-works/pi-tui/dist/keybindings.js +18 -0
  565. package/node_modules/@earendil-works/pi-tui/dist/keybindings.js.map +1 -1
  566. package/node_modules/@earendil-works/pi-tui/dist/layout-node.d.ts +40 -0
  567. package/node_modules/@earendil-works/pi-tui/dist/layout-node.d.ts.map +1 -0
  568. package/node_modules/@earendil-works/pi-tui/dist/layout-node.js +6 -0
  569. package/node_modules/@earendil-works/pi-tui/dist/layout-node.js.map +1 -0
  570. package/node_modules/@earendil-works/pi-tui/dist/layout.d.ts +40 -0
  571. package/node_modules/@earendil-works/pi-tui/dist/layout.d.ts.map +1 -0
  572. package/node_modules/@earendil-works/pi-tui/dist/layout.js +315 -0
  573. package/node_modules/@earendil-works/pi-tui/dist/layout.js.map +1 -0
  574. package/node_modules/@earendil-works/pi-tui/dist/slash-command-autocomplete.d.ts.map +1 -1
  575. package/node_modules/@earendil-works/pi-tui/dist/slash-command-autocomplete.js +36 -8
  576. package/node_modules/@earendil-works/pi-tui/dist/slash-command-autocomplete.js.map +1 -1
  577. package/node_modules/@earendil-works/pi-tui/dist/terminal-image.d.ts +10 -0
  578. package/node_modules/@earendil-works/pi-tui/dist/terminal-image.d.ts.map +1 -1
  579. package/node_modules/@earendil-works/pi-tui/dist/terminal-image.js +61 -3
  580. package/node_modules/@earendil-works/pi-tui/dist/terminal-image.js.map +1 -1
  581. package/node_modules/@earendil-works/pi-tui/dist/terminal-text.d.ts +1 -0
  582. package/node_modules/@earendil-works/pi-tui/dist/terminal-text.d.ts.map +1 -1
  583. package/node_modules/@earendil-works/pi-tui/dist/terminal-text.js +12 -2
  584. package/node_modules/@earendil-works/pi-tui/dist/terminal-text.js.map +1 -1
  585. package/node_modules/@earendil-works/pi-tui/dist/tui.d.ts +38 -16
  586. package/node_modules/@earendil-works/pi-tui/dist/tui.d.ts.map +1 -1
  587. package/node_modules/@earendil-works/pi-tui/dist/tui.js +121 -51
  588. package/node_modules/@earendil-works/pi-tui/dist/tui.js.map +1 -1
  589. package/node_modules/@earendil-works/pi-tui/dist/utils.d.ts +10 -0
  590. package/node_modules/@earendil-works/pi-tui/dist/utils.d.ts.map +1 -1
  591. package/node_modules/@earendil-works/pi-tui/dist/utils.js +95 -4
  592. package/node_modules/@earendil-works/pi-tui/dist/utils.js.map +1 -1
  593. package/node_modules/@earendil-works/pi-tui/package.json +2 -2
  594. package/node_modules/typebox/build/compile/validator.d.mts +3 -11
  595. package/node_modules/typebox/build/compile/validator.mjs +6 -36
  596. package/node_modules/typebox/build/error/errors.d.mts +1 -7
  597. package/node_modules/typebox/build/format/_idna.mjs +36 -6
  598. package/node_modules/typebox/build/format/_puny.mjs +4 -1
  599. package/node_modules/typebox/build/format/uuid.d.mts +2 -2
  600. package/node_modules/typebox/build/format/uuid.mjs +3 -3
  601. package/node_modules/typebox/build/guard/emit.d.mts +0 -4
  602. package/node_modules/typebox/build/guard/emit.mjs +0 -8
  603. package/node_modules/typebox/build/guard/guard.d.mts +5 -9
  604. package/node_modules/typebox/build/guard/guard.mjs +10 -15
  605. package/node_modules/typebox/build/guard/string.mjs +16 -4
  606. package/node_modules/typebox/build/schema/engine/_functions.mjs +34 -15
  607. package/node_modules/typebox/build/schema/engine/boolean.d.mts +3 -3
  608. package/node_modules/typebox/build/schema/engine/boolean.mjs +4 -4
  609. package/node_modules/typebox/build/schema/engine/index.d.mts +0 -1
  610. package/node_modules/typebox/build/schema/engine/index.mjs +0 -1
  611. package/node_modules/typebox/build/schema/engine/schema.mjs +6 -11
  612. package/node_modules/typebox/build/schema/engine/type.mjs +14 -18
  613. package/node_modules/typebox/build/schema/types/dependencies.mjs +1 -1
  614. package/node_modules/typebox/build/schema/types/index.d.mts +0 -1
  615. package/node_modules/typebox/build/schema/types/index.mjs +0 -1
  616. package/node_modules/typebox/build/schema/types/schema.d.mts +1 -1
  617. package/node_modules/typebox/build/schema/types/schema.mjs +2 -2
  618. package/node_modules/typebox/build/system/locale/ar_001.mjs +0 -1
  619. package/node_modules/typebox/build/system/locale/bn_BD.mjs +0 -1
  620. package/node_modules/typebox/build/system/locale/cs_CZ.mjs +0 -1
  621. package/node_modules/typebox/build/system/locale/de_DE.mjs +0 -1
  622. package/node_modules/typebox/build/system/locale/el_GR.mjs +0 -1
  623. package/node_modules/typebox/build/system/locale/en_US.mjs +0 -1
  624. package/node_modules/typebox/build/system/locale/es_419.mjs +0 -1
  625. package/node_modules/typebox/build/system/locale/es_AR.mjs +0 -1
  626. package/node_modules/typebox/build/system/locale/es_ES.mjs +0 -1
  627. package/node_modules/typebox/build/system/locale/es_MX.mjs +0 -1
  628. package/node_modules/typebox/build/system/locale/fa_IR.mjs +0 -1
  629. package/node_modules/typebox/build/system/locale/fil_PH.mjs +0 -1
  630. package/node_modules/typebox/build/system/locale/fr_CA.mjs +0 -1
  631. package/node_modules/typebox/build/system/locale/fr_FR.mjs +0 -1
  632. package/node_modules/typebox/build/system/locale/ha_NG.mjs +0 -1
  633. package/node_modules/typebox/build/system/locale/hi_IN.mjs +0 -1
  634. package/node_modules/typebox/build/system/locale/hu_HU.mjs +0 -1
  635. package/node_modules/typebox/build/system/locale/id_ID.mjs +0 -1
  636. package/node_modules/typebox/build/system/locale/it_IT.mjs +0 -1
  637. package/node_modules/typebox/build/system/locale/ja_JP.mjs +0 -1
  638. package/node_modules/typebox/build/system/locale/ko_KR.mjs +0 -1
  639. package/node_modules/typebox/build/system/locale/ms_MY.mjs +0 -1
  640. package/node_modules/typebox/build/system/locale/nl_NL.mjs +0 -1
  641. package/node_modules/typebox/build/system/locale/pl_PL.mjs +0 -1
  642. package/node_modules/typebox/build/system/locale/pt_BR.mjs +0 -1
  643. package/node_modules/typebox/build/system/locale/pt_PT.mjs +0 -1
  644. package/node_modules/typebox/build/system/locale/ro_RO.mjs +0 -1
  645. package/node_modules/typebox/build/system/locale/ru_RU.mjs +0 -1
  646. package/node_modules/typebox/build/system/locale/sv_SE.mjs +0 -1
  647. package/node_modules/typebox/build/system/locale/sw_TZ.mjs +0 -1
  648. package/node_modules/typebox/build/system/locale/th_TH.mjs +0 -1
  649. package/node_modules/typebox/build/system/locale/tr_TR.mjs +0 -1
  650. package/node_modules/typebox/build/system/locale/uk_UA.mjs +0 -1
  651. package/node_modules/typebox/build/system/locale/ur_PK.mjs +0 -1
  652. package/node_modules/typebox/build/system/locale/vi_VN.mjs +0 -1
  653. package/node_modules/typebox/build/system/locale/yo_NG.mjs +0 -1
  654. package/node_modules/typebox/build/system/locale/zh_Hans.mjs +0 -1
  655. package/node_modules/typebox/build/system/locale/zh_Hant.mjs +0 -1
  656. package/node_modules/typebox/build/system/memory/clone.d.mts +2 -3
  657. package/node_modules/typebox/build/system/memory/clone.mjs +73 -26
  658. package/node_modules/typebox/build/system/settings/settings.d.mts +15 -0
  659. package/node_modules/typebox/build/system/settings/settings.mjs +3 -1
  660. package/node_modules/typebox/build/type/action/_add_immutable.d.mts +11 -0
  661. package/node_modules/typebox/build/type/action/_add_immutable.mjs +11 -0
  662. package/node_modules/typebox/build/type/action/_add_optional.d.mts +11 -0
  663. package/node_modules/typebox/build/type/action/_add_optional.mjs +11 -0
  664. package/node_modules/typebox/build/type/action/_add_readonly.d.mts +11 -0
  665. package/node_modules/typebox/build/type/action/_add_readonly.mjs +11 -0
  666. package/node_modules/typebox/build/type/action/_remove_immutable.d.mts +11 -0
  667. package/node_modules/typebox/build/type/action/_remove_immutable.mjs +11 -0
  668. package/node_modules/typebox/build/type/action/_remove_optional.d.mts +11 -0
  669. package/node_modules/typebox/build/type/action/_remove_optional.mjs +11 -0
  670. package/node_modules/typebox/build/type/action/_remove_readonly.d.mts +11 -0
  671. package/node_modules/typebox/build/type/action/_remove_readonly.mjs +11 -0
  672. package/node_modules/typebox/build/type/action/conditional.d.mts +2 -3
  673. package/node_modules/typebox/build/type/action/conditional.mjs +2 -1
  674. package/node_modules/typebox/build/type/action/index.d.mts +7 -4
  675. package/node_modules/typebox/build/type/action/index.mjs +7 -4
  676. package/node_modules/typebox/build/type/action/mapped.d.mts +2 -3
  677. package/node_modules/typebox/build/type/action/mapped.mjs +2 -1
  678. package/node_modules/typebox/build/type/action/module.d.mts +8 -7
  679. package/node_modules/typebox/build/type/action/module.mjs +7 -6
  680. package/node_modules/typebox/build/type/action/readonly_object.mjs +3 -0
  681. package/node_modules/typebox/build/type/action/with.d.mts +11 -0
  682. package/node_modules/typebox/build/type/action/with.mjs +11 -0
  683. package/node_modules/typebox/build/type/engine/call/distribute_arguments.mjs +1 -1
  684. package/node_modules/typebox/build/type/engine/call/instantiate.d.mts +1 -3
  685. package/node_modules/typebox/build/type/engine/call/instantiate.mjs +3 -2
  686. package/node_modules/typebox/build/type/engine/call/resolve_arguments.mjs +2 -2
  687. package/node_modules/typebox/build/type/engine/constructor_parameters/instantiate.d.mts +3 -4
  688. package/node_modules/typebox/build/type/engine/constructor_parameters/instantiate.mjs +2 -1
  689. package/node_modules/typebox/build/type/engine/cyclic/candidates.d.mts +2 -3
  690. package/node_modules/typebox/build/type/engine/cyclic/candidates.mjs +3 -6
  691. package/node_modules/typebox/build/type/engine/cyclic/check.d.mts +6 -9
  692. package/node_modules/typebox/build/type/engine/cyclic/check.mjs +10 -16
  693. package/node_modules/typebox/build/type/engine/cyclic/dependencies.d.mts +1 -4
  694. package/node_modules/typebox/build/type/engine/cyclic/dependencies.mjs +9 -15
  695. package/node_modules/typebox/build/type/engine/cyclic/extends.d.mts +1 -4
  696. package/node_modules/typebox/build/type/engine/cyclic/extends.mjs +8 -14
  697. package/node_modules/typebox/build/type/engine/cyclic/instantiate.d.mts +2 -5
  698. package/node_modules/typebox/build/type/engine/cyclic/instantiate.mjs +3 -2
  699. package/node_modules/typebox/build/type/engine/enum/index.d.mts +0 -1
  700. package/node_modules/typebox/build/type/engine/enum/index.mjs +0 -1
  701. package/node_modules/typebox/build/type/engine/evaluate/broaden.d.mts +1 -2
  702. package/node_modules/typebox/build/type/engine/evaluate/broaden.mjs +2 -6
  703. package/node_modules/typebox/build/type/engine/evaluate/composite.d.mts +10 -6
  704. package/node_modules/typebox/build/type/engine/evaluate/composite.mjs +10 -6
  705. package/node_modules/typebox/build/type/engine/evaluate/distribute.d.mts +2 -1
  706. package/node_modules/typebox/build/type/engine/evaluate/distribute.mjs +3 -3
  707. package/node_modules/typebox/build/type/engine/evaluate/evaluate.d.mts +17 -5
  708. package/node_modules/typebox/build/type/engine/evaluate/evaluate.mjs +34 -8
  709. package/node_modules/typebox/build/type/engine/exclude/operation.d.mts +5 -6
  710. package/node_modules/typebox/build/type/engine/exclude/operation.mjs +11 -12
  711. package/node_modules/typebox/build/type/engine/extract/operation.d.mts +5 -6
  712. package/node_modules/typebox/build/type/engine/extract/operation.mjs +11 -12
  713. package/node_modules/typebox/build/type/engine/immutable/instantiate_add.d.mts +10 -0
  714. package/node_modules/typebox/build/type/engine/immutable/instantiate_add.mjs +14 -0
  715. package/node_modules/typebox/build/type/engine/immutable/instantiate_remove.d.mts +10 -0
  716. package/node_modules/typebox/build/type/engine/immutable/instantiate_remove.mjs +14 -0
  717. package/node_modules/typebox/build/type/engine/index.d.mts +2 -2
  718. package/node_modules/typebox/build/type/engine/index.mjs +2 -2
  719. package/node_modules/typebox/build/type/engine/indexable/from_dependent.d.mts +5 -0
  720. package/node_modules/typebox/build/type/engine/indexable/from_dependent.mjs +8 -0
  721. package/node_modules/typebox/build/type/engine/indexable/from_enum.d.mts +3 -3
  722. package/node_modules/typebox/build/type/engine/indexable/from_enum.mjs +4 -4
  723. package/node_modules/typebox/build/type/engine/indexable/from_template_literal.d.mts +2 -2
  724. package/node_modules/typebox/build/type/engine/indexable/from_template_literal.mjs +3 -3
  725. package/node_modules/typebox/build/type/engine/indexable/from_type.d.mts +3 -1
  726. package/node_modules/typebox/build/type/engine/indexable/from_type.mjs +9 -6
  727. package/node_modules/typebox/build/type/engine/indexed/instantiate.d.mts +2 -1
  728. package/node_modules/typebox/build/type/engine/indexed/instantiate.mjs +5 -2
  729. package/node_modules/typebox/build/type/engine/instantiate.d.mts +44 -31
  730. package/node_modules/typebox/build/type/engine/instantiate.mjs +82 -83
  731. package/node_modules/typebox/build/type/engine/interface/instantiate.d.mts +3 -6
  732. package/node_modules/typebox/build/type/engine/intrinsics/from_template_literal.d.mts +2 -2
  733. package/node_modules/typebox/build/type/engine/intrinsics/from_template_literal.mjs +3 -3
  734. package/node_modules/typebox/build/type/engine/keyof/instantiate.d.mts +2 -1
  735. package/node_modules/typebox/build/type/engine/keyof/instantiate.mjs +5 -1
  736. package/node_modules/typebox/build/type/engine/mapped/mapped_operation.d.mts +4 -4
  737. package/node_modules/typebox/build/type/engine/mapped/mapped_operation.mjs +3 -3
  738. package/node_modules/typebox/build/type/engine/mapped/mapped_variants.d.mts +5 -4
  739. package/node_modules/typebox/build/type/engine/mapped/mapped_variants.mjs +10 -5
  740. package/node_modules/typebox/build/type/engine/module/instantiate.d.mts +7 -9
  741. package/node_modules/typebox/build/type/engine/module/instantiate.mjs +17 -15
  742. package/node_modules/typebox/build/type/engine/object/from_dependent.d.mts +5 -0
  743. package/node_modules/typebox/build/type/engine/object/from_dependent.mjs +8 -0
  744. package/node_modules/typebox/build/type/engine/object/from_type.d.mts +3 -1
  745. package/node_modules/typebox/build/type/engine/object/from_type.mjs +8 -5
  746. package/node_modules/typebox/build/type/engine/object/from_union.mjs +2 -2
  747. package/node_modules/typebox/build/type/engine/optional/instantiate_add.d.mts +10 -0
  748. package/node_modules/typebox/build/type/engine/optional/instantiate_add.mjs +14 -0
  749. package/node_modules/typebox/build/type/engine/optional/instantiate_remove.d.mts +10 -0
  750. package/node_modules/typebox/build/type/engine/optional/instantiate_remove.mjs +14 -0
  751. package/node_modules/typebox/build/type/engine/parameters/instantiate.d.mts +3 -4
  752. package/node_modules/typebox/build/type/engine/parameters/instantiate.mjs +2 -1
  753. package/node_modules/typebox/build/type/engine/partial/from_dependent.d.mts +5 -0
  754. package/node_modules/typebox/build/type/engine/partial/from_dependent.mjs +8 -0
  755. package/node_modules/typebox/build/type/engine/partial/from_intersect.d.mts +1 -1
  756. package/node_modules/typebox/build/type/engine/partial/from_intersect.mjs +3 -2
  757. package/node_modules/typebox/build/type/engine/partial/from_object.d.mts +2 -2
  758. package/node_modules/typebox/build/type/engine/partial/from_object.mjs +2 -2
  759. package/node_modules/typebox/build/type/engine/partial/from_type.d.mts +3 -1
  760. package/node_modules/typebox/build/type/engine/partial/from_type.mjs +7 -4
  761. package/node_modules/typebox/build/type/engine/priority/index.d.mts +1 -0
  762. package/node_modules/typebox/build/type/engine/priority/index.mjs +1 -0
  763. package/node_modules/typebox/build/type/engine/priority/priority.d.mts +20 -0
  764. package/node_modules/typebox/build/type/engine/priority/priority.mjs +28 -0
  765. package/node_modules/typebox/build/type/engine/readonly/instantiate_add.d.mts +10 -0
  766. package/node_modules/typebox/build/type/engine/readonly/instantiate_add.mjs +14 -0
  767. package/node_modules/typebox/build/type/engine/readonly/instantiate_remove.d.mts +10 -0
  768. package/node_modules/typebox/build/type/engine/readonly/instantiate_remove.mjs +14 -0
  769. package/node_modules/typebox/build/type/engine/readonly_object/from_array.d.mts +2 -2
  770. package/node_modules/typebox/build/type/engine/readonly_object/from_array.mjs +2 -2
  771. package/node_modules/typebox/build/type/engine/readonly_object/from_dependent.d.mts +5 -0
  772. package/node_modules/typebox/build/type/engine/readonly_object/from_dependent.mjs +8 -0
  773. package/node_modules/typebox/build/type/engine/readonly_object/from_intersect.d.mts +1 -1
  774. package/node_modules/typebox/build/type/engine/readonly_object/from_intersect.mjs +3 -2
  775. package/node_modules/typebox/build/type/engine/readonly_object/from_object.d.mts +2 -2
  776. package/node_modules/typebox/build/type/engine/readonly_object/from_object.mjs +2 -2
  777. package/node_modules/typebox/build/type/engine/readonly_object/from_tuple.d.mts +2 -2
  778. package/node_modules/typebox/build/type/engine/readonly_object/from_tuple.mjs +2 -2
  779. package/node_modules/typebox/build/type/engine/readonly_object/from_type.d.mts +3 -1
  780. package/node_modules/typebox/build/type/engine/readonly_object/from_type.mjs +8 -5
  781. package/node_modules/typebox/build/type/engine/record/from_key_enum.d.mts +2 -2
  782. package/node_modules/typebox/build/type/engine/record/from_key_enum.mjs +2 -2
  783. package/node_modules/typebox/build/type/engine/record/from_key_template_literal.d.mts +2 -2
  784. package/node_modules/typebox/build/type/engine/record/from_key_template_literal.mjs +2 -2
  785. package/node_modules/typebox/build/type/engine/ref/instantiate.d.mts +3 -3
  786. package/node_modules/typebox/build/type/engine/ref/instantiate.mjs +6 -6
  787. package/node_modules/typebox/build/type/engine/required/from_dependent.d.mts +5 -0
  788. package/node_modules/typebox/build/type/engine/required/from_dependent.mjs +8 -0
  789. package/node_modules/typebox/build/type/engine/required/from_intersect.d.mts +1 -1
  790. package/node_modules/typebox/build/type/engine/required/from_intersect.mjs +3 -2
  791. package/node_modules/typebox/build/type/engine/required/from_object.d.mts +2 -2
  792. package/node_modules/typebox/build/type/engine/required/from_object.mjs +2 -2
  793. package/node_modules/typebox/build/type/engine/required/from_type.d.mts +3 -1
  794. package/node_modules/typebox/build/type/engine/required/from_type.mjs +7 -4
  795. package/node_modules/typebox/build/type/engine/template_literal/decode.mjs +3 -3
  796. package/node_modules/typebox/build/type/engine/template_literal/encode.d.mts +2 -2
  797. package/node_modules/typebox/build/type/engine/template_literal/encode.mjs +6 -6
  798. package/node_modules/typebox/build/type/engine/template_literal/is_finite.mjs +1 -1
  799. package/node_modules/typebox/build/type/engine/template_literal/is_pattern.mjs +1 -0
  800. package/node_modules/typebox/build/type/engine/this/expand_this.d.mts +1 -4
  801. package/node_modules/typebox/build/type/engine/this/expand_this.mjs +7 -13
  802. package/node_modules/typebox/build/type/engine/with/instantiate.d.mts +8 -0
  803. package/node_modules/typebox/build/type/engine/{options → with}/instantiate.mjs +5 -5
  804. package/node_modules/typebox/build/type/extends/dependent.d.mts +6 -0
  805. package/node_modules/typebox/build/type/extends/dependent.mjs +6 -0
  806. package/node_modules/typebox/build/type/extends/enum.d.mts +4 -4
  807. package/node_modules/typebox/build/type/extends/enum.mjs +3 -2
  808. package/node_modules/typebox/build/type/extends/extends_left.d.mts +5 -7
  809. package/node_modules/typebox/build/type/extends/extends_left.mjs +24 -27
  810. package/node_modules/typebox/build/type/extends/extends_right.d.mts +7 -5
  811. package/node_modules/typebox/build/type/extends/extends_right.mjs +20 -15
  812. package/node_modules/typebox/build/type/extends/inference.mjs +1 -1
  813. package/node_modules/typebox/build/type/extends/object.d.mts +8 -1
  814. package/node_modules/typebox/build/type/extends/object.mjs +25 -3
  815. package/node_modules/typebox/build/type/extends/parameters.mjs +2 -2
  816. package/node_modules/typebox/build/type/extends/record.d.mts +13 -0
  817. package/node_modules/typebox/build/type/extends/record.mjs +23 -0
  818. package/node_modules/typebox/build/type/extends/template_literal.d.mts +3 -3
  819. package/node_modules/typebox/build/type/extends/template_literal.mjs +3 -3
  820. package/node_modules/typebox/build/type/extends/tuple.d.mts +3 -6
  821. package/node_modules/typebox/build/type/extends/tuple.mjs +6 -5
  822. package/node_modules/typebox/build/type/extends/union.mjs +2 -2
  823. package/node_modules/typebox/build/type/script/mapping.d.mts +86 -98
  824. package/node_modules/typebox/build/type/script/mapping.mjs +95 -92
  825. package/node_modules/typebox/build/type/script/parser.d.mts +42 -40
  826. package/node_modules/typebox/build/type/script/parser.mjs +23 -22
  827. package/node_modules/typebox/build/type/script/script.d.mts +3 -4
  828. package/node_modules/typebox/build/type/script/script.mjs +3 -2
  829. package/node_modules/typebox/build/type/script/token/internal/guard.d.mts +1 -1
  830. package/node_modules/typebox/build/type/script/token/internal/guard.mjs +1 -1
  831. package/node_modules/typebox/build/type/script/token/internal/take.mjs +1 -1
  832. package/node_modules/typebox/build/type/script/token/until.mjs +2 -2
  833. package/node_modules/typebox/build/type/types/_codec.d.mts +12 -12
  834. package/node_modules/typebox/build/type/types/_codec.mjs +0 -1
  835. package/node_modules/typebox/build/type/types/_immutable.d.mts +2 -9
  836. package/node_modules/typebox/build/type/types/_immutable.mjs +2 -10
  837. package/node_modules/typebox/build/type/types/_optional.d.mts +2 -9
  838. package/node_modules/typebox/build/type/types/_optional.mjs +2 -11
  839. package/node_modules/typebox/build/type/types/_readonly.d.mts +2 -9
  840. package/node_modules/typebox/build/type/types/_readonly.mjs +2 -10
  841. package/node_modules/typebox/build/type/types/_refine.d.mts +8 -10
  842. package/node_modules/typebox/build/type/types/_refine.mjs +1 -2
  843. package/node_modules/typebox/build/type/types/call.d.mts +3 -3
  844. package/node_modules/typebox/build/type/types/call.mjs +3 -2
  845. package/node_modules/typebox/build/type/types/deferred.d.mts +1 -0
  846. package/node_modules/typebox/build/type/types/deferred.mjs +1 -1
  847. package/node_modules/typebox/build/type/types/dependent.d.mts +17 -0
  848. package/node_modules/typebox/build/type/types/dependent.mjs +24 -0
  849. package/node_modules/typebox/build/type/types/enum.d.mts +3 -1
  850. package/node_modules/typebox/build/type/types/enum.mjs +5 -0
  851. package/node_modules/typebox/build/type/types/index.d.mts +1 -4
  852. package/node_modules/typebox/build/type/types/index.mjs +1 -4
  853. package/node_modules/typebox/build/type/types/number.d.mts +1 -1
  854. package/node_modules/typebox/build/type/types/number.mjs +1 -1
  855. package/node_modules/typebox/build/type/types/record.d.mts +13 -7
  856. package/node_modules/typebox/build/type/types/record.mjs +15 -9
  857. package/node_modules/typebox/build/type/types/static.d.mts +2 -5
  858. package/node_modules/typebox/build/typebox.d.mts +3 -7
  859. package/node_modules/typebox/build/typebox.mjs +3 -7
  860. package/node_modules/typebox/build/value/clean/clean.mjs +4 -2
  861. package/node_modules/typebox/build/value/clean/from_intersect.mjs +2 -2
  862. package/node_modules/typebox/build/value/clean/from_type.mjs +8 -10
  863. package/node_modules/typebox/build/value/clean/from_union.d.mts +1 -1
  864. package/node_modules/typebox/build/value/clean/from_union.mjs +1 -2
  865. package/node_modules/typebox/build/value/clone/clone.mjs +2 -73
  866. package/node_modules/typebox/build/value/codec/decode.mjs +4 -2
  867. package/node_modules/typebox/build/value/codec/encode.mjs +4 -2
  868. package/node_modules/typebox/build/value/codec/from_array.mjs +1 -4
  869. package/node_modules/typebox/build/value/codec/from_object.mjs +1 -4
  870. package/node_modules/typebox/build/value/codec/from_record.mjs +2 -7
  871. package/node_modules/typebox/build/value/codec/from_tuple.mjs +1 -4
  872. package/node_modules/typebox/build/value/codec/from_union.mjs +2 -3
  873. package/node_modules/typebox/build/value/convert/from_enum.mjs +3 -4
  874. package/node_modules/typebox/build/value/convert/from_template_literal.d.mts +1 -1
  875. package/node_modules/typebox/build/value/convert/from_template_literal.mjs +2 -3
  876. package/node_modules/typebox/build/value/convert/from_type.mjs +19 -21
  877. package/node_modules/typebox/build/value/create/from_enum.mjs +2 -2
  878. package/node_modules/typebox/build/value/create/from_type.mjs +23 -31
  879. package/node_modules/typebox/build/value/default/from_object.mjs +1 -1
  880. package/node_modules/typebox/build/value/default/from_type.mjs +8 -10
  881. package/node_modules/typebox/build/value/errors/errors.d.mts +2 -2
  882. package/node_modules/typebox/build/value/errors/errors.mjs +1 -1
  883. package/node_modules/typebox/build/value/index.d.mts +0 -1
  884. package/node_modules/typebox/build/value/index.mjs +0 -1
  885. package/node_modules/typebox/build/value/repair/from_enum.mjs +2 -3
  886. package/node_modules/typebox/build/value/repair/from_type.mjs +24 -22
  887. package/node_modules/typebox/build/value/shared/union_priority_sort.d.mts +6 -2
  888. package/node_modules/typebox/build/value/shared/union_priority_sort.mjs +62 -26
  889. package/node_modules/typebox/build/value/value.d.mts +0 -1
  890. package/node_modules/typebox/build/value/value.mjs +0 -1
  891. package/node_modules/typebox/package.json +33 -33
  892. package/node_modules/typebox/readme.md +117 -103
  893. package/package.json +16 -11
  894. package/vendor/pi-client/client.d.ts +25 -0
  895. package/vendor/pi-client/client.d.ts.map +1 -0
  896. package/vendor/pi-client/client.js +386 -0
  897. package/vendor/pi-client/client.js.map +1 -0
  898. package/vendor/pi-client/connection.d.ts +25 -0
  899. package/vendor/pi-client/connection.d.ts.map +1 -0
  900. package/vendor/pi-client/connection.js +204 -0
  901. package/vendor/pi-client/connection.js.map +1 -0
  902. package/vendor/pi-client/errors.d.ts +23 -0
  903. package/vendor/pi-client/errors.d.ts.map +1 -0
  904. package/vendor/pi-client/errors.js +42 -0
  905. package/vendor/pi-client/errors.js.map +1 -0
  906. package/vendor/pi-client/index.d.ts +6 -0
  907. package/vendor/pi-client/index.d.ts.map +1 -0
  908. package/vendor/pi-client/index.js +3 -0
  909. package/vendor/pi-client/index.js.map +1 -0
  910. package/vendor/pi-client/promise.d.ts +8 -0
  911. package/vendor/pi-client/promise.d.ts.map +1 -0
  912. package/vendor/pi-client/promise.js +11 -0
  913. package/vendor/pi-client/promise.js.map +1 -0
  914. package/vendor/pi-client/session-handle.d.ts +54 -0
  915. package/vendor/pi-client/session-handle.d.ts.map +1 -0
  916. package/vendor/pi-client/session-handle.js +50 -0
  917. package/vendor/pi-client/session-handle.js.map +1 -0
  918. package/vendor/pi-client/state.d.ts +22 -0
  919. package/vendor/pi-client/state.d.ts.map +1 -0
  920. package/vendor/pi-client/state.js +149 -0
  921. package/vendor/pi-client/state.js.map +1 -0
  922. package/vendor/pi-client/transport.d.ts +17 -0
  923. package/vendor/pi-client/transport.d.ts.map +1 -0
  924. package/vendor/pi-client/transport.js +2 -0
  925. package/vendor/pi-client/transport.js.map +1 -0
  926. package/vendor/pi-client/types.d.ts +23 -0
  927. package/vendor/pi-client/types.d.ts.map +1 -0
  928. package/vendor/pi-client/types.js +2 -0
  929. package/vendor/pi-client/types.js.map +1 -0
  930. package/vendor/pi-client/unix.d.ts +8 -0
  931. package/vendor/pi-client/unix.d.ts.map +1 -0
  932. package/vendor/pi-client/unix.js +151 -0
  933. package/vendor/pi-client/unix.js.map +1 -0
  934. package/vendor/pi-protocol/cbor/decoder.d.ts +4 -0
  935. package/vendor/pi-protocol/cbor/decoder.d.ts.map +1 -0
  936. package/vendor/pi-protocol/cbor/decoder.js +163 -0
  937. package/vendor/pi-protocol/cbor/decoder.js.map +1 -0
  938. package/vendor/pi-protocol/cbor/encoder.d.ts +4 -0
  939. package/vendor/pi-protocol/cbor/encoder.d.ts.map +1 -0
  940. package/vendor/pi-protocol/cbor/encoder.js +199 -0
  941. package/vendor/pi-protocol/cbor/encoder.js.map +1 -0
  942. package/vendor/pi-protocol/cbor/index.d.ts +4 -0
  943. package/vendor/pi-protocol/cbor/index.d.ts.map +1 -0
  944. package/vendor/pi-protocol/cbor/index.js +4 -0
  945. package/vendor/pi-protocol/cbor/index.js.map +1 -0
  946. package/vendor/pi-protocol/cbor/options.d.ts +26 -0
  947. package/vendor/pi-protocol/cbor/options.d.ts.map +1 -0
  948. package/vendor/pi-protocol/cbor/options.js +29 -0
  949. package/vendor/pi-protocol/cbor/options.js.map +1 -0
  950. package/vendor/pi-protocol/codec.d.ts +29 -0
  951. package/vendor/pi-protocol/codec.d.ts.map +1 -0
  952. package/vendor/pi-protocol/codec.js +140 -0
  953. package/vendor/pi-protocol/codec.js.map +1 -0
  954. package/vendor/pi-protocol/framing.d.ts +29 -0
  955. package/vendor/pi-protocol/framing.d.ts.map +1 -0
  956. package/vendor/pi-protocol/framing.js +152 -0
  957. package/vendor/pi-protocol/framing.js.map +1 -0
  958. package/vendor/pi-protocol/index.d.ts +5 -0
  959. package/vendor/pi-protocol/index.d.ts.map +1 -0
  960. package/vendor/pi-protocol/index.js +5 -0
  961. package/vendor/pi-protocol/index.js.map +1 -0
  962. package/vendor/pi-protocol/schemas.d.ts +13818 -0
  963. package/vendor/pi-protocol/schemas.d.ts.map +1 -0
  964. package/vendor/pi-protocol/schemas.js +382 -0
  965. package/vendor/pi-protocol/schemas.js.map +1 -0
  966. package/dist/core/extensions/builtin/tool-pair-guard/sanitize-anthropic-payload.d.ts +0 -3
  967. package/dist/core/extensions/builtin/tool-pair-guard/sanitize-anthropic-payload.d.ts.map +0 -1
  968. package/dist/core/extensions/builtin/tool-pair-guard/sanitize-anthropic-payload.js.map +0 -1
  969. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl-repo.d.ts +0 -26
  970. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl-repo.d.ts.map +0 -1
  971. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl-repo.js +0 -100
  972. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl-repo.js.map +0 -1
  973. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl-storage.d.ts +0 -42
  974. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl-storage.d.ts.map +0 -1
  975. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl-storage.js +0 -286
  976. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl-storage.js.map +0 -1
  977. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory-repo.d.ts +0 -18
  978. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory-repo.d.ts.map +0 -1
  979. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory-repo.js +0 -44
  980. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory-repo.js.map +0 -1
  981. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory-storage.d.ts +0 -33
  982. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory-storage.d.ts.map +0 -1
  983. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory-storage.js +0 -163
  984. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory-storage.js.map +0 -1
  985. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo-utils.d.ts +0 -11
  986. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo-utils.d.ts.map +0 -1
  987. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo-utils.js +0 -39
  988. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo-utils.js.map +0 -1
  989. package/node_modules/typebox/build/schema/engine/_guard.d.mts +0 -6
  990. package/node_modules/typebox/build/schema/engine/_guard.mjs +0 -26
  991. package/node_modules/typebox/build/schema/types/_guard.d.mts +0 -10
  992. package/node_modules/typebox/build/schema/types/_guard.mjs +0 -16
  993. package/node_modules/typebox/build/type/action/_optional.d.mts +0 -19
  994. package/node_modules/typebox/build/type/action/_optional.mjs +0 -40
  995. package/node_modules/typebox/build/type/action/_readonly.d.mts +0 -19
  996. package/node_modules/typebox/build/type/action/_readonly.mjs +0 -40
  997. package/node_modules/typebox/build/type/action/awaited.d.mts +0 -15
  998. package/node_modules/typebox/build/type/action/awaited.mjs +0 -15
  999. package/node_modules/typebox/build/type/action/options.d.mts +0 -11
  1000. package/node_modules/typebox/build/type/action/options.mjs +0 -11
  1001. package/node_modules/typebox/build/type/engine/awaited/instantiate.d.mts +0 -11
  1002. package/node_modules/typebox/build/type/engine/awaited/instantiate.mjs +0 -20
  1003. package/node_modules/typebox/build/type/engine/enum/enum_to_union.d.mts +0 -14
  1004. package/node_modules/typebox/build/type/engine/enum/enum_to_union.mjs +0 -24
  1005. package/node_modules/typebox/build/type/engine/options/index.d.mts +0 -1
  1006. package/node_modules/typebox/build/type/engine/options/index.mjs +0 -1
  1007. package/node_modules/typebox/build/type/engine/options/instantiate.d.mts +0 -8
  1008. package/node_modules/typebox/build/type/extends/async_iterator.d.mts +0 -7
  1009. package/node_modules/typebox/build/type/extends/async_iterator.mjs +0 -9
  1010. package/node_modules/typebox/build/type/extends/iterator.d.mts +0 -7
  1011. package/node_modules/typebox/build/type/extends/iterator.mjs +0 -9
  1012. package/node_modules/typebox/build/type/extends/promise.d.mts +0 -7
  1013. package/node_modules/typebox/build/type/extends/promise.mjs +0 -9
  1014. package/node_modules/typebox/build/type/types/async_iterator.d.mts +0 -20
  1015. package/node_modules/typebox/build/type/types/async_iterator.mjs +0 -28
  1016. package/node_modules/typebox/build/type/types/base.d.mts +0 -50
  1017. package/node_modules/typebox/build/type/types/base.mjs +0 -84
  1018. package/node_modules/typebox/build/type/types/iterator.d.mts +0 -20
  1019. package/node_modules/typebox/build/type/types/iterator.mjs +0 -28
  1020. package/node_modules/typebox/build/type/types/promise.d.mts +0 -21
  1021. package/node_modules/typebox/build/type/types/promise.mjs +0 -29
  1022. package/node_modules/typebox/build/value/clean/from_base.d.mts +0 -2
  1023. package/node_modules/typebox/build/value/clean/from_base.mjs +0 -4
  1024. package/node_modules/typebox/build/value/convert/from_base.d.mts +0 -2
  1025. package/node_modules/typebox/build/value/convert/from_base.mjs +0 -4
  1026. package/node_modules/typebox/build/value/create/from_async_iterator.d.mts +0 -2
  1027. package/node_modules/typebox/build/value/create/from_async_iterator.mjs +0 -5
  1028. package/node_modules/typebox/build/value/create/from_base.d.mts +0 -2
  1029. package/node_modules/typebox/build/value/create/from_base.mjs +0 -4
  1030. package/node_modules/typebox/build/value/create/from_iterator.d.mts +0 -2
  1031. package/node_modules/typebox/build/value/create/from_iterator.mjs +0 -5
  1032. package/node_modules/typebox/build/value/create/from_promise.d.mts +0 -2
  1033. package/node_modules/typebox/build/value/create/from_promise.mjs +0 -5
  1034. package/node_modules/typebox/build/value/default/from_base.d.mts +0 -2
  1035. package/node_modules/typebox/build/value/default/from_base.mjs +0 -5
  1036. package/node_modules/typebox/build/value/mutate/error.d.mts +0 -3
  1037. package/node_modules/typebox/build/value/mutate/error.mjs +0 -6
  1038. package/node_modules/typebox/build/value/mutate/from_array.d.mts +0 -2
  1039. package/node_modules/typebox/build/value/mutate/from_array.mjs +0 -16
  1040. package/node_modules/typebox/build/value/mutate/from_object.d.mts +0 -2
  1041. package/node_modules/typebox/build/value/mutate/from_object.mjs +0 -40
  1042. package/node_modules/typebox/build/value/mutate/from_unknown.d.mts +0 -2
  1043. package/node_modules/typebox/build/value/mutate/from_unknown.mjs +0 -7
  1044. package/node_modules/typebox/build/value/mutate/from_value.d.mts +0 -2
  1045. package/node_modules/typebox/build/value/mutate/from_value.mjs +0 -12
  1046. package/node_modules/typebox/build/value/mutate/index.d.mts +0 -1
  1047. package/node_modules/typebox/build/value/mutate/index.mjs +0 -1
  1048. package/node_modules/typebox/build/value/mutate/mutate.d.mts +0 -11
  1049. package/node_modules/typebox/build/value/mutate/mutate.mjs +0 -41
  1050. package/node_modules/typebox/build/value/repair/from_base.d.mts +0 -2
  1051. package/node_modules/typebox/build/value/repair/from_base.mjs +0 -8
  1052. /package/node_modules/typebox/build/type/engine/{awaited → with}/index.d.mts +0 -0
  1053. /package/node_modules/typebox/build/type/engine/{awaited → with}/index.mjs +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../src/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,EAAE,EAAE,KAAK,MAAM,EAAE,MAAM,SAAS,CAAC;AAE5C,eAAO,MAAM,gBAAgB,EAAG,CAAU,CAAC;AAO3C,MAAM,MAAM,SAAS,GAAG,IAAI,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,SAAS,EAAE,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,CAAC;AActG,eAAO,MAAM,eAAe,yBAAmD,CAAC;AAEhF,eAAO,MA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,mBAAmB,CAAC,CAAC"}
@@ -0,0 +1,382 @@
1
+ import Type from "typebox";
2
+ export const PROTOCOL_VERSION = 2;
3
+ const IdSchema = Type.String({ minLength: 1 });
4
+ const TimestampSchema = Type.Integer({ minimum: 0 });
5
+ const StrictObject = (properties) => Type.Object(properties, { additionalProperties: false });
6
+ const JsonValueRecursiveSchema = Type.Cyclic({
7
+ JsonValue: Type.Union([
8
+ Type.Null(),
9
+ Type.Boolean(),
10
+ Type.Number(),
11
+ Type.String(),
12
+ Type.Array(Type.Ref("JsonValue")),
13
+ Type.Record(Type.String(), Type.Ref("JsonValue")),
14
+ ]),
15
+ }, "JsonValue");
16
+ export const JsonValueSchema = Type.Unsafe(JsonValueRecursiveSchema);
17
+ export const ThinkingLevelSchema = Type.Union([
18
+ Type.Literal("off"),
19
+ Type.Literal("minimal"),
20
+ Type.Literal("low"),
21
+ Type.Literal("medium"),
22
+ Type.Literal("high"),
23
+ Type.Literal("xhigh"),
24
+ Type.Literal("max"),
25
+ ]);
26
+ /** Matches AgentHarnessPhase so adapters do not need a second phase vocabulary. */
27
+ export const SessionPhaseSchema = Type.Union([
28
+ Type.Literal("idle"),
29
+ Type.Literal("turn"),
30
+ Type.Literal("compaction"),
31
+ Type.Literal("branch_summary"),
32
+ Type.Literal("retry"),
33
+ ]);
34
+ export const ModelRefSchema = StrictObject({
35
+ provider: IdSchema,
36
+ id: IdSchema,
37
+ });
38
+ export const ModelCostSchema = StrictObject({
39
+ input: Type.Number({ minimum: 0 }),
40
+ output: Type.Number({ minimum: 0 }),
41
+ cacheRead: Type.Number({ minimum: 0 }),
42
+ cacheWrite: Type.Number({ minimum: 0 }),
43
+ });
44
+ export const ModelMetadataSchema = StrictObject({
45
+ provider: IdSchema,
46
+ id: IdSchema,
47
+ name: Type.String({ minLength: 1 }),
48
+ api: IdSchema,
49
+ reasoning: Type.Boolean(),
50
+ input: Type.Array(Type.Union([Type.Literal("text"), Type.Literal("image")])),
51
+ contextWindow: Type.Integer({ minimum: 1 }),
52
+ maxTokens: Type.Integer({ minimum: 1 }),
53
+ cost: ModelCostSchema,
54
+ supportedThinkingLevels: Type.Array(ThinkingLevelSchema, { minItems: 1 }),
55
+ authenticated: Type.Boolean(),
56
+ });
57
+ export const TextContentSchema = StrictObject({
58
+ type: Type.Literal("text"),
59
+ text: Type.String(),
60
+ });
61
+ export const ThinkingContentSchema = StrictObject({
62
+ type: Type.Literal("thinking"),
63
+ thinking: Type.String(),
64
+ redacted: Type.Optional(Type.Boolean()),
65
+ });
66
+ export const ImageContentSchema = StrictObject({
67
+ type: Type.Literal("image"),
68
+ data: Type.String(),
69
+ mimeType: Type.String({ minLength: 1 }),
70
+ });
71
+ export const ToolCallContentSchema = StrictObject({
72
+ type: Type.Literal("toolCall"),
73
+ toolCallId: IdSchema,
74
+ toolName: IdSchema,
75
+ input: JsonValueSchema,
76
+ });
77
+ export const UserContentSchema = Type.Union([TextContentSchema, ImageContentSchema]);
78
+ export const AssistantContentSchema = Type.Union([TextContentSchema, ThinkingContentSchema, ToolCallContentSchema]);
79
+ export const ToolContentSchema = Type.Union([TextContentSchema, ImageContentSchema]);
80
+ export const UsageSchema = StrictObject({
81
+ input: Type.Integer({ minimum: 0 }),
82
+ output: Type.Integer({ minimum: 0 }),
83
+ cacheRead: Type.Integer({ minimum: 0 }),
84
+ cacheWrite: Type.Integer({ minimum: 0 }),
85
+ reasoning: Type.Optional(Type.Integer({ minimum: 0 })),
86
+ totalTokens: Type.Integer({ minimum: 0 }),
87
+ cost: StrictObject({
88
+ input: Type.Number({ minimum: 0 }),
89
+ output: Type.Number({ minimum: 0 }),
90
+ cacheRead: Type.Number({ minimum: 0 }),
91
+ cacheWrite: Type.Number({ minimum: 0 }),
92
+ total: Type.Number({ minimum: 0 }),
93
+ }),
94
+ });
95
+ export const UserTranscriptItemSchema = StrictObject({
96
+ id: IdSchema,
97
+ role: Type.Literal("user"),
98
+ content: Type.Array(UserContentSchema),
99
+ timestamp: TimestampSchema,
100
+ });
101
+ const AssistantTranscriptItemProperties = {
102
+ id: IdSchema,
103
+ role: Type.Literal("assistant"),
104
+ content: Type.Array(AssistantContentSchema),
105
+ model: ModelRefSchema,
106
+ responseModel: Type.Optional(Type.String({ minLength: 1 })),
107
+ usage: Type.Optional(UsageSchema),
108
+ timestamp: TimestampSchema,
109
+ };
110
+ const StreamingAssistantTranscriptItemSchema = StrictObject({
111
+ ...AssistantTranscriptItemProperties,
112
+ status: Type.Literal("streaming"),
113
+ });
114
+ const CompleteAssistantTranscriptItemSchema = StrictObject({
115
+ ...AssistantTranscriptItemProperties,
116
+ status: Type.Literal("complete"),
117
+ stopReason: Type.Union([Type.Literal("stop"), Type.Literal("length"), Type.Literal("toolUse")]),
118
+ });
119
+ const ErrorAssistantTranscriptItemSchema = StrictObject({
120
+ ...AssistantTranscriptItemProperties,
121
+ status: Type.Literal("error"),
122
+ stopReason: Type.Literal("error"),
123
+ errorMessage: Type.Optional(Type.String({ minLength: 1 })),
124
+ });
125
+ const AbortedAssistantTranscriptItemSchema = StrictObject({
126
+ ...AssistantTranscriptItemProperties,
127
+ status: Type.Literal("aborted"),
128
+ stopReason: Type.Literal("aborted"),
129
+ errorMessage: Type.Optional(Type.String()),
130
+ });
131
+ export const AssistantTranscriptItemSchema = Type.Union([
132
+ StreamingAssistantTranscriptItemSchema,
133
+ CompleteAssistantTranscriptItemSchema,
134
+ ErrorAssistantTranscriptItemSchema,
135
+ AbortedAssistantTranscriptItemSchema,
136
+ ]);
137
+ const ToolTranscriptItemProperties = {
138
+ id: IdSchema,
139
+ role: Type.Literal("tool"),
140
+ toolCallId: IdSchema,
141
+ toolName: IdSchema,
142
+ input: JsonValueSchema,
143
+ content: Type.Array(ToolContentSchema),
144
+ details: Type.Optional(JsonValueSchema),
145
+ usage: Type.Optional(UsageSchema),
146
+ timestamp: TimestampSchema,
147
+ };
148
+ const RunningToolTranscriptItemSchema = StrictObject({
149
+ ...ToolTranscriptItemProperties,
150
+ status: Type.Literal("running"),
151
+ isError: Type.Literal(false),
152
+ });
153
+ const CompleteToolTranscriptItemSchema = StrictObject({
154
+ ...ToolTranscriptItemProperties,
155
+ status: Type.Literal("complete"),
156
+ isError: Type.Literal(false),
157
+ });
158
+ const ErrorToolTranscriptItemSchema = StrictObject({
159
+ ...ToolTranscriptItemProperties,
160
+ status: Type.Literal("error"),
161
+ isError: Type.Literal(true),
162
+ });
163
+ export const ToolTranscriptItemSchema = Type.Union([
164
+ RunningToolTranscriptItemSchema,
165
+ CompleteToolTranscriptItemSchema,
166
+ ErrorToolTranscriptItemSchema,
167
+ ]);
168
+ export const TranscriptItemSchema = Type.Union([
169
+ UserTranscriptItemSchema,
170
+ AssistantTranscriptItemSchema,
171
+ ToolTranscriptItemSchema,
172
+ ]);
173
+ /** Normalized incremental activity. Snapshots remain authoritative. */
174
+ export const TranscriptProgressSchema = Type.Union([
175
+ StrictObject({
176
+ type: Type.Literal("item_started"),
177
+ item: TranscriptItemSchema,
178
+ }),
179
+ StrictObject({
180
+ type: Type.Literal("assistant_delta"),
181
+ messageId: IdSchema,
182
+ contentIndex: Type.Integer({ minimum: 0 }),
183
+ kind: Type.Union([Type.Literal("text"), Type.Literal("thinking"), Type.Literal("toolCall")]),
184
+ delta: Type.String(),
185
+ }),
186
+ StrictObject({
187
+ type: Type.Literal("item_updated"),
188
+ item: Type.Union([AssistantTranscriptItemSchema, ToolTranscriptItemSchema]),
189
+ }),
190
+ StrictObject({
191
+ type: Type.Literal("item_finished"),
192
+ item: Type.Union([
193
+ CompleteAssistantTranscriptItemSchema,
194
+ ErrorAssistantTranscriptItemSchema,
195
+ AbortedAssistantTranscriptItemSchema,
196
+ CompleteToolTranscriptItemSchema,
197
+ ErrorToolTranscriptItemSchema,
198
+ ]),
199
+ }),
200
+ ]);
201
+ const SessionSummaryProperties = {
202
+ id: IdSchema,
203
+ name: Type.Optional(Type.String()),
204
+ cwd: Type.String({ minLength: 1 }),
205
+ createdAt: TimestampSchema,
206
+ updatedAt: TimestampSchema,
207
+ phase: SessionPhaseSchema,
208
+ model: ModelRefSchema,
209
+ thinkingLevel: ThinkingLevelSchema,
210
+ attached: Type.Boolean(),
211
+ locked: Type.Boolean(),
212
+ };
213
+ export const SessionSummarySchema = StrictObject(SessionSummaryProperties);
214
+ export const SessionSnapshotSchema = StrictObject({
215
+ ...SessionSummaryProperties,
216
+ revision: Type.Integer({ minimum: 0 }),
217
+ transcript: Type.Array(TranscriptItemSchema),
218
+ queuedSteer: Type.Array(UserTranscriptItemSchema),
219
+ queuedSteerCount: Type.Integer({ minimum: 0 }),
220
+ });
221
+ export const ServerSnapshotSchema = StrictObject({
222
+ serverId: IdSchema,
223
+ protocolVersion: Type.Literal(PROTOCOL_VERSION),
224
+ revision: Type.Integer({ minimum: 0 }),
225
+ sessions: Type.Array(SessionSummarySchema),
226
+ models: Type.Array(ModelMetadataSchema),
227
+ });
228
+ export const ProtocolErrorCodeSchema = Type.Union([
229
+ Type.Literal("auth"),
230
+ Type.Literal("version"),
231
+ Type.Literal("busy"),
232
+ Type.Literal("session_locked"),
233
+ Type.Literal("not_found"),
234
+ Type.Literal("invalid_request"),
235
+ ]);
236
+ export const ProtocolErrorSchema = StrictObject({
237
+ code: ProtocolErrorCodeSchema,
238
+ message: Type.String(),
239
+ details: Type.Optional(JsonValueSchema),
240
+ });
241
+ const PromptPayloadProperties = {
242
+ sessionId: IdSchema,
243
+ text: Type.String(),
244
+ };
245
+ export const ListCommandSchema = StrictObject({ command: Type.Literal("list") });
246
+ export const CreateCommandSchema = StrictObject({
247
+ command: Type.Literal("create"),
248
+ cwd: Type.Optional(Type.String({ minLength: 1 })),
249
+ name: Type.Optional(Type.String()),
250
+ model: Type.Optional(ModelRefSchema),
251
+ thinkingLevel: Type.Optional(ThinkingLevelSchema),
252
+ });
253
+ export const AttachCommandSchema = StrictObject({ command: Type.Literal("attach"), sessionId: IdSchema });
254
+ export const DetachCommandSchema = StrictObject({ command: Type.Literal("detach"), sessionId: IdSchema });
255
+ export const PromptCommandSchema = StrictObject({ command: Type.Literal("prompt"), ...PromptPayloadProperties });
256
+ export const SteerCommandSchema = StrictObject({ command: Type.Literal("steer"), ...PromptPayloadProperties });
257
+ export const AbortCommandSchema = StrictObject({ command: Type.Literal("abort"), sessionId: IdSchema });
258
+ export const SetModelCommandSchema = StrictObject({
259
+ command: Type.Literal("set_model"),
260
+ sessionId: IdSchema,
261
+ model: ModelRefSchema,
262
+ });
263
+ export const SetThinkingCommandSchema = StrictObject({
264
+ command: Type.Literal("set_thinking"),
265
+ sessionId: IdSchema,
266
+ thinkingLevel: ThinkingLevelSchema,
267
+ });
268
+ export const CommandSchema = Type.Union([
269
+ ListCommandSchema,
270
+ CreateCommandSchema,
271
+ AttachCommandSchema,
272
+ DetachCommandSchema,
273
+ PromptCommandSchema,
274
+ SteerCommandSchema,
275
+ AbortCommandSchema,
276
+ SetModelCommandSchema,
277
+ SetThinkingCommandSchema,
278
+ ]);
279
+ export const CreateResultSchema = StrictObject({
280
+ command: Type.Literal("create"),
281
+ session: SessionSnapshotSchema,
282
+ });
283
+ export const AttachResultSchema = StrictObject({
284
+ command: Type.Literal("attach"),
285
+ session: SessionSnapshotSchema,
286
+ });
287
+ export const PromptResultSchema = StrictObject({
288
+ command: Type.Literal("prompt"),
289
+ session: SessionSnapshotSchema,
290
+ });
291
+ export const SteerResultSchema = StrictObject({
292
+ command: Type.Literal("steer"),
293
+ session: SessionSnapshotSchema,
294
+ });
295
+ export const AbortResultSchema = StrictObject({
296
+ command: Type.Literal("abort"),
297
+ session: SessionSnapshotSchema,
298
+ });
299
+ export const SetModelResultSchema = StrictObject({
300
+ command: Type.Literal("set_model"),
301
+ session: SessionSnapshotSchema,
302
+ });
303
+ export const SetThinkingResultSchema = StrictObject({
304
+ command: Type.Literal("set_thinking"),
305
+ session: SessionSnapshotSchema,
306
+ });
307
+ export const ListResultSchema = StrictObject({
308
+ command: Type.Literal("list"),
309
+ sessions: Type.Array(SessionSummarySchema),
310
+ });
311
+ export const DetachResultSchema = StrictObject({
312
+ command: Type.Literal("detach"),
313
+ sessionId: IdSchema,
314
+ });
315
+ export const CommandResultSchema = Type.Union([
316
+ ListResultSchema,
317
+ CreateResultSchema,
318
+ AttachResultSchema,
319
+ DetachResultSchema,
320
+ PromptResultSchema,
321
+ SteerResultSchema,
322
+ AbortResultSchema,
323
+ SetModelResultSchema,
324
+ SetThinkingResultSchema,
325
+ ]);
326
+ /** Must be the first frame sent by a client. Version is intentionally an integer, not a coercible string. */
327
+ export const ClientHelloSchema = StrictObject({
328
+ type: Type.Literal("hello"),
329
+ version: Type.Integer({ minimum: 0 }),
330
+ token: Type.String({ minLength: 1 }),
331
+ });
332
+ export const RequestEnvelopeSchema = StrictObject({
333
+ type: Type.Literal("request"),
334
+ id: IdSchema,
335
+ request: CommandSchema,
336
+ });
337
+ export const ClientMessageSchema = Type.Union([ClientHelloSchema, RequestEnvelopeSchema]);
338
+ export const ServerEventSchema = Type.Union([
339
+ StrictObject({ type: Type.Literal("server_snapshot"), snapshot: ServerSnapshotSchema }),
340
+ StrictObject({ type: Type.Literal("session_snapshot"), snapshot: SessionSnapshotSchema }),
341
+ StrictObject({
342
+ type: Type.Literal("session_progress"),
343
+ sessionId: IdSchema,
344
+ progress: TranscriptProgressSchema,
345
+ }),
346
+ StrictObject({ type: Type.Literal("session_removed"), sessionId: IdSchema }),
347
+ ]);
348
+ export const ServerHelloSchema = StrictObject({
349
+ type: Type.Literal("hello"),
350
+ version: Type.Literal(PROTOCOL_VERSION),
351
+ connectionId: IdSchema,
352
+ snapshot: ServerSnapshotSchema,
353
+ });
354
+ export const ServerHelloErrorSchema = StrictObject({
355
+ type: Type.Literal("hello_error"),
356
+ error: ProtocolErrorSchema,
357
+ });
358
+ export const ResponseEnvelopeSchema = Type.Union([
359
+ StrictObject({
360
+ type: Type.Literal("response"),
361
+ id: IdSchema,
362
+ ok: Type.Literal(true),
363
+ result: CommandResultSchema,
364
+ }),
365
+ StrictObject({
366
+ type: Type.Literal("response"),
367
+ id: IdSchema,
368
+ ok: Type.Literal(false),
369
+ error: ProtocolErrorSchema,
370
+ }),
371
+ ]);
372
+ export const EventEnvelopeSchema = StrictObject({
373
+ type: Type.Literal("event"),
374
+ event: ServerEventSchema,
375
+ });
376
+ export const ServerMessageSchema = Type.Union([
377
+ ServerHelloSchema,
378
+ ServerHelloErrorSchema,
379
+ ResponseEnvelopeSchema,
380
+ EventEnvelopeSchema,
381
+ ]);
382
+ //# sourceMappingURL=schemas.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schemas.js","sourceRoot":"","sources":["../src/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,IAAqB,MAAM,SAAS,CAAC;AAE5C,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAU,CAAC;AAE3C,MAAM,QAAQ,GAAG,IAAI,CAAC,MAAM,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC,CAAC;AAC/C,MAAM,eAAe,GAAG,IAAI,CAAC,OAAO,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC,CAAC;AACrD,MAAM,YAAY,GAAG,CAAoD,UAAa,EAAE,EAAE,CACzF,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE,EAAE,oBAAoB,EAAE,KAAK,EAAE,CAAC,CAAC;AAG1D,MAAM,wBAAwB,GAAG,IAAI,CAAC,MAAM,CAC3C;IACC,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC;QACrB,IAAI,CAAC,IAAI,EAAE;QACX,IAAI,CAAC,OAAO,EAAE;QACd,IAAI,CAAC,MAAM,EAAE;QACb,IAAI,CAAC,MAAM,EAAE;QACb,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;QACjC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,IAAI,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;KACjD,CAAC;CACF,EACD,WAAW,CACX,CAAC;AACF,MAAM,CAAC,MAAM,eAAe,GAA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AAoB;CAC9B,CAAC,CAAC;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,YAAY,CAAC;IAClD,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC;IACjC,KAAK,EAAE,mBAAmB;CAC1B,CAAC,CAAC;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,IAAI,CAAC,KAAK,CAAC;IAChD,YAAY,CAAC;QACZ,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC;QAC9B,EAAE,EAAE,QAAQ;QACZ,EAAE,EAAE,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC;QACtB,MAAM,EAAE,mBAAmB;KAC3B,CAAC;IACF,YAAY,CAAC;QACZ,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC;QAC9B,EAAE,EAAE,QAAQ;QACZ,EAAE,EAAE,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC;QACvB,KAAK,EAAE,mBAAmB;KAC1B,CAAC;CACF,CAAC,CAAC;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,YAAY,CAAC;IAC/C,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC;IAC3B,KAAK,EAAE,iBAAiB;CACxB,CAAC,CAAC;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,IAAI,CAAC,KAAK,CAAC;IAC7C,iBAAiB;IACjB,sBAAsB;IACtB,sBAAsB;IACtB,mBAAmB;CACnB,CAAC,CAAC","sourcesContent":["import Type, { type Static } from \"typebox\";\n\nexport const PROTOCOL_VERSION = 2 as const;\n\nconst IdSchema = Type.String({ minLength: 1 });\nconst TimestampSchema = Type.Integer({ minimum: 0 });\nconst StrictObject = <const T extends Parameters<typeof Type.Object>[0]>(properties: T) =>\n\tType.Object(properties, { additionalProperties: false });\n\nexport type JsonValue = null | boolean | number | string | JsonValue[] | { [key: string]: JsonValue };\nconst JsonValueRecursiveSchema = Type.Cyclic(\n\t{\n\t\tJsonValue: Type.Union([\n\t\t\tType.Null(),\n\t\t\tType.Boolean(),\n\t\t\tType.Number(),\n\t\t\tType.String(),\n\t\t\tType.Array(Type.Ref(\"JsonValue\")),\n\t\t\tType.Record(Type.String(), Type.Ref(\"JsonValue\")),\n\t\t]),\n\t},\n\t\"JsonValue\",\n);\nexport const JsonValueSchema = Type.Unsafe<JsonValue>(JsonValueRecursiveSchema);\n\nexport const ThinkingLevelSchema = Type.Union([\n\tType.Literal(\"off\"),\n\tType.Literal(\"minimal\"),\n\tType.Literal(\"low\"),\n\tType.Literal(\"medium\"),\n\tType.Literal(\"high\"),\n\tType.Literal(\"xhigh\"),\n\tType.Literal(\"max\"),\n]);\nexport type ThinkingLevel = Static<typeof ThinkingLevelSchema>;\n\n/** Matches AgentHarnessPhase so adapters do not need a second phase vocabulary. */\nexport const SessionPhaseSchema = Type.Union([\n\tType.Literal(\"idle\"),\n\tType.Literal(\"turn\"),\n\tType.Literal(\"compaction\"),\n\tType.Literal(\"branch_summary\"),\n\tType.Literal(\"retry\"),\n]);\nexport type SessionPhase = Static<typeof SessionPhaseSchema>;\n\nexport const ModelRefSchema = StrictObject({\n\tprovider: IdSchema,\n\tid: IdSchema,\n});\nexport type ModelRef = Static<typeof ModelRefSchema>;\n\nexport const ModelCostSchema = StrictObject({\n\tinput: Type.Number({ minimum: 0 }),\n\toutput: Type.Number({ minimum: 0 }),\n\tcacheRead: Type.Number({ minimum: 0 }),\n\tcacheWrite: Type.Number({ minimum: 0 }),\n});\n\nexport const ModelMetadataSchema = StrictObject({\n\tprovider: IdSchema,\n\tid: IdSchema,\n\tname: Type.String({ minLength: 1 }),\n\tapi: IdSchema,\n\treasoning: Type.Boolean(),\n\tinput: Type.Array(Type.Union([Type.Literal(\"text\"), Type.Literal(\"image\")])),\n\tcontextWindow: Type.Integer({ minimum: 1 }),\n\tmaxTokens: Type.Integer({ minimum: 1 }),\n\tcost: ModelCostSchema,\n\tsupportedThinkingLevels: Type.Array(ThinkingLevelSchema, { minItems: 1 }),\n\tauthenticated: Type.Boolean(),\n});\nexport type ModelMetadata = Static<typeof ModelMetadataSchema>;\n\nexport const TextContentSchema = StrictObject({\n\ttype: Type.Literal(\"text\"),\n\ttext: Type.String(),\n});\nexport const ThinkingContentSchema = StrictObject({\n\ttype: Type.Literal(\"thinking\"),\n\tthinking: Type.String(),\n\tredacted: Type.Optional(Type.Boolean()),\n});\nexport const ImageContentSchema = StrictObject({\n\ttype: Type.Literal(\"image\"),\n\tdata: Type.String(),\n\tmimeType: Type.String({ minLength: 1 }),\n});\nexport const ToolCallContentSchema = StrictObject({\n\ttype: Type.Literal(\"toolCall\"),\n\ttoolCallId: IdSchema,\n\ttoolName: IdSchema,\n\tinput: JsonValueSchema,\n});\nexport const UserContentSchema = Type.Union([TextContentSchema, ImageContentSchema]);\nexport const AssistantContentSchema = Type.Union([TextContentSchema, ThinkingContentSchema, ToolCallContentSchema]);\nexport const ToolContentSchema = Type.Union([TextContentSchema, ImageContentSchema]);\nexport type TextContent = Static<typeof TextContentSchema>;\nexport type ThinkingContent = Static<typeof ThinkingContentSchema>;\nexport type ImageContent = Static<typeof ImageContentSchema>;\nexport type ToolCallContent = Static<typeof ToolCallContentSchema>;\n\nexport const UsageSchema = StrictObject({\n\tinput: Type.Integer({ minimum: 0 }),\n\toutput: Type.Integer({ minimum: 0 }),\n\tcacheRead: Type.Integer({ minimum: 0 }),\n\tcacheWrite: Type.Integer({ minimum: 0 }),\n\treasoning: Type.Optional(Type.Integer({ minimum: 0 })),\n\ttotalTokens: Type.Integer({ minimum: 0 }),\n\tcost: StrictObject({\n\t\tinput: Type.Number({ minimum: 0 }),\n\t\toutput: Type.Number({ minimum: 0 }),\n\t\tcacheRead: Type.Number({ minimum: 0 }),\n\t\tcacheWrite: Type.Number({ minimum: 0 }),\n\t\ttotal: Type.Number({ minimum: 0 }),\n\t}),\n});\nexport type Usage = Static<typeof UsageSchema>;\n\nexport const UserTranscriptItemSchema = StrictObject({\n\tid: IdSchema,\n\trole: Type.Literal(\"user\"),\n\tcontent: Type.Array(UserContentSchema),\n\ttimestamp: TimestampSchema,\n});\nconst AssistantTranscriptItemProperties = {\n\tid: IdSchema,\n\trole: Type.Literal(\"assistant\"),\n\tcontent: Type.Array(AssistantContentSchema),\n\tmodel: ModelRefSchema,\n\tresponseModel: Type.Optional(Type.String({ minLength: 1 })),\n\tusage: Type.Optional(UsageSchema),\n\ttimestamp: TimestampSchema,\n} as const;\nconst StreamingAssistantTranscriptItemSchema = StrictObject({\n\t...AssistantTranscriptItemProperties,\n\tstatus: Type.Literal(\"streaming\"),\n});\nconst CompleteAssistantTranscriptItemSchema = StrictObject({\n\t...AssistantTranscriptItemProperties,\n\tstatus: Type.Literal(\"complete\"),\n\tstopReason: Type.Union([Type.Literal(\"stop\"), Type.Literal(\"length\"), Type.Literal(\"toolUse\")]),\n});\nconst ErrorAssistantTranscriptItemSchema = StrictObject({\n\t...AssistantTranscriptItemProperties,\n\tstatus: Type.Literal(\"error\"),\n\tstopReason: Type.Literal(\"error\"),\n\terrorMessage: Type.Optional(Type.String({ minLength: 1 })),\n});\nconst AbortedAssistantTranscriptItemSchema = StrictObject({\n\t...AssistantTranscriptItemProperties,\n\tstatus: Type.Literal(\"aborted\"),\n\tstopReason: Type.Literal(\"aborted\"),\n\terrorMessage: Type.Optional(Type.String()),\n});\nexport const AssistantTranscriptItemSchema = Type.Union([\n\tStreamingAssistantTranscriptItemSchema,\n\tCompleteAssistantTranscriptItemSchema,\n\tErrorAssistantTranscriptItemSchema,\n\tAbortedAssistantTranscriptItemSchema,\n]);\nconst ToolTranscriptItemProperties = {\n\tid: IdSchema,\n\trole: Type.Literal(\"tool\"),\n\ttoolCallId: IdSchema,\n\ttoolName: IdSchema,\n\tinput: JsonValueSchema,\n\tcontent: Type.Array(ToolContentSchema),\n\tdetails: Type.Optional(JsonValueSchema),\n\tusage: Type.Optional(UsageSchema),\n\ttimestamp: TimestampSchema,\n} as const;\nconst RunningToolTranscriptItemSchema = StrictObject({\n\t...ToolTranscriptItemProperties,\n\tstatus: Type.Literal(\"running\"),\n\tisError: Type.Literal(false),\n});\nconst CompleteToolTranscriptItemSchema = StrictObject({\n\t...ToolTranscriptItemProperties,\n\tstatus: Type.Literal(\"complete\"),\n\tisError: Type.Literal(false),\n});\nconst ErrorToolTranscriptItemSchema = StrictObject({\n\t...ToolTranscriptItemProperties,\n\tstatus: Type.Literal(\"error\"),\n\tisError: Type.Literal(true),\n});\nexport const ToolTranscriptItemSchema = Type.Union([\n\tRunningToolTranscriptItemSchema,\n\tCompleteToolTranscriptItemSchema,\n\tErrorToolTranscriptItemSchema,\n]);\nexport const TranscriptItemSchema = Type.Union([\n\tUserTranscriptItemSchema,\n\tAssistantTranscriptItemSchema,\n\tToolTranscriptItemSchema,\n]);\nexport type UserTranscriptItem = Static<typeof UserTranscriptItemSchema>;\nexport type AssistantTranscriptItem = Static<typeof AssistantTranscriptItemSchema>;\nexport type ToolTranscriptItem = Static<typeof ToolTranscriptItemSchema>;\nexport type TranscriptItem = Static<typeof TranscriptItemSchema>;\n\n/** Normalized incremental activity. Snapshots remain authoritative. */\nexport const TranscriptProgressSchema = Type.Union([\n\tStrictObject({\n\t\ttype: Type.Literal(\"item_started\"),\n\t\titem: TranscriptItemSchema,\n\t}),\n\tStrictObject({\n\t\ttype: Type.Literal(\"assistant_delta\"),\n\t\tmessageId: IdSchema,\n\t\tcontentIndex: Type.Integer({ minimum: 0 }),\n\t\tkind: Type.Union([Type.Literal(\"text\"), Type.Literal(\"thinking\"), Type.Literal(\"toolCall\")]),\n\t\tdelta: Type.String(),\n\t}),\n\tStrictObject({\n\t\ttype: Type.Literal(\"item_updated\"),\n\t\titem: Type.Union([AssistantTranscriptItemSchema, ToolTranscriptItemSchema]),\n\t}),\n\tStrictObject({\n\t\ttype: Type.Literal(\"item_finished\"),\n\t\titem: Type.Union([\n\t\t\tCompleteAssistantTranscriptItemSchema,\n\t\t\tErrorAssistantTranscriptItemSchema,\n\t\t\tAbortedAssistantTranscriptItemSchema,\n\t\t\tCompleteToolTranscriptItemSchema,\n\t\t\tErrorToolTranscriptItemSchema,\n\t\t]),\n\t}),\n]);\nexport type TranscriptProgress = Static<typeof TranscriptProgressSchema>;\n\nconst SessionSummaryProperties = {\n\tid: IdSchema,\n\tname: Type.Optional(Type.String()),\n\tcwd: Type.String({ minLength: 1 }),\n\tcreatedAt: TimestampSchema,\n\tupdatedAt: TimestampSchema,\n\tphase: SessionPhaseSchema,\n\tmodel: ModelRefSchema,\n\tthinkingLevel: ThinkingLevelSchema,\n\tattached: Type.Boolean(),\n\tlocked: Type.Boolean(),\n} as const;\n\nexport const SessionSummarySchema = StrictObject(SessionSummaryProperties);\nexport const SessionSnapshotSchema = StrictObject({\n\t...SessionSummaryProperties,\n\trevision: Type.Integer({ minimum: 0 }),\n\ttranscript: Type.Array(TranscriptItemSchema),\n\tqueuedSteer: Type.Array(UserTranscriptItemSchema),\n\tqueuedSteerCount: Type.Integer({ minimum: 0 }),\n});\nexport type SessionSummary = Static<typeof SessionSummarySchema>;\nexport type SessionSnapshot = Static<typeof SessionSnapshotSchema>;\n\nexport const ServerSnapshotSchema = StrictObject({\n\tserverId: IdSchema,\n\tprotocolVersion: Type.Literal(PROTOCOL_VERSION),\n\trevision: Type.Integer({ minimum: 0 }),\n\tsessions: Type.Array(SessionSummarySchema),\n\tmodels: Type.Array(ModelMetadataSchema),\n});\nexport type ServerSnapshot = Static<typeof ServerSnapshotSchema>;\n\nexport const ProtocolErrorCodeSchema = Type.Union([\n\tType.Literal(\"auth\"),\n\tType.Literal(\"version\"),\n\tType.Literal(\"busy\"),\n\tType.Literal(\"session_locked\"),\n\tType.Literal(\"not_found\"),\n\tType.Literal(\"invalid_request\"),\n]);\nexport const ProtocolErrorSchema = StrictObject({\n\tcode: ProtocolErrorCodeSchema,\n\tmessage: Type.String(),\n\tdetails: Type.Optional(JsonValueSchema),\n});\nexport type ProtocolErrorCode = Static<typeof ProtocolErrorCodeSchema>;\nexport type ProtocolError = Static<typeof ProtocolErrorSchema>;\n\nconst PromptPayloadProperties = {\n\tsessionId: IdSchema,\n\ttext: Type.String(),\n} as const;\n\nexport const ListCommandSchema = StrictObject({ command: Type.Literal(\"list\") });\nexport const CreateCommandSchema = StrictObject({\n\tcommand: Type.Literal(\"create\"),\n\tcwd: Type.Optional(Type.String({ minLength: 1 })),\n\tname: Type.Optional(Type.String()),\n\tmodel: Type.Optional(ModelRefSchema),\n\tthinkingLevel: Type.Optional(ThinkingLevelSchema),\n});\nexport const AttachCommandSchema = StrictObject({ command: Type.Literal(\"attach\"), sessionId: IdSchema });\nexport const DetachCommandSchema = StrictObject({ command: Type.Literal(\"detach\"), sessionId: IdSchema });\nexport const PromptCommandSchema = StrictObject({ command: Type.Literal(\"prompt\"), ...PromptPayloadProperties });\nexport const SteerCommandSchema = StrictObject({ command: Type.Literal(\"steer\"), ...PromptPayloadProperties });\nexport const AbortCommandSchema = StrictObject({ command: Type.Literal(\"abort\"), sessionId: IdSchema });\nexport const SetModelCommandSchema = StrictObject({\n\tcommand: Type.Literal(\"set_model\"),\n\tsessionId: IdSchema,\n\tmodel: ModelRefSchema,\n});\nexport const SetThinkingCommandSchema = StrictObject({\n\tcommand: Type.Literal(\"set_thinking\"),\n\tsessionId: IdSchema,\n\tthinkingLevel: ThinkingLevelSchema,\n});\nexport const CommandSchema = Type.Union([\n\tListCommandSchema,\n\tCreateCommandSchema,\n\tAttachCommandSchema,\n\tDetachCommandSchema,\n\tPromptCommandSchema,\n\tSteerCommandSchema,\n\tAbortCommandSchema,\n\tSetModelCommandSchema,\n\tSetThinkingCommandSchema,\n]);\nexport type Command = Static<typeof CommandSchema>;\nexport type CommandName = Command[\"command\"];\n\nexport const CreateResultSchema = StrictObject({\n\tcommand: Type.Literal(\"create\"),\n\tsession: SessionSnapshotSchema,\n});\nexport const AttachResultSchema = StrictObject({\n\tcommand: Type.Literal(\"attach\"),\n\tsession: SessionSnapshotSchema,\n});\nexport const PromptResultSchema = StrictObject({\n\tcommand: Type.Literal(\"prompt\"),\n\tsession: SessionSnapshotSchema,\n});\nexport const SteerResultSchema = StrictObject({\n\tcommand: Type.Literal(\"steer\"),\n\tsession: SessionSnapshotSchema,\n});\nexport const AbortResultSchema = StrictObject({\n\tcommand: Type.Literal(\"abort\"),\n\tsession: SessionSnapshotSchema,\n});\nexport const SetModelResultSchema = StrictObject({\n\tcommand: Type.Literal(\"set_model\"),\n\tsession: SessionSnapshotSchema,\n});\nexport const SetThinkingResultSchema = StrictObject({\n\tcommand: Type.Literal(\"set_thinking\"),\n\tsession: SessionSnapshotSchema,\n});\n\nexport const ListResultSchema = StrictObject({\n\tcommand: Type.Literal(\"list\"),\n\tsessions: Type.Array(SessionSummarySchema),\n});\nexport const DetachResultSchema = StrictObject({\n\tcommand: Type.Literal(\"detach\"),\n\tsessionId: IdSchema,\n});\nexport const CommandResultSchema = Type.Union([\n\tListResultSchema,\n\tCreateResultSchema,\n\tAttachResultSchema,\n\tDetachResultSchema,\n\tPromptResultSchema,\n\tSteerResultSchema,\n\tAbortResultSchema,\n\tSetModelResultSchema,\n\tSetThinkingResultSchema,\n]);\nexport type CommandResult = Static<typeof CommandResultSchema>;\n\nexport type ResultForCommand<TCommand extends Command> = TCommand[\"command\"] extends \"list\"\n\t? Static<typeof ListResultSchema>\n\t: TCommand[\"command\"] extends \"detach\"\n\t\t? Static<typeof DetachResultSchema>\n\t\t: Extract<CommandResult, { command: TCommand[\"command\"] }>;\n\n/** Must be the first frame sent by a client. Version is intentionally an integer, not a coercible string. */\nexport const ClientHelloSchema = StrictObject({\n\ttype: Type.Literal(\"hello\"),\n\tversion: Type.Integer({ minimum: 0 }),\n\ttoken: Type.String({ minLength: 1 }),\n});\nexport type ClientHello = Static<typeof ClientHelloSchema>;\n\nexport const RequestEnvelopeSchema = StrictObject({\n\ttype: Type.Literal(\"request\"),\n\tid: IdSchema,\n\trequest: CommandSchema,\n});\nexport type RequestEnvelope = Static<typeof RequestEnvelopeSchema>;\nexport const ClientMessageSchema = Type.Union([ClientHelloSchema, RequestEnvelopeSchema]);\nexport type ClientMessage = Static<typeof ClientMessageSchema>;\n\nexport const ServerEventSchema = Type.Union([\n\tStrictObject({ type: Type.Literal(\"server_snapshot\"), snapshot: ServerSnapshotSchema }),\n\tStrictObject({ type: Type.Literal(\"session_snapshot\"), snapshot: SessionSnapshotSchema }),\n\tStrictObject({\n\t\ttype: Type.Literal(\"session_progress\"),\n\t\tsessionId: IdSchema,\n\t\tprogress: TranscriptProgressSchema,\n\t}),\n\tStrictObject({ type: Type.Literal(\"session_removed\"), sessionId: IdSchema }),\n]);\nexport type ServerEvent = Static<typeof ServerEventSchema>;\n\nexport const ServerHelloSchema = StrictObject({\n\ttype: Type.Literal(\"hello\"),\n\tversion: Type.Literal(PROTOCOL_VERSION),\n\tconnectionId: IdSchema,\n\tsnapshot: ServerSnapshotSchema,\n});\nexport const ServerHelloErrorSchema = StrictObject({\n\ttype: Type.Literal(\"hello_error\"),\n\terror: ProtocolErrorSchema,\n});\nexport const ResponseEnvelopeSchema = Type.Union([\n\tStrictObject({\n\t\ttype: Type.Literal(\"response\"),\n\t\tid: IdSchema,\n\t\tok: Type.Literal(true),\n\t\tresult: CommandResultSchema,\n\t}),\n\tStrictObject({\n\t\ttype: Type.Literal(\"response\"),\n\t\tid: IdSchema,\n\t\tok: Type.Literal(false),\n\t\terror: ProtocolErrorSchema,\n\t}),\n]);\nexport const EventEnvelopeSchema = StrictObject({\n\ttype: Type.Literal(\"event\"),\n\tevent: ServerEventSchema,\n});\nexport const ServerMessageSchema = Type.Union([\n\tServerHelloSchema,\n\tServerHelloErrorSchema,\n\tResponseEnvelopeSchema,\n\tEventEnvelopeSchema,\n]);\nexport type ServerHello = Static<typeof ServerHelloSchema>;\nexport type ServerHelloError = Static<typeof ServerHelloErrorSchema>;\nexport type ResponseEnvelope = Static<typeof ResponseEnvelopeSchema>;\nexport type EventEnvelope = Static<typeof EventEnvelopeSchema>;\nexport type ServerMessage = Static<typeof ServerMessageSchema>;\n"]}
@@ -1,3 +0,0 @@
1
- /** Repairs Anthropic client tool_use/tool_result adjacency at the final provider boundary. */
2
- export declare function sanitizeAnthropicPayload(payload: unknown): unknown;
3
- //# sourceMappingURL=sanitize-anthropic-payload.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"sanitize-anthropic-payload.d.ts","sourceRoot":"","sources":["../../../../../src/core/extensions/builtin/tool-pair-guard/sanitize-anthropic-payload.ts"],"names":[],"mappings":"AAsGA,8FAA8F;AAC9F,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAoDlE"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"sanitize-anthropic-payload.js","sourceRoot":"","sources":["../../../../../src/core/extensions/builtin/tool-pair-guard/sanitize-anthropic-payload.ts"],"names":[],"mappings":"AAEA,SAAS,QAAQ,CAAC,KAAc;IAC/B,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,CAAC;AACpD,CAAC;AAED,SAAS,gBAAgB,CAAC,KAAc;IACvC,OAAO,QAAQ,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;AACzD,CAAC;AAED,SAAS,mBAAmB,CAAC,KAAc;IAC1C,OAAO,QAAQ,CAAC,KAAK,CAAC,IAAI,OAAO,KAAK,CAAC,IAAI,KAAK,QAAQ,CAAC;AAC1D,CAAC;AAED,SAAS,cAAc,CAAC,KAAwB;IAC/C,OAAO,KAAK,CAAC,IAAI,KAAK,UAAU,IAAI,IAAI,IAAI,KAAK,IAAI,OAAO,KAAK,CAAC,EAAE,KAAK,QAAQ,CAAC;AACnF,CAAC;AAED,SAAS,iBAAiB,CAAC,KAAwB;IAClD,OAAO,KAAK,CAAC,IAAI,KAAK,aAAa,CAAC;AACrC,CAAC;AAED,MAAM,gBAAgB,GAAG,qDAAqD,CAAC;AAE/E,SAAS,yBAAyB,CACjC,KAAc,EACd,IAAU;IAEV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,IAAI,CAAC,cAAc,CAAC,CAAC;IACxC,CAAC;IAED,IAAI,CAAC,OAAO;QAAE,OAAO,OAAO,CAAC;IAC7B,OAAO,EAAE,GAAG,OAAO,EAAE,QAAQ,EAAE,iBAAiB,EAAE,CAAC;AACpD,CAAC","sourcesContent":["import type { ContentBlockParam, MessageParam } from \"@anthropic-ai/sdk/resources/messages.js\";\n\nfunction isObject(value: unknown): value is Record<string, unknown> {\n\treturn typeof value === \"object\" && value !== null;\n}\n\nfunction hasMessagesArray(value: unknown): value is { messages: unknown[] } {\n\treturn isObject(value) && Array.isArray(value.messages);\n}\n\nfunction isContentBlockParam(value: unknown): value is ContentBlockParam {\n\treturn isObject(value) && typeof value.type === \"string\";\n}\n\nfunction isToolUseBlock(block: ContentBlockParam): block is Extract<ContentBlockParam, { type: \"tool_use\" }> {\n\treturn block.type === \"tool_use\" && \"id\" in block && typeof block.id === \"string\";\n}\n\nfunction isToolResultBlock(block: ContentBlockParam): block is Extract<ContentBlockParam, { type: \"tool_result\" }> {\n\treturn block.type === \"tool_result\";\n}\n\nconst SYNTHETIC_OUTPUT = \"Tool output unavailable (interrupted before result)\";\n\nfunction isMessageWithArrayContent<Role extends MessageParam[\"role\"]>(\n\tvalue: unknown,\n\trole: Role,\n): value is MessageParam & { role: Role; content: ContentBlockParam[] } {\n\tif (!isObject(value) || value.role !== role || !Array.isArray(value.content)) return false;\n\tfor (const block of value.content) {\n\t\tif (!isContentBlockParam(block)) return false;\n\t}\n\treturn true;\n}\n\nfunction isUserMessageWithStringContent(value: unknown): value is MessageParam & { role: \"user\"; content: string } {\n\treturn isObject(value) && value.role === \"user\" && typeof value.content === \"string\";\n}\n\nfunction getToolUseIds(message: MessageParam & { content: ContentBlockParam[] }): string[] {\n\tconst ids: string[] = [];\n\tconst seen = new Set<string>();\n\tfor (const block of message.content) {\n\t\tif (!isToolUseBlock(block) || block.id.length === 0 || seen.has(block.id)) continue;\n\t\tseen.add(block.id);\n\t\tids.push(block.id);\n\t}\n\treturn ids;\n}\n\nfunction syntheticToolResult(toolUseId: string): Extract<ContentBlockParam, { type: \"tool_result\" }> {\n\treturn {\n\t\ttype: \"tool_result\",\n\t\ttool_use_id: toolUseId,\n\t\tcontent: SYNTHETIC_OUTPUT,\n\t\tis_error: true,\n\t};\n}\n\nfunction sameBlocks(left: ContentBlockParam[], right: ContentBlockParam[]): boolean {\n\treturn left.length === right.length && left.every((block, index) => block === right[index]);\n}\n\nfunction repairFollowingUserMessage(\n\tmessage: MessageParam & { role: \"user\"; content: ContentBlockParam[] },\n\texpectedIds: string[],\n): { message: MessageParam; changed: boolean } {\n\tconst expected = new Set(expectedIds);\n\tconst found = new Set<string>();\n\tconst results: ContentBlockParam[] = [];\n\tconst ordinary: ContentBlockParam[] = [];\n\n\tfor (const block of message.content) {\n\t\tif (!isToolResultBlock(block)) {\n\t\t\tordinary.push(block);\n\t\t\tcontinue;\n\t\t}\n\t\tconst id = block.tool_use_id;\n\t\tif (typeof id !== \"string\" || !expected.has(id) || found.has(id)) continue;\n\t\tfound.add(id);\n\t\tresults.push(block);\n\t}\n\n\tfor (const id of expectedIds) {\n\t\tif (!found.has(id)) results.push(syntheticToolResult(id));\n\t}\n\n\tconst content = [...results, ...ordinary];\n\tif (sameBlocks(content, message.content)) return { message, changed: false };\n\treturn { message: { ...message, content }, changed: true };\n}\n\nfunction removeOrphanResults(message: MessageParam & { role: \"user\"; content: ContentBlockParam[] }): {\n\tmessage?: MessageParam;\n\tchanged: boolean;\n} {\n\tconst content = message.content.filter((block) => !isToolResultBlock(block));\n\tif (content.length === message.content.length) return { message, changed: false };\n\tif (content.length === 0) return { changed: true };\n\treturn { message: { ...message, content }, changed: true };\n}\n\n/** Repairs Anthropic client tool_use/tool_result adjacency at the final provider boundary. */\nexport function sanitizeAnthropicPayload(payload: unknown): unknown {\n\tif (!hasMessagesArray(payload)) return payload;\n\n\tlet changed = false;\n\tconst sanitizedMessages: unknown[] = [];\n\n\tfor (let index = 0; index < payload.messages.length; index++) {\n\t\tconst unknownMessage = payload.messages[index];\n\t\tif (isMessageWithArrayContent(unknownMessage, \"assistant\")) {\n\t\t\tsanitizedMessages.push(unknownMessage);\n\t\t\tconst expectedIds = getToolUseIds(unknownMessage);\n\t\t\tif (expectedIds.length === 0) continue;\n\n\t\t\tconst nextMessage = payload.messages[index + 1];\n\t\t\tif (isMessageWithArrayContent(nextMessage, \"user\")) {\n\t\t\t\tconst repaired = repairFollowingUserMessage(nextMessage, expectedIds);\n\t\t\t\tsanitizedMessages.push(repaired.message);\n\t\t\t\tchanged ||= repaired.changed;\n\t\t\t\tindex++;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (isUserMessageWithStringContent(nextMessage)) {\n\t\t\t\tsanitizedMessages.push({\n\t\t\t\t\t...nextMessage,\n\t\t\t\t\tcontent: [...expectedIds.map(syntheticToolResult), { type: \"text\", text: nextMessage.content }],\n\t\t\t\t});\n\t\t\t\tchanged = true;\n\t\t\t\tindex++;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tsanitizedMessages.push({\n\t\t\t\trole: \"user\",\n\t\t\t\tcontent: expectedIds.map(syntheticToolResult),\n\t\t\t});\n\t\t\tchanged = true;\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (isMessageWithArrayContent(unknownMessage, \"user\")) {\n\t\t\tconst repaired = removeOrphanResults(unknownMessage);\n\t\t\tif (repaired.message) sanitizedMessages.push(repaired.message);\n\t\t\tchanged ||= repaired.changed;\n\t\t\tcontinue;\n\t\t}\n\n\t\tsanitizedMessages.push(unknownMessage);\n\t}\n\n\tif (!changed) return payload;\n\treturn { ...payload, messages: sanitizedMessages };\n}\n"]}
@@ -1,26 +0,0 @@
1
- import type { FileSystem, JsonlSessionCreateOptions, JsonlSessionListOptions, JsonlSessionMetadata, JsonlSessionRepoApi, Session } from "../types.ts";
2
- type JsonlSessionRepoFileSystem = Pick<FileSystem, "cwd" | "absolutePath" | "joinPath" | "readTextFile" | "readTextLines" | "writeFile" | "appendFile" | "listDir" | "exists" | "createDir" | "remove">;
3
- export declare class JsonlSessionRepo implements JsonlSessionRepoApi {
4
- private readonly fs;
5
- private readonly sessionsRootInput;
6
- private sessionsRoot;
7
- constructor(options: {
8
- fs: JsonlSessionRepoFileSystem;
9
- sessionsRoot: string;
10
- });
11
- private getSessionsRoot;
12
- private getSessionDir;
13
- private createSessionFilePath;
14
- create(options: JsonlSessionCreateOptions): Promise<Session<JsonlSessionMetadata>>;
15
- open(metadata: JsonlSessionMetadata): Promise<Session<JsonlSessionMetadata>>;
16
- list(options?: JsonlSessionListOptions): Promise<JsonlSessionMetadata[]>;
17
- delete(metadata: JsonlSessionMetadata): Promise<void>;
18
- fork(sourceMetadata: JsonlSessionMetadata, options: JsonlSessionCreateOptions & {
19
- entryId?: string;
20
- position?: "before" | "at";
21
- id?: string;
22
- }): Promise<Session<JsonlSessionMetadata>>;
23
- private listSessionDirs;
24
- }
25
- export {};
26
- //# sourceMappingURL=jsonl-repo.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"jsonl-repo.d.ts","sourceRoot":"","sources":["../../../src/harness/session/jsonl-repo.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,UAAU,EACV,yBAAyB,EACzB,uBAAuB,EACvB,oBAAoB,EACpB,mBAAmB,EACnB,OAAO,EACP,MAAM,aAAa,CAAC;AAWrB,KAAK,0BAA0B,GAAG,IAAI,CACrC,UAAU,EACR,KAAK,GACL,cAAc,GACd,UAAU,GACV,cAAc,GACd,eAAe,GACf,WAAW,GACX,YAAY,GACZ,SAAS,GACT,QAAQ,GACR,WAAW,GACX,QAAQ,CACV,CAAC;AAMF,qBAAa,gBAAiB,YAAW,mBAAmB;IAC3D,OAAO,CAAC,QAAQ,CAAC,EAAE,CAA6B;IAChD,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAS;IAC3C,OAAO,CAAC,YAAY,CAAqB;IAEzC,YAAY,OAAO,EAAE;QAAE,EAAE,EAAE,0BAA0B,CAA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