kynjal-cli 3.1.3 → 4.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 (566) hide show
  1. package/.claude/agents/core/coder.md +1 -1
  2. package/.claude/agents/core/planner.md +2 -2
  3. package/.claude/agents/core/researcher.md +1 -1
  4. package/.claude/agents/core/reviewer.md +1 -1
  5. package/.claude/agents/core/tester.md +1 -1
  6. package/.claude/agents/data/data-ml-model.md +4 -4
  7. package/.claude/agents/development/dev-backend-api.md +4 -4
  8. package/.claude/agents/documentation/docs-api-openapi.md +4 -4
  9. package/.claude/agents/github/code-review-swarm.md +2 -2
  10. package/.claude/agents/github/issue-tracker.md +2 -2
  11. package/.claude/agents/github/pr-manager.md +2 -2
  12. package/.claude/agents/github/release-manager.md +2 -2
  13. package/.claude/agents/github/workflow-automation.md +2 -2
  14. package/.claude/agents/sparc/architecture.md +3 -3
  15. package/.claude/agents/sparc/pseudocode.md +2 -2
  16. package/.claude/agents/sparc/refinement.md +3 -3
  17. package/.claude/agents/sparc/specification.md +2 -2
  18. package/.claude/agents/swarm/adaptive-coordinator.md +1 -1
  19. package/.claude/agents/swarm/hierarchical-coordinator.md +1 -1
  20. package/.claude/agents/swarm/mesh-coordinator.md +1 -1
  21. package/.claude/agents/templates/base-template-generator.md +25 -4
  22. package/.claude/agents/templates/sparc-coordinator.md +3 -3
  23. package/.claude/helpers/auto-commit.sh +1 -1
  24. package/.claude/helpers/auto-memory-hook.mjs +27 -9
  25. package/.claude/helpers/hook-handler.cjs +58 -18
  26. package/.claude/helpers/statusline.cjs +14 -33
  27. package/.claude/helpers/statusline.js +3 -3
  28. package/.claude/settings.json +9 -9
  29. package/.claude/skills/reasoningbank-intelligence/SKILL.md +2 -2
  30. package/.claude/skills/swarm-orchestration/SKILL.md +1 -1
  31. package/README.md +383 -170
  32. package/bin/cli.js +6 -6
  33. package/bin/mcp-server.js +1 -1
  34. package/bin/preinstall.cjs +2 -0
  35. package/dist/src/appliance/gguf-engine.js +664 -0
  36. package/dist/src/appliance/gguf-engine.js.map +1 -0
  37. package/dist/src/appliance/ruvllm-bridge.js +492 -0
  38. package/dist/src/appliance/ruvllm-bridge.js.map +1 -0
  39. package/dist/src/appliance/rvfa-builder.js +383 -0
  40. package/dist/src/appliance/rvfa-builder.js.map +1 -0
  41. package/dist/src/appliance/rvfa-distribution.js +533 -0
  42. package/dist/src/appliance/rvfa-distribution.js.map +1 -0
  43. package/dist/src/appliance/rvfa-format.js +465 -0
  44. package/dist/src/appliance/rvfa-format.js.map +1 -0
  45. package/dist/src/appliance/rvfa-runner.js +373 -0
  46. package/dist/src/appliance/rvfa-runner.js.map +1 -0
  47. package/dist/src/appliance/rvfa-signing.js +469 -0
  48. package/dist/src/appliance/rvfa-signing.js.map +1 -0
  49. package/dist/src/benchmarks/pretrain/index.js +542 -331
  50. package/dist/src/benchmarks/pretrain/index.js.map +1 -1
  51. package/dist/src/commands/agent.d.ts.map +1 -1
  52. package/dist/src/commands/agent.js +725 -502
  53. package/dist/src/commands/agent.js.map +1 -1
  54. package/dist/src/commands/analyze.js +1548 -1218
  55. package/dist/src/commands/analyze.js.map +1 -1
  56. package/dist/src/commands/appliance-advanced.d.ts +9 -0
  57. package/dist/src/commands/appliance-advanced.d.ts.map +1 -0
  58. package/dist/src/commands/appliance-advanced.js +324 -0
  59. package/dist/src/commands/appliance-advanced.js.map +1 -0
  60. package/dist/src/commands/appliance.d.ts +8 -0
  61. package/dist/src/commands/appliance.d.ts.map +1 -0
  62. package/dist/src/commands/appliance.js +581 -0
  63. package/dist/src/commands/appliance.js.map +1 -0
  64. package/dist/src/commands/benchmark.js +523 -372
  65. package/dist/src/commands/benchmark.js.map +1 -1
  66. package/dist/src/commands/claims.js +364 -274
  67. package/dist/src/commands/claims.js.map +1 -1
  68. package/dist/src/commands/cleanup.d.ts +13 -0
  69. package/dist/src/commands/cleanup.d.ts.map +1 -0
  70. package/dist/src/commands/cleanup.js +262 -0
  71. package/dist/src/commands/cleanup.js.map +1 -0
  72. package/dist/src/commands/completions.js +118 -477
  73. package/dist/src/commands/completions.js.map +1 -1
  74. package/dist/src/commands/config.js +303 -237
  75. package/dist/src/commands/config.js.map +1 -1
  76. package/dist/src/commands/daemon.d.ts.map +1 -1
  77. package/dist/src/commands/daemon.js +597 -425
  78. package/dist/src/commands/daemon.js.map +1 -1
  79. package/dist/src/commands/deployment.js +275 -194
  80. package/dist/src/commands/deployment.js.map +1 -1
  81. package/dist/src/commands/doctor.d.ts.map +1 -1
  82. package/dist/src/commands/doctor.js +690 -460
  83. package/dist/src/commands/doctor.js.map +1 -1
  84. package/dist/src/commands/embeddings.js +1543 -1293
  85. package/dist/src/commands/embeddings.js.map +1 -1
  86. package/dist/src/commands/guidance.js +596 -449
  87. package/dist/src/commands/guidance.js.map +1 -1
  88. package/dist/src/commands/hive-mind.js +938 -854
  89. package/dist/src/commands/hive-mind.js.map +1 -1
  90. package/dist/src/commands/hooks.d.ts.map +1 -1
  91. package/dist/src/commands/hooks.js +3677 -2570
  92. package/dist/src/commands/hooks.js.map +1 -1
  93. package/dist/src/commands/index.js +322 -122
  94. package/dist/src/commands/index.js.map +1 -1
  95. package/dist/src/commands/init.d.ts +1 -1
  96. package/dist/src/commands/init.d.ts.map +1 -1
  97. package/dist/src/commands/init.js +943 -787
  98. package/dist/src/commands/init.js.map +1 -1
  99. package/dist/src/commands/issues.js +558 -383
  100. package/dist/src/commands/issues.js.map +1 -1
  101. package/dist/src/commands/mcp.d.ts.map +1 -1
  102. package/dist/src/commands/mcp.js +605 -475
  103. package/dist/src/commands/mcp.js.map +1 -1
  104. package/dist/src/commands/memory.d.ts.map +1 -1
  105. package/dist/src/commands/memory.js +1031 -814
  106. package/dist/src/commands/memory.js.map +1 -1
  107. package/dist/src/commands/migrate.js +347 -282
  108. package/dist/src/commands/migrate.js.map +1 -1
  109. package/dist/src/commands/neural.d.ts.map +1 -1
  110. package/dist/src/commands/neural.js +1563 -1283
  111. package/dist/src/commands/neural.js.map +1 -1
  112. package/dist/src/commands/performance.js +643 -497
  113. package/dist/src/commands/performance.js.map +1 -1
  114. package/dist/src/commands/plugins.js +841 -668
  115. package/dist/src/commands/plugins.js.map +1 -1
  116. package/dist/src/commands/process.js +447 -392
  117. package/dist/src/commands/process.js.map +1 -1
  118. package/dist/src/commands/progress.js +256 -162
  119. package/dist/src/commands/progress.js.map +1 -1
  120. package/dist/src/commands/providers.js +220 -150
  121. package/dist/src/commands/providers.js.map +1 -1
  122. package/dist/src/commands/route.js +665 -520
  123. package/dist/src/commands/route.js.map +1 -1
  124. package/dist/src/commands/ruvector/backup.js +651 -505
  125. package/dist/src/commands/ruvector/backup.js.map +1 -1
  126. package/dist/src/commands/ruvector/benchmark.js +401 -349
  127. package/dist/src/commands/ruvector/benchmark.js.map +1 -1
  128. package/dist/src/commands/ruvector/import.js +267 -225
  129. package/dist/src/commands/ruvector/import.js.map +1 -1
  130. package/dist/src/commands/ruvector/index.js +75 -37
  131. package/dist/src/commands/ruvector/index.js.map +1 -1
  132. package/dist/src/commands/ruvector/init.js +359 -336
  133. package/dist/src/commands/ruvector/init.js.map +1 -1
  134. package/dist/src/commands/ruvector/migrate.js +322 -335
  135. package/dist/src/commands/ruvector/migrate.js.map +1 -1
  136. package/dist/src/commands/ruvector/optimize.js +431 -375
  137. package/dist/src/commands/ruvector/optimize.js.map +1 -1
  138. package/dist/src/commands/ruvector/setup.js +117 -703
  139. package/dist/src/commands/ruvector/setup.js.map +1 -1
  140. package/dist/src/commands/ruvector/status.js +419 -364
  141. package/dist/src/commands/ruvector/status.js.map +1 -1
  142. package/dist/src/commands/security.d.ts.map +1 -1
  143. package/dist/src/commands/security.js +610 -456
  144. package/dist/src/commands/security.js.map +1 -1
  145. package/dist/src/commands/session.d.ts +1 -1
  146. package/dist/src/commands/session.js +627 -505
  147. package/dist/src/commands/session.js.map +1 -1
  148. package/dist/src/commands/start.d.ts +1 -1
  149. package/dist/src/commands/start.js +368 -271
  150. package/dist/src/commands/start.js.map +1 -1
  151. package/dist/src/commands/status.d.ts +1 -1
  152. package/dist/src/commands/status.d.ts.map +1 -1
  153. package/dist/src/commands/status.js +492 -379
  154. package/dist/src/commands/status.js.map +1 -1
  155. package/dist/src/commands/swarm.js +488 -408
  156. package/dist/src/commands/swarm.js.map +1 -1
  157. package/dist/src/commands/task.d.ts +1 -1
  158. package/dist/src/commands/task.js +539 -424
  159. package/dist/src/commands/task.js.map +1 -1
  160. package/dist/src/commands/transfer-store.js +412 -322
  161. package/dist/src/commands/transfer-store.js.map +1 -1
  162. package/dist/src/commands/update.js +291 -196
  163. package/dist/src/commands/update.js.map +1 -1
  164. package/dist/src/commands/workflow.js +486 -386
  165. package/dist/src/commands/workflow.js.map +1 -1
  166. package/dist/src/config-adapter.js +40 -39
  167. package/dist/src/config-adapter.js.map +1 -1
  168. package/dist/src/index.js +416 -312
  169. package/dist/src/index.js.map +1 -1
  170. package/dist/src/infrastructure/in-memory-repositories.js +507 -246
  171. package/dist/src/infrastructure/in-memory-repositories.js.map +1 -1
  172. package/dist/src/init/claudemd-generator.js +78 -368
  173. package/dist/src/init/claudemd-generator.js.map +1 -1
  174. package/dist/src/init/executor.js +1019 -1345
  175. package/dist/src/init/executor.js.map +1 -1
  176. package/dist/src/init/helpers-generator.js +60 -635
  177. package/dist/src/init/helpers-generator.js.map +1 -1
  178. package/dist/src/init/index.d.ts +1 -1
  179. package/dist/src/init/index.d.ts.map +1 -1
  180. package/dist/src/init/index.js +1 -1
  181. package/dist/src/init/index.js.map +1 -1
  182. package/dist/src/init/mcp-generator.d.ts +0 -1
  183. package/dist/src/init/mcp-generator.d.ts.map +1 -1
  184. package/dist/src/init/mcp-generator.js +62 -42
  185. package/dist/src/init/mcp-generator.js.map +1 -1
  186. package/dist/src/init/settings-generator.d.ts.map +1 -1
  187. package/dist/src/init/settings-generator.js +167 -100
  188. package/dist/src/init/settings-generator.js.map +1 -1
  189. package/dist/src/init/statusline-generator.d.ts +16 -8
  190. package/dist/src/init/statusline-generator.d.ts.map +1 -1
  191. package/dist/src/init/statusline-generator.js +20 -1300
  192. package/dist/src/init/statusline-generator.js.map +1 -1
  193. package/dist/src/init/types.d.ts +15 -5
  194. package/dist/src/init/types.d.ts.map +1 -1
  195. package/dist/src/init/types.js +66 -76
  196. package/dist/src/init/types.js.map +1 -1
  197. package/dist/src/mcp-client.js +130 -76
  198. package/dist/src/mcp-client.js.map +1 -1
  199. package/dist/src/mcp-server.js +758 -445
  200. package/dist/src/mcp-server.js.map +1 -1
  201. package/dist/src/mcp-tools/agent-tools.js +492 -391
  202. package/dist/src/mcp-tools/agent-tools.js.map +1 -1
  203. package/dist/src/mcp-tools/agentdb-tools.d.ts +30 -0
  204. package/dist/src/mcp-tools/agentdb-tools.d.ts.map +1 -0
  205. package/dist/src/mcp-tools/agentdb-tools.js +758 -0
  206. package/dist/src/mcp-tools/agentdb-tools.js.map +1 -0
  207. package/dist/src/mcp-tools/analyze-tools.js +236 -172
  208. package/dist/src/mcp-tools/analyze-tools.js.map +1 -1
  209. package/dist/src/mcp-tools/auto-install.js +142 -80
  210. package/dist/src/mcp-tools/auto-install.js.map +1 -1
  211. package/dist/src/mcp-tools/browser-tools.js +375 -252
  212. package/dist/src/mcp-tools/browser-tools.js.map +1 -1
  213. package/dist/src/mcp-tools/claims-tools.js +565 -473
  214. package/dist/src/mcp-tools/claims-tools.js.map +1 -1
  215. package/dist/src/mcp-tools/config-tools.d.ts.map +1 -1
  216. package/dist/src/mcp-tools/config-tools.js +284 -190
  217. package/dist/src/mcp-tools/config-tools.js.map +1 -1
  218. package/dist/src/mcp-tools/coordination-tools.d.ts.map +1 -1
  219. package/dist/src/mcp-tools/coordination-tools.js +600 -349
  220. package/dist/src/mcp-tools/coordination-tools.js.map +1 -1
  221. package/dist/src/mcp-tools/daa-tools.js +367 -289
  222. package/dist/src/mcp-tools/daa-tools.js.map +1 -1
  223. package/dist/src/mcp-tools/embeddings-tools.js +693 -582
  224. package/dist/src/mcp-tools/embeddings-tools.js.map +1 -1
  225. package/dist/src/mcp-tools/github-tools.js +312 -261
  226. package/dist/src/mcp-tools/github-tools.js.map +1 -1
  227. package/dist/src/mcp-tools/hive-mind-tools.d.ts.map +1 -1
  228. package/dist/src/mcp-tools/hive-mind-tools.js +718 -423
  229. package/dist/src/mcp-tools/hive-mind-tools.js.map +1 -1
  230. package/dist/src/mcp-tools/hooks-tools.d.ts.map +1 -1
  231. package/dist/src/mcp-tools/hooks-tools.js +2726 -1978
  232. package/dist/src/mcp-tools/hooks-tools.js.map +1 -1
  233. package/dist/src/mcp-tools/index.d.ts +2 -0
  234. package/dist/src/mcp-tools/index.d.ts.map +1 -1
  235. package/dist/src/mcp-tools/index.js +2 -0
  236. package/dist/src/mcp-tools/index.js.map +1 -1
  237. package/dist/src/mcp-tools/memory-tools.d.ts.map +1 -1
  238. package/dist/src/mcp-tools/memory-tools.js +514 -329
  239. package/dist/src/mcp-tools/memory-tools.js.map +1 -1
  240. package/dist/src/mcp-tools/neural-tools.d.ts.map +1 -1
  241. package/dist/src/mcp-tools/neural-tools.js +428 -326
  242. package/dist/src/mcp-tools/neural-tools.js.map +1 -1
  243. package/dist/src/mcp-tools/performance-tools.js +480 -420
  244. package/dist/src/mcp-tools/performance-tools.js.map +1 -1
  245. package/dist/src/mcp-tools/progress-tools.js +278 -204
  246. package/dist/src/mcp-tools/progress-tools.js.map +1 -1
  247. package/dist/src/mcp-tools/ruvllm-tools.d.ts +9 -0
  248. package/dist/src/mcp-tools/ruvllm-tools.d.ts.map +1 -0
  249. package/dist/src/mcp-tools/ruvllm-tools.js +399 -0
  250. package/dist/src/mcp-tools/ruvllm-tools.js.map +1 -0
  251. package/dist/src/mcp-tools/security-tools.js +429 -297
  252. package/dist/src/mcp-tools/security-tools.js.map +1 -1
  253. package/dist/src/mcp-tools/session-tools.js +234 -185
  254. package/dist/src/mcp-tools/session-tools.js.map +1 -1
  255. package/dist/src/mcp-tools/swarm-tools.d.ts +2 -1
  256. package/dist/src/mcp-tools/swarm-tools.d.ts.map +1 -1
  257. package/dist/src/mcp-tools/swarm-tools.js +303 -64
  258. package/dist/src/mcp-tools/swarm-tools.js.map +1 -1
  259. package/dist/src/mcp-tools/system-tools.d.ts.map +1 -1
  260. package/dist/src/mcp-tools/system-tools.js +352 -200
  261. package/dist/src/mcp-tools/system-tools.js.map +1 -1
  262. package/dist/src/mcp-tools/task-tools.d.ts.map +1 -1
  263. package/dist/src/mcp-tools/task-tools.js +357 -189
  264. package/dist/src/mcp-tools/task-tools.js.map +1 -1
  265. package/dist/src/mcp-tools/terminal-tools.js +196 -148
  266. package/dist/src/mcp-tools/terminal-tools.js.map +1 -1
  267. package/dist/src/mcp-tools/transfer-tools.js +333 -186
  268. package/dist/src/mcp-tools/transfer-tools.js.map +1 -1
  269. package/dist/src/mcp-tools/wasm-agent-tools.d.ts +9 -0
  270. package/dist/src/mcp-tools/wasm-agent-tools.d.ts.map +1 -0
  271. package/dist/src/mcp-tools/wasm-agent-tools.js +377 -0
  272. package/dist/src/mcp-tools/wasm-agent-tools.js.map +1 -0
  273. package/dist/src/mcp-tools/workflow-tools.d.ts.map +1 -1
  274. package/dist/src/mcp-tools/workflow-tools.js +471 -335
  275. package/dist/src/mcp-tools/workflow-tools.js.map +1 -1
  276. package/dist/src/memory/ewc-consolidation.js +345 -173
  277. package/dist/src/memory/ewc-consolidation.js.map +1 -1
  278. package/dist/src/memory/intelligence.js +841 -359
  279. package/dist/src/memory/intelligence.js.map +1 -1
  280. package/dist/src/memory/memory-bridge.js +1964 -0
  281. package/dist/src/memory/memory-bridge.js.map +1 -0
  282. package/dist/src/memory/memory-initializer.js +1895 -1602
  283. package/dist/src/memory/memory-initializer.js.map +1 -1
  284. package/dist/src/memory/sona-optimizer.js +329 -199
  285. package/dist/src/memory/sona-optimizer.js.map +1 -1
  286. package/dist/src/output.d.ts +2 -2
  287. package/dist/src/output.d.ts.map +1 -1
  288. package/dist/src/output.js +273 -242
  289. package/dist/src/output.js.map +1 -1
  290. package/dist/src/parser.js +217 -124
  291. package/dist/src/parser.js.map +1 -1
  292. package/dist/src/plugins/manager.js +531 -278
  293. package/dist/src/plugins/manager.js.map +1 -1
  294. package/dist/src/plugins/store/discovery.js +362 -275
  295. package/dist/src/plugins/store/discovery.js.map +1 -1
  296. package/dist/src/plugins/store/index.js +105 -48
  297. package/dist/src/plugins/store/index.js.map +1 -1
  298. package/dist/src/plugins/store/search.js +107 -69
  299. package/dist/src/plugins/store/search.js.map +1 -1
  300. package/dist/src/plugins/tests/demo-plugin-store.js +160 -113
  301. package/dist/src/plugins/tests/demo-plugin-store.js.map +1 -1
  302. package/dist/src/plugins/tests/standalone-test.js +223 -172
  303. package/dist/src/plugins/tests/standalone-test.js.map +1 -1
  304. package/dist/src/plugins/tests/test-plugin-store.js +228 -190
  305. package/dist/src/plugins/tests/test-plugin-store.js.map +1 -1
  306. package/dist/src/production/circuit-breaker.js +126 -62
  307. package/dist/src/production/circuit-breaker.js.map +1 -1
  308. package/dist/src/production/error-handler.js +156 -86
  309. package/dist/src/production/error-handler.js.map +1 -1
  310. package/dist/src/production/monitoring.js +220 -139
  311. package/dist/src/production/monitoring.js.map +1 -1
  312. package/dist/src/production/rate-limiter.js +93 -74
  313. package/dist/src/production/rate-limiter.js.map +1 -1
  314. package/dist/src/production/retry.js +167 -75
  315. package/dist/src/production/retry.js.map +1 -1
  316. package/dist/src/prompt.js +560 -436
  317. package/dist/src/prompt.js.map +1 -1
  318. package/dist/src/runtime/headless.js +289 -200
  319. package/dist/src/runtime/headless.js.map +1 -1
  320. package/dist/src/ruvector/agent-wasm.js +511 -0
  321. package/dist/src/ruvector/agent-wasm.js.map +1 -0
  322. package/dist/src/ruvector/ast-analyzer.js +232 -145
  323. package/dist/src/ruvector/ast-analyzer.js.map +1 -1
  324. package/dist/src/ruvector/coverage-router.js +419 -287
  325. package/dist/src/ruvector/coverage-router.js.map +1 -1
  326. package/dist/src/ruvector/coverage-tools.js +101 -56
  327. package/dist/src/ruvector/coverage-tools.js.map +1 -1
  328. package/dist/src/ruvector/diff-classifier.js +451 -324
  329. package/dist/src/ruvector/diff-classifier.js.map +1 -1
  330. package/dist/src/ruvector/enhanced-model-router.js +337 -251
  331. package/dist/src/ruvector/enhanced-model-router.js.map +1 -1
  332. package/dist/src/ruvector/flash-attention.js +254 -223
  333. package/dist/src/ruvector/flash-attention.js.map +1 -1
  334. package/dist/src/ruvector/graph-analyzer.js +680 -486
  335. package/dist/src/ruvector/graph-analyzer.js.map +1 -1
  336. package/dist/src/ruvector/index.js +113 -27
  337. package/dist/src/ruvector/index.js.map +1 -1
  338. package/dist/src/ruvector/lora-adapter.js +248 -155
  339. package/dist/src/ruvector/lora-adapter.js.map +1 -1
  340. package/dist/src/ruvector/model-router.js +248 -175
  341. package/dist/src/ruvector/model-router.js.map +1 -1
  342. package/dist/src/ruvector/moe-router.js +286 -228
  343. package/dist/src/ruvector/moe-router.js.map +1 -1
  344. package/dist/src/ruvector/q-learning-router.js +338 -257
  345. package/dist/src/ruvector/q-learning-router.js.map +1 -1
  346. package/dist/src/ruvector/ruvllm-wasm.js +527 -0
  347. package/dist/src/ruvector/ruvllm-wasm.js.map +1 -0
  348. package/dist/src/ruvector/semantic-router.js +67 -60
  349. package/dist/src/ruvector/semantic-router.js.map +1 -1
  350. package/dist/src/ruvector/vector-db.js +205 -119
  351. package/dist/src/ruvector/vector-db.js.map +1 -1
  352. package/dist/src/services/agentic-flow-bridge.js +168 -0
  353. package/dist/src/services/agentic-flow-bridge.js.map +1 -0
  354. package/dist/src/services/claim-service.js +940 -615
  355. package/dist/src/services/claim-service.js.map +1 -1
  356. package/dist/src/services/container-worker-pool.js +669 -399
  357. package/dist/src/services/container-worker-pool.js.map +1 -1
  358. package/dist/src/services/headless-worker-executor.js +467 -441
  359. package/dist/src/services/headless-worker-executor.js.map +1 -1
  360. package/dist/src/services/index.d.ts +5 -5
  361. package/dist/src/services/index.d.ts.map +1 -1
  362. package/dist/src/services/index.js +4 -4
  363. package/dist/src/services/index.js.map +1 -1
  364. package/dist/src/services/registry-api.js +201 -93
  365. package/dist/src/services/registry-api.js.map +1 -1
  366. package/dist/src/services/ruvector-training.js +414 -144
  367. package/dist/src/services/ruvector-training.js.map +1 -1
  368. package/dist/src/services/worker-daemon.js +928 -531
  369. package/dist/src/services/worker-daemon.js.map +1 -1
  370. package/dist/src/services/worker-queue.js +550 -331
  371. package/dist/src/services/worker-queue.js.map +1 -1
  372. package/dist/src/suggest.js +55 -45
  373. package/dist/src/suggest.js.map +1 -1
  374. package/dist/src/transfer/anonymization/index.js +37 -29
  375. package/dist/src/transfer/anonymization/index.js.map +1 -1
  376. package/dist/src/transfer/deploy-seraphine.d.ts +1 -1
  377. package/dist/src/transfer/deploy-seraphine.js +156 -129
  378. package/dist/src/transfer/deploy-seraphine.js.map +1 -1
  379. package/dist/src/transfer/export.js +142 -84
  380. package/dist/src/transfer/export.js.map +1 -1
  381. package/dist/src/transfer/index.d.ts +1 -1
  382. package/dist/src/transfer/index.d.ts.map +1 -1
  383. package/dist/src/transfer/index.js +2 -0
  384. package/dist/src/transfer/index.js.map +1 -1
  385. package/dist/src/transfer/ipfs/client.js +337 -179
  386. package/dist/src/transfer/ipfs/client.js.map +1 -1
  387. package/dist/src/transfer/ipfs/upload.js +434 -290
  388. package/dist/src/transfer/ipfs/upload.js.map +1 -1
  389. package/dist/src/transfer/models/seraphine.js +58 -58
  390. package/dist/src/transfer/models/seraphine.js.map +1 -1
  391. package/dist/src/transfer/serialization/cfp.js +37 -33
  392. package/dist/src/transfer/serialization/cfp.js.map +1 -1
  393. package/dist/src/transfer/storage/gcs.js +248 -139
  394. package/dist/src/transfer/storage/gcs.js.map +1 -1
  395. package/dist/src/transfer/store/discovery.js +353 -243
  396. package/dist/src/transfer/store/discovery.js.map +1 -1
  397. package/dist/src/transfer/store/download.js +365 -243
  398. package/dist/src/transfer/store/download.js.map +1 -1
  399. package/dist/src/transfer/store/index.js +130 -63
  400. package/dist/src/transfer/store/index.js.map +1 -1
  401. package/dist/src/transfer/store/publish.js +258 -184
  402. package/dist/src/transfer/store/publish.js.map +1 -1
  403. package/dist/src/transfer/store/registry.js +73 -51
  404. package/dist/src/transfer/store/registry.js.map +1 -1
  405. package/dist/src/transfer/store/search.js +96 -64
  406. package/dist/src/transfer/store/search.js.map +1 -1
  407. package/dist/src/transfer/store/tests/standalone-test.js +231 -174
  408. package/dist/src/transfer/store/tests/standalone-test.js.map +1 -1
  409. package/dist/src/transfer/test-seraphine.js +130 -95
  410. package/dist/src/transfer/test-seraphine.js.map +1 -1
  411. package/dist/src/transfer/tests/test-store.js +239 -194
  412. package/dist/src/transfer/tests/test-store.js.map +1 -1
  413. package/dist/src/types.js +56 -27
  414. package/dist/src/types.js.map +1 -1
  415. package/dist/src/update/checker.js +183 -106
  416. package/dist/src/update/checker.js.map +1 -1
  417. package/dist/src/update/executor.js +198 -135
  418. package/dist/src/update/executor.js.map +1 -1
  419. package/dist/src/update/index.js +85 -38
  420. package/dist/src/update/index.js.map +1 -1
  421. package/dist/src/update/rate-limiter.js +31 -19
  422. package/dist/src/update/rate-limiter.js.map +1 -1
  423. package/dist/src/update/validator.js +64 -38
  424. package/dist/src/update/validator.js.map +1 -1
  425. package/dist/tsconfig.tsbuildinfo +1 -1
  426. package/package.json +13 -10
  427. package/.claude/agents/custom/accessibility-auditor.yaml +0 -56
  428. package/.claude/agents/custom/design-architect.yaml +0 -48
  429. package/.claude/agents/custom/ui-developer.yaml +0 -46
  430. package/.claude/agents/custom/ux-researcher.yaml +0 -60
  431. package/dist/src/benchmarks/pretrain/index.d.ts +0 -58
  432. package/dist/src/benchmarks/pretrain/index.d.ts.map +0 -1
  433. package/dist/src/commands/index.d.ts +0 -108
  434. package/dist/src/commands/index.d.ts.map +0 -1
  435. package/dist/src/config-adapter.d.ts +0 -15
  436. package/dist/src/config-adapter.d.ts.map +0 -1
  437. package/dist/src/index.d.ts +0 -76
  438. package/dist/src/index.d.ts.map +0 -1
  439. package/dist/src/infrastructure/in-memory-repositories.d.ts +0 -68
  440. package/dist/src/infrastructure/in-memory-repositories.d.ts.map +0 -1
  441. package/dist/src/init/claudemd-generator.d.ts +0 -25
  442. package/dist/src/init/claudemd-generator.d.ts.map +0 -1
  443. package/dist/src/init/executor.d.ts +0 -41
  444. package/dist/src/init/executor.d.ts.map +0 -1
  445. package/dist/src/init/helpers-generator.d.ts +0 -60
  446. package/dist/src/init/helpers-generator.d.ts.map +0 -1
  447. package/dist/src/mcp-client.d.ts +0 -92
  448. package/dist/src/mcp-client.d.ts.map +0 -1
  449. package/dist/src/mcp-server.d.ts +0 -161
  450. package/dist/src/mcp-server.d.ts.map +0 -1
  451. package/dist/src/mcp-tools/auto-install.d.ts +0 -83
  452. package/dist/src/mcp-tools/auto-install.d.ts.map +0 -1
  453. package/dist/src/mcp-tools/types.d.ts +0 -31
  454. package/dist/src/mcp-tools/types.d.ts.map +0 -1
  455. package/dist/src/memory/ewc-consolidation.d.ts +0 -271
  456. package/dist/src/memory/ewc-consolidation.d.ts.map +0 -1
  457. package/dist/src/memory/intelligence.d.ts +0 -285
  458. package/dist/src/memory/intelligence.d.ts.map +0 -1
  459. package/dist/src/memory/memory-initializer.d.ts +0 -396
  460. package/dist/src/memory/memory-initializer.d.ts.map +0 -1
  461. package/dist/src/memory/sona-optimizer.d.ts +0 -227
  462. package/dist/src/memory/sona-optimizer.d.ts.map +0 -1
  463. package/dist/src/parser.d.ts +0 -41
  464. package/dist/src/parser.d.ts.map +0 -1
  465. package/dist/src/plugins/manager.d.ts +0 -133
  466. package/dist/src/plugins/manager.d.ts.map +0 -1
  467. package/dist/src/plugins/store/discovery.d.ts +0 -88
  468. package/dist/src/plugins/store/discovery.d.ts.map +0 -1
  469. package/dist/src/plugins/store/index.d.ts +0 -76
  470. package/dist/src/plugins/store/index.d.ts.map +0 -1
  471. package/dist/src/plugins/store/search.d.ts +0 -46
  472. package/dist/src/plugins/store/search.d.ts.map +0 -1
  473. package/dist/src/plugins/store/types.d.ts +0 -274
  474. package/dist/src/plugins/store/types.d.ts.map +0 -1
  475. package/dist/src/production/circuit-breaker.d.ts +0 -101
  476. package/dist/src/production/circuit-breaker.d.ts.map +0 -1
  477. package/dist/src/production/error-handler.d.ts +0 -92
  478. package/dist/src/production/error-handler.d.ts.map +0 -1
  479. package/dist/src/production/monitoring.d.ts +0 -161
  480. package/dist/src/production/monitoring.d.ts.map +0 -1
  481. package/dist/src/production/rate-limiter.d.ts +0 -80
  482. package/dist/src/production/rate-limiter.d.ts.map +0 -1
  483. package/dist/src/production/retry.d.ts +0 -48
  484. package/dist/src/production/retry.d.ts.map +0 -1
  485. package/dist/src/prompt.d.ts +0 -44
  486. package/dist/src/prompt.d.ts.map +0 -1
  487. package/dist/src/runtime/headless.d.ts +0 -60
  488. package/dist/src/runtime/headless.d.ts.map +0 -1
  489. package/dist/src/ruvector/ast-analyzer.d.ts +0 -67
  490. package/dist/src/ruvector/ast-analyzer.d.ts.map +0 -1
  491. package/dist/src/ruvector/coverage-router.d.ts +0 -160
  492. package/dist/src/ruvector/coverage-router.d.ts.map +0 -1
  493. package/dist/src/ruvector/diff-classifier.d.ts +0 -175
  494. package/dist/src/ruvector/diff-classifier.d.ts.map +0 -1
  495. package/dist/src/ruvector/enhanced-model-router.d.ts +0 -146
  496. package/dist/src/ruvector/enhanced-model-router.d.ts.map +0 -1
  497. package/dist/src/ruvector/flash-attention.d.ts +0 -195
  498. package/dist/src/ruvector/flash-attention.d.ts.map +0 -1
  499. package/dist/src/ruvector/graph-analyzer.d.ts +0 -187
  500. package/dist/src/ruvector/graph-analyzer.d.ts.map +0 -1
  501. package/dist/src/ruvector/index.d.ts +0 -34
  502. package/dist/src/ruvector/index.d.ts.map +0 -1
  503. package/dist/src/ruvector/lora-adapter.d.ts +0 -218
  504. package/dist/src/ruvector/lora-adapter.d.ts.map +0 -1
  505. package/dist/src/ruvector/model-router.d.ts +0 -220
  506. package/dist/src/ruvector/model-router.d.ts.map +0 -1
  507. package/dist/src/ruvector/moe-router.d.ts +0 -206
  508. package/dist/src/ruvector/moe-router.d.ts.map +0 -1
  509. package/dist/src/ruvector/q-learning-router.d.ts +0 -211
  510. package/dist/src/ruvector/q-learning-router.d.ts.map +0 -1
  511. package/dist/src/ruvector/semantic-router.d.ts +0 -77
  512. package/dist/src/ruvector/semantic-router.d.ts.map +0 -1
  513. package/dist/src/ruvector/vector-db.d.ts +0 -69
  514. package/dist/src/ruvector/vector-db.d.ts.map +0 -1
  515. package/dist/src/services/claim-service.d.ts +0 -204
  516. package/dist/src/services/claim-service.d.ts.map +0 -1
  517. package/dist/src/services/container-worker-pool.d.ts +0 -197
  518. package/dist/src/services/container-worker-pool.d.ts.map +0 -1
  519. package/dist/src/services/headless-worker-executor.d.ts +0 -304
  520. package/dist/src/services/headless-worker-executor.d.ts.map +0 -1
  521. package/dist/src/services/registry-api.d.ts +0 -58
  522. package/dist/src/services/registry-api.d.ts.map +0 -1
  523. package/dist/src/services/ruvector-training.d.ts +0 -213
  524. package/dist/src/services/ruvector-training.d.ts.map +0 -1
  525. package/dist/src/services/worker-daemon.d.ts +0 -203
  526. package/dist/src/services/worker-daemon.d.ts.map +0 -1
  527. package/dist/src/services/worker-queue.d.ts +0 -194
  528. package/dist/src/services/worker-queue.d.ts.map +0 -1
  529. package/dist/src/suggest.d.ts +0 -53
  530. package/dist/src/suggest.d.ts.map +0 -1
  531. package/dist/src/transfer/export.d.ts +0 -25
  532. package/dist/src/transfer/export.d.ts.map +0 -1
  533. package/dist/src/transfer/ipfs/client.d.ts +0 -109
  534. package/dist/src/transfer/ipfs/client.d.ts.map +0 -1
  535. package/dist/src/transfer/ipfs/upload.d.ts +0 -95
  536. package/dist/src/transfer/ipfs/upload.d.ts.map +0 -1
  537. package/dist/src/transfer/models/seraphine.d.ts +0 -72
  538. package/dist/src/transfer/models/seraphine.d.ts.map +0 -1
  539. package/dist/src/transfer/serialization/cfp.d.ts +0 -49
  540. package/dist/src/transfer/serialization/cfp.d.ts.map +0 -1
  541. package/dist/src/transfer/storage/gcs.d.ts +0 -82
  542. package/dist/src/transfer/storage/gcs.d.ts.map +0 -1
  543. package/dist/src/transfer/store/discovery.d.ts +0 -84
  544. package/dist/src/transfer/store/discovery.d.ts.map +0 -1
  545. package/dist/src/transfer/store/download.d.ts +0 -70
  546. package/dist/src/transfer/store/download.d.ts.map +0 -1
  547. package/dist/src/transfer/store/index.d.ts +0 -84
  548. package/dist/src/transfer/store/index.d.ts.map +0 -1
  549. package/dist/src/transfer/store/publish.d.ts +0 -76
  550. package/dist/src/transfer/store/publish.d.ts.map +0 -1
  551. package/dist/src/transfer/store/search.d.ts +0 -54
  552. package/dist/src/transfer/store/search.d.ts.map +0 -1
  553. package/dist/src/transfer/types.d.ts +0 -245
  554. package/dist/src/transfer/types.d.ts.map +0 -1
  555. package/dist/src/types.d.ts +0 -198
  556. package/dist/src/types.d.ts.map +0 -1
  557. package/dist/src/update/checker.d.ts +0 -34
  558. package/dist/src/update/checker.d.ts.map +0 -1
  559. package/dist/src/update/executor.d.ts +0 -32
  560. package/dist/src/update/executor.d.ts.map +0 -1
  561. package/dist/src/update/index.d.ts +0 -33
  562. package/dist/src/update/index.d.ts.map +0 -1
  563. package/dist/src/update/rate-limiter.d.ts +0 -20
  564. package/dist/src/update/rate-limiter.d.ts.map +0 -1
  565. package/dist/src/update/validator.d.ts +0 -17
  566. package/dist/src/update/validator.d.ts.map +0 -1
@@ -2,10 +2,19 @@
2
2
  * V3 CLI Output Formatter
3
3
  * Advanced output formatting with tables, progress bars, and colors
4
4
  */
5
+ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
6
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
7
+ if (ar || !(i in from)) {
8
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
9
+ ar[i] = from[i];
10
+ }
11
+ }
12
+ return to.concat(ar || Array.prototype.slice.call(from));
13
+ };
5
14
  // ============================================
6
15
  // Color Support
7
16
  // ============================================
8
- const COLORS = {
17
+ var COLORS = {
9
18
  // Standard colors
10
19
  reset: '\x1b[0m',
11
20
  bold: '\x1b[1m',
@@ -40,16 +49,14 @@ const COLORS = {
40
49
  bgCyan: '\x1b[46m',
41
50
  bgWhite: '\x1b[47m'
42
51
  };
43
- export class OutputFormatter {
44
- colorEnabled;
45
- outputStream;
46
- errorStream;
47
- verbosity;
48
- constructor(options = {}) {
49
- this.colorEnabled = options.color ?? this.supportsColor();
52
+ var OutputFormatter = /** @class */ (function () {
53
+ function OutputFormatter(options) {
54
+ if (options === void 0) { options = {}; }
55
+ var _a, _b;
56
+ this.colorEnabled = (_a = options.color) !== null && _a !== void 0 ? _a : this.supportsColor();
50
57
  this.outputStream = process.stdout;
51
58
  this.errorStream = process.stderr;
52
- this.verbosity = options.verbosity ?? 'normal';
59
+ this.verbosity = (_b = options.verbosity) !== null && _b !== void 0 ? _b : 'normal';
53
60
  }
54
61
  /**
55
62
  * Set verbosity level
@@ -58,22 +65,23 @@ export class OutputFormatter {
58
65
  * - verbose: All of normal + debug messages
59
66
  * - debug: All output including trace
60
67
  */
61
- setVerbosity(level) {
68
+ OutputFormatter.prototype.setVerbosity = function (level) {
62
69
  this.verbosity = level;
63
- }
64
- getVerbosity() {
70
+ };
71
+ OutputFormatter.prototype.getVerbosity = function () {
65
72
  return this.verbosity;
66
- }
67
- isQuiet() {
73
+ };
74
+ OutputFormatter.prototype.isQuiet = function () {
68
75
  return this.verbosity === 'quiet';
69
- }
70
- isVerbose() {
76
+ };
77
+ OutputFormatter.prototype.isVerbose = function () {
71
78
  return this.verbosity === 'verbose' || this.verbosity === 'debug';
72
- }
73
- isDebug() {
79
+ };
80
+ OutputFormatter.prototype.isDebug = function () {
74
81
  return this.verbosity === 'debug';
75
- }
76
- supportsColor() {
82
+ };
83
+ OutputFormatter.prototype.supportsColor = function () {
84
+ var _a;
77
85
  // Check for NO_COLOR environment variable
78
86
  if (process.env.NO_COLOR !== undefined)
79
87
  return false;
@@ -81,108 +89,115 @@ export class OutputFormatter {
81
89
  if (process.env.FORCE_COLOR !== undefined)
82
90
  return true;
83
91
  // Check if stdout is a TTY
84
- return process.stdout.isTTY ?? false;
85
- }
92
+ return (_a = process.stdout.isTTY) !== null && _a !== void 0 ? _a : false;
93
+ };
86
94
  // ============================================
87
95
  // Color Methods
88
96
  // ============================================
89
- color(text, ...colors) {
97
+ OutputFormatter.prototype.color = function (text) {
98
+ var colors = [];
99
+ for (var _i = 1; _i < arguments.length; _i++) {
100
+ colors[_i - 1] = arguments[_i];
101
+ }
90
102
  if (!this.colorEnabled)
91
103
  return text;
92
- const codes = colors.map(c => COLORS[c]).join('');
93
- return `${codes}${text}${COLORS.reset}`;
94
- }
95
- bold(text) {
104
+ var codes = colors.map(function (c) { return COLORS[c]; }).join('');
105
+ return "" + codes + text + COLORS.reset;
106
+ };
107
+ OutputFormatter.prototype.bold = function (text) {
96
108
  return this.color(text, 'bold');
97
- }
98
- dim(text) {
109
+ };
110
+ OutputFormatter.prototype.dim = function (text) {
99
111
  return this.color(text, 'dim');
100
- }
101
- success(text) {
112
+ };
113
+ OutputFormatter.prototype.success = function (text) {
102
114
  return this.color(text, 'green');
103
- }
104
- error(text) {
115
+ };
116
+ OutputFormatter.prototype.error = function (text) {
105
117
  return this.color(text, 'red');
106
- }
107
- warning(text) {
118
+ };
119
+ OutputFormatter.prototype.warning = function (text) {
108
120
  return this.color(text, 'yellow');
109
- }
110
- info(text) {
121
+ };
122
+ OutputFormatter.prototype.info = function (text) {
111
123
  return this.color(text, 'blue');
112
- }
113
- highlight(text) {
124
+ };
125
+ OutputFormatter.prototype.highlight = function (text) {
114
126
  return this.color(text, 'cyan', 'bold');
115
- }
127
+ };
116
128
  // ============================================
117
129
  // Output Methods
118
130
  // ============================================
119
- write(text) {
131
+ OutputFormatter.prototype.write = function (text) {
120
132
  this.outputStream.write(text);
121
- }
122
- writeln(text = '') {
133
+ };
134
+ OutputFormatter.prototype.writeln = function (text) {
135
+ if (text === void 0) { text = ''; }
123
136
  this.outputStream.write(text + '\n');
124
- }
125
- writeError(text) {
137
+ };
138
+ OutputFormatter.prototype.writeError = function (text) {
126
139
  this.errorStream.write(text);
127
- }
128
- writeErrorln(text = '') {
140
+ };
141
+ OutputFormatter.prototype.writeErrorln = function (text) {
142
+ if (text === void 0) { text = ''; }
129
143
  this.errorStream.write(text + '\n');
130
- }
144
+ };
131
145
  // ============================================
132
146
  // Formatted Output Methods
133
147
  // ============================================
134
- printSuccess(message) {
148
+ OutputFormatter.prototype.printSuccess = function (message) {
135
149
  // Success always shows (result output)
136
- const icon = this.color('[OK]', 'green', 'bold');
137
- this.writeln(`${icon} ${message}`);
138
- }
139
- printError(message, details) {
150
+ var icon = this.color('[OK]', 'green', 'bold');
151
+ this.writeln(icon + " " + message);
152
+ };
153
+ OutputFormatter.prototype.printError = function (message, details) {
140
154
  // Errors always show
141
- const icon = this.color('[ERROR]', 'red', 'bold');
142
- this.writeErrorln(`${icon} ${message}`);
155
+ var icon = this.color('[ERROR]', 'red', 'bold');
156
+ this.writeErrorln(icon + " " + message);
143
157
  if (details) {
144
- this.writeErrorln(this.dim(` ${details}`));
158
+ this.writeErrorln(this.dim(" " + details));
145
159
  }
146
- }
147
- printWarning(message) {
160
+ };
161
+ OutputFormatter.prototype.printWarning = function (message) {
148
162
  // Warnings suppressed in quiet mode
149
163
  if (this.verbosity === 'quiet')
150
164
  return;
151
- const icon = this.color('[WARN]', 'yellow', 'bold');
152
- this.writeln(`${icon} ${message}`);
153
- }
154
- printInfo(message) {
165
+ var icon = this.color('[WARN]', 'yellow', 'bold');
166
+ this.writeln(icon + " " + message);
167
+ };
168
+ OutputFormatter.prototype.printInfo = function (message) {
155
169
  // Info suppressed in quiet mode
156
170
  if (this.verbosity === 'quiet')
157
171
  return;
158
- const icon = this.color('[INFO]', 'blue', 'bold');
159
- this.writeln(`${icon} ${message}`);
160
- }
161
- printDebug(message) {
172
+ var icon = this.color('[INFO]', 'blue', 'bold');
173
+ this.writeln(icon + " " + message);
174
+ };
175
+ OutputFormatter.prototype.printDebug = function (message) {
162
176
  // Debug only shows in verbose/debug mode
163
177
  if (this.verbosity !== 'verbose' && this.verbosity !== 'debug')
164
178
  return;
165
- const icon = this.color('[DEBUG]', 'gray');
166
- this.writeln(`${icon} ${this.dim(message)}`);
167
- }
168
- printTrace(message) {
179
+ var icon = this.color('[DEBUG]', 'gray');
180
+ this.writeln(icon + " " + this.dim(message));
181
+ };
182
+ OutputFormatter.prototype.printTrace = function (message) {
169
183
  // Trace only shows in debug mode
170
184
  if (this.verbosity !== 'debug')
171
185
  return;
172
- const icon = this.color('[TRACE]', 'gray', 'dim');
173
- this.writeln(`${icon} ${this.dim(message)}`);
174
- }
186
+ var icon = this.color('[TRACE]', 'gray', 'dim');
187
+ this.writeln(icon + " " + this.dim(message));
188
+ };
175
189
  // ============================================
176
190
  // Table Formatting
177
191
  // ============================================
178
- table(options) {
179
- const { columns, data, border = true, header = true, padding = 1, maxWidth } = options;
192
+ OutputFormatter.prototype.table = function (options) {
193
+ var _this = this;
194
+ var columns = options.columns, data = options.data, _a = options.border, border = _a === void 0 ? true : _a, _b = options.header, header = _b === void 0 ? true : _b, _c = options.padding, padding = _c === void 0 ? 1 : _c, maxWidth = options.maxWidth;
180
195
  // Calculate column widths
181
- const widths = this.calculateColumnWidths(columns, data, maxWidth);
182
- const lines = [];
183
- const pad = ' '.repeat(padding);
196
+ var widths = this.calculateColumnWidths(columns, data, maxWidth);
197
+ var lines = [];
198
+ var pad = ' '.repeat(padding);
184
199
  // Border characters
185
- const borderChars = border ? {
200
+ var borderChars = border ? {
186
201
  topLeft: '+', topRight: '+', bottomLeft: '+', bottomRight: '+',
187
202
  horizontal: '-', vertical: '|',
188
203
  leftT: '+', rightT: '+', topT: '+', bottomT: '+', cross: '+'
@@ -197,52 +212,58 @@ export class OutputFormatter {
197
212
  }
198
213
  // Header row
199
214
  if (header) {
200
- const headerRow = columns.map((col, i) => {
201
- const text = this.truncate(col.header, widths[i]);
202
- return pad + this.alignText(this.bold(text), widths[i], col.align) + pad;
215
+ var headerRow = columns.map(function (col, i) {
216
+ var text = _this.truncate(col.header, widths[i]);
217
+ return pad + _this.alignText(_this.bold(text), widths[i], col.align) + pad;
203
218
  }).join(borderChars.vertical);
204
- lines.push(`${borderChars.vertical}${headerRow}${borderChars.vertical}`);
219
+ lines.push("" + borderChars.vertical + headerRow + borderChars.vertical);
205
220
  // Header separator
206
221
  if (border) {
207
222
  lines.push(this.createBorderLine(widths, borderChars, 'middle', padding));
208
223
  }
209
224
  }
210
- // Data rows
211
- for (const row of data) {
212
- const rowCells = columns.map((col, i) => {
213
- let value = row[col.key];
225
+ var _loop_1 = function (row) {
226
+ var rowCells = columns.map(function (col, i) {
227
+ var value = row[col.key];
214
228
  // Apply formatter if provided
215
229
  if (col.format) {
216
230
  value = col.format(value);
217
231
  }
218
232
  else {
219
- value = String(value ?? '');
233
+ value = String(value !== null && value !== void 0 ? value : '');
220
234
  }
221
- const text = this.truncate(String(value), widths[i]);
222
- return pad + this.alignText(text, widths[i], col.align) + pad;
235
+ var text = _this.truncate(String(value), widths[i]);
236
+ return pad + _this.alignText(text, widths[i], col.align) + pad;
223
237
  }).join(borderChars.vertical);
224
- lines.push(`${borderChars.vertical}${rowCells}${borderChars.vertical}`);
238
+ lines.push("" + borderChars.vertical + rowCells + borderChars.vertical);
239
+ };
240
+ // Data rows
241
+ for (var _i = 0, data_1 = data; _i < data_1.length; _i++) {
242
+ var row = data_1[_i];
243
+ _loop_1(row);
225
244
  }
226
245
  // Bottom border
227
246
  if (border) {
228
247
  lines.push(this.createBorderLine(widths, borderChars, 'bottom', padding));
229
248
  }
230
249
  return lines.join('\n');
231
- }
232
- printTable(options) {
250
+ };
251
+ OutputFormatter.prototype.printTable = function (options) {
233
252
  this.writeln(this.table(options));
234
- }
235
- calculateColumnWidths(columns, data, maxWidth) {
236
- const widths = columns.map((col, i) => {
253
+ };
254
+ OutputFormatter.prototype.calculateColumnWidths = function (columns, data, maxWidth) {
255
+ var _this = this;
256
+ var widths = columns.map(function (col, i) {
237
257
  // Start with header width
238
- let width = col.header.length;
258
+ var width = col.header.length;
239
259
  // Check all data values
240
- for (const row of data) {
241
- let value = row[col.key];
260
+ for (var _i = 0, data_2 = data; _i < data_2.length; _i++) {
261
+ var row = data_2[_i];
262
+ var value = row[col.key];
242
263
  if (col.format) {
243
264
  value = col.format(value);
244
265
  }
245
- const len = this.stripAnsi(String(value ?? '')).length;
266
+ var len = _this.stripAnsi(String(value !== null && value !== void 0 ? value : '')).length;
246
267
  width = Math.max(width, len);
247
268
  }
248
269
  // Apply column-specific width limit
@@ -253,110 +274,118 @@ export class OutputFormatter {
253
274
  });
254
275
  // Apply max width constraint
255
276
  if (maxWidth) {
256
- const totalWidth = widths.reduce((a, b) => a + b, 0) + (columns.length * 3) + 1;
277
+ var totalWidth = widths.reduce(function (a, b) { return a + b; }, 0) + (columns.length * 3) + 1;
257
278
  if (totalWidth > maxWidth) {
258
- const reduction = (totalWidth - maxWidth) / columns.length;
259
- return widths.map(w => Math.max(3, Math.floor(w - reduction)));
279
+ var reduction_1 = (totalWidth - maxWidth) / columns.length;
280
+ return widths.map(function (w) { return Math.max(3, Math.floor(w - reduction_1)); });
260
281
  }
261
282
  }
262
283
  return widths;
263
- }
264
- createBorderLine(widths, chars, position, padding) {
265
- const cellWidth = (w) => chars.horizontal.repeat(w + (padding * 2));
266
- const cells = widths.map(cellWidth).join(position === 'top' ? chars.topT :
284
+ };
285
+ OutputFormatter.prototype.createBorderLine = function (widths, chars, position, padding) {
286
+ var cellWidth = function (w) { return chars.horizontal.repeat(w + (padding * 2)); };
287
+ var cells = widths.map(cellWidth).join(position === 'top' ? chars.topT :
267
288
  position === 'bottom' ? chars.bottomT :
268
289
  chars.cross);
269
- const left = position === 'top' ? chars.topLeft : position === 'bottom' ? chars.bottomLeft : chars.leftT;
270
- const right = position === 'top' ? chars.topRight : position === 'bottom' ? chars.bottomRight : chars.rightT;
271
- return `${left}${cells}${right}`;
272
- }
273
- alignText(text, width, align = 'left') {
274
- const len = this.stripAnsi(text).length;
275
- const padding = width - len;
290
+ var left = position === 'top' ? chars.topLeft : position === 'bottom' ? chars.bottomLeft : chars.leftT;
291
+ var right = position === 'top' ? chars.topRight : position === 'bottom' ? chars.bottomRight : chars.rightT;
292
+ return "" + left + cells + right;
293
+ };
294
+ OutputFormatter.prototype.alignText = function (text, width, align) {
295
+ if (align === void 0) { align = 'left'; }
296
+ var len = this.stripAnsi(text).length;
297
+ var padding = width - len;
276
298
  if (padding <= 0)
277
299
  return text;
278
300
  switch (align) {
279
301
  case 'right':
280
302
  return ' '.repeat(padding) + text;
281
303
  case 'center':
282
- const left = Math.floor(padding / 2);
283
- const right = padding - left;
304
+ var left = Math.floor(padding / 2);
305
+ var right = padding - left;
284
306
  return ' '.repeat(left) + text + ' '.repeat(right);
285
307
  default:
286
308
  return text + ' '.repeat(padding);
287
309
  }
288
- }
289
- truncate(text, maxLength) {
290
- const stripped = this.stripAnsi(text);
310
+ };
311
+ OutputFormatter.prototype.truncate = function (text, maxLength) {
312
+ var stripped = this.stripAnsi(text);
291
313
  if (stripped.length <= maxLength)
292
314
  return text;
293
315
  return stripped.slice(0, maxLength - 3) + '...';
294
- }
295
- stripAnsi(text) {
316
+ };
317
+ OutputFormatter.prototype.stripAnsi = function (text) {
296
318
  return text.replace(/\x1b\[[0-9;]*m/g, '');
297
- }
319
+ };
298
320
  // ============================================
299
321
  // Progress Bar
300
322
  // ============================================
301
- createProgress(options) {
323
+ OutputFormatter.prototype.createProgress = function (options) {
302
324
  return new Progress(this, options);
303
- }
304
- progressBar(current, total, width = 40) {
305
- const percent = Math.min(100, Math.max(0, (current / total) * 100));
306
- const filled = Math.round((width * percent) / 100);
307
- const empty = width - filled;
308
- const bar = this.color('#'.repeat(filled), 'green') +
325
+ };
326
+ OutputFormatter.prototype.progressBar = function (current, total, width) {
327
+ if (width === void 0) { width = 40; }
328
+ var percent = Math.min(100, Math.max(0, (current / total) * 100));
329
+ var filled = Math.round((width * percent) / 100);
330
+ var empty = width - filled;
331
+ var bar = this.color('#'.repeat(filled), 'green') +
309
332
  this.dim('-'.repeat(empty));
310
- return `[${bar}] ${percent.toFixed(1)}%`;
311
- }
333
+ return "[" + bar + "] " + percent.toFixed(1) + "%";
334
+ };
312
335
  // ============================================
313
336
  // Spinner
314
337
  // ============================================
315
- createSpinner(options) {
338
+ OutputFormatter.prototype.createSpinner = function (options) {
316
339
  return new Spinner(this, options);
317
- }
340
+ };
318
341
  // ============================================
319
342
  // JSON Output
320
343
  // ============================================
321
- json(data, pretty = true) {
344
+ OutputFormatter.prototype.json = function (data, pretty) {
345
+ if (pretty === void 0) { pretty = true; }
322
346
  return pretty ? JSON.stringify(data, null, 2) : JSON.stringify(data);
323
- }
324
- printJson(data, pretty = true) {
347
+ };
348
+ OutputFormatter.prototype.printJson = function (data, pretty) {
349
+ if (pretty === void 0) { pretty = true; }
325
350
  this.writeln(this.json(data, pretty));
326
- }
351
+ };
327
352
  // ============================================
328
353
  // List Output
329
354
  // ============================================
330
- list(items, bullet = '-') {
331
- return items.map(item => ` ${bullet} ${item}`).join('\n');
332
- }
333
- printList(items, bullet = '-') {
355
+ OutputFormatter.prototype.list = function (items, bullet) {
356
+ if (bullet === void 0) { bullet = '-'; }
357
+ return items.map(function (item) { return " " + bullet + " " + item; }).join('\n');
358
+ };
359
+ OutputFormatter.prototype.printList = function (items, bullet) {
360
+ if (bullet === void 0) { bullet = '-'; }
334
361
  this.writeln(this.list(items, bullet));
335
- }
336
- numberedList(items) {
337
- return items.map((item, i) => ` ${i + 1}. ${item}`).join('\n');
338
- }
339
- printNumberedList(items) {
362
+ };
363
+ OutputFormatter.prototype.numberedList = function (items) {
364
+ return items.map(function (item, i) { return " " + (i + 1) + ". " + item; }).join('\n');
365
+ };
366
+ OutputFormatter.prototype.printNumberedList = function (items) {
340
367
  this.writeln(this.numberedList(items));
341
- }
368
+ };
342
369
  // ============================================
343
370
  // Box Output
344
371
  // ============================================
345
- box(content, title) {
346
- const lines = content.split('\n');
347
- const maxLen = Math.max(...lines.map(l => this.stripAnsi(l).length), title?.length ?? 0);
348
- const width = maxLen + 4;
349
- const border = {
372
+ OutputFormatter.prototype.box = function (content, title) {
373
+ var _this = this;
374
+ var _a;
375
+ var lines = content.split('\n');
376
+ var maxLen = Math.max.apply(Math, __spreadArray(__spreadArray([], lines.map(function (l) { return _this.stripAnsi(l).length; }), false), [(_a = title === null || title === void 0 ? void 0 : title.length) !== null && _a !== void 0 ? _a : 0], false));
377
+ var width = maxLen + 4;
378
+ var border = {
350
379
  topLeft: '+', topRight: '+',
351
380
  bottomLeft: '+', bottomRight: '+',
352
381
  horizontal: '-', vertical: '|'
353
382
  };
354
- const result = [];
383
+ var result = [];
355
384
  // Top border with optional title
356
385
  if (title) {
357
- const titleText = ` ${title} `;
358
- const leftPad = Math.floor((width - titleText.length - 2) / 2);
359
- const rightPad = width - titleText.length - leftPad - 2;
386
+ var titleText = " " + title + " ";
387
+ var leftPad = Math.floor((width - titleText.length - 2) / 2);
388
+ var rightPad = width - titleText.length - leftPad - 2;
360
389
  result.push(border.topLeft +
361
390
  border.horizontal.repeat(leftPad) +
362
391
  this.bold(titleText) +
@@ -367,63 +396,61 @@ export class OutputFormatter {
367
396
  result.push(border.topLeft + border.horizontal.repeat(width - 2) + border.topRight);
368
397
  }
369
398
  // Content lines
370
- for (const line of lines) {
371
- const stripped = this.stripAnsi(line);
372
- const padding = maxLen - stripped.length;
373
- result.push(`${border.vertical} ${line}${' '.repeat(padding)} ${border.vertical}`);
399
+ for (var _i = 0, lines_1 = lines; _i < lines_1.length; _i++) {
400
+ var line = lines_1[_i];
401
+ var stripped = this.stripAnsi(line);
402
+ var padding = maxLen - stripped.length;
403
+ result.push(border.vertical + " " + line + ' '.repeat(padding) + " " + border.vertical);
374
404
  }
375
405
  // Bottom border
376
406
  result.push(border.bottomLeft + border.horizontal.repeat(width - 2) + border.bottomRight);
377
407
  return result.join('\n');
378
- }
379
- printBox(content, title) {
408
+ };
409
+ OutputFormatter.prototype.printBox = function (content, title) {
380
410
  this.writeln(this.box(content, title));
381
- }
382
- setColorEnabled(enabled) {
411
+ };
412
+ OutputFormatter.prototype.setColorEnabled = function (enabled) {
383
413
  this.colorEnabled = enabled;
384
- }
385
- isColorEnabled() {
414
+ };
415
+ OutputFormatter.prototype.isColorEnabled = function () {
386
416
  return this.colorEnabled;
387
- }
388
- }
417
+ };
418
+ return OutputFormatter;
419
+ }());
420
+ export { OutputFormatter };
389
421
  // ============================================
390
422
  // Progress Class
391
423
  // ============================================
392
- export class Progress {
393
- current;
394
- total;
395
- width;
396
- startTime;
397
- formatter;
398
- showPercentage;
399
- showETA;
400
- lastRender = '';
401
- constructor(formatter, options) {
424
+ var Progress = /** @class */ (function () {
425
+ function Progress(formatter, options) {
426
+ var _a, _b, _c, _d;
427
+ this.lastRender = '';
402
428
  this.formatter = formatter;
403
- this.current = options.current ?? 0;
429
+ this.current = (_a = options.current) !== null && _a !== void 0 ? _a : 0;
404
430
  this.total = options.total;
405
- this.width = options.width ?? 40;
406
- this.showPercentage = options.showPercentage ?? true;
407
- this.showETA = options.showETA ?? true;
431
+ this.width = (_b = options.width) !== null && _b !== void 0 ? _b : 40;
432
+ this.showPercentage = (_c = options.showPercentage) !== null && _c !== void 0 ? _c : true;
433
+ this.showETA = (_d = options.showETA) !== null && _d !== void 0 ? _d : true;
408
434
  this.startTime = Date.now();
409
435
  }
410
- update(current) {
436
+ Progress.prototype.update = function (current) {
411
437
  this.current = current;
412
438
  this.render();
413
- }
414
- increment(amount = 1) {
439
+ };
440
+ Progress.prototype.increment = function (amount) {
441
+ if (amount === void 0) { amount = 1; }
415
442
  this.update(this.current + amount);
416
- }
417
- render() {
418
- const bar = this.formatter.progressBar(this.current, this.total, this.width);
419
- let output = bar;
443
+ };
444
+ Progress.prototype.render = function () {
445
+ var bar = this.formatter.progressBar(this.current, this.total, this.width);
446
+ var output = bar;
420
447
  if (this.showETA && this.current > 0) {
421
- const elapsed = Date.now() - this.startTime;
422
- const rate = this.current / elapsed;
423
- const remaining = this.total - this.current;
424
- const eta = remaining / rate;
448
+ var elapsed = Date.now() - this.startTime;
449
+ var rate = this.current / elapsed;
450
+ var remaining = this.total - this.current;
451
+ var eta = remaining / rate;
425
452
  if (isFinite(eta)) {
426
- output += ` ETA: ${this.formatTime(eta)}`;
453
+ output += " ETA: " + this.formatTime(eta);
427
454
  }
428
455
  }
429
456
  // Clear previous line and write new
@@ -432,58 +459,53 @@ export class Progress {
432
459
  }
433
460
  process.stdout.write(output);
434
461
  this.lastRender = output;
435
- }
436
- finish() {
462
+ };
463
+ Progress.prototype.finish = function () {
437
464
  this.current = this.total;
438
465
  this.render();
439
466
  process.stdout.write('\n');
440
- }
441
- formatTime(ms) {
442
- const seconds = Math.floor(ms / 1000);
443
- const minutes = Math.floor(seconds / 60);
444
- const hours = Math.floor(minutes / 60);
467
+ };
468
+ Progress.prototype.formatTime = function (ms) {
469
+ var seconds = Math.floor(ms / 1000);
470
+ var minutes = Math.floor(seconds / 60);
471
+ var hours = Math.floor(minutes / 60);
445
472
  if (hours > 0) {
446
- return `${hours}h ${minutes % 60}m`;
473
+ return hours + "h " + minutes % 60 + "m";
447
474
  }
448
475
  else if (minutes > 0) {
449
- return `${minutes}m ${seconds % 60}s`;
476
+ return minutes + "m " + seconds % 60 + "s";
450
477
  }
451
478
  else {
452
- return `${seconds}s`;
479
+ return seconds + "s";
453
480
  }
454
- }
455
- }
481
+ };
482
+ return Progress;
483
+ }());
484
+ export { Progress };
456
485
  // ============================================
457
486
  // Spinner Class
458
487
  // ============================================
459
- export class Spinner {
460
- formatter;
461
- text;
462
- frames;
463
- interval = null;
464
- frameIndex = 0;
465
- static SPINNERS = {
466
- dots: ['...', '..:', '.::', ':::', '::.', ':..',],
467
- line: ['-', '\\', '|', '/'],
468
- arc: ['◜', '◠', '◝', '◞', '◡', '◟'],
469
- circle: ['◐', '◓', '◑', '◒'],
470
- arrows: ['←', '↖', '↑', '↗', '→', '↘', '↓', '↙']
471
- };
472
- constructor(formatter, options) {
488
+ var Spinner = /** @class */ (function () {
489
+ function Spinner(formatter, options) {
490
+ var _a;
491
+ this.interval = null;
492
+ this.frameIndex = 0;
473
493
  this.formatter = formatter;
474
494
  this.text = options.text;
475
- this.frames = Spinner.SPINNERS[options.spinner ?? 'dots'];
495
+ this.frames = Spinner.SPINNERS[(_a = options.spinner) !== null && _a !== void 0 ? _a : 'dots'];
476
496
  }
477
- start() {
497
+ Spinner.prototype.start = function () {
498
+ var _this = this;
478
499
  if (this.interval)
479
500
  return;
480
- this.interval = setInterval(() => {
481
- this.render();
482
- this.frameIndex = (this.frameIndex + 1) % this.frames.length;
501
+ this.interval = setInterval(function () {
502
+ _this.render();
503
+ _this.frameIndex = (_this.frameIndex + 1) % _this.frames.length;
483
504
  }, 100);
505
+ this.interval.unref();
484
506
  this.render();
485
- }
486
- stop(message) {
507
+ };
508
+ Spinner.prototype.stop = function (message) {
487
509
  if (this.interval) {
488
510
  clearInterval(this.interval);
489
511
  this.interval = null;
@@ -493,21 +515,30 @@ export class Spinner {
493
515
  if (message) {
494
516
  this.formatter.writeln(message);
495
517
  }
496
- }
497
- succeed(message) {
498
- this.stop(this.formatter.success(message ?? this.text));
499
- }
500
- fail(message) {
501
- this.stop(this.formatter.error(message ?? this.text));
502
- }
503
- render() {
504
- const frame = this.formatter.info(this.frames[this.frameIndex]);
505
- process.stdout.write(`\r${frame} ${this.text}`);
506
- }
507
- setText(text) {
518
+ };
519
+ Spinner.prototype.succeed = function (message) {
520
+ this.stop(this.formatter.success(message !== null && message !== void 0 ? message : this.text));
521
+ };
522
+ Spinner.prototype.fail = function (message) {
523
+ this.stop(this.formatter.error(message !== null && message !== void 0 ? message : this.text));
524
+ };
525
+ Spinner.prototype.render = function () {
526
+ var frame = this.formatter.info(this.frames[this.frameIndex]);
527
+ process.stdout.write("\r" + frame + " " + this.text);
528
+ };
529
+ Spinner.prototype.setText = function (text) {
508
530
  this.text = text;
509
- }
510
- }
531
+ };
532
+ Spinner.SPINNERS = {
533
+ dots: ['...', '..:', '.::', ':::', '::.', ':..',],
534
+ line: ['-', '\\', '|', '/'],
535
+ arc: ['◜', '◠', '◝', '◞', '◡', '◟'],
536
+ circle: ['◐', '◓', '◑', '◒'],
537
+ arrows: ['←', '↖', '↑', '↗', '→', '↘', '↓', '↙']
538
+ };
539
+ return Spinner;
540
+ }());
541
+ export { Spinner };
511
542
  // Export singleton instance
512
- export const output = new OutputFormatter();
543
+ export var output = new OutputFormatter();
513
544
  //# sourceMappingURL=output.js.map