@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,485 @@
1
+ import { z } from 'zod';
2
+ import { Feature } from '../feature.js';
3
+ export declare const DockerContainerSchema: z.ZodObject<{
4
+ id: z.ZodString;
5
+ name: z.ZodString;
6
+ image: z.ZodString;
7
+ status: z.ZodString;
8
+ ports: z.ZodArray<z.ZodString>;
9
+ created: z.ZodString;
10
+ }, z.core.$strip>;
11
+ export type DockerContainer = z.infer<typeof DockerContainerSchema>;
12
+ export declare const DockerImageSchema: z.ZodObject<{
13
+ id: z.ZodString;
14
+ repository: z.ZodString;
15
+ tag: z.ZodString;
16
+ size: z.ZodString;
17
+ created: z.ZodString;
18
+ }, z.core.$strip>;
19
+ export type DockerImage = z.infer<typeof DockerImageSchema>;
20
+ export declare const DockerStateSchema: z.ZodObject<{
21
+ enabled: z.ZodDefault<z.ZodBoolean>;
22
+ containers: z.ZodArray<z.ZodObject<{
23
+ id: z.ZodString;
24
+ name: z.ZodString;
25
+ image: z.ZodString;
26
+ status: z.ZodString;
27
+ ports: z.ZodArray<z.ZodString>;
28
+ created: z.ZodString;
29
+ }, z.core.$strip>>;
30
+ images: z.ZodArray<z.ZodObject<{
31
+ id: z.ZodString;
32
+ repository: z.ZodString;
33
+ tag: z.ZodString;
34
+ size: z.ZodString;
35
+ created: z.ZodString;
36
+ }, z.core.$strip>>;
37
+ isDockerAvailable: z.ZodBoolean;
38
+ lastError: z.ZodOptional<z.ZodString>;
39
+ }, z.core.$loose>;
40
+ export type DockerState = z.infer<typeof DockerStateSchema>;
41
+ export declare const DockerOptionsSchema: z.ZodObject<{
42
+ name: z.ZodOptional<z.ZodString>;
43
+ _cacheKey: z.ZodOptional<z.ZodString>;
44
+ cached: z.ZodOptional<z.ZodBoolean>;
45
+ enable: z.ZodOptional<z.ZodBoolean>;
46
+ dockerPath: z.ZodOptional<z.ZodString>;
47
+ timeout: z.ZodOptional<z.ZodNumber>;
48
+ autoRefresh: z.ZodOptional<z.ZodBoolean>;
49
+ }, z.core.$strip>;
50
+ export type DockerOptions = z.infer<typeof DockerOptionsSchema>;
51
+ /** Shell-like interface for executing commands against a Docker container */
52
+ export interface DockerShell {
53
+ /** The ID of the container being targeted */
54
+ readonly containerId: string;
55
+ /** The result of the most recently executed command, or null if no command has been run */
56
+ readonly last: {
57
+ stdout: string;
58
+ stderr: string;
59
+ exitCode: number;
60
+ } | null;
61
+ /** Execute a command string in the container via sh -c */
62
+ run(command: string): Promise<{
63
+ stdout: string;
64
+ stderr: string;
65
+ exitCode: number;
66
+ }>;
67
+ /** Destroy the shell container (only needed when volumes created a new container) */
68
+ destroy(): Promise<void>;
69
+ }
70
+ /**
71
+ * Docker CLI interface feature for managing containers, images, and executing Docker commands.
72
+ *
73
+ * Provides comprehensive Docker operations including:
74
+ * - Container management (list, start, stop, create, remove)
75
+ * - Image management (list, pull, build, remove)
76
+ * - Command execution inside containers
77
+ * - Docker system information
78
+ *
79
+ * @extends Feature
80
+ * @example
81
+ * ```typescript
82
+ * const docker = container.feature('docker', { enable: true })
83
+ * await docker.checkDockerAvailability()
84
+ * const containers = await docker.listContainers({ all: true })
85
+ * ```
86
+ */
87
+ export declare class Docker extends Feature<DockerState, DockerOptions> {
88
+ static shortcut: "features.docker";
89
+ static stateSchema: z.ZodObject<{
90
+ enabled: z.ZodDefault<z.ZodBoolean>;
91
+ containers: z.ZodArray<z.ZodObject<{
92
+ id: z.ZodString;
93
+ name: z.ZodString;
94
+ image: z.ZodString;
95
+ status: z.ZodString;
96
+ ports: z.ZodArray<z.ZodString>;
97
+ created: z.ZodString;
98
+ }, z.core.$strip>>;
99
+ images: z.ZodArray<z.ZodObject<{
100
+ id: z.ZodString;
101
+ repository: z.ZodString;
102
+ tag: z.ZodString;
103
+ size: z.ZodString;
104
+ created: z.ZodString;
105
+ }, z.core.$strip>>;
106
+ isDockerAvailable: z.ZodBoolean;
107
+ lastError: z.ZodOptional<z.ZodString>;
108
+ }, z.core.$loose>;
109
+ static optionsSchema: z.ZodObject<{
110
+ name: z.ZodOptional<z.ZodString>;
111
+ _cacheKey: z.ZodOptional<z.ZodString>;
112
+ cached: z.ZodOptional<z.ZodBoolean>;
113
+ enable: z.ZodOptional<z.ZodBoolean>;
114
+ dockerPath: z.ZodOptional<z.ZodString>;
115
+ timeout: z.ZodOptional<z.ZodNumber>;
116
+ autoRefresh: z.ZodOptional<z.ZodBoolean>;
117
+ }, z.core.$strip>;
118
+ get initialState(): DockerState;
119
+ /**
120
+ * Get the proc feature for executing shell commands
121
+ */
122
+ private _resolvedDockerPath;
123
+ get proc(): import("./proc.js").ChildProcess;
124
+ /** Resolve the docker binary path via `which`, caching the result. Options take precedence. */
125
+ get dockerPath(): string;
126
+ /**
127
+ * Check if Docker is available and working.
128
+ *
129
+ * @returns Promise resolving to true if Docker CLI is accessible, false otherwise
130
+ * @example
131
+ * ```typescript
132
+ * const available = await docker.checkDockerAvailability()
133
+ * if (!available) console.log('Docker is not installed or not running')
134
+ * ```
135
+ */
136
+ checkDockerAvailability(): Promise<boolean>;
137
+ /**
138
+ * Execute a Docker command and return the result.
139
+ *
140
+ * @param args - Array of CLI arguments to pass to the docker binary
141
+ * @returns Promise resolving to an object with stdout, stderr, and exitCode
142
+ * @throws Error if Docker is not available
143
+ */
144
+ private executeDockerCommand;
145
+ /**
146
+ * List all containers (running and stopped).
147
+ *
148
+ * @param options - Listing options
149
+ * @param options.all - Include stopped containers (default: false)
150
+ * @returns Promise resolving to an array of DockerContainer objects
151
+ * @throws Error if the docker ps command fails
152
+ * @example
153
+ * ```typescript
154
+ * const running = await docker.listContainers()
155
+ * const all = await docker.listContainers({ all: true })
156
+ * ```
157
+ */
158
+ listContainers(options?: {
159
+ all?: boolean;
160
+ }): Promise<DockerContainer[]>;
161
+ /**
162
+ * List all images available locally.
163
+ *
164
+ * @returns Promise resolving to an array of DockerImage objects
165
+ * @throws Error if the docker images command fails
166
+ * @example
167
+ * ```typescript
168
+ * const images = await docker.listImages()
169
+ * console.log(images.map(i => `${i.repository}:${i.tag}`))
170
+ * ```
171
+ */
172
+ listImages(): Promise<DockerImage[]>;
173
+ /**
174
+ * Start a stopped container.
175
+ *
176
+ * @param containerIdOrName - Container ID or name to start
177
+ * @returns Promise that resolves when the container is started
178
+ * @throws Error if the container cannot be started
179
+ * @example
180
+ * ```typescript
181
+ * await docker.startContainer('my-app')
182
+ * ```
183
+ */
184
+ startContainer(containerIdOrName: string): Promise<void>;
185
+ /**
186
+ * Stop a running container.
187
+ *
188
+ * @param containerIdOrName - Container ID or name to stop
189
+ * @param timeout - Seconds to wait before killing the container
190
+ * @returns Promise that resolves when the container is stopped
191
+ * @throws Error if the container cannot be stopped
192
+ * @example
193
+ * ```typescript
194
+ * await docker.stopContainer('my-app')
195
+ * await docker.stopContainer('my-app', 30) // wait up to 30s
196
+ * ```
197
+ */
198
+ stopContainer(containerIdOrName: string, timeout?: number): Promise<void>;
199
+ /**
200
+ * Remove a container.
201
+ *
202
+ * @param containerIdOrName - Container ID or name to remove
203
+ * @param options - Removal options
204
+ * @param options.force - Force removal of a running container
205
+ * @returns Promise that resolves when the container is removed
206
+ * @throws Error if the container cannot be removed
207
+ * @example
208
+ * ```typescript
209
+ * await docker.removeContainer('old-container')
210
+ * await docker.removeContainer('stubborn-container', { force: true })
211
+ * ```
212
+ */
213
+ removeContainer(containerIdOrName: string, options?: {
214
+ force?: boolean;
215
+ }): Promise<void>;
216
+ /**
217
+ * Create and run a new container from the given image.
218
+ *
219
+ * @param image - Docker image to run (e.g. 'nginx:latest')
220
+ * @param options - Container run options
221
+ * @param options.name - Assign a name to the container
222
+ * @param options.ports - Port mappings in 'host:container' format (e.g. ['8080:80'])
223
+ * @param options.volumes - Volume mounts in 'host:container' format (e.g. ['./data:/app/data'])
224
+ * @param options.environment - Environment variables as key-value pairs
225
+ * @param options.detach - Run the container in the background
226
+ * @param options.interactive - Keep STDIN open
227
+ * @param options.tty - Allocate a pseudo-TTY
228
+ * @param options.command - Command and arguments to run inside the container
229
+ * @param options.workdir - Working directory inside the container
230
+ * @param options.user - Username or UID to run as
231
+ * @param options.entrypoint - Override the default entrypoint
232
+ * @param options.network - Connect the container to a network
233
+ * @param options.restart - Restart policy (e.g. 'always', 'on-failure')
234
+ * @returns Promise resolving to the container ID
235
+ * @throws Error if the container cannot be started
236
+ * @example
237
+ * ```typescript
238
+ * const containerId = await docker.runContainer('nginx:latest', {
239
+ * name: 'web',
240
+ * ports: ['8080:80'],
241
+ * detach: true,
242
+ * environment: { NODE_ENV: 'production' }
243
+ * })
244
+ * ```
245
+ */
246
+ runContainer(image: string, options?: {
247
+ /** Assign a name to the container */
248
+ name?: string;
249
+ /** Port mappings in 'host:container' format */
250
+ ports?: string[];
251
+ /** Volume mounts in 'host:container' format */
252
+ volumes?: string[];
253
+ /** Environment variables as key-value pairs */
254
+ environment?: Record<string, string>;
255
+ /** Run the container in the background */
256
+ detach?: boolean;
257
+ /** Keep STDIN open */
258
+ interactive?: boolean;
259
+ /** Allocate a pseudo-TTY */
260
+ tty?: boolean;
261
+ /** Command and arguments to run inside the container */
262
+ command?: string[];
263
+ /** Working directory inside the container */
264
+ workdir?: string;
265
+ /** Username or UID to run as */
266
+ user?: string;
267
+ /** Override the default entrypoint */
268
+ entrypoint?: string;
269
+ /** Connect the container to a network */
270
+ network?: string;
271
+ /** Restart policy (e.g. 'always', 'on-failure') */
272
+ restart?: string;
273
+ }): Promise<string>;
274
+ /**
275
+ * Execute a command inside a running container.
276
+ *
277
+ * When volumes are specified, uses `docker run --rm` with the container's image
278
+ * instead of `docker exec`, since exec does not support volume mounts.
279
+ *
280
+ * @param containerIdOrName - Container ID or name to execute in
281
+ * @param command - Command and arguments array (e.g. ['ls', '-la'])
282
+ * @param options - Execution options
283
+ * @param options.interactive - Keep STDIN open
284
+ * @param options.tty - Allocate a pseudo-TTY
285
+ * @param options.user - Username or UID to run as
286
+ * @param options.workdir - Working directory inside the container
287
+ * @param options.detach - Run the command in the background
288
+ * @param options.environment - Environment variables as key-value pairs
289
+ * @param options.volumes - Volume mounts; triggers a docker run --rm fallback
290
+ * @returns Promise resolving to an object with stdout, stderr, and exitCode
291
+ * @example
292
+ * ```typescript
293
+ * const result = await docker.execCommand('my-app', ['ls', '-la', '/app'])
294
+ * console.log(result.stdout)
295
+ * ```
296
+ */
297
+ execCommand(containerIdOrName: string, command: string[], options?: {
298
+ /** Keep STDIN open */
299
+ interactive?: boolean;
300
+ /** Allocate a pseudo-TTY */
301
+ tty?: boolean;
302
+ /** Username or UID to run as */
303
+ user?: string;
304
+ /** Working directory inside the container */
305
+ workdir?: string;
306
+ /** Run the command in the background */
307
+ detach?: boolean;
308
+ /** Environment variables as key-value pairs */
309
+ environment?: Record<string, string>;
310
+ /** Volume mounts; triggers a docker run --rm fallback */
311
+ volumes?: string[];
312
+ }): Promise<{
313
+ stdout: string;
314
+ stderr: string;
315
+ exitCode: number;
316
+ }>;
317
+ /**
318
+ * Look up the image name for a running container via docker inspect.
319
+ *
320
+ * @param containerIdOrName - Container ID or name to inspect
321
+ * @returns Promise resolving to the image name string
322
+ * @throws Error if the container cannot be inspected
323
+ */
324
+ private getContainerImage;
325
+ /**
326
+ * Create a shell-like wrapper for executing multiple commands against a container.
327
+ *
328
+ * When volume mounts are specified, a new long-running container is created from
329
+ * the same image with the mounts applied (since docker exec does not support volumes).
330
+ * Call `destroy()` when finished to clean up the helper container.
331
+ *
332
+ * Returns an object with:
333
+ * - `run(command)` — execute a shell command string via `sh -c`
334
+ * - `last` — getter for the most recent command result
335
+ * - `destroy()` — stop the helper container (no-op when no volumes were needed)
336
+ */
337
+ createShell(containerIdOrName: string, options?: {
338
+ volumes?: string[];
339
+ workdir?: string;
340
+ user?: string;
341
+ environment?: Record<string, string>;
342
+ }): Promise<DockerShell>;
343
+ /**
344
+ * Pull an image from a registry.
345
+ *
346
+ * @param image - Full image reference (e.g. 'nginx:latest', 'ghcr.io/org/repo:tag')
347
+ * @returns Promise that resolves when the pull is complete
348
+ * @throws Error if the pull fails
349
+ * @example
350
+ * ```typescript
351
+ * await docker.pullImage('node:20-alpine')
352
+ * ```
353
+ */
354
+ pullImage(image: string): Promise<void>;
355
+ /**
356
+ * Remove an image from the local store.
357
+ *
358
+ * @param imageIdOrName - Image ID, repository, or repository:tag to remove
359
+ * @param options - Removal options
360
+ * @param options.force - Force removal even if the image is in use
361
+ * @returns Promise that resolves when the image is removed
362
+ * @throws Error if the image cannot be removed
363
+ * @example
364
+ * ```typescript
365
+ * await docker.removeImage('nginx:latest')
366
+ * await docker.removeImage('old-image', { force: true })
367
+ * ```
368
+ */
369
+ removeImage(imageIdOrName: string, options?: {
370
+ force?: boolean;
371
+ }): Promise<void>;
372
+ /**
373
+ * Build an image from a Dockerfile.
374
+ *
375
+ * @param contextPath - Path to the build context directory
376
+ * @param options - Build options
377
+ * @param options.tag - Tag the resulting image (e.g. 'my-app:latest')
378
+ * @param options.dockerfile - Path to an alternate Dockerfile
379
+ * @param options.buildArgs - Build-time variables as key-value pairs
380
+ * @param options.target - Target build stage in a multi-stage Dockerfile
381
+ * @param options.nocache - Do not use cache when building the image
382
+ * @returns Promise that resolves when the build is complete
383
+ * @throws Error if the build fails
384
+ * @example
385
+ * ```typescript
386
+ * await docker.buildImage('./project', {
387
+ * tag: 'my-app:latest',
388
+ * buildArgs: { NODE_ENV: 'production' }
389
+ * })
390
+ * ```
391
+ */
392
+ buildImage(contextPath: string, options?: {
393
+ /** Tag the resulting image (e.g. 'my-app:latest') */
394
+ tag?: string;
395
+ /** Path to an alternate Dockerfile */
396
+ dockerfile?: string;
397
+ /** Build-time variables as key-value pairs */
398
+ buildArgs?: Record<string, string>;
399
+ /** Target build stage in a multi-stage Dockerfile */
400
+ target?: string;
401
+ /** Do not use cache when building the image */
402
+ nocache?: boolean;
403
+ }): Promise<void>;
404
+ /**
405
+ * Get container logs.
406
+ *
407
+ * @param containerIdOrName - Container ID or name to fetch logs from
408
+ * @param options - Log retrieval options
409
+ * @param options.follow - Follow log output (stream)
410
+ * @param options.tail - Number of lines to show from the end of the logs
411
+ * @param options.since - Show logs since a timestamp or relative time (e.g. '10m', '2024-01-01T00:00:00')
412
+ * @param options.timestamps - Prepend a timestamp to each log line
413
+ * @returns Promise resolving to the log output string
414
+ * @throws Error if logs cannot be retrieved
415
+ * @example
416
+ * ```typescript
417
+ * const logs = await docker.getLogs('my-app', { tail: 100, timestamps: true })
418
+ * console.log(logs)
419
+ * ```
420
+ */
421
+ getLogs(containerIdOrName: string, options?: {
422
+ /** Follow log output (stream) */
423
+ follow?: boolean;
424
+ /** Number of lines to show from the end of the logs */
425
+ tail?: number;
426
+ /** Show logs since a timestamp or relative time */
427
+ since?: string;
428
+ /** Prepend a timestamp to each log line */
429
+ timestamps?: boolean;
430
+ }): Promise<string>;
431
+ /**
432
+ * Get Docker system information (engine version, storage driver, OS, etc.).
433
+ *
434
+ * @returns Promise resolving to the parsed JSON system info object
435
+ * @throws Error if the system info command fails
436
+ * @example
437
+ * ```typescript
438
+ * const info = await docker.getSystemInfo()
439
+ * console.log(info.ServerVersion)
440
+ * ```
441
+ */
442
+ getSystemInfo(): Promise<any>;
443
+ /**
444
+ * Prune unused Docker resources.
445
+ *
446
+ * When no specific resource type is selected, falls back to `docker system prune`.
447
+ *
448
+ * @param options - Pruning options
449
+ * @param options.containers - Prune stopped containers
450
+ * @param options.images - Prune dangling images
451
+ * @param options.volumes - Prune unused volumes
452
+ * @param options.networks - Prune unused networks
453
+ * @param options.all - Prune all resource types (containers, images, volumes, networks)
454
+ * @param options.force - Skip confirmation prompts for image pruning
455
+ * @returns Promise that resolves when pruning is complete
456
+ * @example
457
+ * ```typescript
458
+ * await docker.prune({ all: true })
459
+ * await docker.prune({ containers: true, images: true })
460
+ * ```
461
+ */
462
+ prune(options?: {
463
+ /** Prune stopped containers */
464
+ containers?: boolean;
465
+ /** Prune dangling images */
466
+ images?: boolean;
467
+ /** Prune unused volumes */
468
+ volumes?: boolean;
469
+ /** Prune unused networks */
470
+ networks?: boolean;
471
+ /** Prune all resource types */
472
+ all?: boolean;
473
+ /** Skip confirmation prompts for image pruning */
474
+ force?: boolean;
475
+ }): Promise<void>;
476
+ /**
477
+ * Initialize the Docker feature by checking availability and optionally refreshing state.
478
+ *
479
+ * @param options - Enable options passed to the base Feature
480
+ * @returns Promise resolving to this Docker instance
481
+ */
482
+ enable(options?: any): Promise<this>;
483
+ }
484
+ export default Docker;
485
+ //# sourceMappingURL=docker.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"docker.d.ts","sourceRoot":"","sources":["../../../src/node/features/docker.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAEvC,eAAO,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C;IAUnC;;;;;;;;;;;;;;;;;;OAkBG;IACG,KAAK,CAAC,OAAO,GAAE;QACnB,+BAA+B;QAC/B,UAAU,CAAC,EAAE,OAAO,CAAA;QACpB,4BAA4B;QAC5B,MAAM,CAAC,EAAE,OAAO,CAAA;QAChB,2BAA2B;QAC3B,OAAO,CAAC,EAAE,OAAO,CAAA;QACjB,4BAA4B;QAC5B,QAAQ,CAAC,EAAE,OAAO,CAAA;QAClB,+BAA+B;QAC/B,GAAG,CAAC,EAAE,OAAO,CAAA;QACb,kDAAkD;QAClD,KAAK,CAAC,EAAE,OAAO,CAAA;KACX,GAAG,OAAO,CAAC,IAAI,CAAC;IAqCtB;;;;;OAKG;IACY,MAAM,CAAC,OAAO,GAAE,GAAQ,GAAG,OAAO,CAAC,IAAI,CAAC;CAqBxD;AAED,eAAe,MAAM,CAAA"}
@@ -0,0 +1,73 @@
1
+ import { Feature } from '../feature.js';
2
+ /**
3
+ * A feature that provides file downloading capabilities from URLs.
4
+ *
5
+ * The Downloader feature allows you to fetch files from remote URLs and save them
6
+ * to the local filesystem. It handles the network request, buffering, and file writing
7
+ * operations automatically.
8
+ *
9
+ * @example
10
+ * ```typescript
11
+ * // Enable the downloader feature
12
+ * const downloader = container.feature('downloader')
13
+ *
14
+ * // Download a file
15
+ * const localPath = await downloader.download(
16
+ * 'https://example.com/image.jpg',
17
+ * 'downloads/image.jpg'
18
+ * )
19
+ * console.log(`File saved to: ${localPath}`)
20
+ * ```
21
+ *
22
+ * @extends Feature
23
+ */
24
+ export declare class Downloader extends Feature {
25
+ static shortcut: "features.downloader";
26
+ static stateSchema: import("zod").ZodObject<{
27
+ enabled: import("zod").ZodDefault<import("zod").ZodBoolean>;
28
+ }, import("zod/v4/core").$loose>;
29
+ static optionsSchema: import("zod").ZodObject<{
30
+ name: import("zod").ZodOptional<import("zod").ZodString>;
31
+ _cacheKey: import("zod").ZodOptional<import("zod").ZodString>;
32
+ cached: import("zod").ZodOptional<import("zod").ZodBoolean>;
33
+ enable: import("zod").ZodOptional<import("zod").ZodBoolean>;
34
+ }, import("zod/v4/core").$strip>;
35
+ /**
36
+ * Downloads a file from a URL and saves it to the specified local path.
37
+ *
38
+ * This method fetches the file from the provided URL, converts it to a buffer,
39
+ * and writes it to the filesystem at the target path. The target path is resolved
40
+ * relative to the container's configured paths.
41
+ *
42
+ * @param {string} url - The URL to download the file from. Must be a valid HTTP/HTTPS URL.
43
+ * @param {string} targetPath - The local file path where the downloaded file should be saved.
44
+ * This path will be resolved relative to the container's base path.
45
+ *
46
+ * @returns {Promise<string>} A promise that resolves to the absolute path of the saved file.
47
+ *
48
+ * @throws {Error} Throws an error if the URL is invalid or unreachable.
49
+ * @throws {Error} Throws an error if the target directory doesn't exist or is not writable.
50
+ * @throws {Error} Throws an error if the network request fails or times out.
51
+ * @throws {Error} Throws an error if there's insufficient disk space to save the file.
52
+ *
53
+ * @example
54
+ * ```typescript
55
+ * // Download an image file
56
+ * const imagePath = await downloader.download(
57
+ * 'https://example.com/photo.jpg',
58
+ * 'images/downloaded-photo.jpg'
59
+ * )
60
+ *
61
+ * // Download a document
62
+ * const docPath = await downloader.download(
63
+ * 'https://api.example.com/files/document.pdf',
64
+ * 'documents/report.pdf'
65
+ * )
66
+ * ```
67
+ *
68
+ * @since 1.0.0
69
+ */
70
+ download(url: string, targetPath: string): Promise<string>;
71
+ }
72
+ export default Downloader;
73
+ //# sourceMappingURL=downloader.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"downloader.d.ts","sourceRoot":"","sources":["../../../src/node/features/downloader.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAGvC;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,qBAAa,UAAW,SAAQ,OAAO;IACrC,OAAgB,QAAQ,EAAG,qBAAqB,CAAS;IACzD,OAAgB,WAAW;;qCAAqB;IAChD,OAAgB,aAAa;;;;;qCAAuB;IAGpD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAkCG;IACG,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM;CAU/C;AAED,eAAe,UAAU,CAAA"}
@@ -0,0 +1,4 @@
1
+ import figlet from "figlet/browser";
2
+ export { figlet };
3
+ export declare const fontNames: string[];
4
+ //# sourceMappingURL=figlet-fonts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"figlet-fonts.d.ts","sourceRoot":"","sources":["../../../src/node/features/figlet-fonts.ts"],"names":[],"mappings":"AA2SA,OAAO,MAAM,MAAM,gBAAgB,CAAC;AA2SpC,OAAO,EAAE,MAAM,EAAE,CAAC;AAClB,eAAO,MAAM,SAAS,EAAE,MAAM,EAA+qG,CAAC"}