@code-yeongyu/senpi 2026.9.12-3 → 2026.9.12

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 (1525) hide show
  1. package/CHANGELOG.md +0 -60
  2. package/README.md +1 -1
  3. package/dist/bun/cli.d.ts +1 -2
  4. package/dist/bun/cli.d.ts.map +1 -1
  5. package/dist/bun/cli.js +8 -5
  6. package/dist/bun/cli.js.map +1 -1
  7. package/dist/bun/register-bedrock.d.ts +2 -0
  8. package/dist/bun/register-bedrock.d.ts.map +1 -0
  9. package/dist/bun/register-bedrock.js +4 -0
  10. package/dist/bun/register-bedrock.js.map +1 -0
  11. package/dist/cli/config-selector.d.ts.map +1 -1
  12. package/dist/cli/config-selector.js +1 -2
  13. package/dist/cli/config-selector.js.map +1 -1
  14. package/dist/cli/experimental/auth.d.ts +16 -0
  15. package/dist/cli/experimental/auth.d.ts.map +1 -0
  16. package/dist/cli/experimental/auth.js +13 -0
  17. package/dist/cli/experimental/auth.js.map +1 -0
  18. package/dist/cli/experimental/cli.d.ts +6 -0
  19. package/dist/cli/experimental/cli.d.ts.map +1 -0
  20. package/dist/cli/experimental/cli.js +5 -0
  21. package/dist/cli/experimental/cli.js.map +1 -0
  22. package/dist/cli/experimental/command-options.d.ts +17 -0
  23. package/dist/cli/experimental/command-options.d.ts.map +1 -0
  24. package/dist/cli/experimental/command-options.js +35 -0
  25. package/dist/cli/experimental/command-options.js.map +1 -0
  26. package/dist/cli/experimental/command.d.ts +63 -0
  27. package/dist/cli/experimental/command.d.ts.map +1 -0
  28. package/dist/cli/experimental/command.js +127 -0
  29. package/dist/cli/experimental/command.js.map +1 -0
  30. package/dist/cli/experimental/commands/client.d.ts +13 -0
  31. package/dist/cli/experimental/commands/client.d.ts.map +1 -0
  32. package/dist/cli/experimental/commands/client.js +25 -0
  33. package/dist/cli/experimental/commands/client.js.map +1 -0
  34. package/dist/cli/experimental/commands/pi.d.ts +15 -0
  35. package/dist/cli/experimental/commands/pi.d.ts.map +1 -0
  36. package/dist/cli/experimental/commands/pi.js +28 -0
  37. package/dist/cli/experimental/commands/pi.js.map +1 -0
  38. package/dist/cli/experimental/commands/server.d.ts +13 -0
  39. package/dist/cli/experimental/commands/server.d.ts.map +1 -0
  40. package/dist/cli/experimental/commands/server.js +25 -0
  41. package/dist/cli/experimental/commands/server.js.map +1 -0
  42. package/dist/cli/experimental/transport-address.d.ts +10 -0
  43. package/dist/cli/experimental/transport-address.d.ts.map +1 -0
  44. package/dist/cli/experimental/transport-address.js +38 -0
  45. package/dist/cli/experimental/transport-address.js.map +1 -0
  46. package/dist/cli.js +0 -3
  47. package/dist/cli.js.map +1 -1
  48. package/dist/client/index.d.ts +2 -1
  49. package/dist/client/index.d.ts.map +1 -1
  50. package/dist/client/index.js +2 -1
  51. package/dist/client/index.js.map +1 -1
  52. package/dist/client/remote-session.d.ts +53 -0
  53. package/dist/client/remote-session.d.ts.map +1 -0
  54. package/dist/client/remote-session.js +340 -0
  55. package/dist/client/remote-session.js.map +1 -0
  56. package/dist/client/transcript.d.ts +12 -0
  57. package/dist/client/transcript.d.ts.map +1 -0
  58. package/dist/client/transcript.js +98 -0
  59. package/dist/client/transcript.js.map +1 -0
  60. package/dist/config.d.ts +0 -1
  61. package/dist/config.d.ts.map +1 -1
  62. package/dist/config.js +0 -1
  63. package/dist/config.js.map +1 -1
  64. package/dist/core/agent-session-runtime.d.ts.map +1 -1
  65. package/dist/core/agent-session-runtime.js +6 -18
  66. package/dist/core/agent-session-runtime.js.map +1 -1
  67. package/dist/core/agent-session.d.ts +17 -54
  68. package/dist/core/agent-session.d.ts.map +1 -1
  69. package/dist/core/agent-session.js +157 -153
  70. package/dist/core/agent-session.js.map +1 -1
  71. package/dist/core/compaction/branch-summarization.d.ts +1 -1
  72. package/dist/core/compaction/branch-summarization.d.ts.map +1 -1
  73. package/dist/core/compaction/branch-summarization.js +4 -6
  74. package/dist/core/compaction/branch-summarization.js.map +1 -1
  75. package/dist/core/compaction-settings-access.d.ts +2 -18
  76. package/dist/core/compaction-settings-access.d.ts.map +1 -1
  77. package/dist/core/compaction-settings-access.js +4 -35
  78. package/dist/core/compaction-settings-access.js.map +1 -1
  79. package/dist/core/compaction-settings-resolver.d.ts +2 -2
  80. package/dist/core/compaction-settings-resolver.d.ts.map +1 -1
  81. package/dist/core/compaction-settings-resolver.js +3 -6
  82. package/dist/core/compaction-settings-resolver.js.map +1 -1
  83. package/dist/core/extensions/builtin/ask-user/extension.d.ts.map +1 -1
  84. package/dist/core/extensions/builtin/ask-user/extension.js +0 -11
  85. package/dist/core/extensions/builtin/ask-user/extension.js.map +1 -1
  86. package/dist/core/extensions/builtin/cursor-cli-oauth/models.d.ts.map +1 -1
  87. package/dist/core/extensions/builtin/cursor-cli-oauth/models.js +1 -2
  88. package/dist/core/extensions/builtin/cursor-cli-oauth/models.js.map +1 -1
  89. package/dist/core/extensions/builtin/prompt-preset/presets.d.ts.map +1 -1
  90. package/dist/core/extensions/builtin/prompt-preset/presets.js +1 -7
  91. package/dist/core/extensions/builtin/prompt-preset/presets.js.map +1 -1
  92. package/dist/core/extensions/loader.d.ts.map +1 -1
  93. package/dist/core/extensions/loader.js +2 -4
  94. package/dist/core/extensions/loader.js.map +1 -1
  95. package/dist/core/keybindings.d.ts +0 -10
  96. package/dist/core/keybindings.d.ts.map +1 -1
  97. package/dist/core/keybindings.js +0 -8
  98. package/dist/core/keybindings.js.map +1 -1
  99. package/dist/core/messages.d.ts +1 -1
  100. package/dist/core/messages.d.ts.map +1 -1
  101. package/dist/core/messages.js.map +1 -1
  102. package/dist/core/model-registry.d.ts +1 -5
  103. package/dist/core/model-registry.d.ts.map +1 -1
  104. package/dist/core/model-registry.js +0 -8
  105. package/dist/core/model-registry.js.map +1 -1
  106. package/dist/core/model-resolver.d.ts.map +1 -1
  107. package/dist/core/model-resolver.js +0 -2
  108. package/dist/core/model-resolver.js.map +1 -1
  109. package/dist/core/model-runtime.d.ts +0 -1
  110. package/dist/core/model-runtime.d.ts.map +1 -1
  111. package/dist/core/model-runtime.js +2 -5
  112. package/dist/core/model-runtime.js.map +1 -1
  113. package/dist/core/retry-fallback/settings.d.ts +0 -2
  114. package/dist/core/retry-fallback/settings.d.ts.map +1 -1
  115. package/dist/core/retry-fallback/settings.js.map +1 -1
  116. package/dist/core/session-manager.d.ts +2 -5
  117. package/dist/core/session-manager.d.ts.map +1 -1
  118. package/dist/core/session-manager.js +19 -68
  119. package/dist/core/session-manager.js.map +1 -1
  120. package/dist/core/session-write-reservation.d.ts +0 -9
  121. package/dist/core/session-write-reservation.d.ts.map +1 -1
  122. package/dist/core/session-write-reservation.js +0 -33
  123. package/dist/core/session-write-reservation.js.map +1 -1
  124. package/dist/core/settings-manager.d.ts +5 -12
  125. package/dist/core/settings-manager.d.ts.map +1 -1
  126. package/dist/core/settings-manager.js +6 -18
  127. package/dist/core/settings-manager.js.map +1 -1
  128. package/dist/core/settings-public-types.d.ts +1 -1
  129. package/dist/core/settings-public-types.d.ts.map +1 -1
  130. package/dist/core/settings-public-types.js.map +1 -1
  131. package/dist/core/skills.d.ts +1 -1
  132. package/dist/core/skills.d.ts.map +1 -1
  133. package/dist/core/skills.js +2 -6
  134. package/dist/core/skills.js.map +1 -1
  135. package/dist/core/system-prompt.d.ts.map +1 -1
  136. package/dist/core/system-prompt.js +9 -8
  137. package/dist/core/system-prompt.js.map +1 -1
  138. package/dist/core/tools/bash.d.ts.map +1 -1
  139. package/dist/core/tools/bash.js +142 -3
  140. package/dist/core/tools/bash.js.map +1 -1
  141. package/dist/core/tools/edit.d.ts +12 -1
  142. package/dist/core/tools/edit.d.ts.map +1 -1
  143. package/dist/core/tools/edit.js +168 -4
  144. package/dist/core/tools/edit.js.map +1 -1
  145. package/dist/core/tools/find.d.ts.map +1 -1
  146. package/dist/core/tools/find.js +53 -2
  147. package/dist/core/tools/find.js.map +1 -1
  148. package/dist/core/tools/grep.d.ts.map +1 -1
  149. package/dist/core/tools/grep.js +58 -2
  150. package/dist/core/tools/grep.js.map +1 -1
  151. package/dist/core/tools/ls.d.ts.map +1 -1
  152. package/dist/core/tools/ls.js +47 -2
  153. package/dist/core/tools/ls.js.map +1 -1
  154. package/dist/core/tools/read.d.ts +4 -1
  155. package/dist/core/tools/read.d.ts.map +1 -1
  156. package/dist/core/tools/read.js +141 -4
  157. package/dist/core/tools/read.js.map +1 -1
  158. package/dist/core/tools/write.d.ts.map +1 -1
  159. package/dist/core/tools/write.js +153 -4
  160. package/dist/core/tools/write.js.map +1 -1
  161. package/dist/index.d.ts +2 -2
  162. package/dist/index.d.ts.map +1 -1
  163. package/dist/index.js.map +1 -1
  164. package/dist/migrations.d.ts.map +1 -1
  165. package/dist/migrations.js +2 -2
  166. package/dist/migrations.js.map +1 -1
  167. package/dist/modes/app-server/threads/turn-runtime.d.ts +1 -3
  168. package/dist/modes/app-server/threads/turn-runtime.d.ts.map +1 -1
  169. package/dist/modes/app-server/threads/turn-runtime.js.map +1 -1
  170. package/dist/modes/app-server/threads/turns.js +1 -1
  171. package/dist/modes/app-server/threads/turns.js.map +1 -1
  172. package/dist/modes/app-server/turn-adapter.js +2 -4
  173. package/dist/modes/app-server/turn-adapter.js.map +1 -1
  174. package/dist/modes/interactive/components/ask-user-async-widget.d.ts +12 -17
  175. package/dist/modes/interactive/components/ask-user-async-widget.d.ts.map +1 -1
  176. package/dist/modes/interactive/components/ask-user-async-widget.js +23 -47
  177. package/dist/modes/interactive/components/ask-user-async-widget.js.map +1 -1
  178. package/dist/modes/interactive/components/assistant-message.d.ts +0 -7
  179. package/dist/modes/interactive/components/assistant-message.d.ts.map +1 -1
  180. package/dist/modes/interactive/components/assistant-message.js +2 -26
  181. package/dist/modes/interactive/components/assistant-message.js.map +1 -1
  182. package/dist/modes/interactive/components/assistant-render-descriptors.d.ts +0 -4
  183. package/dist/modes/interactive/components/assistant-render-descriptors.d.ts.map +1 -1
  184. package/dist/modes/interactive/components/assistant-render-descriptors.js +5 -8
  185. package/dist/modes/interactive/components/assistant-render-descriptors.js.map +1 -1
  186. package/dist/modes/interactive/components/custom-editor.d.ts +1 -10
  187. package/dist/modes/interactive/components/custom-editor.d.ts.map +1 -1
  188. package/dist/modes/interactive/components/custom-editor.js +1 -37
  189. package/dist/modes/interactive/components/custom-editor.js.map +1 -1
  190. package/dist/modes/interactive/components/index.d.ts +1 -1
  191. package/dist/modes/interactive/components/index.d.ts.map +1 -1
  192. package/dist/modes/interactive/components/index.js.map +1 -1
  193. package/dist/modes/interactive/components/scoped-models-selector.js +8 -8
  194. package/dist/modes/interactive/components/scoped-models-selector.js.map +1 -1
  195. package/dist/modes/interactive/components/status-indicator.d.ts +1 -4
  196. package/dist/modes/interactive/components/status-indicator.d.ts.map +1 -1
  197. package/dist/modes/interactive/components/status-indicator.js +2 -14
  198. package/dist/modes/interactive/components/status-indicator.js.map +1 -1
  199. package/dist/modes/interactive/components/thinking-selector.d.ts.map +1 -1
  200. package/dist/modes/interactive/components/thinking-selector.js +4 -4
  201. package/dist/modes/interactive/components/thinking-selector.js.map +1 -1
  202. package/dist/modes/interactive/components/tool-execution-renderer.d.ts +1 -4
  203. package/dist/modes/interactive/components/tool-execution-renderer.d.ts.map +1 -1
  204. package/dist/modes/interactive/components/tool-execution-renderer.js +10 -23
  205. package/dist/modes/interactive/components/tool-execution-renderer.js.map +1 -1
  206. package/dist/modes/interactive/components/tool-execution-types.d.ts +2 -18
  207. package/dist/modes/interactive/components/tool-execution-types.d.ts.map +1 -1
  208. package/dist/modes/interactive/components/tool-execution-types.js.map +1 -1
  209. package/dist/modes/interactive/components/tool-execution.d.ts +3 -3
  210. package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
  211. package/dist/modes/interactive/components/tool-execution.js +0 -5
  212. package/dist/modes/interactive/components/tool-execution.js.map +1 -1
  213. package/dist/modes/interactive/interactive-mode.d.ts +15 -10
  214. package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  215. package/dist/modes/interactive/interactive-mode.js +138 -178
  216. package/dist/modes/interactive/interactive-mode.js.map +1 -1
  217. package/dist/modes/interactive/theme/dark.json +1 -2
  218. package/dist/modes/interactive/theme/grok-day.json +1 -2
  219. package/dist/modes/interactive/theme/grok-night.json +1 -2
  220. package/dist/modes/interactive/theme/light.json +1 -2
  221. package/dist/modes/interactive/theme/theme-controller.d.ts +0 -1
  222. package/dist/modes/interactive/theme/theme-controller.d.ts.map +1 -1
  223. package/dist/modes/interactive/theme/theme-controller.js +0 -5
  224. package/dist/modes/interactive/theme/theme-controller.js.map +1 -1
  225. package/dist/modes/interactive/theme/theme-schema.json +2 -6
  226. package/dist/modes/interactive/theme/theme.d.ts +5 -10
  227. package/dist/modes/interactive/theme/theme.d.ts.map +1 -1
  228. package/dist/modes/interactive/theme/theme.js +117 -14
  229. package/dist/modes/interactive/theme/theme.js.map +1 -1
  230. package/dist/modes/interactive/tips/catalog/input-tips.d.ts +0 -5
  231. package/dist/modes/interactive/tips/catalog/input-tips.d.ts.map +1 -1
  232. package/dist/modes/interactive/tips/catalog/input-tips.js +0 -5
  233. package/dist/modes/interactive/tips/catalog/input-tips.js.map +1 -1
  234. package/dist/modes/rpc/connection-handler.d.ts.map +1 -1
  235. package/dist/modes/rpc/connection-handler.js +2 -8
  236. package/dist/modes/rpc/connection-handler.js.map +1 -1
  237. package/dist/modes/rpc/rpc-client.d.ts.map +1 -1
  238. package/dist/modes/rpc/rpc-client.js +1 -11
  239. package/dist/modes/rpc/rpc-client.js.map +1 -1
  240. package/dist/modes/rpc/rpc-types.d.ts +1 -2
  241. package/dist/modes/rpc/rpc-types.d.ts.map +1 -1
  242. package/dist/modes/rpc/rpc-types.js +0 -1
  243. package/dist/modes/rpc/rpc-types.js.map +1 -1
  244. package/dist/modes/rpc/session-registry.d.ts +1 -3
  245. package/dist/modes/rpc/session-registry.d.ts.map +1 -1
  246. package/dist/modes/rpc/session-registry.js.map +1 -1
  247. package/dist/modes/rpc/session-worker-client.d.ts +8 -10
  248. package/dist/modes/rpc/session-worker-client.d.ts.map +1 -1
  249. package/dist/modes/rpc/session-worker-client.js +23 -14
  250. package/dist/modes/rpc/session-worker-client.js.map +1 -1
  251. package/dist/modes/rpc/session-worker-protocol.d.ts +0 -10
  252. package/dist/modes/rpc/session-worker-protocol.d.ts.map +1 -1
  253. package/dist/modes/rpc/session-worker-protocol.js +0 -2
  254. package/dist/modes/rpc/session-worker-protocol.js.map +1 -1
  255. package/dist/modes/rpc/session-worker.js +16 -12
  256. package/dist/modes/rpc/session-worker.js.map +1 -1
  257. package/dist/modes/rpc/worker-session-registry.d.ts +0 -12
  258. package/dist/modes/rpc/worker-session-registry.d.ts.map +1 -1
  259. package/dist/modes/rpc/worker-session-registry.js +24 -51
  260. package/dist/modes/rpc/worker-session-registry.js.map +1 -1
  261. package/dist/senpi +0 -3
  262. package/dist/server/create-harness.d.ts +26 -0
  263. package/dist/server/create-harness.d.ts.map +1 -0
  264. package/dist/server/create-harness.js +106 -0
  265. package/dist/server/create-harness.js.map +1 -0
  266. package/dist/utils/clipboard-image.d.ts.map +1 -1
  267. package/dist/utils/clipboard-image.js +69 -52
  268. package/dist/utils/clipboard-image.js.map +1 -1
  269. package/dist/utils/clipboard-native.d.ts +11 -0
  270. package/dist/utils/clipboard-native.d.ts.map +1 -0
  271. package/dist/utils/clipboard-native.js +20 -0
  272. package/dist/utils/clipboard-native.js.map +1 -0
  273. package/dist/utils/clipboard.d.ts.map +1 -1
  274. package/dist/utils/clipboard.js +126 -49
  275. package/dist/utils/clipboard.js.map +1 -1
  276. package/dist/utils/exif-orientation.d.ts.map +1 -1
  277. package/dist/utils/exif-orientation.js +3 -2
  278. package/dist/utils/exif-orientation.js.map +1 -1
  279. package/dist/utils/tools-manager.d.ts +0 -1
  280. package/dist/utils/tools-manager.d.ts.map +1 -1
  281. package/dist/utils/tools-manager.js +19 -41
  282. package/dist/utils/tools-manager.js.map +1 -1
  283. package/docs/AGENTS.md +67 -0
  284. package/docs/compaction.md +13 -39
  285. package/docs/containerization.md +0 -45
  286. package/docs/development.md +0 -19
  287. package/docs/docs.json +0 -4
  288. package/docs/environment-variables.md +0 -2
  289. package/docs/extensions.md +10 -21
  290. package/docs/keybindings.md +2 -7
  291. package/docs/models.md +1 -1
  292. package/docs/providers.md +1 -1
  293. package/docs/rpc.md +8 -16
  294. package/docs/sdk.md +0 -7
  295. package/docs/session-format.md +38 -52
  296. package/docs/settings.md +4 -40
  297. package/docs/skills.md +1 -1
  298. package/docs/termux.md +1 -0
  299. package/docs/themes.md +6 -8
  300. package/docs/tui.md +3 -22
  301. package/examples/README.md +0 -3
  302. package/examples/extensions/dynamic-resources/dynamic.json +0 -2
  303. package/node_modules/@aws-sdk/client-bedrock-runtime/dist-cjs/index.js +1 -1
  304. package/node_modules/@aws-sdk/client-bedrock-runtime/package.json +3 -3
  305. package/node_modules/@aws-sdk/core/dist-cjs/submodules/util/index.js +0 -5
  306. package/node_modules/@aws-sdk/core/dist-es/submodules/util/index.js +0 -1
  307. package/node_modules/@aws-sdk/core/dist-types/submodules/util/index.d.ts +0 -1
  308. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/util/index.d.ts +0 -1
  309. package/node_modules/@aws-sdk/core/package.json +1 -1
  310. package/node_modules/@aws-sdk/credential-provider-env/package.json +2 -2
  311. package/node_modules/@aws-sdk/credential-provider-http/package.json +2 -2
  312. package/node_modules/@aws-sdk/credential-provider-ini/package.json +9 -9
  313. package/node_modules/@aws-sdk/credential-provider-login/package.json +3 -3
  314. package/node_modules/@aws-sdk/credential-provider-node/dist-cjs/index.js +0 -2
  315. package/node_modules/@aws-sdk/credential-provider-node/dist-es/runtime/memoize-chain.js +0 -2
  316. package/node_modules/@aws-sdk/credential-provider-node/package.json +7 -7
  317. package/node_modules/@aws-sdk/credential-provider-process/package.json +2 -2
  318. package/node_modules/@aws-sdk/credential-provider-sso/package.json +4 -4
  319. package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +3 -3
  320. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/cognito-identity/index.js +1 -1
  321. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/index.js +1 -1
  322. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/index.js +1 -1
  323. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/index.js +1 -1
  324. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/index.js +1 -1
  325. package/node_modules/@aws-sdk/nested-clients/package.json +2 -2
  326. package/node_modules/@aws-sdk/token-providers/package.json +1 -1
  327. package/node_modules/@code-yeongyu/senpi-codemode/CHANGELOG.md +0 -24
  328. package/node_modules/@code-yeongyu/senpi-codemode/package.json +5 -5
  329. package/node_modules/@earendil-works/pi-agent-core/README.md +0 -4
  330. package/node_modules/@earendil-works/pi-agent-core/dist/harness/agent-harness.d.ts +384 -639
  331. package/node_modules/@earendil-works/pi-agent-core/dist/harness/agent-harness.d.ts.map +1 -1
  332. package/node_modules/@earendil-works/pi-agent-core/dist/harness/agent-harness.js +250 -5
  333. package/node_modules/@earendil-works/pi-agent-core/dist/harness/agent-harness.js.map +1 -1
  334. package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/branch-summarization.d.ts +6 -12
  335. package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/branch-summarization.d.ts.map +1 -1
  336. package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/branch-summarization.js +27 -33
  337. package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/branch-summarization.js.map +1 -1
  338. package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/compaction.d.ts +8 -30
  339. package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/compaction.d.ts.map +1 -1
  340. package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/compaction.js +64 -53
  341. package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/compaction.js.map +1 -1
  342. package/node_modules/@earendil-works/pi-agent-core/dist/harness/env/nodejs.d.ts +28 -25
  343. package/node_modules/@earendil-works/pi-agent-core/dist/harness/env/nodejs.d.ts.map +1 -1
  344. package/node_modules/@earendil-works/pi-agent-core/dist/harness/env/nodejs.js +125 -368
  345. package/node_modules/@earendil-works/pi-agent-core/dist/harness/env/nodejs.js.map +1 -1
  346. package/node_modules/@earendil-works/pi-agent-core/dist/harness/events.d.ts +38 -20
  347. package/node_modules/@earendil-works/pi-agent-core/dist/harness/events.d.ts.map +1 -1
  348. package/node_modules/@earendil-works/pi-agent-core/dist/harness/events.js +55 -233
  349. package/node_modules/@earendil-works/pi-agent-core/dist/harness/events.js.map +1 -1
  350. package/node_modules/@earendil-works/pi-agent-core/dist/harness/messages.d.ts +2 -2
  351. package/node_modules/@earendil-works/pi-agent-core/dist/harness/messages.d.ts.map +1 -1
  352. package/node_modules/@earendil-works/pi-agent-core/dist/harness/messages.js.map +1 -1
  353. package/node_modules/@earendil-works/pi-agent-core/dist/harness/prompt-templates.d.ts +2 -3
  354. package/node_modules/@earendil-works/pi-agent-core/dist/harness/prompt-templates.d.ts.map +1 -1
  355. package/node_modules/@earendil-works/pi-agent-core/dist/harness/prompt-templates.js +17 -17
  356. package/node_modules/@earendil-works/pi-agent-core/dist/harness/prompt-templates.js.map +1 -1
  357. package/node_modules/@earendil-works/pi-agent-core/dist/harness/reducer.d.ts +100 -0
  358. package/node_modules/@earendil-works/pi-agent-core/dist/harness/reducer.d.ts.map +1 -0
  359. package/node_modules/@earendil-works/pi-agent-core/dist/harness/reducer.js +420 -0
  360. package/node_modules/@earendil-works/pi-agent-core/dist/harness/reducer.js.map +1 -0
  361. package/node_modules/@earendil-works/pi-agent-core/dist/harness/result.d.ts +0 -93
  362. package/node_modules/@earendil-works/pi-agent-core/dist/harness/result.d.ts.map +1 -1
  363. package/node_modules/@earendil-works/pi-agent-core/dist/harness/result.js +0 -39
  364. package/node_modules/@earendil-works/pi-agent-core/dist/harness/result.js.map +1 -1
  365. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/context.d.ts +19 -6
  366. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/context.d.ts.map +1 -1
  367. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/context.js +53 -31
  368. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/context.js.map +1 -1
  369. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/index.d.ts +5 -9
  370. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/index.d.ts.map +1 -1
  371. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/index.js +4 -7
  372. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/index.js.map +1 -1
  373. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/codec.d.ts +8 -19
  374. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/codec.d.ts.map +1 -1
  375. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/codec.js +219 -34
  376. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/codec.js.map +1 -1
  377. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/errors.d.ts +9 -0
  378. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/errors.d.ts.map +1 -0
  379. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/errors.js +18 -0
  380. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/errors.js.map +1 -0
  381. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/repo.d.ts +24 -27
  382. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/repo.d.ts.map +1 -1
  383. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/repo.js +151 -276
  384. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/repo.js.map +1 -1
  385. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/storage.d.ts +41 -39
  386. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/storage.d.ts.map +1 -1
  387. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/storage.js +196 -175
  388. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/storage.js.map +1 -1
  389. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/types.d.ts +22 -23
  390. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/types.d.ts.map +1 -1
  391. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/types.js +1 -2
  392. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/types.js.map +1 -1
  393. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl.d.ts +3 -0
  394. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl.d.ts.map +1 -0
  395. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl.js +2 -0
  396. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl.js.map +1 -0
  397. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory.d.ts +40 -44
  398. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory.d.ts.map +1 -1
  399. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory.js +115 -333
  400. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory.js.map +1 -1
  401. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/session.d.ts +51 -78
  402. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/session.d.ts.map +1 -1
  403. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/session.js +207 -327
  404. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/session.js.map +1 -1
  405. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/state.d.ts +65 -0
  406. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/state.d.ts.map +1 -0
  407. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/state.js +320 -0
  408. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/state.js.map +1 -0
  409. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/conformance.d.ts +4 -0
  410. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/conformance.d.ts.map +1 -0
  411. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/conformance.js +762 -0
  412. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/conformance.js.map +1 -0
  413. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/index.d.ts +2 -9
  414. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/index.d.ts.map +1 -1
  415. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/index.js +1 -8
  416. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/index.js.map +1 -1
  417. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/types.d.ts +7 -5
  418. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/types.d.ts.map +1 -1
  419. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/types.js.map +1 -1
  420. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/types.d.ts +265 -425
  421. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/types.d.ts.map +1 -1
  422. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/types.js +7 -7
  423. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/types.js.map +1 -1
  424. package/node_modules/@earendil-works/pi-agent-core/dist/harness/skills.d.ts +2 -3
  425. package/node_modules/@earendil-works/pi-agent-core/dist/harness/skills.d.ts.map +1 -1
  426. package/node_modules/@earendil-works/pi-agent-core/dist/harness/skills.js +26 -29
  427. package/node_modules/@earendil-works/pi-agent-core/dist/harness/skills.js.map +1 -1
  428. package/node_modules/@earendil-works/pi-agent-core/dist/harness/telemetry.d.ts +43 -64
  429. package/node_modules/@earendil-works/pi-agent-core/dist/harness/telemetry.d.ts.map +1 -1
  430. package/node_modules/@earendil-works/pi-agent-core/dist/harness/telemetry.js +26 -45
  431. package/node_modules/@earendil-works/pi-agent-core/dist/harness/telemetry.js.map +1 -1
  432. package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/bash.d.ts +4 -4
  433. package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/bash.d.ts.map +1 -1
  434. package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/bash.js +93 -66
  435. package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/bash.js.map +1 -1
  436. package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/edit.d.ts.map +1 -1
  437. package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/edit.js +13 -17
  438. package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/edit.js.map +1 -1
  439. package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/file-mutation-queue.d.ts +1 -2
  440. package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/file-mutation-queue.d.ts.map +1 -1
  441. package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/file-mutation-queue.js +5 -5
  442. package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/file-mutation-queue.js.map +1 -1
  443. package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/path-utils.d.ts +2 -3
  444. package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/path-utils.d.ts.map +1 -1
  445. package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/path-utils.js +5 -5
  446. package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/path-utils.js.map +1 -1
  447. package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/read.d.ts +1 -2
  448. package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/read.d.ts.map +1 -1
  449. package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/read.js +6 -4
  450. package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/read.js.map +1 -1
  451. package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/write.d.ts.map +1 -1
  452. package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/write.js +8 -12
  453. package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/write.js.map +1 -1
  454. package/node_modules/@earendil-works/pi-agent-core/dist/harness/types.d.ts +45 -128
  455. package/node_modules/@earendil-works/pi-agent-core/dist/harness/types.d.ts.map +1 -1
  456. package/node_modules/@earendil-works/pi-agent-core/dist/harness/types.js.map +1 -1
  457. package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/shell-output.d.ts +5 -19
  458. package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/shell-output.d.ts.map +1 -1
  459. package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/shell-output.js +192 -65
  460. package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/shell-output.js.map +1 -1
  461. package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/truncate.d.ts +0 -1
  462. package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/truncate.d.ts.map +1 -1
  463. package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/truncate.js +1 -1
  464. package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/truncate.js.map +1 -1
  465. package/node_modules/@earendil-works/pi-agent-core/dist/index.d.ts +1 -4
  466. package/node_modules/@earendil-works/pi-agent-core/dist/index.d.ts.map +1 -1
  467. package/node_modules/@earendil-works/pi-agent-core/dist/index.js +6 -3
  468. package/node_modules/@earendil-works/pi-agent-core/dist/index.js.map +1 -1
  469. package/node_modules/@earendil-works/pi-agent-core/dist/search/index.d.ts +16 -24
  470. package/node_modules/@earendil-works/pi-agent-core/dist/search/index.d.ts.map +1 -1
  471. package/node_modules/@earendil-works/pi-agent-core/dist/search/index.js +1 -1
  472. package/node_modules/@earendil-works/pi-agent-core/dist/search/index.js.map +1 -1
  473. package/node_modules/@earendil-works/pi-agent-core/dist/search/scanning.d.ts +29 -0
  474. package/node_modules/@earendil-works/pi-agent-core/dist/search/scanning.d.ts.map +1 -0
  475. package/node_modules/@earendil-works/pi-agent-core/dist/search/scanning.js +103 -0
  476. package/node_modules/@earendil-works/pi-agent-core/dist/search/scanning.js.map +1 -0
  477. package/node_modules/@earendil-works/pi-agent-core/dist/types.d.ts +0 -2
  478. package/node_modules/@earendil-works/pi-agent-core/dist/types.d.ts.map +1 -1
  479. package/node_modules/@earendil-works/pi-agent-core/dist/types.js.map +1 -1
  480. package/node_modules/@earendil-works/pi-agent-core/package.json +6 -27
  481. package/node_modules/@earendil-works/pi-ai/README.md +4 -39
  482. package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.d.ts.map +1 -1
  483. package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.js +1 -8
  484. package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.js.map +1 -1
  485. package/node_modules/@earendil-works/pi-ai/dist/api/cloudflare-gateway-binding.d.ts +69 -0
  486. package/node_modules/@earendil-works/pi-ai/dist/api/cloudflare-gateway-binding.d.ts.map +1 -0
  487. package/node_modules/@earendil-works/pi-ai/dist/api/cloudflare-gateway-binding.js +159 -0
  488. package/node_modules/@earendil-works/pi-ai/dist/api/cloudflare-gateway-binding.js.map +1 -0
  489. package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/measure.d.ts +0 -11
  490. package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/measure.d.ts.map +1 -1
  491. package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/measure.js +0 -18
  492. package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/measure.js.map +1 -1
  493. package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent.d.ts +1 -1
  494. package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent.d.ts.map +1 -1
  495. package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent.js +1 -5
  496. package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent.js.map +1 -1
  497. package/node_modules/@earendil-works/pi-ai/dist/api/mistral-conversations.js +1 -4
  498. package/node_modules/@earendil-works/pi-ai/dist/api/mistral-conversations.js.map +1 -1
  499. package/node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses.d.ts.map +1 -1
  500. package/node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses.js +3 -6
  501. package/node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses.js.map +1 -1
  502. package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses-shared.d.ts.map +1 -1
  503. package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses-shared.js +1 -4
  504. package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses-shared.js.map +1 -1
  505. package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses.d.ts.map +1 -1
  506. package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses.js +3 -13
  507. package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses.js.map +1 -1
  508. package/node_modules/@earendil-works/pi-ai/dist/cursor/store-migration.d.ts.map +1 -1
  509. package/node_modules/@earendil-works/pi-ai/dist/cursor/store-migration.js +1 -2
  510. package/node_modules/@earendil-works/pi-ai/dist/cursor/store-migration.js.map +1 -1
  511. package/node_modules/@earendil-works/pi-ai/dist/index.d.ts +1 -2
  512. package/node_modules/@earendil-works/pi-ai/dist/index.d.ts.map +1 -1
  513. package/node_modules/@earendil-works/pi-ai/dist/index.js +1 -2
  514. package/node_modules/@earendil-works/pi-ai/dist/index.js.map +1 -1
  515. package/node_modules/@earendil-works/pi-ai/dist/models.d.ts +0 -1
  516. package/node_modules/@earendil-works/pi-ai/dist/models.d.ts.map +1 -1
  517. package/node_modules/@earendil-works/pi-ai/dist/models.js +2 -5
  518. package/node_modules/@earendil-works/pi-ai/dist/models.js.map +1 -1
  519. package/node_modules/@earendil-works/pi-ai/dist/openai-responses-compat.d.ts +1 -1
  520. package/node_modules/@earendil-works/pi-ai/dist/openai-responses-compat.d.ts.map +1 -1
  521. package/node_modules/@earendil-works/pi-ai/dist/openai-responses-compat.js.map +1 -1
  522. package/node_modules/@earendil-works/pi-ai/dist/providers/cloudflare-ai-gateway.d.ts.map +1 -1
  523. package/node_modules/@earendil-works/pi-ai/dist/providers/cloudflare-ai-gateway.js +0 -4
  524. package/node_modules/@earendil-works/pi-ai/dist/providers/cloudflare-ai-gateway.js.map +1 -1
  525. package/node_modules/@earendil-works/pi-ai/dist/providers/cursor.d.ts.map +1 -1
  526. package/node_modules/@earendil-works/pi-ai/dist/providers/cursor.js +1 -2
  527. package/node_modules/@earendil-works/pi-ai/dist/providers/cursor.js.map +1 -1
  528. package/node_modules/@earendil-works/pi-ai/dist/providers/data/.manifest.json +1 -1
  529. package/node_modules/@earendil-works/pi-ai/dist/providers/data/azure-openai-responses.json +1 -1
  530. package/node_modules/@earendil-works/pi-ai/dist/providers/data/baseten.json +1 -1
  531. package/node_modules/@earendil-works/pi-ai/dist/providers/data/deepseek.json +1 -1
  532. package/node_modules/@earendil-works/pi-ai/dist/providers/data/fireworks.json +1 -1
  533. package/node_modules/@earendil-works/pi-ai/dist/providers/data/github-copilot.json +1 -1
  534. package/node_modules/@earendil-works/pi-ai/dist/providers/data/openai-codex.json +1 -1
  535. package/node_modules/@earendil-works/pi-ai/dist/providers/data/openrouter.json +1 -1
  536. package/node_modules/@earendil-works/pi-ai/dist/providers/data/qwen-token-plan-cn.json +1 -1
  537. package/node_modules/@earendil-works/pi-ai/dist/providers/data/qwen-token-plan-individual.json +1 -1
  538. package/node_modules/@earendil-works/pi-ai/dist/providers/data/qwen-token-plan.json +1 -1
  539. package/node_modules/@earendil-works/pi-ai/dist/providers/data/xai.json +1 -1
  540. package/node_modules/@earendil-works/pi-ai/dist/providers/faux.js +5 -5
  541. package/node_modules/@earendil-works/pi-ai/dist/providers/faux.js.map +1 -1
  542. package/node_modules/@earendil-works/pi-ai/dist/providers/opencode-go.d.ts.map +1 -1
  543. package/node_modules/@earendil-works/pi-ai/dist/providers/opencode-go.js +3 -4
  544. package/node_modules/@earendil-works/pi-ai/dist/providers/opencode-go.js.map +1 -1
  545. package/node_modules/@earendil-works/pi-ai/dist/providers/opencode.d.ts.map +1 -1
  546. package/node_modules/@earendil-works/pi-ai/dist/providers/opencode.js +4 -5
  547. package/node_modules/@earendil-works/pi-ai/dist/providers/opencode.js.map +1 -1
  548. package/node_modules/@earendil-works/pi-ai/dist/types.d.ts +6 -16
  549. package/node_modules/@earendil-works/pi-ai/dist/types.d.ts.map +1 -1
  550. package/node_modules/@earendil-works/pi-ai/dist/types.js.map +1 -1
  551. package/node_modules/@earendil-works/pi-ai/dist/utils/event-stream.d.ts.map +1 -1
  552. package/node_modules/@earendil-works/pi-ai/dist/utils/event-stream.js +5 -25
  553. package/node_modules/@earendil-works/pi-ai/dist/utils/event-stream.js.map +1 -1
  554. package/node_modules/@earendil-works/pi-ai/dist/utils/prompt-cache-ttl.d.ts +1 -1
  555. package/node_modules/@earendil-works/pi-ai/dist/utils/prompt-cache-ttl.d.ts.map +1 -1
  556. package/node_modules/@earendil-works/pi-ai/dist/utils/prompt-cache-ttl.js +1 -5
  557. package/node_modules/@earendil-works/pi-ai/dist/utils/prompt-cache-ttl.js.map +1 -1
  558. package/node_modules/@earendil-works/pi-ai/dist/utils/retry-profile/types.d.ts +1 -10
  559. package/node_modules/@earendil-works/pi-ai/dist/utils/retry-profile/types.d.ts.map +1 -1
  560. package/node_modules/@earendil-works/pi-ai/dist/utils/retry-profile/types.js.map +1 -1
  561. package/node_modules/@earendil-works/pi-ai/dist/utils/retry.d.ts +2 -13
  562. package/node_modules/@earendil-works/pi-ai/dist/utils/retry.d.ts.map +1 -1
  563. package/node_modules/@earendil-works/pi-ai/dist/utils/retry.js +7 -18
  564. package/node_modules/@earendil-works/pi-ai/dist/utils/retry.js.map +1 -1
  565. package/node_modules/@earendil-works/pi-ai/dist/utils/uuid.d.ts +2 -2
  566. package/node_modules/@earendil-works/pi-ai/dist/utils/uuid.d.ts.map +1 -1
  567. package/node_modules/@earendil-works/pi-ai/dist/utils/uuid.js +31 -36
  568. package/node_modules/@earendil-works/pi-ai/dist/utils/uuid.js.map +1 -1
  569. package/node_modules/@earendil-works/pi-ai/package.json +6 -6
  570. package/node_modules/@earendil-works/pi-pty/package.json +1 -1
  571. package/node_modules/@earendil-works/pi-telemetry/package.json +1 -1
  572. package/node_modules/@earendil-works/pi-tui/README.md +4 -53
  573. package/node_modules/@earendil-works/pi-tui/dist/alt-screen-search.d.ts +1 -21
  574. package/node_modules/@earendil-works/pi-tui/dist/alt-screen-search.d.ts.map +1 -1
  575. package/node_modules/@earendil-works/pi-tui/dist/alt-screen-search.js +42 -199
  576. package/node_modules/@earendil-works/pi-tui/dist/alt-screen-search.js.map +1 -1
  577. package/node_modules/@earendil-works/pi-tui/dist/components/box.d.ts +1 -3
  578. package/node_modules/@earendil-works/pi-tui/dist/components/box.d.ts.map +1 -1
  579. package/node_modules/@earendil-works/pi-tui/dist/components/box.js +0 -28
  580. package/node_modules/@earendil-works/pi-tui/dist/components/box.js.map +1 -1
  581. package/node_modules/@earendil-works/pi-tui/dist/components/editor.d.ts +1 -6
  582. package/node_modules/@earendil-works/pi-tui/dist/components/editor.d.ts.map +1 -1
  583. package/node_modules/@earendil-works/pi-tui/dist/components/editor.js +18 -98
  584. package/node_modules/@earendil-works/pi-tui/dist/components/editor.js.map +1 -1
  585. package/node_modules/@earendil-works/pi-tui/dist/components/input.d.ts +1 -12
  586. package/node_modules/@earendil-works/pi-tui/dist/components/input.d.ts.map +1 -1
  587. package/node_modules/@earendil-works/pi-tui/dist/components/input.js +6 -40
  588. package/node_modules/@earendil-works/pi-tui/dist/components/input.js.map +1 -1
  589. package/node_modules/@earendil-works/pi-tui/dist/components/latex.d.ts.map +1 -1
  590. package/node_modules/@earendil-works/pi-tui/dist/components/latex.js +0 -7
  591. package/node_modules/@earendil-works/pi-tui/dist/components/latex.js.map +1 -1
  592. package/node_modules/@earendil-works/pi-tui/dist/components/loader.d.ts +0 -3
  593. package/node_modules/@earendil-works/pi-tui/dist/components/loader.d.ts.map +1 -1
  594. package/node_modules/@earendil-works/pi-tui/dist/components/loader.js +8 -20
  595. package/node_modules/@earendil-works/pi-tui/dist/components/loader.js.map +1 -1
  596. package/node_modules/@earendil-works/pi-tui/dist/components/scroll-view.d.ts +3 -6
  597. package/node_modules/@earendil-works/pi-tui/dist/components/scroll-view.d.ts.map +1 -1
  598. package/node_modules/@earendil-works/pi-tui/dist/components/scroll-view.js +1 -6
  599. package/node_modules/@earendil-works/pi-tui/dist/components/scroll-view.js.map +1 -1
  600. package/node_modules/@earendil-works/pi-tui/dist/components/select-list.d.ts +1 -4
  601. package/node_modules/@earendil-works/pi-tui/dist/components/select-list.d.ts.map +1 -1
  602. package/node_modules/@earendil-works/pi-tui/dist/components/select-list.js +2 -48
  603. package/node_modules/@earendil-works/pi-tui/dist/components/select-list.js.map +1 -1
  604. package/node_modules/@earendil-works/pi-tui/dist/components/settings-list.d.ts +1 -5
  605. package/node_modules/@earendil-works/pi-tui/dist/components/settings-list.d.ts.map +1 -1
  606. package/node_modules/@earendil-works/pi-tui/dist/components/settings-list.js +5 -54
  607. package/node_modules/@earendil-works/pi-tui/dist/components/settings-list.js.map +1 -1
  608. package/node_modules/@earendil-works/pi-tui/dist/index.d.ts +1 -3
  609. package/node_modules/@earendil-works/pi-tui/dist/index.d.ts.map +1 -1
  610. package/node_modules/@earendil-works/pi-tui/dist/index.js +0 -3
  611. package/node_modules/@earendil-works/pi-tui/dist/index.js.map +1 -1
  612. package/node_modules/@earendil-works/pi-tui/dist/layout.d.ts +1 -3
  613. package/node_modules/@earendil-works/pi-tui/dist/layout.d.ts.map +1 -1
  614. package/node_modules/@earendil-works/pi-tui/dist/layout.js +9 -32
  615. package/node_modules/@earendil-works/pi-tui/dist/layout.js.map +1 -1
  616. package/node_modules/@earendil-works/pi-tui/dist/native-modifiers.d.ts +1 -2
  617. package/node_modules/@earendil-works/pi-tui/dist/native-modifiers.d.ts.map +1 -1
  618. package/node_modules/@earendil-works/pi-tui/dist/native-modifiers.js +44 -3
  619. package/node_modules/@earendil-works/pi-tui/dist/native-modifiers.js.map +1 -1
  620. package/node_modules/@earendil-works/pi-tui/dist/terminal.d.ts.map +1 -1
  621. package/node_modules/@earendil-works/pi-tui/dist/terminal.js +20 -2
  622. package/node_modules/@earendil-works/pi-tui/dist/terminal.js.map +1 -1
  623. package/node_modules/@earendil-works/pi-tui/dist/tui-alt-screen.d.ts +1 -31
  624. package/node_modules/@earendil-works/pi-tui/dist/tui-alt-screen.d.ts.map +1 -1
  625. package/node_modules/@earendil-works/pi-tui/dist/tui-alt-screen.js +41 -335
  626. package/node_modules/@earendil-works/pi-tui/dist/tui-alt-screen.js.map +1 -1
  627. package/node_modules/@earendil-works/pi-tui/dist/tui.d.ts +5 -83
  628. package/node_modules/@earendil-works/pi-tui/dist/tui.d.ts.map +1 -1
  629. package/node_modules/@earendil-works/pi-tui/dist/tui.js +4 -118
  630. package/node_modules/@earendil-works/pi-tui/dist/tui.js.map +1 -1
  631. package/node_modules/@earendil-works/pi-tui/dist/utils.d.ts +0 -2
  632. package/node_modules/@earendil-works/pi-tui/dist/utils.d.ts.map +1 -1
  633. package/node_modules/@earendil-works/pi-tui/dist/utils.js +0 -9
  634. package/node_modules/@earendil-works/pi-tui/dist/utils.js.map +1 -1
  635. package/node_modules/@earendil-works/pi-tui/native/darwin/README.md +6 -8
  636. package/node_modules/@earendil-works/pi-tui/native/darwin/build.sh +5 -12
  637. package/node_modules/@earendil-works/pi-tui/native/darwin/prebuilds/darwin-arm64/{darwin-platform.node → darwin-modifiers.node} +0 -0
  638. package/node_modules/@earendil-works/pi-tui/native/darwin/prebuilds/darwin-x64/{darwin-platform.node → darwin-modifiers.node} +0 -0
  639. package/node_modules/@earendil-works/pi-tui/native/darwin/src/darwin-modifiers.c +70 -0
  640. package/node_modules/@earendil-works/pi-tui/native/win32/README.md +7 -18
  641. package/node_modules/@earendil-works/pi-tui/native/win32/build.mjs +4 -7
  642. package/node_modules/@earendil-works/pi-tui/native/win32/prebuilds/win32-arm64/win32-console-mode.node +0 -0
  643. package/node_modules/@earendil-works/pi-tui/native/win32/prebuilds/win32-x64/win32-console-mode.node +0 -0
  644. package/node_modules/@earendil-works/pi-tui/native/win32/src/win32-console-mode.c +119 -0
  645. package/node_modules/@earendil-works/pi-tui/package.json +3 -10
  646. package/node_modules/@google/genai/dist/genai.d.ts +278 -1788
  647. package/node_modules/@google/genai/dist/index.cjs +299 -319
  648. package/node_modules/@google/genai/dist/index.mjs +299 -319
  649. package/node_modules/@google/genai/dist/index.mjs.map +1 -1
  650. package/node_modules/@google/genai/dist/node/index.cjs +300 -320
  651. package/node_modules/@google/genai/dist/node/index.mjs +300 -320
  652. package/node_modules/@google/genai/dist/node/index.mjs.map +1 -1
  653. package/node_modules/@google/genai/dist/node/node.d.ts +278 -1788
  654. package/node_modules/@google/genai/dist/tokenizer/node.cjs +2 -49
  655. package/node_modules/@google/genai/dist/tokenizer/node.d.ts +3 -43
  656. package/node_modules/@google/genai/dist/tokenizer/node.mjs +2 -49
  657. package/node_modules/@google/genai/dist/tokenizer/node.mjs.map +1 -1
  658. package/node_modules/@google/genai/dist/vertex_internal/index.cjs +3 -39
  659. package/node_modules/@google/genai/dist/vertex_internal/index.cjs.map +1 -1
  660. package/node_modules/@google/genai/dist/vertex_internal/index.d.ts +9 -51
  661. package/node_modules/@google/genai/dist/vertex_internal/index.js +3 -39
  662. package/node_modules/@google/genai/dist/vertex_internal/index.js.map +1 -1
  663. package/node_modules/@google/genai/dist/web/index.mjs +299 -319
  664. package/node_modules/@google/genai/dist/web/index.mjs.map +1 -1
  665. package/node_modules/@google/genai/dist/web/web.d.ts +278 -1788
  666. package/node_modules/@google/genai/package.json +1 -1
  667. package/node_modules/@mariozechner/clipboard/.yarnrc.yml +1 -0
  668. package/node_modules/@mariozechner/clipboard/Cargo.toml +45 -0
  669. package/node_modules/@mariozechner/clipboard/README.md +60 -0
  670. package/node_modules/@mariozechner/clipboard/build.rs +5 -0
  671. package/node_modules/@mariozechner/clipboard/exp.ts +12 -0
  672. package/node_modules/@mariozechner/clipboard/index.d.ts +37 -0
  673. package/node_modules/@mariozechner/clipboard/index.js +606 -0
  674. package/node_modules/@mariozechner/clipboard/package.json +45 -0
  675. package/node_modules/@mariozechner/clipboard/src/clipboard_rs/common.rs +307 -0
  676. package/node_modules/@mariozechner/clipboard/src/clipboard_rs/mod.rs +93 -0
  677. package/node_modules/@mariozechner/clipboard/src/clipboard_rs/platform/ios.rs +313 -0
  678. package/node_modules/@mariozechner/clipboard/src/clipboard_rs/platform/macos.rs +471 -0
  679. package/node_modules/@mariozechner/clipboard/src/clipboard_rs/platform/mod.rs +252 -0
  680. package/node_modules/@mariozechner/clipboard/src/clipboard_rs/platform/wayland.rs +431 -0
  681. package/node_modules/@mariozechner/clipboard/src/clipboard_rs/platform/win.rs +712 -0
  682. package/node_modules/@mariozechner/clipboard/src/clipboard_rs/platform/x11.rs +916 -0
  683. package/node_modules/@mariozechner/clipboard/src/lib.rs +194 -0
  684. package/node_modules/@smithy/node-http-handler/dist-cjs/index.js +4 -11
  685. package/node_modules/@smithy/node-http-handler/dist-es/http2/ClientHttp2SessionRef.js +0 -1
  686. package/node_modules/@smithy/node-http-handler/dist-es/node-http2-connection-manager.js +3 -2
  687. package/node_modules/@smithy/node-http-handler/dist-es/node-http2-handler.js +1 -8
  688. package/node_modules/@smithy/node-http-handler/package.json +2 -2
  689. package/node_modules/ignore/README.md +0 -52
  690. package/node_modules/ignore/index.js +129 -785
  691. package/node_modules/ignore/legacy.js +98 -660
  692. package/node_modules/ignore/package.json +4 -10
  693. package/node_modules/marked/README.md +0 -1
  694. package/node_modules/marked/lib/marked.d.ts +0 -7
  695. package/node_modules/marked/lib/marked.esm.js +30 -30
  696. package/node_modules/marked/lib/marked.esm.js.map +3 -3
  697. package/node_modules/marked/lib/marked.umd.js +30 -30
  698. package/node_modules/marked/lib/marked.umd.js.map +3 -3
  699. package/node_modules/marked/man/marked.1 +1 -1
  700. package/node_modules/marked/package.json +2 -2
  701. package/node_modules/typebox/build/compile/validator.d.mts +1 -1
  702. package/node_modules/typebox/build/compile/validator.mjs +1 -1
  703. package/node_modules/typebox/build/format/idna/idn-hostname.mjs +5 -7
  704. package/node_modules/typebox/build/format/iri.mjs +1 -5
  705. package/node_modules/typebox/build/guard/emit.mjs +4 -2
  706. package/node_modules/typebox/build/guard/guard.mjs +18 -6
  707. package/node_modules/typebox/build/guard/string.mjs +24 -16
  708. package/node_modules/typebox/build/schema/compile.d.mts +2 -3
  709. package/node_modules/typebox/build/schema/compile.mjs +8 -8
  710. package/node_modules/typebox/build/schema/engine/_context.d.mts +6 -1
  711. package/node_modules/typebox/build/schema/engine/_context.mjs +14 -9
  712. package/node_modules/typebox/build/schema/engine/_functions.mjs +1 -1
  713. package/node_modules/typebox/build/schema/engine/_stack.d.mts +2 -6
  714. package/node_modules/typebox/build/schema/engine/_stack.mjs +32 -135
  715. package/node_modules/typebox/build/schema/engine/additionalProperties.mjs +4 -16
  716. package/node_modules/typebox/build/schema/engine/allOf.mjs +2 -2
  717. package/node_modules/typebox/build/schema/engine/anyOf.mjs +2 -2
  718. package/node_modules/typebox/build/schema/engine/if.mjs +2 -2
  719. package/node_modules/typebox/build/schema/engine/oneOf.mjs +2 -2
  720. package/node_modules/typebox/build/schema/engine/propertyNames.mjs +3 -1
  721. package/node_modules/typebox/build/schema/engine/ref.mjs +2 -2
  722. package/node_modules/typebox/build/schema/engine/schema.mjs +0 -6
  723. package/node_modules/typebox/build/schema/engine/unevaluatedItems.mjs +2 -2
  724. package/node_modules/typebox/build/schema/engine/unevaluatedProperties.mjs +2 -2
  725. package/node_modules/typebox/build/schema/errors.d.mts +2 -2
  726. package/node_modules/typebox/build/schema/errors.mjs +13 -7
  727. package/node_modules/typebox/build/schema/parse.d.mts +0 -1
  728. package/node_modules/typebox/build/schema/parse.mjs +5 -10
  729. package/node_modules/typebox/build/schema/resolve/resolve.d.mts +3 -34
  730. package/node_modules/typebox/build/schema/resolve/resolve.mjs +73 -198
  731. package/node_modules/typebox/build/schema/schema.d.mts +0 -1
  732. package/node_modules/typebox/build/schema/schema.mjs +0 -1
  733. package/node_modules/typebox/build/value/errors/errors.d.mts +12 -2
  734. package/node_modules/typebox/build/value/errors/errors.mjs +7 -2
  735. package/node_modules/typebox/package.json +1 -1
  736. package/node_modules/typebox/readme.md +5 -9
  737. package/node_modules/undici/docs/docs/api/Client.md +0 -4
  738. package/node_modules/undici/docs/docs/api/EnvHttpProxyAgent.md +2 -3
  739. package/node_modules/undici/docs/docs/api/EventSource.md +0 -4
  740. package/node_modules/undici/docs/docs/api/Interceptors.md +3 -7
  741. package/node_modules/undici/docs/docs/api/Socks5ProxyAgent.md +1 -7
  742. package/node_modules/undici/lib/cache/memory-cache-store.js +2 -2
  743. package/node_modules/undici/lib/core/symbols.js +0 -2
  744. package/node_modules/undici/lib/dispatcher/agent.js +2 -7
  745. package/node_modules/undici/lib/dispatcher/balanced-pool.js +4 -7
  746. package/node_modules/undici/lib/dispatcher/client-h1.js +4 -12
  747. package/node_modules/undici/lib/dispatcher/client-h2.js +3 -43
  748. package/node_modules/undici/lib/dispatcher/client.js +2 -3
  749. package/node_modules/undici/lib/dispatcher/dispatcher-base.js +1 -13
  750. package/node_modules/undici/lib/dispatcher/dispatcher.js +1 -15
  751. package/node_modules/undici/lib/dispatcher/dispatcher1-wrapper.js +0 -3
  752. package/node_modules/undici/lib/dispatcher/env-http-proxy-agent.js +3 -10
  753. package/node_modules/undici/lib/dispatcher/proxy-agent.js +1 -18
  754. package/node_modules/undici/lib/dispatcher/retry-agent.js +0 -3
  755. package/node_modules/undici/lib/dispatcher/round-robin-pool.js +1 -1
  756. package/node_modules/undici/lib/dispatcher/socks5-proxy-agent.js +21 -91
  757. package/node_modules/undici/lib/handler/cache-handler.js +5 -29
  758. package/node_modules/undici/lib/handler/decorator-handler.js +1 -7
  759. package/node_modules/undici/lib/handler/deduplication-handler.js +6 -12
  760. package/node_modules/undici/lib/handler/redirect-handler.js +4 -21
  761. package/node_modules/undici/lib/handler/retry-handler.js +30 -148
  762. package/node_modules/undici/lib/interceptor/cache.js +12 -65
  763. package/node_modules/undici/lib/interceptor/decompress.js +13 -115
  764. package/node_modules/undici/lib/interceptor/deduplicate.js +4 -5
  765. package/node_modules/undici/lib/interceptor/dns.js +0 -7
  766. package/node_modules/undici/lib/interceptor/dump.js +23 -10
  767. package/node_modules/undici/lib/mock/mock-agent.js +1 -13
  768. package/node_modules/undici/lib/mock/mock-utils.js +10 -11
  769. package/node_modules/undici/lib/util/cache.js +3 -45
  770. package/node_modules/undici/lib/web/cookies/parse.js +147 -150
  771. package/node_modules/undici/lib/web/eventsource/eventsource-stream.js +1 -28
  772. package/node_modules/undici/lib/web/eventsource/eventsource.js +3 -13
  773. package/node_modules/undici/lib/web/fetch/index.js +0 -6
  774. package/node_modules/undici/lib/web/fetch/request.js +3 -2
  775. package/node_modules/undici/lib/web/fetch/util.js +1 -6
  776. package/node_modules/undici/lib/web/webidl/index.js +3 -3
  777. package/node_modules/undici/lib/web/websocket/connection.js +1 -1
  778. package/node_modules/undici/lib/web/websocket/permessage-deflate.js +0 -5
  779. package/node_modules/undici/lib/web/websocket/stream/websocketstream.js +10 -8
  780. package/node_modules/undici/package.json +3 -3
  781. package/node_modules/undici/types/client.d.ts +0 -10
  782. package/node_modules/undici/types/interceptors.d.ts +0 -2
  783. package/node_modules/undici/types/mock-agent.d.ts +10 -11
  784. package/node_modules/undici/types/socks5-proxy-agent.d.ts +0 -2
  785. package/package.json +49 -70
  786. package/vendor/pi-client/client.d.ts +15 -20
  787. package/vendor/pi-client/client.d.ts.map +1 -1
  788. package/vendor/pi-client/client.js +245 -248
  789. package/vendor/pi-client/client.js.map +1 -1
  790. package/vendor/pi-client/connection.d.ts +3 -4
  791. package/vendor/pi-client/connection.d.ts.map +1 -1
  792. package/vendor/pi-client/connection.js +9 -13
  793. package/vendor/pi-client/connection.js.map +1 -1
  794. package/vendor/pi-client/errors.d.ts +15 -6
  795. package/vendor/pi-client/errors.d.ts.map +1 -1
  796. package/vendor/pi-client/errors.js +25 -10
  797. package/vendor/pi-client/errors.js.map +1 -1
  798. package/vendor/pi-client/index.d.ts +4 -3
  799. package/vendor/pi-client/index.d.ts.map +1 -1
  800. package/vendor/pi-client/index.js +2 -2
  801. package/vendor/pi-client/index.js.map +1 -1
  802. package/vendor/pi-client/session-handle.d.ts +54 -0
  803. package/vendor/pi-client/session-handle.d.ts.map +1 -0
  804. package/vendor/pi-client/session-handle.js +50 -0
  805. package/vendor/pi-client/session-handle.js.map +1 -0
  806. package/vendor/pi-client/state.d.ts +22 -0
  807. package/vendor/pi-client/state.d.ts.map +1 -0
  808. package/vendor/pi-client/state.js +145 -0
  809. package/vendor/pi-client/state.js.map +1 -0
  810. package/vendor/pi-client/types.d.ts +8 -14
  811. package/vendor/pi-client/types.d.ts.map +1 -1
  812. package/vendor/pi-client/types.js.map +1 -1
  813. package/vendor/pi-client/unix.d.ts +1 -14
  814. package/vendor/pi-client/unix.d.ts.map +1 -1
  815. package/vendor/pi-client/unix.js +8 -138
  816. package/vendor/pi-client/unix.js.map +1 -1
  817. package/vendor/pi-protocol/codec.d.ts +4 -2
  818. package/vendor/pi-protocol/codec.d.ts.map +1 -1
  819. package/vendor/pi-protocol/codec.js +34 -7
  820. package/vendor/pi-protocol/codec.js.map +1 -1
  821. package/vendor/pi-protocol/framing.d.ts +2 -0
  822. package/vendor/pi-protocol/framing.d.ts.map +1 -1
  823. package/vendor/pi-protocol/framing.js +15 -0
  824. package/vendor/pi-protocol/framing.js.map +1 -1
  825. package/vendor/pi-protocol/index.d.ts +1 -1
  826. package/vendor/pi-protocol/index.d.ts.map +1 -1
  827. package/vendor/pi-protocol/index.js +1 -1
  828. package/vendor/pi-protocol/index.js.map +1 -1
  829. package/vendor/pi-protocol/schemas.d.ts +13739 -0
  830. package/vendor/pi-protocol/schemas.d.ts.map +1 -0
  831. package/vendor/pi-protocol/schemas.js +386 -0
  832. package/vendor/pi-protocol/schemas.js.map +1 -0
  833. package/dist/bun/runtime-setup.d.ts +0 -2
  834. package/dist/bun/runtime-setup.d.ts.map +0 -1
  835. package/dist/bun/runtime-setup.js +0 -9
  836. package/dist/bun/runtime-setup.js.map +0 -1
  837. package/dist/bun/sandbox-env-setup.d.ts +0 -2
  838. package/dist/bun/sandbox-env-setup.d.ts.map +0 -1
  839. package/dist/bun/sandbox-env-setup.js +0 -4
  840. package/dist/bun/sandbox-env-setup.js.map +0 -1
  841. package/dist/cli/setup.d.ts +0 -2
  842. package/dist/cli/setup.d.ts.map +0 -1
  843. package/dist/cli/setup.js +0 -12
  844. package/dist/cli/setup.js.map +0 -1
  845. package/dist/core/cursor-history-admission.d.ts +0 -50
  846. package/dist/core/cursor-history-admission.d.ts.map +0 -1
  847. package/dist/core/cursor-history-admission.js +0 -130
  848. package/dist/core/cursor-history-admission.js.map +0 -1
  849. package/dist/core/tools/renderers/bash.d.ts +0 -12
  850. package/dist/core/tools/renderers/bash.d.ts.map +0 -1
  851. package/dist/core/tools/renderers/bash.js +0 -156
  852. package/dist/core/tools/renderers/bash.js.map +0 -1
  853. package/dist/core/tools/renderers/edit.d.ts +0 -23
  854. package/dist/core/tools/renderers/edit.d.ts.map +0 -1
  855. package/dist/core/tools/renderers/edit.js +0 -172
  856. package/dist/core/tools/renderers/edit.js.map +0 -1
  857. package/dist/core/tools/renderers/find.d.ts +0 -10
  858. package/dist/core/tools/renderers/find.d.ts.map +0 -1
  859. package/dist/core/tools/renderers/find.js +0 -64
  860. package/dist/core/tools/renderers/find.js.map +0 -1
  861. package/dist/core/tools/renderers/grep.d.ts +0 -10
  862. package/dist/core/tools/renderers/grep.d.ts.map +0 -1
  863. package/dist/core/tools/renderers/grep.js +0 -69
  864. package/dist/core/tools/renderers/grep.js.map +0 -1
  865. package/dist/core/tools/renderers/index.d.ts +0 -28
  866. package/dist/core/tools/renderers/index.d.ts.map +0 -1
  867. package/dist/core/tools/renderers/index.js +0 -47
  868. package/dist/core/tools/renderers/index.js.map +0 -1
  869. package/dist/core/tools/renderers/ls.d.ts +0 -10
  870. package/dist/core/tools/renderers/ls.d.ts.map +0 -1
  871. package/dist/core/tools/renderers/ls.js +0 -58
  872. package/dist/core/tools/renderers/ls.js.map +0 -1
  873. package/dist/core/tools/renderers/read.d.ts +0 -19
  874. package/dist/core/tools/renderers/read.d.ts.map +0 -1
  875. package/dist/core/tools/renderers/read.js +0 -149
  876. package/dist/core/tools/renderers/read.js.map +0 -1
  877. package/dist/core/tools/renderers/write.d.ts +0 -10
  878. package/dist/core/tools/renderers/write.d.ts.map +0 -1
  879. package/dist/core/tools/renderers/write.js +0 -162
  880. package/dist/core/tools/renderers/write.js.map +0 -1
  881. package/dist/modes/interactive/chat-viewport.d.ts +0 -22
  882. package/dist/modes/interactive/chat-viewport.d.ts.map +0 -1
  883. package/dist/modes/interactive/chat-viewport.js +0 -29
  884. package/dist/modes/interactive/chat-viewport.js.map +0 -1
  885. package/dist/modes/interactive/components/ask-user-answer-key.d.ts +0 -14
  886. package/dist/modes/interactive/components/ask-user-answer-key.d.ts.map +0 -1
  887. package/dist/modes/interactive/components/ask-user-answer-key.js +0 -65
  888. package/dist/modes/interactive/components/ask-user-answer-key.js.map +0 -1
  889. package/dist/modes/interactive/theme/theme-json.d.ts +0 -84
  890. package/dist/modes/interactive/theme/theme-json.d.ts.map +0 -1
  891. package/dist/modes/interactive/theme/theme-json.js +0 -130
  892. package/dist/modes/interactive/theme/theme-json.js.map +0 -1
  893. package/dist/modes/interactive/tui-renderer.d.ts +0 -21
  894. package/dist/modes/interactive/tui-renderer.d.ts.map +0 -1
  895. package/dist/modes/interactive/tui-renderer.js +0 -67
  896. package/dist/modes/interactive/tui-renderer.js.map +0 -1
  897. package/dist/modes/rpc/session-path-reservations.d.ts +0 -30
  898. package/dist/modes/rpc/session-path-reservations.d.ts.map +0 -1
  899. package/dist/modes/rpc/session-path-reservations.js +0 -58
  900. package/dist/modes/rpc/session-path-reservations.js.map +0 -1
  901. package/dist/modes/rpc/session-worker-credit.d.ts +0 -17
  902. package/dist/modes/rpc/session-worker-credit.d.ts.map +0 -1
  903. package/dist/modes/rpc/session-worker-credit.js +0 -39
  904. package/dist/modes/rpc/session-worker-credit.js.map +0 -1
  905. package/dist/modes/rpc/session-worker-signals.d.ts +0 -7
  906. package/dist/modes/rpc/session-worker-signals.d.ts.map +0 -1
  907. package/dist/modes/rpc/session-worker-signals.js +0 -19
  908. package/dist/modes/rpc/session-worker-signals.js.map +0 -1
  909. package/dist/utils/clipboard-command.d.ts +0 -7
  910. package/dist/utils/clipboard-command.d.ts.map +0 -1
  911. package/dist/utils/clipboard-command.js +0 -45
  912. package/dist/utils/clipboard-command.js.map +0 -1
  913. package/examples/plugins/pi-example-plugin/README.md +0 -38
  914. package/examples/plugins/pi-example-plugin/package.json +0 -10
  915. package/examples/plugins/pi-example-plugin/src/contract.ts +0 -13
  916. package/examples/plugins/pi-example-plugin/src/session.ts +0 -23
  917. package/examples/plugins/pi-example-plugin/src/tui.ts +0 -31
  918. package/node_modules/@aws-sdk/core/dist-es/submodules/util/hasOwn.js +0 -3
  919. package/node_modules/@aws-sdk/core/dist-types/submodules/util/hasOwn.d.ts +0 -4
  920. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/util/hasOwn.d.ts +0 -1
  921. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/LICENSE +0 -201
  922. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/README.md +0 -62
  923. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-cjs/index.js +0 -158
  924. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/constants.js +0 -2
  925. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/fromEnvSigningName.js +0 -16
  926. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/fromSso.js +0 -84
  927. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/fromStatic.js +0 -8
  928. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/getNewSsoOidcToken.js +0 -11
  929. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/getSsoOidcClient.js +0 -10
  930. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/index.js +0 -4
  931. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/nodeProvider.js +0 -5
  932. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/validateTokenExpiry.js +0 -7
  933. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/validateTokenKey.js +0 -7
  934. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/writeSSOTokenToFile.js +0 -8
  935. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/constants.d.ts +0 -8
  936. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/fromEnvSigningName.d.ts +0 -18
  937. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/fromSso.d.ts +0 -12
  938. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/fromStatic.d.ts +0 -9
  939. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/getNewSsoOidcToken.d.ts +0 -8
  940. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/getSsoOidcClient.d.ts +0 -7
  941. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/index.d.ts +0 -7
  942. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/nodeProvider.d.ts +0 -18
  943. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/constants.d.ts +0 -3
  944. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/fromEnvSigningName.d.ts +0 -8
  945. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/fromSso.d.ts +0 -10
  946. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/fromStatic.d.ts +0 -5
  947. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/getNewSsoOidcToken.d.ts +0 -9
  948. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/getSsoOidcClient.d.ts +0 -7
  949. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/index.d.ts +0 -7
  950. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/nodeProvider.d.ts +0 -3
  951. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/validateTokenExpiry.d.ts +0 -2
  952. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/validateTokenKey.d.ts +0 -1
  953. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/writeSSOTokenToFile.d.ts +0 -2
  954. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/validateTokenExpiry.d.ts +0 -5
  955. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/validateTokenKey.d.ts +0 -4
  956. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/writeSSOTokenToFile.d.ts +0 -5
  957. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/package.json +0 -69
  958. package/node_modules/@earendil-works/chord/README.md +0 -205
  959. package/node_modules/@earendil-works/chord/dist/api.d.ts +0 -15
  960. package/node_modules/@earendil-works/chord/dist/api.d.ts.map +0 -1
  961. package/node_modules/@earendil-works/chord/dist/api.js +0 -72
  962. package/node_modules/@earendil-works/chord/dist/api.js.map +0 -1
  963. package/node_modules/@earendil-works/chord/dist/bundler.d.ts +0 -6
  964. package/node_modules/@earendil-works/chord/dist/bundler.d.ts.map +0 -1
  965. package/node_modules/@earendil-works/chord/dist/bundler.js +0 -3
  966. package/node_modules/@earendil-works/chord/dist/bundler.js.map +0 -1
  967. package/node_modules/@earendil-works/chord/dist/context/index.d.ts +0 -24
  968. package/node_modules/@earendil-works/chord/dist/context/index.d.ts.map +0 -1
  969. package/node_modules/@earendil-works/chord/dist/context/index.js +0 -97
  970. package/node_modules/@earendil-works/chord/dist/context/index.js.map +0 -1
  971. package/node_modules/@earendil-works/chord/dist/delta/index.d.ts +0 -119
  972. package/node_modules/@earendil-works/chord/dist/delta/index.d.ts.map +0 -1
  973. package/node_modules/@earendil-works/chord/dist/delta/index.js +0 -1209
  974. package/node_modules/@earendil-works/chord/dist/delta/index.js.map +0 -1
  975. package/node_modules/@earendil-works/chord/dist/facets/host.d.ts +0 -12
  976. package/node_modules/@earendil-works/chord/dist/facets/host.d.ts.map +0 -1
  977. package/node_modules/@earendil-works/chord/dist/facets/host.js +0 -762
  978. package/node_modules/@earendil-works/chord/dist/facets/host.js.map +0 -1
  979. package/node_modules/@earendil-works/chord/dist/facets/loader.d.ts +0 -3
  980. package/node_modules/@earendil-works/chord/dist/facets/loader.d.ts.map +0 -1
  981. package/node_modules/@earendil-works/chord/dist/facets/loader.js +0 -5
  982. package/node_modules/@earendil-works/chord/dist/facets/loader.js.map +0 -1
  983. package/node_modules/@earendil-works/chord/dist/index.d.ts +0 -11
  984. package/node_modules/@earendil-works/chord/dist/index.d.ts.map +0 -1
  985. package/node_modules/@earendil-works/chord/dist/index.js +0 -10
  986. package/node_modules/@earendil-works/chord/dist/index.js.map +0 -1
  987. package/node_modules/@earendil-works/chord/dist/json.d.ts +0 -4
  988. package/node_modules/@earendil-works/chord/dist/json.d.ts.map +0 -1
  989. package/node_modules/@earendil-works/chord/dist/json.js +0 -57
  990. package/node_modules/@earendil-works/chord/dist/json.js.map +0 -1
  991. package/node_modules/@earendil-works/chord/dist/node/bundle-loader.d.ts +0 -30
  992. package/node_modules/@earendil-works/chord/dist/node/bundle-loader.d.ts.map +0 -1
  993. package/node_modules/@earendil-works/chord/dist/node/bundle-loader.js +0 -377
  994. package/node_modules/@earendil-works/chord/dist/node/bundle-loader.js.map +0 -1
  995. package/node_modules/@earendil-works/chord/dist/node/bundle.d.ts +0 -26
  996. package/node_modules/@earendil-works/chord/dist/node/bundle.d.ts.map +0 -1
  997. package/node_modules/@earendil-works/chord/dist/node/bundle.js +0 -183
  998. package/node_modules/@earendil-works/chord/dist/node/bundle.js.map +0 -1
  999. package/node_modules/@earendil-works/chord/dist/node/manifest.d.ts +0 -36
  1000. package/node_modules/@earendil-works/chord/dist/node/manifest.d.ts.map +0 -1
  1001. package/node_modules/@earendil-works/chord/dist/node/manifest.js +0 -6
  1002. package/node_modules/@earendil-works/chord/dist/node/manifest.js.map +0 -1
  1003. package/node_modules/@earendil-works/chord/dist/node/package.d.ts +0 -15
  1004. package/node_modules/@earendil-works/chord/dist/node/package.d.ts.map +0 -1
  1005. package/node_modules/@earendil-works/chord/dist/node/package.js +0 -199
  1006. package/node_modules/@earendil-works/chord/dist/node/package.js.map +0 -1
  1007. package/node_modules/@earendil-works/chord/dist/node.d.ts +0 -5
  1008. package/node_modules/@earendil-works/chord/dist/node.d.ts.map +0 -1
  1009. package/node_modules/@earendil-works/chord/dist/node.js +0 -3
  1010. package/node_modules/@earendil-works/chord/dist/node.js.map +0 -1
  1011. package/node_modules/@earendil-works/chord/dist/services/consumer.d.ts +0 -11
  1012. package/node_modules/@earendil-works/chord/dist/services/consumer.d.ts.map +0 -1
  1013. package/node_modules/@earendil-works/chord/dist/services/consumer.js +0 -535
  1014. package/node_modules/@earendil-works/chord/dist/services/consumer.js.map +0 -1
  1015. package/node_modules/@earendil-works/chord/dist/services/errors.d.ts +0 -8
  1016. package/node_modules/@earendil-works/chord/dist/services/errors.d.ts.map +0 -1
  1017. package/node_modules/@earendil-works/chord/dist/services/errors.js +0 -21
  1018. package/node_modules/@earendil-works/chord/dist/services/errors.js.map +0 -1
  1019. package/node_modules/@earendil-works/chord/dist/services/handle.d.ts +0 -15
  1020. package/node_modules/@earendil-works/chord/dist/services/handle.d.ts.map +0 -1
  1021. package/node_modules/@earendil-works/chord/dist/services/handle.js +0 -99
  1022. package/node_modules/@earendil-works/chord/dist/services/handle.js.map +0 -1
  1023. package/node_modules/@earendil-works/chord/dist/services/instances.d.ts +0 -25
  1024. package/node_modules/@earendil-works/chord/dist/services/instances.d.ts.map +0 -1
  1025. package/node_modules/@earendil-works/chord/dist/services/instances.js +0 -137
  1026. package/node_modules/@earendil-works/chord/dist/services/instances.js.map +0 -1
  1027. package/node_modules/@earendil-works/chord/dist/services/loopback.d.ts +0 -5
  1028. package/node_modules/@earendil-works/chord/dist/services/loopback.d.ts.map +0 -1
  1029. package/node_modules/@earendil-works/chord/dist/services/loopback.js +0 -15
  1030. package/node_modules/@earendil-works/chord/dist/services/loopback.js.map +0 -1
  1031. package/node_modules/@earendil-works/chord/dist/services/provider.d.ts +0 -37
  1032. package/node_modules/@earendil-works/chord/dist/services/provider.d.ts.map +0 -1
  1033. package/node_modules/@earendil-works/chord/dist/services/provider.js +0 -472
  1034. package/node_modules/@earendil-works/chord/dist/services/provider.js.map +0 -1
  1035. package/node_modules/@earendil-works/chord/dist/services/state-codec.d.ts +0 -15
  1036. package/node_modules/@earendil-works/chord/dist/services/state-codec.d.ts.map +0 -1
  1037. package/node_modules/@earendil-works/chord/dist/services/state-codec.js +0 -115
  1038. package/node_modules/@earendil-works/chord/dist/services/state-codec.js.map +0 -1
  1039. package/node_modules/@earendil-works/chord/dist/services/state-internals.d.ts +0 -11
  1040. package/node_modules/@earendil-works/chord/dist/services/state-internals.d.ts.map +0 -1
  1041. package/node_modules/@earendil-works/chord/dist/services/state-internals.js +0 -10
  1042. package/node_modules/@earendil-works/chord/dist/services/state-internals.js.map +0 -1
  1043. package/node_modules/@earendil-works/chord/dist/services/state.d.ts +0 -23
  1044. package/node_modules/@earendil-works/chord/dist/services/state.d.ts.map +0 -1
  1045. package/node_modules/@earendil-works/chord/dist/services/state.js +0 -124
  1046. package/node_modules/@earendil-works/chord/dist/services/state.js.map +0 -1
  1047. package/node_modules/@earendil-works/chord/dist/services/wire.d.ts +0 -60
  1048. package/node_modules/@earendil-works/chord/dist/services/wire.d.ts.map +0 -1
  1049. package/node_modules/@earendil-works/chord/dist/services/wire.js +0 -173
  1050. package/node_modules/@earendil-works/chord/dist/services/wire.js.map +0 -1
  1051. package/node_modules/@earendil-works/chord/dist/types.d.ts +0 -203
  1052. package/node_modules/@earendil-works/chord/dist/types.d.ts.map +0 -1
  1053. package/node_modules/@earendil-works/chord/dist/types.js +0 -2
  1054. package/node_modules/@earendil-works/chord/dist/types.js.map +0 -1
  1055. package/node_modules/@earendil-works/chord/package.json +0 -73
  1056. package/node_modules/@earendil-works/pi-agent-core/dist/harness/config.d.ts +0 -9
  1057. package/node_modules/@earendil-works/pi-agent-core/dist/harness/config.d.ts.map +0 -1
  1058. package/node_modules/@earendil-works/pi-agent-core/dist/harness/config.js +0 -35
  1059. package/node_modules/@earendil-works/pi-agent-core/dist/harness/config.js.map +0 -1
  1060. package/node_modules/@earendil-works/pi-agent-core/dist/harness/context.d.ts +0 -9
  1061. package/node_modules/@earendil-works/pi-agent-core/dist/harness/context.d.ts.map +0 -1
  1062. package/node_modules/@earendil-works/pi-agent-core/dist/harness/context.js +0 -13
  1063. package/node_modules/@earendil-works/pi-agent-core/dist/harness/context.js.map +0 -1
  1064. package/node_modules/@earendil-works/pi-agent-core/dist/harness/execution/assistant.d.ts +0 -42
  1065. package/node_modules/@earendil-works/pi-agent-core/dist/harness/execution/assistant.d.ts.map +0 -1
  1066. package/node_modules/@earendil-works/pi-agent-core/dist/harness/execution/assistant.js +0 -82
  1067. package/node_modules/@earendil-works/pi-agent-core/dist/harness/execution/assistant.js.map +0 -1
  1068. package/node_modules/@earendil-works/pi-agent-core/dist/harness/execution/effect-gate.d.ts +0 -22
  1069. package/node_modules/@earendil-works/pi-agent-core/dist/harness/execution/effect-gate.d.ts.map +0 -1
  1070. package/node_modules/@earendil-works/pi-agent-core/dist/harness/execution/effect-gate.js +0 -48
  1071. package/node_modules/@earendil-works/pi-agent-core/dist/harness/execution/effect-gate.js.map +0 -1
  1072. package/node_modules/@earendil-works/pi-agent-core/dist/harness/execution/tools.d.ts +0 -67
  1073. package/node_modules/@earendil-works/pi-agent-core/dist/harness/execution/tools.d.ts.map +0 -1
  1074. package/node_modules/@earendil-works/pi-agent-core/dist/harness/execution/tools.js +0 -121
  1075. package/node_modules/@earendil-works/pi-agent-core/dist/harness/execution/tools.js.map +0 -1
  1076. package/node_modules/@earendil-works/pi-agent-core/dist/harness/hooks.d.ts +0 -38
  1077. package/node_modules/@earendil-works/pi-agent-core/dist/harness/hooks.d.ts.map +0 -1
  1078. package/node_modules/@earendil-works/pi-agent-core/dist/harness/hooks.js +0 -404
  1079. package/node_modules/@earendil-works/pi-agent-core/dist/harness/hooks.js.map +0 -1
  1080. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/boundary.d.ts +0 -28
  1081. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/boundary.d.ts.map +0 -1
  1082. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/boundary.js +0 -173
  1083. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/boundary.js.map +0 -1
  1084. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/checkpoint.d.ts +0 -8
  1085. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/checkpoint.d.ts.map +0 -1
  1086. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/checkpoint.js +0 -133
  1087. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/checkpoint.js.map +0 -1
  1088. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/deferred.d.ts +0 -15
  1089. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/deferred.d.ts.map +0 -1
  1090. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/deferred.js +0 -179
  1091. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/deferred.js.map +0 -1
  1092. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/generation.d.ts +0 -8
  1093. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/generation.d.ts.map +0 -1
  1094. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/generation.js +0 -205
  1095. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/generation.js.map +0 -1
  1096. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/reconcile.d.ts +0 -5
  1097. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/reconcile.d.ts.map +0 -1
  1098. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/reconcile.js +0 -140
  1099. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/reconcile.js.map +0 -1
  1100. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/recovery.d.ts +0 -8
  1101. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/recovery.d.ts.map +0 -1
  1102. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/recovery.js +0 -85
  1103. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/recovery.js.map +0 -1
  1104. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/response.d.ts +0 -23
  1105. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/response.d.ts.map +0 -1
  1106. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/response.js +0 -394
  1107. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/response.js.map +0 -1
  1108. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/retry.d.ts +0 -4
  1109. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/retry.d.ts.map +0 -1
  1110. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/retry.js +0 -34
  1111. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/retry.js.map +0 -1
  1112. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/structural.d.ts +0 -32
  1113. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/structural.d.ts.map +0 -1
  1114. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/structural.js +0 -929
  1115. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/structural.js.map +0 -1
  1116. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/terminal.d.ts +0 -7
  1117. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/terminal.d.ts.map +0 -1
  1118. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/terminal.js +0 -49
  1119. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/terminal.js.map +0 -1
  1120. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/tool-placement.d.ts +0 -14
  1121. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/tool-placement.d.ts.map +0 -1
  1122. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/tool-placement.js +0 -244
  1123. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/tool-placement.js.map +0 -1
  1124. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/tools.d.ts +0 -6
  1125. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/tools.d.ts.map +0 -1
  1126. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/tools.js +0 -449
  1127. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/tools.js.map +0 -1
  1128. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive.d.ts +0 -6
  1129. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive.d.ts.map +0 -1
  1130. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive.js +0 -93
  1131. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive.js.map +0 -1
  1132. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/harness.d.ts +0 -59
  1133. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/harness.d.ts.map +0 -1
  1134. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/harness.js +0 -302
  1135. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/harness.js.map +0 -1
  1136. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/index.d.ts +0 -2
  1137. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/index.d.ts.map +0 -1
  1138. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/index.js +0 -2
  1139. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/index.js.map +0 -1
  1140. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/lane.d.ts +0 -118
  1141. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/lane.d.ts.map +0 -1
  1142. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/lane.js +0 -1559
  1143. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/lane.js.map +0 -1
  1144. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/progress.d.ts +0 -15
  1145. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/progress.d.ts.map +0 -1
  1146. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/progress.js +0 -66
  1147. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/progress.js.map +0 -1
  1148. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/reducer.d.ts +0 -5
  1149. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/reducer.d.ts.map +0 -1
  1150. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/reducer.js +0 -240
  1151. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/reducer.js.map +0 -1
  1152. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/restore.d.ts +0 -24
  1153. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/restore.d.ts.map +0 -1
  1154. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/restore.js +0 -117
  1155. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/restore.js.map +0 -1
  1156. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/transcript.d.ts +0 -21
  1157. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/transcript.d.ts.map +0 -1
  1158. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/transcript.js +0 -72
  1159. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/transcript.js.map +0 -1
  1160. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/types.d.ts +0 -105
  1161. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/types.d.ts.map +0 -1
  1162. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/types.js +0 -50
  1163. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/types.js.map +0 -1
  1164. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/commit.d.ts +0 -53
  1165. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/commit.d.ts.map +0 -1
  1166. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/commit.js +0 -57
  1167. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/commit.js.map +0 -1
  1168. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/fork-policy.d.ts +0 -21
  1169. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/fork-policy.d.ts.map +0 -1
  1170. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/fork-policy.js +0 -55
  1171. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/fork-policy.js.map +0 -1
  1172. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/fork.d.ts +0 -16
  1173. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/fork.d.ts.map +0 -1
  1174. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/fork.js +0 -79
  1175. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/fork.js.map +0 -1
  1176. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/in-memory-storage-state.d.ts +0 -39
  1177. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/in-memory-storage-state.d.ts.map +0 -1
  1178. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/in-memory-storage-state.js +0 -269
  1179. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/in-memory-storage-state.js.map +0 -1
  1180. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/fork.d.ts +0 -38
  1181. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/fork.d.ts.map +0 -1
  1182. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/fork.js +0 -266
  1183. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/fork.js.map +0 -1
  1184. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/index.d.ts +0 -4
  1185. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/index.d.ts.map +0 -1
  1186. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/index.js +0 -4
  1187. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/index.js.map +0 -1
  1188. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/io.d.ts +0 -14
  1189. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/io.d.ts.map +0 -1
  1190. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/io.js +0 -86
  1191. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/io.js.map +0 -1
  1192. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/legacy-v3.d.ts +0 -44
  1193. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/legacy-v3.d.ts.map +0 -1
  1194. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/legacy-v3.js +0 -454
  1195. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/legacy-v3.js.map +0 -1
  1196. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/mutation-line.d.ts +0 -8
  1197. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/mutation-line.d.ts.map +0 -1
  1198. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/mutation-line.js +0 -22
  1199. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/mutation-line.js.map +0 -1
  1200. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/benchmark/datasets.d.ts +0 -12
  1201. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/benchmark/datasets.d.ts.map +0 -1
  1202. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/benchmark/datasets.js +0 -24
  1203. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/benchmark/datasets.js.map +0 -1
  1204. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/benchmark/session-repo.d.ts +0 -42
  1205. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/benchmark/session-repo.d.ts.map +0 -1
  1206. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/benchmark/session-repo.js +0 -127
  1207. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/benchmark/session-repo.js.map +0 -1
  1208. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/benchmark/storage.d.ts +0 -25
  1209. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/benchmark/storage.d.ts.map +0 -1
  1210. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/benchmark/storage.js +0 -114
  1211. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/benchmark/storage.js.map +0 -1
  1212. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/conformance/session-repo.d.ts +0 -23
  1213. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/conformance/session-repo.d.ts.map +0 -1
  1214. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/conformance/session-repo.js +0 -809
  1215. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/conformance/session-repo.js.map +0 -1
  1216. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/conformance/storage.d.ts +0 -4
  1217. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/conformance/storage.d.ts.map +0 -1
  1218. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/conformance/storage.js +0 -600
  1219. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/conformance/storage.js.map +0 -1
  1220. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/gating-storage.d.ts +0 -26
  1221. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/gating-storage.d.ts.map +0 -1
  1222. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/gating-storage.js +0 -103
  1223. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/gating-storage.js.map +0 -1
  1224. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/instrumented-storage.d.ts +0 -11
  1225. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/instrumented-storage.d.ts.map +0 -1
  1226. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/instrumented-storage.js +0 -19
  1227. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/instrumented-storage.js.map +0 -1
  1228. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/storage-decorator.d.ts +0 -20
  1229. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/storage-decorator.d.ts.map +0 -1
  1230. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/storage-decorator.js +0 -40
  1231. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/storage-decorator.js.map +0 -1
  1232. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/values.d.ts +0 -95
  1233. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/values.d.ts.map +0 -1
  1234. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/values.js +0 -81
  1235. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/values.js.map +0 -1
  1236. package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/adaptive-publisher.d.ts +0 -24
  1237. package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/adaptive-publisher.d.ts.map +0 -1
  1238. package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/adaptive-publisher.js +0 -79
  1239. package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/adaptive-publisher.js.map +0 -1
  1240. package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/output-capture.d.ts +0 -31
  1241. package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/output-capture.d.ts.map +0 -1
  1242. package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/output-capture.js +0 -217
  1243. package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/output-capture.js.map +0 -1
  1244. package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/usage.d.ts +0 -4
  1245. package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/usage.d.ts.map +0 -1
  1246. package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/usage.js +0 -33
  1247. package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/usage.js.map +0 -1
  1248. package/node_modules/@earendil-works/pi-ai/dist/api/cloudflare-ai-binding.d.ts +0 -77
  1249. package/node_modules/@earendil-works/pi-ai/dist/api/cloudflare-ai-binding.d.ts.map +0 -1
  1250. package/node_modules/@earendil-works/pi-ai/dist/api/cloudflare-ai-binding.js +0 -72
  1251. package/node_modules/@earendil-works/pi-ai/dist/api/cloudflare-ai-binding.js.map +0 -1
  1252. package/node_modules/@earendil-works/pi-ai/dist/cursor/context-limit-store.d.ts +0 -32
  1253. package/node_modules/@earendil-works/pi-ai/dist/cursor/context-limit-store.d.ts.map +0 -1
  1254. package/node_modules/@earendil-works/pi-ai/dist/cursor/context-limit-store.js +0 -62
  1255. package/node_modules/@earendil-works/pi-ai/dist/cursor/context-limit-store.js.map +0 -1
  1256. package/node_modules/@earendil-works/pi-ai/dist/providers/opencode-headers.d.ts +0 -4
  1257. package/node_modules/@earendil-works/pi-ai/dist/providers/opencode-headers.d.ts.map +0 -1
  1258. package/node_modules/@earendil-works/pi-ai/dist/providers/opencode-headers.js +0 -22
  1259. package/node_modules/@earendil-works/pi-ai/dist/providers/opencode-headers.js.map +0 -1
  1260. package/node_modules/@earendil-works/pi-ai/dist/utils/assistant-message-frame.d.ts +0 -77
  1261. package/node_modules/@earendil-works/pi-ai/dist/utils/assistant-message-frame.d.ts.map +0 -1
  1262. package/node_modules/@earendil-works/pi-ai/dist/utils/assistant-message-frame.js +0 -427
  1263. package/node_modules/@earendil-works/pi-ai/dist/utils/assistant-message-frame.js.map +0 -1
  1264. package/node_modules/@earendil-works/pi-ai/dist/utils/cursor-context-limit.d.ts +0 -12
  1265. package/node_modules/@earendil-works/pi-ai/dist/utils/cursor-context-limit.d.ts.map +0 -1
  1266. package/node_modules/@earendil-works/pi-ai/dist/utils/cursor-context-limit.js +0 -93
  1267. package/node_modules/@earendil-works/pi-ai/dist/utils/cursor-context-limit.js.map +0 -1
  1268. package/node_modules/@earendil-works/pi-tui/dist/components/mouse-region.d.ts +0 -12
  1269. package/node_modules/@earendil-works/pi-tui/dist/components/mouse-region.d.ts.map +0 -1
  1270. package/node_modules/@earendil-works/pi-tui/dist/components/mouse-region.js +0 -19
  1271. package/node_modules/@earendil-works/pi-tui/dist/components/mouse-region.js.map +0 -1
  1272. package/node_modules/@earendil-works/pi-tui/dist/native-platform.d.ts +0 -18
  1273. package/node_modules/@earendil-works/pi-tui/dist/native-platform.d.ts.map +0 -1
  1274. package/node_modules/@earendil-works/pi-tui/dist/native-platform.js +0 -42
  1275. package/node_modules/@earendil-works/pi-tui/dist/native-platform.js.map +0 -1
  1276. package/node_modules/@earendil-works/pi-tui/native/clipboard.h +0 -170
  1277. package/node_modules/@earendil-works/pi-tui/native/darwin/src/darwin-platform.m +0 -93
  1278. package/node_modules/@earendil-works/pi-tui/native/linux/README.md +0 -23
  1279. package/node_modules/@earendil-works/pi-tui/native/linux/build.sh +0 -65
  1280. package/node_modules/@earendil-works/pi-tui/native/linux/prebuilds/linux-arm64/linux-platform-x11.node +0 -0
  1281. package/node_modules/@earendil-works/pi-tui/native/linux/prebuilds/linux-x64/linux-platform-x11.node +0 -0
  1282. package/node_modules/@earendil-works/pi-tui/native/linux/src/clipboard-worker.h +0 -70
  1283. package/node_modules/@earendil-works/pi-tui/native/linux/src/linux-platform-x11.c +0 -274
  1284. package/node_modules/@earendil-works/pi-tui/native/napi.h +0 -89
  1285. package/node_modules/@earendil-works/pi-tui/native/win32/prebuilds/win32-arm64/win32-platform.node +0 -0
  1286. package/node_modules/@earendil-works/pi-tui/native/win32/prebuilds/win32-x64/win32-platform.node +0 -0
  1287. package/node_modules/@earendil-works/pi-tui/native/win32/src/win32-platform.c +0 -241
  1288. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/LICENSE +0 -201
  1289. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/README.md +0 -115
  1290. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-cjs/index.js +0 -96
  1291. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/abort-handler.js +0 -1
  1292. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/abort.js +0 -1
  1293. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/auth/HttpApiKeyAuth.js +0 -5
  1294. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/auth/HttpAuthScheme.js +0 -1
  1295. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/auth/HttpAuthSchemeProvider.js +0 -1
  1296. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/auth/HttpSigner.js +0 -1
  1297. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/auth/IdentityProviderConfig.js +0 -1
  1298. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/auth/auth.js +0 -5
  1299. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/auth/index.js +0 -2
  1300. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/blob/blob-payload-input-types.js +0 -1
  1301. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/checksum.js +0 -1
  1302. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/client.js +0 -1
  1303. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/command.js +0 -1
  1304. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/connection/config.js +0 -1
  1305. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/connection/index.js +0 -1
  1306. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/connection/manager.js +0 -1
  1307. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/connection/pool.js +0 -1
  1308. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/crypto.js +0 -1
  1309. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/downlevel-ts3.4/transform/type-transform.js +0 -1
  1310. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/encode.js +0 -1
  1311. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/endpoint.js +0 -5
  1312. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/endpoints/EndpointParameterInstructions.js +0 -1
  1313. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/endpoints/EndpointRuleObject.js +0 -1
  1314. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/endpoints/ErrorRuleObject.js +0 -1
  1315. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/endpoints/RuleSetObject.js +0 -1
  1316. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/endpoints/TreeRuleObject.js +0 -1
  1317. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/endpoints/index.js +0 -1
  1318. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/endpoints/shared.js +0 -1
  1319. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/eventStream.js +0 -1
  1320. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/extensions/checksum.js +0 -38
  1321. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/extensions/defaultClientConfiguration.js +0 -7
  1322. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/extensions/defaultExtensionConfiguration.js +0 -1
  1323. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/extensions/index.js +0 -2
  1324. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/extensions/retry.js +0 -1
  1325. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/externals-check/browser-externals-check.js +0 -1
  1326. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/feature-ids.js +0 -1
  1327. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/http/httpHandlerInitialization.js +0 -1
  1328. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/http.js +0 -5
  1329. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/identity/apiKeyIdentity.js +0 -1
  1330. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/identity/awsCredentialIdentity.js +0 -1
  1331. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/identity/identity.js +0 -1
  1332. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/identity/index.js +0 -1
  1333. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/identity/tokenIdentity.js +0 -1
  1334. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/index.js +0 -7
  1335. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/logger.js +0 -1
  1336. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/metrics.js +0 -1
  1337. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/middleware.js +0 -1
  1338. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/pagination.js +0 -1
  1339. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/profile.js +0 -6
  1340. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/response.js +0 -1
  1341. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/retry.js +0 -1
  1342. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/schema/schema-deprecated.js +0 -1
  1343. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/schema/schema.js +0 -1
  1344. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/schema/sentinels.js +0 -1
  1345. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/schema/static-schemas.js +0 -1
  1346. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/schema/traits.js +0 -1
  1347. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/serde.js +0 -1
  1348. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/shapes.js +0 -1
  1349. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/signature.js +0 -1
  1350. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/stream.js +0 -1
  1351. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/streaming-payload/streaming-blob-common-types.js +0 -1
  1352. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/streaming-payload/streaming-blob-payload-input-types.js +0 -1
  1353. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/streaming-payload/streaming-blob-payload-output-types.js +0 -1
  1354. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/transfer.js +0 -6
  1355. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/transform/client-method-transforms.js +0 -1
  1356. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/transform/client-payload-blob-type-narrow.js +0 -1
  1357. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/transform/exact.js +0 -1
  1358. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/transform/mutable.js +0 -1
  1359. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/transform/no-undefined.js +0 -1
  1360. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/transform/type-transform.js +0 -1
  1361. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/uri.js +0 -1
  1362. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/util.js +0 -1
  1363. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/waiter.js +0 -1
  1364. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/abort-handler.d.ts +0 -7
  1365. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/abort.d.ts +0 -48
  1366. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/auth/HttpApiKeyAuth.d.ts +0 -7
  1367. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/auth/HttpAuthScheme.d.ts +0 -49
  1368. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/auth/HttpAuthSchemeProvider.d.ts +0 -20
  1369. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/auth/HttpSigner.d.ts +0 -41
  1370. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/auth/IdentityProviderConfig.d.ts +0 -14
  1371. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/auth/auth.d.ts +0 -59
  1372. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/auth/index.d.ts +0 -7
  1373. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/blob/blob-payload-input-types.d.ts +0 -37
  1374. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/checksum.d.ts +0 -61
  1375. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/client.d.ts +0 -57
  1376. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/command.d.ts +0 -28
  1377. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/connection/config.d.ts +0 -15
  1378. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/connection/index.d.ts +0 -3
  1379. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/connection/manager.d.ts +0 -34
  1380. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/connection/pool.d.ts +0 -32
  1381. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/crypto.d.ts +0 -58
  1382. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/downlevel-ts3.4/transform/type-transform.d.ts +0 -24
  1383. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/encode.d.ts +0 -31
  1384. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/endpoint.d.ts +0 -77
  1385. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/endpoints/EndpointParameterInstructions.d.ts +0 -41
  1386. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/endpoints/EndpointRuleObject.d.ts +0 -27
  1387. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/endpoints/ErrorRuleObject.d.ts +0 -10
  1388. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/endpoints/RuleSetObject.d.ts +0 -28
  1389. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/endpoints/TreeRuleObject.d.ts +0 -16
  1390. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/endpoints/index.d.ts +0 -5
  1391. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/endpoints/shared.d.ts +0 -55
  1392. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/eventStream.d.ts +0 -137
  1393. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/extensions/checksum.d.ts +0 -58
  1394. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/extensions/defaultClientConfiguration.d.ts +0 -32
  1395. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/extensions/defaultExtensionConfiguration.d.ts +0 -9
  1396. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/extensions/index.d.ts +0 -6
  1397. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/extensions/retry.d.ts +0 -18
  1398. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/externals-check/browser-externals-check.d.ts +0 -35
  1399. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/feature-ids.d.ts +0 -16
  1400. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/http/httpHandlerInitialization.d.ts +0 -142
  1401. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/http.d.ts +0 -110
  1402. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/identity/apiKeyIdentity.d.ts +0 -14
  1403. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/identity/awsCredentialIdentity.d.ts +0 -31
  1404. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/identity/identity.d.ts +0 -15
  1405. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/identity/index.d.ts +0 -4
  1406. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/identity/tokenIdentity.d.ts +0 -14
  1407. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/index.d.ts +0 -52
  1408. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/logger.d.ts +0 -13
  1409. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/metrics.d.ts +0 -93
  1410. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/middleware.d.ts +0 -541
  1411. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/pagination.d.ts +0 -33
  1412. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/profile.d.ts +0 -30
  1413. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/response.d.ts +0 -40
  1414. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/retry.d.ts +0 -162
  1415. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/schema/schema-deprecated.d.ts +0 -143
  1416. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/schema/schema.d.ts +0 -236
  1417. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/schema/sentinels.d.ts +0 -65
  1418. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/schema/static-schemas.d.ts +0 -99
  1419. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/schema/traits.d.ts +0 -46
  1420. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/serde.d.ts +0 -114
  1421. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/shapes.d.ts +0 -79
  1422. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/signature.d.ts +0 -172
  1423. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/stream.d.ts +0 -22
  1424. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/streaming-payload/streaming-blob-common-types.d.ts +0 -28
  1425. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/streaming-payload/streaming-blob-payload-input-types.d.ts +0 -54
  1426. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/streaming-payload/streaming-blob-payload-output-types.d.ts +0 -41
  1427. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/transfer.d.ts +0 -42
  1428. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/transform/client-method-transforms.d.ts +0 -26
  1429. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/transform/client-payload-blob-type-narrow.d.ts +0 -73
  1430. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/transform/exact.d.ts +0 -6
  1431. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/transform/mutable.d.ts +0 -6
  1432. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/transform/no-undefined.d.ts +0 -68
  1433. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/transform/type-transform.d.ts +0 -39
  1434. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/abort-handler.d.ts +0 -7
  1435. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/abort.d.ts +0 -45
  1436. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/auth/HttpApiKeyAuth.d.ts +0 -7
  1437. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/auth/HttpAuthScheme.d.ts +0 -49
  1438. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/auth/HttpAuthSchemeProvider.d.ts +0 -20
  1439. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/auth/HttpSigner.d.ts +0 -41
  1440. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/auth/IdentityProviderConfig.d.ts +0 -14
  1441. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/auth/auth.d.ts +0 -59
  1442. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/auth/index.d.ts +0 -7
  1443. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/blob/blob-payload-input-types.d.ts +0 -37
  1444. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/checksum.d.ts +0 -61
  1445. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/client.d.ts +0 -57
  1446. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/command.d.ts +0 -28
  1447. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/connection/config.d.ts +0 -15
  1448. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/connection/index.d.ts +0 -3
  1449. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/connection/manager.d.ts +0 -34
  1450. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/connection/pool.d.ts +0 -32
  1451. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/crypto.d.ts +0 -58
  1452. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/downlevel-ts3.4/transform/type-transform.d.ts +0 -40
  1453. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/encode.d.ts +0 -31
  1454. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/endpoint.d.ts +0 -77
  1455. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/endpoints/EndpointParameterInstructions.d.ts +0 -41
  1456. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/endpoints/EndpointRuleObject.d.ts +0 -27
  1457. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/endpoints/ErrorRuleObject.d.ts +0 -10
  1458. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/endpoints/RuleSetObject.d.ts +0 -28
  1459. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/endpoints/TreeRuleObject.d.ts +0 -16
  1460. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/endpoints/index.d.ts +0 -5
  1461. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/endpoints/shared.d.ts +0 -55
  1462. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/eventStream.d.ts +0 -137
  1463. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/extensions/checksum.d.ts +0 -58
  1464. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/extensions/defaultClientConfiguration.d.ts +0 -32
  1465. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/extensions/defaultExtensionConfiguration.d.ts +0 -9
  1466. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/extensions/index.d.ts +0 -6
  1467. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/extensions/retry.d.ts +0 -18
  1468. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/externals-check/browser-externals-check.d.ts +0 -35
  1469. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/feature-ids.d.ts +0 -16
  1470. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/http/httpHandlerInitialization.d.ts +0 -142
  1471. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/http.d.ts +0 -110
  1472. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/identity/apiKeyIdentity.d.ts +0 -14
  1473. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/identity/awsCredentialIdentity.d.ts +0 -31
  1474. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/identity/identity.d.ts +0 -15
  1475. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/identity/index.d.ts +0 -4
  1476. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/identity/tokenIdentity.d.ts +0 -14
  1477. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/index.d.ts +0 -52
  1478. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/logger.d.ts +0 -13
  1479. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/metrics.d.ts +0 -93
  1480. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/middleware.d.ts +0 -541
  1481. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/pagination.d.ts +0 -33
  1482. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/profile.d.ts +0 -30
  1483. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/response.d.ts +0 -40
  1484. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/retry.d.ts +0 -162
  1485. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/schema/schema-deprecated.d.ts +0 -149
  1486. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/schema/schema.d.ts +0 -251
  1487. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/schema/sentinels.d.ts +0 -65
  1488. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/schema/static-schemas.d.ts +0 -118
  1489. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/schema/traits.d.ts +0 -46
  1490. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/serde.d.ts +0 -114
  1491. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/shapes.d.ts +0 -79
  1492. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/signature.d.ts +0 -172
  1493. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/stream.d.ts +0 -22
  1494. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/streaming-payload/streaming-blob-common-types.d.ts +0 -28
  1495. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/streaming-payload/streaming-blob-payload-input-types.d.ts +0 -54
  1496. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/streaming-payload/streaming-blob-payload-output-types.d.ts +0 -41
  1497. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/transfer.d.ts +0 -42
  1498. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/transform/client-method-transforms.d.ts +0 -26
  1499. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/transform/client-payload-blob-type-narrow.d.ts +0 -77
  1500. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/transform/exact.d.ts +0 -14
  1501. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/transform/mutable.d.ts +0 -6
  1502. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/transform/no-undefined.d.ts +0 -88
  1503. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/transform/type-transform.d.ts +0 -40
  1504. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/uri.d.ts +0 -17
  1505. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/util.d.ts +0 -192
  1506. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/waiter.d.ts +0 -35
  1507. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/uri.d.ts +0 -17
  1508. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/util.d.ts +0 -176
  1509. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/waiter.d.ts +0 -35
  1510. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/package.json +0 -50
  1511. package/node_modules/esbuild/LICENSE.md +0 -21
  1512. package/node_modules/esbuild/README.md +0 -3
  1513. package/node_modules/esbuild/bin/esbuild +0 -223
  1514. package/node_modules/esbuild/install.js +0 -300
  1515. package/node_modules/esbuild/lib/main.d.ts +0 -720
  1516. package/node_modules/esbuild/lib/main.js +0 -2536
  1517. package/node_modules/esbuild/package.json +0 -47
  1518. package/node_modules/typebox/build/schema/intern/index.d.mts +0 -1
  1519. package/node_modules/typebox/build/schema/intern/index.mjs +0 -1
  1520. package/node_modules/typebox/build/schema/intern/intern.d.mts +0 -14
  1521. package/node_modules/typebox/build/schema/intern/intern.mjs +0 -259
  1522. package/vendor/pi-protocol/protocol.d.ts +0 -167
  1523. package/vendor/pi-protocol/protocol.d.ts.map +0 -1
  1524. package/vendor/pi-protocol/protocol.js +0 -85
  1525. package/vendor/pi-protocol/protocol.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"turn-adapter.js","sourceRoot":"","sources":["../../../src/modes/app-server/turn-adapter.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,oCAAoC,EAAE,MAAM,uBAAuB,CAAC;AAM7E,OAAO,EAAE,UAAU,EAA0B,MAAM,yBAAyB,CAAC;AAE7E,OAAO,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AACtE,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAEtH,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAK5D,MAAM,UAAU,mBAAmB,CAAC,OAAuB;IAC1D,OAAO,IAAI,aAAa,CAAC,OAAO,CAAC,CAAC;AACnC,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,OAAmB;IAClD,MAAM,MAAM,GAAG,YAAY,CAAC,OAAO,CAAC,CAAC;IACrC,OAAO;QACN,QAAQ,EAAE,mBAAmB,CAAC,MAAM,CAAC,QAAQ,EAAE,UAAU,CAAC;QAC1D,mBAAmB,EAAE,2BAA2B,CAAC,MAAM,CAAC,mBAAmB,EAAE,qBAAqB,CAAC;QACnG,KAAK,EAAE,mBAAmB,CAAC,MAAM,CAAC,KAAK,CAAC;KACxC,CAAC;AACH,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,OAAmB;IAClD,MAAM,MAAM,GAAG,YAAY,CAAC,OAAO,CAAC,CAAC;IACrC,OAAO;QACN,QAAQ,EAAE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AW;YACf,OAAO,IAAI,CAAC;QACb,KAAK,MAAM;YACV,OAAO,MAAM,CAAC;IAChB,CAAC;AACF,CAAC","sourcesContent":["import type { AgentSession } from \"../../core/agent-session.ts\";\nimport type { TurnInterruptParams, TurnStartParams, TurnSteerParams, UserInput } from \"./protocol/index.ts\";\nimport { ADDITIVE_CLIENT_NOTIFICATION_METHODS } from \"./protocol/methods.ts\";\nimport type { ClassifiedIncoming, RpcResponse } from \"./rpc/envelope.ts\";\nimport type { MethodRegistry, RpcRequest } from \"./rpc/registry.ts\";\nimport type { ApprovalBridge } from \"./server/approvals.ts\";\nimport type { Connection, ConnectionId, ConnectionInput, TransportKind } from \"./server/connection.ts\";\nimport type { ConnectionTransport, NotificationRouter } from \"./server/notifications.ts\";\nimport { ServerCore, type ServerCoreOptions } from \"./server/server-core.ts\";\nimport type { UserInputBridge } from \"./server/user-input-bridge.ts\";\nimport { UserInputProtocolError } from \"./server/user-input-types.ts\";\nimport { decodeCursor, encodeCursor, objectValue, optionalNumber, optionalString } from \"./threads/handler-params.ts\";\nimport type { ThreadEntry, ThreadRegistry } from \"./threads/registry.ts\";\nimport { TurnEngineError } from \"./threads/turn-runtime.ts\";\nimport type { TurnEngineSession, TurnEngineStore, TurnEngineThreadEntry } from \"./threads/turns.ts\";\n\ntype ModeTurnEntry = TurnEngineThreadEntry;\n\nexport function createModeTurnStore(threads: ThreadRegistry): TurnEngineStore<ModeTurnEntry> {\n\treturn new ModeTurnStore(threads);\n}\n\nexport function turnStartParams(request: RpcRequest): TurnStartParams {\n\tconst params = objectParams(request);\n\treturn {\n\t\tthreadId: requiredStringParam(params.threadId, \"threadId\"),\n\t\tclientUserMessageId: optionalNullableStringParam(params.clientUserMessageId, \"clientUserMessageId\"),\n\t\tinput: userInputArrayParam(params.input),\n\t};\n}\n\nexport function turnSteerParams(request: RpcRequest): TurnSteerParams {\n\tconst params = objectParams(request);\n\treturn {\n\t\tthreadId: requiredStringParam(params.threadId, \"threadId\"),\n\t\texpectedTurnId: requiredStringParam(params.expectedTurnId, \"expectedTurnId\"),\n\t\tclientUserMessageId: optionalNullableStringParam(params.clientUserMessageId, \"clientUserMessageId\"),\n\t\tinput: userInputArrayParam(params.input),\n\t};\n}\n\nexport function turnInterruptParams(request: RpcRequest): TurnInterruptParams {\n\tconst params = objectParams(request);\n\treturn {\n\t\tthreadId: requiredStringParam(params.threadId, \"threadId\"),\n\t\tturnId: requiredStringParam(params.turnId, \"turnId\"),\n\t};\n}\n\nexport function createRoutedServerCore(\n\tregistry: MethodRegistry,\n\tnotifications: NotificationRouter,\n\tapprovals: ApprovalBridge,\n\tonThreadSubscribersEmpty?: (threadId: string) => void,\n\toptions: Omit<ServerCoreOptions, \"registry\"> = {},\n\tuserInput?: UserInputBridge,\n): ServerCore {\n\treturn new RoutedServerCore(registry, notifications, approvals, onThreadSubscribersEmpty, options, userInput);\n}\n\nexport function registerLoadedThreadObjectListHandler(registry: MethodRegistry, threads: ThreadRegistry): void {\n\tregistry.register(\"thread/loaded/list\", {\n\t\tscope: \"thread\",\n\t\thandler: (context) => {\n\t\t\tconst params = objectValue(context.request.params);\n\t\t\tconst cursor = decodeCursor(optionalString(params.cursor) ?? null);\n\t\t\tconst limit = optionalNumber(params.limit) ?? Number.POSITIVE_INFINITY;\n\t\t\tconst loaded = threads.listLoaded().map((thread) => thread.id);\n\t\t\tconst data = loaded.slice(cursor, cursor + limit);\n\t\t\tconst nextOffset = cursor + data.length;\n\t\t\treturn {\n\t\t\t\tdata,\n\t\t\t\tnextCursor: nextOffset < loaded.length ? encodeCursor(nextOffset) : null,\n\t\t\t};\n\t\t},\n\t});\n}\n\nclass RoutedServerCore extends ServerCore {\n\tprivate readonly notifications: NotificationRouter;\n\tprivate readonly approvals: ApprovalBridge;\n\tprivate readonly userInput: UserInputBridge | undefined;\n\tprivate readonly onThreadSubscribersEmpty: ((threadId: string) => void) | undefined;\n\n\tconstructor(\n\t\tregistry: MethodRegistry,\n\t\tnotifications: NotificationRouter,\n\t\tapprovals: ApprovalBridge,\n\t\tonThreadSubscribersEmpty?: (threadId: string) => void,\n\t\toptions: Omit<ServerCoreOptions, \"registry\"> = {},\n\t\tuserInput?: UserInputBridge,\n\t) {\n\t\tsuper({ ...options, registry });\n\t\tthis.notifications = notifications;\n\t\tthis.approvals = approvals;\n\t\tthis.userInput = userInput;\n\t\tthis.onThreadSubscribersEmpty = onThreadSubscribersEmpty;\n\t}\n\n\toverride addConnection(input: ConnectionInput): Connection {\n\t\tconst connection = super.addConnection(input);\n\t\tthis.notifications.addConnection({\n\t\t\tid: connection.id,\n\t\t\tget initialized() {\n\t\t\t\treturn connection.initialized;\n\t\t\t},\n\t\t\tget transport() {\n\t\t\t\treturn routerTransport(connection.transportKind);\n\t\t\t},\n\t\t\tget capabilities() {\n\t\t\t\treturn connection.capabilities;\n\t\t\t},\n\t\t\tget optOutNotificationMethods() {\n\t\t\t\treturn [...connection.optOutNotificationMethods];\n\t\t\t},\n\t\t\tsend: (message) => connection.send(message),\n\t\t\tclose: () => {\n\t\t\t\tvoid connection.close(\"slow-client\");\n\t\t\t},\n\t\t});\n\t\treturn connection;\n\t}\n\n\toverride removeConnection(id: ConnectionId): void {\n\t\tconst emptiedThreadIds = this.notifications.removeConnection(id);\n\t\tsuper.removeConnection(id);\n\t\tfor (const threadId of emptiedThreadIds) {\n\t\t\tthis.onThreadSubscribersEmpty?.(threadId);\n\t\t}\n\t}\n\n\toverride async receive(connectionId: ConnectionId, envelope: ClassifiedIncoming): Promise<void> {\n\t\tconst connection = this.getConnection(connectionId);\n\t\tif (connection?.initialized && this.userInput) {\n\t\t\ttry {\n\t\t\t\tif (\n\t\t\t\t\tenvelope.kind === \"notification\" &&\n\t\t\t\t\tenvelope.message.method === ADDITIVE_CLIENT_NOTIFICATION_METHODS[0]\n\t\t\t\t) {\n\t\t\t\t\tthis.userInput.progress(envelope.message.params);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif (envelope.kind === \"response\" && envelope.message.id !== null) {\n\t\t\t\t\tconst response = { ...envelope.message, id: envelope.message.id };\n\t\t\t\t\tif (this.userInput.resolveResponse(response) || this.resolveApproval(response)) return;\n\t\t\t\t\tawait connection.send({\n\t\t\t\t\t\tid: envelope.message.id,\n\t\t\t\t\t\terror: { code: -32600, message: \"Unknown server request id\" },\n\t\t\t\t\t});\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t} catch (error) {\n\t\t\t\tif (!(error instanceof UserInputProtocolError)) throw error;\n\t\t\t\tawait connection.send({\n\t\t\t\t\tid: envelope.kind === \"response\" ? envelope.message.id : null,\n\t\t\t\t\terror: { code: -32602, message: error.message },\n\t\t\t\t});\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tif (!this.userInput && envelope.kind === \"response\" && this.resolveApproval(envelope.message)) return;\n\t\tawait super.receive(connectionId, envelope);\n\t}\n\n\tprivate resolveApproval(response: RpcResponse): boolean {\n\t\tconst id = response.id;\n\t\tif (id === null) {\n\t\t\treturn false;\n\t\t}\n\t\tif (\"result\" in response) {\n\t\t\treturn this.approvals.resolveResponse({ id, result: response.result });\n\t\t}\n\t\treturn this.approvals.resolveResponse({ id, error: response.error });\n\t}\n}\n\nclass ModeTurnStore implements TurnEngineStore<ModeTurnEntry> {\n\tprivate readonly threads: ThreadRegistry;\n\n\tconstructor(threads: ThreadRegistry) {\n\t\tthis.threads = threads;\n\t}\n\n\tgetLoadedThread(threadId: string): ModeTurnEntry {\n\t\treturn new ModeTurnThreadEntry(this.threads.getLoadedThread(threadId));\n\t}\n\n\trunThreadTask<T>(threadId: string, task: () => Promise<T> | T): Promise<T> {\n\t\treturn this.threads.runThreadTask(threadId, task);\n\t}\n}\n\nclass ModeTurnThreadEntry implements TurnEngineThreadEntry {\n\tprivate readonly entry: ThreadEntry;\n\tprivate readonly sessionAdapter: TurnEngineSession;\n\n\tconstructor(entry: ThreadEntry) {\n\t\tthis.entry = entry;\n\t\tthis.sessionAdapter = new ModeTurnSession(entry.session);\n\t}\n\n\tget id(): string {\n\t\treturn this.entry.id;\n\t}\n\n\tget cwd(): string {\n\t\treturn this.entry.cwd;\n\t}\n\n\tget session(): TurnEngineSession {\n\t\treturn this.sessionAdapter;\n\t}\n\n\tget activeTurn() {\n\t\treturn this.entry.activeTurn;\n\t}\n\n\tset activeTurn(value) {\n\t\tthis.entry.activeTurn = value;\n\t}\n\n\tget status() {\n\t\treturn this.entry.status;\n\t}\n\n\tset status(value) {\n\t\tthis.entry.status = value;\n\t}\n\n\tget updatedAt(): string {\n\t\treturn this.entry.updatedAt;\n\t}\n\n\tset updatedAt(value: string) {\n\t\tthis.entry.updatedAt = value;\n\t}\n}\n\nclass ModeTurnSession implements TurnEngineSession {\n\tprivate readonly session: AgentSession;\n\n\tconstructor(session: AgentSession) {\n\t\tthis.session = session;\n\t}\n\n\tprompt(\n\t\ttext: string,\n\t\toptions?: { readonly source?: \"rpc\"; readonly preflightResult?: (success: boolean) => void },\n\t): Promise<void> {\n\t\treturn this.session.prompt(text, options);\n\t}\n\n\tsteer(text: string, options?: { readonly source?: \"rpc\" }): Promise<void> {\n\t\t// App-server steering is client-driven input, exactly like its prompts:\n\t\t// tag it \"rpc\" so extension `input` handlers see the real source.\n\t\treturn this.session.steer(text, undefined, { source: options?.source ?? \"rpc\" });\n\t}\n\n\tabort(): Promise<void> {\n\t\treturn this.session.abort();\n\t}\n\n\tsubscribe(listener: (event: { readonly type: string }) => void): () => void {\n\t\t// Pass the full AgentSessionEvent through: the turn engine projects these\n\t\t// into item/* notifications, so stripping payloads here would silence the\n\t\t// entire assistant/tool item stream.\n\t\treturn this.session.subscribe(listener);\n\t}\n}\n\nfunction objectParams(request: RpcRequest): Readonly<Record<string, unknown>> {\n\tif (typeof request.params === \"object\" && request.params !== null && !Array.isArray(request.params)) {\n\t\treturn Object.fromEntries(Object.entries(request.params));\n\t}\n\tthrow new TurnEngineError({ code: -32602, message: \"Invalid params\" });\n}\n\nfunction requiredStringParam(value: unknown, name: string): string {\n\tif (typeof value !== \"string\" || value.length === 0) {\n\t\tthrow new TurnEngineError({ code: -32602, message: `Invalid params: ${name} is required` });\n\t}\n\treturn value;\n}\n\nfunction optionalNullableStringParam(value: unknown, name: string): string | null | undefined {\n\tif (value === undefined || value === null) return value;\n\tif (typeof value !== \"string\") {\n\t\tthrow new TurnEngineError({ code: -32602, message: `Invalid params: ${name} must be a string` });\n\t}\n\treturn value;\n}\n\nfunction userInputArrayParam(value: unknown): readonly UserInput[] {\n\tif (!Array.isArray(value)) {\n\t\tthrow new TurnEngineError({ code: -32602, message: \"Invalid params: input must be an array\" });\n\t}\n\treturn value.map(userInputParam);\n}\n\nfunction userInputParam(value: unknown): UserInput {\n\tif (typeof value !== \"object\" || value === null || Array.isArray(value)) {\n\t\tthrow new TurnEngineError({ code: -32602, message: \"Invalid params: input item must be an object\" });\n\t}\n\tconst item = Object.fromEntries(Object.entries(value));\n\tconst type = item.type;\n\tswitch (type) {\n\t\tcase \"text\":\n\t\t\treturn {\n\t\t\t\ttype,\n\t\t\t\ttext: requiredStringParam(item.text, \"input.text\"),\n\t\t\t\ttext_elements: Array.isArray(item.text_elements) ? item.text_elements : [],\n\t\t\t};\n\t\tcase \"image\":\n\t\t\treturn { type, url: requiredStringParam(item.url, \"input.url\") };\n\t\tcase \"localImage\":\n\t\t\treturn { type, path: requiredStringParam(item.path, \"input.path\") };\n\t\tcase \"skill\":\n\t\tcase \"mention\":\n\t\t\treturn {\n\t\t\t\ttype,\n\t\t\t\tname: requiredStringParam(item.name, \"input.name\"),\n\t\t\t\tpath: requiredStringParam(item.path, \"input.path\"),\n\t\t\t};\n\t\tdefault:\n\t\t\tthrow new TurnEngineError({ code: -32602, message: \"Invalid params: unsupported input item type\" });\n\t}\n}\n\nfunction routerTransport(transport: TransportKind): ConnectionTransport {\n\tswitch (transport) {\n\t\tcase \"stdio\":\n\t\t\treturn \"stdio\";\n\t\tcase \"websocket\":\n\t\t\treturn \"ws\";\n\t\tcase \"unix\":\n\t\t\treturn \"unix\";\n\t}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,aAAa,EAAE,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE;aAC1E,CAAC;QACH,KAAK,OAAO;YACX,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,mBAAmB,CAAC,IAAI,CAAC,GAAG,EAAE,WAAW,CAAC,EAAE,CAAC;QAClE,KAAK,YAAY;YAChB,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,mBAAmB,CAAC,IAAI,CAAC,IAAI,EAAE,YAAY,CAAC,EAAE,CAAC;QACrE,KAAK,OAAO,CAAC;QACb,KAAK,SAAS;YACb,OAAO;gBACN,IAAI;gBACJ,IAAI,EAAE,mBAAmB,CAAC,IAAI,CAAC,IAAI,EAAE,YAAY,CAAC;gBAClD,IAAI,EAAE,mBAAmB,CAAC,IAAI,CAAC,IAAI,EAAE,YAAY,CAAC;aAClD,CAAC;QACH;YACC,MAAM,IAAI,eAAe,CAAC,EAAE,IAAI,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,6CAA6C,EAAE,CAAC,CAAC;IACtG,CAAC;AACF,CAAC;AAED,SAAS,eAAe,CAAC,SAAwB;IAChD,QAAQ,SAAS,EAAE,CAAC;QACnB,KAAK,OAAO;YACX,OAAO,OAAO,CAAC;QAChB,KAAK,WAAW;YACf,OAAO,IAAI,CAAC;QACb,KAAK,MAAM;YACV,OAAO,MAAM,CAAC;IAChB,CAAC;AACF,CAAC","sourcesContent":["import type { AgentSession } from \"../../core/agent-session.ts\";\nimport type { TurnInterruptParams, TurnStartParams, TurnSteerParams, UserInput } from \"./protocol/index.ts\";\nimport { ADDITIVE_CLIENT_NOTIFICATION_METHODS } from \"./protocol/methods.ts\";\nimport type { ClassifiedIncoming, RpcResponse } from \"./rpc/envelope.ts\";\nimport type { MethodRegistry, RpcRequest } from \"./rpc/registry.ts\";\nimport type { ApprovalBridge } from \"./server/approvals.ts\";\nimport type { Connection, ConnectionId, ConnectionInput, TransportKind } from \"./server/connection.ts\";\nimport type { ConnectionTransport, NotificationRouter } from \"./server/notifications.ts\";\nimport { ServerCore, type ServerCoreOptions } from \"./server/server-core.ts\";\nimport type { UserInputBridge } from \"./server/user-input-bridge.ts\";\nimport { UserInputProtocolError } from \"./server/user-input-types.ts\";\nimport { decodeCursor, encodeCursor, objectValue, optionalNumber, optionalString } from \"./threads/handler-params.ts\";\nimport type { ThreadEntry, ThreadRegistry } from \"./threads/registry.ts\";\nimport { TurnEngineError } from \"./threads/turn-runtime.ts\";\nimport type { TurnEngineSession, TurnEngineStore, TurnEngineThreadEntry } from \"./threads/turns.ts\";\n\ntype ModeTurnEntry = TurnEngineThreadEntry;\n\nexport function createModeTurnStore(threads: ThreadRegistry): TurnEngineStore<ModeTurnEntry> {\n\treturn new ModeTurnStore(threads);\n}\n\nexport function turnStartParams(request: RpcRequest): TurnStartParams {\n\tconst params = objectParams(request);\n\treturn {\n\t\tthreadId: requiredStringParam(params.threadId, \"threadId\"),\n\t\tclientUserMessageId: optionalNullableStringParam(params.clientUserMessageId, \"clientUserMessageId\"),\n\t\tinput: userInputArrayParam(params.input),\n\t};\n}\n\nexport function turnSteerParams(request: RpcRequest): TurnSteerParams {\n\tconst params = objectParams(request);\n\treturn {\n\t\tthreadId: requiredStringParam(params.threadId, \"threadId\"),\n\t\texpectedTurnId: requiredStringParam(params.expectedTurnId, \"expectedTurnId\"),\n\t\tclientUserMessageId: optionalNullableStringParam(params.clientUserMessageId, \"clientUserMessageId\"),\n\t\tinput: userInputArrayParam(params.input),\n\t};\n}\n\nexport function turnInterruptParams(request: RpcRequest): TurnInterruptParams {\n\tconst params = objectParams(request);\n\treturn {\n\t\tthreadId: requiredStringParam(params.threadId, \"threadId\"),\n\t\tturnId: requiredStringParam(params.turnId, \"turnId\"),\n\t};\n}\n\nexport function createRoutedServerCore(\n\tregistry: MethodRegistry,\n\tnotifications: NotificationRouter,\n\tapprovals: ApprovalBridge,\n\tonThreadSubscribersEmpty?: (threadId: string) => void,\n\toptions: Omit<ServerCoreOptions, \"registry\"> = {},\n\tuserInput?: UserInputBridge,\n): ServerCore {\n\treturn new RoutedServerCore(registry, notifications, approvals, onThreadSubscribersEmpty, options, userInput);\n}\n\nexport function registerLoadedThreadObjectListHandler(registry: MethodRegistry, threads: ThreadRegistry): void {\n\tregistry.register(\"thread/loaded/list\", {\n\t\tscope: \"thread\",\n\t\thandler: (context) => {\n\t\t\tconst params = objectValue(context.request.params);\n\t\t\tconst cursor = decodeCursor(optionalString(params.cursor) ?? null);\n\t\t\tconst limit = optionalNumber(params.limit) ?? Number.POSITIVE_INFINITY;\n\t\t\tconst loaded = threads.listLoaded().map((thread) => thread.id);\n\t\t\tconst data = loaded.slice(cursor, cursor + limit);\n\t\t\tconst nextOffset = cursor + data.length;\n\t\t\treturn {\n\t\t\t\tdata,\n\t\t\t\tnextCursor: nextOffset < loaded.length ? encodeCursor(nextOffset) : null,\n\t\t\t};\n\t\t},\n\t});\n}\n\nclass RoutedServerCore extends ServerCore {\n\tprivate readonly notifications: NotificationRouter;\n\tprivate readonly approvals: ApprovalBridge;\n\tprivate readonly userInput: UserInputBridge | undefined;\n\tprivate readonly onThreadSubscribersEmpty: ((threadId: string) => void) | undefined;\n\n\tconstructor(\n\t\tregistry: MethodRegistry,\n\t\tnotifications: NotificationRouter,\n\t\tapprovals: ApprovalBridge,\n\t\tonThreadSubscribersEmpty?: (threadId: string) => void,\n\t\toptions: Omit<ServerCoreOptions, \"registry\"> = {},\n\t\tuserInput?: UserInputBridge,\n\t) {\n\t\tsuper({ ...options, registry });\n\t\tthis.notifications = notifications;\n\t\tthis.approvals = approvals;\n\t\tthis.userInput = userInput;\n\t\tthis.onThreadSubscribersEmpty = onThreadSubscribersEmpty;\n\t}\n\n\toverride addConnection(input: ConnectionInput): Connection {\n\t\tconst connection = super.addConnection(input);\n\t\tthis.notifications.addConnection({\n\t\t\tid: connection.id,\n\t\t\tget initialized() {\n\t\t\t\treturn connection.initialized;\n\t\t\t},\n\t\t\tget transport() {\n\t\t\t\treturn routerTransport(connection.transportKind);\n\t\t\t},\n\t\t\tget capabilities() {\n\t\t\t\treturn connection.capabilities;\n\t\t\t},\n\t\t\tget optOutNotificationMethods() {\n\t\t\t\treturn [...connection.optOutNotificationMethods];\n\t\t\t},\n\t\t\tsend: (message) => connection.send(message),\n\t\t\tclose: () => {\n\t\t\t\tvoid connection.close(\"slow-client\");\n\t\t\t},\n\t\t});\n\t\treturn connection;\n\t}\n\n\toverride removeConnection(id: ConnectionId): void {\n\t\tconst emptiedThreadIds = this.notifications.removeConnection(id);\n\t\tsuper.removeConnection(id);\n\t\tfor (const threadId of emptiedThreadIds) {\n\t\t\tthis.onThreadSubscribersEmpty?.(threadId);\n\t\t}\n\t}\n\n\toverride async receive(connectionId: ConnectionId, envelope: ClassifiedIncoming): Promise<void> {\n\t\tconst connection = this.getConnection(connectionId);\n\t\tif (connection?.initialized && this.userInput) {\n\t\t\ttry {\n\t\t\t\tif (\n\t\t\t\t\tenvelope.kind === \"notification\" &&\n\t\t\t\t\tenvelope.message.method === ADDITIVE_CLIENT_NOTIFICATION_METHODS[0]\n\t\t\t\t) {\n\t\t\t\t\tthis.userInput.progress(envelope.message.params);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif (envelope.kind === \"response\" && envelope.message.id !== null) {\n\t\t\t\t\tconst response = { ...envelope.message, id: envelope.message.id };\n\t\t\t\t\tif (this.userInput.resolveResponse(response) || this.resolveApproval(response)) return;\n\t\t\t\t\tawait connection.send({\n\t\t\t\t\t\tid: envelope.message.id,\n\t\t\t\t\t\terror: { code: -32600, message: \"Unknown server request id\" },\n\t\t\t\t\t});\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t} catch (error) {\n\t\t\t\tif (!(error instanceof UserInputProtocolError)) throw error;\n\t\t\t\tawait connection.send({\n\t\t\t\t\tid: envelope.kind === \"response\" ? envelope.message.id : null,\n\t\t\t\t\terror: { code: -32602, message: error.message },\n\t\t\t\t});\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tif (!this.userInput && envelope.kind === \"response\" && this.resolveApproval(envelope.message)) return;\n\t\tawait super.receive(connectionId, envelope);\n\t}\n\n\tprivate resolveApproval(response: RpcResponse): boolean {\n\t\tconst id = response.id;\n\t\tif (id === null) {\n\t\t\treturn false;\n\t\t}\n\t\tif (\"result\" in response) {\n\t\t\treturn this.approvals.resolveResponse({ id, result: response.result });\n\t\t}\n\t\treturn this.approvals.resolveResponse({ id, error: response.error });\n\t}\n}\n\nclass ModeTurnStore implements TurnEngineStore<ModeTurnEntry> {\n\tprivate readonly threads: ThreadRegistry;\n\n\tconstructor(threads: ThreadRegistry) {\n\t\tthis.threads = threads;\n\t}\n\n\tgetLoadedThread(threadId: string): ModeTurnEntry {\n\t\treturn new ModeTurnThreadEntry(this.threads.getLoadedThread(threadId));\n\t}\n\n\trunThreadTask<T>(threadId: string, task: () => Promise<T> | T): Promise<T> {\n\t\treturn this.threads.runThreadTask(threadId, task);\n\t}\n}\n\nclass ModeTurnThreadEntry implements TurnEngineThreadEntry {\n\tprivate readonly entry: ThreadEntry;\n\tprivate readonly sessionAdapter: TurnEngineSession;\n\n\tconstructor(entry: ThreadEntry) {\n\t\tthis.entry = entry;\n\t\tthis.sessionAdapter = new ModeTurnSession(entry.session);\n\t}\n\n\tget id(): string {\n\t\treturn this.entry.id;\n\t}\n\n\tget cwd(): string {\n\t\treturn this.entry.cwd;\n\t}\n\n\tget session(): TurnEngineSession {\n\t\treturn this.sessionAdapter;\n\t}\n\n\tget activeTurn() {\n\t\treturn this.entry.activeTurn;\n\t}\n\n\tset activeTurn(value) {\n\t\tthis.entry.activeTurn = value;\n\t}\n\n\tget status() {\n\t\treturn this.entry.status;\n\t}\n\n\tset status(value) {\n\t\tthis.entry.status = value;\n\t}\n\n\tget updatedAt(): string {\n\t\treturn this.entry.updatedAt;\n\t}\n\n\tset updatedAt(value: string) {\n\t\tthis.entry.updatedAt = value;\n\t}\n}\n\nclass ModeTurnSession implements TurnEngineSession {\n\tprivate readonly session: AgentSession;\n\n\tconstructor(session: AgentSession) {\n\t\tthis.session = session;\n\t}\n\n\tprompt(\n\t\ttext: string,\n\t\toptions?: { readonly source?: \"rpc\"; readonly preflightResult?: (success: boolean) => void },\n\t): Promise<void> {\n\t\treturn this.session.prompt(text, options);\n\t}\n\n\tsteer(text: string): Promise<void> {\n\t\treturn this.session.steer(text);\n\t}\n\n\tabort(): Promise<void> {\n\t\treturn this.session.abort();\n\t}\n\n\tsubscribe(listener: (event: { readonly type: string }) => void): () => void {\n\t\t// Pass the full AgentSessionEvent through: the turn engine projects these\n\t\t// into item/* notifications, so stripping payloads here would silence the\n\t\t// entire assistant/tool item stream.\n\t\treturn this.session.subscribe(listener);\n\t}\n}\n\nfunction objectParams(request: RpcRequest): Readonly<Record<string, unknown>> {\n\tif (typeof request.params === \"object\" && request.params !== null && !Array.isArray(request.params)) {\n\t\treturn Object.fromEntries(Object.entries(request.params));\n\t}\n\tthrow new TurnEngineError({ code: -32602, message: \"Invalid params\" });\n}\n\nfunction requiredStringParam(value: unknown, name: string): string {\n\tif (typeof value !== \"string\" || value.length === 0) {\n\t\tthrow new TurnEngineError({ code: -32602, message: `Invalid params: ${name} is required` });\n\t}\n\treturn value;\n}\n\nfunction optionalNullableStringParam(value: unknown, name: string): string | null | undefined {\n\tif (value === undefined || value === null) return value;\n\tif (typeof value !== \"string\") {\n\t\tthrow new TurnEngineError({ code: -32602, message: `Invalid params: ${name} must be a string` });\n\t}\n\treturn value;\n}\n\nfunction userInputArrayParam(value: unknown): readonly UserInput[] {\n\tif (!Array.isArray(value)) {\n\t\tthrow new TurnEngineError({ code: -32602, message: \"Invalid params: input must be an array\" });\n\t}\n\treturn value.map(userInputParam);\n}\n\nfunction userInputParam(value: unknown): UserInput {\n\tif (typeof value !== \"object\" || value === null || Array.isArray(value)) {\n\t\tthrow new TurnEngineError({ code: -32602, message: \"Invalid params: input item must be an object\" });\n\t}\n\tconst item = Object.fromEntries(Object.entries(value));\n\tconst type = item.type;\n\tswitch (type) {\n\t\tcase \"text\":\n\t\t\treturn {\n\t\t\t\ttype,\n\t\t\t\ttext: requiredStringParam(item.text, \"input.text\"),\n\t\t\t\ttext_elements: Array.isArray(item.text_elements) ? item.text_elements : [],\n\t\t\t};\n\t\tcase \"image\":\n\t\t\treturn { type, url: requiredStringParam(item.url, \"input.url\") };\n\t\tcase \"localImage\":\n\t\t\treturn { type, path: requiredStringParam(item.path, \"input.path\") };\n\t\tcase \"skill\":\n\t\tcase \"mention\":\n\t\t\treturn {\n\t\t\t\ttype,\n\t\t\t\tname: requiredStringParam(item.name, \"input.name\"),\n\t\t\t\tpath: requiredStringParam(item.path, \"input.path\"),\n\t\t\t};\n\t\tdefault:\n\t\t\tthrow new TurnEngineError({ code: -32602, message: \"Invalid params: unsupported input item type\" });\n\t}\n}\n\nfunction routerTransport(transport: TransportKind): ConnectionTransport {\n\tswitch (transport) {\n\t\tcase \"stdio\":\n\t\t\treturn \"stdio\";\n\t\tcase \"websocket\":\n\t\t\treturn \"ws\";\n\t\tcase \"unix\":\n\t\t\treturn \"unix\";\n\t}\n}\n"]}
@@ -1,44 +1,39 @@
1
1
  /**
2
- * Collapsed widget for a pending async (waitForAnswer=false) question: it
3
- * sits above the editor and shows the unanswered count with the idle
4
- * countdown, the first unanswered question with its options, and every way
5
- * into the full AskUserQuestionComponent. The response-building helpers here
6
- * are pure so interactive-mode can turn ordinary composer text into the
7
- * comment answer.
2
+ * Collapsed one-line widget for a pending async (waitForAnswer=false)
3
+ * question: it sits above the editor, shows the unanswered count and the
4
+ * idle countdown, and names the shortcut that expands the full
5
+ * AskUserQuestionComponent. The response-building helpers here are pure so
6
+ * interactive-mode can turn ordinary composer text into the comment answer.
8
7
  */
9
8
  import { Container, type TUI } from "@earendil-works/pi-tui";
10
9
  import type { QuestionRequest, QuestionResponse } from "../../../core/extensions/types.ts";
11
10
  import { type QuestionDraft } from "./ask-user-question-state.ts";
12
11
  /** Widget slot key used with `setWidget`; one pending async question at a time. */
13
12
  export declare const ASK_USER_WIDGET_KEY = "ask-user";
14
- type Question = QuestionRequest["questions"][number];
13
+ /** Editor shortcut that expands the pending question into the full component. */
14
+ export declare const ASK_USER_ANSWER_KEY = "alt+a";
15
15
  /** Question ids the draft has not answered yet. */
16
16
  export declare function unansweredIds(request: QuestionRequest, draft: QuestionDraft): string[];
17
17
  /** Response for composer text typed while the question is pending: the text is the comment. */
18
18
  export declare function buildCommentResponse(request: QuestionRequest, draft: QuestionDraft, comment: string): QuestionResponse;
19
19
  /** Response for an idle countdown that expired while the widget was collapsed. */
20
20
  export declare function buildTimedOutResponse(request: QuestionRequest, draft: QuestionDraft, autoResolvedAfterMs: number): QuestionResponse;
21
- export declare function renderStatusLine(unanswered: number, countdownLabel: string): string;
22
- export declare function renderQuestionLine(question: Question): string;
23
- export declare function renderOptionsLine(question: Question, remaining: number): string;
24
- /** Hint naming every way into the pending question; the shortcut segment follows the effective binding. */
25
- export declare function renderAnswerHint(): string;
21
+ export declare function renderAsyncQuestionLine(unanswered: number, countdownLabel: string): string;
26
22
  export interface AskUserAsyncWidgetOptions {
27
- request: QuestionRequest;
28
- draft: QuestionDraft;
23
+ unanswered: number;
29
24
  /** Idle countdown shown in the line; 0 disables it. */
30
25
  timeoutMs: number;
31
26
  tui?: TUI;
32
27
  onExpire: () => void;
33
28
  }
34
29
  export declare class AskUserAsyncWidget extends Container {
35
- private readonly request;
36
- private readonly draft;
30
+ private readonly line;
37
31
  private readonly countdown;
32
+ private unanswered;
38
33
  private countdownLabel;
39
34
  constructor(options: AskUserAsyncWidgetOptions);
35
+ setUnanswered(count: number): void;
40
36
  dispose(): void;
41
37
  private update;
42
38
  }
43
- export {};
44
39
  //# sourceMappingURL=ask-user-async-widget.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ask-user-async-widget.d.ts","sourceRoot":"","sources":["../../../../src/modes/interactive/components/ask-user-async-widget.ts"],"names":[],"mappings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;AAED,qBAAa,kBAAmB,SAAQ,SAAS;IAChD,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAkB;IAC1C,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAgB;IACtC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAA6B;IACvD,OAAO,CAAC,cAAc,CAAM;IAE5B,YAAY,OAAO,EAAE,yBAAyB,EAgB7C;IAED,OAAO,IAAI,IAAI,CAGd;IAED,OAAO,CAAC,MAAM;CAWd"}
1
+ {"version":3,"file":"ask-user-async-widget.d.ts","sourceRoot":"","sources":["../../../../src/modes/interactive/components/ask-user-async-widget.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,SAAS,EAAQ,KAAK,GAAG,EAAE,MAAM,wBAAwB,CAAC;AACnE,OAAO,KAAK,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AAE3F,OAAO,EAAwB,KAAK,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAIxF,mFAAmF;AACnF,eAAO,MAAM,mBAAmB,aAAa,CAAC;AAC9C,iFAAiF;AACjF,eAAO,MAAM,mBAAmB,UAAU,CAAC;AAQ3C,mDAAmD;AACnD,wBAAgB,aAAa,CAAC,OAAO,EAAE,eAAe,EAAE,KAAK,EAAE,aAAa,GAAG,MAAM,EAAE,CAEtF;AAED,+FAA+F;AAC/F,wBAAgB,oBAAoB,CACnC,OAAO,EAAE,eAAe,EACxB,KAAK,EAAE,aAAa,EACpB,OAAO,EAAE,MAAM,GACb,gBAAgB,CAOlB;AAED,kFAAkF;AAClF,wBAAgB,qBAAqB,CACpC,OAAO,EAAE,eAAe,EACxB,KAAK,EAAE,aAAa,EACpB,mBAAmB,EAAE,MAAM,GACzB,gBAAgB,CASlB;AAED,wBAAgB,uBAAuB,CAAC,UAAU,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,GAAG,MAAM,CAS1F;AAED,MAAM,WAAW,yBAAyB;IACzC,UAAU,EAAE,MAAM,CAAC;IACnB,uDAAuD;IACvD,SAAS,EAAE,MAAM,CAAC;IAClB,GAAG,CAAC,EAAE,GAAG,CAAC;IACV,QAAQ,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,qBAAa,kBAAmB,SAAQ,SAAS;IAChD,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAsB;IAC3C,OAAO,CAAC,QAAQ,CAAC,SAAS,CAA6B;IACvD,OAAO,CAAC,UAAU,CAAS;IAC3B,OAAO,CAAC,cAAc,CAAM;IAE5B,YAAY,OAAO,EAAE,yBAAyB,EAgB7C;IAED,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAGjC;IAED,OAAO,IAAI,IAAI,CAEd;IAED,OAAO,CAAC,MAAM;CAGd"}
@@ -1,20 +1,19 @@
1
1
  /**
2
- * Collapsed widget for a pending async (waitForAnswer=false) question: it
3
- * sits above the editor and shows the unanswered count with the idle
4
- * countdown, the first unanswered question with its options, and every way
5
- * into the full AskUserQuestionComponent. The response-building helpers here
6
- * are pure so interactive-mode can turn ordinary composer text into the
7
- * comment answer.
2
+ * Collapsed one-line widget for a pending async (waitForAnswer=false)
3
+ * question: it sits above the editor, shows the unanswered count and the
4
+ * idle countdown, and names the shortcut that expands the full
5
+ * AskUserQuestionComponent. The response-building helpers here are pure so
6
+ * interactive-mode can turn ordinary composer text into the comment answer.
8
7
  */
9
- import { Container, Text, TruncatedText } from "@earendil-works/pi-tui";
8
+ import { Container, Text } from "@earendil-works/pi-tui";
10
9
  import { theme } from "../theme/theme.js";
11
- import { ASK_USER_ANSWER_KEYBINDING } from "./ask-user-answer-key.js";
12
10
  import { formatCountdownLabel } from "./ask-user-question-state.js";
13
11
  import { CountdownTimer } from "./countdown-timer.js";
14
- import { keyText } from "./keybinding-hints.js";
12
+ import { rawKeyHint } from "./keybinding-hints.js";
15
13
  /** Widget slot key used with `setWidget`; one pending async question at a time. */
16
14
  export const ASK_USER_WIDGET_KEY = "ask-user";
17
- const INDENT = " ";
15
+ /** Editor shortcut that expands the pending question into the full component. */
16
+ export const ASK_USER_ANSWER_KEY = "alt+a";
18
17
  function hasAnswer(answer) {
19
18
  if (!answer)
20
19
  return false;
@@ -46,39 +45,21 @@ export function buildTimedOutResponse(request, draft, autoResolvedAfterMs) {
46
45
  autoResolvedAfterMs,
47
46
  };
48
47
  }
49
- export function renderStatusLine(unanswered, countdownLabel) {
48
+ export function renderAsyncQuestionLine(unanswered, countdownLabel) {
50
49
  const countdown = countdownLabel === "" ? "" : theme.fg("muted", ` · ${countdownLabel}`);
51
- return (theme.fg("accent", theme.bold("?")) + theme.fg("text", ` Question pending (${unanswered} unanswered)`) + countdown);
52
- }
53
- export function renderQuestionLine(question) {
54
- return (INDENT +
55
- theme.fg("text", theme.bold(question.header)) +
56
- theme.fg("muted", " — ") +
57
- theme.fg("text", question.question));
58
- }
59
- export function renderOptionsLine(question, remaining) {
60
- const parts = question.options.map((option, index) => theme.fg("dim", `${index + 1}`) + theme.fg("muted", ` ${option.label}`));
61
- parts.push(theme.fg("muted", "own answer"));
62
- if (remaining > 0)
63
- parts.push(theme.fg("muted", `+${remaining} more question${remaining === 1 ? "" : "s"}`));
64
- return INDENT + parts.join(theme.fg("muted", " · "));
65
- }
66
- /** Hint naming every way into the pending question; the shortcut segment follows the effective binding. */
67
- export function renderAnswerHint() {
68
- const shortcut = keyText(ASK_USER_ANSWER_KEYBINDING);
69
- const keys = shortcut === "" ? "enter" : `enter or ${shortcut}`;
70
- return [
71
- theme.fg("dim", keys) + theme.fg("muted", " to answer"),
72
- theme.fg("dim", "/answer"),
73
- theme.fg("muted", "or just type your reply"),
74
- ].join(theme.fg("muted", " · "));
50
+ return (theme.fg("accent", theme.bold("?")) +
51
+ theme.fg("text", ` Question pending (${unanswered} unanswered)`) +
52
+ theme.fg("muted", " - ") +
53
+ rawKeyHint(ASK_USER_ANSWER_KEY, "to answer, or just type your reply") +
54
+ countdown);
75
55
  }
76
56
  export class AskUserAsyncWidget extends Container {
77
57
  constructor(options) {
78
58
  super();
59
+ this.line = new Text("", 1, 0);
79
60
  this.countdownLabel = "";
80
- this.request = options.request;
81
- this.draft = options.draft;
61
+ this.unanswered = options.unanswered;
62
+ this.addChild(this.line);
82
63
  if (options.timeoutMs > 0) {
83
64
  this.countdown = new CountdownTimer(options.timeoutMs, options.tui, (seconds) => {
84
65
  this.countdownLabel = formatCountdownLabel(seconds * 1000);
@@ -87,20 +68,15 @@ export class AskUserAsyncWidget extends Container {
87
68
  }
88
69
  this.update();
89
70
  }
71
+ setUnanswered(count) {
72
+ this.unanswered = count;
73
+ this.update();
74
+ }
90
75
  dispose() {
91
76
  this.countdown?.dispose();
92
- super.dispose();
93
77
  }
94
78
  update() {
95
- const pending = unansweredIds(this.request, this.draft);
96
- const shown = this.request.questions.find((question) => question.id === pending[0]);
97
- this.clear();
98
- this.addChild(new Text(renderStatusLine(pending.length, this.countdownLabel), 1, 0));
99
- if (shown) {
100
- this.addChild(new TruncatedText(renderQuestionLine(shown), 1, 0));
101
- this.addChild(new TruncatedText(renderOptionsLine(shown, pending.length - 1), 1, 0));
102
- }
103
- this.addChild(new Text(INDENT + renderAnswerHint(), 1, 0));
79
+ this.line.setText(renderAsyncQuestionLine(this.unanswered, this.countdownLabel));
104
80
  }
105
81
  }
106
82
  //# sourceMappingURL=ask-user-async-widget.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ask-user-async-widget.js","sourceRoot":"","sources":["../../../../src/modes/interactive/components/ask-user-async-widget.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,aAAa,EAAY,MAAM,wBAAwB,CAAC;AAElF,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,0BAA0B,EAAE,MAAM,0BAA0B,CAAC;AACtE,OAAO,EAAE,oBAAoB,EAAsB,MAAM,8BAA8B,CAAC;AACxF,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAA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IAAI,CAAC,MAAM,GAAG,gBAAgB,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IAC5D,CAAC;CACD","sourcesContent":["/**\n * Collapsed widget for a pending async (waitForAnswer=false) question: it\n * sits above the editor and shows the unanswered count with the idle\n * countdown, the first unanswered question with its options, and every way\n * into the full AskUserQuestionComponent. The response-building helpers here\n * are pure so interactive-mode can turn ordinary composer text into the\n * comment answer.\n */\n\nimport { Container, Text, TruncatedText, type TUI } from \"@earendil-works/pi-tui\";\nimport type { QuestionRequest, QuestionResponse } from \"../../../core/extensions/types.ts\";\nimport { theme } from \"../theme/theme.ts\";\nimport { ASK_USER_ANSWER_KEYBINDING } from \"./ask-user-answer-key.ts\";\nimport { formatCountdownLabel, type QuestionDraft } from \"./ask-user-question-state.ts\";\nimport { CountdownTimer } from \"./countdown-timer.ts\";\nimport { keyText } from \"./keybinding-hints.ts\";\n\n/** Widget slot key used with `setWidget`; one pending async question at a time. */\nexport const ASK_USER_WIDGET_KEY = \"ask-user\";\n\ntype Question = QuestionRequest[\"questions\"][number];\n\nconst INDENT = \" \";\n\nfunction hasAnswer(answer: QuestionResponse[\"answers\"][string] | undefined): boolean {\n\tif (!answer) return false;\n\tif (answer.selected.length > 0) return true;\n\treturn (answer.text ?? \"\").trim() !== \"\";\n}\n\n/** Question ids the draft has not answered yet. */\nexport function unansweredIds(request: QuestionRequest, draft: QuestionDraft): string[] {\n\treturn request.questions.filter((question) => !hasAnswer(draft.answers?.[question.id])).map((q) => q.id);\n}\n\n/** Response for composer text typed while the question is pending: the text is the comment. */\nexport function buildCommentResponse(\n\trequest: QuestionRequest,\n\tdraft: QuestionDraft,\n\tcomment: string,\n): QuestionResponse {\n\treturn {\n\t\tstatus: \"comment-submitted\",\n\t\tanswers: draft.answers ?? {},\n\t\tcomment,\n\t\tunanswered: unansweredIds(request, draft),\n\t};\n}\n\n/** Response for an idle countdown that expired while the widget was collapsed. */\nexport function buildTimedOutResponse(\n\trequest: QuestionRequest,\n\tdraft: QuestionDraft,\n\tautoResolvedAfterMs: number,\n): QuestionResponse {\n\tconst comment = draft.comment?.trim();\n\treturn {\n\t\tstatus: \"timed_out\",\n\t\tanswers: draft.answers ?? {},\n\t\t...(comment ? { comment } : {}),\n\t\tunanswered: unansweredIds(request, draft),\n\t\tautoResolvedAfterMs,\n\t};\n}\n\nexport function renderStatusLine(unanswered: number, countdownLabel: string): string {\n\tconst countdown = countdownLabel === \"\" ? \"\" : theme.fg(\"muted\", ` · ${countdownLabel}`);\n\treturn (\n\t\ttheme.fg(\"accent\", theme.bold(\"?\")) + theme.fg(\"text\", ` Question pending (${unanswered} unanswered)`) + countdown\n\t);\n}\n\nexport function renderQuestionLine(question: Question): string {\n\treturn (\n\t\tINDENT +\n\t\ttheme.fg(\"text\", theme.bold(question.header)) +\n\t\ttheme.fg(\"muted\", \" — \") +\n\t\ttheme.fg(\"text\", question.question)\n\t);\n}\n\nexport function renderOptionsLine(question: Question, remaining: number): string {\n\tconst parts = question.options.map(\n\t\t(option, index) => theme.fg(\"dim\", `${index + 1}`) + theme.fg(\"muted\", ` ${option.label}`),\n\t);\n\tparts.push(theme.fg(\"muted\", \"own answer\"));\n\tif (remaining > 0) parts.push(theme.fg(\"muted\", `+${remaining} more question${remaining === 1 ? \"\" : \"s\"}`));\n\treturn INDENT + parts.join(theme.fg(\"muted\", \" · \"));\n}\n\n/** Hint naming every way into the pending question; the shortcut segment follows the effective binding. */\nexport function renderAnswerHint(): string {\n\tconst shortcut = keyText(ASK_USER_ANSWER_KEYBINDING);\n\tconst keys = shortcut === \"\" ? \"enter\" : `enter or ${shortcut}`;\n\treturn [\n\t\ttheme.fg(\"dim\", keys) + theme.fg(\"muted\", \" to answer\"),\n\t\ttheme.fg(\"dim\", \"/answer\"),\n\t\ttheme.fg(\"muted\", \"or just type your reply\"),\n\t].join(theme.fg(\"muted\", \" · \"));\n}\n\nexport interface AskUserAsyncWidgetOptions {\n\trequest: QuestionRequest;\n\tdraft: QuestionDraft;\n\t/** Idle countdown shown in the line; 0 disables it. */\n\ttimeoutMs: number;\n\ttui?: TUI;\n\tonExpire: () => void;\n}\n\nexport class AskUserAsyncWidget extends Container {\n\tprivate readonly request: QuestionRequest;\n\tprivate readonly draft: QuestionDraft;\n\tprivate readonly countdown: CountdownTimer | undefined;\n\tprivate countdownLabel = \"\";\n\n\tconstructor(options: AskUserAsyncWidgetOptions) {\n\t\tsuper();\n\t\tthis.request = options.request;\n\t\tthis.draft = options.draft;\n\t\tif (options.timeoutMs > 0) {\n\t\t\tthis.countdown = new CountdownTimer(\n\t\t\t\toptions.timeoutMs,\n\t\t\t\toptions.tui,\n\t\t\t\t(seconds) => {\n\t\t\t\t\tthis.countdownLabel = formatCountdownLabel(seconds * 1000);\n\t\t\t\t\tthis.update();\n\t\t\t\t},\n\t\t\t\toptions.onExpire,\n\t\t\t);\n\t\t}\n\t\tthis.update();\n\t}\n\n\tdispose(): void {\n\t\tthis.countdown?.dispose();\n\t\tsuper.dispose();\n\t}\n\n\tprivate update(): void {\n\t\tconst pending = unansweredIds(this.request, this.draft);\n\t\tconst shown = this.request.questions.find((question) => question.id === pending[0]);\n\t\tthis.clear();\n\t\tthis.addChild(new Text(renderStatusLine(pending.length, this.countdownLabel), 1, 0));\n\t\tif (shown) {\n\t\t\tthis.addChild(new TruncatedText(renderQuestionLine(shown), 1, 0));\n\t\t\tthis.addChild(new TruncatedText(renderOptionsLine(shown, pending.length - 1), 1, 0));\n\t\t}\n\t\tthis.addChild(new Text(INDENT + renderAnswerHint(), 1, 0));\n\t}\n}\n"]}
1
+ {"version":3,"file":"ask-user-async-widget.js","sourceRoot":"","sources":["../../../../src/modes/interactive/components/ask-user-async-widget.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,SAAS,EAAE,IAAI,EAAY,MAAM,wBAAwB,CAAC;AAEnE,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,oBAAoB,EAA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AAC,GAAG,EACX,CAAC,OAAO,EAAE,EAAE;gBACX,IAAI,CAAC,cAAc,GAAG,oBAAoB,CAAC,OAAO,GAAG,IAAI,CAAC,CAAC;gBAC3D,IAAI,CAAC,MAAM,EAAE,CAAC;YACf,CAAC,EACD,OAAO,CAAC,QAAQ,CAChB,CAAC;QACH,CAAC;QACD,IAAI,CAAC,MAAM,EAAE,CAAC;IACf,CAAC;IAED,aAAa,CAAC,KAAa;QAC1B,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC;QACxB,IAAI,CAAC,MAAM,EAAE,CAAC;IACf,CAAC;IAED,OAAO;QACN,IAAI,CAAC,SAAS,EAAE,OAAO,EAAE,CAAC;IAC3B,CAAC;IAEO,MAAM;QACb,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,uBAAuB,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC;IAClF,CAAC;CACD","sourcesContent":["/**\n * Collapsed one-line widget for a pending async (waitForAnswer=false)\n * question: it sits above the editor, shows the unanswered count and the\n * idle countdown, and names the shortcut that expands the full\n * AskUserQuestionComponent. The response-building helpers here are pure so\n * interactive-mode can turn ordinary composer text into the comment answer.\n */\n\nimport { Container, Text, type TUI } from \"@earendil-works/pi-tui\";\nimport type { QuestionRequest, QuestionResponse } from \"../../../core/extensions/types.ts\";\nimport { theme } from \"../theme/theme.ts\";\nimport { formatCountdownLabel, type QuestionDraft } from \"./ask-user-question-state.ts\";\nimport { CountdownTimer } from \"./countdown-timer.ts\";\nimport { rawKeyHint } from \"./keybinding-hints.ts\";\n\n/** Widget slot key used with `setWidget`; one pending async question at a time. */\nexport const ASK_USER_WIDGET_KEY = \"ask-user\";\n/** Editor shortcut that expands the pending question into the full component. */\nexport const ASK_USER_ANSWER_KEY = \"alt+a\";\n\nfunction hasAnswer(answer: QuestionResponse[\"answers\"][string] | undefined): boolean {\n\tif (!answer) return false;\n\tif (answer.selected.length > 0) return true;\n\treturn (answer.text ?? \"\").trim() !== \"\";\n}\n\n/** Question ids the draft has not answered yet. */\nexport function unansweredIds(request: QuestionRequest, draft: QuestionDraft): string[] {\n\treturn request.questions.filter((question) => !hasAnswer(draft.answers?.[question.id])).map((q) => q.id);\n}\n\n/** Response for composer text typed while the question is pending: the text is the comment. */\nexport function buildCommentResponse(\n\trequest: QuestionRequest,\n\tdraft: QuestionDraft,\n\tcomment: string,\n): QuestionResponse {\n\treturn {\n\t\tstatus: \"comment-submitted\",\n\t\tanswers: draft.answers ?? {},\n\t\tcomment,\n\t\tunanswered: unansweredIds(request, draft),\n\t};\n}\n\n/** Response for an idle countdown that expired while the widget was collapsed. */\nexport function buildTimedOutResponse(\n\trequest: QuestionRequest,\n\tdraft: QuestionDraft,\n\tautoResolvedAfterMs: number,\n): QuestionResponse {\n\tconst comment = draft.comment?.trim();\n\treturn {\n\t\tstatus: \"timed_out\",\n\t\tanswers: draft.answers ?? {},\n\t\t...(comment ? { comment } : {}),\n\t\tunanswered: unansweredIds(request, draft),\n\t\tautoResolvedAfterMs,\n\t};\n}\n\nexport function renderAsyncQuestionLine(unanswered: number, countdownLabel: string): string {\n\tconst countdown = countdownLabel === \"\" ? \"\" : theme.fg(\"muted\", ` · ${countdownLabel}`);\n\treturn (\n\t\ttheme.fg(\"accent\", theme.bold(\"?\")) +\n\t\ttheme.fg(\"text\", ` Question pending (${unanswered} unanswered)`) +\n\t\ttheme.fg(\"muted\", \" - \") +\n\t\trawKeyHint(ASK_USER_ANSWER_KEY, \"to answer, or just type your reply\") +\n\t\tcountdown\n\t);\n}\n\nexport interface AskUserAsyncWidgetOptions {\n\tunanswered: number;\n\t/** Idle countdown shown in the line; 0 disables it. */\n\ttimeoutMs: number;\n\ttui?: TUI;\n\tonExpire: () => void;\n}\n\nexport class AskUserAsyncWidget extends Container {\n\tprivate readonly line = new Text(\"\", 1, 0);\n\tprivate readonly countdown: CountdownTimer | undefined;\n\tprivate unanswered: number;\n\tprivate countdownLabel = \"\";\n\n\tconstructor(options: AskUserAsyncWidgetOptions) {\n\t\tsuper();\n\t\tthis.unanswered = options.unanswered;\n\t\tthis.addChild(this.line);\n\t\tif (options.timeoutMs > 0) {\n\t\t\tthis.countdown = new CountdownTimer(\n\t\t\t\toptions.timeoutMs,\n\t\t\t\toptions.tui,\n\t\t\t\t(seconds) => {\n\t\t\t\t\tthis.countdownLabel = formatCountdownLabel(seconds * 1000);\n\t\t\t\t\tthis.update();\n\t\t\t\t},\n\t\t\t\toptions.onExpire,\n\t\t\t);\n\t\t}\n\t\tthis.update();\n\t}\n\n\tsetUnanswered(count: number): void {\n\t\tthis.unanswered = count;\n\t\tthis.update();\n\t}\n\n\tdispose(): void {\n\t\tthis.countdown?.dispose();\n\t}\n\n\tprivate update(): void {\n\t\tthis.line.setText(renderAsyncQuestionLine(this.unanswered, this.countdownLabel));\n\t}\n}\n"]}
@@ -15,7 +15,6 @@ export declare class AssistantMessageComponent extends Container {
15
15
  private hasToolCalls;
16
16
  private expanded;
17
17
  private isStreaming;
18
- private thinkingVisibilityOverrides;
19
18
  constructor(message?: AssistantMessage, hideThinkingBlock?: boolean, markdownTheme?: MarkdownTheme, hiddenThinkingLabel?: string, outputPad?: number, markdownTransformers?: readonly MarkdownTransformer[]);
20
19
  invalidate(): void;
21
20
  setHideThinkingBlock(hide: boolean): void;
@@ -26,12 +25,6 @@ export declare class AssistantMessageComponent extends Container {
26
25
  updateContent(message: AssistantMessage, isStreaming?: boolean): void;
27
26
  private reconcileRenderDescriptors;
28
27
  private createRenderChild;
29
- /**
30
- * Left-clicking a thinking run toggles that run between its label and its body (upstream
31
- * 71026970a). The mouse handler is attached to the Markdown/Text child itself so the
32
- * incremental reconciler still sees the same child types it updates in place.
33
- */
34
- private withThinkingToggle;
35
28
  private createMessageSignature;
36
29
  private cacheRender;
37
30
  private refreshContent;
@@ -1 +1 @@
1
- {"version":3,"file":"assistant-message.d.ts","sourceRoot":"","sources":["../../../../src/modes/interactive/components/assistant-message.ts"],"names":[],"mappings":"AA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,UAAmB,GAAG,IAAI,CAqB7E;IAED,OAAO,CAAC,0BAA0B;IAqBlC,OAAO,CAAC,iBAAiB;IA0CzB;;;;OAIG;IACH,OAAO,CAAC,kBAAkB;IAa1B,OAAO,CAAC,sBAAsB;IAW9B,OAAO,CAAC,WAAW;IAInB,OAAO,CAAC,cAAc;CAKtB"}
1
+ {"version":3,"file":"assistant-message.d.ts","sourceRoot":"","sources":["../../../../src/modes/interactive/components/assistant-message.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EAAkB,SAAS,EAAY,KAAK,aAAa,EAAgB,MAAM,wBAAwB,CAAC;AAC/G,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AAc7E,qBAAa,yBAA0B,SAAQ,SAAS;IACvD,OAAO,CAAC,WAAW,CAAC,CAAmF;IACvG,OAAO,CAAC,gBAAgB,CAAY;IACpC,OAAO,CAAC,iBAAiB,CAAU;IACnC,OAAO,CAAC,aAAa,CAAgB;IACrC,OAAO,CAAC,mBAAmB,CAAS;IACpC,OAAO,CAAC,SAAS,CAAS;IAC1B,OAAO,CAAC,oBAAoB,CAAiC;IAC7D,OAAO,CAAC,WAAW,CAAC,CAAmB;IACvC,OAAO,CAAC,oBAAoB,CAAC,CAAS;IACtC,OAAO,CAAC,iBAAiB,CAA4C;IACrE,OAAO,CAAC,YAAY,CAAS;IAC7B,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,WAAW,CAAS;IAE5B,YACC,OAAO,CAAC,EAAE,gBAAgB,EAC1B,iBAAiB,UAAQ,EACzB,aAAa,GAAE,aAAkC,EACjD,mBAAmB,SAAgB,EACnC,SAAS,SAAI,EACb,oBAAoB,GAAE,SAAS,mBAAmB,EAAO,EAezD;IAEQ,UAAU,IAAI,IAAI,CAK1B;IAED,oBAAoB,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,CAIxC;IAED,sBAAsB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAI1C;IAED,WAAW,CAAC,QAAQ,EAAE,OAAO,GAAG,IAAI,CAInC;IAED,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAIlC;IAEQ,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,CAgBvC;IAED,aAAa,CAAC,OAAO,EAAE,gBAAgB,EAAE,WAAW,UAAmB,GAAG,IAAI,CAoB7E;IAED,OAAO,CAAC,0BAA0B;IAqBlC,OAAO,CAAC,iBAAiB;IAkCzB,OAAO,CAAC,sBAAsB;IAU9B,OAAO,CAAC,WAAW;IAInB,OAAO,CAAC,cAAc;CAKtB"}
@@ -16,7 +16,6 @@ export class AssistantMessageComponent extends Container {
16
16
  this.hasToolCalls = false;
17
17
  this.expanded = false;
18
18
  this.isStreaming = false;
19
- this.thinkingVisibilityOverrides = new Map();
20
19
  this.hideThinkingBlock = hideThinkingBlock;
21
20
  this.markdownTheme = markdownTheme;
22
21
  this.hiddenThinkingLabel = hiddenThinkingLabel;
@@ -38,7 +37,6 @@ export class AssistantMessageComponent extends Container {
38
37
  if (this.hideThinkingBlock === hide)
39
38
  return;
40
39
  this.hideThinkingBlock = hide;
41
- this.thinkingVisibilityOverrides.clear();
42
40
  this.refreshContent();
43
41
  }
44
42
  setHiddenThinkingLabel(label) {
@@ -91,7 +89,6 @@ export class AssistantMessageComponent extends Container {
91
89
  expanded: this.expanded,
92
90
  hiddenThinkingLabel: this.hiddenThinkingLabel,
93
91
  hideThinkingBlock: this.hideThinkingBlock,
94
- thinkingVisibilityOverrides: this.thinkingVisibilityOverrides,
95
92
  hasToolCalls: this.hasToolCalls,
96
93
  });
97
94
  this.reconcileRenderDescriptors(descriptors);
@@ -129,14 +126,13 @@ export class AssistantMessageComponent extends Container {
129
126
  transform: createMarkdownTransform("assistant", this.isStreaming, this.markdownTransformers),
130
127
  });
131
128
  case "thinking-md":
132
- return this.withThinkingToggle(new Markdown(descriptor.text, this.outputPad, 0, this.markdownTheme, {
129
+ return new Markdown(descriptor.text, this.outputPad, 0, this.markdownTheme, {
133
130
  color: (text) => theme.fg("thinkingText", text),
134
131
  italic: true,
135
132
  }, {
136
133
  transform: createMarkdownTransform("assistant-thinking", this.isStreaming, this.markdownTransformers),
137
- }), descriptor);
134
+ });
138
135
  case "thinking-label":
139
- return this.withThinkingToggle(new Text(descriptor.text, this.outputPad, 0), descriptor);
140
136
  case "error-text":
141
137
  return new Text(descriptor.text, this.outputPad, 0);
142
138
  case "provider-native-summary":
@@ -147,31 +143,11 @@ export class AssistantMessageComponent extends Container {
147
143
  return assertNever(descriptor.kind);
148
144
  }
149
145
  }
150
- /**
151
- * Left-clicking a thinking run toggles that run between its label and its body (upstream
152
- * 71026970a). The mouse handler is attached to the Markdown/Text child itself so the
153
- * incremental reconciler still sees the same child types it updates in place.
154
- */
155
- withThinkingToggle(component, descriptor) {
156
- const runIndex = descriptor.thinkingRun;
157
- if (runIndex === undefined)
158
- return component;
159
- component.handleMouse = (event) => {
160
- if (event.type !== "click" || event.button !== "left")
161
- return undefined;
162
- const hidden = this.thinkingVisibilityOverrides.get(runIndex) ?? this.hideThinkingBlock;
163
- this.thinkingVisibilityOverrides.set(runIndex, !hidden);
164
- this.refreshContent();
165
- return { handled: true };
166
- };
167
- return component;
168
- }
169
146
  createMessageSignature(message) {
170
147
  return createBoundedRenderSignature({
171
148
  content: message.content,
172
149
  hiddenThinkingLabel: this.hiddenThinkingLabel,
173
150
  hideThinkingBlock: this.hideThinkingBlock,
174
- thinkingVisibilityOverrides: [...this.thinkingVisibilityOverrides],
175
151
  errorState: [message.diagnostics, message.errorMessage],
176
152
  stopReason: message.stopReason,
177
153
  });
@@ -1 +1 @@
1
- {"version":3,"file":"assistant-message.js","sourceRoot":"","sources":["../../../../src/modes/interactive/components/assistant-message.ts"],"names":[],"mappings":"AACA,OAAO,EAAkB,SAAS,EAAE,QAAQ,EAAsB,MAAM,EAAE,IAAI,EAAE,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YACtB,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;QAC1B,CAAC,CAAC;QACF,OAAO,SAAS,CAAC;IAClB,CAAC;IAEO,sBAAsB,CAAC,OAAyB;QACvD,OAAO,4BAA4B,CAAC;YACnC,OAAO,EAAE,OAAO,CAAC,OAAO;YACxB,mBAAmB,EAAE,IAAI,CAAC,mBAAmB;YAC7C,iBAAiB,EAAE,IAAI,CAAC,iBAAiB;YACzC,2BAA2B,EAAE,CAAC,GAAG,IAAI,CAAC,2BAA2B,CAAC;YAClE,UAAU,EAAE,CAAC,OAAO,CAAC,WAAW,EAAE,OAAO,CAAC,YAAY,CAAC;YACvD,UAAU,EAAE,OAAO,CAAC,UAAU;SAC9B,CAAC,CAAC;IACJ,CAAC;IAEO,WAAW,CAAC,KAAa,EAAE,SAAiB,EAAE,KAAe;QACpE,IAAI,CAAC,WAAW,GAAG,EAAE,KAAK,EAAE,CAAC,GAAG,KAAK,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;IAC5D,CAAC;IAEO,cAAc;QACrB,IAAI,CAAC,IAAI,CAAC,WAAW;YAAE,OAAO;QAC9B,IAAI,CAAC,oBAAoB,GAAG,SAAS,CAAC;QACtC,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IACtC,CAAC;CACD","sourcesContent":["import type { AssistantMessage } from \"@earendil-works/pi-ai\";\nimport { type Component, Container, Markdown, type MarkdownTheme, Spacer, Text } from \"@earendil-works/pi-tui\";\nimport type { MarkdownTransformer } from \"../../../core/extensions/types.ts\";\nimport { getMarkdownTheme, theme } from \"../theme/theme.ts\";\nimport { type AssistantRenderDescriptor, createAssistantRenderDescriptors } from \"./assistant-render-descriptors.ts\";\nimport { createMarkdownTransform } from \"./markdown-transform.ts\";\nimport { createBoundedRenderSignature } from \"./render-signature.ts\";\n\nconst OSC133_ZONE_START = \"\\x1b]133;A\\x07\";\nconst OSC133_ZONE_END = \"\\x1b]133;B\\x07\";\nconst OSC133_ZONE_FINAL = \"\\x1b]133;C\\x07\";\n\nfunction assertNever(value: never): never {\n\tthrow new TypeError(`Unexpected assistant render variant: ${String(value)}`);\n}\n\nexport class AssistantMessageComponent extends Container {\n\tprivate renderCache?: { readonly lines: string[]; readonly signature: string; readonly width: number };\n\tprivate contentContainer: Container;\n\tprivate hideThinkingBlock: boolean;\n\tprivate markdownTheme: MarkdownTheme;\n\tprivate hiddenThinkingLabel: string;\n\tprivate outputPad: number;\n\tprivate markdownTransformers: readonly MarkdownTransformer[];\n\tprivate lastMessage?: AssistantMessage;\n\tprivate lastMessageSignature?: string;\n\tprivate renderDescriptors: readonly AssistantRenderDescriptor[] = [];\n\tprivate hasToolCalls = false;\n\tprivate expanded = false;\n\tprivate isStreaming = false;\n\tprivate thinkingVisibilityOverrides = new Map<number, boolean>();\n\n\tconstructor(\n\t\tmessage?: AssistantMessage,\n\t\thideThinkingBlock = false,\n\t\tmarkdownTheme: MarkdownTheme = getMarkdownTheme(),\n\t\thiddenThinkingLabel = \"Thinking...\",\n\t\toutputPad = 1,\n\t\tmarkdownTransformers: readonly MarkdownTransformer[] = [],\n\t) {\n\t\tsuper();\n\n\t\tthis.hideThinkingBlock = hideThinkingBlock;\n\t\tthis.markdownTheme = markdownTheme;\n\t\tthis.hiddenThinkingLabel = hiddenThinkingLabel;\n\t\tthis.outputPad = outputPad;\n\t\tthis.markdownTransformers = markdownTransformers;\n\n\t\t// Container for text/thinking content\n\t\tthis.contentContainer = new Container();\n\t\tthis.addChild(this.contentContainer);\n\n\t\tif (message) this.updateContent(message);\n\t}\n\n\toverride invalidate(): void {\n\t\tthis.renderCache = undefined;\n\t\tsuper.invalidate();\n\t\tthis.renderDescriptors = [];\n\t\tthis.refreshContent();\n\t}\n\n\tsetHideThinkingBlock(hide: boolean): void {\n\t\tif (this.hideThinkingBlock === hide) return;\n\t\tthis.hideThinkingBlock = hide;\n\t\tthis.thinkingVisibilityOverrides.clear();\n\t\tthis.refreshContent();\n\t}\n\n\tsetHiddenThinkingLabel(label: string): void {\n\t\tif (this.hiddenThinkingLabel === label) return;\n\t\tthis.hiddenThinkingLabel = label;\n\t\tthis.refreshContent();\n\t}\n\n\tsetExpanded(expanded: boolean): void {\n\t\tif (this.expanded === expanded) return;\n\t\tthis.expanded = expanded;\n\t\tthis.refreshContent();\n\t}\n\n\tsetOutputPad(padding: number): void {\n\t\tthis.outputPad = padding;\n\t\tthis.renderDescriptors = [];\n\t\tthis.refreshContent();\n\t}\n\n\toverride render(width: number): string[] {\n\t\tconst signature = this.lastMessageSignature ?? \"\";\n\t\tif (this.renderCache?.width === width && this.renderCache.signature === signature) {\n\t\t\treturn [...this.renderCache.lines];\n\t\t}\n\n\t\tconst lines = super.render(width);\n\t\tif (this.hasToolCalls || lines.length === 0) {\n\t\t\tthis.cacheRender(width, signature, lines);\n\t\t\treturn lines;\n\t\t}\n\n\t\tlines[0] = OSC133_ZONE_START + lines[0];\n\t\tlines[lines.length - 1] = OSC133_ZONE_END + OSC133_ZONE_FINAL + lines[lines.length - 1];\n\t\tthis.cacheRender(width, signature, lines);\n\t\treturn lines;\n\t}\n\n\tupdateContent(message: AssistantMessage, isStreaming = this.isStreaming): void {\n\t\tconst previousMessage = this.lastMessage;\n\t\tconst streamingChanged = this.isStreaming !== isStreaming;\n\t\tthis.isStreaming = isStreaming;\n\t\tthis.lastMessage = message;\n\t\tconst messageSignature = this.createMessageSignature(message);\n\t\tif (!streamingChanged && previousMessage === message && this.lastMessageSignature === messageSignature) {\n\t\t\treturn;\n\t\t}\n\t\tthis.lastMessageSignature = messageSignature;\n\t\tthis.renderCache = undefined;\n\t\tif (streamingChanged) this.renderDescriptors = [];\n\t\tthis.hasToolCalls = message.content.some((content) => content.type === \"toolCall\");\n\t\tconst descriptors = createAssistantRenderDescriptors(message, {\n\t\t\texpanded: this.expanded,\n\t\t\thiddenThinkingLabel: this.hiddenThinkingLabel,\n\t\t\thideThinkingBlock: this.hideThinkingBlock,\n\t\t\tthinkingVisibilityOverrides: this.thinkingVisibilityOverrides,\n\t\t\thasToolCalls: this.hasToolCalls,\n\t\t});\n\t\tthis.reconcileRenderDescriptors(descriptors);\n\t}\n\n\tprivate reconcileRenderDescriptors(descriptors: readonly AssistantRenderDescriptor[]): void {\n\t\tlet divergentIndex = 0;\n\t\tconst sharedLength = Math.min(this.renderDescriptors.length, descriptors.length);\n\t\twhile (divergentIndex < sharedLength) {\n\t\t\tconst previous = this.renderDescriptors[divergentIndex];\n\t\t\tconst next = descriptors[divergentIndex];\n\t\t\tconst child = this.contentContainer.children[divergentIndex];\n\t\t\tif (!previous || !next || !child || previous.kind !== next.kind) break;\n\t\t\tif (previous.text !== next.text) {\n\t\t\t\tif ((next.kind === \"text-md\" || next.kind === \"thinking-md\") && child instanceof Markdown) {\n\t\t\t\t\tchild.setText(next.text);\n\t\t\t\t} else break;\n\t\t\t}\n\t\t\tdivergentIndex++;\n\t\t}\n\t\tfor (const child of this.contentContainer.children.splice(divergentIndex)) child.dispose?.();\n\t\tfor (const descriptor of descriptors.slice(divergentIndex))\n\t\t\tthis.contentContainer.addChild(this.createRenderChild(descriptor));\n\t\tthis.renderDescriptors = descriptors;\n\t}\n\n\tprivate createRenderChild(descriptor: AssistantRenderDescriptor): Component {\n\t\tswitch (descriptor.kind) {\n\t\t\tcase \"spacer\":\n\t\t\t\treturn new Spacer(1);\n\t\t\tcase \"text-md\":\n\t\t\t\treturn new Markdown(descriptor.text, this.outputPad, 0, this.markdownTheme, undefined, {\n\t\t\t\t\ttransform: createMarkdownTransform(\"assistant\", this.isStreaming, this.markdownTransformers),\n\t\t\t\t});\n\t\t\tcase \"thinking-md\":\n\t\t\t\treturn this.withThinkingToggle(\n\t\t\t\t\tnew Markdown(\n\t\t\t\t\t\tdescriptor.text,\n\t\t\t\t\t\tthis.outputPad,\n\t\t\t\t\t\t0,\n\t\t\t\t\t\tthis.markdownTheme,\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcolor: (text: string) => theme.fg(\"thinkingText\", text),\n\t\t\t\t\t\t\titalic: true,\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttransform: createMarkdownTransform(\n\t\t\t\t\t\t\t\t\"assistant-thinking\",\n\t\t\t\t\t\t\t\tthis.isStreaming,\n\t\t\t\t\t\t\t\tthis.markdownTransformers,\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t},\n\t\t\t\t\t),\n\t\t\t\t\tdescriptor,\n\t\t\t\t);\n\t\t\tcase \"thinking-label\":\n\t\t\t\treturn this.withThinkingToggle(new Text(descriptor.text, this.outputPad, 0), descriptor);\n\t\t\tcase \"error-text\":\n\t\t\t\treturn new Text(descriptor.text, this.outputPad, 0);\n\t\t\tcase \"provider-native-summary\":\n\t\t\t\treturn new Text(descriptor.text, 1, 0);\n\t\t\tcase \"provider-native-body\":\n\t\t\t\treturn new Text(descriptor.text, 3, 0);\n\t\t\tdefault:\n\t\t\t\treturn assertNever(descriptor.kind);\n\t\t}\n\t}\n\n\t/**\n\t * Left-clicking a thinking run toggles that run between its label and its body (upstream\n\t * 71026970a). The mouse handler is attached to the Markdown/Text child itself so the\n\t * incremental reconciler still sees the same child types it updates in place.\n\t */\n\tprivate withThinkingToggle(component: Component, descriptor: AssistantRenderDescriptor): Component {\n\t\tconst runIndex = descriptor.thinkingRun;\n\t\tif (runIndex === undefined) return component;\n\t\tcomponent.handleMouse = (event) => {\n\t\t\tif (event.type !== \"click\" || event.button !== \"left\") return undefined;\n\t\t\tconst hidden = this.thinkingVisibilityOverrides.get(runIndex) ?? this.hideThinkingBlock;\n\t\t\tthis.thinkingVisibilityOverrides.set(runIndex, !hidden);\n\t\t\tthis.refreshContent();\n\t\t\treturn { handled: true };\n\t\t};\n\t\treturn component;\n\t}\n\n\tprivate createMessageSignature(message: AssistantMessage): string {\n\t\treturn createBoundedRenderSignature({\n\t\t\tcontent: message.content,\n\t\t\thiddenThinkingLabel: this.hiddenThinkingLabel,\n\t\t\thideThinkingBlock: this.hideThinkingBlock,\n\t\t\tthinkingVisibilityOverrides: [...this.thinkingVisibilityOverrides],\n\t\t\terrorState: [message.diagnostics, message.errorMessage],\n\t\t\tstopReason: message.stopReason,\n\t\t});\n\t}\n\n\tprivate cacheRender(width: number, signature: string, lines: string[]): void {\n\t\tthis.renderCache = { lines: [...lines], signature, width };\n\t}\n\n\tprivate refreshContent(): void {\n\t\tif (!this.lastMessage) return;\n\t\tthis.lastMessageSignature = undefined;\n\t\tthis.updateContent(this.lastMessage);\n\t}\n}\n"]}
1
+ {"version":3,"file":"assistant-message.js","sourceRoot":"","sources":["../../../../src/modes/interactive/components/assistant-message.ts"],"names":[],"mappings":"AACA,OAAO,EAAkB,SAAS,EAAE,QAAQ,EAAsB,MAAM,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAE/G,OAAO,EAAE,gBAAgB,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAkC,gCAAgC,EAAE,MAAM,mCAAmC,CAAC;AACrH,OAAO,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,EAAE,4BAA4B,EAAE,MAAM,uBAAuB,CAAC;AAErE,MAAM,iBAAiB,GAAG,gBAAgB,CAAC;AAC3C,MAAM,eAAe,GAAG,gBAAgB,CAAC;AACzC,MAAM,iBAAiB,GAAG,gBAAgB,CAAC;AAE3C,SAAS,WAAW,CAAC,KAAY;IAChC,MAAM,IAAI,SAAS,CAAC,wCAAwC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;AAC9E,CAAC;AAED,MAAM,OAAO,yBAA0B,SAAQ,SAAS;IAevD,YACC,OAA0B,EAC1B,iBAAiB,GAAG,KAAK,EACzB,aAAa,GAAkB,gBAAgB,EAAE,EACjD,mBAAmB,GAAG,aAAa,EACnC,SAAS,GAAG,CAAC,EACb,oBAAoB,GAAmC,EAAE;QAEzD,KAAK,EAAE,CAAC;QAbD,sBAAiB,GAAyC,EAAE,CAAC;QAC7D,iB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AG,EAAE,KAAK,EAAE,CAAC,GAAG,KAAK,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;IAC5D,CAAC;IAEO,cAAc;QACrB,IAAI,CAAC,IAAI,CAAC,WAAW;YAAE,OAAO;QAC9B,IAAI,CAAC,oBAAoB,GAAG,SAAS,CAAC;QACtC,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IACtC,CAAC;CACD","sourcesContent":["import type { AssistantMessage } from \"@earendil-works/pi-ai\";\nimport { type Component, Container, Markdown, type MarkdownTheme, Spacer, Text } from \"@earendil-works/pi-tui\";\nimport type { MarkdownTransformer } from \"../../../core/extensions/types.ts\";\nimport { getMarkdownTheme, theme } from \"../theme/theme.ts\";\nimport { type AssistantRenderDescriptor, createAssistantRenderDescriptors } from \"./assistant-render-descriptors.ts\";\nimport { createMarkdownTransform } from \"./markdown-transform.ts\";\nimport { createBoundedRenderSignature } from \"./render-signature.ts\";\n\nconst OSC133_ZONE_START = \"\\x1b]133;A\\x07\";\nconst OSC133_ZONE_END = \"\\x1b]133;B\\x07\";\nconst OSC133_ZONE_FINAL = \"\\x1b]133;C\\x07\";\n\nfunction assertNever(value: never): never {\n\tthrow new TypeError(`Unexpected assistant render variant: ${String(value)}`);\n}\n\nexport class AssistantMessageComponent extends Container {\n\tprivate renderCache?: { readonly lines: string[]; readonly signature: string; readonly width: number };\n\tprivate contentContainer: Container;\n\tprivate hideThinkingBlock: boolean;\n\tprivate markdownTheme: MarkdownTheme;\n\tprivate hiddenThinkingLabel: string;\n\tprivate outputPad: number;\n\tprivate markdownTransformers: readonly MarkdownTransformer[];\n\tprivate lastMessage?: AssistantMessage;\n\tprivate lastMessageSignature?: string;\n\tprivate renderDescriptors: readonly AssistantRenderDescriptor[] = [];\n\tprivate hasToolCalls = false;\n\tprivate expanded = false;\n\tprivate isStreaming = false;\n\n\tconstructor(\n\t\tmessage?: AssistantMessage,\n\t\thideThinkingBlock = false,\n\t\tmarkdownTheme: MarkdownTheme = getMarkdownTheme(),\n\t\thiddenThinkingLabel = \"Thinking...\",\n\t\toutputPad = 1,\n\t\tmarkdownTransformers: readonly MarkdownTransformer[] = [],\n\t) {\n\t\tsuper();\n\n\t\tthis.hideThinkingBlock = hideThinkingBlock;\n\t\tthis.markdownTheme = markdownTheme;\n\t\tthis.hiddenThinkingLabel = hiddenThinkingLabel;\n\t\tthis.outputPad = outputPad;\n\t\tthis.markdownTransformers = markdownTransformers;\n\n\t\t// Container for text/thinking content\n\t\tthis.contentContainer = new Container();\n\t\tthis.addChild(this.contentContainer);\n\n\t\tif (message) this.updateContent(message);\n\t}\n\n\toverride invalidate(): void {\n\t\tthis.renderCache = undefined;\n\t\tsuper.invalidate();\n\t\tthis.renderDescriptors = [];\n\t\tthis.refreshContent();\n\t}\n\n\tsetHideThinkingBlock(hide: boolean): void {\n\t\tif (this.hideThinkingBlock === hide) return;\n\t\tthis.hideThinkingBlock = hide;\n\t\tthis.refreshContent();\n\t}\n\n\tsetHiddenThinkingLabel(label: string): void {\n\t\tif (this.hiddenThinkingLabel === label) return;\n\t\tthis.hiddenThinkingLabel = label;\n\t\tthis.refreshContent();\n\t}\n\n\tsetExpanded(expanded: boolean): void {\n\t\tif (this.expanded === expanded) return;\n\t\tthis.expanded = expanded;\n\t\tthis.refreshContent();\n\t}\n\n\tsetOutputPad(padding: number): void {\n\t\tthis.outputPad = padding;\n\t\tthis.renderDescriptors = [];\n\t\tthis.refreshContent();\n\t}\n\n\toverride render(width: number): string[] {\n\t\tconst signature = this.lastMessageSignature ?? \"\";\n\t\tif (this.renderCache?.width === width && this.renderCache.signature === signature) {\n\t\t\treturn [...this.renderCache.lines];\n\t\t}\n\n\t\tconst lines = super.render(width);\n\t\tif (this.hasToolCalls || lines.length === 0) {\n\t\t\tthis.cacheRender(width, signature, lines);\n\t\t\treturn lines;\n\t\t}\n\n\t\tlines[0] = OSC133_ZONE_START + lines[0];\n\t\tlines[lines.length - 1] = OSC133_ZONE_END + OSC133_ZONE_FINAL + lines[lines.length - 1];\n\t\tthis.cacheRender(width, signature, lines);\n\t\treturn lines;\n\t}\n\n\tupdateContent(message: AssistantMessage, isStreaming = this.isStreaming): void {\n\t\tconst previousMessage = this.lastMessage;\n\t\tconst streamingChanged = this.isStreaming !== isStreaming;\n\t\tthis.isStreaming = isStreaming;\n\t\tthis.lastMessage = message;\n\t\tconst messageSignature = this.createMessageSignature(message);\n\t\tif (!streamingChanged && previousMessage === message && this.lastMessageSignature === messageSignature) {\n\t\t\treturn;\n\t\t}\n\t\tthis.lastMessageSignature = messageSignature;\n\t\tthis.renderCache = undefined;\n\t\tif (streamingChanged) this.renderDescriptors = [];\n\t\tthis.hasToolCalls = message.content.some((content) => content.type === \"toolCall\");\n\t\tconst descriptors = createAssistantRenderDescriptors(message, {\n\t\t\texpanded: this.expanded,\n\t\t\thiddenThinkingLabel: this.hiddenThinkingLabel,\n\t\t\thideThinkingBlock: this.hideThinkingBlock,\n\t\t\thasToolCalls: this.hasToolCalls,\n\t\t});\n\t\tthis.reconcileRenderDescriptors(descriptors);\n\t}\n\n\tprivate reconcileRenderDescriptors(descriptors: readonly AssistantRenderDescriptor[]): void {\n\t\tlet divergentIndex = 0;\n\t\tconst sharedLength = Math.min(this.renderDescriptors.length, descriptors.length);\n\t\twhile (divergentIndex < sharedLength) {\n\t\t\tconst previous = this.renderDescriptors[divergentIndex];\n\t\t\tconst next = descriptors[divergentIndex];\n\t\t\tconst child = this.contentContainer.children[divergentIndex];\n\t\t\tif (!previous || !next || !child || previous.kind !== next.kind) break;\n\t\t\tif (previous.text !== next.text) {\n\t\t\t\tif ((next.kind === \"text-md\" || next.kind === \"thinking-md\") && child instanceof Markdown) {\n\t\t\t\t\tchild.setText(next.text);\n\t\t\t\t} else break;\n\t\t\t}\n\t\t\tdivergentIndex++;\n\t\t}\n\t\tfor (const child of this.contentContainer.children.splice(divergentIndex)) child.dispose?.();\n\t\tfor (const descriptor of descriptors.slice(divergentIndex))\n\t\t\tthis.contentContainer.addChild(this.createRenderChild(descriptor));\n\t\tthis.renderDescriptors = descriptors;\n\t}\n\n\tprivate createRenderChild(descriptor: AssistantRenderDescriptor): Component {\n\t\tswitch (descriptor.kind) {\n\t\t\tcase \"spacer\":\n\t\t\t\treturn new Spacer(1);\n\t\t\tcase \"text-md\":\n\t\t\t\treturn new Markdown(descriptor.text, this.outputPad, 0, this.markdownTheme, undefined, {\n\t\t\t\t\ttransform: createMarkdownTransform(\"assistant\", this.isStreaming, this.markdownTransformers),\n\t\t\t\t});\n\t\t\tcase \"thinking-md\":\n\t\t\t\treturn new Markdown(\n\t\t\t\t\tdescriptor.text,\n\t\t\t\t\tthis.outputPad,\n\t\t\t\t\t0,\n\t\t\t\t\tthis.markdownTheme,\n\t\t\t\t\t{\n\t\t\t\t\t\tcolor: (text: string) => theme.fg(\"thinkingText\", text),\n\t\t\t\t\t\titalic: true,\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\ttransform: createMarkdownTransform(\"assistant-thinking\", this.isStreaming, this.markdownTransformers),\n\t\t\t\t\t},\n\t\t\t\t);\n\t\t\tcase \"thinking-label\":\n\t\t\tcase \"error-text\":\n\t\t\t\treturn new Text(descriptor.text, this.outputPad, 0);\n\t\t\tcase \"provider-native-summary\":\n\t\t\t\treturn new Text(descriptor.text, 1, 0);\n\t\t\tcase \"provider-native-body\":\n\t\t\t\treturn new Text(descriptor.text, 3, 0);\n\t\t\tdefault:\n\t\t\t\treturn assertNever(descriptor.kind);\n\t\t}\n\t}\n\n\tprivate createMessageSignature(message: AssistantMessage): string {\n\t\treturn createBoundedRenderSignature({\n\t\t\tcontent: message.content,\n\t\t\thiddenThinkingLabel: this.hiddenThinkingLabel,\n\t\t\thideThinkingBlock: this.hideThinkingBlock,\n\t\t\terrorState: [message.diagnostics, message.errorMessage],\n\t\t\tstopReason: message.stopReason,\n\t\t});\n\t}\n\n\tprivate cacheRender(width: number, signature: string, lines: string[]): void {\n\t\tthis.renderCache = { lines: [...lines], signature, width };\n\t}\n\n\tprivate refreshContent(): void {\n\t\tif (!this.lastMessage) return;\n\t\tthis.lastMessageSignature = undefined;\n\t\tthis.updateContent(this.lastMessage);\n\t}\n}\n"]}
@@ -5,15 +5,11 @@ type AssistantRenderDescriptorKind = "spacer" | MarkdownDescriptorKind | TextDes
5
5
  export type AssistantRenderDescriptor = {
6
6
  readonly kind: AssistantRenderDescriptorKind;
7
7
  readonly text: string;
8
- /** Index of the thinking run this label/body belongs to; set only for thinking descriptors. */
9
- readonly thinkingRun?: number;
10
8
  };
11
9
  type AssistantRenderDescriptorOptions = {
12
10
  readonly expanded: boolean;
13
11
  readonly hiddenThinkingLabel: string;
14
12
  readonly hideThinkingBlock: boolean;
15
- /** Per-run click overrides of `hideThinkingBlock`, keyed by thinking run index. */
16
- readonly thinkingVisibilityOverrides?: ReadonlyMap<number, boolean>;
17
13
  readonly hasToolCalls: boolean;
18
14
  };
19
15
  export declare function createAssistantRenderDescriptors(message: AssistantMessage, options: AssistantRenderDescriptorOptions): readonly AssistantRenderDescriptor[];
@@ -1 +1 @@
1
- {"version":3,"file":"assistant-render-descriptors.d.ts","sourceRoot":"","sources":["../../../../src/modes/interactive/components/assistant-render-descriptors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,gBAAgB,EAAsC,MAAM,uBAAuB,CAAC;AAKlG,KAAK,sBAAsB,GAAG,SAAS,GAAG,aAAa,CAAC;AACxD,KAAK,kBAAkB,GAAG,gBAAgB,GAAG,yBAAyB,GAAG,sBAAsB,GAAG,YAAY,CAAC;AAC/G,KAAK,6BAA6B,GAAG,QAAQ,GAAG,sBAAsB,GAAG,kBAAkB,CAAC;AAE5F,MAAM,MAAM,yBAAyB,GAAG;IACvC,QAAQ,CAAC,IAAI,EAAE,6BAA6B,CAAC;IAC7C,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,+FAA+F;IAC/F,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;CAC9B,CAAC;AAEF,KAAK,gCAAgC,GAAG;IACvC,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,mBAAmB,EAAE,MAAM,CAAC;IACrC,QAAQ,CAAC,iBAAiB,EAAE,OAAO,CAAC;IACpC,mFAAmF;IACnF,QAAQ,CAAC,2BAA2B,CAAC,EAAE,WAAW,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACpE,QAAQ,CAAC,YAAY,EAAE,OAAO,CAAC;CAC/B,CAAC;AAuBF,wBAAgB,gCAAgC,CAC/C,OAAO,EAAE,gBAAgB,EACzB,OAAO,EAAE,gCAAgC,GACvC,SAAS,yBAAyB,EAAE,CAmHtC"}
1
+ {"version":3,"file":"assistant-render-descriptors.d.ts","sourceRoot":"","sources":["../../../../src/modes/interactive/components/assistant-render-descriptors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,gBAAgB,EAAsC,MAAM,uBAAuB,CAAC;AAKlG,KAAK,sBAAsB,GAAG,SAAS,GAAG,aAAa,CAAC;AACxD,KAAK,kBAAkB,GAAG,gBAAgB,GAAG,yBAAyB,GAAG,sBAAsB,GAAG,YAAY,CAAC;AAC/G,KAAK,6BAA6B,GAAG,QAAQ,GAAG,sBAAsB,GAAG,kBAAkB,CAAC;AAE5F,MAAM,MAAM,yBAAyB,GAAG;IACvC,QAAQ,CAAC,IAAI,EAAE,6BAA6B,CAAC;IAC7C,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,KAAK,gCAAgC,GAAG;IACvC,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,mBAAmB,EAAE,MAAM,CAAC;IACrC,QAAQ,CAAC,iBAAiB,EAAE,OAAO,CAAC;IACpC,QAAQ,CAAC,YAAY,EAAE,OAAO,CAAC;CAC/B,CAAC;AAuBF,wBAAgB,gCAAgC,CAC/C,OAAO,EAAE,gBAAgB,EACzB,OAAO,EAAE,gCAAgC,GACvC,SAAS,yBAAyB,EAAE,CAgHtC"}
@@ -24,7 +24,6 @@ export function createAssistantRenderDescriptors(message, options) {
24
24
  const descriptors = [];
25
25
  if (message.content.some((content) => isVisibleContent(content, true)))
26
26
  descriptors.push(SPACER_DESCRIPTOR);
27
- let thinkingRunIndex = 0;
28
27
  for (let i = 0; i < message.content.length; i++) {
29
28
  const content = message.content[i];
30
29
  switch (content.type) {
@@ -63,23 +62,21 @@ export function createAssistantRenderDescriptors(message, options) {
63
62
  i--;
64
63
  if (thinkingBlocks.length === 0)
65
64
  break;
66
- const thinkingRun = thinkingRunIndex++;
67
- const hidden = options.thinkingVisibilityOverrides?.get(thinkingRun) ?? options.hideThinkingBlock;
68
65
  if (!hasTiming) {
69
- const text = hidden
66
+ const text = options.hideThinkingBlock
70
67
  ? theme.italic(theme.fg("thinkingText", options.hiddenThinkingLabel))
71
68
  : thinkingBlocks.join("\n\n");
72
- descriptors.push({ kind: hidden ? "thinking-label" : "thinking-md", text, thinkingRun });
69
+ descriptors.push({ kind: options.hideThinkingBlock ? "thinking-label" : "thinking-md", text });
73
70
  }
74
71
  else {
75
72
  const label = isDone
76
73
  ? theme.italic(theme.fg("thinkingText", `Thought: ${formatDuration(Math.max(0, maxEnd - minStart))}`))
77
74
  : theme.italic(theme.fg("thinkingText", options.hiddenThinkingLabel));
78
- if (hidden) {
79
- descriptors.push({ kind: "thinking-label", text: label, thinkingRun });
75
+ if (options.hideThinkingBlock) {
76
+ descriptors.push({ kind: "thinking-label", text: label });
80
77
  }
81
78
  else {
82
- descriptors.push({ kind: "thinking-label", text: label, thinkingRun }, { kind: "thinking-md", text: thinkingBlocks.join("\n\n"), thinkingRun });
79
+ descriptors.push({ kind: "thinking-label", text: label }, { kind: "thinking-md", text: thinkingBlocks.join("\n\n") });
83
80
  }
84
81
  }
85
82
  if (message.content.slice(i + 1).some((following) => isVisibleContent(following, false)))