@soederpop/luca 0.1.2 → 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 (366) hide show
  1. package/CLAUDE.md +2 -0
  2. package/assistants/codingAssistant/hooks.ts +1 -5
  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/src/agi/feature.ts +13 -0
  300. package/src/agi/features/assistant.ts +36 -25
  301. package/src/agi/features/assistants-manager.ts +70 -5
  302. package/src/agi/features/autonomous-assistant.ts +1 -5
  303. package/src/agi/features/browser-use.ts +2 -2
  304. package/src/agi/features/claude-code.ts +165 -1
  305. package/src/agi/features/conversation-history.ts +2 -6
  306. package/src/agi/features/conversation.ts +95 -3
  307. package/src/agi/features/docs-reader.ts +2 -1
  308. package/src/agi/features/file-tools.ts +2 -2
  309. package/src/agi/features/luca-coder.ts +1 -5
  310. package/src/agi/features/openai-codex.ts +1 -1
  311. package/src/agi/features/openapi.ts +3 -3
  312. package/src/agi/features/skills-library.ts +87 -6
  313. package/src/agi/lib/interceptor-chain.ts +10 -0
  314. package/src/agi/lib/token-counter.ts +1 -1
  315. package/src/bootstrap/generated.ts +126 -1
  316. package/src/bus.ts +27 -5
  317. package/src/cli/build-info.ts +2 -2
  318. package/src/client.ts +2 -2
  319. package/src/clients/elevenlabs/index.ts +5 -0
  320. package/src/commands/bootstrap.ts +2 -1
  321. package/src/commands/chat.ts +1 -0
  322. package/src/commands/code.ts +4 -2
  323. package/src/commands/prompt.ts +34 -34
  324. package/src/commands/sandbox-mcp.ts +69 -163
  325. package/src/commands/save-api-docs.ts +10 -8
  326. package/src/commands/select.ts +8 -3
  327. package/src/container-describer.ts +70 -84
  328. package/src/container.ts +93 -3
  329. package/src/endpoint.ts +1 -1
  330. package/src/entity.ts +173 -0
  331. package/src/feature.ts +3 -3
  332. package/src/helper.ts +8 -4
  333. package/src/introspection/generated.agi.ts +1246 -798
  334. package/src/introspection/generated.node.ts +892 -798
  335. package/src/introspection/generated.web.ts +95 -3
  336. package/src/introspection/scan.ts +1 -1
  337. package/src/node/container.ts +1 -1
  338. package/src/node/features/content-db.ts +3 -3
  339. package/src/node/features/file-manager.ts +10 -9
  340. package/src/node/features/git.ts +5 -5
  341. package/src/node/features/helpers.ts +1 -1
  342. package/src/node/features/json-tree.ts +1 -1
  343. package/src/node/features/os.ts +3 -3
  344. package/src/node/features/package-finder.ts +1 -1
  345. package/src/node/features/process-manager.ts +1 -1
  346. package/src/node/features/python.ts +3 -3
  347. package/src/node/features/redis.ts +1 -1
  348. package/src/node/features/repl.ts +2 -2
  349. package/src/node/features/transpiler.ts +2 -2
  350. package/src/node/features/ui.ts +1 -1
  351. package/src/node/features/vm.ts +3 -3
  352. package/src/node/features/yaml-tree.ts +1 -1
  353. package/src/node.ts +1 -0
  354. package/src/python/generated.ts +1 -1
  355. package/src/scaffolds/generated.ts +1 -1
  356. package/src/selector.ts +74 -4
  357. package/src/server.ts +2 -2
  358. package/src/servers/mcp.ts +6 -6
  359. package/src/web/features/helpers.ts +1 -1
  360. package/src/web/features/network.ts +1 -0
  361. package/test/conversation.test.ts +220 -0
  362. package/tsconfig.build.json +12 -0
  363. package/tsconfig.json +1 -1
  364. package/scripts/examples/telegram-ink-ui.ts +0 -302
  365. package/scripts/examples/using-openai-codex.ts +0 -23
  366. package/scripts/examples/vm-loading-esm-modules.ts +0 -16
@@ -0,0 +1,9 @@
1
+ import type { AGIFeatures, AGIContainer } from './container.server.js';
2
+ import type { FeatureOptions, FeatureState } from '../feature.ts';
3
+ import { features, Feature as NodeFeature } from '../node/feature.ts';
4
+ export { features };
5
+ export type { FeatureState, FeatureOptions };
6
+ export declare class Feature<T extends FeatureState = FeatureState, K extends FeatureOptions = FeatureOptions> extends NodeFeature<T, K> {
7
+ get container(): AGIContainer<AGIFeatures>;
8
+ }
9
+ //# sourceMappingURL=feature.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"feature.d.ts","sourceRoot":"","sources":["../../src/agi/feature.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AACtE,OAAO,KAAK,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AACjE,OAAO,EAAE,QAAQ,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,oBAAoB,CAAA;AAErE,OAAO,EAAE,QAAQ,EAAE,CAAA;AAEnB,YAAY,EAAE,YAAY,EAAE,cAAc,EAAE,CAAA;AAE5C,qBAAa,OAAO,CAAC,CAAC,SAAS,YAAY,GAAG,YAAY,EAAE,CAAC,SAAS,cAAc,GAAG,cAAc,CAAE,SAAQ,WAAW,CAAC,CAAC,EAAE,CAAC,CAAC;IAC5H,IAAa,SAAS,IAAI,YAAY,CAAC,WAAW,CAAC,CAElD;CACJ"}
@@ -0,0 +1,509 @@
1
+ import { z } from 'zod';
2
+ import { Feature } from '../feature.js';
3
+ import type { Conversation, ConversationTool, ContentPart, AskOptions } from './conversation';
4
+ import type { ContentDb } from '@soederpop/luca/node';
5
+ import type { ConversationHistory, ConversationMeta } from './conversation-history';
6
+ import { InterceptorChain, type InterceptorFn, type InterceptorPoints, type InterceptorPoint } from '../lib/interceptor-chain.js';
7
+ declare module '@soederpop/luca/feature' {
8
+ interface AvailableFeatures {
9
+ assistant: typeof Assistant;
10
+ }
11
+ }
12
+ export declare const AssistantEventsSchema: z.ZodObject<{
13
+ stateChange: z.ZodTuple<[z.ZodAny], null>;
14
+ enabled: z.ZodTuple<[], null>;
15
+ created: z.ZodTuple<[], null>;
16
+ started: z.ZodTuple<[], null>;
17
+ turnStart: z.ZodTuple<[z.ZodObject<{
18
+ turn: z.ZodNumber;
19
+ isFollowUp: z.ZodBoolean;
20
+ }, z.core.$strip>], null>;
21
+ turnEnd: z.ZodTuple<[z.ZodObject<{
22
+ turn: z.ZodNumber;
23
+ hasToolCalls: z.ZodBoolean;
24
+ }, z.core.$strip>], null>;
25
+ chunk: z.ZodTuple<[z.ZodString], null>;
26
+ preview: z.ZodTuple<[z.ZodString], null>;
27
+ response: z.ZodTuple<[z.ZodString], null>;
28
+ rawEvent: z.ZodTuple<[z.ZodAny], null>;
29
+ mcpEvent: z.ZodTuple<[z.ZodAny], null>;
30
+ toolCall: z.ZodTuple<[z.ZodString, z.ZodAny], null>;
31
+ toolResult: z.ZodTuple<[z.ZodString, z.ZodAny], null>;
32
+ toolError: z.ZodTuple<[z.ZodString, z.ZodAny], null>;
33
+ hookFired: z.ZodTuple<[z.ZodString], null>;
34
+ reloaded: z.ZodTuple<[], null>;
35
+ systemPromptExtensionsChanged: z.ZodTuple<[], null>;
36
+ }, z.core.$strip>;
37
+ export declare const AssistantStateSchema: z.ZodObject<{
38
+ enabled: z.ZodDefault<z.ZodBoolean>;
39
+ started: z.ZodBoolean;
40
+ conversationCount: z.ZodNumber;
41
+ lastResponse: z.ZodString;
42
+ folder: z.ZodString;
43
+ docsFolder: z.ZodString;
44
+ conversationId: z.ZodOptional<z.ZodString>;
45
+ threadId: z.ZodOptional<z.ZodString>;
46
+ systemPrompt: z.ZodString;
47
+ systemPromptExtensions: z.ZodRecord<z.ZodString, z.ZodString>;
48
+ meta: z.ZodRecord<z.ZodString, z.ZodAny>;
49
+ tools: z.ZodRecord<z.ZodString, z.ZodAny>;
50
+ hooks: z.ZodRecord<z.ZodString, z.ZodAny>;
51
+ resumeThreadId: z.ZodOptional<z.ZodString>;
52
+ pendingPlugins: z.ZodArray<z.ZodAny>;
53
+ conversation: z.ZodNullable<z.ZodAny>;
54
+ subagents: z.ZodRecord<z.ZodString, z.ZodAny>;
55
+ }, z.core.$loose>;
56
+ export declare const AssistantOptionsSchema: z.ZodObject<{
57
+ name: z.ZodOptional<z.ZodString>;
58
+ _cacheKey: z.ZodOptional<z.ZodString>;
59
+ cached: z.ZodOptional<z.ZodBoolean>;
60
+ enable: z.ZodOptional<z.ZodBoolean>;
61
+ folder: z.ZodDefault<z.ZodString>;
62
+ docsFolder: z.ZodOptional<z.ZodString>;
63
+ systemPrompt: z.ZodOptional<z.ZodString>;
64
+ prependPrompt: z.ZodOptional<z.ZodString>;
65
+ appendPrompt: z.ZodOptional<z.ZodString>;
66
+ tools: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
67
+ schemas: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
68
+ model: z.ZodOptional<z.ZodString>;
69
+ maxTokens: z.ZodOptional<z.ZodNumber>;
70
+ temperature: z.ZodOptional<z.ZodNumber>;
71
+ topP: z.ZodOptional<z.ZodNumber>;
72
+ topK: z.ZodOptional<z.ZodNumber>;
73
+ frequencyPenalty: z.ZodOptional<z.ZodNumber>;
74
+ presencePenalty: z.ZodOptional<z.ZodNumber>;
75
+ stop: z.ZodOptional<z.ZodArray<z.ZodString>>;
76
+ local: z.ZodDefault<z.ZodBoolean>;
77
+ historyMode: z.ZodOptional<z.ZodEnum<{
78
+ session: "session";
79
+ lifecycle: "lifecycle";
80
+ daily: "daily";
81
+ persistent: "persistent";
82
+ }>>;
83
+ injectTimestamps: z.ZodDefault<z.ZodBoolean>;
84
+ allowTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
85
+ forbidTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
86
+ toolNames: z.ZodOptional<z.ZodArray<z.ZodString>>;
87
+ }, z.core.$strip>;
88
+ export type AssistantState = z.infer<typeof AssistantStateSchema>;
89
+ export type AssistantOptions = z.infer<typeof AssistantOptionsSchema>;
90
+ /**
91
+ * An Assistant is a combination of a system prompt and tool calls that has a
92
+ * conversation with an LLM. You define an assistant by creating a folder with
93
+ * CORE.md (system prompt), tools.ts (tool implementations), and hooks.ts (event handlers).
94
+ *
95
+ * @extends Feature
96
+ *
97
+ * @example
98
+ * ```typescript
99
+ * const assistant = container.feature('assistant', {
100
+ * folder: 'assistants/my-helper'
101
+ * })
102
+ * const answer = await assistant.ask('What capabilities do you have?')
103
+ * ```
104
+ */
105
+ export declare class Assistant extends Feature<AssistantState, AssistantOptions> {
106
+ static stateSchema: z.ZodObject<{
107
+ enabled: z.ZodDefault<z.ZodBoolean>;
108
+ started: z.ZodBoolean;
109
+ conversationCount: z.ZodNumber;
110
+ lastResponse: z.ZodString;
111
+ folder: z.ZodString;
112
+ docsFolder: z.ZodString;
113
+ conversationId: z.ZodOptional<z.ZodString>;
114
+ threadId: z.ZodOptional<z.ZodString>;
115
+ systemPrompt: z.ZodString;
116
+ systemPromptExtensions: z.ZodRecord<z.ZodString, z.ZodString>;
117
+ meta: z.ZodRecord<z.ZodString, z.ZodAny>;
118
+ tools: z.ZodRecord<z.ZodString, z.ZodAny>;
119
+ hooks: z.ZodRecord<z.ZodString, z.ZodAny>;
120
+ resumeThreadId: z.ZodOptional<z.ZodString>;
121
+ pendingPlugins: z.ZodArray<z.ZodAny>;
122
+ conversation: z.ZodNullable<z.ZodAny>;
123
+ subagents: z.ZodRecord<z.ZodString, z.ZodAny>;
124
+ }, z.core.$loose>;
125
+ static optionsSchema: z.ZodObject<{
126
+ name: z.ZodOptional<z.ZodString>;
127
+ _cacheKey: z.ZodOptional<z.ZodString>;
128
+ cached: z.ZodOptional<z.ZodBoolean>;
129
+ enable: z.ZodOptional<z.ZodBoolean>;
130
+ folder: z.ZodDefault<z.ZodString>;
131
+ docsFolder: z.ZodOptional<z.ZodString>;
132
+ systemPrompt: z.ZodOptional<z.ZodString>;
133
+ prependPrompt: z.ZodOptional<z.ZodString>;
134
+ appendPrompt: z.ZodOptional<z.ZodString>;
135
+ tools: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
136
+ schemas: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
137
+ model: z.ZodOptional<z.ZodString>;
138
+ maxTokens: z.ZodOptional<z.ZodNumber>;
139
+ temperature: z.ZodOptional<z.ZodNumber>;
140
+ topP: z.ZodOptional<z.ZodNumber>;
141
+ topK: z.ZodOptional<z.ZodNumber>;
142
+ frequencyPenalty: z.ZodOptional<z.ZodNumber>;
143
+ presencePenalty: z.ZodOptional<z.ZodNumber>;
144
+ stop: z.ZodOptional<z.ZodArray<z.ZodString>>;
145
+ local: z.ZodDefault<z.ZodBoolean>;
146
+ historyMode: z.ZodOptional<z.ZodEnum<{
147
+ session: "session";
148
+ lifecycle: "lifecycle";
149
+ daily: "daily";
150
+ persistent: "persistent";
151
+ }>>;
152
+ injectTimestamps: z.ZodDefault<z.ZodBoolean>;
153
+ allowTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
154
+ forbidTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
155
+ toolNames: z.ZodOptional<z.ZodArray<z.ZodString>>;
156
+ }, z.core.$strip>;
157
+ static eventsSchema: z.ZodObject<{
158
+ stateChange: z.ZodTuple<[z.ZodAny], null>;
159
+ enabled: z.ZodTuple<[], null>;
160
+ created: z.ZodTuple<[], null>;
161
+ started: z.ZodTuple<[], null>;
162
+ turnStart: z.ZodTuple<[z.ZodObject<{
163
+ turn: z.ZodNumber;
164
+ isFollowUp: z.ZodBoolean;
165
+ }, z.core.$strip>], null>;
166
+ turnEnd: z.ZodTuple<[z.ZodObject<{
167
+ turn: z.ZodNumber;
168
+ hasToolCalls: z.ZodBoolean;
169
+ }, z.core.$strip>], null>;
170
+ chunk: z.ZodTuple<[z.ZodString], null>;
171
+ preview: z.ZodTuple<[z.ZodString], null>;
172
+ response: z.ZodTuple<[z.ZodString], null>;
173
+ rawEvent: z.ZodTuple<[z.ZodAny], null>;
174
+ mcpEvent: z.ZodTuple<[z.ZodAny], null>;
175
+ toolCall: z.ZodTuple<[z.ZodString, z.ZodAny], null>;
176
+ toolResult: z.ZodTuple<[z.ZodString, z.ZodAny], null>;
177
+ toolError: z.ZodTuple<[z.ZodString, z.ZodAny], null>;
178
+ hookFired: z.ZodTuple<[z.ZodString], null>;
179
+ reloaded: z.ZodTuple<[], null>;
180
+ systemPromptExtensionsChanged: z.ZodTuple<[], null>;
181
+ }, z.core.$strip>;
182
+ static shortcut: "features.assistant";
183
+ readonly interceptors: {
184
+ beforeAsk: InterceptorChain<import("../lib/interceptor-chain.js").BeforeAskCtx>;
185
+ beforeTurn: InterceptorChain<import("../lib/interceptor-chain.js").BeforeTurnCtx>;
186
+ beforeToolCall: InterceptorChain<import("../lib/interceptor-chain.js").ToolCallCtx>;
187
+ afterToolCall: InterceptorChain<import("../lib/interceptor-chain.js").ToolCallCtx>;
188
+ beforeResponse: InterceptorChain<import("../lib/interceptor-chain.js").BeforeResponseCtx>;
189
+ };
190
+ /**
191
+ * Register an interceptor at a given point in the pipeline.
192
+ *
193
+ * @param point - The interception point
194
+ * @param fn - Middleware function receiving (ctx, next)
195
+ * @returns this, for chaining
196
+ */
197
+ intercept<K extends InterceptorPoint>(point: K, fn: InterceptorFn<InterceptorPoints[K]>): this;
198
+ /** @returns Default state with the assistant not started, zero conversations, and the resolved folder path. */
199
+ get initialState(): AssistantState;
200
+ get name(): string | undefined;
201
+ /** The absolute resolved path to the assistant folder. */
202
+ get resolvedFolder(): string;
203
+ /** The path to CORE.md which provides the system prompt. */
204
+ get corePromptPath(): string;
205
+ /** The path to tools.ts which provides tool implementations and schemas. */
206
+ get toolsModulePath(): string;
207
+ /** The path to hooks.ts which provides event handler functions. */
208
+ get hooksModulePath(): string;
209
+ /** Whether this assistant has a voice.yaml configuration file. */
210
+ get hasVoice(): boolean;
211
+ /** Parsed voice configuration from voice.yaml, or undefined if not present. */
212
+ get voiceConfig(): Record<string, any> | undefined;
213
+ get resolvedDocsFolder(): string;
214
+ /**
215
+ * Returns an instance of a ContentDb feature for the resolved docs folder
216
+ */
217
+ get contentDb(): ContentDb;
218
+ /**
219
+ * Called immediately after the assistant is constructed. Synchronously loads
220
+ * the system prompt, tools, and hooks, then binds hooks as event listeners
221
+ * so every emitted event automatically invokes its corresponding hook.
222
+ */
223
+ afterInitialize(): void;
224
+ get conversation(): Conversation;
225
+ get availableTools(): string[];
226
+ get messages(): import("openai/resources/index.mjs").ChatCompletionMessageParam[];
227
+ /** Whether the assistant has been started and is ready to receive questions. */
228
+ get isStarted(): boolean;
229
+ /** The current system prompt text. */
230
+ get systemPrompt(): string;
231
+ /** The named extensions appended to the system prompt. */
232
+ get systemPromptExtensions(): Record<string, string>;
233
+ /** The system prompt with all extensions appended. This is the value passed to the conversation. */
234
+ get effectiveSystemPrompt(): string;
235
+ /**
236
+ * Add or update a named system prompt extension. The value is appended
237
+ * to the base system prompt when passed to the conversation.
238
+ *
239
+ * @param key - A unique identifier for this extension
240
+ * @param value - The text to append
241
+ * @returns this, for chaining
242
+ */
243
+ addSystemPromptExtension(key: string, value: string): this;
244
+ /**
245
+ * Remove a named system prompt extension.
246
+ *
247
+ * @param key - The identifier of the extension to remove
248
+ * @returns this, for chaining
249
+ */
250
+ removeSystemPromptExtension(key: string): this;
251
+ /** Update the conversation's system message to reflect the current effective prompt. */
252
+ private syncSystemPromptToConversation;
253
+ /** The tools registered with this assistant. */
254
+ get tools(): Record<string, ConversationTool>;
255
+ /**
256
+ * Apply allowTools, forbidTools, and toolNames filters from options.
257
+ * toolNames is treated as an exact-match allowlist. allowTools/forbidTools support "*" glob patterns.
258
+ * allowTools is applied first (strict allowlist), then forbidTools removes from whatever remains.
259
+ */
260
+ private applyToolFilters;
261
+ /**
262
+ * Match a tool name against a pattern that supports "*" as a wildcard.
263
+ * - "*" matches everything
264
+ * - "prefix*" matches names starting with prefix
265
+ * - "*suffix" matches names ending with suffix
266
+ * - "pre*suf" matches names starting with pre and ending with suf
267
+ * - exact string matches exactly
268
+ */
269
+ private matchToolPattern;
270
+ /**
271
+ * Apply a setup function or a Helper instance to this assistant.
272
+ *
273
+ * When passed a function, it receives the assistant and can configure
274
+ * tools, hooks, event listeners, etc.
275
+ *
276
+ * When passed a Helper instance that exposes tools via toTools(),
277
+ * those tools are automatically added to this assistant.
278
+ *
279
+ * @param fnOrHelper - Setup function or Helper instance
280
+ * @returns this, for chaining
281
+ *
282
+ * @example
283
+ * ```typescript
284
+ * assistant
285
+ * .use(setupLogging)
286
+ * .use(container.feature('git'))
287
+ * ```
288
+ */
289
+ use(fnOrHelper: ((assistant: this) => void | Promise<void>) | {
290
+ toTools: () => {
291
+ schemas: Record<string, z.ZodType>;
292
+ handlers: Record<string, Function>;
293
+ };
294
+ } | {
295
+ schemas: Record<string, z.ZodType>;
296
+ handlers: Record<string, Function>;
297
+ }): this;
298
+ /** Register tools from a `{ schemas, handlers }` object. */
299
+ private _registerTools;
300
+ /**
301
+ * Add a tool to this assistant. The tool name is derived from the
302
+ * handler's function name.
303
+ *
304
+ * @param handler - A named function that implements the tool
305
+ * @param schema - Optional Zod schema describing the tool's parameters
306
+ * @returns this, for chaining
307
+ *
308
+ * @example
309
+ * ```typescript
310
+ * assistant.addTool(function getWeather(args) {
311
+ * return { temp: 72 }
312
+ * }, z.object({ city: z.string() }).describe('Get weather for a city'))
313
+ * ```
314
+ */
315
+ addTool(name: string, handler: (...args: any[]) => any, schema?: z.ZodType): this;
316
+ /**
317
+ * Remove a tool by name or handler function reference.
318
+ *
319
+ * @param nameOrHandler - The tool name string, or the handler function to match
320
+ * @returns this, for chaining
321
+ */
322
+ removeTool(nameOrHandler: string | ((...args: any[]) => any)): this;
323
+ /**
324
+ * Simulate a tool call and its result by appending the appropriate
325
+ * messages to the conversation history. Useful for injecting context
326
+ * that looks like the assistant performed a tool call.
327
+ *
328
+ * @param toolCallName - The name of the tool
329
+ * @param args - The arguments that were "passed" to the tool
330
+ * @param result - The result the tool "returned"
331
+ * @returns this, for chaining
332
+ */
333
+ simulateToolCallWithResult(toolCallName: string, args: Record<string, any>, result: any): this;
334
+ /**
335
+ * Simulate a user question and assistant response by appending both
336
+ * messages to the conversation history.
337
+ *
338
+ * @param question - The user's question
339
+ * @param response - The assistant's response
340
+ * @returns this, for chaining
341
+ */
342
+ simulateQuestionAndResponse(question: string, response: string): this;
343
+ /**
344
+ * Parsed YAML frontmatter from CORE.md, or empty object if none.
345
+ */
346
+ get meta(): Record<string, any>;
347
+ /**
348
+ * Merged options where CORE.md frontmatter provides defaults and
349
+ * constructor options take precedence. Prefer this over `this.options`
350
+ * anywhere model parameters or runtime config is consumed.
351
+ */
352
+ get effectiveOptions(): AssistantsManagerOptions & Record<string, any>;
353
+ /**
354
+ * Load the system prompt from CORE.md, applying any prepend/append options.
355
+ * YAML frontmatter (between --- fences) is stripped from the prompt and
356
+ * stored in `_meta`.
357
+ *
358
+ * @returns {string} The assembled system prompt
359
+ */
360
+ loadSystemPrompt(): string;
361
+ /**
362
+ * Load tools from tools.ts using the container's VM feature, injecting
363
+ * the container and assistant as globals. Merges with any tools
364
+ * provided in the constructor options. Runs synchronously via vm.loadModule.
365
+ *
366
+ * @returns {Record<string, ConversationTool>} The assembled tool map
367
+ */
368
+ loadTools(): Record<string, ConversationTool>;
369
+ /**
370
+ * Merge tools provided via constructor options into the tool map.
371
+ * This allows runtime-created assistants to define tools entirely via options.
372
+ */
373
+ private mergeOptionTools;
374
+ /**
375
+ * Load event hooks from hooks.ts. Each exported function name should
376
+ * match an event the assistant emits. When that event fires, the
377
+ * corresponding hook function is called. Runs synchronously via vm.loadModule.
378
+ *
379
+ * @returns {Record<string, Function>} The hook function map
380
+ */
381
+ loadHooks(): Record<string, (...args: any[]) => any>;
382
+ /**
383
+ * Provides a helper for creating paths off of the assistant's base folder
384
+ */
385
+ get paths(): {
386
+ resolve(...args: any[]): string;
387
+ join(...args: any[]): string;
388
+ };
389
+ /**
390
+ * Prepend a [YYYY-MM-DD HH:MM] timestamp to user message content.
391
+ */
392
+ private prependTimestamp;
393
+ /** The assistant name derived from the folder basename. */
394
+ get assistantName(): string;
395
+ /** An 8-char hash of the container cwd for per-project thread isolation. */
396
+ get cwdHash(): string;
397
+ /** The thread prefix for this assistant+project combination. */
398
+ get threadPrefix(): string;
399
+ /** Build a thread ID based on the history mode. */
400
+ private buildThreadId;
401
+ /** The conversationHistory feature instance. */
402
+ get conversationHistory(): ConversationHistory;
403
+ /** The active thread ID (undefined in lifecycle mode). */
404
+ get currentThreadId(): string | undefined;
405
+ /**
406
+ * Override thread for resume. Call before start().
407
+ *
408
+ * @param threadId - The thread ID to resume
409
+ * @returns this, for chaining
410
+ */
411
+ resumeThread(threadId: string): this;
412
+ /**
413
+ * List saved conversations for this assistant+project.
414
+ *
415
+ * @param opts - Optional limit
416
+ * @returns Conversation metadata records
417
+ */
418
+ listHistory(opts?: {
419
+ limit?: number;
420
+ }): Promise<ConversationMeta[]>;
421
+ /**
422
+ * Delete all history for this assistant+project.
423
+ *
424
+ * @returns Number of conversations deleted
425
+ */
426
+ clearHistory(): Promise<number>;
427
+ /**
428
+ * Load history into the conversation after it's been created.
429
+ * Called from start() for non-lifecycle modes.
430
+ */
431
+ private loadConversationHistory;
432
+ /**
433
+ * Bind all loaded hook functions as event listeners. Each hook whose
434
+ * name matches an event gets wired up so it fires automatically when
435
+ * that event is emitted. Must be called before any events are emitted.
436
+ */
437
+ /** Hook names that are called directly during lifecycle, not bound as event listeners. */
438
+ private static lifecycleHooks;
439
+ /** Stored references to bound hook listeners so they can be unbound on reload. Lazily initialized because afterInitialize runs before field initializers. */
440
+ private _boundHookListeners;
441
+ /** Tool names added at runtime via addTool()/use(), so reload() can preserve them. */
442
+ private _runtimeToolNames;
443
+ private bindHooksToEvents;
444
+ private unbindHooksFromEvents;
445
+ /**
446
+ * Reload tools, hooks, and system prompt from disk. Useful during development
447
+ * or when tool/hook files have been modified and you want the assistant to
448
+ * pick up changes without restarting.
449
+ *
450
+ * @returns this, for chaining
451
+ */
452
+ reload(): this;
453
+ /**
454
+ * Start the assistant by creating the conversation and wiring up events.
455
+ * The system prompt, tools, and hooks are already loaded synchronously
456
+ * during initialization.
457
+ *
458
+ * @returns {Promise<this>} The initialized assistant
459
+ */
460
+ start(): Promise<this>;
461
+ /**
462
+ * Ask the assistant a question. It will use its tools to produce
463
+ * a streamed response. The assistant auto-starts if needed.
464
+ *
465
+ * @param {string | ContentPart[]} question - The question to ask
466
+ * @returns {Promise<string>} The assistant's response
467
+ *
468
+ * @example
469
+ * ```typescript
470
+ * const answer = await assistant.ask('What capabilities do you have?')
471
+ * ```
472
+ */
473
+ ask(question: string | ContentPart[], options?: AskOptions): Promise<string>;
474
+ /**
475
+ * Save the conversation to disk via conversationHistory.
476
+ *
477
+ * @param opts - Optional overrides for title, tags, thread, or metadata
478
+ * @returns The saved conversation record
479
+ */
480
+ save(opts?: {
481
+ title?: string;
482
+ tags?: string[];
483
+ thread?: string;
484
+ metadata?: Record<string, any>;
485
+ }): Promise<import("./conversation-history").ConversationRecord>;
486
+ /**
487
+ * Names of assistants available as subagents, discovered via the assistantsManager.
488
+ *
489
+ * @returns {string[]} Available assistant names
490
+ */
491
+ get availableSubagents(): string[];
492
+ /**
493
+ * Get or create a subagent assistant. Uses the assistantsManager to discover
494
+ * and create the assistant, then caches the instance for reuse across tool calls.
495
+ *
496
+ * @param id - The assistant name (e.g. 'codingAssistant')
497
+ * @param options - Additional options to pass to the assistant constructor
498
+ * @returns {Promise<Assistant>} The subagent assistant instance, started and ready
499
+ *
500
+ * @example
501
+ * ```typescript
502
+ * const researcher = await assistant.subagent('codingAssistant')
503
+ * const answer = await researcher.ask('Find all usages of container.feature("fs")')
504
+ * ```
505
+ */
506
+ subagent(id: string, options?: Record<string, any>): Promise<Assistant>;
507
+ }
508
+ export default Assistant;
509
+ //# sourceMappingURL=assistant.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"assistant.d.ts","sourceRoot":"","sources":["../../../src/agi/features/assistant.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAGvB,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AACvC,OAAO,KAAK,EAAE,YAAY,EAAE,gBAAgB,EAAE,WAAW,EAAE,UAAU,EAAW,MAAM,gBAAgB,CAAA;AACtG,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAA;AACrD,OAAO,KAAK,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AAEnF,OAAO,EAAE,gBAAgB,EAAE,KAAK,aAAa,EAAE,KAAK,iBAAiB,EAAE,KAAK,gBAAgB,EAAE,MAAM,6BAA6B,CAAA;AAEjI,OAAO,QAAQ,yBAAyB,CAAC;IACxC,UAAU,iBAAiB;QAC1B,SAAS,EAAE,OAAO,SAAS,CAAA;KAC3B;CACD;AAED,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;iBAgBhC,CAAA;AAEF,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;iBAiB/B,CAAA;AAEF,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAwDjC,CAAA;AAEF,MAAM,MAAM,cAAc,G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