@dirgha/code 1.2.0

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 (360) hide show
  1. package/LICENSE +101 -0
  2. package/README.md +674 -0
  3. package/dist/dirgha.mjs +2185 -0
  4. package/dist_v2/acp/index.d.ts +1 -0
  5. package/dist_v2/acp/index.js +2 -0
  6. package/dist_v2/acp/server.d.ts +31 -0
  7. package/dist_v2/acp/server.js +137 -0
  8. package/dist_v2/cli/auth-cmd.d.ts +10 -0
  9. package/dist_v2/cli/auth-cmd.js +69 -0
  10. package/dist_v2/cli/config.d.ts +46 -0
  11. package/dist_v2/cli/config.js +70 -0
  12. package/dist_v2/cli/flags.d.ts +10 -0
  13. package/dist_v2/cli/flags.js +49 -0
  14. package/dist_v2/cli/flows/full-cycle.d.ts +30 -0
  15. package/dist_v2/cli/flows/full-cycle.js +39 -0
  16. package/dist_v2/cli/flows/index.d.ts +2 -0
  17. package/dist_v2/cli/flows/index.js +3 -0
  18. package/dist_v2/cli/flows/tarball.d.ts +10 -0
  19. package/dist_v2/cli/flows/tarball.js +47 -0
  20. package/dist_v2/cli/index.d.ts +4 -0
  21. package/dist_v2/cli/index.js +5 -0
  22. package/dist_v2/cli/interactive.d.ts +21 -0
  23. package/dist_v2/cli/interactive.js +207 -0
  24. package/dist_v2/cli/main.d.ts +10 -0
  25. package/dist_v2/cli/main.js +173 -0
  26. package/dist_v2/cli/models-cmd.d.ts +6 -0
  27. package/dist_v2/cli/models-cmd.js +50 -0
  28. package/dist_v2/cli/setup.d.ts +13 -0
  29. package/dist_v2/cli/setup.js +128 -0
  30. package/dist_v2/cli/slash/account.d.ts +10 -0
  31. package/dist_v2/cli/slash/account.js +59 -0
  32. package/dist_v2/cli/slash/clear.d.ts +8 -0
  33. package/dist_v2/cli/slash/clear.js +15 -0
  34. package/dist_v2/cli/slash/compact.d.ts +7 -0
  35. package/dist_v2/cli/slash/compact.js +13 -0
  36. package/dist_v2/cli/slash/config.d.ts +8 -0
  37. package/dist_v2/cli/slash/config.js +49 -0
  38. package/dist_v2/cli/slash/exit.d.ts +7 -0
  39. package/dist_v2/cli/slash/exit.js +16 -0
  40. package/dist_v2/cli/slash/fleet.d.ts +7 -0
  41. package/dist_v2/cli/slash/fleet.js +22 -0
  42. package/dist_v2/cli/slash/help.d.ts +9 -0
  43. package/dist_v2/cli/slash/help.js +31 -0
  44. package/dist_v2/cli/slash/history.d.ts +7 -0
  45. package/dist_v2/cli/slash/history.js +42 -0
  46. package/dist_v2/cli/slash/index.d.ts +30 -0
  47. package/dist_v2/cli/slash/index.js +52 -0
  48. package/dist_v2/cli/slash/init.d.ts +8 -0
  49. package/dist_v2/cli/slash/init.js +57 -0
  50. package/dist_v2/cli/slash/keys.d.ts +8 -0
  51. package/dist_v2/cli/slash/keys.js +101 -0
  52. package/dist_v2/cli/slash/login.d.ts +10 -0
  53. package/dist_v2/cli/slash/login.js +47 -0
  54. package/dist_v2/cli/slash/memory.d.ts +8 -0
  55. package/dist_v2/cli/slash/memory.js +101 -0
  56. package/dist_v2/cli/slash/mode.d.ts +8 -0
  57. package/dist_v2/cli/slash/mode.js +30 -0
  58. package/dist_v2/cli/slash/models.d.ts +8 -0
  59. package/dist_v2/cli/slash/models.js +73 -0
  60. package/dist_v2/cli/slash/resume.d.ts +8 -0
  61. package/dist_v2/cli/slash/resume.js +24 -0
  62. package/dist_v2/cli/slash/session.d.ts +8 -0
  63. package/dist_v2/cli/slash/session.js +74 -0
  64. package/dist_v2/cli/slash/setup.d.ts +8 -0
  65. package/dist_v2/cli/slash/setup.js +50 -0
  66. package/dist_v2/cli/slash/status.d.ts +7 -0
  67. package/dist_v2/cli/slash/status.js +37 -0
  68. package/dist_v2/cli/slash/theme.d.ts +9 -0
  69. package/dist_v2/cli/slash/theme.js +53 -0
  70. package/dist_v2/cli/slash/types.d.ts +14 -0
  71. package/dist_v2/cli/slash/types.js +9 -0
  72. package/dist_v2/cli/slash/upgrade.d.ts +9 -0
  73. package/dist_v2/cli/slash/upgrade.js +66 -0
  74. package/dist_v2/cli/slash.d.ts +72 -0
  75. package/dist_v2/cli/slash.js +77 -0
  76. package/dist_v2/cli/subcommands/ask.d.ts +17 -0
  77. package/dist_v2/cli/subcommands/ask.js +76 -0
  78. package/dist_v2/cli/subcommands/audit.d.ts +15 -0
  79. package/dist_v2/cli/subcommands/audit.js +128 -0
  80. package/dist_v2/cli/subcommands/chat.d.ts +13 -0
  81. package/dist_v2/cli/subcommands/chat.js +72 -0
  82. package/dist_v2/cli/subcommands/compact.d.ts +14 -0
  83. package/dist_v2/cli/subcommands/compact.js +114 -0
  84. package/dist_v2/cli/subcommands/doctor.d.ts +11 -0
  85. package/dist_v2/cli/subcommands/doctor.js +103 -0
  86. package/dist_v2/cli/subcommands/export-session.d.ts +10 -0
  87. package/dist_v2/cli/subcommands/export-session.js +60 -0
  88. package/dist_v2/cli/subcommands/import-session.d.ts +11 -0
  89. package/dist_v2/cli/subcommands/import-session.js +77 -0
  90. package/dist_v2/cli/subcommands/index.d.ts +40 -0
  91. package/dist_v2/cli/subcommands/index.js +38 -0
  92. package/dist_v2/cli/subcommands/init.d.ts +10 -0
  93. package/dist_v2/cli/subcommands/init.js +74 -0
  94. package/dist_v2/cli/subcommands/keys.d.ts +12 -0
  95. package/dist_v2/cli/subcommands/keys.js +136 -0
  96. package/dist_v2/cli/subcommands/login.d.ts +10 -0
  97. package/dist_v2/cli/subcommands/login.js +60 -0
  98. package/dist_v2/cli/subcommands/logout.d.ts +10 -0
  99. package/dist_v2/cli/subcommands/logout.js +21 -0
  100. package/dist_v2/cli/subcommands/models.d.ts +14 -0
  101. package/dist_v2/cli/subcommands/models.js +144 -0
  102. package/dist_v2/cli/subcommands/setup.d.ts +11 -0
  103. package/dist_v2/cli/subcommands/setup.js +107 -0
  104. package/dist_v2/cli/subcommands/stats.d.ts +13 -0
  105. package/dist_v2/cli/subcommands/stats.js +148 -0
  106. package/dist_v2/cli/subcommands/status.d.ts +14 -0
  107. package/dist_v2/cli/subcommands/status.js +91 -0
  108. package/dist_v2/cli/submit-paper.d.ts +15 -0
  109. package/dist_v2/cli/submit-paper.js +68 -0
  110. package/dist_v2/context/_fts.d.ts +62 -0
  111. package/dist_v2/context/_fts.js +195 -0
  112. package/dist_v2/context/branch.d.ts +18 -0
  113. package/dist_v2/context/branch.js +66 -0
  114. package/dist_v2/context/compaction.d.ts +26 -0
  115. package/dist_v2/context/compaction.js +120 -0
  116. package/dist_v2/context/index.d.ts +5 -0
  117. package/dist_v2/context/index.js +6 -0
  118. package/dist_v2/context/knowledge.d.ts +38 -0
  119. package/dist_v2/context/knowledge.js +146 -0
  120. package/dist_v2/context/memory.d.ts +80 -0
  121. package/dist_v2/context/memory.js +276 -0
  122. package/dist_v2/context/mode.d.ts +25 -0
  123. package/dist_v2/context/mode.js +81 -0
  124. package/dist_v2/context/session.d.ts +56 -0
  125. package/dist_v2/context/session.js +108 -0
  126. package/dist_v2/daemon/index.d.ts +2 -0
  127. package/dist_v2/daemon/index.js +3 -0
  128. package/dist_v2/daemon/protocol.d.ts +73 -0
  129. package/dist_v2/daemon/protocol.js +6 -0
  130. package/dist_v2/daemon/server.d.ts +35 -0
  131. package/dist_v2/daemon/server.js +191 -0
  132. package/dist_v2/eval/index.d.ts +5 -0
  133. package/dist_v2/eval/index.js +6 -0
  134. package/dist_v2/eval/regression.d.ts +14 -0
  135. package/dist_v2/eval/regression.js +106 -0
  136. package/dist_v2/eval/reporter.d.ts +7 -0
  137. package/dist_v2/eval/reporter.js +34 -0
  138. package/dist_v2/eval/swe-bench.d.ts +18 -0
  139. package/dist_v2/eval/swe-bench.js +23 -0
  140. package/dist_v2/eval/terminal-bench.d.ts +13 -0
  141. package/dist_v2/eval/terminal-bench.js +19 -0
  142. package/dist_v2/eval/types.d.ts +36 -0
  143. package/dist_v2/eval/types.js +5 -0
  144. package/dist_v2/fleet/apply-back.d.ts +27 -0
  145. package/dist_v2/fleet/apply-back.js +191 -0
  146. package/dist_v2/fleet/cli-command.d.ts +61 -0
  147. package/dist_v2/fleet/cli-command.js +329 -0
  148. package/dist_v2/fleet/index.d.ts +21 -0
  149. package/dist_v2/fleet/index.js +21 -0
  150. package/dist_v2/fleet/runner.d.ts +28 -0
  151. package/dist_v2/fleet/runner.js +347 -0
  152. package/dist_v2/fleet/tripleshot.d.ts +21 -0
  153. package/dist_v2/fleet/tripleshot.js +222 -0
  154. package/dist_v2/fleet/types.d.ts +193 -0
  155. package/dist_v2/fleet/types.js +24 -0
  156. package/dist_v2/fleet/worktree.d.ts +51 -0
  157. package/dist_v2/fleet/worktree.js +176 -0
  158. package/dist_v2/hooks/index.d.ts +1 -0
  159. package/dist_v2/hooks/index.js +2 -0
  160. package/dist_v2/hooks/registry.d.ts +21 -0
  161. package/dist_v2/hooks/registry.js +40 -0
  162. package/dist_v2/index.d.ts +12 -0
  163. package/dist_v2/index.js +11 -0
  164. package/dist_v2/integrations/arniko-client.d.ts +42 -0
  165. package/dist_v2/integrations/arniko-client.js +86 -0
  166. package/dist_v2/integrations/auth.d.ts +45 -0
  167. package/dist_v2/integrations/auth.js +54 -0
  168. package/dist_v2/integrations/billing.d.ts +71 -0
  169. package/dist_v2/integrations/billing.js +107 -0
  170. package/dist_v2/integrations/bucky-client.d.ts +105 -0
  171. package/dist_v2/integrations/bucky-client.js +76 -0
  172. package/dist_v2/integrations/deploy-client.d.ts +60 -0
  173. package/dist_v2/integrations/deploy-client.js +87 -0
  174. package/dist_v2/integrations/device-auth.d.ts +48 -0
  175. package/dist_v2/integrations/device-auth.js +192 -0
  176. package/dist_v2/integrations/entitlements.d.ts +34 -0
  177. package/dist_v2/integrations/entitlements.js +43 -0
  178. package/dist_v2/integrations/http.d.ts +22 -0
  179. package/dist_v2/integrations/http.js +114 -0
  180. package/dist_v2/integrations/index.d.ts +8 -0
  181. package/dist_v2/integrations/index.js +15 -0
  182. package/dist_v2/intelligence/cost.d.ts +28 -0
  183. package/dist_v2/intelligence/cost.js +58 -0
  184. package/dist_v2/intelligence/error-classifier.d.ts +8 -0
  185. package/dist_v2/intelligence/error-classifier.js +71 -0
  186. package/dist_v2/intelligence/index.d.ts +5 -0
  187. package/dist_v2/intelligence/index.js +6 -0
  188. package/dist_v2/intelligence/prices.d.ts +13 -0
  189. package/dist_v2/intelligence/prices.js +26 -0
  190. package/dist_v2/intelligence/smart-router.d.ts +21 -0
  191. package/dist_v2/intelligence/smart-router.js +59 -0
  192. package/dist_v2/intelligence/telemetry.d.ts +22 -0
  193. package/dist_v2/intelligence/telemetry.js +31 -0
  194. package/dist_v2/kernel/agent-loop.d.ts +32 -0
  195. package/dist_v2/kernel/agent-loop.js +151 -0
  196. package/dist_v2/kernel/event-stream.d.ts +18 -0
  197. package/dist_v2/kernel/event-stream.js +102 -0
  198. package/dist_v2/kernel/index.d.ts +4 -0
  199. package/dist_v2/kernel/index.js +5 -0
  200. package/dist_v2/kernel/message.d.ts +29 -0
  201. package/dist_v2/kernel/message.js +118 -0
  202. package/dist_v2/kernel/types.d.ts +206 -0
  203. package/dist_v2/kernel/types.js +9 -0
  204. package/dist_v2/mcp/client.d.ts +44 -0
  205. package/dist_v2/mcp/client.js +63 -0
  206. package/dist_v2/mcp/index.d.ts +3 -0
  207. package/dist_v2/mcp/index.js +4 -0
  208. package/dist_v2/mcp/tool-bridge.d.ts +11 -0
  209. package/dist_v2/mcp/tool-bridge.js +33 -0
  210. package/dist_v2/mcp/transport.d.ts +29 -0
  211. package/dist_v2/mcp/transport.js +73 -0
  212. package/dist_v2/parity/index.d.ts +3 -0
  213. package/dist_v2/parity/index.js +4 -0
  214. package/dist_v2/parity/mock-openai-compat.d.ts +15 -0
  215. package/dist_v2/parity/mock-openai-compat.js +35 -0
  216. package/dist_v2/parity/runner.d.ts +21 -0
  217. package/dist_v2/parity/runner.js +76 -0
  218. package/dist_v2/parity/scenarios.d.ts +20 -0
  219. package/dist_v2/parity/scenarios.js +70 -0
  220. package/dist_v2/providers/anthropic.d.ts +21 -0
  221. package/dist_v2/providers/anthropic.js +191 -0
  222. package/dist_v2/providers/dispatch.d.ts +11 -0
  223. package/dist_v2/providers/dispatch.js +45 -0
  224. package/dist_v2/providers/fireworks.d.ts +18 -0
  225. package/dist_v2/providers/fireworks.js +44 -0
  226. package/dist_v2/providers/gemini.d.ts +19 -0
  227. package/dist_v2/providers/gemini.js +188 -0
  228. package/dist_v2/providers/http.d.ts +41 -0
  229. package/dist_v2/providers/http.js +188 -0
  230. package/dist_v2/providers/iface.d.ts +18 -0
  231. package/dist_v2/providers/iface.js +18 -0
  232. package/dist_v2/providers/index.d.ts +39 -0
  233. package/dist_v2/providers/index.js +51 -0
  234. package/dist_v2/providers/nvidia.d.ts +27 -0
  235. package/dist_v2/providers/nvidia.js +142 -0
  236. package/dist_v2/providers/ollama.d.ts +15 -0
  237. package/dist_v2/providers/ollama.js +37 -0
  238. package/dist_v2/providers/openai-compat.d.ts +29 -0
  239. package/dist_v2/providers/openai-compat.js +239 -0
  240. package/dist_v2/providers/openai.d.ts +20 -0
  241. package/dist_v2/providers/openai.js +107 -0
  242. package/dist_v2/providers/openrouter.d.ts +24 -0
  243. package/dist_v2/providers/openrouter.js +69 -0
  244. package/dist_v2/safety/approval-bus.d.ts +26 -0
  245. package/dist_v2/safety/approval-bus.js +48 -0
  246. package/dist_v2/safety/audit-log.d.ts +27 -0
  247. package/dist_v2/safety/audit-log.js +71 -0
  248. package/dist_v2/safety/index.d.ts +4 -0
  249. package/dist_v2/safety/index.js +5 -0
  250. package/dist_v2/safety/policy.d.ts +32 -0
  251. package/dist_v2/safety/policy.js +131 -0
  252. package/dist_v2/safety/sandbox/bwrap.d.ts +11 -0
  253. package/dist_v2/safety/sandbox/bwrap.js +52 -0
  254. package/dist_v2/safety/sandbox/iface.d.ts +29 -0
  255. package/dist_v2/safety/sandbox/iface.js +8 -0
  256. package/dist_v2/safety/sandbox/index.d.ts +7 -0
  257. package/dist_v2/safety/sandbox/index.js +8 -0
  258. package/dist_v2/safety/sandbox/landlock.d.ts +17 -0
  259. package/dist_v2/safety/sandbox/landlock.js +26 -0
  260. package/dist_v2/safety/sandbox/noop.d.ts +12 -0
  261. package/dist_v2/safety/sandbox/noop.js +52 -0
  262. package/dist_v2/safety/sandbox/seatbelt.d.ts +11 -0
  263. package/dist_v2/safety/sandbox/seatbelt.js +49 -0
  264. package/dist_v2/safety/sandbox/select.d.ts +6 -0
  265. package/dist_v2/safety/sandbox/select.js +42 -0
  266. package/dist_v2/safety/sandbox/windows.d.ts +13 -0
  267. package/dist_v2/safety/sandbox/windows.js +22 -0
  268. package/dist_v2/skills/index.d.ts +3 -0
  269. package/dist_v2/skills/index.js +4 -0
  270. package/dist_v2/skills/loader.d.ts +38 -0
  271. package/dist_v2/skills/loader.js +102 -0
  272. package/dist_v2/skills/matcher.d.ts +14 -0
  273. package/dist_v2/skills/matcher.js +72 -0
  274. package/dist_v2/skills/runtime.d.ts +13 -0
  275. package/dist_v2/skills/runtime.js +40 -0
  276. package/dist_v2/subagents/delegator.d.ts +36 -0
  277. package/dist_v2/subagents/delegator.js +82 -0
  278. package/dist_v2/subagents/index.d.ts +2 -0
  279. package/dist_v2/subagents/index.js +3 -0
  280. package/dist_v2/subagents/pool.d.ts +18 -0
  281. package/dist_v2/subagents/pool.js +31 -0
  282. package/dist_v2/tools/browser.d.ts +27 -0
  283. package/dist_v2/tools/browser.js +179 -0
  284. package/dist_v2/tools/checkpoint.d.ts +25 -0
  285. package/dist_v2/tools/checkpoint.js +222 -0
  286. package/dist_v2/tools/cron.d.ts +32 -0
  287. package/dist_v2/tools/cron.js +160 -0
  288. package/dist_v2/tools/diff.d.ts +18 -0
  289. package/dist_v2/tools/diff.js +117 -0
  290. package/dist_v2/tools/exec.d.ts +19 -0
  291. package/dist_v2/tools/exec.js +49 -0
  292. package/dist_v2/tools/fs-edit.d.ts +11 -0
  293. package/dist_v2/tools/fs-edit.js +81 -0
  294. package/dist_v2/tools/fs-ls.d.ts +7 -0
  295. package/dist_v2/tools/fs-ls.js +57 -0
  296. package/dist_v2/tools/fs-read.d.ts +7 -0
  297. package/dist_v2/tools/fs-read.js +60 -0
  298. package/dist_v2/tools/fs-write.d.ts +8 -0
  299. package/dist_v2/tools/fs-write.js +46 -0
  300. package/dist_v2/tools/git.d.ts +8 -0
  301. package/dist_v2/tools/git.js +57 -0
  302. package/dist_v2/tools/index.d.ts +25 -0
  303. package/dist_v2/tools/index.js +39 -0
  304. package/dist_v2/tools/multimodal.d.ts +41 -0
  305. package/dist_v2/tools/multimodal.js +381 -0
  306. package/dist_v2/tools/permission.d.ts +27 -0
  307. package/dist_v2/tools/permission.js +43 -0
  308. package/dist_v2/tools/registry.d.ts +44 -0
  309. package/dist_v2/tools/registry.js +62 -0
  310. package/dist_v2/tools/search-glob.d.ts +7 -0
  311. package/dist_v2/tools/search-glob.js +98 -0
  312. package/dist_v2/tools/search-grep.d.ts +7 -0
  313. package/dist_v2/tools/search-grep.js +109 -0
  314. package/dist_v2/tools/shell.d.ts +10 -0
  315. package/dist_v2/tools/shell.js +76 -0
  316. package/dist_v2/tools/task.d.ts +8 -0
  317. package/dist_v2/tools/task.js +37 -0
  318. package/dist_v2/tui/approval.d.ts +7 -0
  319. package/dist_v2/tui/approval.js +55 -0
  320. package/dist_v2/tui/index.d.ts +4 -0
  321. package/dist_v2/tui/index.js +5 -0
  322. package/dist_v2/tui/ink/App.d.ts +39 -0
  323. package/dist_v2/tui/ink/App.js +206 -0
  324. package/dist_v2/tui/ink/components/AtFileComplete.d.ts +25 -0
  325. package/dist_v2/tui/ink/components/AtFileComplete.js +158 -0
  326. package/dist_v2/tui/ink/components/HelpOverlay.d.ts +24 -0
  327. package/dist_v2/tui/ink/components/HelpOverlay.js +130 -0
  328. package/dist_v2/tui/ink/components/InputBox.d.ts +35 -0
  329. package/dist_v2/tui/ink/components/InputBox.js +153 -0
  330. package/dist_v2/tui/ink/components/Logo.d.ts +12 -0
  331. package/dist_v2/tui/ink/components/Logo.js +27 -0
  332. package/dist_v2/tui/ink/components/ModelPicker.d.ts +26 -0
  333. package/dist_v2/tui/ink/components/ModelPicker.js +80 -0
  334. package/dist_v2/tui/ink/components/PasteCollapse.d.ts +36 -0
  335. package/dist_v2/tui/ink/components/PasteCollapse.js +59 -0
  336. package/dist_v2/tui/ink/components/StatusBar.d.ts +18 -0
  337. package/dist_v2/tui/ink/components/StatusBar.js +41 -0
  338. package/dist_v2/tui/ink/components/StreamingText.d.ts +14 -0
  339. package/dist_v2/tui/ink/components/StreamingText.js +11 -0
  340. package/dist_v2/tui/ink/components/ThinkingBlock.d.ts +13 -0
  341. package/dist_v2/tui/ink/components/ThinkingBlock.js +13 -0
  342. package/dist_v2/tui/ink/components/ToolBox.d.ts +20 -0
  343. package/dist_v2/tui/ink/components/ToolBox.js +63 -0
  344. package/dist_v2/tui/ink/components/vim-bindings.d.ts +43 -0
  345. package/dist_v2/tui/ink/components/vim-bindings.js +135 -0
  346. package/dist_v2/tui/ink/index.d.ts +39 -0
  347. package/dist_v2/tui/ink/index.js +47 -0
  348. package/dist_v2/tui/ink/use-event-projection.d.ts +51 -0
  349. package/dist_v2/tui/ink/use-event-projection.js +126 -0
  350. package/dist_v2/tui/ink/use-overlays.d.ts +24 -0
  351. package/dist_v2/tui/ink/use-overlays.js +50 -0
  352. package/dist_v2/tui/renderer.d.ts +19 -0
  353. package/dist_v2/tui/renderer.js +64 -0
  354. package/dist_v2/tui/status-bar.d.ts +12 -0
  355. package/dist_v2/tui/status-bar.js +16 -0
  356. package/dist_v2/tui/theme.d.ts +27 -0
  357. package/dist_v2/tui/theme.js +56 -0
  358. package/dist_v2/utils/json-repair.d.ts +7 -0
  359. package/dist_v2/utils/json-repair.js +45 -0
  360. package/package.json +113 -0
@@ -0,0 +1 @@
1
+ export * from './server.js';
@@ -0,0 +1,2 @@
1
+ export * from './server.js';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,31 @@
1
+ /**
2
+ * ACP (Agent Client Protocol) adapter.
3
+ *
4
+ * Thin bridge between the ACP wire format and the daemon protocol. ACP
5
+ * lets IDEs embed dirgha as their agent backend with a reduced, stable
6
+ * method surface. Implements the minimum viable methods: initialize,
7
+ * newSession, prompt, and cancel. Runs over stdio JSON-RPC.
8
+ */
9
+ import type { ProviderRegistry } from '../providers/index.js';
10
+ import type { ToolRegistry } from '../tools/registry.js';
11
+ import type { SessionStore } from '../context/session.js';
12
+ import type { DirghaConfig } from '../cli/config.js';
13
+ export interface AcpServerOptions {
14
+ registry: ToolRegistry;
15
+ providers: ProviderRegistry;
16
+ sessions: SessionStore;
17
+ config: DirghaConfig;
18
+ cwd: string;
19
+ }
20
+ export declare class AcpServer {
21
+ private opts;
22
+ private sessionsByAcpId;
23
+ private usage;
24
+ constructor(opts: AcpServerOptions);
25
+ start(): void;
26
+ private handle;
27
+ private handlePrompt;
28
+ private reply;
29
+ private replyError;
30
+ private notify;
31
+ }
@@ -0,0 +1,137 @@
1
+ /**
2
+ * ACP (Agent Client Protocol) adapter.
3
+ *
4
+ * Thin bridge between the ACP wire format and the daemon protocol. ACP
5
+ * lets IDEs embed dirgha as their agent backend with a reduced, stable
6
+ * method surface. Implements the minimum viable methods: initialize,
7
+ * newSession, prompt, and cancel. Runs over stdio JSON-RPC.
8
+ */
9
+ import { randomUUID } from 'node:crypto';
10
+ import { stdin, stdout } from 'node:process';
11
+ import { createEventStream } from '../kernel/event-stream.js';
12
+ import { runAgentLoop } from '../kernel/agent-loop.js';
13
+ import { extractText } from '../kernel/message.js';
14
+ import { createToolExecutor } from '../tools/exec.js';
15
+ export class AcpServer {
16
+ opts;
17
+ sessionsByAcpId = new Map();
18
+ usage = { inputTokens: 0, outputTokens: 0, cachedTokens: 0, costUsd: 0 };
19
+ constructor(opts) {
20
+ this.opts = opts;
21
+ }
22
+ start() {
23
+ let buffer = '';
24
+ stdin.setEncoding('utf8');
25
+ stdin.on('data', chunk => {
26
+ buffer += chunk;
27
+ let idx;
28
+ while ((idx = buffer.indexOf('\n')) >= 0) {
29
+ const line = buffer.slice(0, idx);
30
+ buffer = buffer.slice(idx + 1);
31
+ if (!line.trim())
32
+ continue;
33
+ try {
34
+ void this.handle(JSON.parse(line));
35
+ }
36
+ catch { /* skip */ }
37
+ }
38
+ });
39
+ }
40
+ async handle(req) {
41
+ try {
42
+ switch (req.method) {
43
+ case 'initialize':
44
+ this.reply(req.id, {
45
+ protocolVersion: 1,
46
+ agentCapabilities: { streaming: true, tools: true },
47
+ authMethods: [],
48
+ });
49
+ return;
50
+ case 'session/new': {
51
+ const acpSessionId = randomUUID();
52
+ const storeSession = await this.opts.sessions.create(acpSessionId);
53
+ this.sessionsByAcpId.set(acpSessionId, { sessionId: storeSession.id, history: [] });
54
+ this.reply(req.id, { sessionId: acpSessionId });
55
+ return;
56
+ }
57
+ case 'session/prompt':
58
+ await this.handlePrompt(req);
59
+ return;
60
+ case 'session/cancel':
61
+ this.reply(req.id, { ok: true });
62
+ return;
63
+ default:
64
+ this.replyError(req.id, -32601, `Method not found: ${req.method}`);
65
+ }
66
+ }
67
+ catch (err) {
68
+ this.replyError(req.id, -32000, err instanceof Error ? err.message : String(err));
69
+ }
70
+ }
71
+ async handlePrompt(req) {
72
+ const params = req.params ?? {};
73
+ const acpSessionId = params.sessionId;
74
+ const promptBlocks = params.prompt ?? [];
75
+ const prompt = promptBlocks.map(b => b.text ?? '').join('');
76
+ const active = this.sessionsByAcpId.get(acpSessionId);
77
+ if (!active) {
78
+ this.replyError(req.id, -32602, `Unknown session: ${acpSessionId}`);
79
+ return;
80
+ }
81
+ active.history.push({ role: 'user', content: prompt });
82
+ const events = createEventStream();
83
+ events.subscribe(event => {
84
+ if (event.type === 'text_delta') {
85
+ this.notify('session/update', {
86
+ sessionId: acpSessionId,
87
+ update: { kind: 'agent_message_chunk', content: { type: 'text', text: event.delta } },
88
+ });
89
+ }
90
+ else if (event.type === 'usage') {
91
+ this.usage.inputTokens += event.inputTokens;
92
+ this.usage.outputTokens += event.outputTokens;
93
+ }
94
+ });
95
+ const provider = this.opts.providers.forModel(this.opts.config.model);
96
+ const executor = createToolExecutor({
97
+ registry: this.opts.registry,
98
+ cwd: this.opts.cwd,
99
+ sessionId: active.sessionId,
100
+ });
101
+ const sanitized = this.opts.registry.sanitize({ descriptionLimit: 200 });
102
+ try {
103
+ const result = await runAgentLoop({
104
+ sessionId: active.sessionId,
105
+ model: this.opts.config.model,
106
+ messages: active.history,
107
+ tools: sanitized.definitions,
108
+ maxTurns: this.opts.config.maxTurns,
109
+ provider,
110
+ toolExecutor: executor,
111
+ events,
112
+ });
113
+ active.history.length = 0;
114
+ active.history.push(...result.messages);
115
+ const lastAssistant = [...result.messages].reverse().find(m => m.role === 'assistant');
116
+ this.reply(req.id, {
117
+ stopReason: result.stopReason,
118
+ lastMessage: lastAssistant ? extractText(lastAssistant) : '',
119
+ });
120
+ }
121
+ catch (err) {
122
+ this.replyError(req.id, -32000, err instanceof Error ? err.message : String(err));
123
+ }
124
+ }
125
+ reply(id, result) {
126
+ const out = { jsonrpc: '2.0', id, result };
127
+ stdout.write(`${JSON.stringify(out)}\n`);
128
+ }
129
+ replyError(id, code, message) {
130
+ const out = { jsonrpc: '2.0', id, error: { code, message } };
131
+ stdout.write(`${JSON.stringify(out)}\n`);
132
+ }
133
+ notify(method, params) {
134
+ stdout.write(`${JSON.stringify({ jsonrpc: '2.0', method, params })}\n`);
135
+ }
136
+ }
137
+ //# sourceMappingURL=server.js.map
@@ -0,0 +1,10 @@
1
+ /**
2
+ * `dirgha auth` subcommand group: login (device code), logout, whoami.
3
+ * Uses the integrations/auth.ts client; prints friendly output.
4
+ */
5
+ export interface AuthCmdArgs {
6
+ op: 'login' | 'logout' | 'whoami';
7
+ gatewayUrl?: string;
8
+ openBrowser?: boolean;
9
+ }
10
+ export declare function runAuth(args: AuthCmdArgs): Promise<number>;
@@ -0,0 +1,69 @@
1
+ /**
2
+ * `dirgha auth` subcommand group: login (device code), logout, whoami.
3
+ * Uses the integrations/auth.ts client; prints friendly output.
4
+ */
5
+ import { createAuthClient } from '../integrations/auth.js';
6
+ import { style, defaultTheme } from '../tui/theme.js';
7
+ export async function runAuth(args) {
8
+ const client = createAuthClient({
9
+ gatewayUrl: args.gatewayUrl,
10
+ openBrowser: args.openBrowser === false
11
+ ? () => { }
12
+ : url => tryLaunchBrowser(url),
13
+ });
14
+ switch (args.op) {
15
+ case 'login': {
16
+ try {
17
+ const token = await client.login();
18
+ print(style(defaultTheme.success, `\n✓ Signed in as ${token.userId}`));
19
+ print(`Scope: ${token.scope.join(', ') || '(none)'}`);
20
+ print(`Expires: ${token.expiresAt}`);
21
+ return 0;
22
+ }
23
+ catch (err) {
24
+ print(style(defaultTheme.danger, `\n✗ Login failed: ${err instanceof Error ? err.message : String(err)}`));
25
+ print(`\nIf the gateway is not yet available, set DIRGHA_GATEWAY_URL to your own instance,`);
26
+ print(`or use BYOK (set provider API keys via env / ~/.dirgha/env) to run locally without signing in.`);
27
+ return 1;
28
+ }
29
+ }
30
+ case 'logout': {
31
+ await client.logout();
32
+ print(style(defaultTheme.success, '✓ Signed out'));
33
+ return 0;
34
+ }
35
+ case 'whoami': {
36
+ const token = await client.currentToken();
37
+ if (!token) {
38
+ print('Not signed in. Run `dirgha auth login` or set provider API keys to use BYOK.');
39
+ return 1;
40
+ }
41
+ print(renderWhoami(token));
42
+ return 0;
43
+ }
44
+ }
45
+ }
46
+ function renderWhoami(token) {
47
+ const lines = [
48
+ style(defaultTheme.accent, `Signed in as ${token.userId}`),
49
+ ` scope: ${token.scope.join(', ') || '(none)'}`,
50
+ ` expires: ${token.expiresAt}`,
51
+ ];
52
+ return lines.join('\n');
53
+ }
54
+ function tryLaunchBrowser(url) {
55
+ print(`Open in a browser to continue:\n ${url}`);
56
+ const opener = process.platform === 'darwin' ? 'open'
57
+ : process.platform === 'win32' ? 'start'
58
+ : 'xdg-open';
59
+ import('node:child_process').then(({ spawn }) => {
60
+ try {
61
+ spawn(opener, [url], { stdio: 'ignore', detached: true }).unref();
62
+ }
63
+ catch { /* ignore; user will copy the URL manually */ }
64
+ }).catch(() => { });
65
+ }
66
+ function print(line) {
67
+ process.stdout.write(line + '\n');
68
+ }
69
+ //# sourceMappingURL=auth-cmd.js.map
@@ -0,0 +1,46 @@
1
+ /**
2
+ * Configuration loader. Merges defaults, user config, project config,
3
+ * environment, and CLI flags. Results are cached on first read.
4
+ */
5
+ export interface DirghaConfig {
6
+ model: string;
7
+ cheapModel: string;
8
+ summaryModel: string;
9
+ maxTurns: number;
10
+ temperature?: number;
11
+ thinking?: 'off' | 'low' | 'medium' | 'high';
12
+ showThinking: boolean;
13
+ autoApproveTools: string[];
14
+ skills: {
15
+ enabled: boolean;
16
+ explicit?: string[];
17
+ };
18
+ smartRoute: {
19
+ enabled: boolean;
20
+ };
21
+ compaction: {
22
+ triggerTokens: number;
23
+ preserveLastTurns: number;
24
+ };
25
+ telemetry: {
26
+ enabled: boolean;
27
+ };
28
+ /**
29
+ * When true, InputBox honours vim-style NORMAL / INSERT modes. Esc
30
+ * enters NORMAL; `i` returns to INSERT. Defaults to false so the
31
+ * stock experience is unchanged.
32
+ */
33
+ vimMode?: boolean;
34
+ /**
35
+ * TUI colour palette. Defaults to 'dark'. Users switch via /theme at
36
+ * runtime; the preference is persisted to ~/.dirgha/config.json.
37
+ */
38
+ theme?: 'dark' | 'light' | 'none';
39
+ /**
40
+ * Persisted execution mode. Defaults to 'act' (normal execution).
41
+ * Changed live via /mode; also honoured by fresh sessions.
42
+ */
43
+ mode?: 'plan' | 'act' | 'verify';
44
+ }
45
+ export declare const DEFAULT_CONFIG: DirghaConfig;
46
+ export declare function loadConfig(cwd?: string): Promise<DirghaConfig>;
@@ -0,0 +1,70 @@
1
+ /**
2
+ * Configuration loader. Merges defaults, user config, project config,
3
+ * environment, and CLI flags. Results are cached on first read.
4
+ */
5
+ import { readFile } from 'node:fs/promises';
6
+ import { join } from 'node:path';
7
+ import { homedir } from 'node:os';
8
+ export const DEFAULT_CONFIG = {
9
+ model: 'moonshotai/kimi-k2-instruct',
10
+ cheapModel: 'meta/llama-3.1-8b-instruct',
11
+ summaryModel: 'moonshotai/kimi-k2-instruct',
12
+ maxTurns: 16,
13
+ showThinking: false,
14
+ autoApproveTools: ['fs_read', 'fs_ls', 'search_grep', 'search_glob', 'git'],
15
+ skills: { enabled: true },
16
+ smartRoute: { enabled: false },
17
+ compaction: { triggerTokens: 120_000, preserveLastTurns: 6 },
18
+ telemetry: { enabled: false },
19
+ };
20
+ export async function loadConfig(cwd = process.cwd()) {
21
+ const userPath = join(homedir(), '.dirgha', 'config.json');
22
+ const projectPath = join(cwd, '.dirgha', 'config.json');
23
+ const userPartial = await readJson(userPath);
24
+ const projectPartial = await readJson(projectPath);
25
+ const envPartial = readEnvOverrides();
26
+ return merge(DEFAULT_CONFIG, userPartial, projectPartial, envPartial);
27
+ }
28
+ async function readJson(path) {
29
+ const text = await readFile(path, 'utf8').catch(() => undefined);
30
+ if (!text)
31
+ return {};
32
+ try {
33
+ return JSON.parse(text);
34
+ }
35
+ catch {
36
+ return {};
37
+ }
38
+ }
39
+ function readEnvOverrides() {
40
+ const out = {};
41
+ if (process.env.DIRGHA_MODEL)
42
+ out.model = process.env.DIRGHA_MODEL;
43
+ if (process.env.DIRGHA_CHEAP_MODEL)
44
+ out.cheapModel = process.env.DIRGHA_CHEAP_MODEL;
45
+ if (process.env.DIRGHA_MAX_TURNS)
46
+ out.maxTurns = Number.parseInt(process.env.DIRGHA_MAX_TURNS, 10);
47
+ if (process.env.DIRGHA_SHOW_THINKING === '1')
48
+ out.showThinking = true;
49
+ return out;
50
+ }
51
+ function merge(...partials) {
52
+ const out = structuredClone(DEFAULT_CONFIG);
53
+ for (const p of partials) {
54
+ if (!p)
55
+ continue;
56
+ for (const key of Object.keys(p)) {
57
+ const value = p[key];
58
+ if (value === undefined)
59
+ continue;
60
+ if (typeof value === 'object' && !Array.isArray(value)) {
61
+ out[key] = { ...out[key], ...value };
62
+ }
63
+ else {
64
+ out[key] = value;
65
+ }
66
+ }
67
+ }
68
+ return out;
69
+ }
70
+ //# sourceMappingURL=config.js.map
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Flag parser. Minimal but strict: supports --long, -s short flags,
3
+ * --key=value and --key value. Unknown flags are returned as positionals
4
+ * so callers can detect and reject them.
5
+ */
6
+ export interface ParsedFlags {
7
+ flags: Record<string, string | boolean>;
8
+ positionals: string[];
9
+ }
10
+ export declare function parseFlags(argv: string[]): ParsedFlags;
@@ -0,0 +1,49 @@
1
+ /**
2
+ * Flag parser. Minimal but strict: supports --long, -s short flags,
3
+ * --key=value and --key value. Unknown flags are returned as positionals
4
+ * so callers can detect and reject them.
5
+ */
6
+ export function parseFlags(argv) {
7
+ const flags = {};
8
+ const positionals = [];
9
+ for (let i = 0; i < argv.length; i++) {
10
+ const arg = argv[i];
11
+ if (arg === '--') {
12
+ positionals.push(...argv.slice(i + 1));
13
+ break;
14
+ }
15
+ if (arg.startsWith('--')) {
16
+ const eq = arg.indexOf('=');
17
+ if (eq >= 0) {
18
+ flags[arg.slice(2, eq)] = arg.slice(eq + 1);
19
+ }
20
+ else {
21
+ const key = arg.slice(2);
22
+ const next = argv[i + 1];
23
+ if (next !== undefined && !next.startsWith('-')) {
24
+ flags[key] = next;
25
+ i++;
26
+ }
27
+ else {
28
+ flags[key] = true;
29
+ }
30
+ }
31
+ }
32
+ else if (arg.startsWith('-') && arg.length > 1) {
33
+ const key = arg.slice(1);
34
+ const next = argv[i + 1];
35
+ if (next !== undefined && !next.startsWith('-')) {
36
+ flags[key] = next;
37
+ i++;
38
+ }
39
+ else {
40
+ flags[key] = true;
41
+ }
42
+ }
43
+ else {
44
+ positionals.push(arg);
45
+ }
46
+ }
47
+ return { flags, positionals };
48
+ }
49
+ //# sourceMappingURL=flags.js.map
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Full-cycle command composition: plan → implement → security scan →
3
+ * (optional) code register → deploy → stream logs. Each step is
4
+ * pluggable; callers may skip or short-circuit individual phases.
5
+ */
6
+ import type { AuthToken } from '../../integrations/auth.js';
7
+ import type { ArnikoClient, ScanResult } from '../../integrations/arniko-client.js';
8
+ import type { BuckyClient } from '../../integrations/bucky-client.js';
9
+ import type { DeployClient, Deployment } from '../../integrations/deploy-client.js';
10
+ export interface FullCycleOptions {
11
+ projectId: string;
12
+ cwd: string;
13
+ token: AuthToken;
14
+ arniko?: ArnikoClient;
15
+ bucky?: BuckyClient;
16
+ deploy: DeployClient;
17
+ codePathToRegister?: string;
18
+ codeLanguage?: string;
19
+ securityGate?: 'warn' | 'block';
20
+ onPhase?: (phase: FullCyclePhase, detail: string) => void;
21
+ }
22
+ export type FullCyclePhase = 'security' | 'register' | 'package' | 'upload' | 'logs' | 'done';
23
+ export interface FullCycleResult {
24
+ deployment?: Deployment;
25
+ scan?: ScanResult;
26
+ registeredBlockId?: string;
27
+ aborted: boolean;
28
+ reason?: string;
29
+ }
30
+ export declare function runFullCycle(opts: FullCycleOptions): Promise<FullCycleResult>;
@@ -0,0 +1,39 @@
1
+ /**
2
+ * Full-cycle command composition: plan → implement → security scan →
3
+ * (optional) code register → deploy → stream logs. Each step is
4
+ * pluggable; callers may skip or short-circuit individual phases.
5
+ */
6
+ import { buildTarball } from './tarball.js';
7
+ export async function runFullCycle(opts) {
8
+ const phase = (p, detail) => { opts.onPhase?.(p, detail); };
9
+ let scan;
10
+ if (opts.arniko) {
11
+ phase('security', 'running Arniko scan');
12
+ scan = await opts.arniko.scanPath(opts.cwd);
13
+ if (!scan.passed && (opts.securityGate ?? 'block') === 'block') {
14
+ return { aborted: true, reason: 'security scan failed; aborting full cycle', scan };
15
+ }
16
+ }
17
+ let registeredBlockId;
18
+ if (opts.bucky && opts.codePathToRegister) {
19
+ phase('register', 'registering code block with Bucky');
20
+ const { readFile } = await import('node:fs/promises');
21
+ const code = await readFile(opts.codePathToRegister, 'utf8');
22
+ const registered = await opts.bucky.code.register(code, opts.codeLanguage ?? 'typescript', opts.token.jwt);
23
+ registeredBlockId = registered.id;
24
+ }
25
+ phase('package', 'building tarball');
26
+ const tarball = await buildTarball(opts.cwd);
27
+ phase('upload', `uploading ${tarball.sizeBytes} bytes`);
28
+ const deployment = await opts.deploy.cli.upload(opts.projectId, tarball.path, opts.token.jwt);
29
+ phase('logs', 'streaming deployment logs');
30
+ try {
31
+ for await (const line of opts.deploy.deployments.logs(deployment.id, opts.token.jwt)) {
32
+ opts.onPhase?.('logs', `${line.stream}: ${line.line}`);
33
+ }
34
+ }
35
+ catch { /* stream may close early; verdict captured below */ }
36
+ phase('done', deployment.url ? `deployment ready at ${deployment.url}` : 'deployment complete');
37
+ return { deployment, scan, registeredBlockId, aborted: false };
38
+ }
39
+ //# sourceMappingURL=full-cycle.js.map
@@ -0,0 +1,2 @@
1
+ export * from './tarball.js';
2
+ export * from './full-cycle.js';
@@ -0,0 +1,3 @@
1
+ export * from './tarball.js';
2
+ export * from './full-cycle.js';
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Tarball builder used by `dirgha deploy`. Produces a gzipped tar of
3
+ * the cwd while honouring .gitignore + .dirghaignore and skipping
4
+ * heavy-weight build artifacts. Caps total size at 500 MB.
5
+ */
6
+ export interface TarballResult {
7
+ path: string;
8
+ sizeBytes: number;
9
+ }
10
+ export declare function buildTarball(cwd: string, extraExcludes?: string[]): Promise<TarballResult>;
@@ -0,0 +1,47 @@
1
+ /**
2
+ * Tarball builder used by `dirgha deploy`. Produces a gzipped tar of
3
+ * the cwd while honouring .gitignore + .dirghaignore and skipping
4
+ * heavy-weight build artifacts. Caps total size at 500 MB.
5
+ */
6
+ import { spawn } from 'node:child_process';
7
+ import { mkdir, stat } from 'node:fs/promises';
8
+ import { tmpdir } from 'node:os';
9
+ import { join } from 'node:path';
10
+ import { randomUUID } from 'node:crypto';
11
+ const DEFAULT_EXCLUDES = [
12
+ 'node_modules',
13
+ '.git',
14
+ '.next',
15
+ 'dist',
16
+ 'dist_v2',
17
+ 'build',
18
+ 'coverage',
19
+ '.turbo',
20
+ '.cache',
21
+ '.pnpm-store',
22
+ ];
23
+ const MAX_SIZE_BYTES = 500 * 1024 * 1024;
24
+ export async function buildTarball(cwd, extraExcludes = []) {
25
+ const dir = join(tmpdir(), 'dirgha-deploy');
26
+ await mkdir(dir, { recursive: true });
27
+ const out = join(dir, `${randomUUID()}.tar.gz`);
28
+ const excludes = [...DEFAULT_EXCLUDES, ...extraExcludes].flatMap(ex => ['--exclude', ex]);
29
+ await new Promise((resolveTar, rejectTar) => {
30
+ const child = spawn('tar', ['-czf', out, ...excludes, '-C', cwd, '.'], { stdio: ['ignore', 'ignore', 'pipe'] });
31
+ const errChunks = [];
32
+ child.stderr.on('data', (b) => errChunks.push(b));
33
+ child.on('error', err => rejectTar(err));
34
+ child.on('exit', code => {
35
+ if (code === 0)
36
+ resolveTar();
37
+ else
38
+ rejectTar(new Error(`tar exited ${code}: ${Buffer.concat(errChunks).toString('utf8')}`));
39
+ });
40
+ });
41
+ const info = await stat(out);
42
+ if (info.size > MAX_SIZE_BYTES) {
43
+ throw new Error(`Tarball is ${info.size} bytes; exceeds ${MAX_SIZE_BYTES} byte cap. Add patterns to .dirghaignore.`);
44
+ }
45
+ return { path: out, sizeBytes: info.size };
46
+ }
47
+ //# sourceMappingURL=tarball.js.map
@@ -0,0 +1,4 @@
1
+ export * from './flags.js';
2
+ export * from './config.js';
3
+ export * from './slash.js';
4
+ export * from './interactive.js';
@@ -0,0 +1,5 @@
1
+ export * from './flags.js';
2
+ export * from './config.js';
3
+ export * from './slash.js';
4
+ export * from './interactive.js';
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Interactive REPL. A thin readline loop that routes user input either
3
+ * to the agent loop (regular prompts) or to the slash registry
4
+ * (commands starting with /). Streaming output is rendered via the TUI
5
+ * renderer subscribed to the shared event stream.
6
+ */
7
+ import type { Message } from '../kernel/types.js';
8
+ import type { ProviderRegistry } from '../providers/index.js';
9
+ import type { ToolRegistry } from '../tools/registry.js';
10
+ import type { SessionStore } from '../context/session.js';
11
+ import type { DirghaConfig } from './config.js';
12
+ export interface InteractiveOptions {
13
+ registry: ToolRegistry;
14
+ providers: ProviderRegistry;
15
+ sessions: SessionStore;
16
+ config: DirghaConfig;
17
+ cwd: string;
18
+ systemPrompt?: string;
19
+ initialMessages?: Message[];
20
+ }
21
+ export declare function runInteractive(opts: InteractiveOptions): Promise<void>;