@adverant-nexus/cli 2.0.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 (541) hide show
  1. package/ARCHITECTURE.md +1366 -0
  2. package/LICENSE +21 -0
  3. package/README.md +593 -0
  4. package/completions/_nexus +452 -0
  5. package/completions/nexus.bash +329 -0
  6. package/completions/nexus.fish +187 -0
  7. package/dist/cli.d.ts +35 -0
  8. package/dist/cli.d.ts.map +1 -0
  9. package/dist/cli.js +135 -0
  10. package/dist/cli.js.map +1 -0
  11. package/dist/commands/agent/index.d.ts +9 -0
  12. package/dist/commands/agent/index.d.ts.map +1 -0
  13. package/dist/commands/agent/index.js +20 -0
  14. package/dist/commands/agent/index.js.map +1 -0
  15. package/dist/commands/agent/list.d.ts +9 -0
  16. package/dist/commands/agent/list.d.ts.map +1 -0
  17. package/dist/commands/agent/list.js +122 -0
  18. package/dist/commands/agent/list.js.map +1 -0
  19. package/dist/commands/agent/run.d.ts +10 -0
  20. package/dist/commands/agent/run.d.ts.map +1 -0
  21. package/dist/commands/agent/run.js +167 -0
  22. package/dist/commands/agent/run.js.map +1 -0
  23. package/dist/commands/agent/status.d.ts +9 -0
  24. package/dist/commands/agent/status.d.ts.map +1 -0
  25. package/dist/commands/agent/status.js +157 -0
  26. package/dist/commands/agent/status.js.map +1 -0
  27. package/dist/commands/compute/agent.d.ts +21 -0
  28. package/dist/commands/compute/agent.d.ts.map +1 -0
  29. package/dist/commands/compute/agent.js +158 -0
  30. package/dist/commands/compute/agent.js.map +1 -0
  31. package/dist/commands/compute/index.d.ts +10 -0
  32. package/dist/commands/compute/index.d.ts.map +1 -0
  33. package/dist/commands/compute/index.js +27 -0
  34. package/dist/commands/compute/index.js.map +1 -0
  35. package/dist/commands/compute/lib/hardware-detection.d.ts +52 -0
  36. package/dist/commands/compute/lib/hardware-detection.d.ts.map +1 -0
  37. package/dist/commands/compute/lib/hardware-detection.js +432 -0
  38. package/dist/commands/compute/lib/hardware-detection.js.map +1 -0
  39. package/dist/commands/compute/lib/local-compute-agent.d.ts +143 -0
  40. package/dist/commands/compute/lib/local-compute-agent.d.ts.map +1 -0
  41. package/dist/commands/compute/lib/local-compute-agent.js +1162 -0
  42. package/dist/commands/compute/lib/local-compute-agent.js.map +1 -0
  43. package/dist/commands/compute/lib/local-compute-client.d.ts +89 -0
  44. package/dist/commands/compute/lib/local-compute-client.d.ts.map +1 -0
  45. package/dist/commands/compute/lib/local-compute-client.js +388 -0
  46. package/dist/commands/compute/lib/local-compute-client.js.map +1 -0
  47. package/dist/commands/compute/list.d.ts +14 -0
  48. package/dist/commands/compute/list.d.ts.map +1 -0
  49. package/dist/commands/compute/list.js +164 -0
  50. package/dist/commands/compute/list.js.map +1 -0
  51. package/dist/commands/compute/logs.d.ts +14 -0
  52. package/dist/commands/compute/logs.d.ts.map +1 -0
  53. package/dist/commands/compute/logs.js +105 -0
  54. package/dist/commands/compute/logs.js.map +1 -0
  55. package/dist/commands/compute/resources.d.ts +14 -0
  56. package/dist/commands/compute/resources.d.ts.map +1 -0
  57. package/dist/commands/compute/resources.js +163 -0
  58. package/dist/commands/compute/resources.js.map +1 -0
  59. package/dist/commands/compute/status.d.ts +13 -0
  60. package/dist/commands/compute/status.d.ts.map +1 -0
  61. package/dist/commands/compute/status.js +223 -0
  62. package/dist/commands/compute/status.js.map +1 -0
  63. package/dist/commands/compute/submit.d.ts +19 -0
  64. package/dist/commands/compute/submit.d.ts.map +1 -0
  65. package/dist/commands/compute/submit.js +99 -0
  66. package/dist/commands/compute/submit.js.map +1 -0
  67. package/dist/commands/deploy.d.ts +11 -0
  68. package/dist/commands/deploy.d.ts.map +1 -0
  69. package/dist/commands/deploy.js +117 -0
  70. package/dist/commands/deploy.js.map +1 -0
  71. package/dist/commands/dynamic/graphrag-commands.d.ts +16 -0
  72. package/dist/commands/dynamic/graphrag-commands.d.ts.map +1 -0
  73. package/dist/commands/dynamic/graphrag-commands.js +562 -0
  74. package/dist/commands/dynamic/graphrag-commands.js.map +1 -0
  75. package/dist/commands/dynamic/index.d.ts +10 -0
  76. package/dist/commands/dynamic/index.d.ts.map +1 -0
  77. package/dist/commands/dynamic/index.js +17 -0
  78. package/dist/commands/dynamic/index.js.map +1 -0
  79. package/dist/commands/dynamic/mageagent-commands.d.ts +8 -0
  80. package/dist/commands/dynamic/mageagent-commands.d.ts.map +1 -0
  81. package/dist/commands/dynamic/mageagent-commands.js +86 -0
  82. package/dist/commands/dynamic/mageagent-commands.js.map +1 -0
  83. package/dist/commands/dynamic/mcp-tool-mapper.d.ts +97 -0
  84. package/dist/commands/dynamic/mcp-tool-mapper.d.ts.map +1 -0
  85. package/dist/commands/dynamic/mcp-tool-mapper.js +328 -0
  86. package/dist/commands/dynamic/mcp-tool-mapper.js.map +1 -0
  87. package/dist/commands/dynamic/nexus-commands.d.ts +78 -0
  88. package/dist/commands/dynamic/nexus-commands.d.ts.map +1 -0
  89. package/dist/commands/dynamic/nexus-commands.js +426 -0
  90. package/dist/commands/dynamic/nexus-commands.js.map +1 -0
  91. package/dist/commands/dynamic/sandbox-commands.d.ts +8 -0
  92. package/dist/commands/dynamic/sandbox-commands.d.ts.map +1 -0
  93. package/dist/commands/dynamic/sandbox-commands.js +80 -0
  94. package/dist/commands/dynamic/sandbox-commands.js.map +1 -0
  95. package/dist/commands/init.d.ts +11 -0
  96. package/dist/commands/init.d.ts.map +1 -0
  97. package/dist/commands/init.js +128 -0
  98. package/dist/commands/init.js.map +1 -0
  99. package/dist/commands/list.d.ts +10 -0
  100. package/dist/commands/list.d.ts.map +1 -0
  101. package/dist/commands/list.js +81 -0
  102. package/dist/commands/list.js.map +1 -0
  103. package/dist/commands/login.d.ts +10 -0
  104. package/dist/commands/login.d.ts.map +1 -0
  105. package/dist/commands/login.js +83 -0
  106. package/dist/commands/login.js.map +1 -0
  107. package/dist/commands/logs.d.ts +11 -0
  108. package/dist/commands/logs.d.ts.map +1 -0
  109. package/dist/commands/logs.js +79 -0
  110. package/dist/commands/logs.js.map +1 -0
  111. package/dist/commands/nexus/index.d.ts +69 -0
  112. package/dist/commands/nexus/index.d.ts.map +1 -0
  113. package/dist/commands/nexus/index.js +336 -0
  114. package/dist/commands/nexus/index.js.map +1 -0
  115. package/dist/commands/plugin/disable.d.ts +8 -0
  116. package/dist/commands/plugin/disable.d.ts.map +1 -0
  117. package/dist/commands/plugin/disable.js +31 -0
  118. package/dist/commands/plugin/disable.js.map +1 -0
  119. package/dist/commands/plugin/enable.d.ts +8 -0
  120. package/dist/commands/plugin/enable.d.ts.map +1 -0
  121. package/dist/commands/plugin/enable.js +37 -0
  122. package/dist/commands/plugin/enable.js.map +1 -0
  123. package/dist/commands/plugin/index.d.ts +8 -0
  124. package/dist/commands/plugin/index.d.ts.map +1 -0
  125. package/dist/commands/plugin/index.js +23 -0
  126. package/dist/commands/plugin/index.js.map +1 -0
  127. package/dist/commands/plugin/info.d.ts +8 -0
  128. package/dist/commands/plugin/info.d.ts.map +1 -0
  129. package/dist/commands/plugin/info.js +129 -0
  130. package/dist/commands/plugin/info.js.map +1 -0
  131. package/dist/commands/plugin/init.d.ts +8 -0
  132. package/dist/commands/plugin/init.d.ts.map +1 -0
  133. package/dist/commands/plugin/init.js +83 -0
  134. package/dist/commands/plugin/init.js.map +1 -0
  135. package/dist/commands/plugin/install.d.ts +8 -0
  136. package/dist/commands/plugin/install.d.ts.map +1 -0
  137. package/dist/commands/plugin/install.js +56 -0
  138. package/dist/commands/plugin/install.js.map +1 -0
  139. package/dist/commands/plugin/list.d.ts +8 -0
  140. package/dist/commands/plugin/list.d.ts.map +1 -0
  141. package/dist/commands/plugin/list.js +72 -0
  142. package/dist/commands/plugin/list.js.map +1 -0
  143. package/dist/commands/plugin/uninstall.d.ts +8 -0
  144. package/dist/commands/plugin/uninstall.d.ts.map +1 -0
  145. package/dist/commands/plugin/uninstall.js +49 -0
  146. package/dist/commands/plugin/uninstall.js.map +1 -0
  147. package/dist/commands/register.d.ts +10 -0
  148. package/dist/commands/register.d.ts.map +1 -0
  149. package/dist/commands/register.js +85 -0
  150. package/dist/commands/register.js.map +1 -0
  151. package/dist/commands/services/health.d.ts +7 -0
  152. package/dist/commands/services/health.d.ts.map +1 -0
  153. package/dist/commands/services/health.js +73 -0
  154. package/dist/commands/services/health.js.map +1 -0
  155. package/dist/commands/services/index.d.ts +16 -0
  156. package/dist/commands/services/index.d.ts.map +1 -0
  157. package/dist/commands/services/index.js +26 -0
  158. package/dist/commands/services/index.js.map +1 -0
  159. package/dist/commands/services/info.d.ts +7 -0
  160. package/dist/commands/services/info.d.ts.map +1 -0
  161. package/dist/commands/services/info.js +68 -0
  162. package/dist/commands/services/info.js.map +1 -0
  163. package/dist/commands/services/list.d.ts +9 -0
  164. package/dist/commands/services/list.d.ts.map +1 -0
  165. package/dist/commands/services/list.js +43 -0
  166. package/dist/commands/services/list.js.map +1 -0
  167. package/dist/commands/services/logs.d.ts +7 -0
  168. package/dist/commands/services/logs.d.ts.map +1 -0
  169. package/dist/commands/services/logs.js +107 -0
  170. package/dist/commands/services/logs.js.map +1 -0
  171. package/dist/commands/services/ports.d.ts +7 -0
  172. package/dist/commands/services/ports.d.ts.map +1 -0
  173. package/dist/commands/services/ports.js +65 -0
  174. package/dist/commands/services/ports.js.map +1 -0
  175. package/dist/commands/services/restart.d.ts +7 -0
  176. package/dist/commands/services/restart.d.ts.map +1 -0
  177. package/dist/commands/services/restart.js +67 -0
  178. package/dist/commands/services/restart.js.map +1 -0
  179. package/dist/commands/services/start.d.ts +7 -0
  180. package/dist/commands/services/start.d.ts.map +1 -0
  181. package/dist/commands/services/start.js +67 -0
  182. package/dist/commands/services/start.js.map +1 -0
  183. package/dist/commands/services/status.d.ts +9 -0
  184. package/dist/commands/services/status.d.ts.map +1 -0
  185. package/dist/commands/services/status.js +119 -0
  186. package/dist/commands/services/status.js.map +1 -0
  187. package/dist/commands/services/stop.d.ts +7 -0
  188. package/dist/commands/services/stop.d.ts.map +1 -0
  189. package/dist/commands/services/stop.js +67 -0
  190. package/dist/commands/services/stop.js.map +1 -0
  191. package/dist/commands/session/delete.d.ts +9 -0
  192. package/dist/commands/session/delete.d.ts.map +1 -0
  193. package/dist/commands/session/delete.js +51 -0
  194. package/dist/commands/session/delete.js.map +1 -0
  195. package/dist/commands/session/export.d.ts +9 -0
  196. package/dist/commands/session/export.d.ts.map +1 -0
  197. package/dist/commands/session/export.js +36 -0
  198. package/dist/commands/session/export.js.map +1 -0
  199. package/dist/commands/session/import.d.ts +9 -0
  200. package/dist/commands/session/import.d.ts.map +1 -0
  201. package/dist/commands/session/import.js +54 -0
  202. package/dist/commands/session/import.js.map +1 -0
  203. package/dist/commands/session/index.d.ts +9 -0
  204. package/dist/commands/session/index.d.ts.map +1 -0
  205. package/dist/commands/session/index.js +28 -0
  206. package/dist/commands/session/index.js.map +1 -0
  207. package/dist/commands/session/list.d.ts +9 -0
  208. package/dist/commands/session/list.d.ts.map +1 -0
  209. package/dist/commands/session/list.js +88 -0
  210. package/dist/commands/session/list.js.map +1 -0
  211. package/dist/commands/session/load.d.ts +9 -0
  212. package/dist/commands/session/load.d.ts.map +1 -0
  213. package/dist/commands/session/load.js +71 -0
  214. package/dist/commands/session/load.js.map +1 -0
  215. package/dist/commands/session/resume.d.ts +9 -0
  216. package/dist/commands/session/resume.d.ts.map +1 -0
  217. package/dist/commands/session/resume.js +49 -0
  218. package/dist/commands/session/resume.js.map +1 -0
  219. package/dist/commands/session/save.d.ts +9 -0
  220. package/dist/commands/session/save.d.ts.map +1 -0
  221. package/dist/commands/session/save.js +69 -0
  222. package/dist/commands/session/save.js.map +1 -0
  223. package/dist/commands/workspace/git-commit.d.ts +9 -0
  224. package/dist/commands/workspace/git-commit.d.ts.map +1 -0
  225. package/dist/commands/workspace/git-commit.js +156 -0
  226. package/dist/commands/workspace/git-commit.js.map +1 -0
  227. package/dist/commands/workspace/git-status.d.ts +9 -0
  228. package/dist/commands/workspace/git-status.d.ts.map +1 -0
  229. package/dist/commands/workspace/git-status.js +192 -0
  230. package/dist/commands/workspace/git-status.js.map +1 -0
  231. package/dist/commands/workspace/index.d.ts +9 -0
  232. package/dist/commands/workspace/index.d.ts.map +1 -0
  233. package/dist/commands/workspace/index.js +24 -0
  234. package/dist/commands/workspace/index.js.map +1 -0
  235. package/dist/commands/workspace/info.d.ts +10 -0
  236. package/dist/commands/workspace/info.d.ts.map +1 -0
  237. package/dist/commands/workspace/info.js +191 -0
  238. package/dist/commands/workspace/info.js.map +1 -0
  239. package/dist/commands/workspace/init.d.ts +9 -0
  240. package/dist/commands/workspace/init.d.ts.map +1 -0
  241. package/dist/commands/workspace/init.js +193 -0
  242. package/dist/commands/workspace/init.js.map +1 -0
  243. package/dist/commands/workspace/validate.d.ts +9 -0
  244. package/dist/commands/workspace/validate.d.ts.map +1 -0
  245. package/dist/commands/workspace/validate.js +140 -0
  246. package/dist/commands/workspace/validate.js.map +1 -0
  247. package/dist/core/agent-client.d.ts +49 -0
  248. package/dist/core/agent-client.d.ts.map +1 -0
  249. package/dist/core/agent-client.js +289 -0
  250. package/dist/core/agent-client.js.map +1 -0
  251. package/dist/core/config/config-manager.d.ts +75 -0
  252. package/dist/core/config/config-manager.d.ts.map +1 -0
  253. package/dist/core/config/config-manager.js +379 -0
  254. package/dist/core/config/config-manager.js.map +1 -0
  255. package/dist/core/config/profile-manager.d.ts +76 -0
  256. package/dist/core/config/profile-manager.d.ts.map +1 -0
  257. package/dist/core/config/profile-manager.js +250 -0
  258. package/dist/core/config/profile-manager.js.map +1 -0
  259. package/dist/core/config/workspace-detector.d.ts +66 -0
  260. package/dist/core/config/workspace-detector.d.ts.map +1 -0
  261. package/dist/core/config/workspace-detector.js +291 -0
  262. package/dist/core/config/workspace-detector.js.map +1 -0
  263. package/dist/core/discovery/docker-parser.d.ts +27 -0
  264. package/dist/core/discovery/docker-parser.d.ts.map +1 -0
  265. package/dist/core/discovery/docker-parser.js +361 -0
  266. package/dist/core/discovery/docker-parser.js.map +1 -0
  267. package/dist/core/discovery/index.d.ts +11 -0
  268. package/dist/core/discovery/index.d.ts.map +1 -0
  269. package/dist/core/discovery/index.js +16 -0
  270. package/dist/core/discovery/index.js.map +1 -0
  271. package/dist/core/discovery/mcp-discovery.d.ts +41 -0
  272. package/dist/core/discovery/mcp-discovery.d.ts.map +1 -0
  273. package/dist/core/discovery/mcp-discovery.js +439 -0
  274. package/dist/core/discovery/mcp-discovery.js.map +1 -0
  275. package/dist/core/discovery/openapi-parser.d.ts +95 -0
  276. package/dist/core/discovery/openapi-parser.d.ts.map +1 -0
  277. package/dist/core/discovery/openapi-parser.js +353 -0
  278. package/dist/core/discovery/openapi-parser.js.map +1 -0
  279. package/dist/core/discovery/plugin-discovery.d.ts +63 -0
  280. package/dist/core/discovery/plugin-discovery.d.ts.map +1 -0
  281. package/dist/core/discovery/plugin-discovery.js +333 -0
  282. package/dist/core/discovery/plugin-discovery.js.map +1 -0
  283. package/dist/core/discovery/service-discovery.d.ts +107 -0
  284. package/dist/core/discovery/service-discovery.d.ts.map +1 -0
  285. package/dist/core/discovery/service-discovery.js +349 -0
  286. package/dist/core/discovery/service-discovery.js.map +1 -0
  287. package/dist/core/nexus-client.d.ts +119 -0
  288. package/dist/core/nexus-client.d.ts.map +1 -0
  289. package/dist/core/nexus-client.js +292 -0
  290. package/dist/core/nexus-client.js.map +1 -0
  291. package/dist/core/nexus-tool-executor.d.ts +102 -0
  292. package/dist/core/nexus-tool-executor.d.ts.map +1 -0
  293. package/dist/core/nexus-tool-executor.js +386 -0
  294. package/dist/core/nexus-tool-executor.js.map +1 -0
  295. package/dist/core/react-handler.d.ts +17 -0
  296. package/dist/core/react-handler.d.ts.map +1 -0
  297. package/dist/core/react-handler.js +296 -0
  298. package/dist/core/react-handler.js.map +1 -0
  299. package/dist/core/router/command-registry.d.ts +61 -0
  300. package/dist/core/router/command-registry.d.ts.map +1 -0
  301. package/dist/core/router/command-registry.js +138 -0
  302. package/dist/core/router/command-registry.js.map +1 -0
  303. package/dist/core/router/command-router.d.ts +33 -0
  304. package/dist/core/router/command-router.d.ts.map +1 -0
  305. package/dist/core/router/command-router.js +111 -0
  306. package/dist/core/router/command-router.js.map +1 -0
  307. package/dist/core/router/index.d.ts +9 -0
  308. package/dist/core/router/index.d.ts.map +1 -0
  309. package/dist/core/router/index.js +8 -0
  310. package/dist/core/router/index.js.map +1 -0
  311. package/dist/core/session/context-manager.d.ts +69 -0
  312. package/dist/core/session/context-manager.d.ts.map +1 -0
  313. package/dist/core/session/context-manager.js +109 -0
  314. package/dist/core/session/context-manager.js.map +1 -0
  315. package/dist/core/session/history-manager.d.ts +72 -0
  316. package/dist/core/session/history-manager.d.ts.map +1 -0
  317. package/dist/core/session/history-manager.js +175 -0
  318. package/dist/core/session/history-manager.js.map +1 -0
  319. package/dist/core/session/index.d.ts +9 -0
  320. package/dist/core/session/index.d.ts.map +1 -0
  321. package/dist/core/session/index.js +9 -0
  322. package/dist/core/session/index.js.map +1 -0
  323. package/dist/core/session/session-manager.d.ts +50 -0
  324. package/dist/core/session/session-manager.d.ts.map +1 -0
  325. package/dist/core/session/session-manager.js +200 -0
  326. package/dist/core/session/session-manager.js.map +1 -0
  327. package/dist/core/session/session-storage.d.ts +59 -0
  328. package/dist/core/session/session-storage.d.ts.map +1 -0
  329. package/dist/core/session/session-storage.js +226 -0
  330. package/dist/core/session/session-storage.js.map +1 -0
  331. package/dist/core/transport/http-client.d.ts +27 -0
  332. package/dist/core/transport/http-client.d.ts.map +1 -0
  333. package/dist/core/transport/http-client.js +182 -0
  334. package/dist/core/transport/http-client.js.map +1 -0
  335. package/dist/core/transport/index.d.ts +11 -0
  336. package/dist/core/transport/index.d.ts.map +1 -0
  337. package/dist/core/transport/index.js +10 -0
  338. package/dist/core/transport/index.js.map +1 -0
  339. package/dist/core/transport/mcp-client.d.ts +69 -0
  340. package/dist/core/transport/mcp-client.d.ts.map +1 -0
  341. package/dist/core/transport/mcp-client.js +252 -0
  342. package/dist/core/transport/mcp-client.js.map +1 -0
  343. package/dist/core/transport/stream-handler.d.ts +51 -0
  344. package/dist/core/transport/stream-handler.d.ts.map +1 -0
  345. package/dist/core/transport/stream-handler.js +264 -0
  346. package/dist/core/transport/stream-handler.js.map +1 -0
  347. package/dist/core/transport/websocket-client.d.ts +66 -0
  348. package/dist/core/transport/websocket-client.d.ts.map +1 -0
  349. package/dist/core/transport/websocket-client.js +232 -0
  350. package/dist/core/transport/websocket-client.js.map +1 -0
  351. package/dist/index.d.ts +9 -0
  352. package/dist/index.d.ts.map +1 -0
  353. package/dist/index.js +106 -0
  354. package/dist/index.js.map +1 -0
  355. package/dist/output/formatters/index.d.ts +9 -0
  356. package/dist/output/formatters/index.d.ts.map +1 -0
  357. package/dist/output/formatters/index.js +9 -0
  358. package/dist/output/formatters/index.js.map +1 -0
  359. package/dist/output/formatters/json-formatter.d.ts +71 -0
  360. package/dist/output/formatters/json-formatter.d.ts.map +1 -0
  361. package/dist/output/formatters/json-formatter.js +236 -0
  362. package/dist/output/formatters/json-formatter.js.map +1 -0
  363. package/dist/output/formatters/stream-formatter.d.ts +107 -0
  364. package/dist/output/formatters/stream-formatter.d.ts.map +1 -0
  365. package/dist/output/formatters/stream-formatter.js +247 -0
  366. package/dist/output/formatters/stream-formatter.js.map +1 -0
  367. package/dist/output/formatters/table-formatter.d.ts +63 -0
  368. package/dist/output/formatters/table-formatter.d.ts.map +1 -0
  369. package/dist/output/formatters/table-formatter.js +294 -0
  370. package/dist/output/formatters/table-formatter.js.map +1 -0
  371. package/dist/output/formatters/text-formatter.d.ts +63 -0
  372. package/dist/output/formatters/text-formatter.d.ts.map +1 -0
  373. package/dist/output/formatters/text-formatter.js +202 -0
  374. package/dist/output/formatters/text-formatter.js.map +1 -0
  375. package/dist/output/formatters/yaml-formatter.d.ts +71 -0
  376. package/dist/output/formatters/yaml-formatter.d.ts.map +1 -0
  377. package/dist/output/formatters/yaml-formatter.js +239 -0
  378. package/dist/output/formatters/yaml-formatter.js.map +1 -0
  379. package/dist/output/index.d.ts +7 -0
  380. package/dist/output/index.d.ts.map +1 -0
  381. package/dist/output/index.js +7 -0
  382. package/dist/output/index.js.map +1 -0
  383. package/dist/output/output-manager.d.ts +156 -0
  384. package/dist/output/output-manager.d.ts.map +1 -0
  385. package/dist/output/output-manager.js +339 -0
  386. package/dist/output/output-manager.js.map +1 -0
  387. package/dist/output/renderers/index.d.ts +6 -0
  388. package/dist/output/renderers/index.d.ts.map +1 -0
  389. package/dist/output/renderers/index.js +6 -0
  390. package/dist/output/renderers/index.js.map +1 -0
  391. package/dist/output/renderers/progress-renderer.d.ts +56 -0
  392. package/dist/output/renderers/progress-renderer.d.ts.map +1 -0
  393. package/dist/output/renderers/progress-renderer.js +306 -0
  394. package/dist/output/renderers/progress-renderer.js.map +1 -0
  395. package/dist/output/renderers/terminal-renderer.d.ts +117 -0
  396. package/dist/output/renderers/terminal-renderer.d.ts.map +1 -0
  397. package/dist/output/renderers/terminal-renderer.js +294 -0
  398. package/dist/output/renderers/terminal-renderer.js.map +1 -0
  399. package/dist/plugins/index.d.ts +12 -0
  400. package/dist/plugins/index.d.ts.map +1 -0
  401. package/dist/plugins/index.js +18 -0
  402. package/dist/plugins/index.js.map +1 -0
  403. package/dist/plugins/plugin-loader.d.ts +37 -0
  404. package/dist/plugins/plugin-loader.d.ts.map +1 -0
  405. package/dist/plugins/plugin-loader.js +155 -0
  406. package/dist/plugins/plugin-loader.js.map +1 -0
  407. package/dist/plugins/plugin-manager.d.ts +78 -0
  408. package/dist/plugins/plugin-manager.d.ts.map +1 -0
  409. package/dist/plugins/plugin-manager.js +310 -0
  410. package/dist/plugins/plugin-manager.js.map +1 -0
  411. package/dist/plugins/plugin-sdk.d.ts +136 -0
  412. package/dist/plugins/plugin-sdk.d.ts.map +1 -0
  413. package/dist/plugins/plugin-sdk.js +260 -0
  414. package/dist/plugins/plugin-sdk.js.map +1 -0
  415. package/dist/plugins/plugin-storage.d.ts +109 -0
  416. package/dist/plugins/plugin-storage.d.ts.map +1 -0
  417. package/dist/plugins/plugin-storage.js +207 -0
  418. package/dist/plugins/plugin-storage.js.map +1 -0
  419. package/dist/plugins/plugin-validator.d.ts +44 -0
  420. package/dist/plugins/plugin-validator.d.ts.map +1 -0
  421. package/dist/plugins/plugin-validator.js +272 -0
  422. package/dist/plugins/plugin-validator.js.map +1 -0
  423. package/dist/plugins/template-generator.d.ts +35 -0
  424. package/dist/plugins/template-generator.d.ts.map +1 -0
  425. package/dist/plugins/template-generator.js +438 -0
  426. package/dist/plugins/template-generator.js.map +1 -0
  427. package/dist/repl/completer.d.ts +58 -0
  428. package/dist/repl/completer.d.ts.map +1 -0
  429. package/dist/repl/completer.js +198 -0
  430. package/dist/repl/completer.js.map +1 -0
  431. package/dist/repl/evaluator.d.ts +55 -0
  432. package/dist/repl/evaluator.d.ts.map +1 -0
  433. package/dist/repl/evaluator.js +299 -0
  434. package/dist/repl/evaluator.js.map +1 -0
  435. package/dist/repl/index.d.ts +10 -0
  436. package/dist/repl/index.d.ts.map +1 -0
  437. package/dist/repl/index.js +10 -0
  438. package/dist/repl/index.js.map +1 -0
  439. package/dist/repl/renderer.d.ts +77 -0
  440. package/dist/repl/renderer.d.ts.map +1 -0
  441. package/dist/repl/renderer.js +291 -0
  442. package/dist/repl/renderer.js.map +1 -0
  443. package/dist/repl/repl.d.ts +89 -0
  444. package/dist/repl/repl.d.ts.map +1 -0
  445. package/dist/repl/repl.js +339 -0
  446. package/dist/repl/repl.js.map +1 -0
  447. package/dist/templates/python.d.ts +15 -0
  448. package/dist/templates/python.d.ts.map +1 -0
  449. package/dist/templates/python.js +375 -0
  450. package/dist/templates/python.js.map +1 -0
  451. package/dist/templates/typescript.d.ts +15 -0
  452. package/dist/templates/typescript.d.ts.map +1 -0
  453. package/dist/templates/typescript.js +274 -0
  454. package/dist/templates/typescript.js.map +1 -0
  455. package/dist/types/agent.d.ts +109 -0
  456. package/dist/types/agent.d.ts.map +1 -0
  457. package/dist/types/agent.js +7 -0
  458. package/dist/types/agent.js.map +1 -0
  459. package/dist/types/api.d.ts +125 -0
  460. package/dist/types/api.d.ts.map +1 -0
  461. package/dist/types/api.js +53 -0
  462. package/dist/types/api.js.map +1 -0
  463. package/dist/types/command.d.ts +101 -0
  464. package/dist/types/command.d.ts.map +1 -0
  465. package/dist/types/command.js +7 -0
  466. package/dist/types/command.js.map +1 -0
  467. package/dist/types/compute.d.ts +317 -0
  468. package/dist/types/compute.d.ts.map +1 -0
  469. package/dist/types/compute.js +19 -0
  470. package/dist/types/compute.js.map +1 -0
  471. package/dist/types/config.d.ts +71 -0
  472. package/dist/types/config.d.ts.map +1 -0
  473. package/dist/types/config.js +7 -0
  474. package/dist/types/config.js.map +1 -0
  475. package/dist/types/errors.d.ts +56 -0
  476. package/dist/types/errors.d.ts.map +1 -0
  477. package/dist/types/errors.js +64 -0
  478. package/dist/types/errors.js.map +1 -0
  479. package/dist/types/index.d.ts +16 -0
  480. package/dist/types/index.d.ts.map +1 -0
  481. package/dist/types/index.js +16 -0
  482. package/dist/types/index.js.map +1 -0
  483. package/dist/types/nexus.d.ts +254 -0
  484. package/dist/types/nexus.d.ts.map +1 -0
  485. package/dist/types/nexus.js +7 -0
  486. package/dist/types/nexus.js.map +1 -0
  487. package/dist/types/output.d.ts +107 -0
  488. package/dist/types/output.d.ts.map +1 -0
  489. package/dist/types/output.js +7 -0
  490. package/dist/types/output.js.map +1 -0
  491. package/dist/types/plugin.d.ts +118 -0
  492. package/dist/types/plugin.d.ts.map +1 -0
  493. package/dist/types/plugin.js +7 -0
  494. package/dist/types/plugin.js.map +1 -0
  495. package/dist/types/service.d.ts +94 -0
  496. package/dist/types/service.d.ts.map +1 -0
  497. package/dist/types/service.js +15 -0
  498. package/dist/types/service.js.map +1 -0
  499. package/dist/types/session.d.ts +80 -0
  500. package/dist/types/session.d.ts.map +1 -0
  501. package/dist/types/session.js +7 -0
  502. package/dist/types/session.js.map +1 -0
  503. package/dist/types/transport.d.ts +96 -0
  504. package/dist/types/transport.d.ts.map +1 -0
  505. package/dist/types/transport.js +7 -0
  506. package/dist/types/transport.js.map +1 -0
  507. package/dist/utils/config.d.ts +47 -0
  508. package/dist/utils/config.d.ts.map +1 -0
  509. package/dist/utils/config.js +166 -0
  510. package/dist/utils/config.js.map +1 -0
  511. package/dist/utils/error-handler.d.ts +82 -0
  512. package/dist/utils/error-handler.d.ts.map +1 -0
  513. package/dist/utils/error-handler.js +238 -0
  514. package/dist/utils/error-handler.js.map +1 -0
  515. package/dist/utils/index.d.ts +9 -0
  516. package/dist/utils/index.d.ts.map +1 -0
  517. package/dist/utils/index.js +9 -0
  518. package/dist/utils/index.js.map +1 -0
  519. package/dist/utils/logger.d.ts +61 -0
  520. package/dist/utils/logger.d.ts.map +1 -0
  521. package/dist/utils/logger.js +200 -0
  522. package/dist/utils/logger.js.map +1 -0
  523. package/dist/utils/prompt.d.ts +57 -0
  524. package/dist/utils/prompt.d.ts.map +1 -0
  525. package/dist/utils/prompt.js +141 -0
  526. package/dist/utils/prompt.js.map +1 -0
  527. package/dist/utils/spinner.d.ts +47 -0
  528. package/dist/utils/spinner.d.ts.map +1 -0
  529. package/dist/utils/spinner.js +123 -0
  530. package/dist/utils/spinner.js.map +1 -0
  531. package/dist/utils/validation.d.ts +97 -0
  532. package/dist/utils/validation.d.ts.map +1 -0
  533. package/dist/utils/validation.js +289 -0
  534. package/dist/utils/validation.js.map +1 -0
  535. package/docs/COMPLETIONS.md +528 -0
  536. package/docs/REPL.md +466 -0
  537. package/docs/graphrag-commands.md +387 -0
  538. package/package.json +154 -0
  539. package/scripts/install-completions.sh +356 -0
  540. package/scripts/prepublish.js +522 -0
  541. package/scripts/verify-package.js +505 -0
@@ -0,0 +1,260 @@
1
+ /**
2
+ * Plugin SDK
3
+ *
4
+ * API for plugin developers to create Nexus plugins
5
+ */
6
+ import { createPluginStorage } from './plugin-storage.js';
7
+ /**
8
+ * Plugin Builder - Fluent API for creating plugins
9
+ */
10
+ export class PluginBuilder {
11
+ plugin;
12
+ commands = [];
13
+ permissions = [];
14
+ dependencies = [];
15
+ hooks = {};
16
+ mcpConfig;
17
+ constructor(name) {
18
+ this.plugin = {
19
+ name,
20
+ version: '1.0.0',
21
+ description: '',
22
+ author: '',
23
+ main: 'dist/index.js',
24
+ commands: [],
25
+ dependencies: [],
26
+ permissions: [],
27
+ };
28
+ }
29
+ /**
30
+ * Create new plugin builder
31
+ */
32
+ static create(name) {
33
+ return new PluginBuilder(name);
34
+ }
35
+ /**
36
+ * Set plugin version
37
+ */
38
+ version(version) {
39
+ this.plugin.version = version;
40
+ return this;
41
+ }
42
+ /**
43
+ * Set plugin description
44
+ */
45
+ description(description) {
46
+ this.plugin.description = description;
47
+ return this;
48
+ }
49
+ /**
50
+ * Set plugin author
51
+ */
52
+ author(author) {
53
+ this.plugin.author = author;
54
+ return this;
55
+ }
56
+ /**
57
+ * Set plugin homepage
58
+ */
59
+ homepage(homepage) {
60
+ this.plugin.homepage = homepage;
61
+ return this;
62
+ }
63
+ /**
64
+ * Set plugin repository
65
+ */
66
+ repository(repository) {
67
+ this.plugin.repository = repository;
68
+ return this;
69
+ }
70
+ /**
71
+ * Set main entry file
72
+ */
73
+ main(main) {
74
+ this.plugin.main = main;
75
+ return this;
76
+ }
77
+ /**
78
+ * Add command to plugin
79
+ */
80
+ command(name, config) {
81
+ this.commands.push({
82
+ name,
83
+ description: config.description,
84
+ args: config.args,
85
+ options: config.options,
86
+ handler: config.handler,
87
+ examples: config.examples,
88
+ });
89
+ return this;
90
+ }
91
+ /**
92
+ * Add onLoad lifecycle hook
93
+ */
94
+ onLoad(handler) {
95
+ this.hooks.onLoad = handler;
96
+ return this;
97
+ }
98
+ /**
99
+ * Add onUnload lifecycle hook
100
+ */
101
+ onUnload(handler) {
102
+ this.hooks.onUnload = handler;
103
+ return this;
104
+ }
105
+ /**
106
+ * Add onEnable lifecycle hook
107
+ */
108
+ onEnable(handler) {
109
+ this.hooks.onEnable = handler;
110
+ return this;
111
+ }
112
+ /**
113
+ * Add onDisable lifecycle hook
114
+ */
115
+ onDisable(handler) {
116
+ this.hooks.onDisable = handler;
117
+ return this;
118
+ }
119
+ /**
120
+ * Add permission to plugin
121
+ */
122
+ permission(permission) {
123
+ // Convert PluginPermission object to string format if needed
124
+ const permStr = typeof permission === 'string'
125
+ ? permission
126
+ : `${permission.type}:${permission.level}`;
127
+ this.permissions.push(permStr);
128
+ return this;
129
+ }
130
+ /**
131
+ * Add service dependency
132
+ */
133
+ dependency(service) {
134
+ if (!this.dependencies.includes(service)) {
135
+ this.dependencies.push(service);
136
+ }
137
+ return this;
138
+ }
139
+ /**
140
+ * Configure MCP server
141
+ */
142
+ mcp(config) {
143
+ this.mcpConfig = config;
144
+ return this;
145
+ }
146
+ /**
147
+ * Build plugin
148
+ */
149
+ build() {
150
+ if (!this.plugin.name) {
151
+ throw new Error('Plugin name is required');
152
+ }
153
+ return {
154
+ name: this.plugin.name,
155
+ version: this.plugin.version,
156
+ description: this.plugin.description,
157
+ author: this.plugin.author,
158
+ homepage: this.plugin.homepage,
159
+ repository: this.plugin.repository,
160
+ main: this.plugin.main,
161
+ commands: this.commands,
162
+ dependencies: this.dependencies.length > 0 ? this.dependencies : undefined,
163
+ permissions: this.permissions.length > 0 ? this.permissions : undefined,
164
+ onLoad: this.hooks.onLoad,
165
+ onUnload: this.hooks.onUnload,
166
+ onEnable: this.hooks.onEnable,
167
+ onDisable: this.hooks.onDisable,
168
+ mcp: this.mcpConfig,
169
+ enabled: false,
170
+ installed: false,
171
+ };
172
+ }
173
+ }
174
+ /**
175
+ * Create plugin logger
176
+ */
177
+ export function createPluginLogger(pluginName) {
178
+ const prefix = `[${pluginName}]`;
179
+ return {
180
+ info(message, ...args) {
181
+ console.log(prefix, message, ...args);
182
+ },
183
+ warn(message, ...args) {
184
+ console.warn(prefix, message, ...args);
185
+ },
186
+ error(message, ...args) {
187
+ console.error(prefix, message, ...args);
188
+ },
189
+ debug(message, ...args) {
190
+ if (process.env.DEBUG || process.env.NEXUS_DEBUG) {
191
+ console.debug(prefix, message, ...args);
192
+ }
193
+ },
194
+ };
195
+ }
196
+ /**
197
+ * Create plugin context
198
+ */
199
+ export function createPluginContext(pluginName, services, transport) {
200
+ return {
201
+ config: {},
202
+ workspace: undefined,
203
+ services: services || new Map(),
204
+ transport: transport || {},
205
+ logger: createPluginLogger(pluginName),
206
+ };
207
+ }
208
+ /**
209
+ * Helper to create file permission
210
+ */
211
+ export function filePermission(scope, level = 'read') {
212
+ return { type: 'file', scope, level };
213
+ }
214
+ /**
215
+ * Helper to create network permission
216
+ */
217
+ export function networkPermission(scope, level = 'read') {
218
+ return { type: 'network', scope, level };
219
+ }
220
+ /**
221
+ * Helper to create service permission
222
+ */
223
+ export function servicePermission(scope, level = 'read') {
224
+ return { type: 'service', scope, level };
225
+ }
226
+ /**
227
+ * Helper to create system permission
228
+ */
229
+ export function systemPermission(scope, level = 'read') {
230
+ return { type: 'system', scope, level };
231
+ }
232
+ /**
233
+ * Helper to create plugin argument
234
+ */
235
+ export function arg(name, config) {
236
+ return {
237
+ name,
238
+ description: config.description,
239
+ required: config.required ?? false,
240
+ type: config.type ?? 'string',
241
+ default: config.default,
242
+ };
243
+ }
244
+ /**
245
+ * Helper to create plugin option
246
+ */
247
+ export function option(long, config) {
248
+ return {
249
+ short: config.short,
250
+ long,
251
+ description: config.description,
252
+ type: config.type ?? 'boolean',
253
+ default: config.default,
254
+ };
255
+ }
256
+ /**
257
+ * Export all SDK components
258
+ */
259
+ export { createPluginStorage, };
260
+ //# sourceMappingURL=plugin-sdk.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin-sdk.js","sourceRoot":"","sources":["../../src/plugins/plugin-sdk.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAaH,OAAO,EAAE,mBAAmB,EAAsB,MAAM,qBAAqB,CAAC;AAE9E;;GAEG;AACH,MAAM,OAAO,aAAa;IAChB,MAAM,CAAkB;IACxB,QAAQ,GAAoB,EAAE,CAAC;IAC/B,WAAW,GAAa,EAAE,CAAC;IAC3B,YAAY,GAAa,EAAE,CAAC;I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AAC;AACxC,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,iBAAiB,CAC/B,KAAa,EACb,QAAsC,MAAM;IAE5C,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC;AAC3C,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,iBAAiB,CAC/B,KAAa,EACb,QAAsC,MAAM;IAE5C,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC;AAC3C,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,gBAAgB,CAC9B,KAAa,EACb,QAAsC,MAAM;IAE5C,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC;AAC1C,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,GAAG,CACjB,IAAY,EACZ,MAKC;IAED,OAAO;QACL,IAAI;QACJ,WAAW,EAAE,MAAM,CAAC,WAAW;QAC/B,QAAQ,EAAE,MAAM,CAAC,QAAQ,IAAI,KAAK;QAClC,IAAI,EAAE,MAAM,CAAC,IAAI,IAAI,QAAQ;QAC7B,OAAO,EAAE,MAAM,CAAC,OAAO;KACxB,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,MAAM,CACpB,IAAY,EACZ,MAKC;IAED,OAAO;QACL,KAAK,EAAE,MAAM,CAAC,KAAK;QACnB,IAAI;QACJ,WAAW,EAAE,MAAM,CAAC,WAAW;QAC/B,IAAI,EAAE,MAAM,CAAC,IAAI,IAAI,SAAS;QAC9B,OAAO,EAAE,MAAM,CAAC,OAAO;KACxB,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,OAAO,EAWL,mBAAmB,GACpB,CAAC"}
@@ -0,0 +1,109 @@
1
+ /**
2
+ * Plugin Storage
3
+ *
4
+ * Provides persistent storage for plugins
5
+ */
6
+ /**
7
+ * Get the Nexus home directory
8
+ */
9
+ export declare function getNexusHome(): string;
10
+ /**
11
+ * Plugin Storage Class
12
+ *
13
+ * Each plugin gets its own isolated storage directory
14
+ */
15
+ export declare class PluginStorage {
16
+ private pluginName;
17
+ private storagePath;
18
+ private data;
19
+ constructor(pluginName: string);
20
+ /**
21
+ * Initialize storage directory
22
+ */
23
+ initialize(): Promise<void>;
24
+ /**
25
+ * Get value by key
26
+ */
27
+ get<T = any>(key: string): T | undefined;
28
+ /**
29
+ * Set value by key
30
+ */
31
+ set<T = any>(key: string, value: T): Promise<void>;
32
+ /**
33
+ * Check if key exists
34
+ */
35
+ has(key: string): boolean;
36
+ /**
37
+ * Delete value by key
38
+ */
39
+ delete(key: string): Promise<boolean>;
40
+ /**
41
+ * Get all keys
42
+ */
43
+ keys(): string[];
44
+ /**
45
+ * Get all values
46
+ */
47
+ values(): any[];
48
+ /**
49
+ * Get all entries
50
+ */
51
+ entries(): [string, any][];
52
+ /**
53
+ * Clear all data
54
+ */
55
+ clear(): Promise<void>;
56
+ /**
57
+ * Get storage size (number of keys)
58
+ */
59
+ size(): number;
60
+ /**
61
+ * Load data from disk
62
+ */
63
+ private loadFromDisk;
64
+ /**
65
+ * Persist data to disk
66
+ */
67
+ private persistToDisk;
68
+ /**
69
+ * Get file storage path for plugin
70
+ */
71
+ getFilePath(filename: string): string;
72
+ /**
73
+ * Write file to plugin storage
74
+ */
75
+ writeFile(filename: string, content: string | Buffer): Promise<void>;
76
+ /**
77
+ * Read file from plugin storage
78
+ */
79
+ readFile(filename: string): Promise<string>;
80
+ /**
81
+ * Check if file exists in plugin storage
82
+ */
83
+ fileExists(filename: string): Promise<boolean>;
84
+ /**
85
+ * Delete file from plugin storage
86
+ */
87
+ deleteFile(filename: string): Promise<void>;
88
+ /**
89
+ * List files in plugin storage
90
+ */
91
+ listFiles(): Promise<string[]>;
92
+ }
93
+ /**
94
+ * Create plugin storage instance
95
+ */
96
+ export declare function createPluginStorage(pluginName: string): PluginStorage;
97
+ /**
98
+ * Get plugins directory
99
+ */
100
+ export declare function getPluginsDirectory(): string;
101
+ /**
102
+ * Get plugin data directory
103
+ */
104
+ export declare function getPluginDataDirectory(pluginName: string): string;
105
+ /**
106
+ * Ensure Nexus directories exist
107
+ */
108
+ export declare function ensureNexusDirectories(): Promise<void>;
109
+ //# sourceMappingURL=plugin-storage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin-storage.d.ts","sourceRoot":"","sources":["../../src/plugins/plugin-storage.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAOH;;GAEG;AACH,wBAAgB,YAAY,IAAI,MAAM,CAErC;AAED;;;;GAIG;AACH,qBAAa,aAAa;IACxB,OAAO,CAAC,UAAU,CAAS;IAC3B,OAAO,CAAC,WAAW,CAAS;IAC5B,OAAO,CAAC,IAAI,CAAmB;gBAEnB,UAAU,EAAE,MAAM;IAM9B;;OAEG;IACG,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAWjC;;OAEG;IACH,GAAG,CAAC,CAAC,GAAG,GAAG,EAAE,GAAG,EAAE,MAAM,GAAG,CAAC,GAAG,SAAS;IAIxC;;OAEG;IACG,GAAG,CAAC,CAAC,GAAG,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IAKxD;;OAEG;IACH,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO;IAIzB;;OAEG;IACG,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAM3C;;OAEG;IACH,IAAI,IAAI,MAAM,EAAE;IAIhB;;OAEG;IACH,MAAM,IAAI,GAAG,EAAE;IAIf;;OAEG;IACH,OAAO,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE;IAI1B;;OAEG;IACG,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAK5B;;OAEG;IACH,IAAI,IAAI,MAAM;IAId;;OAEG;YACW,YAAY;IAkB1B;;OAEG;YACW,aAAa;IAY3B;;OAEG;IACH,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM;IAIrC;;OAEG;IACG,SAAS,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAK1E;;OAEG;IACG,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAKjD;;OAEG;IACG,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAKpD;;OAEG;IACG,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAKjD;;OAEG;IACG,SAAS,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;CAIrC;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,UAAU,EAAE,MAAM,GAAG,aAAa,CAErE;AAED;;GAEG;AACH,wBAAgB,mBAAmB,IAAI,MAAM,CAE5C;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAEjE;AAED;;GAEG;AACH,wBAAsB,sBAAsB,IAAI,OAAO,CAAC,IAAI,CAAC,CAU5D"}
@@ -0,0 +1,207 @@
1
+ /**
2
+ * Plugin Storage
3
+ *
4
+ * Provides persistent storage for plugins
5
+ */
6
+ import fs from 'fs-extra';
7
+ import path from 'path';
8
+ import os from 'os';
9
+ import { logger } from '../utils/logger.js';
10
+ /**
11
+ * Get the Nexus home directory
12
+ */
13
+ export function getNexusHome() {
14
+ return process.env.NEXUS_HOME || path.join(os.homedir(), '.nexus');
15
+ }
16
+ /**
17
+ * Plugin Storage Class
18
+ *
19
+ * Each plugin gets its own isolated storage directory
20
+ */
21
+ export class PluginStorage {
22
+ pluginName;
23
+ storagePath;
24
+ data;
25
+ constructor(pluginName) {
26
+ this.pluginName = pluginName;
27
+ this.storagePath = path.join(getNexusHome(), 'plugin-data', pluginName);
28
+ this.data = new Map();
29
+ }
30
+ /**
31
+ * Initialize storage directory
32
+ */
33
+ async initialize() {
34
+ try {
35
+ await fs.ensureDir(this.storagePath);
36
+ await this.loadFromDisk();
37
+ logger.debug(`Plugin storage initialized for: ${this.pluginName}`);
38
+ }
39
+ catch (error) {
40
+ logger.error(`Failed to initialize plugin storage for ${this.pluginName}:`, error);
41
+ throw error;
42
+ }
43
+ }
44
+ /**
45
+ * Get value by key
46
+ */
47
+ get(key) {
48
+ return this.data.get(key);
49
+ }
50
+ /**
51
+ * Set value by key
52
+ */
53
+ async set(key, value) {
54
+ this.data.set(key, value);
55
+ await this.persistToDisk();
56
+ }
57
+ /**
58
+ * Check if key exists
59
+ */
60
+ has(key) {
61
+ return this.data.has(key);
62
+ }
63
+ /**
64
+ * Delete value by key
65
+ */
66
+ async delete(key) {
67
+ const result = this.data.delete(key);
68
+ await this.persistToDisk();
69
+ return result;
70
+ }
71
+ /**
72
+ * Get all keys
73
+ */
74
+ keys() {
75
+ return Array.from(this.data.keys());
76
+ }
77
+ /**
78
+ * Get all values
79
+ */
80
+ values() {
81
+ return Array.from(this.data.values());
82
+ }
83
+ /**
84
+ * Get all entries
85
+ */
86
+ entries() {
87
+ return Array.from(this.data.entries());
88
+ }
89
+ /**
90
+ * Clear all data
91
+ */
92
+ async clear() {
93
+ this.data.clear();
94
+ await this.persistToDisk();
95
+ }
96
+ /**
97
+ * Get storage size (number of keys)
98
+ */
99
+ size() {
100
+ return this.data.size;
101
+ }
102
+ /**
103
+ * Load data from disk
104
+ */
105
+ async loadFromDisk() {
106
+ const dataFile = path.join(this.storagePath, 'storage.json');
107
+ try {
108
+ if (await fs.pathExists(dataFile)) {
109
+ const content = await fs.readFile(dataFile, 'utf-8');
110
+ const parsed = JSON.parse(content);
111
+ this.data = new Map(Object.entries(parsed));
112
+ logger.debug(`Loaded ${this.data.size} entries for plugin: ${this.pluginName}`);
113
+ }
114
+ }
115
+ catch (error) {
116
+ logger.warn(`Failed to load storage for plugin ${this.pluginName}:`, error);
117
+ // Don't throw - start with empty storage
118
+ this.data = new Map();
119
+ }
120
+ }
121
+ /**
122
+ * Persist data to disk
123
+ */
124
+ async persistToDisk() {
125
+ const dataFile = path.join(this.storagePath, 'storage.json');
126
+ try {
127
+ const obj = Object.fromEntries(this.data.entries());
128
+ await fs.writeFile(dataFile, JSON.stringify(obj, null, 2), 'utf-8');
129
+ }
130
+ catch (error) {
131
+ logger.error(`Failed to persist storage for plugin ${this.pluginName}:`, error);
132
+ throw error;
133
+ }
134
+ }
135
+ /**
136
+ * Get file storage path for plugin
137
+ */
138
+ getFilePath(filename) {
139
+ return path.join(this.storagePath, filename);
140
+ }
141
+ /**
142
+ * Write file to plugin storage
143
+ */
144
+ async writeFile(filename, content) {
145
+ const filePath = this.getFilePath(filename);
146
+ await fs.writeFile(filePath, content);
147
+ }
148
+ /**
149
+ * Read file from plugin storage
150
+ */
151
+ async readFile(filename) {
152
+ const filePath = this.getFilePath(filename);
153
+ return fs.readFile(filePath, 'utf-8');
154
+ }
155
+ /**
156
+ * Check if file exists in plugin storage
157
+ */
158
+ async fileExists(filename) {
159
+ const filePath = this.getFilePath(filename);
160
+ return fs.pathExists(filePath);
161
+ }
162
+ /**
163
+ * Delete file from plugin storage
164
+ */
165
+ async deleteFile(filename) {
166
+ const filePath = this.getFilePath(filename);
167
+ await fs.remove(filePath);
168
+ }
169
+ /**
170
+ * List files in plugin storage
171
+ */
172
+ async listFiles() {
173
+ const files = await fs.readdir(this.storagePath);
174
+ return files.filter((file) => file !== 'storage.json');
175
+ }
176
+ }
177
+ /**
178
+ * Create plugin storage instance
179
+ */
180
+ export function createPluginStorage(pluginName) {
181
+ return new PluginStorage(pluginName);
182
+ }
183
+ /**
184
+ * Get plugins directory
185
+ */
186
+ export function getPluginsDirectory() {
187
+ return path.join(getNexusHome(), 'plugins');
188
+ }
189
+ /**
190
+ * Get plugin data directory
191
+ */
192
+ export function getPluginDataDirectory(pluginName) {
193
+ return path.join(getNexusHome(), 'plugin-data', pluginName);
194
+ }
195
+ /**
196
+ * Ensure Nexus directories exist
197
+ */
198
+ export async function ensureNexusDirectories() {
199
+ const nexusHome = getNexusHome();
200
+ const pluginsDir = getPluginsDirectory();
201
+ const pluginDataDir = path.join(nexusHome, 'plugin-data');
202
+ await fs.ensureDir(nexusHome);
203
+ await fs.ensureDir(pluginsDir);
204
+ await fs.ensureDir(pluginDataDir);
205
+ logger.debug(`Nexus directories initialized at: ${nexusHome}`);
206
+ }
207
+ //# sourceMappingURL=plugin-storage.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin-storage.js","sourceRoot":"","sources":["../../src/plugins/plugin-storage.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,MAAM,UAAU,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAE5C;;GAEG;AACH,MAAM,UAAU,YAAY;IAC1B,OAAO,OAAO,CAAC,GAAG,CAAC,UAAU,IAAI,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,QAAQ,CAAC,CAAC;AACrE,CAAC;AAED;;;;GAIG;AACH,MAAM,OAAO,aAAa;IAChB,UAAU,CAAS;IACnB,WAAW,CAAS;IACpB,IAAI,CAAmB;IAE/B,YAAY,UAAkB;QAC5B,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,EAAE,aAAa,EAAE,UAAU,CAAC,CAAC;QACxE,IAAI,CAAC,IAAI,GAAG,IAAI,GAAG,EAAE,CAAC;IACxB,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,UAAU;QACd,IAAI,CAAC;YACH,MAAM,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;YACrC,MAAM,IAAI,CAAC,YAAY,EAAE,CAAC;YAC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AAC;IAC5B,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,SAAS;QACb,MAAM,KAAK,GAAG,MAAM,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QACjD,OAAO,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,KAAK,cAAc,CAAC,CAAC;IACzD,CAAC;CACF;AAED;;GAEG;AACH,MAAM,UAAU,mBAAmB,CAAC,UAAkB;IACpD,OAAO,IAAI,aAAa,CAAC,UAAU,CAAC,CAAC;AACvC,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,mBAAmB;IACjC,OAAO,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,EAAE,SAAS,CAAC,CAAC;AAC9C,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,sBAAsB,CAAC,UAAkB;IACvD,OAAO,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,EAAE,aAAa,EAAE,UAAU,CAAC,CAAC;AAC9D,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,sBAAsB;IAC1C,MAAM,SAAS,GAAG,YAAY,EAAE,CAAC;IACjC,MAAM,UAAU,GAAG,mBAAmB,EAAE,CAAC;IACzC,MAAM,aAAa,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,aAAa,CAAC,CAAC;IAE1D,MAAM,EAAE,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;IAC9B,MAAM,EAAE,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IAC/B,MAAM,EAAE,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC;IAElC,MAAM,CAAC,KAAK,CAAC,qCAAqC,SAAS,EAAE,CAAC,CAAC;AACjE,CAAC"}
@@ -0,0 +1,44 @@
1
+ /**
2
+ * Plugin Validator
3
+ *
4
+ * Validates plugin manifests, structure, permissions, and dependencies
5
+ */
6
+ import type { Plugin, PluginManifest, PluginCommandDef } from '../types/plugin.js';
7
+ /**
8
+ * Validation result
9
+ */
10
+ export interface ValidationResult {
11
+ valid: boolean;
12
+ errors: string[];
13
+ warnings: string[];
14
+ }
15
+ /**
16
+ * Plugin Validator Class
17
+ */
18
+ export declare class PluginValidator {
19
+ /**
20
+ * Validate complete plugin
21
+ */
22
+ validatePlugin(plugin: Plugin): ValidationResult;
23
+ /**
24
+ * Validate plugin manifest
25
+ */
26
+ validateManifest(manifest: PluginManifest): ValidationResult;
27
+ /**
28
+ * Validate permissions
29
+ */
30
+ validatePermissions(permissions: string[]): ValidationResult;
31
+ /**
32
+ * Check plugin dependencies are available
33
+ */
34
+ checkDependencies(plugin: Plugin): ValidationResult;
35
+ /**
36
+ * Validate plugin command definition
37
+ */
38
+ validateCommand(command: PluginCommandDef): ValidationResult;
39
+ }
40
+ /**
41
+ * Singleton instance
42
+ */
43
+ export declare const pluginValidator: PluginValidator;
44
+ //# sourceMappingURL=plugin-validator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin-validator.d.ts","sourceRoot":"","sources":["../../src/plugins/plugin-validator.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EACV,MAAM,EACN,cAAc,EAEd,gBAAgB,EAGjB,MAAM,oBAAoB,CAAC;AAG5B;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AAgED;;GAEG;AACH,qBAAa,eAAe;IAC1B;;OAEG;IACH,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,gBAAgB;IAkDhD;;OAEG;IACH,gBAAgB,CAAC,QAAQ,EAAE,cAAc,GAAG,gBAAgB;IAmD5D;;OAEG;IACH,mBAAmB,CAAC,WAAW,EAAE,MAAM,EAAE,GAAG,gBAAgB;IA2C5D;;OAEG;IACH,iBAAiB,CAAC,MAAM,EAAE,MAAM,GAAG,gBAAgB;IAwCnD;;OAEG;IACH,eAAe,CAAC,OAAO,EAAE,gBAAgB,GAAG,gBAAgB;CA0C7D;AAED;;GAEG;AACH,eAAO,MAAM,eAAe,iBAAwB,CAAC"}