@oxagen/cli 0.5.0 → 0.6.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 (442) hide show
  1. package/README.md +66 -3
  2. package/dist/agent/__tests__/code-graph.test.d.ts +2 -0
  3. package/dist/agent/__tests__/code-graph.test.d.ts.map +1 -0
  4. package/dist/agent/__tests__/code-graph.test.js +83 -0
  5. package/dist/agent/__tests__/code-graph.test.js.map +1 -0
  6. package/dist/agent/__tests__/evaluator.test.d.ts +2 -0
  7. package/dist/agent/__tests__/evaluator.test.d.ts.map +1 -0
  8. package/dist/agent/__tests__/evaluator.test.js +96 -0
  9. package/dist/agent/__tests__/evaluator.test.js.map +1 -0
  10. package/dist/agent/__tests__/fleet-memory.test.d.ts +2 -0
  11. package/dist/agent/__tests__/fleet-memory.test.d.ts.map +1 -0
  12. package/dist/agent/__tests__/fleet-memory.test.js +107 -0
  13. package/dist/agent/__tests__/fleet-memory.test.js.map +1 -0
  14. package/dist/agent/__tests__/fleet-store.test.d.ts +2 -0
  15. package/dist/agent/__tests__/fleet-store.test.d.ts.map +1 -0
  16. package/dist/agent/__tests__/fleet-store.test.js +93 -0
  17. package/dist/agent/__tests__/fleet-store.test.js.map +1 -0
  18. package/dist/agent/__tests__/git-isolation.test.d.ts +2 -0
  19. package/dist/agent/__tests__/git-isolation.test.d.ts.map +1 -0
  20. package/dist/agent/__tests__/git-isolation.test.js +119 -0
  21. package/dist/agent/__tests__/git-isolation.test.js.map +1 -0
  22. package/dist/agent/__tests__/judge.test.d.ts +2 -0
  23. package/dist/agent/__tests__/judge.test.d.ts.map +1 -0
  24. package/dist/agent/__tests__/judge.test.js +135 -0
  25. package/dist/agent/__tests__/judge.test.js.map +1 -0
  26. package/dist/agent/__tests__/loop-errors.test.d.ts +2 -0
  27. package/dist/agent/__tests__/loop-errors.test.d.ts.map +1 -0
  28. package/dist/agent/__tests__/loop-errors.test.js +44 -0
  29. package/dist/agent/__tests__/loop-errors.test.js.map +1 -0
  30. package/dist/agent/__tests__/model-router.test.d.ts +2 -0
  31. package/dist/agent/__tests__/model-router.test.d.ts.map +1 -0
  32. package/dist/agent/__tests__/model-router.test.js +122 -0
  33. package/dist/agent/__tests__/model-router.test.js.map +1 -0
  34. package/dist/agent/__tests__/orchestrator-isolation.test.d.ts +2 -0
  35. package/dist/agent/__tests__/orchestrator-isolation.test.d.ts.map +1 -0
  36. package/dist/agent/__tests__/orchestrator-isolation.test.js +134 -0
  37. package/dist/agent/__tests__/orchestrator-isolation.test.js.map +1 -0
  38. package/dist/agent/__tests__/orchestrator.test.d.ts +2 -0
  39. package/dist/agent/__tests__/orchestrator.test.d.ts.map +1 -0
  40. package/dist/agent/__tests__/orchestrator.test.js +201 -0
  41. package/dist/agent/__tests__/orchestrator.test.js.map +1 -0
  42. package/dist/agent/__tests__/pipeline.test.d.ts +2 -0
  43. package/dist/agent/__tests__/pipeline.test.d.ts.map +1 -0
  44. package/dist/agent/__tests__/pipeline.test.js +226 -0
  45. package/dist/agent/__tests__/pipeline.test.js.map +1 -0
  46. package/dist/agent/__tests__/planner.test.d.ts +2 -0
  47. package/dist/agent/__tests__/planner.test.d.ts.map +1 -0
  48. package/dist/agent/__tests__/planner.test.js +98 -0
  49. package/dist/agent/__tests__/planner.test.js.map +1 -0
  50. package/dist/agent/__tests__/prompt-enhancer.test.d.ts +2 -0
  51. package/dist/agent/__tests__/prompt-enhancer.test.d.ts.map +1 -0
  52. package/dist/agent/__tests__/prompt-enhancer.test.js +107 -0
  53. package/dist/agent/__tests__/prompt-enhancer.test.js.map +1 -0
  54. package/dist/agent/__tests__/trace-format.test.d.ts +2 -0
  55. package/dist/agent/__tests__/trace-format.test.d.ts.map +1 -0
  56. package/dist/agent/__tests__/trace-format.test.js +104 -0
  57. package/dist/agent/__tests__/trace-format.test.js.map +1 -0
  58. package/dist/agent/__tests__/trace-store.test.d.ts +2 -0
  59. package/dist/agent/__tests__/trace-store.test.d.ts.map +1 -0
  60. package/dist/agent/__tests__/trace-store.test.js +113 -0
  61. package/dist/agent/__tests__/trace-store.test.js.map +1 -0
  62. package/dist/agent/code-graph.d.ts +18 -0
  63. package/dist/agent/code-graph.d.ts.map +1 -0
  64. package/dist/agent/code-graph.js +119 -0
  65. package/dist/agent/code-graph.js.map +1 -0
  66. package/dist/agent/env.d.ts +11 -0
  67. package/dist/agent/env.d.ts.map +1 -0
  68. package/dist/agent/env.js +82 -0
  69. package/dist/agent/env.js.map +1 -0
  70. package/dist/agent/evaluator.d.ts +13 -0
  71. package/dist/agent/evaluator.d.ts.map +1 -0
  72. package/dist/agent/evaluator.js +146 -0
  73. package/dist/agent/evaluator.js.map +1 -0
  74. package/dist/agent/fleet/git-isolation.d.ts +142 -0
  75. package/dist/agent/fleet/git-isolation.d.ts.map +1 -0
  76. package/dist/agent/fleet/git-isolation.js +290 -0
  77. package/dist/agent/fleet/git-isolation.js.map +1 -0
  78. package/dist/agent/fleet/memory.d.ts +21 -0
  79. package/dist/agent/fleet/memory.d.ts.map +1 -0
  80. package/dist/agent/fleet/memory.js +129 -0
  81. package/dist/agent/fleet/memory.js.map +1 -0
  82. package/dist/agent/fleet/orchestrator.d.ts +103 -0
  83. package/dist/agent/fleet/orchestrator.d.ts.map +1 -0
  84. package/dist/agent/fleet/orchestrator.js +355 -0
  85. package/dist/agent/fleet/orchestrator.js.map +1 -0
  86. package/dist/agent/fleet/store.d.ts +13 -0
  87. package/dist/agent/fleet/store.d.ts.map +1 -0
  88. package/dist/agent/fleet/store.js +79 -0
  89. package/dist/agent/fleet/store.js.map +1 -0
  90. package/dist/agent/fleet/types.d.ts +105 -0
  91. package/dist/agent/fleet/types.d.ts.map +1 -0
  92. package/dist/agent/fleet/types.js +17 -0
  93. package/dist/agent/fleet/types.js.map +1 -0
  94. package/dist/agent/judge.d.ts +38 -0
  95. package/dist/agent/judge.d.ts.map +1 -0
  96. package/dist/agent/judge.js +170 -0
  97. package/dist/agent/judge.js.map +1 -0
  98. package/dist/agent/loop.d.ts +61 -0
  99. package/dist/agent/loop.d.ts.map +1 -0
  100. package/dist/agent/loop.js +134 -0
  101. package/dist/agent/loop.js.map +1 -0
  102. package/dist/agent/memory.d.ts +14 -0
  103. package/dist/agent/memory.d.ts.map +1 -0
  104. package/dist/agent/memory.js +118 -0
  105. package/dist/agent/memory.js.map +1 -0
  106. package/dist/agent/model-router.d.ts +79 -0
  107. package/dist/agent/model-router.d.ts.map +1 -0
  108. package/dist/agent/model-router.js +141 -0
  109. package/dist/agent/model-router.js.map +1 -0
  110. package/dist/agent/model.d.ts +9 -0
  111. package/dist/agent/model.d.ts.map +1 -0
  112. package/dist/agent/model.js +24 -0
  113. package/dist/agent/model.js.map +1 -0
  114. package/dist/agent/pipeline.d.ts +82 -0
  115. package/dist/agent/pipeline.d.ts.map +1 -0
  116. package/dist/agent/pipeline.js +320 -0
  117. package/dist/agent/pipeline.js.map +1 -0
  118. package/dist/agent/planner.d.ts +16 -0
  119. package/dist/agent/planner.d.ts.map +1 -0
  120. package/dist/agent/planner.js +126 -0
  121. package/dist/agent/planner.js.map +1 -0
  122. package/dist/agent/project-context.d.ts +13 -0
  123. package/dist/agent/project-context.d.ts.map +1 -0
  124. package/dist/agent/project-context.js +66 -0
  125. package/dist/agent/project-context.js.map +1 -0
  126. package/dist/agent/prompt-enhancer.d.ts +37 -0
  127. package/dist/agent/prompt-enhancer.d.ts.map +1 -0
  128. package/dist/agent/prompt-enhancer.js +115 -0
  129. package/dist/agent/prompt-enhancer.js.map +1 -0
  130. package/dist/agent/system-prompt.d.ts +9 -0
  131. package/dist/agent/system-prompt.d.ts.map +1 -0
  132. package/dist/agent/system-prompt.js +38 -0
  133. package/dist/agent/system-prompt.js.map +1 -0
  134. package/dist/agent/tools.d.ts +19 -0
  135. package/dist/agent/tools.d.ts.map +1 -0
  136. package/dist/agent/tools.js +323 -0
  137. package/dist/agent/tools.js.map +1 -0
  138. package/dist/agent/trace-format.d.ts +6 -0
  139. package/dist/agent/trace-format.d.ts.map +1 -0
  140. package/dist/agent/trace-format.js +74 -0
  141. package/dist/agent/trace-format.js.map +1 -0
  142. package/dist/agent/trace-store.d.ts +19 -0
  143. package/dist/agent/trace-store.d.ts.map +1 -0
  144. package/dist/agent/trace-store.js +82 -0
  145. package/dist/agent/trace-store.js.map +1 -0
  146. package/dist/agent/trace.d.ts +121 -0
  147. package/dist/agent/trace.d.ts.map +1 -0
  148. package/dist/agent/trace.js +2 -0
  149. package/dist/agent/trace.js.map +1 -0
  150. package/dist/commands/__tests__/replay.test.d.ts +2 -0
  151. package/dist/commands/__tests__/replay.test.d.ts.map +1 -0
  152. package/dist/commands/__tests__/replay.test.js +76 -0
  153. package/dist/commands/__tests__/replay.test.js.map +1 -0
  154. package/dist/commands/agent.skill.load.d.ts +3 -0
  155. package/dist/commands/agent.skill.load.d.ts.map +1 -0
  156. package/dist/commands/agent.skill.load.js +57 -0
  157. package/dist/commands/agent.skill.load.js.map +1 -0
  158. package/dist/commands/code.d.ts +14 -0
  159. package/dist/commands/code.d.ts.map +1 -0
  160. package/dist/commands/code.js +100 -0
  161. package/dist/commands/code.js.map +1 -0
  162. package/dist/commands/config.d.ts +2 -0
  163. package/dist/commands/config.d.ts.map +1 -0
  164. package/dist/commands/config.js +66 -0
  165. package/dist/commands/config.js.map +1 -0
  166. package/dist/commands/env.d.ts +19 -0
  167. package/dist/commands/env.d.ts.map +1 -0
  168. package/dist/commands/env.js +64 -0
  169. package/dist/commands/env.js.map +1 -0
  170. package/dist/commands/graph.search.d.ts +10 -0
  171. package/dist/commands/graph.search.d.ts.map +1 -0
  172. package/dist/commands/graph.search.js +25 -0
  173. package/dist/commands/graph.search.js.map +1 -0
  174. package/dist/commands/mcp.add.d.ts +13 -0
  175. package/dist/commands/mcp.add.d.ts.map +1 -0
  176. package/dist/commands/mcp.add.js +110 -0
  177. package/dist/commands/mcp.add.js.map +1 -0
  178. package/dist/commands/mcp.auth.d.ts +10 -0
  179. package/dist/commands/mcp.auth.d.ts.map +1 -0
  180. package/dist/commands/mcp.auth.js +132 -0
  181. package/dist/commands/mcp.auth.js.map +1 -0
  182. package/dist/commands/mcp.check.d.ts +10 -0
  183. package/dist/commands/mcp.check.d.ts.map +1 -0
  184. package/dist/commands/mcp.check.js +114 -0
  185. package/dist/commands/mcp.check.js.map +1 -0
  186. package/dist/commands/mcp.list.d.ts +9 -0
  187. package/dist/commands/mcp.list.d.ts.map +1 -0
  188. package/dist/commands/mcp.list.js +93 -0
  189. package/dist/commands/mcp.list.js.map +1 -0
  190. package/dist/commands/mcp.permit.d.ts +12 -0
  191. package/dist/commands/mcp.permit.d.ts.map +1 -0
  192. package/dist/commands/mcp.permit.js +117 -0
  193. package/dist/commands/mcp.permit.js.map +1 -0
  194. package/dist/commands/mcp.remove.d.ts +9 -0
  195. package/dist/commands/mcp.remove.d.ts.map +1 -0
  196. package/dist/commands/mcp.remove.js +65 -0
  197. package/dist/commands/mcp.remove.js.map +1 -0
  198. package/dist/commands/plugin.org.install_bulk.js +1 -1
  199. package/dist/commands/plugin.org.install_bulk.js.map +1 -1
  200. package/dist/commands/privacy.erase.test.js +7 -0
  201. package/dist/commands/privacy.erase.test.js.map +1 -1
  202. package/dist/commands/replay.d.ts +5 -0
  203. package/dist/commands/replay.d.ts.map +1 -0
  204. package/dist/commands/replay.js +28 -0
  205. package/dist/commands/replay.js.map +1 -0
  206. package/dist/commands/schema/schema.config.d.ts +3 -0
  207. package/dist/commands/schema/schema.config.d.ts.map +1 -0
  208. package/dist/commands/schema/schema.config.js +34 -0
  209. package/dist/commands/schema/schema.config.js.map +1 -0
  210. package/dist/commands/schema/schema.disable.d.ts +3 -0
  211. package/dist/commands/schema/schema.disable.d.ts.map +1 -0
  212. package/dist/commands/schema/schema.disable.js +22 -0
  213. package/dist/commands/schema/schema.disable.js.map +1 -0
  214. package/dist/commands/schema/schema.enable.d.ts +3 -0
  215. package/dist/commands/schema/schema.enable.d.ts.map +1 -0
  216. package/dist/commands/schema/schema.enable.js +22 -0
  217. package/dist/commands/schema/schema.enable.js.map +1 -0
  218. package/dist/commands/schema/schema.export.d.ts +3 -0
  219. package/dist/commands/schema/schema.export.d.ts.map +1 -0
  220. package/dist/commands/schema/schema.export.js +31 -0
  221. package/dist/commands/schema/schema.export.js.map +1 -0
  222. package/dist/commands/schema/schema.get.d.ts +3 -0
  223. package/dist/commands/schema/schema.get.d.ts.map +1 -0
  224. package/dist/commands/schema/schema.get.js +23 -0
  225. package/dist/commands/schema/schema.get.js.map +1 -0
  226. package/dist/commands/schema/schema.label.d.ts +5 -0
  227. package/dist/commands/schema/schema.label.d.ts.map +1 -0
  228. package/dist/commands/schema/schema.label.js +60 -0
  229. package/dist/commands/schema/schema.label.js.map +1 -0
  230. package/dist/commands/schema/schema.list.d.ts +3 -0
  231. package/dist/commands/schema/schema.list.d.ts.map +1 -0
  232. package/dist/commands/schema/schema.list.js +30 -0
  233. package/dist/commands/schema/schema.list.js.map +1 -0
  234. package/dist/commands/schema/schema.prop.d.ts +5 -0
  235. package/dist/commands/schema/schema.prop.d.ts.map +1 -0
  236. package/dist/commands/schema/schema.prop.js +72 -0
  237. package/dist/commands/schema/schema.prop.js.map +1 -0
  238. package/dist/commands/schema/schema.reconcile.d.ts +10 -0
  239. package/dist/commands/schema/schema.reconcile.d.ts.map +1 -0
  240. package/dist/commands/schema/schema.reconcile.js +65 -0
  241. package/dist/commands/schema/schema.reconcile.js.map +1 -0
  242. package/dist/commands/schema/schema.rel.d.ts +5 -0
  243. package/dist/commands/schema/schema.rel.d.ts.map +1 -0
  244. package/dist/commands/schema/schema.rel.js +65 -0
  245. package/dist/commands/schema/schema.rel.js.map +1 -0
  246. package/dist/commands/schema/schema.version.d.ts +7 -0
  247. package/dist/commands/schema/schema.version.d.ts.map +1 -0
  248. package/dist/commands/schema/schema.version.js +96 -0
  249. package/dist/commands/schema/schema.version.js.map +1 -0
  250. package/dist/commands/secret.d.ts +23 -0
  251. package/dist/commands/secret.d.ts.map +1 -0
  252. package/dist/commands/secret.js +90 -0
  253. package/dist/commands/secret.js.map +1 -0
  254. package/dist/commands/skill.create.d.ts +3 -0
  255. package/dist/commands/skill.create.d.ts.map +1 -0
  256. package/dist/commands/skill.create.js +52 -0
  257. package/dist/commands/skill.create.js.map +1 -0
  258. package/dist/commands/skill.enable.d.ts +3 -0
  259. package/dist/commands/skill.enable.d.ts.map +1 -0
  260. package/dist/commands/skill.enable.js +31 -0
  261. package/dist/commands/skill.enable.js.map +1 -0
  262. package/dist/commands.test.js +1291 -281
  263. package/dist/commands.test.js.map +1 -1
  264. package/dist/components/DevStatus.d.ts.map +1 -1
  265. package/dist/components/DevStatus.js +3 -2
  266. package/dist/components/DevStatus.js.map +1 -1
  267. package/dist/daemon/client.d.ts +30 -0
  268. package/dist/daemon/client.d.ts.map +1 -0
  269. package/dist/daemon/client.js +97 -0
  270. package/dist/daemon/client.js.map +1 -0
  271. package/dist/daemon/code-graph/builder.d.ts +6 -0
  272. package/dist/daemon/code-graph/builder.d.ts.map +1 -0
  273. package/dist/daemon/code-graph/builder.js +215 -0
  274. package/dist/daemon/code-graph/builder.js.map +1 -0
  275. package/dist/daemon/code-graph/query.d.ts +29 -0
  276. package/dist/daemon/code-graph/query.d.ts.map +1 -0
  277. package/dist/daemon/code-graph/query.js +98 -0
  278. package/dist/daemon/code-graph/query.js.map +1 -0
  279. package/dist/daemon/code-graph/types.d.ts +37 -0
  280. package/dist/daemon/code-graph/types.d.ts.map +1 -0
  281. package/dist/daemon/code-graph/types.js +5 -0
  282. package/dist/daemon/code-graph/types.js.map +1 -0
  283. package/dist/daemon/code-graph/watcher.d.ts +37 -0
  284. package/dist/daemon/code-graph/watcher.d.ts.map +1 -0
  285. package/dist/daemon/code-graph/watcher.js +79 -0
  286. package/dist/daemon/code-graph/watcher.js.map +1 -0
  287. package/dist/daemon/lifecycle.d.ts +6 -0
  288. package/dist/daemon/lifecycle.d.ts.map +1 -0
  289. package/dist/daemon/lifecycle.js +132 -0
  290. package/dist/daemon/lifecycle.js.map +1 -0
  291. package/dist/daemon/protocol.d.ts +113 -0
  292. package/dist/daemon/protocol.d.ts.map +1 -0
  293. package/dist/daemon/protocol.js +16 -0
  294. package/dist/daemon/protocol.js.map +1 -0
  295. package/dist/daemon/server.d.ts +26 -0
  296. package/dist/daemon/server.d.ts.map +1 -0
  297. package/dist/daemon/server.js +168 -0
  298. package/dist/daemon/server.js.map +1 -0
  299. package/dist/index.d.ts +1 -1
  300. package/dist/index.js +262 -356
  301. package/dist/index.js.map +1 -1
  302. package/dist/lib/api.d.ts +5 -0
  303. package/dist/lib/api.d.ts.map +1 -0
  304. package/dist/lib/api.js +52 -0
  305. package/dist/lib/api.js.map +1 -0
  306. package/dist/lib/config.d.ts +3 -0
  307. package/dist/lib/config.d.ts.map +1 -1
  308. package/dist/lib/config.js +8 -2
  309. package/dist/lib/config.js.map +1 -1
  310. package/dist/lib/differential-context.d.ts +46 -0
  311. package/dist/lib/differential-context.d.ts.map +1 -0
  312. package/dist/lib/differential-context.js +89 -0
  313. package/dist/lib/differential-context.js.map +1 -0
  314. package/dist/lib/resolve.d.ts +3 -0
  315. package/dist/lib/resolve.d.ts.map +1 -0
  316. package/dist/lib/resolve.js +29 -0
  317. package/dist/lib/resolve.js.map +1 -0
  318. package/dist/lib/structured-tool-io.d.ts +31 -0
  319. package/dist/lib/structured-tool-io.d.ts.map +1 -0
  320. package/dist/lib/structured-tool-io.js +56 -0
  321. package/dist/lib/structured-tool-io.js.map +1 -0
  322. package/dist/repl/__tests__/_queue_demo.test.d.ts +2 -0
  323. package/dist/repl/__tests__/_queue_demo.test.d.ts.map +1 -0
  324. package/dist/repl/__tests__/_queue_demo.test.js +40 -0
  325. package/dist/repl/__tests__/_queue_demo.test.js.map +1 -0
  326. package/dist/repl/__tests__/components.test.d.ts +2 -0
  327. package/dist/repl/__tests__/components.test.d.ts.map +1 -0
  328. package/dist/repl/__tests__/components.test.js +38 -0
  329. package/dist/repl/__tests__/components.test.js.map +1 -0
  330. package/dist/repl/__tests__/interactive.queue.test.d.ts +2 -0
  331. package/dist/repl/__tests__/interactive.queue.test.d.ts.map +1 -0
  332. package/dist/repl/__tests__/interactive.queue.test.js +124 -0
  333. package/dist/repl/__tests__/interactive.queue.test.js.map +1 -0
  334. package/dist/repl/components.d.ts +59 -0
  335. package/dist/repl/components.d.ts.map +1 -0
  336. package/dist/repl/components.js +152 -0
  337. package/dist/repl/components.js.map +1 -0
  338. package/dist/repl/interactive.d.ts +12 -0
  339. package/dist/repl/interactive.d.ts.map +1 -0
  340. package/dist/repl/interactive.js +326 -0
  341. package/dist/repl/interactive.js.map +1 -0
  342. package/dist/repl/one-shot.d.ts +9 -0
  343. package/dist/repl/one-shot.d.ts.map +1 -0
  344. package/dist/repl/one-shot.js +83 -0
  345. package/dist/repl/one-shot.js.map +1 -0
  346. package/dist/tui/__tests__/app.test.d.ts +2 -0
  347. package/dist/tui/__tests__/app.test.d.ts.map +1 -0
  348. package/dist/tui/__tests__/app.test.js +136 -0
  349. package/dist/tui/__tests__/app.test.js.map +1 -0
  350. package/dist/tui/__tests__/banner.test.d.ts +2 -0
  351. package/dist/tui/__tests__/banner.test.d.ts.map +1 -0
  352. package/dist/tui/__tests__/banner.test.js +15 -0
  353. package/dist/tui/__tests__/banner.test.js.map +1 -0
  354. package/dist/tui/__tests__/command-form.test.d.ts +2 -0
  355. package/dist/tui/__tests__/command-form.test.d.ts.map +1 -0
  356. package/dist/tui/__tests__/command-form.test.js +96 -0
  357. package/dist/tui/__tests__/command-form.test.js.map +1 -0
  358. package/dist/tui/__tests__/command-tree.test.d.ts +2 -0
  359. package/dist/tui/__tests__/command-tree.test.d.ts.map +1 -0
  360. package/dist/tui/__tests__/command-tree.test.js +55 -0
  361. package/dist/tui/__tests__/command-tree.test.js.map +1 -0
  362. package/dist/tui/__tests__/runner.test.d.ts +2 -0
  363. package/dist/tui/__tests__/runner.test.d.ts.map +1 -0
  364. package/dist/tui/__tests__/runner.test.js +38 -0
  365. package/dist/tui/__tests__/runner.test.js.map +1 -0
  366. package/dist/tui/__tests__/theme.test.d.ts +2 -0
  367. package/dist/tui/__tests__/theme.test.d.ts.map +1 -0
  368. package/dist/tui/__tests__/theme.test.js +11 -0
  369. package/dist/tui/__tests__/theme.test.js.map +1 -0
  370. package/dist/tui/agent-view/activity-feed.d.ts +3 -0
  371. package/dist/tui/agent-view/activity-feed.d.ts.map +1 -0
  372. package/dist/tui/agent-view/activity-feed.js +34 -0
  373. package/dist/tui/agent-view/activity-feed.js.map +1 -0
  374. package/dist/tui/agent-view/budget-bar.d.ts +3 -0
  375. package/dist/tui/agent-view/budget-bar.d.ts.map +1 -0
  376. package/dist/tui/agent-view/budget-bar.js +53 -0
  377. package/dist/tui/agent-view/budget-bar.js.map +1 -0
  378. package/dist/tui/agent-view/compile-panel.d.ts +3 -0
  379. package/dist/tui/agent-view/compile-panel.d.ts.map +1 -0
  380. package/dist/tui/agent-view/compile-panel.js +34 -0
  381. package/dist/tui/agent-view/compile-panel.js.map +1 -0
  382. package/dist/tui/agent-view/index.d.ts +4 -0
  383. package/dist/tui/agent-view/index.d.ts.map +1 -0
  384. package/dist/tui/agent-view/index.js +31 -0
  385. package/dist/tui/agent-view/index.js.map +1 -0
  386. package/dist/tui/agent-view/memory-panel.d.ts +3 -0
  387. package/dist/tui/agent-view/memory-panel.d.ts.map +1 -0
  388. package/dist/tui/agent-view/memory-panel.js +80 -0
  389. package/dist/tui/agent-view/memory-panel.js.map +1 -0
  390. package/dist/tui/agent-view/session-panel.d.ts +3 -0
  391. package/dist/tui/agent-view/session-panel.d.ts.map +1 -0
  392. package/dist/tui/agent-view/session-panel.js +44 -0
  393. package/dist/tui/agent-view/session-panel.js.map +1 -0
  394. package/dist/tui/agent-view/status-bar.d.ts +7 -0
  395. package/dist/tui/agent-view/status-bar.d.ts.map +1 -0
  396. package/dist/tui/agent-view/status-bar.js +22 -0
  397. package/dist/tui/agent-view/status-bar.js.map +1 -0
  398. package/dist/tui/app.d.ts +9 -0
  399. package/dist/tui/app.d.ts.map +1 -0
  400. package/dist/tui/app.js +115 -0
  401. package/dist/tui/app.js.map +1 -0
  402. package/dist/tui/banner.d.ts +5 -0
  403. package/dist/tui/banner.d.ts.map +1 -0
  404. package/dist/tui/banner.js +17 -0
  405. package/dist/tui/banner.js.map +1 -0
  406. package/dist/tui/command-form.d.ts +9 -0
  407. package/dist/tui/command-form.d.ts.map +1 -0
  408. package/dist/tui/command-form.js +76 -0
  409. package/dist/tui/command-form.js.map +1 -0
  410. package/dist/tui/command-tree.d.ts +30 -0
  411. package/dist/tui/command-tree.d.ts.map +1 -0
  412. package/dist/tui/command-tree.js +43 -0
  413. package/dist/tui/command-tree.js.map +1 -0
  414. package/dist/tui/fleet-view/agent-row.d.ts +10 -0
  415. package/dist/tui/fleet-view/agent-row.d.ts.map +1 -0
  416. package/dist/tui/fleet-view/agent-row.js +80 -0
  417. package/dist/tui/fleet-view/agent-row.js.map +1 -0
  418. package/dist/tui/fleet-view/dispatch-input.d.ts +5 -0
  419. package/dist/tui/fleet-view/dispatch-input.d.ts.map +1 -0
  420. package/dist/tui/fleet-view/dispatch-input.js +36 -0
  421. package/dist/tui/fleet-view/dispatch-input.js.map +1 -0
  422. package/dist/tui/fleet-view/fleet-app.d.ts +11 -0
  423. package/dist/tui/fleet-view/fleet-app.d.ts.map +1 -0
  424. package/dist/tui/fleet-view/fleet-app.js +95 -0
  425. package/dist/tui/fleet-view/fleet-app.js.map +1 -0
  426. package/dist/tui/fleet-view/fleet-summary.d.ts +6 -0
  427. package/dist/tui/fleet-view/fleet-summary.d.ts.map +1 -0
  428. package/dist/tui/fleet-view/fleet-summary.js +19 -0
  429. package/dist/tui/fleet-view/fleet-summary.js.map +1 -0
  430. package/dist/tui/fleet-view/index.d.ts +16 -0
  431. package/dist/tui/fleet-view/index.d.ts.map +1 -0
  432. package/dist/tui/fleet-view/index.js +61 -0
  433. package/dist/tui/fleet-view/index.js.map +1 -0
  434. package/dist/tui/runner.d.ts +7 -0
  435. package/dist/tui/runner.d.ts.map +1 -0
  436. package/dist/tui/runner.js +36 -0
  437. package/dist/tui/runner.js.map +1 -0
  438. package/dist/tui/theme.d.ts +8 -0
  439. package/dist/tui/theme.d.ts.map +1 -0
  440. package/dist/tui/theme.js +10 -0
  441. package/dist/tui/theme.js.map +1 -0
  442. package/package.json +12 -7
package/dist/index.js CHANGED
@@ -1,364 +1,270 @@
1
- #!/usr/bin/env node
2
- import { jsx as _jsx } from "react/jsx-runtime";
1
+ #!/usr/bin/env tsx
2
+ /**
3
+ * oxagen — agentic coding CLI powered by the Oxagen context engine.
4
+ *
5
+ * Usage:
6
+ * oxagen Interactive REPL (default)
7
+ * oxagen "fix the login bug" One-shot prompt
8
+ * oxagen agents [goal...] Agents screen — plan, dispatch & watch a fleet
9
+ * oxagen view Agent dashboard (memory, compile, sessions)
10
+ * oxagen daemon start|stop|status
11
+ * oxagen config [key] [value]
12
+ */
13
+ import { createRequire } from "node:module";
3
14
  import { Command } from "commander";
4
- import { render } from "ink";
5
- import React from "react";
6
- import { DevStatus } from "./components/DevStatus.js";
7
- import { version } from "../package.json" with { type: "json" };
8
- import { authLoginCommand } from "./commands/auth.login.js";
9
- import { authLogoutCommand } from "./commands/auth.logout.js";
10
- import { authWhoamiCommand } from "./commands/auth.whoami.js";
11
- import { orgListCommand } from "./commands/org.list.js";
12
- import { orgCreateCommand } from "./commands/org.create.js";
13
- import { orgMemberAddCommand } from "./commands/org.member.add.js";
14
- import { orgMemberRemoveCommand } from "./commands/org.member.remove.js";
15
- import { workspaceListCommand } from "./commands/workspace.list.js";
16
- import { workspaceCreateCommand } from "./commands/workspace.create.js";
17
- import { chatSendCommand } from "./commands/chat.send.js";
18
- import { conversationListCommand } from "./commands/conversation.list.js";
19
- import { conversationDeleteCommand } from "./commands/conversation.delete.js";
20
- import { conversationArchiveCommand } from "./commands/conversation.archive.js";
21
- import { conversationRenameCommand } from "./commands/conversation.rename.js";
22
- import { apiKeyCreateCommand } from "./commands/api-key.create.js";
23
- import { apiKeyRevokeCommand } from "./commands/api-key.revoke.js";
24
- import { notificationsListCommand } from "./commands/notifications.list.js";
25
- import { notificationsMarkCommand } from "./commands/notifications.mark.js";
26
- import { pluginListCommand } from "./commands/plugin.list.js";
27
- import { pluginInstallCommand } from "./commands/plugin.install.js";
28
- import { pluginUninstallCommand } from "./commands/plugin.uninstall.js";
29
- import { pluginOrgInstallCommand } from "./commands/plugin.org.install.js";
30
- import { pluginOrgUninstallCommand } from "./commands/plugin.org.uninstall.js";
31
- import { pluginCatalogGetCommand } from "./commands/plugin.catalog.get.js";
32
- import { billingStatusCommand } from "./commands/billing.status.js";
33
- import { billingCreditsPurchaseCommand } from "./commands/billing.credits.purchase.js";
34
- import { billingSubscriptionReadCommand } from "./commands/billing.subscription.read.js";
35
- import { agentMcpListCommand } from "./commands/agent.mcp.list.js";
36
- import { agentSkillListCommand } from "./commands/agent.skill.list.js";
37
- import { agentToolListCommand } from "./commands/agent.tool.list.js";
38
- import { agentApprovalResolveCommand } from "./commands/agent.approval.resolve.js";
39
- import { orgMemberRoleChangeCommand } from "./commands/org.member.role.change.js";
40
- import { archiveCreateCommand } from "./commands/archive.create.js";
41
- import { workflowRunCommand } from "./commands/workflow.run.js";
42
- import { userPreferencesGetCommand } from "./commands/user.preferences.get.js";
43
- import { userPreferencesUpdateCommand } from "./commands/user.preferences.update.js";
44
- import { workspaceMemberListCommand } from "./commands/workspace.member.list.js";
45
- import { workspaceInviteSendCommand } from "./commands/workspace.invite.send.js";
46
- import { conversationChatCommand } from "./commands/conversation.chat.js";
47
- import { imageCreateCommand } from "./commands/image.create.js";
48
- import { documentCreateCommand } from "./commands/document.create.js";
49
- import { automationListCommand } from "./commands/automation.list.js";
50
- import { automationEnableCommand } from "./commands/automation.enable.js";
51
- import { automationDisableCommand } from "./commands/automation.disable.js";
52
- import { imageListCommand } from "./commands/image.list.js";
53
- import { imageAnalyzeCommand } from "./commands/image.analyze.js";
54
- import { documentListCommand } from "./commands/document.list.js";
55
- import { documentReadCommand } from "./commands/document.read.js";
56
- import { formCreateCommand } from "./commands/form.create.js";
57
- import { formSubmitCommand } from "./commands/form.submit.js";
58
- import { automationCreateCommand } from "./commands/automation.create.js";
59
- import { automationUpdateCommand } from "./commands/automation.update.js";
60
- import { automationTriggerCommand } from "./commands/automation.trigger.js";
61
- import { skillWorkspaceListCommand } from "./commands/skill.workspace.list.js";
62
- import { skillWorkspaceInstallCommand } from "./commands/skill.workspace.install.js";
63
- import { skillVersionListCommand } from "./commands/skill.version.list.js";
64
- import { skillVersionGetCommand } from "./commands/skill.version.get.js";
65
- import { skillVersionUploadCommand } from "./commands/skill.version.upload.js";
66
- import { skillVersionActivateCommand } from "./commands/skill.version.activate.js";
67
- import { skillEditCommand } from "./commands/skill.edit.js";
68
- import { skillExportCommand } from "./commands/skill.export.js";
69
- import { skillMetricsReadCommand } from "./commands/skill.metrics.read.js";
70
- import { agentMemoryRecallCommand } from "./commands/agent.memory.recall.js";
71
- import { agentMemoryWriteCommand } from "./commands/agent.memory.write.js";
72
- import { videoGenerateCommand } from "./commands/video.generate.js";
73
- import { svgGenerateCommand } from "./commands/svg.generate.js";
74
- import { workspaceModelSettingsReadCommand } from "./commands/workspace.model.settings.read.js";
75
- import { workspaceModelSettingsWriteCommand } from "./commands/workspace.model.settings.write.js";
76
- import { orgMemberInviteAcceptCommand } from "./commands/org.member.invite.accept.js";
77
- import { pluginRegistryListCommand } from "./commands/plugin.registry.list.js";
78
- import { pluginCatalogBrowseCommand } from "./commands/plugin.catalog.browse.js";
79
- import { pluginCredentialReauthCommand } from "./commands/plugin.credential.reauth.js";
80
- import { imageGenerateCommand } from "./commands/image.generate.js";
81
- import { documentsGenerateCommand } from "./commands/documents.generate.js";
82
- import { pluginRegistryAddCommand } from "./commands/plugin.registry.add.js";
83
- import { agentMcpRegisterCommand } from "./commands/agent.mcp.register.js";
84
- import { agentMcpSetEnabledCommand } from "./commands/agent.mcp.set_enabled.js";
85
- import { agentMcpDeleteCommand } from "./commands/agent.mcp.delete.js";
86
- import { agentMcpConsentResolveCommand } from "./commands/agent.mcp.consent.resolve.js";
87
- import { agentMcpConsentListCommand } from "./commands/agent.mcp.consent.list.js";
88
- import { agentPlanApproveCommand } from "./commands/agent.plan.approve.js";
89
- import { agentPlanCreateCommand } from "./commands/agent.plan.create.js";
90
- import { agentTaskBackgroundReadCommand } from "./commands/agent.task.background.read.js";
91
- import { agentTaskBackgroundStartCommand } from "./commands/agent.task.background.start.js";
92
- import { agentTaskBackgroundCancelCommand } from "./commands/agent.task.background.cancel.js";
93
- import { assetUploadCommand } from "./commands/asset.upload.js";
94
- import { billingSubscriptionUpgradeStartCommand } from "./commands/billing.subscription.upgrade.start.js";
95
- import { brandkitApplyCommand } from "./commands/brandkit.apply.js";
96
- import { conversationPurgeCommand } from "./commands/conversation.purge.js";
97
- import { conversationFilesListCommand } from "./commands/conversation.files.list.js";
98
- import { documentsPdfCreateCommand } from "./commands/documents.pdf.create.js";
99
- import { markdownGenerateCommand } from "./commands/markdown.generate.js";
100
- import { mermaidGenerateCommand } from "./commands/mermaid.generate.js";
101
- import { formFillCommand } from "./commands/form.fill.js";
102
- import { orgMemberInviteDeclineCommand } from "./commands/org.member.invite.decline.js";
103
- import { organizationCreateCommand } from "./commands/organization.create.js";
104
- import { pluginCredentialSetSecretCommand } from "./commands/plugin.credential.set_secret.js";
105
- import { pluginOrgInstallBulkCommand } from "./commands/plugin.org.install_bulk.js";
106
- import { pluginOrgListCommand } from "./commands/plugin.org.list.js";
107
- import { pluginOrgSetEnabledCommand } from "./commands/plugin.org.set_enabled.js";
108
- import { pluginRegistryRemoveCommand } from "./commands/plugin.registry.remove.js";
109
- import { pluginSettingsSetAuthAlertsCommand } from "./commands/plugin.settings.set_auth_alerts.js";
110
- import { pluginWorkspaceSetEnabledCommand } from "./commands/plugin.workspace.set_enabled.js";
111
- import { systemInstallInstructionsCommand } from "./commands/system.install.instructions.js";
112
- import { workflowCancelCommand } from "./commands/workflow.cancel.js";
113
- import { workflowStatusCommand } from "./commands/workflow.status.js";
114
- import { userPreferencesReadCommand } from "./commands/user.preferences.read.js";
115
- import { userPreferencesWriteCommand } from "./commands/user.preferences.write.js";
116
- import { privacyExportCommand } from "./commands/privacy.export.js";
117
- import { privacyEraseCommand } from "./commands/privacy.erase.js";
118
- import { graphNodeUpsertCommand } from "./commands/graph.node.upsert.js";
119
- import { graphNodeGetCommand } from "./commands/graph.node.get.js";
120
- import { graphNodeDeleteCommand } from "./commands/graph.node.delete.js";
121
- import { graphNodeSearchCommand } from "./commands/graph.node.search.js";
122
- import { graphEdgeUpsertCommand } from "./commands/graph.edge.upsert.js";
123
- import { graphEdgeDeleteCommand } from "./commands/graph.edge.delete.js";
124
- import { graphCypherCommand } from "./commands/graph.cypher.js";
125
- import { ontologyQueryCommand } from "./commands/ontology.query.js";
126
- import { ontologyNeighborsCommand } from "./commands/ontology.neighbors.js";
127
- import { auditLogQueryCommand } from "./commands/audit.log.query.js";
128
- import { webSearchCommand } from "./commands/web.search.js";
129
- import { webFetchCommand } from "./commands/web.fetch.js";
130
- import { researchSwarmStartCommand } from "./commands/research.swarm.start.js";
131
- import { researchSwarmStatusCommand } from "./commands/research.swarm.status.js";
15
+ import pkg from "../package.json" with { type: "json" };
16
+ // The Oxagen context engine pulls in DuckDB, a native CommonJS dependency that
17
+ // references a bare `require`. Under pure-ESM execution that global is absent, so
18
+ // loading the store throws "require is not defined". Provide the shim before any
19
+ // code path dynamically imports the context engine.
20
+ {
21
+ const g = globalThis;
22
+ if (typeof g.require === "undefined")
23
+ g.require = createRequire(import.meta.url);
24
+ }
25
+ const { version } = pkg;
132
26
  const program = new Command();
133
27
  program
134
28
  .name("oxagen")
135
- .description("Oxagen developer CLI")
136
- .version(version);
29
+ .description("Agentic coding assistant — powered by the Oxagen context engine")
30
+ .version(version)
31
+ .argument("[prompt...]", "One-shot prompt (runs and exits)")
32
+ .option("-m, --model <slug>", "Gateway model slug (overrides config/default)")
33
+ .option("--readonly", "Read-only mode: read/search/explain only — no file edits or commands", false)
34
+ .option("--no-pipeline", "Skip prompt evaluation, context injection, and completeness judging")
35
+ .action(async (promptWords, opts) => {
36
+ const prompt = promptWords.join(" ").trim();
37
+ const runOpts = {
38
+ model: opts.model,
39
+ readOnly: opts.readonly,
40
+ bare: opts.pipeline === false,
41
+ };
42
+ if (prompt) {
43
+ // One-shot mode: run prompt, stream response, exit
44
+ const { runOneShot } = await import("./repl/one-shot.js");
45
+ await runOneShot(prompt, runOpts);
46
+ }
47
+ else if (process.stdout.isTTY) {
48
+ // Interactive REPL mode
49
+ const { launchRepl } = await import("./repl/interactive.js");
50
+ await launchRepl(runOpts);
51
+ }
52
+ else {
53
+ // Piped input — read from stdin
54
+ const { runFromStdin } = await import("./repl/one-shot.js");
55
+ await runFromStdin(runOpts);
56
+ }
57
+ });
58
+ // ── view: agent dashboard ─────────────────────────────────────────────────────
59
+ program
60
+ .command("view")
61
+ .description("Launch the agent dashboard (memory, compile, sessions)")
62
+ .action(async () => {
63
+ const { launchAgentView } = await import("./tui/agent-view/index.js");
64
+ launchAgentView();
65
+ });
66
+ // ── agents: the agents screen (fleet) ─────────────────────────────────────────
67
+ program
68
+ .command("agents")
69
+ .description("Launch the agents screen — plan a goal, dispatch a fleet, watch it work")
70
+ .argument("[goal...]", "Goal to plan into tasks and run immediately")
71
+ .option("--concurrency <n>", "Max agents running at once", (v) => parseInt(v, 10), 4)
72
+ .option("--readonly", "Read-only agents: read/search/explain only — no file edits or commands", false)
73
+ .option("--isolate", "Run each agent in its own git worktree; commit + merge work back (no clobbering)", false)
74
+ .action(async (goal, opts) => {
75
+ const { launchFleetView } = await import("./tui/fleet-view/index.js");
76
+ await launchFleetView({
77
+ cwd: process.cwd(),
78
+ goal: goal.join(" ").trim() || undefined,
79
+ concurrency: opts.concurrency,
80
+ readOnly: opts.readonly,
81
+ isolate: opts.isolate,
82
+ });
83
+ });
84
+ // ── daemon: context daemon lifecycle ──────────────────────────────────────────
85
+ const daemon = program
86
+ .command("daemon")
87
+ .description("Manage the persistent context daemon");
88
+ daemon
89
+ .command("start")
90
+ .description("Start the context daemon (warm indexes, code graph)")
91
+ .option("--foreground", "Run in foreground (don't daemonize)", false)
92
+ .action(async (opts) => {
93
+ const { startDaemon } = await import("./daemon/lifecycle.js");
94
+ await startDaemon({ foreground: opts.foreground });
95
+ });
96
+ daemon
97
+ .command("stop")
98
+ .description("Stop the running context daemon")
99
+ .action(async () => {
100
+ const { stopDaemon } = await import("./daemon/lifecycle.js");
101
+ await stopDaemon();
102
+ });
103
+ daemon
104
+ .command("status")
105
+ .description("Show daemon health and uptime")
106
+ .action(async () => {
107
+ const { daemonStatus } = await import("./daemon/lifecycle.js");
108
+ await daemonStatus();
109
+ });
110
+ // ── replay: inspect how a past turn was handled ───────────────────────────────
111
+ program
112
+ .command("replay")
113
+ .description("Show how a past turn was handled (prompt, scores, context, model, judge)")
114
+ .argument("[turn]", "Turn index (1 = most recent) or id; omit for the latest")
115
+ .option("--list", "List recent turns instead of replaying one", false)
116
+ .action(async (turn, opts) => {
117
+ const { handleReplay } = await import("./commands/replay.js");
118
+ await handleReplay(turn, opts);
119
+ });
120
+ // ── graph: knowledge-graph search ─────────────────────────────────────────────
121
+ const graph = program.command("graph").description("Query the knowledge graph");
122
+ graph
123
+ .command("search")
124
+ .description("Unified semantic (vector) search across the entire knowledge graph")
125
+ .requiredOption("-q, --query <text>", "Natural-language query to search by vector similarity")
126
+ .option("-k, --kinds <kinds>", "Comma-separated node kinds (entity,file,symbol,chunk,memory,execution,document,message)")
127
+ .option("-l, --labels <labels>", "Comma-separated domain labels (e.g. Person,SourceFile)")
128
+ .option("-n, --limit <n>", "Maximum number of results (1–50)", "10")
129
+ .option("--system", "Only return product-owned (system) nodes")
130
+ .option("--no-system", "Only return customer nodes (exclude system nodes)")
131
+ .action(async (opts) => {
132
+ const { handleGraphSearch } = await import("./commands/graph.search.js");
133
+ await handleGraphSearch(opts);
134
+ });
135
+ // ── config: local configuration ───────────────────────────────────────────────
137
136
  program
138
- .command("dev")
139
- .description("Show the current dev stack status")
140
- .action(() => {
141
- render(_jsx(DevStatus, {}));
137
+ .command("config")
138
+ .description("View or set configuration (api key, model, etc.)")
139
+ .argument("[key]", "Config key to get/set")
140
+ .argument("[value]", "Value to set (omit to read)")
141
+ .action(async (key, value) => {
142
+ const { handleConfig } = await import("./commands/config.js");
143
+ await handleConfig(key, value);
144
+ });
145
+ // ── env: workspace environments ───────────────────────────────────────────────
146
+ const env = program.command("env").description("Manage workspace environments");
147
+ env
148
+ .command("list")
149
+ .description("List environments in the active workspace")
150
+ .option("--json", "Output JSON")
151
+ .action(async (opts) => {
152
+ const { handleEnvList } = await import("./commands/env.js");
153
+ await handleEnvList(opts);
154
+ });
155
+ env
156
+ .command("get")
157
+ .description("Show one environment")
158
+ .argument("<idOrSlug>", "Environment public id or slug")
159
+ .action(async (idOrSlug) => {
160
+ const { handleEnvGet } = await import("./commands/env.js");
161
+ await handleEnvGet(idOrSlug, {});
162
+ });
163
+ env
164
+ .command("create")
165
+ .description("Create an environment")
166
+ .argument("<name>", "Display name")
167
+ .option("--slug <slug>", "Slug (defaults to a slugified name)")
168
+ .option("--description <text>", "Description")
169
+ .action(async (name, opts) => {
170
+ const { handleEnvCreate } = await import("./commands/env.js");
171
+ await handleEnvCreate(name, opts);
172
+ });
173
+ env
174
+ .command("update")
175
+ .description("Update an environment")
176
+ .argument("<idOrSlug>", "Environment public id or slug")
177
+ .option("--name <name>", "New display name")
178
+ .option("--slug <slug>", "New slug")
179
+ .option("--description <text>", "New description")
180
+ .option("--active", "Activate")
181
+ .option("--inactive", "Deactivate (not allowed on the default)")
182
+ .action(async (idOrSlug, opts) => {
183
+ const { handleEnvUpdate } = await import("./commands/env.js");
184
+ const active = opts.active ? true : opts.inactive ? false : undefined;
185
+ await handleEnvUpdate(idOrSlug, {
186
+ name: opts.name,
187
+ slug: opts.slug,
188
+ description: opts.description,
189
+ active,
190
+ });
191
+ });
192
+ env
193
+ .command("rm")
194
+ .description("Delete an environment (not the default)")
195
+ .argument("<idOrSlug>", "Environment public id or slug")
196
+ .action(async (idOrSlug) => {
197
+ const { handleEnvRemove } = await import("./commands/env.js");
198
+ await handleEnvRemove(idOrSlug);
199
+ });
200
+ env
201
+ .command("set-default")
202
+ .description("Promote an environment to the workspace default")
203
+ .argument("<idOrSlug>", "Environment public id or slug")
204
+ .action(async (idOrSlug) => {
205
+ const { handleEnvSetDefault } = await import("./commands/env.js");
206
+ await handleEnvSetDefault(idOrSlug);
207
+ });
208
+ // ── secret: credential vault ──────────────────────────────────────────────────
209
+ const secret = program.command("secret").description("Manage the workspace credential vault");
210
+ secret
211
+ .command("list")
212
+ .description("List vault keys (masked metadata)")
213
+ .option("--json", "Output JSON")
214
+ .action(async (opts) => {
215
+ const { handleSecretList } = await import("./commands/secret.js");
216
+ await handleSecretList(opts);
217
+ });
218
+ secret
219
+ .command("set")
220
+ .description("Set a secret's default value, or an override with --env")
221
+ .argument("<key>", "Secret key name")
222
+ .argument("<value>", "Value")
223
+ .option("--env <slug>", "Target environment (override); omit for the default value")
224
+ .option("--no-sensitive", "Store as plaintext config (default: sensitive/encrypted)")
225
+ .action(async (key, value, opts) => {
226
+ const { handleSecretSet } = await import("./commands/secret.js");
227
+ await handleSecretSet(key, value, opts);
228
+ });
229
+ secret
230
+ .command("rm")
231
+ .description("Delete a key, or just an environment override with --env")
232
+ .argument("<key>", "Secret key name")
233
+ .option("--env <slug>", "Remove only this environment's override")
234
+ .action(async (key, opts) => {
235
+ const { handleSecretRemove } = await import("./commands/secret.js");
236
+ await handleSecretRemove(key, opts);
237
+ });
238
+ secret
239
+ .command("reveal")
240
+ .description("Reveal a secret's plaintext value (recorded to the access log)")
241
+ .argument("<key>", "Secret key name")
242
+ .option("--env <slug>", "Resolve for this environment")
243
+ .action(async (key, opts) => {
244
+ const { handleSecretReveal } = await import("./commands/secret.js");
245
+ await handleSecretReveal(key, opts);
246
+ });
247
+ secret
248
+ .command("import")
249
+ .description("Import .env text (preview unless --yes)")
250
+ .option("--env <slug>", "Target environment overrides; omit for default values")
251
+ .option("-f, --file <path>", "Read from a file (else stdin)")
252
+ .option("--yes", "Commit (otherwise preview only)")
253
+ .action(async (opts) => {
254
+ const { handleSecretImport } = await import("./commands/secret.js");
255
+ await handleSecretImport(opts);
256
+ });
257
+ secret
258
+ .command("export")
259
+ .description("Export resolved secrets as .env (recorded to the access log)")
260
+ .option("--env <slug>", "Resolve for this environment")
261
+ .option("-o, --out <path>", "Write to a file (else stdout)")
262
+ .action(async (opts) => {
263
+ const { handleSecretExport } = await import("./commands/secret.js");
264
+ await handleSecretExport(opts);
142
265
  });
143
- // auth
144
- const auth = program.command("auth").description("Authentication commands");
145
- auth.addCommand(authLoginCommand);
146
- auth.addCommand(authLogoutCommand);
147
- auth.addCommand(authWhoamiCommand);
148
- // org
149
- const org = program.command("org").description("Organization commands");
150
- org.addCommand(orgListCommand);
151
- org.addCommand(orgCreateCommand);
152
- const orgMember = org.command("member").description("Org member management");
153
- orgMember.addCommand(orgMemberAddCommand);
154
- orgMember.addCommand(orgMemberRemoveCommand);
155
- orgMember.addCommand(orgMemberRoleChangeCommand);
156
- const orgMemberInvite = orgMember.command("invite").description("Org member invitations");
157
- orgMemberInvite.addCommand(orgMemberInviteAcceptCommand);
158
- orgMemberInvite.addCommand(orgMemberInviteDeclineCommand);
159
- org.addCommand(organizationCreateCommand);
160
- // workspace
161
- const workspace = program.command("workspace").description("Workspace commands");
162
- workspace.addCommand(workspaceListCommand);
163
- workspace.addCommand(workspaceCreateCommand);
164
- // chat
165
- const chat = program.command("chat").description("Chat and messaging commands");
166
- chat.addCommand(chatSendCommand);
167
- // conversation
168
- const conversation = program.command("conversation").description("Conversation management");
169
- conversation.addCommand(conversationListCommand);
170
- conversation.addCommand(conversationDeleteCommand);
171
- conversation.addCommand(conversationArchiveCommand);
172
- conversation.addCommand(conversationRenameCommand);
173
- // api-key
174
- const apiKey = program.command("api-key").description("API key management");
175
- apiKey.addCommand(apiKeyCreateCommand);
176
- apiKey.addCommand(apiKeyRevokeCommand);
177
- // notifications
178
- const notifications = program.command("notifications").description("Notification management");
179
- notifications.addCommand(notificationsListCommand);
180
- notifications.addCommand(notificationsMarkCommand);
181
- // plugin
182
- const plugin = program.command("plugin").description("Plugin marketplace commands");
183
- plugin.addCommand(pluginListCommand);
184
- plugin.addCommand(pluginInstallCommand);
185
- plugin.addCommand(pluginUninstallCommand);
186
- const pluginOrg = plugin.command("org").description("Plugin organization management");
187
- pluginOrg.addCommand(pluginOrgInstallCommand);
188
- pluginOrg.addCommand(pluginOrgUninstallCommand);
189
- const pluginCatalog = plugin.command("catalog").description("Plugin catalog");
190
- pluginCatalog.addCommand(pluginCatalogGetCommand);
191
- pluginCatalog.addCommand(pluginCatalogBrowseCommand);
192
- const pluginRegistry = plugin.command("registry").description("Plugin registry management");
193
- pluginRegistry.addCommand(pluginRegistryListCommand);
194
- pluginRegistry.addCommand(pluginRegistryAddCommand);
195
- pluginRegistry.addCommand(pluginRegistryRemoveCommand);
196
- const pluginCredential = plugin.command("credential").description("Plugin credential management");
197
- pluginCredential.addCommand(pluginCredentialReauthCommand);
198
- pluginCredential.addCommand(pluginCredentialSetSecretCommand);
199
- pluginOrg.addCommand(pluginOrgInstallBulkCommand);
200
- pluginOrg.addCommand(pluginOrgListCommand);
201
- pluginOrg.addCommand(pluginOrgSetEnabledCommand);
202
- const pluginSettings = plugin.command("settings").description("Plugin settings");
203
- pluginSettings.addCommand(pluginSettingsSetAuthAlertsCommand);
204
- pluginOrg.addCommand(pluginWorkspaceSetEnabledCommand);
205
- // billing
206
- const billing = program.command("billing").description("Billing and subscription commands");
207
- billing.addCommand(billingStatusCommand);
208
- billing.addCommand(billingCreditsPurchaseCommand);
209
- billing.addCommand(billingSubscriptionReadCommand);
210
- const billingSubscription = billing.command("subscription").description("Subscription management");
211
- billingSubscription.addCommand(billingSubscriptionUpgradeStartCommand);
212
- // agent
213
- const agent = program.command("agent").description("Agent commands");
214
- const agentMcp = agent.command("mcp").description("MCP server management");
215
- agentMcp.addCommand(agentMcpListCommand);
216
- const agentSkill = agent.command("skill").description("Agent skill management");
217
- agentSkill.addCommand(agentSkillListCommand);
218
- const agentTool = agent.command("tool").description("Agent tool management");
219
- agentTool.addCommand(agentToolListCommand);
220
- const agentApproval = agent.command("approval").description("Agent approval management");
221
- agentApproval.addCommand(agentApprovalResolveCommand);
222
- const agentMemory = agent.command("memory").description("Agent memory management");
223
- agentMemory.addCommand(agentMemoryRecallCommand);
224
- agentMemory.addCommand(agentMemoryWriteCommand);
225
- agentMcp.addCommand(agentMcpRegisterCommand);
226
- agentMcp.addCommand(agentMcpSetEnabledCommand);
227
- agentMcp.addCommand(agentMcpDeleteCommand);
228
- const agentMcpConsent = agentMcp.command("consent").description("External MCP tool consent grants");
229
- agentMcpConsent.addCommand(agentMcpConsentResolveCommand);
230
- agentMcpConsent.addCommand(agentMcpConsentListCommand);
231
- const agentPlan = agent.command("plan").description("Agent plan management");
232
- agentPlan.addCommand(agentPlanApproveCommand);
233
- agentPlan.addCommand(agentPlanCreateCommand);
234
- const agentTask = agent.command("task").description("Agent task management");
235
- const agentTaskBackground = agentTask.command("background").description("Background task management");
236
- agentTaskBackground.addCommand(agentTaskBackgroundReadCommand);
237
- agentTaskBackground.addCommand(agentTaskBackgroundStartCommand);
238
- agentTaskBackground.addCommand(agentTaskBackgroundCancelCommand);
239
- // archive
240
- const archive = program.command("archive").description("Archive management");
241
- archive.addCommand(archiveCreateCommand);
242
- // asset
243
- const asset = program.command("asset").description("Asset management");
244
- asset.addCommand(assetUploadCommand);
245
- // brandkit
246
- const brandkit = program.command("brandkit").description("Brand kit commands");
247
- brandkit.addCommand(brandkitApplyCommand);
248
- // workflow
249
- const workflow = program.command("workflow").description("Workflow automation");
250
- workflow.addCommand(workflowRunCommand);
251
- workflow.addCommand(workflowCancelCommand);
252
- workflow.addCommand(workflowStatusCommand);
253
- // system
254
- const system = program.command("system").description("System commands");
255
- system.addCommand(systemInstallInstructionsCommand);
256
- // user
257
- const user = program.command("user").description("User account commands");
258
- const userPreferences = user.command("preferences").description("User preference management");
259
- userPreferences.addCommand(userPreferencesGetCommand);
260
- userPreferences.addCommand(userPreferencesUpdateCommand);
261
- userPreferences.addCommand(userPreferencesReadCommand);
262
- userPreferences.addCommand(userPreferencesWriteCommand);
263
- // workspace member + invite
264
- const workspaceMember = workspace.command("member").description("Workspace member management");
265
- workspaceMember.addCommand(workspaceMemberListCommand);
266
- const workspaceInvite = workspace.command("invite").description("Workspace invitation management");
267
- workspaceInvite.addCommand(workspaceInviteSendCommand);
268
- const workspaceModel = workspace.command("model").description("Workspace model settings");
269
- const workspaceModelSettings = workspaceModel.command("settings").description("Model settings management");
270
- workspaceModelSettings.addCommand(workspaceModelSettingsReadCommand);
271
- workspaceModelSettings.addCommand(workspaceModelSettingsWriteCommand);
272
- // conversation chat + purge
273
- conversation.addCommand(conversationChatCommand);
274
- conversation.addCommand(conversationPurgeCommand);
275
- conversation.addCommand(conversationFilesListCommand);
276
- // image
277
- const image = program.command("image").description("Image generation commands");
278
- image.addCommand(imageCreateCommand);
279
- image.addCommand(imageListCommand);
280
- image.addCommand(imageAnalyzeCommand);
281
- image.addCommand(imageGenerateCommand);
282
- // document
283
- const document = program.command("document").description("Document management commands");
284
- document.addCommand(documentCreateCommand);
285
- document.addCommand(documentListCommand);
286
- document.addCommand(documentReadCommand);
287
- const documents = program.command("documents").description("Document generation commands");
288
- documents.addCommand(documentsGenerateCommand);
289
- documents.addCommand(documentsPdfCreateCommand);
290
- documents.addCommand(markdownGenerateCommand);
291
- // mermaid (diagram generation — top-level group like svg/video)
292
- const mermaid = program.command("mermaid").description("Mermaid diagram generation commands");
293
- mermaid.addCommand(mermaidGenerateCommand);
294
- // automation
295
- const automation = program.command("automation").description("Automation management commands");
296
- automation.addCommand(automationListCommand);
297
- automation.addCommand(automationCreateCommand);
298
- automation.addCommand(automationUpdateCommand);
299
- automation.addCommand(automationEnableCommand);
300
- automation.addCommand(automationDisableCommand);
301
- automation.addCommand(automationTriggerCommand);
302
- // form
303
- const form = program.command("form").description("Form management commands");
304
- form.addCommand(formCreateCommand);
305
- form.addCommand(formSubmitCommand);
306
- form.addCommand(formFillCommand);
307
- // skill
308
- const skill = program.command("skill").description("Skill management commands");
309
- const skillWorkspace = skill.command("workspace").description("Workspace skill management");
310
- skillWorkspace.addCommand(skillWorkspaceListCommand);
311
- skillWorkspace.addCommand(skillWorkspaceInstallCommand);
312
- const skillVersion = skill.command("version").description("Skill version management");
313
- skillVersion.addCommand(skillVersionListCommand);
314
- skillVersion.addCommand(skillVersionGetCommand);
315
- skillVersion.addCommand(skillVersionUploadCommand);
316
- skillVersion.addCommand(skillVersionActivateCommand);
317
- skill.addCommand(skillEditCommand);
318
- skill.addCommand(skillExportCommand);
319
- skill.addCommand(skillMetricsReadCommand);
320
- // video
321
- const video = program.command("video").description("Video generation commands");
322
- video.addCommand(videoGenerateCommand);
323
- // svg
324
- const svg = program.command("svg").description("SVG generation commands");
325
- svg.addCommand(svgGenerateCommand);
326
- // privacy (GDPR Art.17 erasure + Art.20 portability)
327
- const privacy = program.command("privacy").description("GDPR privacy rights — data export and erasure");
328
- privacy.addCommand(privacyExportCommand);
329
- privacy.addCommand(privacyEraseCommand);
330
- // graph
331
- const graph = program.command("graph").description("Knowledge graph commands");
332
- const graphNode = graph.command("node").description("Graph node management");
333
- graphNode.addCommand(graphNodeUpsertCommand);
334
- graphNode.addCommand(graphNodeGetCommand);
335
- graphNode.addCommand(graphNodeDeleteCommand);
336
- graphNode.addCommand(graphNodeSearchCommand);
337
- const graphEdge = graph.command("edge").description("Graph edge management");
338
- graphEdge.addCommand(graphEdgeUpsertCommand);
339
- graphEdge.addCommand(graphEdgeDeleteCommand);
340
- graph.addCommand(graphCypherCommand);
341
- // ontology
342
- const ontology = program
343
- .command("ontology")
344
- .description("Typed knowledge-graph traversal commands");
345
- ontology.addCommand(ontologyQueryCommand);
346
- ontology.addCommand(ontologyNeighborsCommand);
347
- // audit
348
- const audit = program.command("audit").description("Audit-log commands");
349
- const auditLog = audit.command("log").description("Query the security & automation audit spines");
350
- auditLog.addCommand(auditLogQueryCommand);
351
- // web
352
- const web = program.command("web").description("Web intelligence commands");
353
- web.addCommand(webSearchCommand);
354
- web.addCommand(webFetchCommand);
355
- // research
356
- const research = program.command("research").description("Research swarm commands");
357
- const researchSwarm = research.command("swarm").description("Research swarm management");
358
- researchSwarm.addCommand(researchSwarmStartCommand);
359
- researchSwarm.addCommand(researchSwarmStatusCommand);
360
- program.parse(process.argv);
361
- if (program.args.length === 0) {
362
- program.outputHelp();
266
+ async function main() {
267
+ await program.parseAsync(process.argv);
363
268
  }
269
+ void main();
364
270
  //# sourceMappingURL=index.js.map