agentdb 1.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 (361) hide show
  1. package/LICENSE +38 -0
  2. package/LICENSE-APACHE +190 -0
  3. package/LICENSE-MIT +21 -0
  4. package/README.md +953 -0
  5. package/bin/agentdb.js +485 -0
  6. package/bin/plugin-cli-wrapper.mjs +21 -0
  7. package/dist/cache/query-cache.d.ts +105 -0
  8. package/dist/cache/query-cache.d.ts.map +1 -0
  9. package/dist/cache/query-cache.js +224 -0
  10. package/dist/cache/query-cache.js.map +1 -0
  11. package/dist/cache/query-cache.mjs +219 -0
  12. package/dist/cli/cache/query-cache.d.ts +104 -0
  13. package/dist/cli/cache/query-cache.js +244 -0
  14. package/dist/cli/cli/db-commands.d.ts +48 -0
  15. package/dist/cli/cli/db-commands.js +613 -0
  16. package/dist/cli/commands.d.ts +7 -0
  17. package/dist/cli/commands.d.ts.map +1 -0
  18. package/dist/cli/commands.js +113 -0
  19. package/dist/cli/commands.js.map +1 -0
  20. package/dist/cli/commands.mjs +104 -0
  21. package/dist/cli/core/backend-interface.d.ts +70 -0
  22. package/dist/cli/core/backend-interface.js +15 -0
  23. package/dist/cli/core/native-backend.d.ts +140 -0
  24. package/dist/cli/core/native-backend.js +432 -0
  25. package/dist/cli/core/vector-db.d.ts +126 -0
  26. package/dist/cli/core/vector-db.js +338 -0
  27. package/dist/cli/core/wasm-backend.d.ts +95 -0
  28. package/dist/cli/core/wasm-backend.js +418 -0
  29. package/dist/cli/db-commands.d.ts +49 -0
  30. package/dist/cli/db-commands.d.ts.map +1 -0
  31. package/dist/cli/db-commands.js +533 -0
  32. package/dist/cli/db-commands.js.map +1 -0
  33. package/dist/cli/db-commands.mjs +522 -0
  34. package/dist/cli/generator.d.ts +11 -0
  35. package/dist/cli/generator.d.ts.map +1 -0
  36. package/dist/cli/generator.js +567 -0
  37. package/dist/cli/generator.js.map +1 -0
  38. package/dist/cli/generator.mjs +527 -0
  39. package/dist/cli/help.d.ts +18 -0
  40. package/dist/cli/help.d.ts.map +1 -0
  41. package/dist/cli/help.js +676 -0
  42. package/dist/cli/help.js.map +1 -0
  43. package/dist/cli/help.mjs +667 -0
  44. package/dist/cli/index/hnsw.d.ts +164 -0
  45. package/dist/cli/index/hnsw.js +558 -0
  46. package/dist/cli/plugin-cli.d.ts +7 -0
  47. package/dist/cli/plugin-cli.d.ts.map +1 -0
  48. package/dist/cli/plugin-cli.js +295 -0
  49. package/dist/cli/plugin-cli.js.map +1 -0
  50. package/dist/cli/plugin-cli.mjs +289 -0
  51. package/dist/cli/quantization/product-quantization.d.ts +108 -0
  52. package/dist/cli/quantization/product-quantization.js +350 -0
  53. package/dist/cli/query/query-builder.d.ts +322 -0
  54. package/dist/cli/query/query-builder.js +600 -0
  55. package/dist/cli/templates.d.ts +14 -0
  56. package/dist/cli/templates.d.ts.map +1 -0
  57. package/dist/cli/templates.js +182 -0
  58. package/dist/cli/templates.js.map +1 -0
  59. package/dist/cli/templates.mjs +176 -0
  60. package/dist/cli/types/index.d.ts +116 -0
  61. package/dist/cli/types/index.js +5 -0
  62. package/dist/cli/types.d.ts +91 -0
  63. package/dist/cli/types.d.ts.map +1 -0
  64. package/dist/cli/types.js +6 -0
  65. package/dist/cli/types.js.map +1 -0
  66. package/dist/cli/types.mjs +4 -0
  67. package/dist/cli/wizard/index.d.ts +6 -0
  68. package/dist/cli/wizard/index.d.ts.map +1 -0
  69. package/dist/cli/wizard/index.js +138 -0
  70. package/dist/cli/wizard/index.js.map +1 -0
  71. package/dist/cli/wizard/index.mjs +131 -0
  72. package/dist/cli/wizard/prompts.d.ts +11 -0
  73. package/dist/cli/wizard/prompts.d.ts.map +1 -0
  74. package/dist/cli/wizard/prompts.js +482 -0
  75. package/dist/cli/wizard/prompts.js.map +1 -0
  76. package/dist/cli/wizard/prompts.mjs +470 -0
  77. package/dist/cli/wizard/validator.d.ts +13 -0
  78. package/dist/cli/wizard/validator.d.ts.map +1 -0
  79. package/dist/cli/wizard/validator.js +234 -0
  80. package/dist/cli/wizard/validator.js.map +1 -0
  81. package/dist/cli/wizard/validator.mjs +224 -0
  82. package/dist/core/backend-interface.d.ts +71 -0
  83. package/dist/core/backend-interface.d.ts.map +1 -0
  84. package/dist/core/backend-interface.js +16 -0
  85. package/dist/core/backend-interface.js.map +1 -0
  86. package/dist/core/backend-interface.mjs +12 -0
  87. package/dist/core/native-backend.d.ts +141 -0
  88. package/dist/core/native-backend.d.ts.map +1 -0
  89. package/dist/core/native-backend.js +457 -0
  90. package/dist/core/native-backend.js.map +1 -0
  91. package/dist/core/native-backend.mjs +449 -0
  92. package/dist/core/vector-db.d.ts +127 -0
  93. package/dist/core/vector-db.d.ts.map +1 -0
  94. package/dist/core/vector-db.js +266 -0
  95. package/dist/core/vector-db.js.map +1 -0
  96. package/dist/core/vector-db.mjs +261 -0
  97. package/dist/core/wasm-backend.d.ts +96 -0
  98. package/dist/core/wasm-backend.d.ts.map +1 -0
  99. package/dist/core/wasm-backend.js +393 -0
  100. package/dist/core/wasm-backend.js.map +1 -0
  101. package/dist/core/wasm-backend.mjs +385 -0
  102. package/dist/index/hnsw-optimized.d.ts +75 -0
  103. package/dist/index/hnsw-optimized.d.ts.map +1 -0
  104. package/dist/index/hnsw-optimized.js +412 -0
  105. package/dist/index/hnsw-optimized.js.map +1 -0
  106. package/dist/index/hnsw-optimized.mjs +407 -0
  107. package/dist/index/hnsw.d.ts +165 -0
  108. package/dist/index/hnsw.d.ts.map +1 -0
  109. package/dist/index/hnsw.js +521 -0
  110. package/dist/index/hnsw.js.map +1 -0
  111. package/dist/index/hnsw.mjs +516 -0
  112. package/dist/index.d.ts +57 -0
  113. package/dist/index.d.ts.map +1 -0
  114. package/dist/index.js +82 -0
  115. package/dist/index.js.map +1 -0
  116. package/dist/index.mjs +63 -0
  117. package/dist/mcp-server.d.ts +27 -0
  118. package/dist/mcp-server.d.ts.map +1 -0
  119. package/dist/mcp-server.js +789 -0
  120. package/dist/mcp-server.js.map +1 -0
  121. package/dist/mcp-server.mjs +784 -0
  122. package/dist/plugins/base-plugin.d.ts +114 -0
  123. package/dist/plugins/base-plugin.d.ts.map +1 -0
  124. package/dist/plugins/base-plugin.js +313 -0
  125. package/dist/plugins/base-plugin.js.map +1 -0
  126. package/dist/plugins/base-plugin.mjs +275 -0
  127. package/dist/plugins/implementations/active-learning.d.ts +135 -0
  128. package/dist/plugins/implementations/active-learning.d.ts.map +1 -0
  129. package/dist/plugins/implementations/active-learning.js +372 -0
  130. package/dist/plugins/implementations/active-learning.js.map +1 -0
  131. package/dist/plugins/implementations/active-learning.mjs +367 -0
  132. package/dist/plugins/implementations/actor-critic.d.ts +64 -0
  133. package/dist/plugins/implementations/actor-critic.d.ts.map +1 -0
  134. package/dist/plugins/implementations/actor-critic.js +363 -0
  135. package/dist/plugins/implementations/actor-critic.js.map +1 -0
  136. package/dist/plugins/implementations/actor-critic.mjs +358 -0
  137. package/dist/plugins/implementations/adversarial-training.d.ts +133 -0
  138. package/dist/plugins/implementations/adversarial-training.d.ts.map +1 -0
  139. package/dist/plugins/implementations/adversarial-training.js +409 -0
  140. package/dist/plugins/implementations/adversarial-training.js.map +1 -0
  141. package/dist/plugins/implementations/adversarial-training.mjs +404 -0
  142. package/dist/plugins/implementations/curriculum-learning.d.ts +132 -0
  143. package/dist/plugins/implementations/curriculum-learning.d.ts.map +1 -0
  144. package/dist/plugins/implementations/curriculum-learning.js +354 -0
  145. package/dist/plugins/implementations/curriculum-learning.js.map +1 -0
  146. package/dist/plugins/implementations/curriculum-learning.mjs +349 -0
  147. package/dist/plugins/implementations/decision-transformer.d.ts +77 -0
  148. package/dist/plugins/implementations/decision-transformer.d.ts.map +1 -0
  149. package/dist/plugins/implementations/decision-transformer.js +422 -0
  150. package/dist/plugins/implementations/decision-transformer.js.map +1 -0
  151. package/dist/plugins/implementations/decision-transformer.mjs +417 -0
  152. package/dist/plugins/implementations/federated-learning.d.ts +126 -0
  153. package/dist/plugins/implementations/federated-learning.d.ts.map +1 -0
  154. package/dist/plugins/implementations/federated-learning.js +436 -0
  155. package/dist/plugins/implementations/federated-learning.js.map +1 -0
  156. package/dist/plugins/implementations/federated-learning.mjs +431 -0
  157. package/dist/plugins/implementations/index.d.ts +30 -0
  158. package/dist/plugins/implementations/index.d.ts.map +1 -0
  159. package/dist/plugins/implementations/index.js +45 -0
  160. package/dist/plugins/implementations/index.js.map +1 -0
  161. package/dist/plugins/implementations/index.mjs +31 -0
  162. package/dist/plugins/implementations/multi-task-learning.d.ts +115 -0
  163. package/dist/plugins/implementations/multi-task-learning.d.ts.map +1 -0
  164. package/dist/plugins/implementations/multi-task-learning.js +369 -0
  165. package/dist/plugins/implementations/multi-task-learning.js.map +1 -0
  166. package/dist/plugins/implementations/multi-task-learning.mjs +364 -0
  167. package/dist/plugins/implementations/neural-architecture-search.d.ts +148 -0
  168. package/dist/plugins/implementations/neural-architecture-search.d.ts.map +1 -0
  169. package/dist/plugins/implementations/neural-architecture-search.js +379 -0
  170. package/dist/plugins/implementations/neural-architecture-search.js.map +1 -0
  171. package/dist/plugins/implementations/neural-architecture-search.mjs +374 -0
  172. package/dist/plugins/implementations/q-learning.d.ts +98 -0
  173. package/dist/plugins/implementations/q-learning.d.ts.map +1 -0
  174. package/dist/plugins/implementations/q-learning.js +435 -0
  175. package/dist/plugins/implementations/q-learning.js.map +1 -0
  176. package/dist/plugins/implementations/q-learning.mjs +430 -0
  177. package/dist/plugins/implementations/sarsa.d.ts +103 -0
  178. package/dist/plugins/implementations/sarsa.d.ts.map +1 -0
  179. package/dist/plugins/implementations/sarsa.js +347 -0
  180. package/dist/plugins/implementations/sarsa.js.map +1 -0
  181. package/dist/plugins/implementations/sarsa.mjs +342 -0
  182. package/dist/plugins/index.d.ts +107 -0
  183. package/dist/plugins/index.d.ts.map +1 -0
  184. package/dist/plugins/index.js +179 -0
  185. package/dist/plugins/index.js.map +1 -0
  186. package/dist/plugins/index.mjs +168 -0
  187. package/dist/plugins/interface.d.ts +439 -0
  188. package/dist/plugins/interface.d.ts.map +1 -0
  189. package/dist/plugins/interface.js +12 -0
  190. package/dist/plugins/interface.js.map +1 -0
  191. package/dist/plugins/interface.mjs +10 -0
  192. package/dist/plugins/learning-plugin.interface.d.ts +257 -0
  193. package/dist/plugins/learning-plugin.interface.d.ts.map +1 -0
  194. package/dist/plugins/learning-plugin.interface.js +7 -0
  195. package/dist/plugins/learning-plugin.interface.js.map +1 -0
  196. package/dist/plugins/learning-plugin.interface.mjs +5 -0
  197. package/dist/plugins/plugin-exports.d.ts +71 -0
  198. package/dist/plugins/plugin-exports.d.ts.map +1 -0
  199. package/dist/plugins/plugin-exports.js +78 -0
  200. package/dist/plugins/plugin-exports.js.map +1 -0
  201. package/dist/plugins/plugin-exports.mjs +69 -0
  202. package/dist/plugins/registry.d.ts +206 -0
  203. package/dist/plugins/registry.d.ts.map +1 -0
  204. package/dist/plugins/registry.js +365 -0
  205. package/dist/plugins/registry.js.map +1 -0
  206. package/dist/plugins/registry.mjs +356 -0
  207. package/dist/plugins/validator.d.ts +63 -0
  208. package/dist/plugins/validator.d.ts.map +1 -0
  209. package/dist/plugins/validator.js +464 -0
  210. package/dist/plugins/validator.js.map +1 -0
  211. package/dist/plugins/validator.mjs +458 -0
  212. package/dist/quantization/binary-quantization.d.ts +104 -0
  213. package/dist/quantization/binary-quantization.d.ts.map +1 -0
  214. package/dist/quantization/binary-quantization.js +246 -0
  215. package/dist/quantization/binary-quantization.js.map +1 -0
  216. package/dist/quantization/binary-quantization.mjs +240 -0
  217. package/dist/quantization/optimized-pq.d.ts +138 -0
  218. package/dist/quantization/optimized-pq.d.ts.map +1 -0
  219. package/dist/quantization/optimized-pq.js +320 -0
  220. package/dist/quantization/optimized-pq.js.map +1 -0
  221. package/dist/quantization/optimized-pq.mjs +313 -0
  222. package/dist/quantization/product-quantization.d.ts +109 -0
  223. package/dist/quantization/product-quantization.d.ts.map +1 -0
  224. package/dist/quantization/product-quantization.js +287 -0
  225. package/dist/quantization/product-quantization.js.map +1 -0
  226. package/dist/quantization/product-quantization.mjs +282 -0
  227. package/dist/quantization/scalar-quantization.d.ts +100 -0
  228. package/dist/quantization/scalar-quantization.d.ts.map +1 -0
  229. package/dist/quantization/scalar-quantization.js +324 -0
  230. package/dist/quantization/scalar-quantization.js.map +1 -0
  231. package/dist/quantization/scalar-quantization.mjs +319 -0
  232. package/dist/query/index.d.ts +6 -0
  233. package/dist/query/index.d.ts.map +1 -0
  234. package/dist/query/index.js +9 -0
  235. package/dist/query/index.js.map +1 -0
  236. package/dist/query/index.mjs +4 -0
  237. package/dist/query/query-builder.d.ts +323 -0
  238. package/dist/query/query-builder.d.ts.map +1 -0
  239. package/dist/query/query-builder.js +524 -0
  240. package/dist/query/query-builder.js.map +1 -0
  241. package/dist/query/query-builder.mjs +519 -0
  242. package/dist/reasoning/context-synthesizer.d.ts +57 -0
  243. package/dist/reasoning/context-synthesizer.d.ts.map +1 -0
  244. package/dist/reasoning/context-synthesizer.js +224 -0
  245. package/dist/reasoning/context-synthesizer.js.map +1 -0
  246. package/dist/reasoning/context-synthesizer.mjs +219 -0
  247. package/dist/reasoning/experience-curator.d.ts +66 -0
  248. package/dist/reasoning/experience-curator.d.ts.map +1 -0
  249. package/dist/reasoning/experience-curator.js +288 -0
  250. package/dist/reasoning/experience-curator.js.map +1 -0
  251. package/dist/reasoning/experience-curator.mjs +283 -0
  252. package/dist/reasoning/memory-optimizer.d.ts +69 -0
  253. package/dist/reasoning/memory-optimizer.d.ts.map +1 -0
  254. package/dist/reasoning/memory-optimizer.js +331 -0
  255. package/dist/reasoning/memory-optimizer.js.map +1 -0
  256. package/dist/reasoning/memory-optimizer.mjs +326 -0
  257. package/dist/reasoning/pattern-matcher.d.ts +59 -0
  258. package/dist/reasoning/pattern-matcher.d.ts.map +1 -0
  259. package/dist/reasoning/pattern-matcher.js +229 -0
  260. package/dist/reasoning/pattern-matcher.js.map +1 -0
  261. package/dist/reasoning/pattern-matcher.mjs +224 -0
  262. package/dist/reasoningbank/adapter/agentdb-adapter.d.ts +118 -0
  263. package/dist/reasoningbank/adapter/agentdb-adapter.d.ts.map +1 -0
  264. package/dist/reasoningbank/adapter/agentdb-adapter.js +477 -0
  265. package/dist/reasoningbank/adapter/agentdb-adapter.js.map +1 -0
  266. package/dist/reasoningbank/adapter/types.d.ts +113 -0
  267. package/dist/reasoningbank/adapter/types.d.ts.map +1 -0
  268. package/dist/reasoningbank/adapter/types.js +9 -0
  269. package/dist/reasoningbank/adapter/types.js.map +1 -0
  270. package/dist/reasoningbank/cli/commands.d.ts +16 -0
  271. package/dist/reasoningbank/cli/commands.d.ts.map +1 -0
  272. package/dist/reasoningbank/cli/commands.js +272 -0
  273. package/dist/reasoningbank/cli/commands.js.map +1 -0
  274. package/dist/reasoningbank/mcp/agentdb-tools.d.ts +319 -0
  275. package/dist/reasoningbank/mcp/agentdb-tools.d.ts.map +1 -0
  276. package/dist/reasoningbank/mcp/agentdb-tools.js +301 -0
  277. package/dist/reasoningbank/mcp/agentdb-tools.js.map +1 -0
  278. package/dist/reasoningbank/migration/migrate.d.ts +25 -0
  279. package/dist/reasoningbank/migration/migrate.d.ts.map +1 -0
  280. package/dist/reasoningbank/migration/migrate.js +178 -0
  281. package/dist/reasoningbank/migration/migrate.js.map +1 -0
  282. package/dist/reasoningbank/reasoning/context-synthesizer.d.ts +37 -0
  283. package/dist/reasoningbank/reasoning/context-synthesizer.d.ts.map +1 -0
  284. package/dist/reasoningbank/reasoning/context-synthesizer.js +114 -0
  285. package/dist/reasoningbank/reasoning/context-synthesizer.js.map +1 -0
  286. package/dist/reasoningbank/reasoning/experience-curator.d.ts +39 -0
  287. package/dist/reasoningbank/reasoning/experience-curator.d.ts.map +1 -0
  288. package/dist/reasoningbank/reasoning/experience-curator.js +98 -0
  289. package/dist/reasoningbank/reasoning/experience-curator.js.map +1 -0
  290. package/dist/reasoningbank/reasoning/memory-optimizer.d.ts +44 -0
  291. package/dist/reasoningbank/reasoning/memory-optimizer.d.ts.map +1 -0
  292. package/dist/reasoningbank/reasoning/memory-optimizer.js +184 -0
  293. package/dist/reasoningbank/reasoning/memory-optimizer.js.map +1 -0
  294. package/dist/reasoningbank/reasoning/pattern-matcher.d.ts +40 -0
  295. package/dist/reasoningbank/reasoning/pattern-matcher.d.ts.map +1 -0
  296. package/dist/reasoningbank/reasoning/pattern-matcher.js +87 -0
  297. package/dist/reasoningbank/reasoning/pattern-matcher.js.map +1 -0
  298. package/dist/reasoningbank/sync/quic-sync.d.ts +77 -0
  299. package/dist/reasoningbank/sync/quic-sync.d.ts.map +1 -0
  300. package/dist/reasoningbank/sync/quic-sync.js +165 -0
  301. package/dist/reasoningbank/sync/quic-sync.js.map +1 -0
  302. package/dist/sync/conflict.d.ts +78 -0
  303. package/dist/sync/conflict.d.ts.map +1 -0
  304. package/dist/sync/conflict.js +202 -0
  305. package/dist/sync/conflict.js.map +1 -0
  306. package/dist/sync/conflict.mjs +196 -0
  307. package/dist/sync/coordinator.d.ts +111 -0
  308. package/dist/sync/coordinator.d.ts.map +1 -0
  309. package/dist/sync/coordinator.js +256 -0
  310. package/dist/sync/coordinator.js.map +1 -0
  311. package/dist/sync/coordinator.mjs +250 -0
  312. package/dist/sync/delta.d.ts +81 -0
  313. package/dist/sync/delta.d.ts.map +1 -0
  314. package/dist/sync/delta.js +245 -0
  315. package/dist/sync/delta.js.map +1 -0
  316. package/dist/sync/delta.mjs +238 -0
  317. package/dist/sync/index.d.ts +11 -0
  318. package/dist/sync/index.d.ts.map +1 -0
  319. package/dist/sync/index.js +22 -0
  320. package/dist/sync/index.js.map +1 -0
  321. package/dist/sync/index.mjs +9 -0
  322. package/dist/sync/quic-sync.d.ts +81 -0
  323. package/dist/sync/quic-sync.d.ts.map +1 -0
  324. package/dist/sync/quic-sync.js +329 -0
  325. package/dist/sync/quic-sync.js.map +1 -0
  326. package/dist/sync/quic-sync.mjs +323 -0
  327. package/dist/sync/types.d.ts +168 -0
  328. package/dist/sync/types.d.ts.map +1 -0
  329. package/dist/sync/types.js +8 -0
  330. package/dist/sync/types.js.map +1 -0
  331. package/dist/sync/types.mjs +6 -0
  332. package/dist/types/index.d.ts +117 -0
  333. package/dist/types/index.d.ts.map +1 -0
  334. package/dist/types/index.js +6 -0
  335. package/dist/types/index.js.map +1 -0
  336. package/dist/types/index.mjs +4 -0
  337. package/dist/wasm-loader.d.ts +32 -0
  338. package/dist/wasm-loader.d.ts.map +1 -0
  339. package/dist/wasm-loader.js +75 -0
  340. package/dist/wasm-loader.js.map +1 -0
  341. package/dist/wasm-loader.mjs +64 -0
  342. package/examples/adaptive-learning.ts +284 -0
  343. package/examples/browser/README.md +732 -0
  344. package/examples/browser/adaptive-recommendations/index.html +427 -0
  345. package/examples/browser/collaborative-filtering/index.html +310 -0
  346. package/examples/browser/continual-learning/index.html +736 -0
  347. package/examples/browser/experience-replay/index.html +616 -0
  348. package/examples/browser/index.html +369 -0
  349. package/examples/browser/meta-learning/index.html +789 -0
  350. package/examples/browser/neuro-symbolic/index.html +692 -0
  351. package/examples/browser/pattern-learning/index.html +620 -0
  352. package/examples/browser/quantum-inspired/index.html +728 -0
  353. package/examples/browser/rag/index.html +624 -0
  354. package/examples/browser/swarm-intelligence/index.html +811 -0
  355. package/examples/browser-basic.html +170 -0
  356. package/examples/hnsw-example.ts +148 -0
  357. package/examples/node-basic.js +70 -0
  358. package/examples/quic-sync-example.ts +310 -0
  359. package/examples/quick-start.js +68 -0
  360. package/examples/wasm-example.ts +222 -0
  361. package/package.json +118 -0
@@ -0,0 +1,667 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * Comprehensive Help System for SQLite Vector CLI
4
+ * Organized with subsections for easy navigation
5
+ */
6
+ import chalk from 'chalk';
7
+ const version = '1.0.0'; // Will be replaced with actual version
8
+ /**
9
+ * Main help display with subsections
10
+ */
11
+ export function showComprehensiveHelp() {
12
+ console.log(getHelpContent());
13
+ }
14
+ /**
15
+ * Get the complete help content
16
+ */
17
+ export function getHelpContent() {
18
+ return `
19
+ ${getBanner()}
20
+
21
+ ${getQuickStart()}
22
+
23
+ ${getTableOfContents()}
24
+
25
+ ${getCoreCommands()}
26
+
27
+ ${getPluginCommands()}
28
+
29
+ ${getDatabaseCommands()}
30
+
31
+ ${getAdvancedCommands()}
32
+
33
+ ${getExamples()}
34
+
35
+ ${getTemplates()}
36
+
37
+ ${getConfigurationGuide()}
38
+
39
+ ${getTroubleshooting()}
40
+
41
+ ${getResourcesAndDocumentation()}
42
+
43
+ ${getFooter()}
44
+ `;
45
+ }
46
+ /**
47
+ * ASCII Art Banner
48
+ */
49
+ function getBanner() {
50
+ return chalk.cyan.bold(`
51
+ ╔═══════════════════════════════════════════════════════════════════════════╗
52
+ ║ ║
53
+ ║ █▀█ █▀▀ █▀▀ █▄░█ ▀█▀ █▀▄ █▄▄ ║
54
+ ║ █▀█ █▄█ ██▄ █░▀█ ░█░ █▄▀ █▄█ ║
55
+ ║ ║
56
+ ║ Agent Memory & Vector Database with ReasoningBank ║
57
+ ║ Version ${version.padEnd(62)}║
58
+ ║ ║
59
+ ╚═══════════════════════════════════════════════════════════════════════════╝
60
+ `);
61
+ }
62
+ /**
63
+ * Quick Start Section
64
+ */
65
+ function getQuickStart() {
66
+ return `
67
+ ${chalk.yellow.bold('━━━ QUICK START ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━')}
68
+
69
+ ${chalk.cyan('Get started in 30 seconds:')}
70
+
71
+ ${chalk.gray('1.')} Create a learning plugin
72
+ ${chalk.yellow('$ npx agentdb create-plugin')}
73
+
74
+ ${chalk.gray('2.')} Initialize a vector database
75
+ ${chalk.yellow('$ npx agentdb init ./my-vectors.db')}
76
+
77
+ ${chalk.gray('3.')} Run performance benchmarks
78
+ ${chalk.yellow('$ npx agentdb benchmark')}
79
+
80
+ ${chalk.gray('4.')} Start MCP server for Claude Code
81
+ ${chalk.yellow('$ npx agentdb mcp')}
82
+
83
+ ${chalk.cyan('Need help?')} Run any command with ${chalk.yellow('--help')} for detailed information.
84
+ `;
85
+ }
86
+ /**
87
+ * Table of Contents
88
+ */
89
+ function getTableOfContents() {
90
+ return `
91
+ ${chalk.yellow.bold('━━━ TABLE OF CONTENTS ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━')}
92
+
93
+ ${chalk.cyan('1.')} Core Commands ..................... Basic operations
94
+ ${chalk.cyan('2.')} Plugin Commands ................... Learning plugin management
95
+ ${chalk.cyan('3.')} Database Commands ................. Database operations
96
+ ${chalk.cyan('4.')} Advanced Commands ................. Advanced features
97
+ ${chalk.cyan('5.')} Examples .......................... Common usage patterns
98
+ ${chalk.cyan('6.')} Templates ......................... Available plugin templates
99
+ ${chalk.cyan('7.')} Configuration ..................... Configuration guide
100
+ ${chalk.cyan('8.')} Troubleshooting ................... Common issues & solutions
101
+ ${chalk.cyan('9.')} Resources ......................... Documentation & links
102
+ `;
103
+ }
104
+ /**
105
+ * Section 1: Core Commands
106
+ */
107
+ function getCoreCommands() {
108
+ return `
109
+ ${chalk.yellow.bold('━━━ 1. CORE COMMANDS ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━')}
110
+
111
+ ${chalk.cyan.bold('help')} [command]
112
+ ${chalk.gray('Show this help message or help for a specific command')}
113
+
114
+ ${chalk.yellow('$ npx agentdb help')}
115
+ ${chalk.yellow('$ npx agentdb help create-plugin')}
116
+ ${chalk.yellow('$ npx agentdb create-plugin --help')}
117
+
118
+ ${chalk.cyan.bold('version')}
119
+ ${chalk.gray('Display version information')}
120
+
121
+ ${chalk.yellow('$ npx agentdb version')}
122
+
123
+ ${chalk.gray('Output:')}
124
+ ${chalk.gray(' agentdb v1.0.0')}
125
+ ${chalk.gray(' Node: v20.10.0')}
126
+ ${chalk.gray(' Platform: linux x64')}
127
+
128
+ ${chalk.cyan.bold('mcp')} [options]
129
+ ${chalk.gray('Start Model Context Protocol (MCP) server for Claude Code integration')}
130
+
131
+ ${chalk.yellow('$ npx agentdb mcp')}
132
+ ${chalk.yellow('$ npx agentdb mcp --port 3000')}
133
+ ${chalk.yellow('$ npx agentdb mcp --log debug')}
134
+
135
+ ${chalk.gray('Options:')}
136
+ ${chalk.cyan('--port <number>')} Port to listen on (default: 3000)
137
+ ${chalk.cyan('--host <string>')} Host to bind to (default: localhost)
138
+ ${chalk.cyan('--log <level>')} Log level: debug, info, warn, error
139
+ ${chalk.cyan('--cors')} Enable CORS
140
+ ${chalk.cyan('--auth <token>')} API authentication token
141
+
142
+ ${chalk.gray('Claude Desktop Integration:')}
143
+ ${chalk.gray('Add to ~/.config/claude/config.json:')}
144
+ ${chalk.blue(`{
145
+ "mcpServers": {
146
+ "agentdb": {
147
+ "command": "npx",
148
+ "args": ["agentdb", "mcp"]
149
+ }
150
+ }
151
+ }`)}
152
+ `;
153
+ }
154
+ /**
155
+ * Section 2: Plugin Commands
156
+ */
157
+ function getPluginCommands() {
158
+ return `
159
+ ${chalk.yellow.bold('━━━ 2. PLUGIN COMMANDS ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━')}
160
+
161
+ ${chalk.cyan.bold('create-plugin')} [options]
162
+ ${chalk.gray('Create a new learning plugin with interactive wizard')}
163
+ ${chalk.gray('Supports Decision Transformer, Q-Learning, SARSA, Actor-Critic, and more')}
164
+
165
+ ${chalk.yellow('$ npx agentdb create-plugin')}
166
+ ${chalk.yellow('$ npx agentdb create-plugin --template q-learning --name my-q')}
167
+ ${chalk.yellow('$ npx agentdb create-plugin -t decision-transformer -n my-dt --no-customize')}
168
+
169
+ ${chalk.gray('Options:')}
170
+ ${chalk.cyan('-t, --template <name>')} Use a template (see list-templates)
171
+ ${chalk.cyan('-n, --name <name>')} Plugin name (lowercase, hyphens only)
172
+ ${chalk.cyan('--no-customize')} Skip customization (use defaults)
173
+ ${chalk.cyan('-o, --output <dir>')} Output directory (default: ./plugins)
174
+ ${chalk.cyan('--force')} Overwrite existing plugin
175
+ ${chalk.cyan('--dry-run')} Show what would be generated
176
+
177
+ ${chalk.gray('Generated Structure:')}
178
+ ${chalk.blue(`plugins/my-plugin/
179
+ ├── plugin.yaml # Configuration
180
+ ├── README.md # Documentation
181
+ ├── package.json # Dependencies
182
+ ├── tsconfig.json # TypeScript config
183
+ ├── src/
184
+ │ ├── index.ts # Plugin implementation
185
+ │ ├── agent.ts # Learning algorithm
186
+ │ ├── reward.ts # Reward function
187
+ │ └── policy.ts # Action selection
188
+ └── tests/
189
+ └── plugin.test.ts # Unit tests`)}
190
+
191
+ ${chalk.cyan.bold('list-plugins')} [options]
192
+ ${chalk.gray('List all available plugins')}
193
+
194
+ ${chalk.yellow('$ npx agentdb list-plugins')}
195
+ ${chalk.yellow('$ npx agentdb list-plugins --verbose')}
196
+ ${chalk.yellow('$ npx agentdb list-plugins --filter "q-*"')}
197
+
198
+ ${chalk.gray('Options:')}
199
+ ${chalk.cyan('-v, --verbose')} Show detailed information
200
+ ${chalk.cyan('--filter <pattern>')} Filter by name pattern
201
+ ${chalk.cyan('--sort <field>')} Sort by: name, version, created
202
+ ${chalk.cyan('--json')} Output as JSON
203
+
204
+ ${chalk.cyan.bold('list-templates')} [options]
205
+ ${chalk.gray('List all available plugin templates')}
206
+
207
+ ${chalk.yellow('$ npx agentdb list-templates')}
208
+ ${chalk.yellow('$ npx agentdb list-templates --detailed')}
209
+ ${chalk.yellow('$ npx agentdb list-templates --category reinforcement-learning')}
210
+
211
+ ${chalk.gray('Options:')}
212
+ ${chalk.cyan('-d, --detailed')} Show detailed information
213
+ ${chalk.cyan('-c, --category <name>')} Filter by category
214
+ ${chalk.cyan('--json')} Output as JSON
215
+
216
+ ${chalk.cyan.bold('plugin-info')} <name> [options]
217
+ ${chalk.gray('Get information about a specific plugin')}
218
+
219
+ ${chalk.yellow('$ npx agentdb plugin-info my-plugin')}
220
+ ${chalk.yellow('$ npx agentdb plugin-info my-plugin --json')}
221
+
222
+ ${chalk.gray('Options:')}
223
+ ${chalk.cyan('--json')} Output as JSON
224
+ ${chalk.cyan('--metrics')} Include performance metrics
225
+ ${chalk.cyan('--dependencies')} Show dependencies
226
+
227
+ ${chalk.cyan.bold('use-plugin')} <name> [options]
228
+ ${chalk.gray('Load and use a plugin in your application')}
229
+
230
+ ${chalk.yellow('$ npx agentdb use-plugin my-plugin')}
231
+ ${chalk.yellow('$ npx agentdb use-plugin my-plugin --config custom.yaml')}
232
+
233
+ ${chalk.gray('Options:')}
234
+ ${chalk.cyan('-c, --config <file>')} Custom configuration file
235
+ ${chalk.cyan('-t, --test')} Run in test mode
236
+ ${chalk.cyan('-v, --verbose')} Verbose output
237
+ ${chalk.cyan('--interactive')} Interactive mode (REPL)
238
+
239
+ ${chalk.cyan.bold('test-plugin')} <name> [options]
240
+ ${chalk.gray('Test a plugin')}
241
+
242
+ ${chalk.yellow('$ npx agentdb test-plugin my-plugin')}
243
+ ${chalk.yellow('$ npx agentdb test-plugin my-plugin --coverage')}
244
+ ${chalk.yellow('$ npx agentdb test-plugin my-plugin --benchmark')}
245
+
246
+ ${chalk.gray('Options:')}
247
+ ${chalk.cyan('--coverage')} Generate coverage report
248
+ ${chalk.cyan('--benchmark')} Run performance benchmarks
249
+ ${chalk.cyan('-v, --verbose')} Verbose output
250
+ ${chalk.cyan('--watch')} Watch mode
251
+
252
+ ${chalk.cyan.bold('validate-plugin')} <name> [options]
253
+ ${chalk.gray('Validate plugin configuration and structure')}
254
+
255
+ ${chalk.yellow('$ npx agentdb validate-plugin my-plugin')}
256
+ ${chalk.yellow('$ npx agentdb validate-plugin my-plugin --fix')}
257
+
258
+ ${chalk.gray('Options:')}
259
+ ${chalk.cyan('--fix')} Attempt to fix validation errors
260
+ ${chalk.cyan('--strict')} Use strict validation
261
+ ${chalk.cyan('--schema <file>')} Custom validation schema
262
+ `;
263
+ }
264
+ /**
265
+ * Section 3: Database Commands
266
+ */
267
+ function getDatabaseCommands() {
268
+ return `
269
+ ${chalk.yellow.bold('━━━ 3. DATABASE COMMANDS ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━')}
270
+
271
+ ${chalk.cyan.bold('init')} <path> [options]
272
+ ${chalk.gray('Initialize a new vector database')}
273
+
274
+ ${chalk.yellow('$ npx agentdb init ./vectors.db')}
275
+ ${chalk.yellow('$ npx agentdb init ./vectors.db --dimension 1536')}
276
+ ${chalk.yellow('$ npx agentdb init ./vectors.db --preset large')}
277
+
278
+ ${chalk.gray('Options:')}
279
+ ${chalk.cyan('--dimension <number>')} Vector dimension (default: 1536)
280
+ ${chalk.cyan('--preset <name>')} Use preset: small, medium, large
281
+ ${chalk.cyan('--hnsw')} Enable HNSW index (default: true)
282
+ ${chalk.cyan('--quantization <bits>')} Quantization: 8, 16, or none
283
+ ${chalk.cyan('--in-memory')} Create in-memory database
284
+ ${chalk.cyan('--read-only')} Open in read-only mode
285
+
286
+ ${chalk.cyan.bold('import')} <file> [options]
287
+ ${chalk.gray('Import vectors from file (JSON, CSV, NPY)')}
288
+
289
+ ${chalk.yellow('$ npx agentdb import vectors.json --db ./vectors.db')}
290
+ ${chalk.yellow('$ npx agentdb import embeddings.npy --db ./vectors.db --format npy')}
291
+
292
+ ${chalk.gray('Options:')}
293
+ ${chalk.cyan('--db <path>')} Database path
294
+ ${chalk.cyan('--format <type>')} Format: json, csv, npy, parquet
295
+ ${chalk.cyan('--batch-size <number>')} Batch size (default: 1000)
296
+ ${chalk.cyan('--skip-errors')} Continue on errors
297
+
298
+ ${chalk.cyan.bold('export')} <path> [options]
299
+ ${chalk.gray('Export vectors to file')}
300
+
301
+ ${chalk.yellow('$ npx agentdb export ./vectors.db --output vectors.json')}
302
+ ${chalk.yellow('$ npx agentdb export ./vectors.db --format npy -o embeddings.npy')}
303
+
304
+ ${chalk.gray('Options:')}
305
+ ${chalk.cyan('-o, --output <file>')} Output file
306
+ ${chalk.cyan('--format <type>')} Format: json, csv, npy, parquet
307
+ ${chalk.cyan('--filter <query>')} Filter condition
308
+ ${chalk.cyan('--limit <number>')} Limit number of vectors
309
+
310
+ ${chalk.cyan.bold('query')} <database> [options]
311
+ ${chalk.gray('Query vector database')}
312
+
313
+ ${chalk.yellow('$ npx agentdb query ./vectors.db --vector "[0.1, 0.2, ...]"')}
314
+ ${chalk.yellow('$ npx agentdb query ./vectors.db --text "search query"')}
315
+
316
+ ${chalk.gray('Options:')}
317
+ ${chalk.cyan('--vector <json>')} Query vector (JSON array)
318
+ ${chalk.cyan('--text <string>')} Text query (auto-embedded)
319
+ ${chalk.cyan('--k <number>')} Number of results (default: 5)
320
+ ${chalk.cyan('--threshold <number>')} Similarity threshold (0-1)
321
+ ${chalk.cyan('--metric <name>')} Metric: cosine, euclidean, dot
322
+
323
+ ${chalk.cyan.bold('stats')} <database> [options]
324
+ ${chalk.gray('Show database statistics')}
325
+
326
+ ${chalk.yellow('$ npx agentdb stats ./vectors.db')}
327
+ ${chalk.yellow('$ npx agentdb stats ./vectors.db --detailed')}
328
+
329
+ ${chalk.gray('Options:')}
330
+ ${chalk.cyan('--detailed')} Show detailed statistics
331
+ ${chalk.cyan('--json')} Output as JSON
332
+ `;
333
+ }
334
+ /**
335
+ * Section 4: Advanced Commands
336
+ */
337
+ function getAdvancedCommands() {
338
+ return `
339
+ ${chalk.yellow.bold('━━━ 4. ADVANCED COMMANDS ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━')}
340
+
341
+ ${chalk.cyan.bold('benchmark')} [options]
342
+ ${chalk.gray('Run performance benchmarks')}
343
+
344
+ ${chalk.yellow('$ npx agentdb benchmark')}
345
+ ${chalk.yellow('$ npx agentdb benchmark --suite insertion')}
346
+ ${chalk.yellow('$ npx agentdb benchmark --output report.json')}
347
+
348
+ ${chalk.gray('Options:')}
349
+ ${chalk.cyan('--suite <name>')} Benchmark suite: insertion, search, all
350
+ ${chalk.cyan('--size <number>')} Dataset size (default: 10000)
351
+ ${chalk.cyan('--dimension <number>')} Vector dimension (default: 1536)
352
+ ${chalk.cyan('--output <file>')} Save results to file
353
+ ${chalk.cyan('--compare <file>')} Compare with previous results
354
+
355
+ ${chalk.cyan.bold('optimize')} <database> [options]
356
+ ${chalk.gray('Optimize database performance')}
357
+
358
+ ${chalk.yellow('$ npx agentdb optimize ./vectors.db')}
359
+ ${chalk.yellow('$ npx agentdb optimize ./vectors.db --rebuild-index')}
360
+
361
+ ${chalk.gray('Options:')}
362
+ ${chalk.cyan('--rebuild-index')} Rebuild HNSW index
363
+ ${chalk.cyan('--vacuum')} Vacuum database
364
+ ${chalk.cyan('--analyze')} Update statistics
365
+ ${chalk.cyan('--compact')} Compact database
366
+
367
+ ${chalk.cyan.bold('repl')} [options]
368
+ ${chalk.gray('Start interactive REPL (experimental)')}
369
+
370
+ ${chalk.yellow('$ npx agentdb repl')}
371
+ ${chalk.yellow('$ npx agentdb repl --db ./vectors.db')}
372
+
373
+ ${chalk.gray('Options:')}
374
+ ${chalk.cyan('--db <path>')} Load database on startup
375
+ ${chalk.cyan('--history')} Enable command history
376
+ ${chalk.cyan('--plugin <name>')} Load plugin
377
+
378
+ ${chalk.cyan.bold('train')} <plugin> [options]
379
+ ${chalk.gray('Train a learning plugin')}
380
+
381
+ ${chalk.yellow('$ npx agentdb train my-plugin')}
382
+ ${chalk.yellow('$ npx agentdb train my-plugin --data ./training.json')}
383
+
384
+ ${chalk.gray('Options:')}
385
+ ${chalk.cyan('--data <file>')} Training data file
386
+ ${chalk.cyan('--epochs <number>')} Number of epochs (default: 10)
387
+ ${chalk.cyan('--batch-size <number>')} Batch size (default: 32)
388
+ ${chalk.cyan('--checkpoint <dir>')} Save checkpoints
389
+ ${chalk.cyan('--wandb')} Log to Weights & Biases
390
+
391
+ ${chalk.cyan.bold('deploy')} <plugin> [options]
392
+ ${chalk.gray('Deploy plugin to production')}
393
+
394
+ ${chalk.yellow('$ npx agentdb deploy my-plugin')}
395
+ ${chalk.yellow('$ npx agentdb deploy my-plugin --env production')}
396
+
397
+ ${chalk.gray('Options:')}
398
+ ${chalk.cyan('--env <name>')} Environment: dev, staging, production
399
+ ${chalk.cyan('--registry <url>')} Plugin registry URL
400
+ ${chalk.cyan('--tag <version>')} Version tag
401
+ `;
402
+ }
403
+ /**
404
+ * Section 5: Examples
405
+ */
406
+ function getExamples() {
407
+ return `
408
+ ${chalk.yellow.bold('━━━ 5. EXAMPLES ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━')}
409
+
410
+ ${chalk.cyan.bold('Example 1: Quick Plugin Setup')}
411
+ ${chalk.gray('# Create Q-Learning plugin')}
412
+ ${chalk.yellow('$ npx agentdb create-plugin -t q-learning -n my-q-agent --no-customize')}
413
+
414
+ ${chalk.gray('# Navigate and install')}
415
+ ${chalk.yellow('$ cd plugins/my-q-agent && npm install')}
416
+
417
+ ${chalk.gray('# Test the plugin')}
418
+ ${chalk.yellow('$ npm test')}
419
+
420
+ ${chalk.cyan.bold('Example 2: Custom Reward Function')}
421
+ ${chalk.gray('# Create plugin with wizard')}
422
+ ${chalk.yellow('$ npx agentdb create-plugin')}
423
+ ${chalk.gray(' ? Base algorithm: Decision Transformer')}
424
+ ${chalk.gray(' ? Reward function: Custom')}
425
+ ${chalk.gray(' ? Enter reward function:')}
426
+ ${chalk.blue(` function computeReward(outcome, context) {
427
+ const base = outcome.success ? 1.0 : -1.0;
428
+ const timePenalty = -0.1 * (context.duration / 1000);
429
+ return base + timePenalty;
430
+ }`)}
431
+
432
+ ${chalk.cyan.bold('Example 3: Database Operations')}
433
+ ${chalk.gray('# Initialize database')}
434
+ ${chalk.yellow('$ npx agentdb init ./data/vectors.db --dimension 768')}
435
+
436
+ ${chalk.gray('# Import vectors')}
437
+ ${chalk.yellow('$ npx agentdb import embeddings.json --db ./data/vectors.db')}
438
+
439
+ ${chalk.gray('# Query database')}
440
+ ${chalk.yellow('$ npx agentdb query ./data/vectors.db --text "search query" --k 10')}
441
+
442
+ ${chalk.gray('# Export results')}
443
+ ${chalk.yellow('$ npx agentdb export ./data/vectors.db -o results.json --format json')}
444
+
445
+ ${chalk.cyan.bold('Example 4: A/B Testing Plugins')}
446
+ ${chalk.gray('# Create two plugins')}
447
+ ${chalk.yellow('$ npx agentdb create-plugin -t decision-transformer -n plugin-a')}
448
+ ${chalk.yellow('$ npx agentdb create-plugin -t q-learning -n plugin-b')}
449
+
450
+ ${chalk.gray('# Compare performance')}
451
+ ${chalk.yellow('$ npx agentdb test-plugin plugin-a --benchmark')}
452
+ ${chalk.yellow('$ npx agentdb test-plugin plugin-b --benchmark')}
453
+
454
+ ${chalk.cyan.bold('Example 5: Production Deployment')}
455
+ ${chalk.gray('# Train plugin')}
456
+ ${chalk.yellow('$ npx agentdb train my-plugin --data ./training-data.json --epochs 100')}
457
+
458
+ ${chalk.gray('# Validate')}
459
+ ${chalk.yellow('$ npx agentdb validate-plugin my-plugin --strict')}
460
+
461
+ ${chalk.gray('# Deploy')}
462
+ ${chalk.yellow('$ npx agentdb deploy my-plugin --env production --tag v1.0.0')}
463
+ `;
464
+ }
465
+ /**
466
+ * Section 6: Templates
467
+ */
468
+ function getTemplates() {
469
+ return `
470
+ ${chalk.yellow.bold('━━━ 6. TEMPLATES ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━')}
471
+
472
+ ${chalk.cyan.bold('decision-transformer')} ${chalk.green('(Recommended)')}
473
+ ${chalk.gray('Sequence modeling approach to reinforcement learning')}
474
+ ${chalk.gray('Best for: Sequential decision-making tasks')}
475
+ ${chalk.gray('Sample efficiency: ⭐⭐⭐⭐⭐ (5x better than Q-learning)')}
476
+
477
+ ${chalk.yellow('$ npx agentdb create-plugin -t decision-transformer -n my-dt')}
478
+
479
+ ${chalk.cyan.bold('q-learning')}
480
+ ${chalk.gray('Model-free, off-policy, value-based learning')}
481
+ ${chalk.gray('Best for: Discrete action spaces with clear value functions')}
482
+ ${chalk.gray('Sample efficiency: ⭐⭐⭐')}
483
+
484
+ ${chalk.yellow('$ npx agentdb create-plugin -t q-learning -n my-q')}
485
+
486
+ ${chalk.cyan.bold('sarsa')}
487
+ ${chalk.gray('On-policy temporal difference learning')}
488
+ ${chalk.gray('Best for: Safe, conservative learning scenarios')}
489
+ ${chalk.gray('Sample efficiency: ⭐⭐⭐')}
490
+
491
+ ${chalk.yellow('$ npx agentdb create-plugin -t sarsa -n my-sarsa')}
492
+
493
+ ${chalk.cyan.bold('actor-critic')}
494
+ ${chalk.gray('Policy gradient method with value function baseline')}
495
+ ${chalk.gray('Best for: Continuous action spaces, complex policies')}
496
+ ${chalk.gray('Sample efficiency: ⭐⭐⭐⭐')}
497
+
498
+ ${chalk.yellow('$ npx agentdb create-plugin -t actor-critic -n my-ac')}
499
+
500
+ ${chalk.cyan.bold('curiosity-driven')}
501
+ ${chalk.gray('Intrinsic motivation for exploration')}
502
+ ${chalk.gray('Best for: Sparse reward environments requiring exploration')}
503
+ ${chalk.gray('Sample efficiency: ⭐⭐⭐⭐')}
504
+
505
+ ${chalk.yellow('$ npx agentdb create-plugin -t curiosity-driven -n my-curious')}
506
+
507
+ ${chalk.gray('View all templates:')} ${chalk.yellow('npx agentdb list-templates --detailed')}
508
+ `;
509
+ }
510
+ /**
511
+ * Section 7: Configuration Guide
512
+ */
513
+ function getConfigurationGuide() {
514
+ return `
515
+ ${chalk.yellow.bold('━━━ 7. CONFIGURATION ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━')}
516
+
517
+ ${chalk.cyan.bold('Plugin Configuration (plugin.yaml)')}
518
+ ${chalk.blue(`name: my-plugin
519
+ version: 1.0.0
520
+ description: My custom learning plugin
521
+ base_algorithm: decision_transformer
522
+
523
+ algorithm:
524
+ type: decision_transformer
525
+ learning_rate: 0.001
526
+ discount_factor: 0.99
527
+
528
+ training:
529
+ batch_size: 32
530
+ epochs: 10
531
+ min_experiences: 100
532
+
533
+ storage:
534
+ path: ./.rl/plugin.db
535
+ hnsw:
536
+ enabled: true
537
+ M: 16`)}
538
+
539
+ ${chalk.cyan.bold('Environment Variables')}
540
+ ${chalk.cyan('SQLITE_VECTOR_DB_PATH')} Database path (default: ./vectors.db)
541
+ ${chalk.cyan('SQLITE_VECTOR_LOG_LEVEL')} Log level: debug, info, warn, error
542
+ ${chalk.cyan('SQLITE_VECTOR_CACHE_SIZE')} Cache size in MB (default: 100)
543
+ ${chalk.cyan('SQLITE_VECTOR_WORKERS')} Number of worker threads (default: 4)
544
+
545
+ ${chalk.cyan.bold('Configuration Files')}
546
+ ${chalk.gray('Global:')} ${chalk.blue('~/.agentdb/config.yaml')}
547
+ ${chalk.gray('Project:')} ${chalk.blue('./.agentdb/config.yaml')}
548
+ ${chalk.gray('Plugin:')} ${chalk.blue('./plugins/<name>/plugin.yaml')}
549
+
550
+ ${chalk.cyan.bold('Configuration Precedence')}
551
+ ${chalk.gray('1. Command-line arguments (highest priority)')}
552
+ ${chalk.gray('2. Environment variables')}
553
+ ${chalk.gray('3. Project config')}
554
+ ${chalk.gray('4. Global config')}
555
+ ${chalk.gray('5. Default values (lowest priority)')}
556
+ `;
557
+ }
558
+ /**
559
+ * Section 8: Troubleshooting
560
+ */
561
+ function getTroubleshooting() {
562
+ return `
563
+ ${chalk.yellow.bold('━━━ 8. TROUBLESHOOTING ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━')}
564
+
565
+ ${chalk.cyan.bold('Common Issues')}
566
+
567
+ ${chalk.red('Issue:')} Plugin creation fails
568
+ ${chalk.green('Solution:')} Ensure Node.js >= 18 and all dependencies are installed
569
+ ${chalk.yellow('$ node --version')}
570
+ ${chalk.yellow('$ npm install -g npm@latest')}
571
+
572
+ ${chalk.red('Issue:')} Database locked error
573
+ ${chalk.green('Solution:')} Close other connections or use WAL mode
574
+ ${chalk.yellow('$ npx agentdb optimize ./vectors.db --mode wal')}
575
+
576
+ ${chalk.red('Issue:')} Out of memory during training
577
+ ${chalk.green('Solution:')} Reduce batch size or enable quantization
578
+ ${chalk.gray('In plugin.yaml:')}
579
+ ${chalk.blue(`training:
580
+ batch_size: 16 # Reduce from 32
581
+ storage:
582
+ quantization:
583
+ enabled: true
584
+ bits: 8`)}
585
+
586
+ ${chalk.red('Issue:')} Slow search performance
587
+ ${chalk.green('Solution:')} Enable HNSW index and optimize
588
+ ${chalk.yellow('$ npx agentdb optimize ./vectors.db --rebuild-index')}
589
+
590
+ ${chalk.red('Issue:')} Plugin tests failing
591
+ ${chalk.green('Solution:')} Check dependencies and rebuild
592
+ ${chalk.yellow('$ cd plugins/my-plugin')}
593
+ ${chalk.yellow('$ rm -rf node_modules && npm install')}
594
+ ${chalk.yellow('$ npm run build && npm test')}
595
+
596
+ ${chalk.cyan.bold('Debug Mode')}
597
+ ${chalk.gray('Enable verbose logging:')}
598
+ ${chalk.yellow('$ DEBUG=agentdb:* npx agentdb <command>')}
599
+ ${chalk.yellow('$ npx agentdb <command> --verbose --log-level debug')}
600
+
601
+ ${chalk.cyan.bold('Getting Help')}
602
+ ${chalk.gray('Report issues:')} ${chalk.blue('https://github.com/ruvnet/agentic-flow/issues')}
603
+ ${chalk.gray('View logs:')} ${chalk.yellow('~/.agentdb/logs/')}
604
+ ${chalk.gray('Check status:')} ${chalk.yellow('npx agentdb version')}
605
+ `;
606
+ }
607
+ /**
608
+ * Section 9: Resources and Documentation
609
+ */
610
+ function getResourcesAndDocumentation() {
611
+ return `
612
+ ${chalk.yellow.bold('━━━ 9. RESOURCES & DOCUMENTATION ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━')}
613
+
614
+ ${chalk.cyan.bold('Documentation')}
615
+ ${chalk.blue('📘 Plugin Quick Start')} docs/PLUGIN_QUICKSTART.md
616
+ ${chalk.blue('📕 API Reference')} docs/PLUGIN_API.md
617
+ ${chalk.blue('📗 Architecture Design')} docs/LEARNING_PLUGIN_DESIGN.md
618
+ ${chalk.blue('📙 Decision Transformer')} docs/DECISION_TRANSFORMER.md
619
+ ${chalk.blue('📔 Performance Benchmarks')} docs/RL_BENCHMARKS.md
620
+ ${chalk.blue('📓 Optimization Guide')} docs/PLUGIN_OPTIMIZATION.md
621
+
622
+ ${chalk.cyan.bold('Online Resources')}
623
+ ${chalk.gray('GitHub:')} ${chalk.blue('https://github.com/ruvnet/agentic-flow')}
624
+ ${chalk.gray('Issues:')} ${chalk.blue('https://github.com/ruvnet/agentic-flow/issues')}
625
+ ${chalk.gray('Wiki:')} ${chalk.blue('https://github.com/ruvnet/agentic-flow/wiki')}
626
+ ${chalk.gray('Discussions:')} ${chalk.blue('https://github.com/ruvnet/agentic-flow/discussions')}
627
+
628
+ ${chalk.cyan.bold('Community')}
629
+ ${chalk.gray('Discord:')} ${chalk.blue('https://discord.gg/agentic-flow')}
630
+ ${chalk.gray('Twitter:')} ${chalk.blue('@agentic_flow')}
631
+ ${chalk.gray('Stack Overflow:')} ${chalk.blue('Tag: agentdb')}
632
+
633
+ ${chalk.cyan.bold('Code Examples')}
634
+ ${chalk.gray('Examples repository:')} ${chalk.blue('https://github.com/ruvnet/agentic-flow-examples')}
635
+ ${chalk.gray('Tutorials:')} ${chalk.blue('https://docs.agentic-flow.ai/tutorials')}
636
+ ${chalk.gray('Blog posts:')} ${chalk.blue('https://blog.agentic-flow.ai')}
637
+ `;
638
+ }
639
+ /**
640
+ * Footer
641
+ */
642
+ function getFooter() {
643
+ return `
644
+ ${chalk.yellow.bold('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━')}
645
+
646
+ ${chalk.cyan.bold('License')}
647
+ MIT OR Apache-2.0
648
+
649
+ ${chalk.cyan.bold('Contributing')}
650
+ Contributions welcome! See CONTRIBUTING.md for guidelines.
651
+
652
+ ${chalk.cyan.bold('Support')}
653
+ Found a bug? ${chalk.yellow('npx agentdb help')} | ${chalk.blue('https://github.com/ruvnet/agentic-flow/issues')}
654
+
655
+ ${chalk.gray('Run')} ${chalk.yellow('npx agentdb <command> --help')} ${chalk.gray('for detailed command information.')}
656
+
657
+ ${chalk.yellow.bold('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━')}
658
+ `;
659
+ }
660
+ /**
661
+ * Show help for specific command
662
+ */
663
+ export function showCommandHelp(command) {
664
+ // This will be implemented to show command-specific help
665
+ console.log(`Detailed help for: ${command}`);
666
+ console.log(`Run: npx agentdb ${command} --help`);
667
+ }