@soederpop/luca 0.1.2 → 0.2.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 (381) hide show
  1. package/.github/workflows/release.yaml +167 -0
  2. package/CLAUDE.md +2 -0
  3. package/README.md +3 -0
  4. package/assistants/codingAssistant/ABOUT.md +3 -0
  5. package/assistants/codingAssistant/CORE.md +22 -17
  6. package/assistants/codingAssistant/hooks.ts +17 -4
  7. package/assistants/codingAssistant/tools.ts +1 -106
  8. package/assistants/inkbot/ABOUT.md +5 -0
  9. package/assistants/inkbot/CORE.md +71 -0
  10. package/assistants/inkbot/hooks.ts +14 -0
  11. package/assistants/inkbot/tools.ts +47 -0
  12. package/bun.lock +20 -4
  13. package/commands/inkbot.ts +353 -0
  14. package/commands/release.ts +75 -181
  15. package/dist/agi/container.server.d.ts +63 -0
  16. package/dist/agi/container.server.d.ts.map +1 -0
  17. package/dist/agi/endpoints/ask.d.ts +20 -0
  18. package/dist/agi/endpoints/ask.d.ts.map +1 -0
  19. package/dist/agi/endpoints/conversations/[id].d.ts +27 -0
  20. package/dist/agi/endpoints/conversations/[id].d.ts.map +1 -0
  21. package/dist/agi/endpoints/conversations.d.ts +18 -0
  22. package/dist/agi/endpoints/conversations.d.ts.map +1 -0
  23. package/dist/agi/endpoints/experts.d.ts +8 -0
  24. package/dist/agi/endpoints/experts.d.ts.map +1 -0
  25. package/dist/agi/feature.d.ts +9 -0
  26. package/dist/agi/feature.d.ts.map +1 -0
  27. package/dist/agi/features/assistant.d.ts +509 -0
  28. package/dist/agi/features/assistant.d.ts.map +1 -0
  29. package/dist/agi/features/assistants-manager.d.ts +236 -0
  30. package/dist/agi/features/assistants-manager.d.ts.map +1 -0
  31. package/dist/agi/features/autonomous-assistant.d.ts +281 -0
  32. package/dist/agi/features/autonomous-assistant.d.ts.map +1 -0
  33. package/dist/agi/features/browser-use.d.ts +479 -0
  34. package/dist/agi/features/browser-use.d.ts.map +1 -0
  35. package/dist/agi/features/claude-code.d.ts +824 -0
  36. package/dist/agi/features/claude-code.d.ts.map +1 -0
  37. package/dist/agi/features/conversation-history.d.ts +245 -0
  38. package/dist/agi/features/conversation-history.d.ts.map +1 -0
  39. package/dist/agi/features/conversation.d.ts +464 -0
  40. package/dist/agi/features/conversation.d.ts.map +1 -0
  41. package/dist/agi/features/docs-reader.d.ts +72 -0
  42. package/dist/agi/features/docs-reader.d.ts.map +1 -0
  43. package/dist/agi/features/file-tools.d.ts +110 -0
  44. package/dist/agi/features/file-tools.d.ts.map +1 -0
  45. package/dist/agi/features/luca-coder.d.ts +323 -0
  46. package/dist/agi/features/luca-coder.d.ts.map +1 -0
  47. package/dist/agi/features/openai-codex.d.ts +381 -0
  48. package/dist/agi/features/openai-codex.d.ts.map +1 -0
  49. package/dist/agi/features/openapi.d.ts +200 -0
  50. package/dist/agi/features/openapi.d.ts.map +1 -0
  51. package/dist/agi/features/skills-library.d.ts +167 -0
  52. package/dist/agi/features/skills-library.d.ts.map +1 -0
  53. package/dist/agi/index.d.ts +5 -0
  54. package/dist/agi/index.d.ts.map +1 -0
  55. package/dist/agi/lib/interceptor-chain.d.ts +44 -0
  56. package/dist/agi/lib/interceptor-chain.d.ts.map +1 -0
  57. package/dist/agi/lib/token-counter.d.ts +13 -0
  58. package/dist/agi/lib/token-counter.d.ts.map +1 -0
  59. package/dist/bootstrap/generated.d.ts +5 -0
  60. package/dist/bootstrap/generated.d.ts.map +1 -0
  61. package/dist/browser.d.ts +12 -0
  62. package/dist/browser.d.ts.map +1 -0
  63. package/dist/bus.d.ts +29 -0
  64. package/dist/bus.d.ts.map +1 -0
  65. package/dist/cli/build-info.d.ts +4 -0
  66. package/dist/cli/build-info.d.ts.map +1 -0
  67. package/dist/cli/cli.d.ts +3 -0
  68. package/dist/cli/cli.d.ts.map +1 -0
  69. package/dist/client.d.ts +60 -0
  70. package/dist/client.d.ts.map +1 -0
  71. package/dist/clients/civitai/index.d.ts +472 -0
  72. package/dist/clients/civitai/index.d.ts.map +1 -0
  73. package/dist/clients/client-template.d.ts +30 -0
  74. package/dist/clients/client-template.d.ts.map +1 -0
  75. package/dist/clients/comfyui/index.d.ts +281 -0
  76. package/dist/clients/comfyui/index.d.ts.map +1 -0
  77. package/dist/clients/elevenlabs/index.d.ts +197 -0
  78. package/dist/clients/elevenlabs/index.d.ts.map +1 -0
  79. package/dist/clients/graph.d.ts +64 -0
  80. package/dist/clients/graph.d.ts.map +1 -0
  81. package/dist/clients/openai/index.d.ts +247 -0
  82. package/dist/clients/openai/index.d.ts.map +1 -0
  83. package/dist/clients/rest.d.ts +92 -0
  84. package/dist/clients/rest.d.ts.map +1 -0
  85. package/dist/clients/supabase/index.d.ts +176 -0
  86. package/dist/clients/supabase/index.d.ts.map +1 -0
  87. package/dist/clients/websocket.d.ts +127 -0
  88. package/dist/clients/websocket.d.ts.map +1 -0
  89. package/dist/command.d.ts +163 -0
  90. package/dist/command.d.ts.map +1 -0
  91. package/dist/commands/bootstrap.d.ts +20 -0
  92. package/dist/commands/bootstrap.d.ts.map +1 -0
  93. package/dist/commands/chat.d.ts +37 -0
  94. package/dist/commands/chat.d.ts.map +1 -0
  95. package/dist/commands/code.d.ts +28 -0
  96. package/dist/commands/code.d.ts.map +1 -0
  97. package/dist/commands/console.d.ts +22 -0
  98. package/dist/commands/console.d.ts.map +1 -0
  99. package/dist/commands/describe.d.ts +50 -0
  100. package/dist/commands/describe.d.ts.map +1 -0
  101. package/dist/commands/eval.d.ts +23 -0
  102. package/dist/commands/eval.d.ts.map +1 -0
  103. package/dist/commands/help.d.ts +25 -0
  104. package/dist/commands/help.d.ts.map +1 -0
  105. package/dist/commands/index.d.ts +18 -0
  106. package/dist/commands/index.d.ts.map +1 -0
  107. package/dist/commands/introspect.d.ts +24 -0
  108. package/dist/commands/introspect.d.ts.map +1 -0
  109. package/dist/commands/mcp.d.ts +35 -0
  110. package/dist/commands/mcp.d.ts.map +1 -0
  111. package/dist/commands/prompt.d.ts +38 -0
  112. package/dist/commands/prompt.d.ts.map +1 -0
  113. package/dist/commands/run.d.ts +24 -0
  114. package/dist/commands/run.d.ts.map +1 -0
  115. package/dist/commands/sandbox-mcp.d.ts +34 -0
  116. package/dist/commands/sandbox-mcp.d.ts.map +1 -0
  117. package/dist/commands/save-api-docs.d.ts +21 -0
  118. package/dist/commands/save-api-docs.d.ts.map +1 -0
  119. package/dist/commands/scaffold.d.ts +24 -0
  120. package/dist/commands/scaffold.d.ts.map +1 -0
  121. package/dist/commands/select.d.ts +22 -0
  122. package/dist/commands/select.d.ts.map +1 -0
  123. package/dist/commands/serve.d.ts +29 -0
  124. package/dist/commands/serve.d.ts.map +1 -0
  125. package/dist/container-describer.d.ts +144 -0
  126. package/dist/container-describer.d.ts.map +1 -0
  127. package/dist/container.d.ts +451 -0
  128. package/dist/container.d.ts.map +1 -0
  129. package/dist/endpoint.d.ts +113 -0
  130. package/dist/endpoint.d.ts.map +1 -0
  131. package/dist/feature.d.ts +47 -0
  132. package/dist/feature.d.ts.map +1 -0
  133. package/dist/graft.d.ts +29 -0
  134. package/dist/graft.d.ts.map +1 -0
  135. package/dist/hash-object.d.ts +8 -0
  136. package/dist/hash-object.d.ts.map +1 -0
  137. package/dist/helper.d.ts +209 -0
  138. package/dist/helper.d.ts.map +1 -0
  139. package/dist/introspection/generated.node.d.ts +44623 -0
  140. package/dist/introspection/generated.node.d.ts.map +1 -0
  141. package/dist/introspection/generated.web.d.ts +1412 -0
  142. package/dist/introspection/generated.web.d.ts.map +1 -0
  143. package/dist/introspection/index.d.ts +156 -0
  144. package/dist/introspection/index.d.ts.map +1 -0
  145. package/dist/introspection/scan.d.ts +147 -0
  146. package/dist/introspection/scan.d.ts.map +1 -0
  147. package/dist/node/container.d.ts +256 -0
  148. package/dist/node/container.d.ts.map +1 -0
  149. package/dist/node/feature.d.ts +9 -0
  150. package/dist/node/feature.d.ts.map +1 -0
  151. package/dist/node/features/container-link.d.ts +213 -0
  152. package/dist/node/features/container-link.d.ts.map +1 -0
  153. package/dist/node/features/content-db.d.ts +354 -0
  154. package/dist/node/features/content-db.d.ts.map +1 -0
  155. package/dist/node/features/disk-cache.d.ts +236 -0
  156. package/dist/node/features/disk-cache.d.ts.map +1 -0
  157. package/dist/node/features/dns.d.ts +511 -0
  158. package/dist/node/features/dns.d.ts.map +1 -0
  159. package/dist/node/features/docker.d.ts +485 -0
  160. package/dist/node/features/docker.d.ts.map +1 -0
  161. package/dist/node/features/downloader.d.ts +73 -0
  162. package/dist/node/features/downloader.d.ts.map +1 -0
  163. package/dist/node/features/figlet-fonts.d.ts +4 -0
  164. package/dist/node/features/figlet-fonts.d.ts.map +1 -0
  165. package/dist/node/features/file-manager.d.ts +177 -0
  166. package/dist/node/features/file-manager.d.ts.map +1 -0
  167. package/dist/node/features/fs.d.ts +635 -0
  168. package/dist/node/features/fs.d.ts.map +1 -0
  169. package/dist/node/features/git.d.ts +329 -0
  170. package/dist/node/features/git.d.ts.map +1 -0
  171. package/dist/node/features/google-auth.d.ts +200 -0
  172. package/dist/node/features/google-auth.d.ts.map +1 -0
  173. package/dist/node/features/google-calendar.d.ts +194 -0
  174. package/dist/node/features/google-calendar.d.ts.map +1 -0
  175. package/dist/node/features/google-docs.d.ts +138 -0
  176. package/dist/node/features/google-docs.d.ts.map +1 -0
  177. package/dist/node/features/google-drive.d.ts +202 -0
  178. package/dist/node/features/google-drive.d.ts.map +1 -0
  179. package/dist/node/features/google-mail.d.ts +221 -0
  180. package/dist/node/features/google-mail.d.ts.map +1 -0
  181. package/dist/node/features/google-sheets.d.ts +157 -0
  182. package/dist/node/features/google-sheets.d.ts.map +1 -0
  183. package/dist/node/features/grep.d.ts +207 -0
  184. package/dist/node/features/grep.d.ts.map +1 -0
  185. package/dist/node/features/helpers.d.ts +236 -0
  186. package/dist/node/features/helpers.d.ts.map +1 -0
  187. package/dist/node/features/ink.d.ts +332 -0
  188. package/dist/node/features/ink.d.ts.map +1 -0
  189. package/dist/node/features/ipc-socket.d.ts +298 -0
  190. package/dist/node/features/ipc-socket.d.ts.map +1 -0
  191. package/dist/node/features/json-tree.d.ts +140 -0
  192. package/dist/node/features/json-tree.d.ts.map +1 -0
  193. package/dist/node/features/networking.d.ts +373 -0
  194. package/dist/node/features/networking.d.ts.map +1 -0
  195. package/dist/node/features/nlp.d.ts +125 -0
  196. package/dist/node/features/nlp.d.ts.map +1 -0
  197. package/dist/node/features/opener.d.ts +93 -0
  198. package/dist/node/features/opener.d.ts.map +1 -0
  199. package/dist/node/features/os.d.ts +168 -0
  200. package/dist/node/features/os.d.ts.map +1 -0
  201. package/dist/node/features/package-finder.d.ts +419 -0
  202. package/dist/node/features/package-finder.d.ts.map +1 -0
  203. package/dist/node/features/postgres.d.ts +173 -0
  204. package/dist/node/features/postgres.d.ts.map +1 -0
  205. package/dist/node/features/proc.d.ts +285 -0
  206. package/dist/node/features/proc.d.ts.map +1 -0
  207. package/dist/node/features/process-manager.d.ts +427 -0
  208. package/dist/node/features/process-manager.d.ts.map +1 -0
  209. package/dist/node/features/python.d.ts +477 -0
  210. package/dist/node/features/python.d.ts.map +1 -0
  211. package/dist/node/features/redis.d.ts +247 -0
  212. package/dist/node/features/redis.d.ts.map +1 -0
  213. package/dist/node/features/repl.d.ts +84 -0
  214. package/dist/node/features/repl.d.ts.map +1 -0
  215. package/dist/node/features/runpod.d.ts +527 -0
  216. package/dist/node/features/runpod.d.ts.map +1 -0
  217. package/dist/node/features/secure-shell.d.ts +145 -0
  218. package/dist/node/features/secure-shell.d.ts.map +1 -0
  219. package/dist/node/features/semantic-search.d.ts +207 -0
  220. package/dist/node/features/semantic-search.d.ts.map +1 -0
  221. package/dist/node/features/sqlite.d.ts +180 -0
  222. package/dist/node/features/sqlite.d.ts.map +1 -0
  223. package/dist/node/features/telegram.d.ts +173 -0
  224. package/dist/node/features/telegram.d.ts.map +1 -0
  225. package/dist/node/features/transpiler.d.ts +51 -0
  226. package/dist/node/features/transpiler.d.ts.map +1 -0
  227. package/dist/node/features/tts.d.ts +108 -0
  228. package/dist/node/features/tts.d.ts.map +1 -0
  229. package/dist/node/features/ui.d.ts +562 -0
  230. package/dist/node/features/ui.d.ts.map +1 -0
  231. package/dist/node/features/vault.d.ts +90 -0
  232. package/dist/node/features/vault.d.ts.map +1 -0
  233. package/dist/node/features/vm.d.ts +285 -0
  234. package/dist/node/features/vm.d.ts.map +1 -0
  235. package/dist/node/features/yaml-tree.d.ts +118 -0
  236. package/dist/node/features/yaml-tree.d.ts.map +1 -0
  237. package/dist/node/features/yaml.d.ts +127 -0
  238. package/dist/node/features/yaml.d.ts.map +1 -0
  239. package/dist/node.d.ts +67 -0
  240. package/dist/node.d.ts.map +1 -0
  241. package/dist/python/generated.d.ts +2 -0
  242. package/dist/python/generated.d.ts.map +1 -0
  243. package/dist/react/index.d.ts +36 -0
  244. package/dist/react/index.d.ts.map +1 -0
  245. package/dist/registry.d.ts +97 -0
  246. package/dist/registry.d.ts.map +1 -0
  247. package/dist/scaffolds/generated.d.ts +13 -0
  248. package/dist/scaffolds/generated.d.ts.map +1 -0
  249. package/dist/scaffolds/template.d.ts +11 -0
  250. package/dist/scaffolds/template.d.ts.map +1 -0
  251. package/dist/schemas/base.d.ts +254 -0
  252. package/dist/schemas/base.d.ts.map +1 -0
  253. package/dist/selector.d.ts +130 -0
  254. package/dist/selector.d.ts.map +1 -0
  255. package/dist/server.d.ts +89 -0
  256. package/dist/server.d.ts.map +1 -0
  257. package/dist/servers/express.d.ts +104 -0
  258. package/dist/servers/express.d.ts.map +1 -0
  259. package/dist/servers/mcp.d.ts +201 -0
  260. package/dist/servers/mcp.d.ts.map +1 -0
  261. package/dist/servers/socket.d.ts +121 -0
  262. package/dist/servers/socket.d.ts.map +1 -0
  263. package/dist/state.d.ts +24 -0
  264. package/dist/state.d.ts.map +1 -0
  265. package/dist/web/clients/socket.d.ts +37 -0
  266. package/dist/web/clients/socket.d.ts.map +1 -0
  267. package/dist/web/container.d.ts +55 -0
  268. package/dist/web/container.d.ts.map +1 -0
  269. package/dist/web/extension.d.ts +4 -0
  270. package/dist/web/extension.d.ts.map +1 -0
  271. package/dist/web/feature.d.ts +8 -0
  272. package/dist/web/feature.d.ts.map +1 -0
  273. package/dist/web/features/asset-loader.d.ts +35 -0
  274. package/dist/web/features/asset-loader.d.ts.map +1 -0
  275. package/dist/web/features/container-link.d.ts +167 -0
  276. package/dist/web/features/container-link.d.ts.map +1 -0
  277. package/dist/web/features/esbuild.d.ts +51 -0
  278. package/dist/web/features/esbuild.d.ts.map +1 -0
  279. package/dist/web/features/helpers.d.ts +140 -0
  280. package/dist/web/features/helpers.d.ts.map +1 -0
  281. package/dist/web/features/network.d.ts +69 -0
  282. package/dist/web/features/network.d.ts.map +1 -0
  283. package/dist/web/features/speech.d.ts +71 -0
  284. package/dist/web/features/speech.d.ts.map +1 -0
  285. package/dist/web/features/vault.d.ts +62 -0
  286. package/dist/web/features/vault.d.ts.map +1 -0
  287. package/dist/web/features/vm.d.ts +48 -0
  288. package/dist/web/features/vm.d.ts.map +1 -0
  289. package/dist/web/features/voice-recognition.d.ts +96 -0
  290. package/dist/web/features/voice-recognition.d.ts.map +1 -0
  291. package/dist/web/shims/isomorphic-vm.d.ts +22 -0
  292. package/dist/web/shims/isomorphic-vm.d.ts.map +1 -0
  293. package/docs/apis/features/agi/assistant.md +1 -0
  294. package/docs/apis/features/agi/assistants-manager.md +62 -2
  295. package/docs/apis/features/agi/auto-assistant.md +11 -109
  296. package/docs/apis/features/agi/claude-code.md +138 -0
  297. package/docs/apis/features/agi/conversation.md +60 -31
  298. package/docs/apis/features/agi/luca-coder.md +407 -0
  299. package/docs/apis/features/agi/openapi.md +2 -2
  300. package/docs/apis/features/agi/skills-library.md +12 -0
  301. package/docs/apis/features/node/python.md +81 -11
  302. package/docs/apis/features/node/transpiler.md +74 -0
  303. package/docs/apis/features/web/esbuild.md +0 -6
  304. package/docs/apis/servers/mcp.md +2 -2
  305. package/docs/examples/entity.md +124 -0
  306. package/docs/ideas/assistant-factory-pattern.md +142 -0
  307. package/package.json +74 -21
  308. package/src/agi/container.server.ts +10 -0
  309. package/src/agi/feature.ts +13 -0
  310. package/src/agi/features/agent-memory.ts +694 -0
  311. package/src/agi/features/assistant.ts +37 -26
  312. package/src/agi/features/assistants-manager.ts +95 -5
  313. package/src/agi/features/autonomous-assistant.ts +1 -5
  314. package/src/agi/features/browser-use.ts +32 -2
  315. package/src/agi/features/claude-code.ts +165 -1
  316. package/src/agi/features/coding-tools.ts +175 -0
  317. package/src/agi/features/conversation-history.ts +2 -6
  318. package/src/agi/features/conversation.ts +95 -3
  319. package/src/agi/features/docs-reader.ts +2 -1
  320. package/src/agi/features/file-tools.ts +35 -28
  321. package/src/agi/features/luca-coder.ts +1 -5
  322. package/src/agi/features/openai-codex.ts +1 -1
  323. package/src/agi/features/openapi.ts +3 -3
  324. package/src/agi/features/skills-library.ts +111 -13
  325. package/src/agi/lib/interceptor-chain.ts +10 -0
  326. package/src/agi/lib/token-counter.ts +1 -1
  327. package/src/bootstrap/generated.ts +126 -1
  328. package/src/bus.ts +27 -5
  329. package/src/cli/build-info.ts +2 -2
  330. package/src/client.ts +2 -2
  331. package/src/clients/elevenlabs/index.ts +5 -0
  332. package/src/clients/voicebox/index.ts +300 -0
  333. package/src/commands/bootstrap.ts +2 -1
  334. package/src/commands/chat.ts +1 -0
  335. package/src/commands/code.ts +4 -2
  336. package/src/commands/prompt.ts +34 -34
  337. package/src/commands/sandbox-mcp.ts +69 -163
  338. package/src/commands/save-api-docs.ts +10 -8
  339. package/src/commands/select.ts +8 -3
  340. package/src/container-describer.ts +70 -84
  341. package/src/container.ts +93 -3
  342. package/src/endpoint.ts +1 -1
  343. package/src/entity.ts +173 -0
  344. package/src/feature.ts +3 -3
  345. package/src/helper.ts +8 -4
  346. package/src/introspection/generated.agi.ts +3012 -1356
  347. package/src/introspection/generated.node.ts +179 -33
  348. package/src/introspection/generated.web.ts +95 -3
  349. package/src/introspection/scan.ts +1 -1
  350. package/src/node/container.ts +1 -1
  351. package/src/node/features/content-db.ts +57 -30
  352. package/src/node/features/file-manager.ts +10 -9
  353. package/src/node/features/git.ts +5 -5
  354. package/src/node/features/helpers.ts +1 -1
  355. package/src/node/features/json-tree.ts +1 -1
  356. package/src/node/features/os.ts +3 -3
  357. package/src/node/features/package-finder.ts +1 -1
  358. package/src/node/features/process-manager.ts +51 -18
  359. package/src/node/features/python.ts +3 -3
  360. package/src/node/features/redis.ts +1 -1
  361. package/src/node/features/repl.ts +2 -2
  362. package/src/node/features/transpiler.ts +2 -2
  363. package/src/node/features/ui.ts +1 -1
  364. package/src/node/features/vm.ts +3 -3
  365. package/src/node/features/yaml-tree.ts +1 -1
  366. package/src/node.ts +1 -0
  367. package/src/python/generated.ts +1 -1
  368. package/src/scaffolds/generated.ts +1 -1
  369. package/src/selector.ts +74 -4
  370. package/src/server.ts +2 -2
  371. package/src/servers/mcp.ts +6 -6
  372. package/src/web/features/helpers.ts +1 -1
  373. package/src/web/features/network.ts +1 -0
  374. package/test/assistant.test.ts +14 -5
  375. package/test/conversation.test.ts +220 -0
  376. package/test-integration/memory.test.ts +204 -0
  377. package/tsconfig.build.json +12 -0
  378. package/tsconfig.json +1 -1
  379. package/scripts/examples/telegram-ink-ui.ts +0 -302
  380. package/scripts/examples/using-openai-codex.ts +0 -23
  381. package/scripts/examples/vm-loading-esm-modules.ts +0 -16
@@ -0,0 +1,108 @@
1
+ import { z } from 'zod';
2
+ import { Feature } from '../feature.js';
3
+ export declare const TTSOptionsSchema: z.ZodObject<{
4
+ name: z.ZodOptional<z.ZodString>;
5
+ _cacheKey: z.ZodOptional<z.ZodString>;
6
+ cached: z.ZodOptional<z.ZodBoolean>;
7
+ enable: z.ZodOptional<z.ZodBoolean>;
8
+ apiKey: z.ZodOptional<z.ZodString>;
9
+ voice: z.ZodOptional<z.ZodString>;
10
+ outputDir: z.ZodOptional<z.ZodString>;
11
+ format: z.ZodDefault<z.ZodEnum<{
12
+ wav: "wav";
13
+ flac: "flac";
14
+ ogg: "ogg";
15
+ }>>;
16
+ }, z.core.$strip>;
17
+ export type TTSOptions = z.infer<typeof TTSOptionsSchema>;
18
+ export declare const TTSStateSchema: z.ZodObject<{
19
+ enabled: z.ZodDefault<z.ZodBoolean>;
20
+ lastFile: z.ZodOptional<z.ZodString>;
21
+ lastText: z.ZodOptional<z.ZodString>;
22
+ generating: z.ZodDefault<z.ZodBoolean>;
23
+ }, z.core.$loose>;
24
+ export type TTSState = z.infer<typeof TTSStateSchema>;
25
+ export declare const TTSEventsSchema: z.ZodObject<{
26
+ stateChange: z.ZodTuple<[z.ZodAny], null>;
27
+ enabled: z.ZodTuple<[], null>;
28
+ synthesized: z.ZodTuple<[z.ZodString, z.ZodString, z.ZodString, z.ZodNumber], null>;
29
+ error: z.ZodTuple<[z.ZodAny], null>;
30
+ }, z.core.$strip>;
31
+ /**
32
+ * TTS feature — synthesizes text to audio files via RunPod's Chatterbox Turbo endpoint.
33
+ *
34
+ * Generates high-quality speech audio by calling the Chatterbox Turbo public endpoint
35
+ * on RunPod, downloads the resulting audio, and saves it locally. Supports 20 preset
36
+ * voices and voice cloning via a reference audio URL.
37
+ *
38
+ * @example
39
+ * ```typescript
40
+ * const tts = container.feature('tts', { enable: true })
41
+ * const path = await tts.synthesize('Hello, how are you?', { voice: 'lucy' })
42
+ * console.log(`Audio saved to: ${path}`)
43
+ * ```
44
+ */
45
+ export declare class TTS extends Feature<TTSState, TTSOptions> {
46
+ static shortcut: "features.tts";
47
+ static envVars: string[];
48
+ static stateSchema: z.ZodObject<{
49
+ enabled: z.ZodDefault<z.ZodBoolean>;
50
+ lastFile: z.ZodOptional<z.ZodString>;
51
+ lastText: z.ZodOptional<z.ZodString>;
52
+ generating: z.ZodDefault<z.ZodBoolean>;
53
+ }, z.core.$loose>;
54
+ static optionsSchema: z.ZodObject<{
55
+ name: z.ZodOptional<z.ZodString>;
56
+ _cacheKey: z.ZodOptional<z.ZodString>;
57
+ cached: z.ZodOptional<z.ZodBoolean>;
58
+ enable: z.ZodOptional<z.ZodBoolean>;
59
+ apiKey: z.ZodOptional<z.ZodString>;
60
+ voice: z.ZodOptional<z.ZodString>;
61
+ outputDir: z.ZodOptional<z.ZodString>;
62
+ format: z.ZodDefault<z.ZodEnum<{
63
+ wav: "wav";
64
+ flac: "flac";
65
+ ogg: "ogg";
66
+ }>>;
67
+ }, z.core.$strip>;
68
+ static eventsSchema: z.ZodObject<{
69
+ stateChange: z.ZodTuple<[z.ZodAny], null>;
70
+ enabled: z.ZodTuple<[], null>;
71
+ synthesized: z.ZodTuple<[z.ZodString, z.ZodString, z.ZodString, z.ZodNumber], null>;
72
+ error: z.ZodTuple<[z.ZodAny], null>;
73
+ }, z.core.$strip>;
74
+ /** RunPod API key from options or environment. */
75
+ get apiKey(): string;
76
+ /** Directory where generated audio files are saved. */
77
+ get outputDir(): string;
78
+ /** The 20 preset voice names available in Chatterbox Turbo. */
79
+ get voices(): readonly string[];
80
+ /**
81
+ * Synthesize text to an audio file using Chatterbox Turbo.
82
+ *
83
+ * Calls the RunPod public endpoint, downloads the generated audio,
84
+ * and saves it to the output directory.
85
+ *
86
+ * @param text - The text to synthesize into speech
87
+ * @param options - Override voice, format, or provide a voiceUrl for cloning
88
+ * @returns Absolute path to the generated audio file
89
+ *
90
+ * @example
91
+ * ```typescript
92
+ * // Use a preset voice
93
+ * const path = await tts.synthesize('Good morning!', { voice: 'ethan' })
94
+ *
95
+ * // Clone a voice from a reference audio URL
96
+ * const path = await tts.synthesize('Hello world', {
97
+ * voiceUrl: 'https://example.com/reference.wav'
98
+ * })
99
+ * ```
100
+ */
101
+ synthesize(text: string, options?: {
102
+ voice?: string;
103
+ format?: 'wav' | 'flac' | 'ogg';
104
+ voiceUrl?: string;
105
+ }): Promise<string>;
106
+ }
107
+ export default TTS;
108
+ //# sourceMappingURL=tts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tts.d.ts","sourceRoot":"","sources":["../../../src/node/features/tts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAcvC,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;iBAK3B,CAAA;AACF,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAA;AAEzD,eAAO,MAAM,cAAc;;;;;iBAIzB,CAAA;AACF,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAA;AAErD,eAAO,MAAM,eAAe;;;;;iBAU1B,CAAA;AAEF;;;;;;;;;;;;;GAaG;AACH,qBAAa,GAAI,SAAQ,OAAO,CAAC,QAAQ,EAAE,UAAU,CAAC;IACpD,OAAgB,QAAQ,EAAG,cAAc,CAAS;IAClD,OAAgB,OAAO,WAAqB;IAC5C,OAAgB,WAAW;;;;;sBAAiB;IAC5C,OAAgB,aAAa;;;;;;;;;;;;;sBAAmB;IAChD,OAAgB,YAAY;;;;;sBAAkB;IAG9C,kDAAkD;IAClD,IAAI,MAAM,IAAI,MAAM,CAEnB;IAED,uDAAuD;IACvD,IAAI,SAAS,IAAI,MAAM,CAEtB;IAED,+DAA+D;IAC/D,IAAI,MAAM,IAAI,SAAS,MAAM,EAAE,CAE9B;IAED;;;;;;;;;;;;;;;;;;;;OAoBG;IACG,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE;QACvC,KAAK,CAAC,EAAE,MAAM,CAAA;QACd,MAAM,CAAC,EAAE,KAAK,GAAG,MAAM,GAAG,KAAK,CAAA;QAC/B,QAAQ,CAAC,EAAE,MAAM,CAAA;KAClB,GAAG,OAAO,CAAC,MAAM,CAAC;CA6EpB;AAED,eAAe,GAAG,CAAA"}
@@ -0,0 +1,562 @@
1
+ import { z } from 'zod';
2
+ import { Feature } from "../feature.js";
3
+ import colors from "chalk";
4
+ import type { Fonts } from "figlet";
5
+ /**
6
+ * Zod schema for the UI feature state.
7
+ * Manages terminal UI configuration and cached data.
8
+ */
9
+ export declare const UIStateSchema: z.ZodObject<{
10
+ enabled: z.ZodDefault<z.ZodBoolean>;
11
+ fonts: z.ZodOptional<z.ZodArray<z.ZodString>>;
12
+ colorPalette: z.ZodOptional<z.ZodArray<z.ZodString>>;
13
+ }, z.core.$loose>;
14
+ type UIState = z.infer<typeof UIStateSchema>;
15
+ /** Type representing available chalk color functions */
16
+ type Color = keyof typeof colors;
17
+ /** Basic print function signature */
18
+ type PrintFunction = (...args: any[]) => void;
19
+ /** Enhanced print function with color methods attached */
20
+ type ColoredPrintFunction = PrintFunction & {
21
+ [color in Color]: (...args: any[]) => void;
22
+ };
23
+ /**
24
+ * UI Feature - Interactive Terminal User Interface Builder
25
+ *
26
+ * Unified interface for building professional CLI experiences using chalk (colors/styles),
27
+ * figlet (ASCII art), and inquirer (interactive prompts). Provides rich color management,
28
+ * automatic color assignment, text gradients, banner generation, padding utilities,
29
+ * markdown rendering, and interactive wizards.
30
+ */
31
+ export declare class UI<T extends UIState = UIState> extends Feature<T> {
32
+ /** The shortcut path for accessing this feature */
33
+ static shortcut: "features.ui";
34
+ static stateSchema: z.ZodObject<{
35
+ enabled: z.ZodDefault<z.ZodBoolean>;
36
+ fonts: z.ZodOptional<z.ZodArray<z.ZodString>>;
37
+ colorPalette: z.ZodOptional<z.ZodArray<z.ZodString>>;
38
+ }, z.core.$loose>;
39
+ /**
40
+ * Gets the initial state configuration for the UI feature.
41
+ * Sets up default color palette and initializes empty fonts array.
42
+ *
43
+ * @returns The initial state with enabled flag, color palette, and fonts array
44
+ */
45
+ get initialState(): T;
46
+ /** Enhanced print function with color methods for convenient terminal output */
47
+ print: ColoredPrintFunction;
48
+ /**
49
+ * Parse markdown text and render it for terminal display using marked-terminal.
50
+ *
51
+ * @param text - The markdown string to parse and render
52
+ * @returns The rendered terminal-formatted string
53
+ */
54
+ markdown(text: string): string | Promise<string>;
55
+ /**
56
+ * Provides access to the full chalk colors API.
57
+ *
58
+ * Chalk provides extensive color and styling capabilities including:
59
+ * - Basic colors: red, green, blue, yellow, etc.
60
+ * - Background colors: bgRed, bgGreen, etc.
61
+ * - Styles: bold, italic, underline, strikethrough
62
+ * - Advanced: rgb, hex, hsl color support
63
+ *
64
+ * Colors and styles can be chained for complex formatting.
65
+ *
66
+ * @returns The chalk colors object with all styling methods
67
+ *
68
+ * @example
69
+ * ```typescript
70
+ * // Basic colors
71
+ * ui.colors.red('Error message')
72
+ * ui.colors.green('Success!')
73
+ *
74
+ * // Chained styling
75
+ * ui.colors.blue.bold.underline('Important link')
76
+ * ui.colors.white.bgRed.bold(' ALERT ')
77
+ *
78
+ * // Hex and RGB colors
79
+ * ui.colors.hex('#FF5733')('Custom color')
80
+ * ui.colors.rgb(255, 87, 51)('RGB color')
81
+ * ```
82
+ */
83
+ get colors(): typeof colors;
84
+ /**
85
+ * Gets the current color palette used for automatic color assignment.
86
+ *
87
+ * The color palette is a predefined set of hex colors that are automatically
88
+ * assigned to named entities in a cycling fashion. This ensures consistent
89
+ * color assignment across the application.
90
+ *
91
+ * @returns Array of hex color strings for automatic assignment
92
+ */
93
+ get colorPalette(): string[];
94
+ /**
95
+ * Assigns a consistent color to a named entity.
96
+ *
97
+ * This method provides automatic color assignment that remains consistent across
98
+ * the application session. Each unique name gets assigned a color from the palette,
99
+ * and subsequent calls with the same name return the same color function.
100
+ *
101
+ * **Assignment Strategy:**
102
+ * - First call with a name assigns the next available palette color
103
+ * - Subsequent calls return the previously assigned color
104
+ * - Colors cycle through the palette when all colors are used
105
+ * - Returns a chalk hex color function for styling text
106
+ *
107
+ * @param name - The unique identifier to assign a color to
108
+ * @returns A chalk color function for styling text with the assigned color
109
+ *
110
+ * @example
111
+ * ```typescript
112
+ * // Assign colors to users
113
+ * const johnColor = ui.assignColor('john');
114
+ * const janeColor = ui.assignColor('jane');
115
+ *
116
+ * // Use consistently throughout the app
117
+ * console.log(johnColor('John: Hello there!'));
118
+ * console.log(janeColor('Jane: Hi John!'));
119
+ * console.log(johnColor('John: How are you?')); // Same color as before
120
+ *
121
+ * // Different entities get different colors
122
+ * const errorColor = ui.assignColor('error');
123
+ * const successColor = ui.assignColor('success');
124
+ * ```
125
+ */
126
+ assignColor(name: string): (str: string) => string;
127
+ /**
128
+ * Gets a random color name from the available chalk colors.
129
+ *
130
+ * This provides access to a randomly selected color from chalk's built-in
131
+ * color set. Useful for adding variety to terminal output or testing.
132
+ *
133
+ * @returns A random color name that can be used with chalk
134
+ *
135
+ * @example
136
+ * ```typescript
137
+ * const randomColor = ui.randomColor;
138
+ * console.log(ui.colors[randomColor]('This text is a random color!'));
139
+ *
140
+ * // Use in loops for varied output
141
+ * items.forEach(item => {
142
+ * const color = ui.randomColor;
143
+ * console.log(ui.colors[color](`- ${item}`));
144
+ * });
145
+ * ```
146
+ */
147
+ get randomColor(): string | undefined;
148
+ /**
149
+ * Gets an array of available fonts for ASCII art generation.
150
+ *
151
+ * This method provides access to all fonts available through figlet for
152
+ * creating ASCII art. The fonts are automatically discovered and cached
153
+ * on first access for performance.
154
+ *
155
+ * **Font Discovery:**
156
+ * - Fonts are loaded from figlet's built-in font collection
157
+ * - Results are cached in state to avoid repeated file system access
158
+ * - Returns comprehensive list of available font names
159
+ *
160
+ * @returns Array of font names that can be used with asciiArt() and banner()
161
+ *
162
+ * @example
163
+ * ```typescript
164
+ * // List all available fonts
165
+ * const fonts = ui.fonts;
166
+ * console.log(`Available fonts: ${fonts.join(', ')}`);
167
+ *
168
+ * // Use random font for variety
169
+ * const randomFont = fonts[Math.floor(Math.random() * fonts.length)];
170
+ * const art = ui.asciiArt('Hello', randomFont);
171
+ *
172
+ * // Common fonts: 'Big', 'Standard', 'Small', 'Slant', '3D-ASCII'
173
+ * ```
174
+ */
175
+ get fonts(): string[];
176
+ /**
177
+ * Creates an interactive wizard using inquirer prompts.
178
+ *
179
+ * This method provides a convenient wrapper around inquirer for creating
180
+ * interactive command-line wizards. It supports all inquirer question types
181
+ * and can handle complex validation and conditional logic.
182
+ *
183
+ * **Supported Question Types:**
184
+ * - input: Text input fields
185
+ * - confirm: Yes/no confirmations
186
+ * - list: Single selection from options
187
+ * - checkbox: Multiple selections
188
+ * - password: Hidden text input
189
+ * - editor: External editor integration
190
+ *
191
+ * **Advanced Features:**
192
+ * - Conditional questions based on previous answers
193
+ * - Input validation and transformation
194
+ * - Custom prompts and styling
195
+ * - Initial answer pre-population
196
+ *
197
+ * @param questions - Array of inquirer question objects
198
+ * @param initialAnswers - Pre-populated answers to skip questions or provide defaults
199
+ * @returns Promise resolving to the user's answers object
200
+ *
201
+ * @example
202
+ * ```typescript
203
+ * // Basic wizard
204
+ * const answers = await ui.wizard([
205
+ * {
206
+ * type: 'input',
207
+ * name: 'projectName',
208
+ * message: 'What is your project name?',
209
+ * validate: (input) => input.length > 0 || 'Name is required'
210
+ * },
211
+ * {
212
+ * type: 'list',
213
+ * name: 'framework',
214
+ * message: 'Choose a framework:',
215
+ * choices: ['React', 'Vue', 'Angular', 'Svelte']
216
+ * },
217
+ * {
218
+ * type: 'confirm',
219
+ * name: 'typescript',
220
+ * message: 'Use TypeScript?',
221
+ * default: true
222
+ * }
223
+ * ]);
224
+ *
225
+ * console.log(`Creating ${answers.projectName} with ${answers.framework}`);
226
+ *
227
+ * // With initial answers
228
+ * const moreAnswers = await ui.wizard([
229
+ * { type: 'input', name: 'version', message: 'Version?' }
230
+ * ], { version: '1.0.0' });
231
+ * ```
232
+ */
233
+ wizard(questions: any[], initialAnswers?: any): Promise<any>;
234
+ /**
235
+ * Prompt the user with a single text input question.
236
+ *
237
+ * @param question - The question message to display
238
+ * @returns Promise resolving to the answers object with a `question` key
239
+ */
240
+ askQuestion(question: string): Promise<any>;
241
+ /**
242
+ * Opens text in the user's external editor for editing.
243
+ *
244
+ * This method integrates with the user's configured editor (via $EDITOR or $VISUAL
245
+ * environment variables) to allow editing of text content. The edited content is
246
+ * returned when the user saves and closes the editor.
247
+ *
248
+ * **Editor Integration:**
249
+ * - Respects $EDITOR and $VISUAL environment variables
250
+ * - Creates temporary file with specified extension
251
+ * - Returns modified content after editor closes
252
+ * - Handles editor cancellation gracefully
253
+ *
254
+ * @param text - The initial text content to edit
255
+ * @param extension - File extension for syntax highlighting (default: ".ts")
256
+ * @returns Promise resolving to the edited text content
257
+ *
258
+ * @example
259
+ * ```typescript
260
+ * // Edit code snippet
261
+ * const code = `function hello() {\n console.log('Hello');\n}`;
262
+ * const editedCode = await ui.openInEditor(code, '.js');
263
+ *
264
+ * // Edit configuration
265
+ * const config = JSON.stringify({ port: 3000 }, null, 2);
266
+ * const newConfig = await ui.openInEditor(config, '.json');
267
+ *
268
+ * // Edit markdown content
269
+ * const markdown = '# Title\n\nContent here...';
270
+ * const editedMarkdown = await ui.openInEditor(markdown, '.md');
271
+ * ```
272
+ */
273
+ openInEditor(text: string, extension?: string): Promise<unknown>;
274
+ /**
275
+ * Generates ASCII art from text using the specified font.
276
+ *
277
+ * This method converts regular text into stylized ASCII art using figlet's
278
+ * extensive font collection. Perfect for creating eye-catching headers,
279
+ * logos, and decorative text in terminal applications.
280
+ *
281
+ * **Font Capabilities:**
282
+ * - Large collection of artistic fonts
283
+ * - Various styles: block, script, decorative, technical
284
+ * - Different sizes and character sets
285
+ * - Consistent spacing and alignment
286
+ *
287
+ * @param text - The text to convert to ASCII art
288
+ * @param font - The figlet font to use (see fonts property for available options)
289
+ * @returns The ASCII art representation of the text
290
+ *
291
+ * @throws {Error} When the specified font is not available
292
+ *
293
+ * @example
294
+ * ```typescript
295
+ * // Create a banner
296
+ * const banner = ui.asciiArt('WELCOME', 'Big');
297
+ * console.log(banner);
298
+ *
299
+ * // Different fonts for different purposes
300
+ * const title = ui.asciiArt('MyApp', 'Standard');
301
+ * const subtitle = ui.asciiArt('v2.0', 'Small');
302
+ *
303
+ * // Technical/coding themes
304
+ * const code = ui.asciiArt('CODE', '3D-ASCII');
305
+ *
306
+ * // List available fonts first
307
+ * console.log('Available fonts:', ui.fonts.slice(0, 10).join(', '));
308
+ * ```
309
+ */
310
+ asciiArt(text: string, font: Fonts): string;
311
+ /**
312
+ * Creates a styled banner with ASCII art and color gradients.
313
+ *
314
+ * This method combines ASCII art generation with color gradient effects to create
315
+ * visually striking banners for terminal applications. It automatically applies
316
+ * color gradients to the generated ASCII art based on the specified options.
317
+ *
318
+ * **Banner Features:**
319
+ * - ASCII art text generation
320
+ * - Automatic color gradient application
321
+ * - Customizable gradient directions
322
+ * - Multiple color combinations
323
+ * - Professional terminal presentation
324
+ *
325
+ * @param text - The text to convert to a styled banner
326
+ * @param options - Banner styling options
327
+ * @param options.font - The figlet font to use for ASCII art generation
328
+ * @param options.colors - Array of colors for the gradient effect
329
+ * @returns The styled banner with ASCII art and color gradients
330
+ *
331
+ * @throws {Error} When required options are missing or invalid
332
+ *
333
+ * @example
334
+ * ```typescript
335
+ * // Classic patriotic banner
336
+ * const banner = ui.banner('AMERICA', {
337
+ * font: 'Big',
338
+ * colors: ['red', 'white', 'blue']
339
+ * });
340
+ * console.log(banner);
341
+ *
342
+ * // Tech company banner
343
+ * const techBanner = ui.banner('TechCorp', {
344
+ * font: 'Slant',
345
+ * colors: ['cyan', 'blue', 'magenta']
346
+ * });
347
+ *
348
+ * // Warning banner
349
+ * const warningBanner = ui.banner('WARNING', {
350
+ * font: 'Standard',
351
+ * colors: ['yellow', 'red']
352
+ * });
353
+ *
354
+ * // Available fonts: see ui.fonts property
355
+ * // Available colors: any chalk color names
356
+ * ```
357
+ */
358
+ banner(text: string, options?: {
359
+ font: Fonts;
360
+ colors: Color[];
361
+ }): string;
362
+ /**
363
+ * Dedent and format a tagged template literal using endent.
364
+ * Strips leading indentation while preserving relative indentation.
365
+ *
366
+ * @param args - Tagged template literal arguments
367
+ * @returns The dedented string
368
+ */
369
+ endent(...args: any[]): string;
370
+ /**
371
+ * Applies color gradients to text with configurable direction.
372
+ *
373
+ * This method creates smooth color transitions across text content, supporting
374
+ * both horizontal (character-by-character) and vertical (line-by-line) gradients.
375
+ * Perfect for creating visually appealing terminal output and ASCII art effects.
376
+ *
377
+ * **Gradient Types:**
378
+ * - Horizontal: Colors transition across characters in each line
379
+ * - Vertical: Colors transition across lines of text
380
+ * - Customizable color sequences and transitions
381
+ * - Automatic color cycling for long content
382
+ *
383
+ * @param text - The text content to apply gradients to
384
+ * @param lineColors - Array of colors to cycle through in the gradient
385
+ * @param direction - Gradient direction: 'horizontal' or 'vertical'
386
+ * @returns The text with applied color gradients
387
+ *
388
+ * @example
389
+ * ```typescript
390
+ * // Horizontal rainbow effect
391
+ * const rainbow = ui.applyGradient('Hello World!',
392
+ * ['red', 'yellow', 'green', 'cyan', 'blue', 'magenta'],
393
+ * 'horizontal'
394
+ * );
395
+ *
396
+ * // Vertical gradient for multi-line text
397
+ * const multiline = 'Line 1\nLine 2\nLine 3\nLine 4';
398
+ * const vertical = ui.applyGradient(multiline,
399
+ * ['red', 'white', 'blue'],
400
+ * 'vertical'
401
+ * );
402
+ *
403
+ * // Fire effect
404
+ * const fire = ui.applyGradient('FIRE', ['red', 'yellow'], 'horizontal');
405
+ *
406
+ * // Ocean effect
407
+ * const ocean = ui.applyGradient('OCEAN', ['blue', 'cyan', 'white'], 'vertical');
408
+ * ```
409
+ */
410
+ applyGradient(text: string, lineColors?: Color[], direction?: "horizontal" | "vertical"): string;
411
+ /**
412
+ * Applies horizontal color gradients character by character.
413
+ *
414
+ * This method creates color transitions across characters within the text,
415
+ * cycling through the provided colors to create smooth horizontal gradients.
416
+ * Each character gets assigned a color based on its position in the sequence.
417
+ *
418
+ * **Horizontal Gradient Behavior:**
419
+ * - Each character is individually colored
420
+ * - Colors cycle through the provided array
421
+ * - Creates smooth transitions across text width
422
+ * - Works well with ASCII art and single lines
423
+ *
424
+ * @param text - The text to apply horizontal gradients to
425
+ * @param lineColors - Array of colors to cycle through
426
+ * @returns Text with horizontal color gradients applied
427
+ *
428
+ * @example
429
+ * ```typescript
430
+ * // Rainbow effect across characters
431
+ * const rainbow = ui.applyHorizontalGradient('RAINBOW',
432
+ * ['red', 'yellow', 'green', 'cyan', 'blue', 'magenta']
433
+ * );
434
+ *
435
+ * // Simple two-color transition
436
+ * const sunset = ui.applyHorizontalGradient('SUNSET', ['red', 'orange']);
437
+ *
438
+ * // Great for short text and ASCII art
439
+ * const art = ui.asciiArt('COOL', 'Big');
440
+ * const coloredArt = ui.applyHorizontalGradient(art, ['cyan', 'blue']);
441
+ * ```
442
+ */
443
+ applyHorizontalGradient(text: string, lineColors?: Color[]): string;
444
+ /**
445
+ * Applies vertical color gradients line by line.
446
+ *
447
+ * This method creates color transitions across lines of text, with each line
448
+ * getting a different color from the sequence. Perfect for multi-line content
449
+ * like ASCII art, banners, and structured output.
450
+ *
451
+ * **Vertical Gradient Behavior:**
452
+ * - Each line is colored uniformly
453
+ * - Colors cycle through the provided array
454
+ * - Creates smooth transitions across text height
455
+ * - Ideal for multi-line ASCII art and structured content
456
+ *
457
+ * @param text - The text to apply vertical gradients to (supports newlines)
458
+ * @param lineColors - Array of colors to cycle through for each line
459
+ * @returns Text with vertical color gradients applied
460
+ *
461
+ * @example
462
+ * ```typescript
463
+ * // Patriotic vertical gradient
464
+ * const flag = 'USA\nUSA\nUSA\nUSA';
465
+ * const patriotic = ui.applyVerticalGradient(flag, ['red', 'white', 'blue']);
466
+ *
467
+ * // Sunset effect on ASCII art
468
+ * const banner = ui.asciiArt('SUNSET', 'Big');
469
+ * const sunset = ui.applyVerticalGradient(banner,
470
+ * ['yellow', 'orange', 'red', 'purple']
471
+ * );
472
+ *
473
+ * // Ocean waves effect
474
+ * const waves = 'Wave 1\nWave 2\nWave 3\nWave 4\nWave 5';
475
+ * const ocean = ui.applyVerticalGradient(waves, ['cyan', 'blue']);
476
+ * ```
477
+ */
478
+ applyVerticalGradient(text: string, lineColors?: Color[]): string;
479
+ /**
480
+ * Pads text on the left to reach the specified length.
481
+ *
482
+ * This utility method adds padding characters to the left side of text to achieve
483
+ * a desired total length. Useful for creating aligned columns, formatted tables,
484
+ * and consistent text layout in terminal applications.
485
+ *
486
+ * **Padding Behavior:**
487
+ * - Adds padding to the left (start) of the string
488
+ * - Uses specified padding character (default: space)
489
+ * - Returns original string if already at or beyond target length
490
+ * - Handles multi-character padding by repeating the character
491
+ *
492
+ * @param str - The string to pad
493
+ * @param length - The desired total length after padding
494
+ * @param padChar - The character to use for padding (default: " ")
495
+ * @returns The left-padded string
496
+ *
497
+ * @example
498
+ * ```typescript
499
+ * // Number alignment
500
+ * const numbers = ['1', '23', '456'];
501
+ * numbers.forEach(num => {
502
+ * console.log(ui.padLeft(num, 5, '0')); // '00001', '00023', '00456'
503
+ * });
504
+ *
505
+ * // Text alignment in columns
506
+ * const items = ['apple', 'banana', 'cherry'];
507
+ * items.forEach(item => {
508
+ * console.log(ui.padLeft(item, 10) + ' | Price: $1.00');
509
+ * });
510
+ *
511
+ * // Custom padding character
512
+ * const title = ui.padLeft('TITLE', 20, '-'); // '---------------TITLE'
513
+ * ```
514
+ */
515
+ padLeft(str: string, length: number, padChar?: string): string;
516
+ /**
517
+ * Pads text on the right to reach the specified length.
518
+ *
519
+ * This utility method adds padding characters to the right side of text to achieve
520
+ * a desired total length. Essential for creating properly aligned columns, tables,
521
+ * and formatted output in terminal applications.
522
+ *
523
+ * **Padding Behavior:**
524
+ * - Adds padding to the right (end) of the string
525
+ * - Uses specified padding character (default: space)
526
+ * - Returns original string if already at or beyond target length
527
+ * - Handles multi-character padding by repeating the character
528
+ *
529
+ * @param str - The string to pad
530
+ * @param length - The desired total length after padding
531
+ * @param padChar - The character to use for padding (default: " ")
532
+ * @returns The right-padded string
533
+ *
534
+ * @example
535
+ * ```typescript
536
+ * // Create aligned table columns
537
+ * const data = [
538
+ * ['Name', 'Age', 'City'],
539
+ * ['John', '25', 'NYC'],
540
+ * ['Jane', '30', 'LA'],
541
+ * ['Bob', '35', 'Chicago']
542
+ * ];
543
+ *
544
+ * data.forEach(row => {
545
+ * const formatted = row.map((cell, i) => {
546
+ * const widths = [15, 5, 10];
547
+ * return ui.padRight(cell, widths[i]);
548
+ * }).join(' | ');
549
+ * console.log(formatted);
550
+ * });
551
+ *
552
+ * // Progress bars
553
+ * const progress = ui.padRight('████', 20, '░'); // '████░░░░░░░░░░░░░░░░'
554
+ *
555
+ * // Menu items with dots
556
+ * const menuItem = ui.padRight('Coffee', 20, '.') + '$3.50';
557
+ * ```
558
+ */
559
+ padRight(str: string, length: number, padChar?: string): string;
560
+ }
561
+ export default UI;
562
+ //# sourceMappingURL=ui.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ui.d.ts","sourceRoot":"","sources":["../../../src/node/features/ui.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,MAAM,MAAM,OAAO,CAAC;AAC3B,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAYpC;;;GAGG;AACH,eAAO,MAAM,aAAa;;;;iBAKxB,CAAA;AACF,KAAK,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAA;AAK5C,wDAAwD;AACxD,KAAK,KAAK,GAAG,MAAM,OAAO,MAAM,CAAC;AAEjC,qCAAqC;AACrC,KAAK,aAAa,GAAG,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,CAAC;AAE9C,0DAA0D;AAC1D,KAAK,oBAAoB,GAAG,aAAa,GAAG;KACzC,KAAK,IAAI,KAAK,GAAG,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI;CAC3C,CAAA;AAED;;;;;;;GAOG;AACH,qBAAa,EAAE,CAAC,CAAC,SAAS,OAAO,GAAG,OAAO,CAAE,SAAQ,OAAO,CAAC,CAAC,CAAC;IAE7D,mDAAmD;IACnD,OAAgB,QAAQ,EAAG,aAAa,CAAS;IACjD,OAAgB,WAAW;;;;sBAAgB;IAE3C;;;;;OAKG;IACH,IAAa,YAAY,IAAK,CAAC,CAM9B;IAED,gFAAgF;IAChF,KAAK,EAAE,oBAAoB,CAqBD;IAE1B;;;;;OAKG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAKhD;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2BG;IACH,IAAI,MAAM,IAAI,OAAO,MAAM,CAE1B;IAED;;;;;;;;OAQG;IACH,IAAI,YAAY,IAAI,MAAM,EAAE,CAE3B;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA+BG;IACH,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM;IAclD;;;;;;;;;;;;;;;;;;;OAmBG;IACH,IAAI,WAAW,IAAI,MAAM,GAAG,SAAS,CAKpC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;OA0BG;IACH,IAAI,KAAK,IAAI,MAAM,EAAE,CAQpB;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAwDG;IACH,MAAM,CAAC,SAAS,EAAE,GAAG,EAAE,EAAE,cAAc,GAAE,GAAQ,GAAG,OAAO,CAAC,GAAG,CAAC;IAIhE;;;;;OAKG;IACH,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC;IAQ3C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA+BG;IACG,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,SAAQ,GAAG,OAAO,CAAC,OAAO,CAAC;IAsBrE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAmCG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,GAAG,MAAM;IAI3C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA8CG;IACH,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,GAAE;QAAE,IAAI,EAAE,KAAK,CAAC;QAAC,MAAM,EAAE,KAAK,EAAE,CAAA;KAA4D,GAAG,MAAM;IAOjI;;;;;;OAMG;IACH,MAAM,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,MAAM;IAK9B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAuCG;IACH,aAAa,CACX,IAAI,EAAE,MAAM,EACZ,UAAU,GAAE,KAAK,EAA6B,EAC9C,SAAS,GAAE,YAAY,GAAG,UAAyB,GAClD,MAAM;IAQT;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA+BG;IACH,uBAAuB,CACrB,IAAI,EAAE,MAAM,EACZ,UAAU,GAAE,KAAK,EAA6B,GAC7C,MAAM;IAeT;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAiCG;IACH,qBAAqB,CACnB,IAAI,EAAE,MAAM,EACZ,UAAU,GAAE,KAAK,EAA6B,GAC7C,MAAM;IAcT;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAmCG;IACH,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,SAAM,GAAG,MAAM;IAY3D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA0CG;IACH,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,SAAM,GAAG,MAAM;CAU7D;AAED,eAAe,EAAE,CAAA"}