aven-ai 0.0.1

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 (386) hide show
  1. package/README.md +171 -0
  2. package/dist/index.d.ts +3 -0
  3. package/dist/index.d.ts.map +1 -0
  4. package/dist/index.js +4 -0
  5. package/dist/index.js.map +1 -0
  6. package/dist/libs/config/config-store.d.ts +109 -0
  7. package/dist/libs/config/config-store.d.ts.map +1 -0
  8. package/dist/libs/config/config-store.js +169 -0
  9. package/dist/libs/config/config-store.js.map +1 -0
  10. package/dist/libs/config/index.d.ts +2 -0
  11. package/dist/libs/config/index.d.ts.map +1 -0
  12. package/dist/libs/config/index.js +2 -0
  13. package/dist/libs/config/index.js.map +1 -0
  14. package/dist/libs/provider-clients/index.d.ts +2 -0
  15. package/dist/libs/provider-clients/index.d.ts.map +1 -0
  16. package/dist/libs/provider-clients/index.js +2 -0
  17. package/dist/libs/provider-clients/index.js.map +1 -0
  18. package/dist/libs/provider-clients/provider-client.d.ts +34 -0
  19. package/dist/libs/provider-clients/provider-client.d.ts.map +1 -0
  20. package/dist/libs/provider-clients/provider-client.js +167 -0
  21. package/dist/libs/provider-clients/provider-client.js.map +1 -0
  22. package/dist/libs/provider-definitions/index.d.ts +2 -0
  23. package/dist/libs/provider-definitions/index.d.ts.map +1 -0
  24. package/dist/libs/provider-definitions/index.js +2 -0
  25. package/dist/libs/provider-definitions/index.js.map +1 -0
  26. package/dist/libs/provider-definitions/provider-definitions.d.ts +16 -0
  27. package/dist/libs/provider-definitions/provider-definitions.d.ts.map +1 -0
  28. package/dist/libs/provider-definitions/provider-definitions.js +59 -0
  29. package/dist/libs/provider-definitions/provider-definitions.js.map +1 -0
  30. package/dist/libs/pty/index.d.ts +2 -0
  31. package/dist/libs/pty/index.d.ts.map +1 -0
  32. package/dist/libs/pty/index.js +2 -0
  33. package/dist/libs/pty/index.js.map +1 -0
  34. package/dist/libs/pty/pty-runner.d.ts +26 -0
  35. package/dist/libs/pty/pty-runner.d.ts.map +1 -0
  36. package/dist/libs/pty/pty-runner.js +153 -0
  37. package/dist/libs/pty/pty-runner.js.map +1 -0
  38. package/dist/libs/session-storage/index.d.ts +2 -0
  39. package/dist/libs/session-storage/index.d.ts.map +1 -0
  40. package/dist/libs/session-storage/index.js +2 -0
  41. package/dist/libs/session-storage/index.js.map +1 -0
  42. package/dist/libs/session-storage/session-catalog.d.ts +19 -0
  43. package/dist/libs/session-storage/session-catalog.d.ts.map +1 -0
  44. package/dist/libs/session-storage/session-catalog.js +180 -0
  45. package/dist/libs/session-storage/session-catalog.js.map +1 -0
  46. package/dist/libs/terminal/clipboard.d.ts +3 -0
  47. package/dist/libs/terminal/clipboard.d.ts.map +1 -0
  48. package/dist/libs/terminal/clipboard.js +8 -0
  49. package/dist/libs/terminal/clipboard.js.map +1 -0
  50. package/dist/libs/terminal/index.d.ts +6 -0
  51. package/dist/libs/terminal/index.d.ts.map +1 -0
  52. package/dist/libs/terminal/index.js +6 -0
  53. package/dist/libs/terminal/index.js.map +1 -0
  54. package/dist/libs/terminal/keyboard-protocol.d.ts +3 -0
  55. package/dist/libs/terminal/keyboard-protocol.d.ts.map +1 -0
  56. package/dist/libs/terminal/keyboard-protocol.js +7 -0
  57. package/dist/libs/terminal/keyboard-protocol.js.map +1 -0
  58. package/dist/libs/terminal/mouse-protocol.d.ts +22 -0
  59. package/dist/libs/terminal/mouse-protocol.d.ts.map +1 -0
  60. package/dist/libs/terminal/mouse-protocol.js +51 -0
  61. package/dist/libs/terminal/mouse-protocol.js.map +1 -0
  62. package/dist/libs/terminal/terminal-provider.d.ts +15 -0
  63. package/dist/libs/terminal/terminal-provider.d.ts.map +1 -0
  64. package/dist/libs/terminal/terminal-provider.js +47 -0
  65. package/dist/libs/terminal/terminal-provider.js.map +1 -0
  66. package/dist/libs/terminal/theme.d.ts +24 -0
  67. package/dist/libs/terminal/theme.d.ts.map +1 -0
  68. package/dist/libs/terminal/theme.js +23 -0
  69. package/dist/libs/terminal/theme.js.map +1 -0
  70. package/dist/modules/agent/core.d.ts +41 -0
  71. package/dist/modules/agent/core.d.ts.map +1 -0
  72. package/dist/modules/agent/core.js +149 -0
  73. package/dist/modules/agent/core.js.map +1 -0
  74. package/dist/modules/agent/events/memory-message-adapter.d.ts +4 -0
  75. package/dist/modules/agent/events/memory-message-adapter.d.ts.map +1 -0
  76. package/dist/modules/agent/events/memory-message-adapter.js +48 -0
  77. package/dist/modules/agent/events/memory-message-adapter.js.map +1 -0
  78. package/dist/modules/agent/events/stream-event-adapter.d.ts +17 -0
  79. package/dist/modules/agent/events/stream-event-adapter.d.ts.map +1 -0
  80. package/dist/modules/agent/events/stream-event-adapter.js +82 -0
  81. package/dist/modules/agent/events/stream-event-adapter.js.map +1 -0
  82. package/dist/modules/agent/events/tool-message-adapter.d.ts +21 -0
  83. package/dist/modules/agent/events/tool-message-adapter.d.ts.map +1 -0
  84. package/dist/modules/agent/events/tool-message-adapter.js +123 -0
  85. package/dist/modules/agent/events/tool-message-adapter.js.map +1 -0
  86. package/dist/modules/agent/index.d.ts +5 -0
  87. package/dist/modules/agent/index.d.ts.map +1 -0
  88. package/dist/modules/agent/index.js +5 -0
  89. package/dist/modules/agent/index.js.map +1 -0
  90. package/dist/modules/agent/mock.d.ts +10 -0
  91. package/dist/modules/agent/mock.d.ts.map +1 -0
  92. package/dist/modules/agent/mock.js +60 -0
  93. package/dist/modules/agent/mock.js.map +1 -0
  94. package/dist/modules/agent/prompts/commands.d.ts +2 -0
  95. package/dist/modules/agent/prompts/commands.d.ts.map +1 -0
  96. package/dist/modules/agent/prompts/commands.js +5 -0
  97. package/dist/modules/agent/prompts/commands.js.map +1 -0
  98. package/dist/modules/agent/prompts/file-tools.d.ts +2 -0
  99. package/dist/modules/agent/prompts/file-tools.d.ts.map +1 -0
  100. package/dist/modules/agent/prompts/file-tools.js +7 -0
  101. package/dist/modules/agent/prompts/file-tools.js.map +1 -0
  102. package/dist/modules/agent/prompts/identity.d.ts +2 -0
  103. package/dist/modules/agent/prompts/identity.d.ts.map +1 -0
  104. package/dist/modules/agent/prompts/identity.js +5 -0
  105. package/dist/modules/agent/prompts/identity.js.map +1 -0
  106. package/dist/modules/agent/prompts/system.d.ts +2 -0
  107. package/dist/modules/agent/prompts/system.d.ts.map +1 -0
  108. package/dist/modules/agent/prompts/system.js +5 -0
  109. package/dist/modules/agent/prompts/system.js.map +1 -0
  110. package/dist/modules/agent/services/direct-command-executor.d.ts +10 -0
  111. package/dist/modules/agent/services/direct-command-executor.d.ts.map +1 -0
  112. package/dist/modules/agent/services/direct-command-executor.js +58 -0
  113. package/dist/modules/agent/services/direct-command-executor.js.map +1 -0
  114. package/dist/modules/agent/services/prompt-turn-executor.d.ts +12 -0
  115. package/dist/modules/agent/services/prompt-turn-executor.d.ts.map +1 -0
  116. package/dist/modules/agent/services/prompt-turn-executor.js +79 -0
  117. package/dist/modules/agent/services/prompt-turn-executor.js.map +1 -0
  118. package/dist/modules/agent/tools/exec-command.d.ts +13 -0
  119. package/dist/modules/agent/tools/exec-command.d.ts.map +1 -0
  120. package/dist/modules/agent/tools/exec-command.js +11 -0
  121. package/dist/modules/agent/tools/exec-command.js.map +1 -0
  122. package/dist/modules/agent/tools/files/contracts.d.ts +132 -0
  123. package/dist/modules/agent/tools/files/contracts.d.ts.map +1 -0
  124. package/dist/modules/agent/tools/files/contracts.js +84 -0
  125. package/dist/modules/agent/tools/files/contracts.js.map +1 -0
  126. package/dist/modules/agent/tools/files/create-file-tools.d.ts +61 -0
  127. package/dist/modules/agent/tools/files/create-file-tools.d.ts.map +1 -0
  128. package/dist/modules/agent/tools/files/create-file-tools.js +26 -0
  129. package/dist/modules/agent/tools/files/create-file-tools.js.map +1 -0
  130. package/dist/modules/agent/tools/files/edit-file-operation.d.ts +4 -0
  131. package/dist/modules/agent/tools/files/edit-file-operation.d.ts.map +1 -0
  132. package/dist/modules/agent/tools/files/edit-file-operation.js +98 -0
  133. package/dist/modules/agent/tools/files/edit-file-operation.js.map +1 -0
  134. package/dist/modules/agent/tools/files/file-path-safety.d.ts +2 -0
  135. package/dist/modules/agent/tools/files/file-path-safety.d.ts.map +1 -0
  136. package/dist/modules/agent/tools/files/file-path-safety.js +10 -0
  137. package/dist/modules/agent/tools/files/file-path-safety.js.map +1 -0
  138. package/dist/modules/agent/tools/files/file-state-cache.d.ts +21 -0
  139. package/dist/modules/agent/tools/files/file-state-cache.d.ts.map +1 -0
  140. package/dist/modules/agent/tools/files/file-state-cache.js +54 -0
  141. package/dist/modules/agent/tools/files/file-state-cache.js.map +1 -0
  142. package/dist/modules/agent/tools/files/file-tool-error.d.ts +3 -0
  143. package/dist/modules/agent/tools/files/file-tool-error.d.ts.map +1 -0
  144. package/dist/modules/agent/tools/files/file-tool-error.js +3 -0
  145. package/dist/modules/agent/tools/files/file-tool-error.js.map +1 -0
  146. package/dist/modules/agent/tools/files/file-tool-operations.d.ts +22 -0
  147. package/dist/modules/agent/tools/files/file-tool-operations.d.ts.map +1 -0
  148. package/dist/modules/agent/tools/files/file-tool-operations.js +73 -0
  149. package/dist/modules/agent/tools/files/file-tool-operations.js.map +1 -0
  150. package/dist/modules/agent/tools/files/file-tool-service.d.ts +14 -0
  151. package/dist/modules/agent/tools/files/file-tool-service.d.ts.map +1 -0
  152. package/dist/modules/agent/tools/files/file-tool-service.js +28 -0
  153. package/dist/modules/agent/tools/files/file-tool-service.js.map +1 -0
  154. package/dist/modules/agent/tools/files/mutation-journal.d.ts +12 -0
  155. package/dist/modules/agent/tools/files/mutation-journal.d.ts.map +1 -0
  156. package/dist/modules/agent/tools/files/mutation-journal.js +25 -0
  157. package/dist/modules/agent/tools/files/mutation-journal.js.map +1 -0
  158. package/dist/modules/agent/tools/files/read-file-operation.d.ts +4 -0
  159. package/dist/modules/agent/tools/files/read-file-operation.d.ts.map +1 -0
  160. package/dist/modules/agent/tools/files/read-file-operation.js +92 -0
  161. package/dist/modules/agent/tools/files/read-file-operation.js.map +1 -0
  162. package/dist/modules/agent/tools/files/text-file-codec.d.ts +13 -0
  163. package/dist/modules/agent/tools/files/text-file-codec.d.ts.map +1 -0
  164. package/dist/modules/agent/tools/files/text-file-codec.js +45 -0
  165. package/dist/modules/agent/tools/files/text-file-codec.js.map +1 -0
  166. package/dist/modules/agent/tools/files/write-file-operation.d.ts +4 -0
  167. package/dist/modules/agent/tools/files/write-file-operation.d.ts.map +1 -0
  168. package/dist/modules/agent/tools/files/write-file-operation.js +61 -0
  169. package/dist/modules/agent/tools/files/write-file-operation.js.map +1 -0
  170. package/dist/modules/agent/types.d.ts +65 -0
  171. package/dist/modules/agent/types.d.ts.map +1 -0
  172. package/dist/modules/agent/types.js +21 -0
  173. package/dist/modules/agent/types.js.map +1 -0
  174. package/dist/modules/app/cli.d.ts +2 -0
  175. package/dist/modules/app/cli.d.ts.map +1 -0
  176. package/dist/modules/app/cli.js +23 -0
  177. package/dist/modules/app/cli.js.map +1 -0
  178. package/dist/modules/app/components/app-provider.d.ts +11 -0
  179. package/dist/modules/app/components/app-provider.d.ts.map +1 -0
  180. package/dist/modules/app/components/app-provider.js +18 -0
  181. package/dist/modules/app/components/app-provider.js.map +1 -0
  182. package/dist/modules/app/components/app.d.ts +7 -0
  183. package/dist/modules/app/components/app.d.ts.map +1 -0
  184. package/dist/modules/app/components/app.js +45 -0
  185. package/dist/modules/app/components/app.js.map +1 -0
  186. package/dist/modules/app/index.d.ts +6 -0
  187. package/dist/modules/app/index.d.ts.map +1 -0
  188. package/dist/modules/app/index.js +5 -0
  189. package/dist/modules/app/index.js.map +1 -0
  190. package/dist/modules/app/input/prompt-history.d.ts +3 -0
  191. package/dist/modules/app/input/prompt-history.d.ts.map +1 -0
  192. package/dist/modules/app/input/prompt-history.js +13 -0
  193. package/dist/modules/app/input/prompt-history.js.map +1 -0
  194. package/dist/modules/app/input/use-overlay-controller.d.ts +14 -0
  195. package/dist/modules/app/input/use-overlay-controller.d.ts.map +1 -0
  196. package/dist/modules/app/input/use-overlay-controller.js +168 -0
  197. package/dist/modules/app/input/use-overlay-controller.js.map +1 -0
  198. package/dist/modules/app/services/quit-controller.d.ts +2 -0
  199. package/dist/modules/app/services/quit-controller.d.ts.map +1 -0
  200. package/dist/modules/app/services/quit-controller.js +27 -0
  201. package/dist/modules/app/services/quit-controller.js.map +1 -0
  202. package/dist/modules/app/services/runtime-event-batcher.d.ts +13 -0
  203. package/dist/modules/app/services/runtime-event-batcher.d.ts.map +1 -0
  204. package/dist/modules/app/services/runtime-event-batcher.js +41 -0
  205. package/dist/modules/app/services/runtime-event-batcher.js.map +1 -0
  206. package/dist/modules/app/services/use-app-input.d.ts +14 -0
  207. package/dist/modules/app/services/use-app-input.d.ts.map +1 -0
  208. package/dist/modules/app/services/use-app-input.js +144 -0
  209. package/dist/modules/app/services/use-app-input.js.map +1 -0
  210. package/dist/modules/app/services/use-runtime-connection.d.ts +15 -0
  211. package/dist/modules/app/services/use-runtime-connection.d.ts.map +1 -0
  212. package/dist/modules/app/services/use-runtime-connection.js +128 -0
  213. package/dist/modules/app/services/use-runtime-connection.js.map +1 -0
  214. package/dist/modules/app/services/use-runtime-session.d.ts +8 -0
  215. package/dist/modules/app/services/use-runtime-session.d.ts.map +1 -0
  216. package/dist/modules/app/services/use-runtime-session.js +79 -0
  217. package/dist/modules/app/services/use-runtime-session.js.map +1 -0
  218. package/dist/modules/app/services/use-runtime-workspace.d.ts +16 -0
  219. package/dist/modules/app/services/use-runtime-workspace.d.ts.map +1 -0
  220. package/dist/modules/app/services/use-runtime-workspace.js +134 -0
  221. package/dist/modules/app/services/use-runtime-workspace.js.map +1 -0
  222. package/dist/modules/app/store/app-state.d.ts +39 -0
  223. package/dist/modules/app/store/app-state.d.ts.map +1 -0
  224. package/dist/modules/app/store/app-state.js +2 -0
  225. package/dist/modules/app/store/app-state.js.map +1 -0
  226. package/dist/modules/app/store/apply-runtime-event.d.ts +4 -0
  227. package/dist/modules/app/store/apply-runtime-event.d.ts.map +1 -0
  228. package/dist/modules/app/store/apply-runtime-event.js +72 -0
  229. package/dist/modules/app/store/apply-runtime-event.js.map +1 -0
  230. package/dist/modules/app/store/create-app-store.d.ts +5 -0
  231. package/dist/modules/app/store/create-app-store.d.ts.map +1 -0
  232. package/dist/modules/app/store/create-app-store.js +49 -0
  233. package/dist/modules/app/store/create-app-store.js.map +1 -0
  234. package/dist/modules/app/store/selectors.d.ts +20 -0
  235. package/dist/modules/app/store/selectors.d.ts.map +1 -0
  236. package/dist/modules/app/store/selectors.js +19 -0
  237. package/dist/modules/app/store/selectors.js.map +1 -0
  238. package/dist/modules/commands/index.d.ts +2 -0
  239. package/dist/modules/commands/index.d.ts.map +1 -0
  240. package/dist/modules/commands/index.js +2 -0
  241. package/dist/modules/commands/index.js.map +1 -0
  242. package/dist/modules/commands/registry.d.ts +11 -0
  243. package/dist/modules/commands/registry.d.ts.map +1 -0
  244. package/dist/modules/commands/registry.js +16 -0
  245. package/dist/modules/commands/registry.js.map +1 -0
  246. package/dist/modules/composer/components/composer.d.ts +17 -0
  247. package/dist/modules/composer/components/composer.d.ts.map +1 -0
  248. package/dist/modules/composer/components/composer.js +35 -0
  249. package/dist/modules/composer/components/composer.js.map +1 -0
  250. package/dist/modules/composer/index.d.ts +6 -0
  251. package/dist/modules/composer/index.d.ts.map +1 -0
  252. package/dist/modules/composer/index.js +5 -0
  253. package/dist/modules/composer/index.js.map +1 -0
  254. package/dist/modules/composer/services/editor.d.ts +9 -0
  255. package/dist/modules/composer/services/editor.d.ts.map +1 -0
  256. package/dist/modules/composer/services/editor.js +39 -0
  257. package/dist/modules/composer/services/editor.js.map +1 -0
  258. package/dist/modules/composer/services/input-intent.d.ts +40 -0
  259. package/dist/modules/composer/services/input-intent.d.ts.map +1 -0
  260. package/dist/modules/composer/services/input-intent.js +58 -0
  261. package/dist/modules/composer/services/input-intent.js.map +1 -0
  262. package/dist/modules/composer/services/suggestions.d.ts +9 -0
  263. package/dist/modules/composer/services/suggestions.d.ts.map +1 -0
  264. package/dist/modules/composer/services/suggestions.js +18 -0
  265. package/dist/modules/composer/services/suggestions.js.map +1 -0
  266. package/dist/modules/composer/types.d.ts +9 -0
  267. package/dist/modules/composer/types.d.ts.map +1 -0
  268. package/dist/modules/composer/types.js +2 -0
  269. package/dist/modules/composer/types.js.map +1 -0
  270. package/dist/modules/conversation/components/transcript-row.d.ts +9 -0
  271. package/dist/modules/conversation/components/transcript-row.d.ts.map +1 -0
  272. package/dist/modules/conversation/components/transcript-row.js +13 -0
  273. package/dist/modules/conversation/components/transcript-row.js.map +1 -0
  274. package/dist/modules/conversation/components/virtual-transcript.d.ts +9 -0
  275. package/dist/modules/conversation/components/virtual-transcript.d.ts.map +1 -0
  276. package/dist/modules/conversation/components/virtual-transcript.js +24 -0
  277. package/dist/modules/conversation/components/virtual-transcript.js.map +1 -0
  278. package/dist/modules/conversation/fixtures.d.ts +3 -0
  279. package/dist/modules/conversation/fixtures.d.ts.map +1 -0
  280. package/dist/modules/conversation/fixtures.js +22 -0
  281. package/dist/modules/conversation/fixtures.js.map +1 -0
  282. package/dist/modules/conversation/index.d.ts +5 -0
  283. package/dist/modules/conversation/index.d.ts.map +1 -0
  284. package/dist/modules/conversation/index.js +4 -0
  285. package/dist/modules/conversation/index.js.map +1 -0
  286. package/dist/modules/conversation/services/input-intent.d.ts +18 -0
  287. package/dist/modules/conversation/services/input-intent.d.ts.map +1 -0
  288. package/dist/modules/conversation/services/input-intent.js +18 -0
  289. package/dist/modules/conversation/services/input-intent.js.map +1 -0
  290. package/dist/modules/conversation/services/markdown-rows.d.ts +5 -0
  291. package/dist/modules/conversation/services/markdown-rows.d.ts.map +1 -0
  292. package/dist/modules/conversation/services/markdown-rows.js +96 -0
  293. package/dist/modules/conversation/services/markdown-rows.js.map +1 -0
  294. package/dist/modules/conversation/services/message-rows.d.ts +8 -0
  295. package/dist/modules/conversation/services/message-rows.d.ts.map +1 -0
  296. package/dist/modules/conversation/services/message-rows.js +141 -0
  297. package/dist/modules/conversation/services/message-rows.js.map +1 -0
  298. package/dist/modules/conversation/services/row-model.d.ts +5 -0
  299. package/dist/modules/conversation/services/row-model.d.ts.map +1 -0
  300. package/dist/modules/conversation/services/row-model.js +11 -0
  301. package/dist/modules/conversation/services/row-model.js.map +1 -0
  302. package/dist/modules/conversation/services/selection.d.ts +10 -0
  303. package/dist/modules/conversation/services/selection.d.ts.map +1 -0
  304. package/dist/modules/conversation/services/selection.js +92 -0
  305. package/dist/modules/conversation/services/selection.js.map +1 -0
  306. package/dist/modules/conversation/services/terminal-cells.d.ts +9 -0
  307. package/dist/modules/conversation/services/terminal-cells.d.ts.map +1 -0
  308. package/dist/modules/conversation/services/terminal-cells.js +24 -0
  309. package/dist/modules/conversation/services/terminal-cells.js.map +1 -0
  310. package/dist/modules/conversation/services/transcript-row-cache.d.ts +10 -0
  311. package/dist/modules/conversation/services/transcript-row-cache.d.ts.map +1 -0
  312. package/dist/modules/conversation/services/transcript-row-cache.js +40 -0
  313. package/dist/modules/conversation/services/transcript-row-cache.js.map +1 -0
  314. package/dist/modules/conversation/services/use-transcript-controller.d.ts +17 -0
  315. package/dist/modules/conversation/services/use-transcript-controller.d.ts.map +1 -0
  316. package/dist/modules/conversation/services/use-transcript-controller.js +157 -0
  317. package/dist/modules/conversation/services/use-transcript-controller.js.map +1 -0
  318. package/dist/modules/conversation/services/wrapping.d.ts +3 -0
  319. package/dist/modules/conversation/services/wrapping.d.ts.map +1 -0
  320. package/dist/modules/conversation/services/wrapping.js +46 -0
  321. package/dist/modules/conversation/services/wrapping.js.map +1 -0
  322. package/dist/modules/conversation/types.d.ts +77 -0
  323. package/dist/modules/conversation/types.d.ts.map +1 -0
  324. package/dist/modules/conversation/types.js +2 -0
  325. package/dist/modules/conversation/types.js.map +1 -0
  326. package/dist/modules/overlays/components/overlay.d.ts +10 -0
  327. package/dist/modules/overlays/components/overlay.d.ts.map +1 -0
  328. package/dist/modules/overlays/components/overlay.js +17 -0
  329. package/dist/modules/overlays/components/overlay.js.map +1 -0
  330. package/dist/modules/overlays/index.d.ts +6 -0
  331. package/dist/modules/overlays/index.d.ts.map +1 -0
  332. package/dist/modules/overlays/index.js +5 -0
  333. package/dist/modules/overlays/index.js.map +1 -0
  334. package/dist/modules/overlays/services/overlay-items.d.ts +20 -0
  335. package/dist/modules/overlays/services/overlay-items.d.ts.map +1 -0
  336. package/dist/modules/overlays/services/overlay-items.js +56 -0
  337. package/dist/modules/overlays/services/overlay-items.js.map +1 -0
  338. package/dist/modules/overlays/services/overlay-registry.d.ts +4 -0
  339. package/dist/modules/overlays/services/overlay-registry.d.ts.map +1 -0
  340. package/dist/modules/overlays/services/overlay-registry.js +42 -0
  341. package/dist/modules/overlays/services/overlay-registry.js.map +1 -0
  342. package/dist/modules/overlays/services/overlay-selection.d.ts +23 -0
  343. package/dist/modules/overlays/services/overlay-selection.d.ts.map +1 -0
  344. package/dist/modules/overlays/services/overlay-selection.js +23 -0
  345. package/dist/modules/overlays/services/overlay-selection.js.map +1 -0
  346. package/dist/modules/overlays/types.d.ts +15 -0
  347. package/dist/modules/overlays/types.d.ts.map +1 -0
  348. package/dist/modules/overlays/types.js +2 -0
  349. package/dist/modules/overlays/types.js.map +1 -0
  350. package/dist/modules/providers/catalog.d.ts +2 -0
  351. package/dist/modules/providers/catalog.d.ts.map +1 -0
  352. package/dist/modules/providers/catalog.js +2 -0
  353. package/dist/modules/providers/catalog.js.map +1 -0
  354. package/dist/modules/providers/index.d.ts +5 -0
  355. package/dist/modules/providers/index.d.ts.map +1 -0
  356. package/dist/modules/providers/index.js +3 -0
  357. package/dist/modules/providers/index.js.map +1 -0
  358. package/dist/modules/providers/services/provider-connection-manager.d.ts +22 -0
  359. package/dist/modules/providers/services/provider-connection-manager.d.ts.map +1 -0
  360. package/dist/modules/providers/services/provider-connection-manager.js +147 -0
  361. package/dist/modules/providers/services/provider-connection-manager.js.map +1 -0
  362. package/dist/modules/providers/types.d.ts +20 -0
  363. package/dist/modules/providers/types.d.ts.map +1 -0
  364. package/dist/modules/providers/types.js +2 -0
  365. package/dist/modules/providers/types.js.map +1 -0
  366. package/dist/modules/sessions/index.d.ts +3 -0
  367. package/dist/modules/sessions/index.d.ts.map +1 -0
  368. package/dist/modules/sessions/index.js +3 -0
  369. package/dist/modules/sessions/index.js.map +1 -0
  370. package/dist/modules/sessions/services/project-session-manager.d.ts +28 -0
  371. package/dist/modules/sessions/services/project-session-manager.d.ts.map +1 -0
  372. package/dist/modules/sessions/services/project-session-manager.js +90 -0
  373. package/dist/modules/sessions/services/project-session-manager.js.map +1 -0
  374. package/dist/modules/sessions/types.d.ts +13 -0
  375. package/dist/modules/sessions/types.d.ts.map +1 -0
  376. package/dist/modules/sessions/types.js +12 -0
  377. package/dist/modules/sessions/types.js.map +1 -0
  378. package/dist/utils/safe-error.d.ts +2 -0
  379. package/dist/utils/safe-error.d.ts.map +1 -0
  380. package/dist/utils/safe-error.js +10 -0
  381. package/dist/utils/safe-error.js.map +1 -0
  382. package/dist/utils/text.d.ts +2 -0
  383. package/dist/utils/text.d.ts.map +1 -0
  384. package/dist/utils/text.js +5 -0
  385. package/dist/utils/text.js.map +1 -0
  386. package/package.json +72 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"text-file-codec.js","sourceRoot":"","sources":["../../../../../src/modules/agent/tools/files/text-file-codec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,uBAAuB,EAAC,MAAM,sBAAsB,CAAC;AAY7D,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,OAAe,EAAU,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;AAE/F,MAAM,YAAY,GAAG,CAAC,OAAe,EAAc,EAAE;IACpD,IAAI,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC;QAAE,OAAO,MAAM,CAAC;IAC5C,IAAI,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC;QAAE,OAAO,IAAI,CAAC;IACxC,OAAO,IAAI,CAAC;AACb,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,UAAU,GAAG,CAA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BAAyB,QAAQ,KAAK,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,UAAU,QAAQ,CAAC,CAAC;IAChH,CAAC;IACD,OAAO,EAAC,OAAO,EAAE,QAAQ,EAAE,GAAG,EAAE,UAAU,EAAE,YAAY,CAAC,OAAO,CAAC,EAAC,CAAC;AACpE,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,OAAe,EAAE,QAAsB,EAAE,GAAY,EAAU,EAAE;IAC3F,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;IAC5C,IAAI,CAAC,GAAG;QAAE,OAAO,IAAI,CAAC;IACtB,MAAM,MAAM,GAAG,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC;IACpG,OAAO,MAAM,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC;AACtC,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,OAAe,EAAE,UAAsB,EAAU,EAAE,CACjF,UAAU,KAAK,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { WriteInput, WriteResult } from './contracts.js';
2
+ import { type FileToolContext } from './file-tool-operations.js';
3
+ export declare const writeFileOperation: (context: FileToolContext, input: WriteInput, signal: AbortSignal) => Promise<WriteResult>;
4
+ //# sourceMappingURL=write-file-operation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"write-file-operation.d.ts","sourceRoot":"","sources":["../../../../../src/modules/agent/tools/files/write-file-operation.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAC,UAAU,EAAE,WAAW,EAAC,MAAM,gBAAgB,CAAC;AAG5D,OAAO,EAMN,KAAK,eAAe,EAKpB,MAAM,2BAA2B,CAAC;AAGnC,eAAO,MAAM,kBAAkB,YACrB,eAAe,SACjB,UAAU,UACT,WAAW,KACjB,OAAO,CAAC,WAAW,CAiDrB,CAAC"}
@@ -0,0 +1,61 @@
1
+ import { dirname } from 'node:path';
2
+ import { mkdir, readFile, writeFile } from 'node:fs/promises';
3
+ import { FileToolValidationError } from './file-tool-error.js';
4
+ import { validatedPath } from './file-path-safety.js';
5
+ import { assertFreshRead, assertMutableFile, assertMutationSize, displayPath, fileToolError, MAX_MUTATION_BYTES, pathExists, rememberFullFile, throwIfAborted, } from './file-tool-operations.js';
6
+ import { decodeText, encodeText, normalizedContent } from './text-file-codec.js';
7
+ export const writeFileOperation = async (context, input, signal) => {
8
+ let path = input.file_path;
9
+ try {
10
+ path = validatedPath(input.file_path);
11
+ throwIfAborted(signal);
12
+ await mkdir(dirname(path), { recursive: true });
13
+ const exists = await pathExists(path);
14
+ let before = '';
15
+ let encoding = 'utf8';
16
+ let bom = false;
17
+ if (exists) {
18
+ const cached = context.cache.get(path);
19
+ if (!cached)
20
+ throw new FileToolValidationError('Read the existing file before overwriting it.');
21
+ await assertMutableFile(path);
22
+ const buffer = await readFile(path, { signal });
23
+ if (buffer.length > MAX_MUTATION_BYTES)
24
+ throw new FileToolValidationError('The file is too large to write safely.');
25
+ const decoded = decodeText(buffer);
26
+ before = normalizedContent(decoded.content);
27
+ encoding = decoded.encoding;
28
+ bom = decoded.bom;
29
+ await assertFreshRead(path, before, cached);
30
+ }
31
+ throwIfAborted(signal);
32
+ const encoded = encodeText(input.content, encoding, bom);
33
+ assertMutationSize(encoded);
34
+ try {
35
+ await writeFile(path, encoded, exists ? { signal } : { flag: 'wx', signal });
36
+ }
37
+ catch (error) {
38
+ if (!exists && error.code === 'EEXIST') {
39
+ throw new FileToolValidationError('The file changed before Write could create it. Read it and retry.');
40
+ }
41
+ throw error;
42
+ }
43
+ const after = normalizedContent(input.content);
44
+ await rememberFullFile(context, path, after);
45
+ const operationId = context.mutations.record({ file: path, before, after });
46
+ return {
47
+ status: 'success',
48
+ tool: 'Write',
49
+ file_path: displayPath(path),
50
+ operation: exists ? 'update' : 'create',
51
+ operation_id: operationId,
52
+ message: exists ? 'Updated file.' : 'Created file.',
53
+ };
54
+ }
55
+ catch (error) {
56
+ if (signal.aborted)
57
+ throw signal.reason ?? error;
58
+ return fileToolError('Write', path, error);
59
+ }
60
+ };
61
+ //# sourceMappingURL=write-file-operation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"write-file-operation.js","sourceRoot":"","sources":["../../../../../src/modules/agent/tools/files/write-file-operation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAC,MAAM,WAAW,CAAC;AAClC,OAAO,EAAC,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAC,MAAM,kBAAkB,CAAC;AAE5D,OAAO,EAAC,uBAAuB,EAAC,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAC,aAAa,EAAC,MAAM,uBAAuB,CAAC;AACpD,OAAO,EACN,eAAe,EACf,iBAAiB,EACjB,kBAAkB,EAClB,WAAW,EACX,aAAa,EAEb,kBAAkB,EAClB,UAAU,EACV,gBAAgB,EAChB,cAAc,GACd,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAC,UAAU,EAAE,UAAU,EAAE,iBAAiB,EAAoB,MAAM,sBAAsB,CAAC;AAElG,MAAM,CAAC,MAAM,kBAAkB,GAAG,KAAK,EACtC,OAAwB,EACxB,KAAiB,EACjB,MAAmB,EACI,EAAE;IACzB,IAAI,IAAI,GAAG,KAAK,CAAC,SAAS,CAAC;IAC3B,IAAI,CAAC;QACJ,IAAI,GAAG,aAAa,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;QACtC,cAAc,CAAC,MAAM,CAAC,CAAC;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C,MAAM,EAAC,CAAC,CAAC,CAAC,EAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAC,CAAC,CAAC;QAC1E,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YAChB,IAAI,CAAC,MAAM,IAAK,KAA+B,CAAC,IAAI,KAAK,QAAQ,EAAE,CAAC;gBACnE,MAAM,IAAI,uBAAuB,CAAC,mEAAmE,CAAC,CAAC;YACxG,CAAC;YACD,MAAM,KAAK,CAAC;QACb,CAAC;QACD,MAAM,KAAK,GAAG,iBAAiB,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QAC/C,MAAM,gBAAgB,CAAC,OAAO,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC;QAC7C,MAAM,WAAW,GAAG,OAAO,CAAC,SAAS,CAAC,MAAM,CAAC,EAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAC,CAAC,CAAC;QAC1E,OAAO;YACN,MAAM,EAAE,SAAS;YACjB,IAAI,EAAE,OAAO;YACb,SAAS,EAAE,WAAW,CAAC,IAAI,CAAC;YAC5B,SAAS,EAAE,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ;YACvC,YAAY,EAAE,WAAW;YACzB,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,eAAe;SACnD,CAAC;IACH,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QAChB,IAAI,MAAM,CAAC,OAAO;YAAE,MAAM,MAAM,CAAC,MAAM,IAAI,KAAK,CAAC;QACjD,OAAO,aAAa,CAAC,OAAO,EAAE,IAAI,EAAE,KAAK,CAAgB,CAAC;IAC3D,CAAC;AACF,CAAC,CAAC"}
@@ -0,0 +1,65 @@
1
+ import type { UiMessage } from '../conversation/index.js';
2
+ import type { ConnectionState, ModelStatus, ProviderCredentials, ProviderId, ProviderStatus } from '../providers/index.js';
3
+ import type { ProjectSessionSummary } from '../sessions/index.js';
4
+ export type { ConnectionState, ModelStatus, ProviderStatus } from '../providers/index.js';
5
+ export type { ProviderCredentials } from '../providers/index.js';
6
+ export type InputMode = 'prompt' | 'bash';
7
+ export type AgentStatus = 'idle' | 'thinking' | 'runningTool' | 'waitingPermission' | 'error';
8
+ export type SubmitRequest = {
9
+ id: string;
10
+ content: string;
11
+ mode: InputMode;
12
+ };
13
+ export type RuntimeEvent = {
14
+ type: 'turn.started';
15
+ request: SubmitRequest;
16
+ } | {
17
+ type: 'status.changed';
18
+ status: AgentStatus;
19
+ } | {
20
+ type: 'message.appended';
21
+ message: UiMessage;
22
+ } | {
23
+ type: 'message.replaced';
24
+ message: UiMessage;
25
+ } | {
26
+ type: 'assistant.delta';
27
+ messageId: string;
28
+ delta: string;
29
+ } | {
30
+ type: 'turn.completed';
31
+ turnId: string;
32
+ } | {
33
+ type: 'turn.failed';
34
+ turnId: string;
35
+ error: string;
36
+ };
37
+ export interface AgentRuntime {
38
+ run(request: SubmitRequest, signal: AbortSignal): AsyncIterable<RuntimeEvent>;
39
+ dispose(): void | Promise<void>;
40
+ }
41
+ export interface ConfigurableAgentRuntime extends AgentRuntime {
42
+ getConnection(): ConnectionState;
43
+ providerStatuses(): Promise<ProviderStatus[]>;
44
+ modelStatuses(): Promise<ModelStatus[]>;
45
+ restore(): Promise<ConnectionState>;
46
+ connect(provider: ProviderId): Promise<ConnectionState>;
47
+ setup(provider: ProviderId, credentials: ProviderCredentials): Promise<ConnectionState>;
48
+ selectModel(model: string): Promise<ConnectionState>;
49
+ loadHistory(): Promise<UiMessage[]>;
50
+ }
51
+ export type ProjectSessionSwitch = {
52
+ session: ProjectSessionSummary;
53
+ messages: UiMessage[];
54
+ };
55
+ export interface ProjectSessionRuntime extends AgentRuntime {
56
+ getProjectRoot(): string;
57
+ getActiveSession(): ProjectSessionSummary;
58
+ initializeSessions(): Promise<void>;
59
+ listSessions(): Promise<ProjectSessionSummary[]>;
60
+ startNewSession(): ProjectSessionSummary;
61
+ switchSession(sessionId: string): Promise<ProjectSessionSwitch>;
62
+ }
63
+ export declare const isConfigurableRuntime: (runtime: AgentRuntime) => runtime is ConfigurableAgentRuntime;
64
+ export declare const isProjectSessionRuntime: (runtime: AgentRuntime) => runtime is ProjectSessionRuntime;
65
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/modules/agent/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,0BAA0B,CAAC;AACxD,OAAO,KAAK,EACX,eAAe,EACf,WAAW,EACX,mBAAmB,EACnB,UAAU,EACV,cAAc,EACd,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAC,qBAAqB,EAAC,MAAM,sBAAsB,CAAC;AAEhE,YAAY,EAAC,eAAe,EAAE,WAAW,EAAE,cAAc,EAAC,MAAM,uBAAuB,CAAC;AACxF,YAAY,EAAC,mBAAmB,EAAC,MAAM,uBAAuB,CAAC;AAE/D,MAAM,MAAM,SAAS,GAAG,QAAQ,GAAG,MAAM,CAAC;AAC1C,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,UAAU,GAAG,aAAa,GAAG,mBAAmB,GAAG,OAAO,CAAC;AAC9F,MAAM,MAAM,aAAa,GAAG;IAAC,EAAE,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,SAAS,CAAA;CAAC,CAAC;AAE3E,MAAM,MAAM,YAAY,GACrB;IAAC,IAAI,EAAE,cAAc,CAAC;IAAC,OAAO,EAAE,aAAa,CAAA;CAAC,GAC9C;IAAC,IAAI,EAAE,gBAAgB,CAAC;IAAC,MAAM,EAAE,WAAW,CAAA;CAAC,GAC7C;IAAC,IAAI,EAAE,kBAAkB,CAAC;IAAC,OAAO,EAAE,SAAS,CAAA;CAAC,GAC9C;IAAC,IAAI,EAAE,kBAAkB,CAAC;IAAC,OAAO,EAAE,SAAS,CAAA;CAAC,GAC9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C1C,kBAAkB,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACpC,YAAY,IAAI,OAAO,CAAC,qBAAqB,EAAE,CAAC,CAAC;IACjD,eAAe,IAAI,qBAAqB,CAAC;IACzC,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC;CAChE;AAED,eAAO,MAAM,qBAAqB,YAAa,YAAY,KAAG,OAAO,IAAI,wBAYxE,CAAC;AAEF,eAAO,MAAM,uBAAuB,YAAa,YAAY,KAAG,OAAO,IAAI,qBAU1E,CAAC"}
@@ -0,0 +1,21 @@
1
+ export const isConfigurableRuntime = (runtime) => {
2
+ const candidate = runtime;
3
+ return (typeof candidate.getConnection === 'function' &&
4
+ typeof candidate.providerStatuses === 'function' &&
5
+ typeof candidate.modelStatuses === 'function' &&
6
+ typeof candidate.restore === 'function' &&
7
+ typeof candidate.connect === 'function' &&
8
+ typeof candidate.setup === 'function' &&
9
+ typeof candidate.selectModel === 'function' &&
10
+ typeof candidate.loadHistory === 'function');
11
+ };
12
+ export const isProjectSessionRuntime = (runtime) => {
13
+ const candidate = runtime;
14
+ return (typeof candidate.getProjectRoot === 'function' &&
15
+ typeof candidate.getActiveSession === 'function' &&
16
+ typeof candidate.initializeSessions === 'function' &&
17
+ typeof candidate.listSessions === 'function' &&
18
+ typeof candidate.startNewSession === 'function' &&
19
+ typeof candidate.switchSession === 'function');
20
+ };
21
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/modules/agent/types.ts"],"names":[],"mappings":"AAqDA,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,OAAqB,EAAuC,EAAE;IACnG,MAAM,SAAS,GAAG,OAA4C,CAAC;IAC/D,OAAO,CACN,OAAO,SAAS,CAAC,aAAa,KAAK,UAAU;QAC7C,OAAO,SAAS,CAAC,gBAAgB,KAAK,UAAU;QAChD,OAAO,SAAS,CAAC,aAAa,KAAK,UAAU;QAC7C,OAAO,SAAS,CAAC,OAAO,KAAK,UAAU;QACvC,OAAO,SAAS,CAAC,OAAO,KAAK,UAAU;QACvC,OAAO,SAAS,CAAC,KAAK,KAAK,UAAU;QACrC,OAAO,SAAS,CAAC,WAAW,KAAK,UAAU;QAC3C,OAAO,SAAS,CAAC,WAAW,KAAK,UAAU,CAC3C,CAAC;AACH,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,OAAqB,EAAoC,EAAE;IAClG,MAAM,SAAS,GAAG,OAAyC,CAAC;IAC5D,OAAO,CACN,OAAO,SAAS,CAAC,cAAc,KAAK,UAAU;QAC9C,OAAO,SAAS,CAAC,gBAAgB,KAAK,UAAU;QAChD,OAAO,SAAS,CAAC,kBAAkB,KAAK,UAAU;QAClD,OAAO,SAAS,CAAC,YAAY,KAAK,UAAU;QAC5C,OAAO,SAAS,CAAC,eAAe,KAAK,UAAU;QAC/C,OAAO,SAAS,CAAC,aAAa,KAAK,UAAU,CAC7C,CAAC;AACH,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const runCli: () => Promise<void>;
2
+ //# sourceMappingURL=cli.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../../../src/modules/app/cli.tsx"],"names":[],"mappings":"AAMA,eAAO,MAAM,MAAM,QAAa,OAAO,CAAC,IAAI,CAqB3C,CAAC"}
@@ -0,0 +1,23 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { render } from 'ink';
3
+ import { realpathSync } from 'node:fs';
4
+ import { AnviaAgentRuntime } from '../agent/index.js';
5
+ import { keyboardProtocol, TerminalProvider } from '../../libs/terminal/index.js';
6
+ import { App } from './components/app.js';
7
+ export const runCli = async () => {
8
+ const projectRoot = realpathSync(process.cwd());
9
+ const instance = render(_jsx(TerminalProvider, { children: _jsx(App, { runtime: new AnviaAgentRuntime({ projectRoot }) }) }), {
10
+ alternateScreen: true,
11
+ exitOnCtrlC: false,
12
+ kittyKeyboard: keyboardProtocol,
13
+ });
14
+ const shutdown = () => instance.unmount();
15
+ process.once('SIGTERM', shutdown);
16
+ try {
17
+ await instance.waitUntilExit();
18
+ }
19
+ finally {
20
+ process.off('SIGTERM', shutdown);
21
+ }
22
+ };
23
+ //# sourceMappingURL=cli.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.js","sourceRoot":"","sources":["../../../src/modules/app/cli.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAC,MAAM,EAAC,MAAM,KAAK,CAAC;AAC3B,OAAO,EAAC,YAAY,EAAC,MAAM,SAAS,CAAC;AACrC,OAAO,EAAC,iBAAiB,EAAC,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAC,gBAAgB,EAAE,gBAAgB,EAAC,MAAM,8BAA8B,CAAC;AAChF,OAAO,EAAC,GAAG,EAAC,MAAM,qBAAqB,CAAC;AAExC,MAAM,CAAC,MAAM,MAAM,GAAG,KAAK,IAAmB,EAAE;IAC/C,MAAM,WAAW,GAAG,YAAY,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC;IAChD,MAAM,QAAQ,GAAG,MAAM,CACtB,KAAC,gBAAgB,cAChB,KAAC,GAAG,IAAC,OAAO,EAAE,IAAI,iBAAiB,CAAC,EAAC,WAAW,EAAC,CAAC,GAAI,GACpC,EACnB;QACC,eAAe,EAAE,IAAI;QACrB,WAAW,EAAE,KAAK;QAClB,aAAa,EAAE,gBAAgB;KAC/B,CACD,CAAC;IAEF,MAAM,QAAQ,GAAG,GAAG,EAAE,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC;IAC1C,OAAO,CAAC,IAAI,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;IAElC,IAAI,CAAC;QACJ,MAAM,QAAQ,CAAC,aAAa,EAAE,CAAC;IAChC,CAAC;YAAS,CAAC;QACV,OAAO,CAAC,GAAG,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;IAClC,CAAC;AACF,CAAC,CAAC"}
@@ -0,0 +1,11 @@
1
+ import { type ReactNode } from 'react';
2
+ import type { StoreApi } from 'zustand/vanilla';
3
+ import type { UiMessage } from '../../conversation/index.js';
4
+ import type { AppStore } from '../store/app-state.js';
5
+ export declare const AppProvider: ({ children, initialMessages, }: {
6
+ children: ReactNode;
7
+ initialMessages: readonly UiMessage[];
8
+ }) => import("react").JSX.Element;
9
+ export declare const useAppStoreApi: () => StoreApi<AppStore>;
10
+ export declare const useAppStore: <Selected>(selector: (state: AppStore) => Selected) => Selected;
11
+ //# sourceMappingURL=app-provider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"app-provider.d.ts","sourceRoot":"","sources":["../../../../src/modules/app/components/app-provider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAoC,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AAExE,OAAO,KAAK,EAAC,QAAQ,EAAC,MAAM,iBAAiB,CAAC;AAC9C,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,6BAA6B,CAAC;AAE3D,OAAO,KAAK,EAAC,QAAQ,EAAC,MAAM,uBAAuB,CAAC;AAIpD,eAAO,MAAM,WAAW,mCAGrB;IACF,QAAQ,EAAE,SAAS,CAAC;IACpB,eAAe,EAAE,SAAS,SAAS,EAAE,CAAC;CACtC,gCAIA,CAAC;AAEF,eAAO,MAAM,cAAc,QAAO,QAAQ,CAAC,QAAQ,CAIlD,CAAC;AAEF,eAAO,MAAM,WAAW,GAAI,QAAQ,YAAa,CAAC,KAAK,EAAE,QAAQ,KAAK,QAAQ,KAAG,QAC5C,CAAC"}
@@ -0,0 +1,18 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { createContext, useContext, useRef } from 'react';
3
+ import { useStore } from 'zustand';
4
+ import { createAppStore } from '../store/create-app-store.js';
5
+ const AppStoreContext = createContext(null);
6
+ export const AppProvider = ({ children, initialMessages, }) => {
7
+ const storeRef = useRef(null);
8
+ storeRef.current ??= createAppStore(initialMessages);
9
+ return _jsx(AppStoreContext.Provider, { value: storeRef.current, children: children });
10
+ };
11
+ export const useAppStoreApi = () => {
12
+ const store = useContext(AppStoreContext);
13
+ if (!store)
14
+ throw new Error('useAppStoreApi must be used inside AppProvider');
15
+ return store;
16
+ };
17
+ export const useAppStore = (selector) => useStore(useAppStoreApi(), selector);
18
+ //# sourceMappingURL=app-provider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"app-provider.js","sourceRoot":"","sources":["../../../../src/modules/app/components/app-provider.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAC,aAAa,EAAE,UAAU,EAAE,MAAM,EAAiB,MAAM,OAAO,CAAC;AACxE,OAAO,EAAC,QAAQ,EAAC,MAAM,SAAS,CAAC;AAGjC,OAAO,EAAC,cAAc,EAAC,MAAM,8BAA8B,CAAC;AAG5D,MAAM,eAAe,GAAG,aAAa,CAA4B,IAAI,CAAC,CAAC;AAEvE,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,EAC3B,QAAQ,EACR,eAAe,GAIf,EAAE,EAAE;IACJ,MAAM,QAAQ,GAAG,MAAM,CAA4B,IAAI,CAAC,CAAC;IACzD,QAAQ,CAAC,OAAO,KAAK,cAAc,CAAC,eAAe,CAAC,CAAC;IACrD,OAAO,KAAC,eAAe,CAAC,QAAQ,IAAC,KAAK,EAAE,QAAQ,CAAC,OAAO,YAAG,QAAQ,GAA4B,CAAC;AACjG,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAG,GAAuB,EAAE;IACtD,MAAM,KAAK,GAAG,UAAU,CAAC,eAAe,CAAC,CAAC;IAC1C,IAAI,CAAC,KAAK;QAAE,MAAM,IAAI,KAAK,CAAC,gDAAgD,CAAC,CAAC;IAC9E,OAAO,KAAK,CAAC;AACd,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAG,CAAY,QAAuC,EAAY,EAAE,CAC3F,QAAQ,CAAC,cAAc,EAAE,EAAE,QAAQ,CAAC,CAAC"}
@@ -0,0 +1,7 @@
1
+ import type { AgentRuntime } from '../../agent/index.js';
2
+ export type AppProps = {
3
+ mockResponseDelay?: number;
4
+ runtime?: AgentRuntime;
5
+ };
6
+ export declare const App: ({ mockResponseDelay, runtime: injectedRuntime }: AppProps) => import("react").JSX.Element;
7
+ //# sourceMappingURL=app.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../../../../src/modules/app/components/app.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,sBAAsB,CAAC;AAcvD,MAAM,MAAM,QAAQ,GAAG;IACtB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,OAAO,CAAC,EAAE,YAAY,CAAC;CACvB,CAAC;AA4CF,eAAO,MAAM,GAAG,oDAAyD,QAAQ,gCAqBhF,CAAC"}
@@ -0,0 +1,45 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useMemo, useRef } from 'react';
3
+ import { Box, useWindowSize } from 'ink';
4
+ import { useShallow } from 'zustand/react/shallow';
5
+ import { isConfigurableRuntime } from '../../agent/index.js';
6
+ import { MockRuntime } from '../../agent/index.js';
7
+ import { Composer } from '../../composer/index.js';
8
+ import { VirtualTranscript } from '../../conversation/index.js';
9
+ import { Overlay } from '../../overlays/index.js';
10
+ import { AppProvider, useAppStore } from './app-provider.js';
11
+ import { selectComposer, selectNavigation, selectSession } from '../store/selectors.js';
12
+ import { useAppInput } from '../services/use-app-input.js';
13
+ import { useRuntimeConnection } from '../services/use-runtime-connection.js';
14
+ import { useRuntimeSession } from '../services/use-runtime-session.js';
15
+ import { useRuntimeWorkspace } from '../services/use-runtime-workspace.js';
16
+ const AppShell = ({ runtime }) => {
17
+ const { columns, rows } = useWindowSize();
18
+ const session = useAppStore(useShallow(selectSession));
19
+ const composer = useAppStore(useShallow(selectComposer));
20
+ const navigation = useAppStore(useShallow(selectNavigation));
21
+ const transcriptRef = useRef(null);
22
+ const workspace = useRuntimeWorkspace(runtime);
23
+ const runtimeSession = useRuntimeSession(runtime, workspace.onTurnPhase);
24
+ const connection = useRuntimeConnection(runtime);
25
+ const input = useAppInput(transcriptRef, runtimeSession, connection, workspace);
26
+ const providerModel = connection.state.status === 'connected' && connection.state.providerLabel && connection.state.model
27
+ ? `${connection.state.providerLabel} · ${connection.state.model}`
28
+ : 'No provider selected';
29
+ return (_jsxs(Box, { width: Math.max(1, columns), height: Math.max(1, rows), flexDirection: "column", overflow: "hidden", children: [_jsx(VirtualTranscript, { ref: transcriptRef, messages: session.messages, active: navigation.transcriptMode }), navigation.overlay ? (_jsx(Overlay, { route: navigation.overlay.route, query: navigation.overlay.query, items: input.overlayItems, selectedIndex: navigation.overlay.selectedIndex })) : null, _jsx(Composer, { value: composer.editor.value, cursor: composer.editor.cursor, mode: composer.inputMode, status: session.status, queuedPrompts: session.queuedRequests.map((request) => request.content), suggestions: input.commandSuggestions, selectedSuggestion: composer.suggestionIndex, exitHint: navigation.exitHint, providerModel: providerModel, transcriptActive: navigation.transcriptMode })] }));
30
+ };
31
+ export const App = ({ mockResponseDelay = 700, runtime: injectedRuntime }) => {
32
+ const runtime = useMemo(() => injectedRuntime ?? new MockRuntime(mockResponseDelay), [injectedRuntime, mockResponseDelay]);
33
+ const initialMessages = [
34
+ {
35
+ id: 'welcome',
36
+ kind: 'system',
37
+ level: 'info',
38
+ content: isConfigurableRuntime(runtime)
39
+ ? 'Welcome to Aven AI. Use /connect to choose a provider, or /setup to add one.'
40
+ : 'Welcome to Aven AI. Local mock mode is active.',
41
+ },
42
+ ];
43
+ return (_jsx(AppProvider, { initialMessages: initialMessages, children: _jsx(AppShell, { runtime: runtime }) }));
44
+ };
45
+ //# sourceMappingURL=app.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"app.js","sourceRoot":"","sources":["../../../../src/modules/app/components/app.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAC,OA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,IAAI,EAAE,QAAQ,CAAC,SAAS,EACxB,MAAM,EAAE,OAAO,CAAC,MAAM,EACtB,aAAa,EAAE,OAAO,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,EACvE,WAAW,EAAE,KAAK,CAAC,kBAAkB,EACrC,kBAAkB,EAAE,QAAQ,CAAC,eAAe,EAC5C,QAAQ,EAAE,UAAU,CAAC,QAAQ,EAC7B,aAAa,EAAE,aAAa,EAC5B,gBAAgB,EAAE,UAAU,CAAC,cAAc,GAC1C,IACG,CACN,CAAC;AACH,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,GAAG,GAAG,CAAC,EAAC,iBAAiB,GAAG,GAAG,EAAE,OAAO,EAAE,eAAe,EAAW,EAAE,EAAE;IACpF,MAAM,OAAO,GAAG,OAAO,CACtB,GAAG,EAAE,CAAC,eAAe,IAAI,IAAI,WAAW,CAAC,iBAAiB,CAAC,EAC3D,CAAC,eAAe,EAAE,iBAAiB,CAAC,CACpC,CAAC;IACF,MAAM,eAAe,GAAgB;QACpC;YACC,EAAE,EAAE,SAAS;YACb,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,MAAM;YACb,OAAO,EAAE,qBAAqB,CAAC,OAAO,CAAC;gBACtC,CAAC,CAAC,8EAA8E;gBAChF,CAAC,CAAC,gDAAgD;SACnD;KACD,CAAC;IAEF,OAAO,CACN,KAAC,WAAW,IAAC,eAAe,EAAE,eAAe,YAC5C,KAAC,QAAQ,IAAC,OAAO,EAAE,OAAO,GAAI,GACjB,CACd,CAAC;AACH,CAAC,CAAC"}
@@ -0,0 +1,6 @@
1
+ export { App, type AppProps } from './components/app.js';
2
+ export { runCli } from './cli.js';
3
+ export { AppProvider, useAppStore, useAppStoreApi } from './components/app-provider.js';
4
+ export { createAppStore } from './store/create-app-store.js';
5
+ export type { AppStore, AppStoreActions, AppStoreState } from './store/app-state.js';
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/modules/app/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAE,KAAK,QAAQ,EAAC,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAC,MAAM,EAAC,MAAM,UAAU,CAAC;AAChC,OAAO,EAAC,WAAW,EAAE,WAAW,EAAE,cAAc,EAAC,MAAM,8BAA8B,CAAC;AACtF,OAAO,EAAC,cAAc,EAAC,MAAM,6BAA6B,CAAC;AAC3D,YAAY,EAAC,QAAQ,EAAE,eAAe,EAAE,aAAa,EAAC,MAAM,sBAAsB,CAAC"}
@@ -0,0 +1,5 @@
1
+ export { App } from './components/app.js';
2
+ export { runCli } from './cli.js';
3
+ export { AppProvider, useAppStore, useAppStoreApi } from './components/app-provider.js';
4
+ export { createAppStore } from './store/create-app-store.js';
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/modules/app/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAgB,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAC,MAAM,EAAC,MAAM,UAAU,CAAC;AAChC,OAAO,EAAC,WAAW,EAAE,WAAW,EAAE,cAAc,EAAC,MAAM,8BAA8B,CAAC;AACtF,OAAO,EAAC,cAAc,EAAC,MAAM,6BAA6B,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { UiMessage } from '../../conversation/index.js';
2
+ export declare const promptHistoryFromMessages: (messages: readonly UiMessage[]) => string[];
3
+ //# sourceMappingURL=prompt-history.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prompt-history.d.ts","sourceRoot":"","sources":["../../../../src/modules/app/input/prompt-history.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,6BAA6B,CAAC;AAE3D,eAAO,MAAM,yBAAyB,aAAc,SAAS,SAAS,EAAE,KAAG,MAAM,EAUhF,CAAC"}
@@ -0,0 +1,13 @@
1
+ export const promptHistoryFromMessages = (messages) => {
2
+ const history = [];
3
+ const seen = new Set();
4
+ for (let index = messages.length - 1; index >= 0; index--) {
5
+ const message = messages[index];
6
+ if (message?.kind !== 'user' || message.variant !== 'prompt' || seen.has(message.content))
7
+ continue;
8
+ seen.add(message.content);
9
+ history.push(message.content);
10
+ }
11
+ return history;
12
+ };
13
+ //# sourceMappingURL=prompt-history.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prompt-history.js","sourceRoot":"","sources":["../../../../src/modules/app/input/prompt-history.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,QAA8B,EAAY,EAAE;IACrF,MAAM,OAAO,GAAa,EAAE,CAAC;IAC7B,MAAM,IAAI,GAAG,IAAI,GAAG,EAAU,CAAC;IAC/B,KAAK,IAAI,KAAK,GAAG,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE,KAAK,IAAI,CAAC,EAAE,KAAK,EAAE,EAAE,CAAC;QAC3D,MAAM,OAAO,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;QAChC,IAAI,OAAO,EAAE,IAAI,KAAK,MAAM,IAAI,OAAO,CAAC,OAAO,KAAK,QAAQ,IAAI,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC;YAAE,SAAS;QACpG,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QAC1B,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IAC/B,CAAC;IACD,OAAO,OAAO,CAAC;AAChB,CAAC,CAAC"}
@@ -0,0 +1,14 @@
1
+ import type { Key } from 'ink';
2
+ import type { OverlayItem, OverlayRoute } from '../../overlays/index.js';
3
+ import type { RuntimeConnection } from '../services/use-runtime-connection.js';
4
+ import type { RuntimeWorkspace } from '../services/use-runtime-workspace.js';
5
+ export type OverlayController = {
6
+ active: boolean;
7
+ items: readonly OverlayItem[];
8
+ history: readonly string[];
9
+ open: (route: OverlayRoute) => void;
10
+ handleInput: (input: string, key: Key) => boolean;
11
+ handlePaste: (text: string) => boolean;
12
+ };
13
+ export declare const useOverlayController: (connection: RuntimeConnection, workspace: RuntimeWorkspace) => OverlayController;
14
+ //# sourceMappingURL=use-overlay-controller.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-overlay-controller.d.ts","sourceRoot":"","sources":["../../../../src/modules/app/input/use-overlay-controller.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAC,GAAG,EAAC,MAAM,KAAK,CAAC;AAC7B,OAAO,KAAK,EAAC,WAAW,EAAE,YAAY,EAAC,MAAM,yBAAyB,CAAC;AAMvE,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,uCAAuC,CAAC;AAC7E,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,sCAAsC,CAAC;AAG3E,MAAM,MAAM,iBAAiB,GAAG;IAC/B,MAAM,EAAE,OAAO,CAAC;IAChB,KAAK,EAAE,SAAS,WAAW,EAAE,CAAC;IAC9B,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;IAC3B,IAAI,EAAE,CAAC,KAAK,EAAE,YAAY,KAAK,IAAI,CAAC;IACpC,WAAW,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,KAAK,OAAO,CAAC;IAClD,WAAW,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC;CACvC,CAAC;AAEF,eAAO,MAAM,oBAAoB,eAAgB,iBAAiB,aAAa,gBAAgB,KAAG,iBAsLjG,CAAC"}
@@ -0,0 +1,168 @@
1
+ import Fuse from 'fuse.js';
2
+ import { useCallback, useMemo } from 'react';
3
+ import { buildOverlayItems } from '../../overlays/index.js';
4
+ import { overlaySelectionIntent } from '../../overlays/index.js';
5
+ import { normalizeProviderBaseUrl, providerCatalog as providers } from '../../providers/index.js';
6
+ import { normalizeInput } from '../../composer/index.js';
7
+ import { useAppStore, useAppStoreApi } from '../components/app-provider.js';
8
+ import { promptHistoryFromMessages } from './prompt-history.js';
9
+ export const useOverlayController = (connection, workspace) => {
10
+ const store = useAppStoreApi();
11
+ const overlay = useAppStore((state) => state.overlay);
12
+ const messages = useAppStore((state) => state.messages);
13
+ const promptHistory = useMemo(() => promptHistoryFromMessages(messages), [messages]);
14
+ const baseItems = useMemo(() => buildOverlayItems(overlay, {
15
+ messages,
16
+ promptHistory,
17
+ connection: { state: connection.state, providers: connection.providers, models: connection.models },
18
+ workspace: {
19
+ supported: workspace.supported,
20
+ sessions: workspace.sessions,
21
+ ...(workspace.error ? { error: workspace.error } : {}),
22
+ },
23
+ }), [
24
+ connection.models,
25
+ connection.providers,
26
+ connection.state,
27
+ messages,
28
+ overlay,
29
+ promptHistory,
30
+ workspace.error,
31
+ workspace.sessions,
32
+ workspace.supported,
33
+ ]);
34
+ const items = useMemo(() => {
35
+ if (!overlay?.query || overlay.route === 'setupKey' || overlay.route === 'setupBaseUrl')
36
+ return baseItems;
37
+ return new Fuse(baseItems, { keys: ['label', 'description'], threshold: 0.4 })
38
+ .search(overlay.query)
39
+ .map((result) => result.item);
40
+ }, [baseItems, overlay?.query, overlay?.route]);
41
+ const open = useCallback((route) => {
42
+ const actions = store.getState();
43
+ actions.setOverlay({ route, query: '', selectedIndex: 0 });
44
+ actions.setTranscriptMode(false);
45
+ if (route === 'connect' || route === 'setupProvider')
46
+ void connection.refreshProviders();
47
+ if (route === 'model')
48
+ void connection.refreshModels();
49
+ if (route === 'sessions')
50
+ void workspace.refresh();
51
+ }, [connection, store, workspace]);
52
+ const appendConnectionMessage = useCallback((level, content) => {
53
+ store.getState().appendMessage({ id: `connection-${Date.now()}`, kind: 'system', level, content });
54
+ }, [store]);
55
+ const handleInput = useCallback((input, key) => {
56
+ if (!overlay)
57
+ return false;
58
+ const actions = store.getState();
59
+ if (key.escape) {
60
+ actions.setOverlay(null);
61
+ return true;
62
+ }
63
+ if (key.upArrow || key.downArrow) {
64
+ const amount = key.upArrow ? -1 : 1;
65
+ actions.setOverlay((current) => current
66
+ ? {
67
+ ...current,
68
+ selectedIndex: Math.max(0, Math.min(items.length - 1, current.selectedIndex + amount)),
69
+ }
70
+ : current);
71
+ return true;
72
+ }
73
+ if (key.return) {
74
+ if (overlay.route === 'setupBaseUrl') {
75
+ const provider = overlay.provider;
76
+ if (!provider || !overlay.query.trim())
77
+ return true;
78
+ try {
79
+ const baseUrl = normalizeProviderBaseUrl(provider, overlay.query);
80
+ actions.setOverlay({ route: 'setupKey', provider, baseUrl, query: '', selectedIndex: 0 });
81
+ }
82
+ catch (error) {
83
+ appendConnectionMessage('error', error instanceof Error ? error.message : 'Invalid workspace URL.');
84
+ }
85
+ return true;
86
+ }
87
+ if (overlay.route === 'setupKey') {
88
+ const provider = overlay.provider;
89
+ const apiKey = overlay.query.trim();
90
+ if (!provider || !apiKey || connection.state.status === 'connecting')
91
+ return true;
92
+ void connection
93
+ .setup(provider, { apiKey, ...(overlay.baseUrl ? { baseUrl: overlay.baseUrl } : {}) })
94
+ .then((connected) => {
95
+ store.getState().setOverlay(null);
96
+ appendConnectionMessage('success', `Connected to ${connected.providerLabel} · ${connected.model}`);
97
+ })
98
+ .catch(() => {
99
+ appendConnectionMessage('error', `${providers[provider].label} connection failed. Check the API key and try again.`);
100
+ });
101
+ return true;
102
+ }
103
+ const intent = overlaySelectionIntent(overlay, items, connection.state, connection.providers);
104
+ if (intent.type === 'restorePrompt') {
105
+ actions.setEditor({ value: intent.value, cursor: intent.value.length });
106
+ actions.setOverlay(null);
107
+ }
108
+ else if (intent.type === 'switchSession') {
109
+ void workspace.switchSession(intent.sessionId).then((switched) => {
110
+ if (switched)
111
+ store.getState().setOverlay(null);
112
+ });
113
+ }
114
+ else if (intent.type === 'requestApiKey') {
115
+ actions.setOverlay({
116
+ route: providers[intent.provider].baseUrl ? 'setupBaseUrl' : 'setupKey',
117
+ provider: intent.provider,
118
+ query: '',
119
+ selectedIndex: 0,
120
+ });
121
+ }
122
+ else if (intent.type === 'connectProvider') {
123
+ void connection
124
+ .connect(intent.provider)
125
+ .then((connected) => {
126
+ store.getState().setOverlay(null);
127
+ appendConnectionMessage('success', `Connected to ${connected.providerLabel} · ${connected.model}`);
128
+ })
129
+ .catch(() => {
130
+ appendConnectionMessage('error', `${providers[intent.provider].label} connection failed. Run /setup to replace its API key.`);
131
+ });
132
+ }
133
+ else if (intent.type === 'selectModel') {
134
+ void connection
135
+ .selectModel(intent.model)
136
+ .then((connected) => {
137
+ store.getState().setOverlay(null);
138
+ appendConnectionMessage('success', `Using ${connected.providerLabel} · ${connected.model}`);
139
+ })
140
+ .catch(() => {
141
+ appendConnectionMessage('error', `Unable to select model ${intent.model}. Reconnect to refresh the model cache.`);
142
+ });
143
+ }
144
+ return true;
145
+ }
146
+ if (key.backspace || key.delete) {
147
+ actions.setOverlay((current) => current ? { ...current, query: current.query.slice(0, -1), selectedIndex: 0 } : current);
148
+ return true;
149
+ }
150
+ if (!key.ctrl && !key.meta && input) {
151
+ actions.setOverlay((current) => current ? { ...current, query: current.query + input, selectedIndex: 0 } : current);
152
+ }
153
+ return true;
154
+ }, [appendConnectionMessage, connection, items, overlay, store, workspace]);
155
+ const handlePaste = useCallback((text) => {
156
+ const current = store.getState().overlay;
157
+ if (!current)
158
+ return false;
159
+ if (current.route === 'setupKey' || current.route === 'setupBaseUrl') {
160
+ store
161
+ .getState()
162
+ .setOverlay((value) => (value ? { ...value, query: value.query + normalizeInput(text).trim() } : value));
163
+ }
164
+ return true;
165
+ }, [store]);
166
+ return { active: Boolean(overlay), items, history: promptHistory, open, handleInput, handlePaste };
167
+ };
168
+ //# sourceMappingURL=use-overlay-controller.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-overlay-controller.js","sourceRoot":"","sources":["../../../../src/modules/app/input/use-overlay-controller.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,SAAS,CAAC;AAC3B,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,KAAK,GAAG,cAAc,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;QACzG,CAAC;QACD,OAAO,IAAI,CAAC;IACb,CAAC,EACD,CAAC,KAAK,CAAC,CACP,CAAC;IAEF,OAAO,EAAC,MAAM,EAAE,OAAO,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,aAAa,EAAE,IAAI,EAAE,WAAW,EAAE,WAAW,EAAC,CAAC;AAClG,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const useQuitController: () => ((key: 'c' | 'd') => void);
2
+ //# sourceMappingURL=quit-controller.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"quit-controller.d.ts","sourceRoot":"","sources":["../../../../src/modules/app/services/quit-controller.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,iBAAiB,QAAO,CAAC,CAAC,GAAG,EAAE,GAAG,GAAG,GAAG,KAAK,IAAI,CA2B7D,CAAC"}