@soederpop/luca 0.1.1 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (369) hide show
  1. package/CLAUDE.md +2 -0
  2. package/assistants/codingAssistant/hooks.ts +3 -0
  3. package/assistants/inkbot/CORE.md +69 -0
  4. package/assistants/inkbot/hooks.ts +14 -0
  5. package/assistants/inkbot/tools.ts +47 -0
  6. package/commands/inkbot.ts +353 -0
  7. package/dist/agi/container.server.d.ts +63 -0
  8. package/dist/agi/container.server.d.ts.map +1 -0
  9. package/dist/agi/endpoints/ask.d.ts +20 -0
  10. package/dist/agi/endpoints/ask.d.ts.map +1 -0
  11. package/dist/agi/endpoints/conversations/[id].d.ts +27 -0
  12. package/dist/agi/endpoints/conversations/[id].d.ts.map +1 -0
  13. package/dist/agi/endpoints/conversations.d.ts +18 -0
  14. package/dist/agi/endpoints/conversations.d.ts.map +1 -0
  15. package/dist/agi/endpoints/experts.d.ts +8 -0
  16. package/dist/agi/endpoints/experts.d.ts.map +1 -0
  17. package/dist/agi/feature.d.ts +9 -0
  18. package/dist/agi/feature.d.ts.map +1 -0
  19. package/dist/agi/features/assistant.d.ts +509 -0
  20. package/dist/agi/features/assistant.d.ts.map +1 -0
  21. package/dist/agi/features/assistants-manager.d.ts +236 -0
  22. package/dist/agi/features/assistants-manager.d.ts.map +1 -0
  23. package/dist/agi/features/autonomous-assistant.d.ts +281 -0
  24. package/dist/agi/features/autonomous-assistant.d.ts.map +1 -0
  25. package/dist/agi/features/browser-use.d.ts +479 -0
  26. package/dist/agi/features/browser-use.d.ts.map +1 -0
  27. package/dist/agi/features/claude-code.d.ts +824 -0
  28. package/dist/agi/features/claude-code.d.ts.map +1 -0
  29. package/dist/agi/features/conversation-history.d.ts +245 -0
  30. package/dist/agi/features/conversation-history.d.ts.map +1 -0
  31. package/dist/agi/features/conversation.d.ts +464 -0
  32. package/dist/agi/features/conversation.d.ts.map +1 -0
  33. package/dist/agi/features/docs-reader.d.ts +72 -0
  34. package/dist/agi/features/docs-reader.d.ts.map +1 -0
  35. package/dist/agi/features/file-tools.d.ts +110 -0
  36. package/dist/agi/features/file-tools.d.ts.map +1 -0
  37. package/dist/agi/features/luca-coder.d.ts +323 -0
  38. package/dist/agi/features/luca-coder.d.ts.map +1 -0
  39. package/dist/agi/features/openai-codex.d.ts +381 -0
  40. package/dist/agi/features/openai-codex.d.ts.map +1 -0
  41. package/dist/agi/features/openapi.d.ts +200 -0
  42. package/dist/agi/features/openapi.d.ts.map +1 -0
  43. package/dist/agi/features/skills-library.d.ts +167 -0
  44. package/dist/agi/features/skills-library.d.ts.map +1 -0
  45. package/dist/agi/index.d.ts +5 -0
  46. package/dist/agi/index.d.ts.map +1 -0
  47. package/dist/agi/lib/interceptor-chain.d.ts +44 -0
  48. package/dist/agi/lib/interceptor-chain.d.ts.map +1 -0
  49. package/dist/agi/lib/token-counter.d.ts +13 -0
  50. package/dist/agi/lib/token-counter.d.ts.map +1 -0
  51. package/dist/bootstrap/generated.d.ts +5 -0
  52. package/dist/bootstrap/generated.d.ts.map +1 -0
  53. package/dist/browser.d.ts +12 -0
  54. package/dist/browser.d.ts.map +1 -0
  55. package/dist/bus.d.ts +29 -0
  56. package/dist/bus.d.ts.map +1 -0
  57. package/dist/cli/build-info.d.ts +4 -0
  58. package/dist/cli/build-info.d.ts.map +1 -0
  59. package/dist/cli/cli.d.ts +3 -0
  60. package/dist/cli/cli.d.ts.map +1 -0
  61. package/dist/client.d.ts +60 -0
  62. package/dist/client.d.ts.map +1 -0
  63. package/dist/clients/civitai/index.d.ts +472 -0
  64. package/dist/clients/civitai/index.d.ts.map +1 -0
  65. package/dist/clients/client-template.d.ts +30 -0
  66. package/dist/clients/client-template.d.ts.map +1 -0
  67. package/dist/clients/comfyui/index.d.ts +281 -0
  68. package/dist/clients/comfyui/index.d.ts.map +1 -0
  69. package/dist/clients/elevenlabs/index.d.ts +197 -0
  70. package/dist/clients/elevenlabs/index.d.ts.map +1 -0
  71. package/dist/clients/graph.d.ts +64 -0
  72. package/dist/clients/graph.d.ts.map +1 -0
  73. package/dist/clients/openai/index.d.ts +247 -0
  74. package/dist/clients/openai/index.d.ts.map +1 -0
  75. package/dist/clients/rest.d.ts +92 -0
  76. package/dist/clients/rest.d.ts.map +1 -0
  77. package/dist/clients/supabase/index.d.ts +176 -0
  78. package/dist/clients/supabase/index.d.ts.map +1 -0
  79. package/dist/clients/websocket.d.ts +127 -0
  80. package/dist/clients/websocket.d.ts.map +1 -0
  81. package/dist/command.d.ts +163 -0
  82. package/dist/command.d.ts.map +1 -0
  83. package/dist/commands/bootstrap.d.ts +20 -0
  84. package/dist/commands/bootstrap.d.ts.map +1 -0
  85. package/dist/commands/chat.d.ts +37 -0
  86. package/dist/commands/chat.d.ts.map +1 -0
  87. package/dist/commands/code.d.ts +28 -0
  88. package/dist/commands/code.d.ts.map +1 -0
  89. package/dist/commands/console.d.ts +22 -0
  90. package/dist/commands/console.d.ts.map +1 -0
  91. package/dist/commands/describe.d.ts +50 -0
  92. package/dist/commands/describe.d.ts.map +1 -0
  93. package/dist/commands/eval.d.ts +23 -0
  94. package/dist/commands/eval.d.ts.map +1 -0
  95. package/dist/commands/help.d.ts +25 -0
  96. package/dist/commands/help.d.ts.map +1 -0
  97. package/dist/commands/index.d.ts +18 -0
  98. package/dist/commands/index.d.ts.map +1 -0
  99. package/dist/commands/introspect.d.ts +24 -0
  100. package/dist/commands/introspect.d.ts.map +1 -0
  101. package/dist/commands/mcp.d.ts +35 -0
  102. package/dist/commands/mcp.d.ts.map +1 -0
  103. package/dist/commands/prompt.d.ts +38 -0
  104. package/dist/commands/prompt.d.ts.map +1 -0
  105. package/dist/commands/run.d.ts +24 -0
  106. package/dist/commands/run.d.ts.map +1 -0
  107. package/dist/commands/sandbox-mcp.d.ts +34 -0
  108. package/dist/commands/sandbox-mcp.d.ts.map +1 -0
  109. package/dist/commands/save-api-docs.d.ts +21 -0
  110. package/dist/commands/save-api-docs.d.ts.map +1 -0
  111. package/dist/commands/scaffold.d.ts +24 -0
  112. package/dist/commands/scaffold.d.ts.map +1 -0
  113. package/dist/commands/select.d.ts +22 -0
  114. package/dist/commands/select.d.ts.map +1 -0
  115. package/dist/commands/serve.d.ts +29 -0
  116. package/dist/commands/serve.d.ts.map +1 -0
  117. package/dist/container-describer.d.ts +144 -0
  118. package/dist/container-describer.d.ts.map +1 -0
  119. package/dist/container.d.ts +451 -0
  120. package/dist/container.d.ts.map +1 -0
  121. package/dist/endpoint.d.ts +113 -0
  122. package/dist/endpoint.d.ts.map +1 -0
  123. package/dist/feature.d.ts +47 -0
  124. package/dist/feature.d.ts.map +1 -0
  125. package/dist/graft.d.ts +29 -0
  126. package/dist/graft.d.ts.map +1 -0
  127. package/dist/hash-object.d.ts +8 -0
  128. package/dist/hash-object.d.ts.map +1 -0
  129. package/dist/helper.d.ts +209 -0
  130. package/dist/helper.d.ts.map +1 -0
  131. package/dist/introspection/generated.node.d.ts +44623 -0
  132. package/dist/introspection/generated.node.d.ts.map +1 -0
  133. package/dist/introspection/generated.web.d.ts +1412 -0
  134. package/dist/introspection/generated.web.d.ts.map +1 -0
  135. package/dist/introspection/index.d.ts +156 -0
  136. package/dist/introspection/index.d.ts.map +1 -0
  137. package/dist/introspection/scan.d.ts +147 -0
  138. package/dist/introspection/scan.d.ts.map +1 -0
  139. package/dist/node/container.d.ts +256 -0
  140. package/dist/node/container.d.ts.map +1 -0
  141. package/dist/node/feature.d.ts +9 -0
  142. package/dist/node/feature.d.ts.map +1 -0
  143. package/dist/node/features/container-link.d.ts +213 -0
  144. package/dist/node/features/container-link.d.ts.map +1 -0
  145. package/dist/node/features/content-db.d.ts +354 -0
  146. package/dist/node/features/content-db.d.ts.map +1 -0
  147. package/dist/node/features/disk-cache.d.ts +236 -0
  148. package/dist/node/features/disk-cache.d.ts.map +1 -0
  149. package/dist/node/features/dns.d.ts +511 -0
  150. package/dist/node/features/dns.d.ts.map +1 -0
  151. package/dist/node/features/docker.d.ts +485 -0
  152. package/dist/node/features/docker.d.ts.map +1 -0
  153. package/dist/node/features/downloader.d.ts +73 -0
  154. package/dist/node/features/downloader.d.ts.map +1 -0
  155. package/dist/node/features/figlet-fonts.d.ts +4 -0
  156. package/dist/node/features/figlet-fonts.d.ts.map +1 -0
  157. package/dist/node/features/file-manager.d.ts +177 -0
  158. package/dist/node/features/file-manager.d.ts.map +1 -0
  159. package/dist/node/features/fs.d.ts +635 -0
  160. package/dist/node/features/fs.d.ts.map +1 -0
  161. package/dist/node/features/git.d.ts +329 -0
  162. package/dist/node/features/git.d.ts.map +1 -0
  163. package/dist/node/features/google-auth.d.ts +200 -0
  164. package/dist/node/features/google-auth.d.ts.map +1 -0
  165. package/dist/node/features/google-calendar.d.ts +194 -0
  166. package/dist/node/features/google-calendar.d.ts.map +1 -0
  167. package/dist/node/features/google-docs.d.ts +138 -0
  168. package/dist/node/features/google-docs.d.ts.map +1 -0
  169. package/dist/node/features/google-drive.d.ts +202 -0
  170. package/dist/node/features/google-drive.d.ts.map +1 -0
  171. package/dist/node/features/google-mail.d.ts +221 -0
  172. package/dist/node/features/google-mail.d.ts.map +1 -0
  173. package/dist/node/features/google-sheets.d.ts +157 -0
  174. package/dist/node/features/google-sheets.d.ts.map +1 -0
  175. package/dist/node/features/grep.d.ts +207 -0
  176. package/dist/node/features/grep.d.ts.map +1 -0
  177. package/dist/node/features/helpers.d.ts +236 -0
  178. package/dist/node/features/helpers.d.ts.map +1 -0
  179. package/dist/node/features/ink.d.ts +332 -0
  180. package/dist/node/features/ink.d.ts.map +1 -0
  181. package/dist/node/features/ipc-socket.d.ts +298 -0
  182. package/dist/node/features/ipc-socket.d.ts.map +1 -0
  183. package/dist/node/features/json-tree.d.ts +140 -0
  184. package/dist/node/features/json-tree.d.ts.map +1 -0
  185. package/dist/node/features/networking.d.ts +373 -0
  186. package/dist/node/features/networking.d.ts.map +1 -0
  187. package/dist/node/features/nlp.d.ts +125 -0
  188. package/dist/node/features/nlp.d.ts.map +1 -0
  189. package/dist/node/features/opener.d.ts +93 -0
  190. package/dist/node/features/opener.d.ts.map +1 -0
  191. package/dist/node/features/os.d.ts +168 -0
  192. package/dist/node/features/os.d.ts.map +1 -0
  193. package/dist/node/features/package-finder.d.ts +419 -0
  194. package/dist/node/features/package-finder.d.ts.map +1 -0
  195. package/dist/node/features/postgres.d.ts +173 -0
  196. package/dist/node/features/postgres.d.ts.map +1 -0
  197. package/dist/node/features/proc.d.ts +285 -0
  198. package/dist/node/features/proc.d.ts.map +1 -0
  199. package/dist/node/features/process-manager.d.ts +427 -0
  200. package/dist/node/features/process-manager.d.ts.map +1 -0
  201. package/dist/node/features/python.d.ts +477 -0
  202. package/dist/node/features/python.d.ts.map +1 -0
  203. package/dist/node/features/redis.d.ts +247 -0
  204. package/dist/node/features/redis.d.ts.map +1 -0
  205. package/dist/node/features/repl.d.ts +84 -0
  206. package/dist/node/features/repl.d.ts.map +1 -0
  207. package/dist/node/features/runpod.d.ts +527 -0
  208. package/dist/node/features/runpod.d.ts.map +1 -0
  209. package/dist/node/features/secure-shell.d.ts +145 -0
  210. package/dist/node/features/secure-shell.d.ts.map +1 -0
  211. package/dist/node/features/semantic-search.d.ts +207 -0
  212. package/dist/node/features/semantic-search.d.ts.map +1 -0
  213. package/dist/node/features/sqlite.d.ts +180 -0
  214. package/dist/node/features/sqlite.d.ts.map +1 -0
  215. package/dist/node/features/telegram.d.ts +173 -0
  216. package/dist/node/features/telegram.d.ts.map +1 -0
  217. package/dist/node/features/transpiler.d.ts +51 -0
  218. package/dist/node/features/transpiler.d.ts.map +1 -0
  219. package/dist/node/features/tts.d.ts +108 -0
  220. package/dist/node/features/tts.d.ts.map +1 -0
  221. package/dist/node/features/ui.d.ts +562 -0
  222. package/dist/node/features/ui.d.ts.map +1 -0
  223. package/dist/node/features/vault.d.ts +90 -0
  224. package/dist/node/features/vault.d.ts.map +1 -0
  225. package/dist/node/features/vm.d.ts +285 -0
  226. package/dist/node/features/vm.d.ts.map +1 -0
  227. package/dist/node/features/yaml-tree.d.ts +118 -0
  228. package/dist/node/features/yaml-tree.d.ts.map +1 -0
  229. package/dist/node/features/yaml.d.ts +127 -0
  230. package/dist/node/features/yaml.d.ts.map +1 -0
  231. package/dist/node.d.ts +67 -0
  232. package/dist/node.d.ts.map +1 -0
  233. package/dist/python/generated.d.ts +2 -0
  234. package/dist/python/generated.d.ts.map +1 -0
  235. package/dist/react/index.d.ts +36 -0
  236. package/dist/react/index.d.ts.map +1 -0
  237. package/dist/registry.d.ts +97 -0
  238. package/dist/registry.d.ts.map +1 -0
  239. package/dist/scaffolds/generated.d.ts +13 -0
  240. package/dist/scaffolds/generated.d.ts.map +1 -0
  241. package/dist/scaffolds/template.d.ts +11 -0
  242. package/dist/scaffolds/template.d.ts.map +1 -0
  243. package/dist/schemas/base.d.ts +254 -0
  244. package/dist/schemas/base.d.ts.map +1 -0
  245. package/dist/selector.d.ts +130 -0
  246. package/dist/selector.d.ts.map +1 -0
  247. package/dist/server.d.ts +89 -0
  248. package/dist/server.d.ts.map +1 -0
  249. package/dist/servers/express.d.ts +104 -0
  250. package/dist/servers/express.d.ts.map +1 -0
  251. package/dist/servers/mcp.d.ts +201 -0
  252. package/dist/servers/mcp.d.ts.map +1 -0
  253. package/dist/servers/socket.d.ts +121 -0
  254. package/dist/servers/socket.d.ts.map +1 -0
  255. package/dist/state.d.ts +24 -0
  256. package/dist/state.d.ts.map +1 -0
  257. package/dist/web/clients/socket.d.ts +37 -0
  258. package/dist/web/clients/socket.d.ts.map +1 -0
  259. package/dist/web/container.d.ts +55 -0
  260. package/dist/web/container.d.ts.map +1 -0
  261. package/dist/web/extension.d.ts +4 -0
  262. package/dist/web/extension.d.ts.map +1 -0
  263. package/dist/web/feature.d.ts +8 -0
  264. package/dist/web/feature.d.ts.map +1 -0
  265. package/dist/web/features/asset-loader.d.ts +35 -0
  266. package/dist/web/features/asset-loader.d.ts.map +1 -0
  267. package/dist/web/features/container-link.d.ts +167 -0
  268. package/dist/web/features/container-link.d.ts.map +1 -0
  269. package/dist/web/features/esbuild.d.ts +51 -0
  270. package/dist/web/features/esbuild.d.ts.map +1 -0
  271. package/dist/web/features/helpers.d.ts +140 -0
  272. package/dist/web/features/helpers.d.ts.map +1 -0
  273. package/dist/web/features/network.d.ts +69 -0
  274. package/dist/web/features/network.d.ts.map +1 -0
  275. package/dist/web/features/speech.d.ts +71 -0
  276. package/dist/web/features/speech.d.ts.map +1 -0
  277. package/dist/web/features/vault.d.ts +62 -0
  278. package/dist/web/features/vault.d.ts.map +1 -0
  279. package/dist/web/features/vm.d.ts +48 -0
  280. package/dist/web/features/vm.d.ts.map +1 -0
  281. package/dist/web/features/voice-recognition.d.ts +96 -0
  282. package/dist/web/features/voice-recognition.d.ts.map +1 -0
  283. package/dist/web/shims/isomorphic-vm.d.ts +22 -0
  284. package/dist/web/shims/isomorphic-vm.d.ts.map +1 -0
  285. package/docs/apis/features/agi/assistant.md +1 -0
  286. package/docs/apis/features/agi/assistants-manager.md +62 -2
  287. package/docs/apis/features/agi/auto-assistant.md +11 -109
  288. package/docs/apis/features/agi/claude-code.md +138 -0
  289. package/docs/apis/features/agi/conversation.md +60 -31
  290. package/docs/apis/features/agi/luca-coder.md +407 -0
  291. package/docs/apis/features/agi/openapi.md +2 -2
  292. package/docs/apis/features/agi/skills-library.md +12 -0
  293. package/docs/apis/features/node/python.md +81 -11
  294. package/docs/apis/features/node/transpiler.md +74 -0
  295. package/docs/apis/features/web/esbuild.md +0 -6
  296. package/docs/apis/servers/mcp.md +2 -2
  297. package/docs/examples/entity.md +124 -0
  298. package/package.json +73 -21
  299. package/scripts/test-assistant-hooks.ts +13 -0
  300. package/src/agi/feature.ts +13 -0
  301. package/src/agi/features/assistant.ts +36 -25
  302. package/src/agi/features/assistants-manager.ts +70 -5
  303. package/src/agi/features/autonomous-assistant.ts +1 -5
  304. package/src/agi/features/browser-use.ts +2 -2
  305. package/src/agi/features/claude-code.ts +165 -1
  306. package/src/agi/features/conversation-history.ts +2 -6
  307. package/src/agi/features/conversation.ts +95 -3
  308. package/src/agi/features/docs-reader.ts +2 -1
  309. package/src/agi/features/file-tools.ts +2 -2
  310. package/src/agi/features/luca-coder.ts +1 -5
  311. package/src/agi/features/openai-codex.ts +1 -1
  312. package/src/agi/features/openapi.ts +3 -3
  313. package/src/agi/features/skills-library.ts +90 -2
  314. package/src/agi/lib/interceptor-chain.ts +10 -0
  315. package/src/agi/lib/token-counter.ts +1 -1
  316. package/src/bootstrap/generated.ts +126 -1
  317. package/src/bus.ts +27 -5
  318. package/src/cli/build-info.ts +2 -2
  319. package/src/client.ts +2 -2
  320. package/src/clients/elevenlabs/index.ts +5 -0
  321. package/src/commands/bootstrap.ts +2 -1
  322. package/src/commands/chat.ts +1 -0
  323. package/src/commands/code.ts +4 -2
  324. package/src/commands/prompt.ts +34 -34
  325. package/src/commands/sandbox-mcp.ts +69 -163
  326. package/src/commands/save-api-docs.ts +10 -8
  327. package/src/commands/select.ts +8 -3
  328. package/src/container-describer.ts +70 -84
  329. package/src/container.ts +93 -3
  330. package/src/endpoint.ts +1 -1
  331. package/src/entity.ts +173 -0
  332. package/src/feature.ts +3 -3
  333. package/src/helper.ts +8 -4
  334. package/src/introspection/generated.agi.ts +1403 -929
  335. package/src/introspection/generated.node.ts +127 -33
  336. package/src/introspection/generated.web.ts +95 -3
  337. package/src/introspection/scan.ts +1 -1
  338. package/src/node/container.ts +1 -1
  339. package/src/node/features/content-db.ts +3 -3
  340. package/src/node/features/file-manager.ts +10 -9
  341. package/src/node/features/git.ts +5 -5
  342. package/src/node/features/helpers.ts +1 -1
  343. package/src/node/features/json-tree.ts +1 -1
  344. package/src/node/features/os.ts +3 -3
  345. package/src/node/features/package-finder.ts +1 -1
  346. package/src/node/features/process-manager.ts +1 -1
  347. package/src/node/features/python.ts +3 -3
  348. package/src/node/features/redis.ts +1 -1
  349. package/src/node/features/repl.ts +2 -2
  350. package/src/node/features/transpiler.ts +34 -9
  351. package/src/node/features/ui.ts +1 -1
  352. package/src/node/features/vm.ts +6 -5
  353. package/src/node/features/yaml-tree.ts +1 -1
  354. package/src/node.ts +1 -0
  355. package/src/python/generated.ts +1 -1
  356. package/src/scaffolds/generated.ts +1 -1
  357. package/src/selector.ts +74 -4
  358. package/src/server.ts +2 -2
  359. package/src/servers/mcp.ts +6 -6
  360. package/src/web/features/helpers.ts +1 -1
  361. package/src/web/features/network.ts +1 -0
  362. package/test/assistant.test.ts +72 -0
  363. package/test/conversation.test.ts +220 -0
  364. package/test/vm-loadmodule.test.ts +213 -0
  365. package/tsconfig.build.json +12 -0
  366. package/tsconfig.json +1 -1
  367. package/scripts/examples/telegram-ink-ui.ts +0 -302
  368. package/scripts/examples/using-openai-codex.ts +0 -23
  369. package/scripts/examples/vm-loading-esm-modules.ts +0 -16
package/CLAUDE.md CHANGED
@@ -111,3 +111,5 @@ This means **JSDoc blocks on helpers (features, clients, servers) must be valid
111
111
  ## Git Strategy
112
112
 
113
113
  - We generally roll all on main. Commit your changes after you're done, only your changes. Leave a good message, tell me why don't just tell me what. Don't gimme that coauthored by whoever bullshit. The streets know we're one.
114
+
115
+ - Always commit your work
@@ -1,2 +1,5 @@
1
+ import type { Assistant } from "@/agi"
2
+
1
3
  export function started() {
4
+ assistant.use(container.feature('skillsLibrary'))
2
5
  }
@@ -0,0 +1,69 @@
1
+ ---
2
+ maxTokens: 4096
3
+ skills:
4
+ - luca-framework
5
+ ---
6
+ # Inkbot — Canvas Renderer
7
+
8
+ You are an expert in the Luca framework running inside a split-pane terminal UI. The left pane is this chat. The right pane is a **canvas** that you control by writing TypeScript code.
9
+
10
+ ## How the Canvas Works
11
+
12
+ You have a `draw` tool. When you call it, the code you provide runs as a **bun subprocess** and its stdout appears in the canvas panel. If the script exits with an error, you receive the stderr — fix the code and redraw.
13
+
14
+ A "redraw" is just calling `draw` again with updated code. The canvas always shows the output of the most recent run of the active scene.
15
+
16
+ ### Scenes
17
+
18
+ The canvas supports multiple named **scenes**. Each scene is a separate script. You can:
19
+
20
+ - `draw` — create or update a scene and run it immediately (default scene id: `"default"`)
21
+ - `create_scene` — stage a scene without running it
22
+ - `run_scene` — run a specific scene
23
+ - `run_all` — run every scene in order
24
+ - `activate_scene` — switch which scene the canvas displays
25
+ - `get_canvas` — inspect the current output, errors, code, and status
26
+
27
+ ### Writing Scene Code
28
+
29
+ Scene code runs **inside the container** via `vm.run()` with the full container context injected. You have `container`, every enabled feature, and all standard globals available — no imports needed. Use `console.log()` to produce visible output in the canvas.
30
+
31
+ Available in scene scope:
32
+ - `container` — the live AGI container instance
33
+ - All enabled features as top-level globals (e.g. `fs`, `proc`, `ui`, `grep`, etc.)
34
+ - `fetch`, `URL`, `URLSearchParams`, `Buffer`, `process`, `setTimeout`, etc.
35
+
36
+ Use your `luca_describe` tools to learn the APIs. Then write scene code that uses them directly:
37
+
38
+ ```ts
39
+ // Example: list available features
40
+ const available = container.features.available
41
+ console.log("Available features:")
42
+ available.forEach(f => console.log(` - ${f}`))
43
+ ```
44
+
45
+ ```ts
46
+ // Example: read and display a file
47
+ const content = fs.readFile('package.json')
48
+ const pkg = JSON.parse(content)
49
+ console.log(`${pkg.name} v${pkg.version}`)
50
+ console.log(`Dependencies: ${Object.keys(pkg.dependencies || {}).length}`)
51
+ ```
52
+
53
+ Tips:
54
+ - **Simple output**: `console.log("Hello world")` — plain text renders in the canvas.
55
+ - **Formatted tables**: Build strings with padding, box-drawing characters, or ANSI escape codes.
56
+ - **Dynamic data**: Fetch APIs, read files, compute values — full container power.
57
+ - **Async**: Top-level `await` works. Fetch URLs, run queries, whatever you need.
58
+
59
+ ### Error Recovery
60
+
61
+ If your code has a bug, you will receive the error output. Read the error carefully, fix the issue, and call `draw` again. Do not apologize excessively — just fix it and redraw. The user expects iteration.
62
+
63
+ ## Your Personality
64
+
65
+ You are creative, concise, and action-oriented. When the user asks you to render something, do it immediately — show, don't tell. Keep chat responses brief; let the canvas speak. When explaining what you drew, be specific about what's visible.
66
+
67
+ ## Your Tools
68
+
69
+ In addition to the canvas tools above, you have access to Luca framework inspection tools (`luca_describe`, etc.) through the skills library. Use them to look up features, APIs, and helpers when writing scene code.
@@ -0,0 +1,14 @@
1
+ import type { AGIContainer, Assistant } from "@soederpop/luca/agi"
2
+
3
+ declare global {
4
+ var assistant: Assistant
5
+ var container: AGIContainer
6
+ }
7
+
8
+ export function started() {
9
+ assistant
10
+ // this will give it the ability to read documentation from the various feature
11
+ .use(container.describer)
12
+ // use the documentation from the various available skils
13
+ .use(container.feature('skillsLibrary'))
14
+ }
@@ -0,0 +1,47 @@
1
+ import container from '@soederpop/luca/agi'
2
+ import { z } from 'zod'
3
+
4
+ export const schemas = {
5
+ README: z.object({}).describe('Call this tool first to learn how your canvas tools work.')
6
+ }
7
+
8
+ export function README() {
9
+ return README_CONTENT
10
+ }
11
+
12
+ const README_CONTENT = `
13
+ # Inkbot Canvas Tools
14
+
15
+ You have the following tools registered on you for controlling the canvas:
16
+
17
+ ## draw
18
+ Write TypeScript code that runs as a bun subprocess. stdout appears in the canvas.
19
+ - \`code\`: string — the TypeScript to execute
20
+ - \`sceneId\`: string (optional) — defaults to "default"
21
+
22
+ ## create_scene
23
+ Create a named scene without running it.
24
+ - \`id\`: string — unique scene name
25
+ - \`code\`: string — TypeScript code
26
+
27
+ ## run_scene
28
+ Run an existing scene by id.
29
+ - \`id\`: string
30
+
31
+ ## run_all
32
+ Run every scene in order. Returns array of results.
33
+
34
+ ## activate_scene
35
+ Switch the canvas to display a different scene.
36
+ - \`id\`: string
37
+
38
+ ## get_canvas
39
+ Returns the current canvas state: output, error, code, status, and scene list.
40
+
41
+ ## Tips
42
+ - Use console.log() for output — that is what renders in the canvas.
43
+ - If your code errors, you get stderr back. Fix it and draw again.
44
+ - You can use ANSI escape codes for colors and formatting.
45
+ - Scenes persist — update them with draw using the same sceneId.
46
+ - You also have luca framework inspection tools (luca_describe, etc.) to look up APIs.
47
+ `
@@ -0,0 +1,353 @@
1
+ import { z } from 'zod'
2
+ import { commands, CommandOptionsSchema } from '@soederpop/luca'
3
+ import type { ContainerContext } from '@soederpop/luca'
4
+ import { AGIContainer } from '../src/agi/container.server.js'
5
+ import { tmpdir } from 'os'
6
+
7
+ export const argsSchema = CommandOptionsSchema.extend({
8
+ model: z.string().optional().describe('OpenAI model to use'),
9
+ })
10
+
11
+ export async function inkbot(options: z.infer<typeof argsSchema>, context: ContainerContext) {
12
+ const container = new AGIContainer()
13
+
14
+ // ─── Load Ink ────────────────────────────────────────────────────────
15
+ const ink = container.feature('ink', { enable: true, patchConsole: true })
16
+ await ink.loadModules()
17
+ const React = ink.React
18
+ const h = React.createElement
19
+ const { Box, Text } = ink.components
20
+ const { useInput, useApp, useStdout } = ink.hooks
21
+ const { useState, useEffect } = React
22
+
23
+ // ─── Scene Runner ────────────────────────────────────────────────────
24
+ // Scenes are code strings run as bun subprocesses.
25
+ // The stage entity tracks which scenes exist and which is active.
26
+ // Scene entities track individual code, output, error, status.
27
+
28
+ const stage = container.entity('inkbot:stage')
29
+ stage.setState({ activeSceneId: null, sceneIds: [] as string[], tick: 0 })
30
+
31
+ const sceneMap: Record<string, ReturnType<typeof container.entity>> = {}
32
+
33
+ function bumpStage() {
34
+ stage.setState({ tick: ((stage.state.get('tick') as number) || 0) + 1 })
35
+ }
36
+
37
+ function getOrCreateScene(id: string, code: string) {
38
+ if (sceneMap[id]) {
39
+ sceneMap[id].setState({ code })
40
+ return sceneMap[id]
41
+ }
42
+ const scene = container.entity(`inkbot:scene:${id}`)
43
+ scene.setState({ code, output: '', error: '', status: 'idle', exitCode: null })
44
+ sceneMap[id] = scene
45
+ const ids = [...((stage.state.get('sceneIds') || []) as string[])]
46
+ if (!ids.includes(id)) ids.push(id)
47
+ stage.setState({ sceneIds: ids })
48
+ if (!stage.state.get('activeSceneId')) stage.setState({ activeSceneId: id })
49
+ return scene
50
+ }
51
+
52
+ const proc = container.feature('proc')
53
+ const fs = container.feature('fs')
54
+ const sceneTmpDir = `${tmpdir()}/inkbot-scenes`
55
+ fs.ensureFolder(sceneTmpDir)
56
+
57
+ async function runScene(id: string): Promise<{ output: string; error: string; exitCode: number }> {
58
+ const scene = sceneMap[id]
59
+ if (!scene) throw new Error(`Scene "${id}" not found`)
60
+
61
+ const code = scene.state.get('code') as string
62
+ scene.setState({ status: 'running', output: '', error: '' })
63
+ bumpStage()
64
+
65
+ // Write to tmpdir, shell out to `luca run` — gets full container context + process isolation
66
+ const file = `${sceneTmpDir}/${id.replace(/[^a-zA-Z0-9-]/g, '_')}_${Date.now()}.ts`
67
+ fs.writeFile(file, code)
68
+
69
+ try {
70
+ const result = await proc.spawnAndCapture('luca', ['run', file], {
71
+ cwd: container.cwd,
72
+ onOutput(data: string) {
73
+ scene.setState({ output: ((scene.state.get('output') || '') as string) + data })
74
+ bumpStage()
75
+ },
76
+ onError(data: string) {
77
+ scene.setState({ error: ((scene.state.get('error') || '') as string) + data })
78
+ bumpStage()
79
+ },
80
+ })
81
+
82
+ const status = result.exitCode === 0 ? 'complete' : 'failed'
83
+ scene.setState({ status, exitCode: result.exitCode })
84
+ bumpStage()
85
+ try { fs.unlink(file) } catch {}
86
+
87
+ return {
88
+ output: (scene.state.get('output') || '') as string,
89
+ error: (scene.state.get('error') || '') as string,
90
+ exitCode: result.exitCode ?? 1,
91
+ }
92
+ } catch (err: any) {
93
+ scene.setState({ status: 'failed', error: err.message, exitCode: 1 })
94
+ bumpStage()
95
+ try { fs.unlink(file) } catch {}
96
+ return { output: '', error: err.message, exitCode: 1 }
97
+ }
98
+ }
99
+
100
+ // ─── Assistant ───────────────────────────────────────────────────────
101
+ const mgr = container.feature('assistantsManager')
102
+ await mgr.discover()
103
+ const assistant = mgr.create('inkbot', { model: options.model })
104
+
105
+ // Scene completion → inject result into conversation so the assistant sees it
106
+ stage.on('sceneComplete' as any, (id: string, output: string) => {
107
+ const msg = output.trim()
108
+ ? `[Scene "${id}" completed]\n${output.trim()}`
109
+ : `[Scene "${id}" completed with no output]`
110
+ assistant.conversation?.pushMessage({ role: 'developer', content: msg })
111
+ })
112
+
113
+ stage.on('sceneFailed' as any, (id: string, error: string) => {
114
+ const msg = `[Scene "${id}" failed]\n${error.trim()}`
115
+ assistant.conversation?.pushMessage({ role: 'developer', content: msg })
116
+ // Auto-ask the assistant to fix it
117
+ assistant.ask(msg).catch(() => {})
118
+ })
119
+
120
+ // Canvas tools — registered directly so they close over stage/sceneMap
121
+ assistant.addTool(
122
+ 'draw',
123
+ async (args: { code: string; sceneId?: string }) => {
124
+ const id = args.sceneId || 'default'
125
+ getOrCreateScene(id, args.code)
126
+ stage.setState({ activeSceneId: id })
127
+ bumpStage()
128
+ // Fire and forget — result feeds back via stage events
129
+ runScene(id).then(result => {
130
+ if (result.exitCode === 0) {
131
+ stage.emit('sceneComplete' as any, id, result.output)
132
+ } else {
133
+ stage.emit('sceneFailed' as any, id, result.error)
134
+ }
135
+ })
136
+ return { status: 'running', sceneId: id }
137
+ },
138
+ z.object({
139
+ code: z.string().describe('TypeScript code to execute. Use console.log() for visible output.'),
140
+ sceneId: z.string().optional().describe('Scene id (defaults to "default").'),
141
+ }).describe('Draw or redraw the canvas. Returns immediately — output streams to the canvas. If the scene fails, you will be notified automatically.'),
142
+ )
143
+
144
+ assistant.addTool(
145
+ 'create_scene',
146
+ async (args: { id: string; code: string }) => {
147
+ getOrCreateScene(args.id, args.code)
148
+ return { created: args.id, allScenes: stage.state.get('sceneIds') }
149
+ },
150
+ z.object({
151
+ id: z.string().describe('Unique scene identifier'),
152
+ code: z.string().describe('TypeScript code for this scene'),
153
+ }).describe('Create a named scene without running it yet.'),
154
+ )
155
+
156
+ assistant.addTool(
157
+ 'run_scene',
158
+ async (args: { id: string }) => runScene(args.id),
159
+ z.object({
160
+ id: z.string().describe('Scene id to run'),
161
+ }).describe('Run a specific scene by its id.'),
162
+ )
163
+
164
+ assistant.addTool(
165
+ 'run_all',
166
+ async () => {
167
+ const ids = (stage.state.get('sceneIds') || []) as string[]
168
+ const results: any[] = []
169
+ for (const id of ids) results.push({ id, ...(await runScene(id)) })
170
+ return results
171
+ },
172
+ z.object({}).describe('Run every scene in order and return all results.'),
173
+ )
174
+
175
+ assistant.addTool(
176
+ 'get_canvas',
177
+ async () => {
178
+ const activeId = stage.state.get('activeSceneId') as string | null
179
+ if (!activeId || !sceneMap[activeId]) return { status: 'empty', allScenes: [] }
180
+ const s = sceneMap[activeId]
181
+ return {
182
+ sceneId: activeId,
183
+ status: s.state.get('status'),
184
+ output: s.state.get('output'),
185
+ error: s.state.get('error'),
186
+ code: s.state.get('code'),
187
+ allScenes: stage.state.get('sceneIds'),
188
+ }
189
+ },
190
+ z.object({}).describe('Inspect the current canvas: active scene output, error, code, status.'),
191
+ )
192
+
193
+ assistant.addTool(
194
+ 'activate_scene',
195
+ async (args: { id: string }) => {
196
+ if (!sceneMap[args.id]) return { error: `Scene "${args.id}" not found` }
197
+ stage.setState({ activeSceneId: args.id })
198
+ bumpStage()
199
+ return { activeSceneId: args.id }
200
+ },
201
+ z.object({
202
+ id: z.string().describe('Scene id to make active in the canvas'),
203
+ }).describe('Switch the canvas to display a different scene.'),
204
+ )
205
+
206
+ // ─── Ink App ─────────────────────────────────────────────────────────
207
+
208
+ type Msg = { role: 'user' | 'assistant' | 'system'; content: string }
209
+
210
+ function App() {
211
+ const [messages, setMessages] = useState<Msg[]>([])
212
+ const [input, setInput] = useState('')
213
+ const [streaming, setStreaming] = useState('')
214
+ const [thinking, setThinking] = useState(false)
215
+ const [activity, setActivity] = useState('')
216
+ const [canvas, setCanvas] = useState({ output: '', error: '', status: 'empty' })
217
+ const { exit } = useApp()
218
+ const { stdout } = useStdout()
219
+ const rows = stdout?.rows ?? 24
220
+
221
+ // --- assistant events ---
222
+ useEffect(() => {
223
+ const onPreview = (text: string) => setStreaming(text)
224
+ const onResponse = (text: string) => {
225
+ setStreaming('')
226
+ setThinking(false)
227
+ setActivity('')
228
+ setMessages(prev => [...prev, { role: 'assistant', content: text }])
229
+ }
230
+ const onToolCall = (name: string) => setActivity(`${name}`)
231
+ const onToolResult = () => setActivity('')
232
+
233
+ assistant.on('preview', onPreview)
234
+ assistant.on('response', onResponse)
235
+ assistant.on('toolCall', onToolCall)
236
+ assistant.on('toolResult', onToolResult)
237
+ return () => {
238
+ assistant.off('preview', onPreview)
239
+ assistant.off('response', onResponse)
240
+ assistant.off('toolCall', onToolCall)
241
+ assistant.off('toolResult', onToolResult)
242
+ }
243
+ }, [])
244
+
245
+ // --- stage entity ticks → canvas state ---
246
+ useEffect(() => {
247
+ const unsub = stage.state.observe((_changeType: any, key: any) => {
248
+ if (key !== 'tick') return
249
+ const activeId = stage.state.get('activeSceneId') as string | null
250
+ if (!activeId || !sceneMap[activeId]) {
251
+ setCanvas({ output: '', error: '', status: 'empty' })
252
+ return
253
+ }
254
+ const s = sceneMap[activeId]
255
+ setCanvas({
256
+ output: (s.state.get('output') || '') as string,
257
+ error: (s.state.get('error') || '') as string,
258
+ status: (s.state.get('status') || 'idle') as string,
259
+ })
260
+ })
261
+ return unsub
262
+ }, [])
263
+
264
+ // --- keyboard ---
265
+ useInput((ch, key) => {
266
+ if (key.escape) { exit(); return }
267
+
268
+ if (key.return) {
269
+ if (thinking) return
270
+ const msg = input.trim()
271
+ if (!msg) return
272
+ setInput('')
273
+ setMessages(prev => [...prev, { role: 'user', content: msg }])
274
+ setThinking(true)
275
+ assistant.ask(msg).catch((err: any) => {
276
+ setMessages(prev => [...prev, { role: 'system', content: `error: ${err.message}` }])
277
+ setThinking(false)
278
+ })
279
+ return
280
+ }
281
+
282
+ if (key.backspace || key.delete) {
283
+ setInput(prev => prev.slice(0, -1))
284
+ return
285
+ }
286
+
287
+ if (ch && !key.ctrl && !key.meta) {
288
+ setInput(prev => prev + ch)
289
+ }
290
+ })
291
+
292
+ // --- render ---
293
+ const visible = messages.slice(-30)
294
+ const sceneIds = (stage.state.get('sceneIds') || []) as string[]
295
+ const activeId = (stage.state.get('activeSceneId') || '') as string
296
+
297
+ const chatChildren: any[] = []
298
+
299
+ visible.forEach((m, i) => {
300
+ const color = m.role === 'user' ? 'green' : m.role === 'system' ? 'red' : 'white'
301
+ const prefix = m.role === 'user' ? '> ' : ' '
302
+ chatChildren.push(h(Text, { key: `msg-${i}`, wrap: 'wrap', color }, `${prefix}${m.content}`))
303
+ })
304
+
305
+ if (streaming) chatChildren.push(h(Text, { key: 'chat-stream', wrap: 'wrap', dimColor: true }, ` ${streaming}`))
306
+ if (thinking && !streaming) chatChildren.push(h(Text, { key: 'chat-think', color: 'yellow' }, ' thinking...'))
307
+ if (activity) chatChildren.push(h(Text, { key: 'chat-act', color: 'blue' }, ` [${activity}]`))
308
+
309
+ const canvasBody = canvas.output
310
+ ? h(Text, { key: 'cvs-out', wrap: 'wrap' }, canvas.output)
311
+ : canvas.status === 'empty'
312
+ ? h(Text, { key: 'cvs-empty', dimColor: true }, ' ask inkbot to draw something')
313
+ : null
314
+
315
+ // border + header + status = 4 rows overhead per panel
316
+ const panelHeight = rows - 2
317
+
318
+ return h(Box, { flexDirection: 'row', width: '100%', height: rows },
319
+ // ── Chat ──
320
+ h(Box, { key: 'chat', flexDirection: 'column', width: '50%', height: rows, borderStyle: 'round', borderColor: 'cyan', paddingX: 1 },
321
+ h(Text, { bold: true, color: 'cyan' }, ' inkbot '),
322
+ h(Box, { flexDirection: 'column', flexGrow: 1, overflow: 'hidden' }, ...chatChildren),
323
+ h(Box, { borderStyle: 'single', borderColor: 'gray', paddingX: 1 },
324
+ h(Text, { color: 'green' }, '> '),
325
+ h(Text, null, input),
326
+ h(Text, { dimColor: true }, '\u2588'),
327
+ ),
328
+ ),
329
+ // ── Canvas ──
330
+ h(Box, { key: 'canvas', flexDirection: 'column', width: '50%', height: rows, borderStyle: 'round', borderColor: 'magenta', paddingX: 1 },
331
+ h(Text, { bold: true, color: 'magenta' }, ' canvas '),
332
+ h(Box, { flexDirection: 'column', height: panelHeight - 4, overflow: 'hidden' },
333
+ canvasBody,
334
+ canvas.error ? h(Text, { key: 'cvs-err', color: 'red', wrap: 'wrap' }, canvas.error) : null,
335
+ ),
336
+ h(Box, null,
337
+ h(Text, { dimColor: true }, ` ${canvas.status}`),
338
+ sceneIds.length > 1 ? h(Text, { dimColor: true }, ` scenes: ${sceneIds.join(', ')} active: ${activeId}`) : null,
339
+ ),
340
+ ),
341
+ )
342
+ }
343
+
344
+ // Mount and hold
345
+ await ink.render(h(App))
346
+ await ink.waitUntilExit()
347
+ }
348
+
349
+ export default {
350
+ description: 'Launch the Inkbot split-pane assistant with a live canvas.',
351
+ argsSchema,
352
+ handler: inkbot,
353
+ }
@@ -0,0 +1,63 @@
1
+ import type { ContainerState } from '../container';
2
+ import { type NodeFeatures, NodeContainer } from '../node/container';
3
+ import '@/introspection/generated.agi.js';
4
+ import { OpenAIClient } from '../clients/openai';
5
+ import { ElevenLabsClient } from '../clients/elevenlabs';
6
+ import { ClaudeCode } from './features/claude-code';
7
+ import { OpenAICodex } from './features/openai-codex';
8
+ import { Conversation } from './features/conversation';
9
+ import { ConversationHistory } from './features/conversation-history';
10
+ import { Assistant } from './features/assistant';
11
+ import { AssistantsManager } from './features/assistants-manager';
12
+ import { DocsReader } from './features/docs-reader';
13
+ import { SkillsLibrary } from './features/skills-library';
14
+ import { BrowserUse } from './features/browser-use';
15
+ import { SemanticSearch } from '@soederpop/luca/node/features/semantic-search';
16
+ import { ContentDb } from '@soederpop/luca/node/features/content-db';
17
+ import { FileTools } from './features/file-tools';
18
+ import { LucaCoder } from './features/luca-coder';
19
+ import type { ConversationTool } from './features/conversation';
20
+ import type { ZodType } from 'zod';
21
+ export { ClaudeCode, OpenAICodex, Conversation, ConversationHistory, Assistant, AssistantsManager, DocsReader, SkillsLibrary, BrowserUse, FileTools, LucaCoder, SemanticSearch, ContentDb, NodeContainer, OpenAIClient, ElevenLabsClient, };
22
+ export type { ConversationTool, ZodType, ContainerState, NodeFeatures, };
23
+ export interface AGIFeatures extends NodeFeatures {
24
+ conversation: typeof Conversation;
25
+ claudeCode: typeof ClaudeCode;
26
+ openaiCodex: typeof OpenAICodex;
27
+ conversationHistory: typeof ConversationHistory;
28
+ assistant: typeof Assistant;
29
+ assistantsManager: typeof AssistantsManager;
30
+ docsReader: typeof DocsReader;
31
+ skillsLibrary: typeof SkillsLibrary;
32
+ browserUse: typeof BrowserUse;
33
+ fileTools: typeof FileTools;
34
+ lucaCoder: typeof LucaCoder;
35
+ }
36
+ export interface ConversationFactoryOptions {
37
+ tools?: {
38
+ handlers: Record<string, ConversationTool['handler']>;
39
+ schemas: Record<string, ZodType>;
40
+ };
41
+ systemPrompt?: string;
42
+ model?: string;
43
+ id?: string;
44
+ title?: string;
45
+ thread?: string;
46
+ tags?: string[];
47
+ metadata?: Record<string, any>;
48
+ }
49
+ /**
50
+ * AGI-specific container that extends NodeContainer with AI capabilities including
51
+ * OpenAI conversations, code generation, and self-modifying agent features.
52
+ */
53
+ export declare class AGIContainer<Features extends AGIFeatures = AGIFeatures, K extends ContainerState = ContainerState> extends NodeContainer<Features, K> {
54
+ openai: OpenAIClient;
55
+ claudeCode?: ClaudeCode;
56
+ openaiCodex?: OpenAICodex;
57
+ conversationHistory?: ConversationHistory;
58
+ docs: ContentDb;
59
+ conversation(options?: ConversationFactoryOptions): Promise<InstanceType<Features["conversation"]>>;
60
+ }
61
+ declare const container: any;
62
+ export default container;
63
+ //# sourceMappingURL=container.server.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"container.server.d.ts","sourceRoot":"","sources":["../../src/agi/container.server.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,20 @@
1
+ import { z } from 'zod';
2
+ import type { EndpointContext } from '../../endpoint.js';
3
+ export declare const path = "/ask";
4
+ export declare const description = "Ask the AGI container a question";
5
+ export declare const tags: string[];
6
+ export declare const postSchema: z.ZodObject<{
7
+ question: z.ZodString;
8
+ context: z.ZodOptional<z.ZodString>;
9
+ stream: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
10
+ }, z.core.$strip>;
11
+ export declare function post(parameters: z.infer<typeof postSchema>, ctx: EndpointContext): Promise<{
12
+ answer: any;
13
+ } | undefined>;
14
+ export declare const getSchema: z.ZodObject<{
15
+ question: z.ZodString;
16
+ }, z.core.$strip>;
17
+ export declare function get(parameters: z.infer<typeof getSchema>, ctx: EndpointContext): Promise<{
18
+ answer: any;
19
+ }>;
20
+ //# sourceMappingURL=ask.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ask.d.ts","sourceRoot":"","sources":["../../../src/agi/endpoints/ask.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AAExD,eAAO,MAAM,IAAI,SAAS,CAAA;AAC1B,eAAO,MAAM,WAAW,qCAAqC,CAAA;AAC7D,eAAO,MAAM,IAAI,UAAU,CAAA;AAE3B,eAAO,MAAM,UAAU;;;;iBAIrB,CAAA;AAEF,wBAAsB,IAAI,CACxB,UAAU,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,EACtC,GAAG,EAAE,eAAe;;eA+BrB;AAED,eAAO,MAAM,SAAS;;iBAEpB,CAAA;AAEF,wBAAsB,GAAG,CACvB,UAAU,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,SAAS,CAAC,EACrC,GAAG,EAAE,eAAe;;GAKrB"}
@@ -0,0 +1,27 @@
1
+ import { z } from 'zod';
2
+ import type { EndpointContext } from '../../../endpoint.js';
3
+ export declare const path = "/api/conversations/:id";
4
+ export declare const description = "Get or delete a specific conversation";
5
+ export declare const tags: string[];
6
+ export declare const getSchema: z.ZodObject<{
7
+ id: z.ZodString;
8
+ }, z.core.$strip>;
9
+ export declare function get(parameters: z.infer<typeof getSchema>, ctx: EndpointContext): Promise<{
10
+ error: string;
11
+ conversation?: undefined;
12
+ } | {
13
+ conversation: any;
14
+ error?: undefined;
15
+ }>;
16
+ export declare const deleteSchema: z.ZodObject<{
17
+ id: z.ZodString;
18
+ }, z.core.$strip>;
19
+ export declare function del(parameters: z.infer<typeof deleteSchema>, ctx: EndpointContext): Promise<{
20
+ error: string;
21
+ deleted?: undefined;
22
+ } | {
23
+ deleted: boolean;
24
+ error?: undefined;
25
+ }>;
26
+ export { del as delete };
27
+ //# sourceMappingURL=%5Bid%5D.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"[id].d.ts","sourceRoot":"","sources":["../../../../src/agi/endpoints/conversations/[id].ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAE3D,eAAO,MAAM,IAAI,2BAA2B,CAAA;AAC5C,eAAO,MAAM,WAAW,0CAA0C,CAAA;AAClE,eAAO,MAAM,IAAI,UAAoB,CAAA;AAErC,eAAO,MAAM,SAAS;;iBAEpB,CAAA;AAEF,wBAAsB,GAAG,CAAC,UAAU,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,SAAS,CAAC,EAAE,GAAG,EAAE,eAAe;;;;;;GAYpF;AAED,eAAO,MAAM,YAAY;;iBAEvB,CAAA;AAEF,wBAAsB,GAAG,CAAC,UAAU,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,EAAE,GAAG,EAAE,eAAe;;;;;;GAYvF;AAGD,OAAO,EAAE,GAAG,IAAI,MAAM,EAAE,CAAA"}
@@ -0,0 +1,18 @@
1
+ import { z } from 'zod';
2
+ import type { EndpointContext } from '../../endpoint.js';
3
+ export declare const path = "/api/conversations";
4
+ export declare const description = "List and search saved conversations";
5
+ export declare const tags: string[];
6
+ export declare const getSchema: z.ZodObject<{
7
+ tag: z.ZodOptional<z.ZodString>;
8
+ thread: z.ZodOptional<z.ZodString>;
9
+ model: z.ZodOptional<z.ZodString>;
10
+ query: z.ZodOptional<z.ZodString>;
11
+ expert: z.ZodOptional<z.ZodString>;
12
+ limit: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
13
+ offset: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
14
+ }, z.core.$strip>;
15
+ export declare function get(parameters: z.infer<typeof getSchema>, ctx: EndpointContext): Promise<{
16
+ conversations: any;
17
+ }>;
18
+ //# sourceMappingURL=conversations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"conversations.d.ts","sourceRoot":"","sources":["../../../src/agi/endpoints/conversations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AAExD,eAAO,MAAM,IAAI,uBAAuB,CAAA;AACxC,eAAO,MAAM,WAAW,wCAAwC,CAAA;AAChE,eAAO,MAAM,IAAI,UAAoB,CAAA;AAErC,eAAO,MAAM,SAAS;;;;;;;;iBAQpB,CAAA;AAEF,wBAAsB,GAAG,CAAC,UAAU,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,SAAS,CAAC,EAAE,GAAG,EAAE,eAAe;;GAapF"}
@@ -0,0 +1,8 @@
1
+ import type { EndpointContext } from '../../endpoint.js';
2
+ export declare const path = "/api/experts";
3
+ export declare const description = "List all available experts with their descriptions";
4
+ export declare const tags: string[];
5
+ export declare function get(_parameters: any, ctx: EndpointContext): Promise<{
6
+ experts: any[];
7
+ }>;
8
+ //# sourceMappingURL=experts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"experts.d.ts","sourceRoot":"","sources":["../../../src/agi/endpoints/experts.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AAExD,eAAO,MAAM,IAAI,iBAAiB,CAAA;AAClC,eAAO,MAAM,WAAW,uDAAuD,CAAA;AAC/E,eAAO,MAAM,IAAI,UAAc,CAAA;AAE/B,wBAAsB,GAAG,CAAC,WAAW,EAAE,GAAG,EAAE,GAAG,EAAE,eAAe;;GA6B/D"}