keri-ts 0.2.2 → 0.3.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 (286) hide show
  1. package/README.md +44 -120
  2. package/esm/app/cli/agent.js +0 -19
  3. package/esm/app/cli/annotate.js +7 -2
  4. package/esm/app/cli/benchmark.js +210 -0
  5. package/esm/app/cli/cli.js +50 -52
  6. package/esm/app/cli/command-definitions.js +258 -6
  7. package/esm/app/cli/common/existing.js +40 -0
  8. package/esm/app/cli/common/parsing.js +20 -0
  9. package/esm/app/cli/export.js +51 -0
  10. package/esm/app/cli/incept.js +106 -0
  11. package/esm/app/cli/index.js +9 -0
  12. package/esm/app/cli/init.js +72 -41
  13. package/esm/app/configing.js +261 -0
  14. package/esm/app/habbing.js +386 -0
  15. package/esm/app/index.js +10 -0
  16. package/esm/app/keeping.js +321 -0
  17. package/esm/app/version.js +2 -2
  18. package/esm/db/basing.js +66 -1
  19. package/esm/db/core/lmdber.js +13 -7
  20. package/esm/db/core/path-manager.js +193 -169
  21. package/esm/db/index.js +1 -0
  22. package/esm/db/keeping.js +214 -0
  23. package/esm/deps/jsr.io/@std/internal/1.0.12/_os.js +12 -0
  24. package/esm/deps/jsr.io/@std/internal/1.0.12/os.js +5 -0
  25. package/esm/deps/jsr.io/@std/path/1.1.4/_common/assert_path.js +7 -0
  26. package/esm/deps/jsr.io/@std/path/1.1.4/_common/basename.js +40 -0
  27. package/esm/deps/jsr.io/@std/path/1.1.4/_common/common.js +23 -0
  28. package/esm/deps/jsr.io/@std/path/1.1.4/_common/constants.js +46 -0
  29. package/esm/deps/jsr.io/@std/path/1.1.4/_common/dirname.js +8 -0
  30. package/esm/deps/jsr.io/@std/path/1.1.4/_common/format.js +19 -0
  31. package/esm/deps/jsr.io/@std/path/1.1.4/_common/from_file_url.js +9 -0
  32. package/esm/deps/jsr.io/@std/path/1.1.4/_common/glob_to_reg_exp.js +235 -0
  33. package/esm/deps/jsr.io/@std/path/1.1.4/_common/normalize.js +8 -0
  34. package/esm/deps/jsr.io/@std/path/1.1.4/_common/normalize_string.js +77 -0
  35. package/esm/deps/jsr.io/@std/path/1.1.4/_common/relative.js +9 -0
  36. package/esm/deps/jsr.io/@std/path/1.1.4/_common/strip_trailing_separators.js +19 -0
  37. package/esm/deps/jsr.io/@std/path/1.1.4/_common/to_file_url.js +15 -0
  38. package/esm/deps/jsr.io/@std/path/1.1.4/basename.js +35 -0
  39. package/esm/deps/jsr.io/@std/path/1.1.4/common.js +33 -0
  40. package/esm/deps/jsr.io/@std/path/1.1.4/constants.js +17 -0
  41. package/esm/deps/jsr.io/@std/path/1.1.4/dirname.js +28 -0
  42. package/esm/deps/jsr.io/@std/path/1.1.4/extname.js +28 -0
  43. package/esm/deps/jsr.io/@std/path/1.1.4/format.js +27 -0
  44. package/esm/deps/jsr.io/@std/path/1.1.4/from_file_url.js +28 -0
  45. package/esm/deps/jsr.io/@std/path/1.1.4/glob_to_regexp.js +83 -0
  46. package/esm/deps/jsr.io/@std/path/1.1.4/is_absolute.js +28 -0
  47. package/esm/deps/jsr.io/@std/path/1.1.4/is_glob.js +42 -0
  48. package/esm/deps/jsr.io/@std/path/1.1.4/join.js +29 -0
  49. package/esm/deps/jsr.io/@std/path/1.1.4/join_globs.js +34 -0
  50. package/esm/deps/jsr.io/@std/path/1.1.4/mod.js +216 -0
  51. package/esm/deps/jsr.io/@std/path/1.1.4/normalize.js +32 -0
  52. package/esm/deps/jsr.io/@std/path/1.1.4/normalize_glob.js +35 -0
  53. package/esm/deps/jsr.io/@std/path/1.1.4/parse.js +39 -0
  54. package/esm/deps/jsr.io/@std/path/1.1.4/posix/_util.js +8 -0
  55. package/esm/deps/jsr.io/@std/path/1.1.4/posix/basename.js +52 -0
  56. package/esm/deps/jsr.io/@std/path/1.1.4/posix/constants.js +14 -0
  57. package/esm/deps/jsr.io/@std/path/1.1.4/posix/dirname.js +64 -0
  58. package/esm/deps/jsr.io/@std/path/1.1.4/posix/extname.js +93 -0
  59. package/esm/deps/jsr.io/@std/path/1.1.4/posix/format.js +28 -0
  60. package/esm/deps/jsr.io/@std/path/1.1.4/posix/from_file_url.js +21 -0
  61. package/esm/deps/jsr.io/@std/path/1.1.4/posix/glob_to_regexp.js +82 -0
  62. package/esm/deps/jsr.io/@std/path/1.1.4/posix/is_absolute.js +23 -0
  63. package/esm/deps/jsr.io/@std/path/1.1.4/posix/join.js +45 -0
  64. package/esm/deps/jsr.io/@std/path/1.1.4/posix/join_globs.js +40 -0
  65. package/esm/deps/jsr.io/@std/path/1.1.4/posix/normalize.js +58 -0
  66. package/esm/deps/jsr.io/@std/path/1.1.4/posix/normalize_glob.js +32 -0
  67. package/esm/deps/jsr.io/@std/path/1.1.4/posix/parse.js +115 -0
  68. package/esm/deps/jsr.io/@std/path/1.1.4/posix/relative.js +106 -0
  69. package/esm/deps/jsr.io/@std/path/1.1.4/posix/resolve.js +59 -0
  70. package/esm/deps/jsr.io/@std/path/1.1.4/posix/to_file_url.js +27 -0
  71. package/esm/deps/jsr.io/@std/path/1.1.4/posix/to_namespaced_path.js +20 -0
  72. package/esm/deps/jsr.io/@std/path/1.1.4/relative.js +30 -0
  73. package/esm/deps/jsr.io/@std/path/1.1.4/resolve.js +30 -0
  74. package/esm/deps/jsr.io/@std/path/1.1.4/to_file_url.js +28 -0
  75. package/esm/deps/jsr.io/@std/path/1.1.4/to_namespaced_path.js +29 -0
  76. package/esm/deps/jsr.io/@std/path/1.1.4/types.js +3 -0
  77. package/esm/deps/jsr.io/@std/path/1.1.4/windows/_util.js +15 -0
  78. package/esm/deps/jsr.io/@std/path/1.1.4/windows/basename.js +47 -0
  79. package/esm/deps/jsr.io/@std/path/1.1.4/windows/constants.js +14 -0
  80. package/esm/deps/jsr.io/@std/path/1.1.4/windows/dirname.js +113 -0
  81. package/esm/deps/jsr.io/@std/path/1.1.4/windows/extname.js +82 -0
  82. package/esm/deps/jsr.io/@std/path/1.1.4/windows/format.js +28 -0
  83. package/esm/deps/jsr.io/@std/path/1.1.4/windows/from_file_url.js +30 -0
  84. package/esm/deps/jsr.io/@std/path/1.1.4/windows/glob_to_regexp.js +82 -0
  85. package/esm/deps/jsr.io/@std/path/1.1.4/windows/is_absolute.js +38 -0
  86. package/esm/deps/jsr.io/@std/path/1.1.4/windows/join.js +77 -0
  87. package/esm/deps/jsr.io/@std/path/1.1.4/windows/join_globs.js +41 -0
  88. package/esm/deps/jsr.io/@std/path/1.1.4/windows/normalize.js +135 -0
  89. package/esm/deps/jsr.io/@std/path/1.1.4/windows/normalize_glob.js +32 -0
  90. package/esm/deps/jsr.io/@std/path/1.1.4/windows/parse.js +176 -0
  91. package/esm/deps/jsr.io/@std/path/1.1.4/windows/relative.js +131 -0
  92. package/esm/deps/jsr.io/@std/path/1.1.4/windows/resolve.js +154 -0
  93. package/esm/deps/jsr.io/@std/path/1.1.4/windows/to_file_url.js +34 -0
  94. package/esm/deps/jsr.io/@std/path/1.1.4/windows/to_namespaced_path.js +49 -0
  95. package/esm/npm/index.js +7 -2
  96. package/package.json +6 -3
  97. package/types/app/cli/agent.d.ts.map +1 -1
  98. package/types/app/cli/annotate.d.ts.map +1 -1
  99. package/types/app/cli/benchmark.d.ts +11 -0
  100. package/types/app/cli/benchmark.d.ts.map +1 -0
  101. package/types/app/cli/cli.d.ts.map +1 -1
  102. package/types/app/cli/command-definitions.d.ts +5 -2
  103. package/types/app/cli/command-definitions.d.ts.map +1 -1
  104. package/types/app/cli/command-types.d.ts +12 -0
  105. package/types/app/cli/command-types.d.ts.map +1 -1
  106. package/types/app/cli/common/existing.d.ts +4 -0
  107. package/types/app/cli/common/existing.d.ts.map +1 -0
  108. package/types/app/cli/common/parsing.d.ts +15 -0
  109. package/types/app/cli/common/parsing.d.ts.map +1 -0
  110. package/types/app/cli/export.d.ts +8 -0
  111. package/types/app/cli/export.d.ts.map +1 -0
  112. package/types/app/cli/incept.d.ts +8 -0
  113. package/types/app/cli/incept.d.ts.map +1 -0
  114. package/types/app/cli/index.d.ts +10 -0
  115. package/types/app/cli/index.d.ts.map +1 -0
  116. package/types/app/cli/init.d.ts +5 -0
  117. package/types/app/cli/init.d.ts.map +1 -1
  118. package/types/app/configing.d.ts +57 -0
  119. package/types/app/configing.d.ts.map +1 -0
  120. package/types/app/habbing.d.ts +107 -0
  121. package/types/app/habbing.d.ts.map +1 -0
  122. package/types/app/index.d.ts +11 -0
  123. package/types/app/index.d.ts.map +1 -0
  124. package/types/app/keeping.d.ts +72 -0
  125. package/types/app/keeping.d.ts.map +1 -0
  126. package/types/app/version.d.ts +2 -2
  127. package/types/app/version.d.ts.map +1 -1
  128. package/types/db/basing.d.ts +16 -1
  129. package/types/db/basing.d.ts.map +1 -1
  130. package/types/db/core/lmdber.d.ts +8 -4
  131. package/types/db/core/lmdber.d.ts.map +1 -1
  132. package/types/db/core/path-manager.d.ts +88 -24
  133. package/types/db/core/path-manager.d.ts.map +1 -1
  134. package/types/db/index.d.ts +1 -0
  135. package/types/db/index.d.ts.map +1 -1
  136. package/types/db/keeping.d.ts +73 -0
  137. package/types/db/keeping.d.ts.map +1 -0
  138. package/types/deps/jsr.io/@std/internal/1.0.12/_os.d.ts +2 -0
  139. package/types/deps/jsr.io/@std/internal/1.0.12/_os.d.ts.map +1 -0
  140. package/types/deps/jsr.io/@std/internal/1.0.12/os.d.ts +3 -0
  141. package/types/deps/jsr.io/@std/internal/1.0.12/os.d.ts.map +1 -0
  142. package/types/deps/jsr.io/@std/path/1.1.4/_common/assert_path.d.ts +2 -0
  143. package/types/deps/jsr.io/@std/path/1.1.4/_common/assert_path.d.ts.map +1 -0
  144. package/types/deps/jsr.io/@std/path/1.1.4/_common/basename.d.ts +4 -0
  145. package/types/deps/jsr.io/@std/path/1.1.4/_common/basename.d.ts.map +1 -0
  146. package/types/deps/jsr.io/@std/path/1.1.4/_common/common.d.ts +2 -0
  147. package/types/deps/jsr.io/@std/path/1.1.4/_common/common.d.ts.map +1 -0
  148. package/types/deps/jsr.io/@std/path/1.1.4/_common/constants.d.ts +40 -0
  149. package/types/deps/jsr.io/@std/path/1.1.4/_common/constants.d.ts.map +1 -0
  150. package/types/deps/jsr.io/@std/path/1.1.4/_common/dirname.d.ts +2 -0
  151. package/types/deps/jsr.io/@std/path/1.1.4/_common/dirname.d.ts.map +1 -0
  152. package/types/deps/jsr.io/@std/path/1.1.4/_common/format.d.ts +4 -0
  153. package/types/deps/jsr.io/@std/path/1.1.4/_common/format.d.ts.map +1 -0
  154. package/types/deps/jsr.io/@std/path/1.1.4/_common/from_file_url.d.ts +2 -0
  155. package/types/deps/jsr.io/@std/path/1.1.4/_common/from_file_url.d.ts.map +1 -0
  156. package/types/deps/jsr.io/@std/path/1.1.4/_common/glob_to_reg_exp.d.ts +35 -0
  157. package/types/deps/jsr.io/@std/path/1.1.4/_common/glob_to_reg_exp.d.ts.map +1 -0
  158. package/types/deps/jsr.io/@std/path/1.1.4/_common/normalize.d.ts +2 -0
  159. package/types/deps/jsr.io/@std/path/1.1.4/_common/normalize.d.ts.map +1 -0
  160. package/types/deps/jsr.io/@std/path/1.1.4/_common/normalize_string.d.ts +2 -0
  161. package/types/deps/jsr.io/@std/path/1.1.4/_common/normalize_string.d.ts.map +1 -0
  162. package/types/deps/jsr.io/@std/path/1.1.4/_common/relative.d.ts +2 -0
  163. package/types/deps/jsr.io/@std/path/1.1.4/_common/relative.d.ts.map +1 -0
  164. package/types/deps/jsr.io/@std/path/1.1.4/_common/strip_trailing_separators.d.ts +2 -0
  165. package/types/deps/jsr.io/@std/path/1.1.4/_common/strip_trailing_separators.d.ts.map +1 -0
  166. package/types/deps/jsr.io/@std/path/1.1.4/_common/to_file_url.d.ts +2 -0
  167. package/types/deps/jsr.io/@std/path/1.1.4/_common/to_file_url.d.ts.map +1 -0
  168. package/types/deps/jsr.io/@std/path/1.1.4/basename.d.ts +27 -0
  169. package/types/deps/jsr.io/@std/path/1.1.4/basename.d.ts.map +1 -0
  170. package/types/deps/jsr.io/@std/path/1.1.4/common.d.ts +28 -0
  171. package/types/deps/jsr.io/@std/path/1.1.4/common.d.ts.map +1 -0
  172. package/types/deps/jsr.io/@std/path/1.1.4/constants.d.ts +15 -0
  173. package/types/deps/jsr.io/@std/path/1.1.4/constants.d.ts.map +1 -0
  174. package/types/deps/jsr.io/@std/path/1.1.4/dirname.d.ts +22 -0
  175. package/types/deps/jsr.io/@std/path/1.1.4/dirname.d.ts.map +1 -0
  176. package/types/deps/jsr.io/@std/path/1.1.4/extname.d.ts +22 -0
  177. package/types/deps/jsr.io/@std/path/1.1.4/extname.d.ts.map +1 -0
  178. package/types/deps/jsr.io/@std/path/1.1.4/format.d.ts +22 -0
  179. package/types/deps/jsr.io/@std/path/1.1.4/format.d.ts.map +1 -0
  180. package/types/deps/jsr.io/@std/path/1.1.4/from_file_url.d.ts +22 -0
  181. package/types/deps/jsr.io/@std/path/1.1.4/from_file_url.d.ts.map +1 -0
  182. package/types/deps/jsr.io/@std/path/1.1.4/glob_to_regexp.d.ts +77 -0
  183. package/types/deps/jsr.io/@std/path/1.1.4/glob_to_regexp.d.ts.map +1 -0
  184. package/types/deps/jsr.io/@std/path/1.1.4/is_absolute.d.ts +22 -0
  185. package/types/deps/jsr.io/@std/path/1.1.4/is_absolute.d.ts.map +1 -0
  186. package/types/deps/jsr.io/@std/path/1.1.4/is_glob.d.ts +17 -0
  187. package/types/deps/jsr.io/@std/path/1.1.4/is_glob.d.ts.map +1 -0
  188. package/types/deps/jsr.io/@std/path/1.1.4/join.d.ts +23 -0
  189. package/types/deps/jsr.io/@std/path/1.1.4/join.d.ts.map +1 -0
  190. package/types/deps/jsr.io/@std/path/1.1.4/join_globs.d.ts +28 -0
  191. package/types/deps/jsr.io/@std/path/1.1.4/join_globs.d.ts.map +1 -0
  192. package/types/deps/jsr.io/@std/path/1.1.4/mod.d.ts +213 -0
  193. package/types/deps/jsr.io/@std/path/1.1.4/mod.d.ts.map +1 -0
  194. package/types/deps/jsr.io/@std/path/1.1.4/normalize.d.ts +26 -0
  195. package/types/deps/jsr.io/@std/path/1.1.4/normalize.d.ts.map +1 -0
  196. package/types/deps/jsr.io/@std/path/1.1.4/normalize_glob.d.ts +29 -0
  197. package/types/deps/jsr.io/@std/path/1.1.4/normalize_glob.d.ts.map +1 -0
  198. package/types/deps/jsr.io/@std/path/1.1.4/parse.d.ts +35 -0
  199. package/types/deps/jsr.io/@std/path/1.1.4/parse.d.ts.map +1 -0
  200. package/types/deps/jsr.io/@std/path/1.1.4/posix/_util.d.ts +2 -0
  201. package/types/deps/jsr.io/@std/path/1.1.4/posix/_util.d.ts.map +1 -0
  202. package/types/deps/jsr.io/@std/path/1.1.4/posix/basename.d.ts +39 -0
  203. package/types/deps/jsr.io/@std/path/1.1.4/posix/basename.d.ts.map +1 -0
  204. package/types/deps/jsr.io/@std/path/1.1.4/posix/constants.d.ts +13 -0
  205. package/types/deps/jsr.io/@std/path/1.1.4/posix/constants.d.ts.map +1 -0
  206. package/types/deps/jsr.io/@std/path/1.1.4/posix/dirname.d.ts +30 -0
  207. package/types/deps/jsr.io/@std/path/1.1.4/posix/dirname.d.ts.map +1 -0
  208. package/types/deps/jsr.io/@std/path/1.1.4/posix/extname.d.ts +37 -0
  209. package/types/deps/jsr.io/@std/path/1.1.4/posix/extname.d.ts.map +1 -0
  210. package/types/deps/jsr.io/@std/path/1.1.4/posix/format.d.ts +24 -0
  211. package/types/deps/jsr.io/@std/path/1.1.4/posix/format.d.ts.map +1 -0
  212. package/types/deps/jsr.io/@std/path/1.1.4/posix/from_file_url.d.ts +16 -0
  213. package/types/deps/jsr.io/@std/path/1.1.4/posix/from_file_url.d.ts.map +1 -0
  214. package/types/deps/jsr.io/@std/path/1.1.4/posix/glob_to_regexp.d.ts +72 -0
  215. package/types/deps/jsr.io/@std/path/1.1.4/posix/glob_to_regexp.d.ts.map +1 -0
  216. package/types/deps/jsr.io/@std/path/1.1.4/posix/is_absolute.d.ts +17 -0
  217. package/types/deps/jsr.io/@std/path/1.1.4/posix/is_absolute.d.ts.map +1 -0
  218. package/types/deps/jsr.io/@std/path/1.1.4/posix/join.d.ts +31 -0
  219. package/types/deps/jsr.io/@std/path/1.1.4/posix/join.d.ts.map +1 -0
  220. package/types/deps/jsr.io/@std/path/1.1.4/posix/join_globs.d.ts +20 -0
  221. package/types/deps/jsr.io/@std/path/1.1.4/posix/join_globs.d.ts.map +1 -0
  222. package/types/deps/jsr.io/@std/path/1.1.4/posix/normalize.d.ts +37 -0
  223. package/types/deps/jsr.io/@std/path/1.1.4/posix/normalize.d.ts.map +1 -0
  224. package/types/deps/jsr.io/@std/path/1.1.4/posix/normalize_glob.d.ts +20 -0
  225. package/types/deps/jsr.io/@std/path/1.1.4/posix/normalize_glob.d.ts.map +1 -0
  226. package/types/deps/jsr.io/@std/path/1.1.4/posix/parse.d.ts +25 -0
  227. package/types/deps/jsr.io/@std/path/1.1.4/posix/parse.d.ts.map +1 -0
  228. package/types/deps/jsr.io/@std/path/1.1.4/posix/relative.d.ts +20 -0
  229. package/types/deps/jsr.io/@std/path/1.1.4/posix/relative.d.ts.map +1 -0
  230. package/types/deps/jsr.io/@std/path/1.1.4/posix/resolve.d.ts +17 -0
  231. package/types/deps/jsr.io/@std/path/1.1.4/posix/resolve.d.ts.map +1 -0
  232. package/types/deps/jsr.io/@std/path/1.1.4/posix/to_file_url.d.ts +17 -0
  233. package/types/deps/jsr.io/@std/path/1.1.4/posix/to_file_url.d.ts.map +1 -0
  234. package/types/deps/jsr.io/@std/path/1.1.4/posix/to_namespaced_path.d.ts +16 -0
  235. package/types/deps/jsr.io/@std/path/1.1.4/posix/to_namespaced_path.d.ts.map +1 -0
  236. package/types/deps/jsr.io/@std/path/1.1.4/relative.d.ts +24 -0
  237. package/types/deps/jsr.io/@std/path/1.1.4/relative.d.ts.map +1 -0
  238. package/types/deps/jsr.io/@std/path/1.1.4/resolve.d.ts +22 -0
  239. package/types/deps/jsr.io/@std/path/1.1.4/resolve.d.ts.map +1 -0
  240. package/types/deps/jsr.io/@std/path/1.1.4/to_file_url.d.ts +22 -0
  241. package/types/deps/jsr.io/@std/path/1.1.4/to_file_url.d.ts.map +1 -0
  242. package/types/deps/jsr.io/@std/path/1.1.4/to_namespaced_path.d.ts +21 -0
  243. package/types/deps/jsr.io/@std/path/1.1.4/to_namespaced_path.d.ts.map +1 -0
  244. package/types/deps/jsr.io/@std/path/1.1.4/types.d.ts +38 -0
  245. package/types/deps/jsr.io/@std/path/1.1.4/types.d.ts.map +1 -0
  246. package/types/deps/jsr.io/@std/path/1.1.4/windows/_util.d.ts +4 -0
  247. package/types/deps/jsr.io/@std/path/1.1.4/windows/_util.d.ts.map +1 -0
  248. package/types/deps/jsr.io/@std/path/1.1.4/windows/basename.d.ts +22 -0
  249. package/types/deps/jsr.io/@std/path/1.1.4/windows/basename.d.ts.map +1 -0
  250. package/types/deps/jsr.io/@std/path/1.1.4/windows/constants.d.ts +13 -0
  251. package/types/deps/jsr.io/@std/path/1.1.4/windows/constants.d.ts.map +1 -0
  252. package/types/deps/jsr.io/@std/path/1.1.4/windows/dirname.d.ts +17 -0
  253. package/types/deps/jsr.io/@std/path/1.1.4/windows/dirname.d.ts.map +1 -0
  254. package/types/deps/jsr.io/@std/path/1.1.4/windows/extname.d.ts +17 -0
  255. package/types/deps/jsr.io/@std/path/1.1.4/windows/extname.d.ts.map +1 -0
  256. package/types/deps/jsr.io/@std/path/1.1.4/windows/format.d.ts +24 -0
  257. package/types/deps/jsr.io/@std/path/1.1.4/windows/format.d.ts.map +1 -0
  258. package/types/deps/jsr.io/@std/path/1.1.4/windows/from_file_url.d.ts +18 -0
  259. package/types/deps/jsr.io/@std/path/1.1.4/windows/from_file_url.d.ts.map +1 -0
  260. package/types/deps/jsr.io/@std/path/1.1.4/windows/glob_to_regexp.d.ts +71 -0
  261. package/types/deps/jsr.io/@std/path/1.1.4/windows/glob_to_regexp.d.ts.map +1 -0
  262. package/types/deps/jsr.io/@std/path/1.1.4/windows/is_absolute.d.ts +17 -0
  263. package/types/deps/jsr.io/@std/path/1.1.4/windows/is_absolute.d.ts.map +1 -0
  264. package/types/deps/jsr.io/@std/path/1.1.4/windows/join.d.ts +18 -0
  265. package/types/deps/jsr.io/@std/path/1.1.4/windows/join.d.ts.map +1 -0
  266. package/types/deps/jsr.io/@std/path/1.1.4/windows/join_globs.d.ts +21 -0
  267. package/types/deps/jsr.io/@std/path/1.1.4/windows/join_globs.d.ts.map +1 -0
  268. package/types/deps/jsr.io/@std/path/1.1.4/windows/normalize.d.ts +19 -0
  269. package/types/deps/jsr.io/@std/path/1.1.4/windows/normalize.d.ts.map +1 -0
  270. package/types/deps/jsr.io/@std/path/1.1.4/windows/normalize_glob.d.ts +20 -0
  271. package/types/deps/jsr.io/@std/path/1.1.4/windows/normalize_glob.d.ts.map +1 -0
  272. package/types/deps/jsr.io/@std/path/1.1.4/windows/parse.d.ts +25 -0
  273. package/types/deps/jsr.io/@std/path/1.1.4/windows/parse.d.ts.map +1 -0
  274. package/types/deps/jsr.io/@std/path/1.1.4/windows/relative.d.ts +23 -0
  275. package/types/deps/jsr.io/@std/path/1.1.4/windows/relative.d.ts.map +1 -0
  276. package/types/deps/jsr.io/@std/path/1.1.4/windows/resolve.d.ts +17 -0
  277. package/types/deps/jsr.io/@std/path/1.1.4/windows/resolve.d.ts.map +1 -0
  278. package/types/deps/jsr.io/@std/path/1.1.4/windows/to_file_url.d.ts +17 -0
  279. package/types/deps/jsr.io/@std/path/1.1.4/windows/to_file_url.d.ts.map +1 -0
  280. package/types/deps/jsr.io/@std/path/1.1.4/windows/to_namespaced_path.d.ts +17 -0
  281. package/types/deps/jsr.io/@std/path/1.1.4/windows/to_namespaced_path.d.ts.map +1 -0
  282. package/types/npm/index.d.ts +7 -2
  283. package/types/npm/index.d.ts.map +1 -1
  284. package/esm/app/cli/stub-commands.js +0 -61
  285. package/types/app/cli/stub-commands.d.ts +0 -6
  286. package/types/app/cli/stub-commands.d.ts.map +0 -1
package/README.md CHANGED
@@ -1,150 +1,74 @@
1
- # keri-ts : KERI TypeScript Library
1
+ # keri-ts
2
2
 
3
- An aspiring full implementation of the KERI, ACDC, CESR, and PTEL specifications
4
- in TypeScript.
3
+ KERI TypeScript runtime package with the `tufa` CLI.
5
4
 
6
- ### Usage
5
+ ## Install
7
6
 
8
7
  ```bash
9
- # Run the CLI
10
- deno task tufa --help
11
-
12
- # Initialize a keystore
13
- deno task tufa init --name mykeystore
14
-
15
- # Get help for specific commands
16
- deno task tufa init --help
17
-
18
- # Show CLI version
19
- deno task tufa version
20
- deno task tufa --version
21
-
22
- # Annotate a CESR file
23
- deno task tufa annotate --in samples/cesr-streams/CESR_1_0-oor-auth-vc.cesr
24
-
25
- # Annotate CESR from stdin
26
- cat samples/cesr-streams/CESR_1_0-oor-auth-vc.cesr | deno task tufa annotate
27
- ```
8
+ # As a dependency
9
+ npm install keri-ts
28
10
 
29
- ### Install CLI (`tufa`)
30
-
31
- ```bash
32
- # npm (global)
11
+ # Global CLI install
33
12
  npm install -g keri-ts
34
- tufa --help
35
-
36
- # Deno (global)
37
- deno install --global --allow-all --unstable-ffi --name tufa mod.ts
38
- tufa --help
39
-
40
- # make sure to add the Deno bin path to your PATH var
41
- export PATH="$HOME/.deno/bin:$PATH"
42
13
  ```
43
14
 
44
- ### Features
15
+ ## CLI quick start
45
16
 
46
- - TODO Fully integrates with KERIpy, KERIA, and SignifyTS, both CESR 1.0 and
47
- CESR 2.0
48
- - TODO Creates and manages keystores
49
- - TODO Parses and packs CESR streams
50
- - ✅ Provides CLI for interaction with KERI keystores (basic implementation)
51
- - TODO Provides a mailbox agent, controller agent, direct mode, and indirect
52
- mode agents.
53
- - TODO Creates, Issues, and Verifies ACDC credentials.
54
- - TODO Provides a JSON Schema server to host ACDC schemas.
55
-
56
- ### Importing library
57
-
58
- TBD
59
-
60
- ### Build scripts (Deno)
17
+ `tufa version` and `tufa annotate` are the fastest way to verify your setup.
61
18
 
62
19
  ```bash
63
- # Run CLI commands
64
- deno task tufa init --name test
20
+ # Version
21
+ tufa version
22
+ tufa --version
23
+
24
+ # Annotate CESR from file
25
+ tufa annotate --in ./mystream.cesr
65
26
 
66
- # Start server (legacy)
67
- deno task start
27
+ # Annotate from stdin
28
+ cat ./mystream.cesr | tufa annotate
68
29
  ```
69
30
 
70
- ### Versioning and Releases
31
+ ## Benchmark CESR parser
71
32
 
72
- - `keri-ts` and `cesr-ts` are versioned independently with Changesets.
73
- - Runtime CLI version strings are generated from package manifest versions.
74
- - CI builds automatically append build metadata to CLI display versions.
33
+ Benchmark any CESR stream from file or stdin:
75
34
 
76
35
  ```bash
77
- # Add a patch/minor/major release intent file
78
- deno task release:changeset
36
+ # Benchmark a stream file
37
+ tufa benchmark cesr --in ./mystream.cesr
79
38
 
80
- # Apply version bumps/changelog updates from pending changesets
81
- deno task release:version
82
-
83
- # Regenerate and verify runtime version modules
84
- deno task version:generate
85
- deno task version:check
39
+ # Benchmark from stdin with explicit chunk simulation
40
+ cat ./mystream.cesr | tufa benchmark cesr --chunk-size 256 --iterations 25 --warmup 5
86
41
  ```
87
42
 
88
- ### LMDB v1 Format Requirement
89
-
90
- **KERIpy Compatibility**: This project requires LMDB data format v1 for
91
- interoperability with KERIpy databases. The `lmdb-js` package defaults to LMDB
92
- v2 format, using v0.9.90 of LMDB, which is incompatible with databases created
93
- by KERIpy (which uses `py-lmdb` with LMDB 0.9.33).
43
+ - `--in <path>`: input file path (defaults to stdin)
44
+ - `--iterations <count>`: measured benchmark runs (default `50`)
45
+ - `--warmup <count>`: warmup runs before measurement (default `5`)
46
+ - `--chunk-size <bytes>`: chunk size for streaming simulation (`0` = full
47
+ stream)
48
+ - `--framed`: benchmark parser in framed mode
49
+ - `--compat`: benchmark parser with compat attachment dispatch mode
50
+ - `--allow-errors`: continue benchmark even when parse errors are emitted
51
+ - `--json`: print one JSON result line
94
52
 
95
- **Rebuilding lmdb with v1 support**:
96
-
97
- After installing dependencies, rebuild the `lmdb` package with v1 data format
98
- support:
53
+ ## Annotate options
99
54
 
100
55
  ```bash
101
- cd node_modules/lmdb
102
- export LMDB_DATA_V1=true
103
- npm run recompile
104
- cd ../..
56
+ tufa annotate --in <path> --out <path> --pretty
57
+ tufa annotate --qb2 --in <binary.qb2> --out <annotation.txt>
105
58
  ```
106
59
 
107
- **When to rebuild**:
108
-
109
- - After initial `npm install`
110
- - After updating the `lmdb` package
111
- - If you encounter `malloc` errors or database format incompatibility errors
112
- when opening KERIpy-created databases
60
+ - `--in <path>`: input file path (defaults to stdin)
61
+ - `--out <path>`: output file path (defaults to stdout)
62
+ - `--qb2`: parse input as qb2 binary
63
+ - `--pretty`: pretty-print annotation output
113
64
 
114
- The `malloc` error looks like the following:
65
+ ## Package entrypoints
115
66
 
116
67
  ```bash
117
- node(42074,0x1f6bde0c0) malloc: *** error for object 0x3c7e805c00e0: pointer being freed was not allocated
118
- node(42074,0x1f6bde0c0) malloc: *** set a breakpoint in malloc_error_break to debug
119
- ```
120
-
121
- **Note**: The v1 format uses LMDB 0.9.29 (via `lmdb-data-v1`), which is
122
- compatible with KERIpy's LMDB 0.9.33. Some newer LMDB features (encryption,
123
- remapping) are not available with v1 format.
124
-
125
- ## Development Notes
126
-
127
- ### Deno install locally
68
+ # CLI help
69
+ npx tufa --help
128
70
 
129
- `tufa` will show a few warnings locally unless you install it with the
130
- `--allow-scripts` option like below:
131
-
132
- ```zsh
133
- deno install --global \
134
- --config /Users/kbull/code/keri/kentbull/keri-ts/deno.json \
135
- --node-modules-dir=auto \
136
- --allow-scripts=npm:lmdb,npm:msgpackr-extract \
137
- --allow-all \
138
- --unstable-ffi \
139
- --name tufa \
140
- /Users/kbull/code/keri/kentbull/keri-ts/mod.ts
141
- ```
142
-
143
- This is because of how Deno blocks build/install scripts for installed
144
- dependencies unless explicitly allowed.
145
-
146
- You may need to warm dependencies once with the following command:
147
-
148
- ```zsh
149
- deno install --node-modules-dir=auto --allow-scripts=npm:lmdb,npm:msgpackr-extract
71
+ # From source in this repo
72
+ deno task tufa --help
73
+ deno task tufa version
150
74
  ```
@@ -1,19 +1,5 @@
1
1
  import { ValidationError } from "../../core/errors.js";
2
2
  import { startServer } from "../server.js";
3
- function printAgentHelp() {
4
- console.log(`
5
- tufa agent - Start the KERI agent server
6
-
7
- Usage: tufa agent [options]
8
-
9
- Options:
10
- --port, -p <port> Port number for the server (default: 8000)
11
- --help, -h Show this help message
12
-
13
- The agent server provides HTTP endpoints for interacting with keri-ts.
14
- The server will run until interrupted with SIGINT (Ctrl+C).
15
- `);
16
- }
17
3
  /**
18
4
  * Agent command operation - starts the HTTP server
19
5
  *
@@ -21,11 +7,6 @@ The server will run until interrupted with SIGINT (Ctrl+C).
21
7
  * @returns Operation that runs the server until shutdown
22
8
  */
23
9
  export function* agentCommand(args) {
24
- // Check for help flag
25
- if (args.help || args.h) {
26
- printAgentHelp();
27
- return;
28
- }
29
10
  // Extract port from args (default to 8000)
30
11
  const port = args.port ? Number(args.port) : 8000;
31
12
  // Validate port number
@@ -1,13 +1,18 @@
1
1
  import * as dntShim from "../../_dnt.shims.js";
2
2
  import { annotate } from "cesr-ts";
3
3
  const TEXT_DECODER = new TextDecoder();
4
+ /**
5
+ * Reads bytes from stdin in chunks of 64KB and returns them as a single Uint8Array
6
+ * @returns All bytes read from stdin
7
+ */
4
8
  function readAllStdinSync() {
5
9
  const chunks = [];
6
10
  let total = 0;
7
11
  while (true) {
8
- const chunk = new Uint8Array(64 * 1024);
9
- const read = dntShim.Deno.stdin.readSync(chunk);
12
+ const chunk = new Uint8Array(64 * 1024); // 64KB chunk size
13
+ const read = dntShim.Deno.stdin.readSync(chunk); // reads up to 64KB chunk, returns num bytes
10
14
  if (read === null) {
15
+ // read until EOF (null)
11
16
  break;
12
17
  }
13
18
  const used = chunk.subarray(0, read);
@@ -0,0 +1,210 @@
1
+ import * as dntShim from "../../_dnt.shims.js";
2
+ import { createParser } from "cesr-ts";
3
+ /**
4
+ * Synchronously consume stdin for CLI benchmark mode.
5
+ *
6
+ * Maintainer note:
7
+ * - Synchronous read keeps CLI command implementation simple and deterministic.
8
+ * - This function should remain isolated; parser benchmark internals themselves
9
+ * are IO-agnostic.
10
+ */
11
+ function readAllStdinSync() {
12
+ const chunks = [];
13
+ let total = 0;
14
+ while (true) {
15
+ const chunk = new Uint8Array(64 * 1024);
16
+ const read = dntShim.Deno.stdin.readSync(chunk);
17
+ if (read === null) {
18
+ break;
19
+ }
20
+ const used = chunk.subarray(0, read);
21
+ chunks.push(used);
22
+ total += read;
23
+ }
24
+ const output = new Uint8Array(total);
25
+ let offset = 0;
26
+ for (const chunk of chunks) {
27
+ output.set(chunk, offset);
28
+ offset += chunk.length;
29
+ }
30
+ return output;
31
+ }
32
+ /**
33
+ * Validate positive integer options with explicit field-scoped errors.
34
+ */
35
+ function asPositiveInteger(value, fallback, fieldName) {
36
+ if (value === undefined) {
37
+ return fallback;
38
+ }
39
+ if (!Number.isFinite(value) || !Number.isInteger(value) || value <= 0) {
40
+ throw new Error(`${fieldName} must be a positive integer`);
41
+ }
42
+ return value;
43
+ }
44
+ /**
45
+ * Validate non-negative integer options with explicit field-scoped errors.
46
+ */
47
+ function asNonNegativeInteger(value, fallback, fieldName) {
48
+ if (value === undefined) {
49
+ return fallback;
50
+ }
51
+ if (!Number.isFinite(value) || !Number.isInteger(value) || value < 0) {
52
+ throw new Error(`${fieldName} must be a non-negative integer`);
53
+ }
54
+ return value;
55
+ }
56
+ /**
57
+ * Normalize optional chunk sizing into a legal parse feed shape.
58
+ */
59
+ function normalizeChunkSize(chunkSize, inputLength) {
60
+ if (chunkSize <= 0 || chunkSize >= inputLength) {
61
+ return inputLength;
62
+ }
63
+ return chunkSize;
64
+ }
65
+ /**
66
+ * Build ordered chunk views over the input stream.
67
+ *
68
+ * Invariant:
69
+ * - uses `subarray` so benchmark execution does not add avoidable copy overhead.
70
+ */
71
+ function createChunks(input, chunkSize) {
72
+ if (chunkSize >= input.length) {
73
+ return [input];
74
+ }
75
+ const chunks = [];
76
+ for (let offset = 0; offset < input.length; offset += chunkSize) {
77
+ chunks.push(input.subarray(offset, Math.min(offset + chunkSize, input.length)));
78
+ }
79
+ return chunks;
80
+ }
81
+ /**
82
+ * Execute one complete parser pass and aggregate frame/error events.
83
+ */
84
+ function parseStreamOnce(input, chunkSize, parserOptions) {
85
+ const parser = createParser(parserOptions);
86
+ let frameCount = 0;
87
+ let errorCount = 0;
88
+ for (const chunk of createChunks(input, chunkSize)) {
89
+ for (const event of parser.feed(chunk)) {
90
+ if (event.type === "frame") {
91
+ frameCount++;
92
+ }
93
+ else {
94
+ errorCount++;
95
+ }
96
+ }
97
+ }
98
+ for (const event of parser.flush()) {
99
+ if (event.type === "frame") {
100
+ frameCount++;
101
+ }
102
+ else {
103
+ errorCount++;
104
+ }
105
+ }
106
+ return { frameCount, errorCount };
107
+ }
108
+ /**
109
+ * Run timed parser benchmark loop for `tufa benchmark cesr`.
110
+ *
111
+ * Boundary contract:
112
+ * - warmup runs are excluded from timing.
113
+ * - correctness remains first: parse errors fail the benchmark unless
114
+ * explicitly allowed.
115
+ */
116
+ function benchmarkParser(input, options) {
117
+ if (input.length === 0) {
118
+ throw new Error("Benchmark input stream must not be empty");
119
+ }
120
+ const iterations = asPositiveInteger(options.iterations, 50, "iterations");
121
+ const warmupIterations = asNonNegativeInteger(options.warmupIterations, 5, "warmup");
122
+ const parsedChunkSize = asNonNegativeInteger(options.chunkSize, 0, "chunkSize");
123
+ const chunkSize = normalizeChunkSize(parsedChunkSize, input.length);
124
+ const failOnParseError = !(options.allowErrors ?? false);
125
+ const parserOptions = {
126
+ framed: options.framed ?? false,
127
+ attachmentDispatchMode: options.compat ? "compat" : "strict",
128
+ };
129
+ for (let i = 0; i < warmupIterations; i++) {
130
+ parseStreamOnce(input, chunkSize, parserOptions);
131
+ }
132
+ let totalFrames = 0;
133
+ let totalErrors = 0;
134
+ const startMs = performance.now();
135
+ for (let i = 0; i < iterations; i++) {
136
+ const summary = parseStreamOnce(input, chunkSize, parserOptions);
137
+ totalFrames += summary.frameCount;
138
+ totalErrors += summary.errorCount;
139
+ if (failOnParseError && summary.errorCount > 0) {
140
+ throw new Error(`Benchmark run produced parse errors (run=${i + 1}, errorCount=${summary.errorCount})`);
141
+ }
142
+ }
143
+ const elapsedMs = Math.max(performance.now() - startMs, Number.EPSILON);
144
+ const throughputMiBPerSec = ((input.length * iterations * 1000) / elapsedMs) /
145
+ (1024 * 1024);
146
+ const framesPerSec = (totalFrames * 1000) / elapsedMs;
147
+ return {
148
+ iterations,
149
+ warmupIterations,
150
+ bytesPerIteration: input.length,
151
+ chunkSize,
152
+ totalFrames,
153
+ totalErrors,
154
+ elapsedMs,
155
+ avgIterationMs: elapsedMs / iterations,
156
+ throughputMiBPerSec,
157
+ framesPerSec,
158
+ };
159
+ }
160
+ /**
161
+ * Render maintainer-oriented benchmark output for terminal use.
162
+ */
163
+ function formatBenchmarkText(sourceLabel, result) {
164
+ const chunkLabel = result.chunkSize === result.bytesPerIteration
165
+ ? "full stream"
166
+ : `${result.chunkSize} bytes`;
167
+ return [
168
+ "CESR parser benchmark",
169
+ `source: ${sourceLabel}`,
170
+ `iterations: ${result.iterations} (warmup: ${result.warmupIterations})`,
171
+ `input bytes/iteration: ${result.bytesPerIteration}`,
172
+ `chunk size: ${chunkLabel}`,
173
+ `frames/iteration: ${(result.totalFrames / result.iterations).toFixed(2)}`,
174
+ `errors/iteration: ${(result.totalErrors / result.iterations).toFixed(2)}`,
175
+ `avg iteration: ${result.avgIterationMs.toFixed(3)} ms`,
176
+ `throughput: ${result.throughputMiBPerSec.toFixed(3)} MiB/s`,
177
+ `frame rate: ${result.framesPerSec.toFixed(2)} frames/s`,
178
+ ].join("\n");
179
+ }
180
+ // deno-lint-ignore require-yield
181
+ /**
182
+ * Effection command handler for `tufa benchmark cesr`.
183
+ *
184
+ * Responsibility boundary:
185
+ * - parse command options from dispatch args,
186
+ * - read stream input from file/stdin,
187
+ * - execute benchmark and emit one result payload (text or JSON).
188
+ */
189
+ export function* benchmarkCommand(args) {
190
+ const options = {
191
+ inPath: args.inPath,
192
+ iterations: args.iterations,
193
+ warmupIterations: args.warmupIterations,
194
+ chunkSize: args.chunkSize,
195
+ framed: args.framed,
196
+ compat: args.compat,
197
+ allowErrors: args.allowErrors,
198
+ json: args.json,
199
+ };
200
+ const sourceLabel = options.inPath ? options.inPath : "stdin";
201
+ const inputBytes = options.inPath
202
+ ? dntShim.Deno.readFileSync(options.inPath)
203
+ : readAllStdinSync();
204
+ const result = benchmarkParser(inputBytes, options);
205
+ if (options.json) {
206
+ console.log(JSON.stringify({ source: sourceLabel, ...result }));
207
+ return;
208
+ }
209
+ console.log(formatBenchmarkText(sourceLabel, result));
210
+ }
@@ -1,9 +1,8 @@
1
1
  import * as dntShim from "../../_dnt.shims.js";
2
2
  import { Command } from "commander";
3
3
  import { AppError } from "../../core/errors.js";
4
- import { createCoreCommandHandlers, registerCoreCommands, } from "./command-definitions.js";
5
- import { createStubCommandHandlers, isStubCommandsEnabled, registerStubCommands, } from "./stub-commands.js";
6
4
  import { DISPLAY_VERSION } from "../version.js";
5
+ import { createCmdHandlers, registerCmds } from "./command-definitions.js";
7
6
  /**
8
7
  * Create the CLI program with action handlers that signal command execution.
9
8
  * Command declaration is delegated to focused command modules.
@@ -13,68 +12,67 @@ function createCLIProgram(onCommand) {
13
12
  program.name("tufa").version(DISPLAY_VERSION).description("Trust Utilities for Agents CLI");
14
13
  // Prevent Commander from exiting automatically so we can run Effection operations
15
14
  program.exitOverride();
16
- registerCoreCommands(program, onCommand);
17
- if (isStubCommandsEnabled()) {
18
- registerStubCommands(program, onCommand);
19
- }
15
+ registerCmds(program, onCommand);
20
16
  return program;
21
17
  }
18
+ function parseCLIArgs(program, args) {
19
+ // Commander expects full argv or args array.
20
+ // In Deno, Deno.args gives us the arguments without executable info.
21
+ const argsToParse = args.length > 0 ? args : dntShim.Deno.args;
22
+ program.parse(argsToParse, { from: "user" });
23
+ }
24
+ function isCommanderExitError(error) {
25
+ return !!(error && typeof error === "object" && "code" in error);
26
+ }
27
+ function isExpectedCommanderExit(code) {
28
+ return (code === "commander.help" ||
29
+ code === "commander.helpDisplayed" ||
30
+ code === "commander.version" ||
31
+ code === "commander.unknownCommand" ||
32
+ code === "commander.missingArgument");
33
+ }
34
+ function handleParseError(error) {
35
+ if (isCommanderExitError(error) && isExpectedCommanderExit(error.code)) {
36
+ // Commander already printed any relevant help/error output.
37
+ return;
38
+ }
39
+ const message = error instanceof Error ? error.message : String(error);
40
+ if (error instanceof AppError && error.context) {
41
+ console.error(`Error: ${message}`, error.context);
42
+ }
43
+ else {
44
+ console.error(`Error: ${message}`);
45
+ }
46
+ throw error;
47
+ }
48
+ function* runCmd(selection, commandHandlers) {
49
+ if (!selection) {
50
+ return;
51
+ }
52
+ const handler = commandHandlers.get(selection.name);
53
+ if (!handler) {
54
+ return;
55
+ }
56
+ // Execute command operation within Effection's structured concurrency.
57
+ yield* handler(selection.args);
58
+ }
22
59
  /**
23
60
  * Main CLI operation - runs within Effection's structured concurrency
24
61
  * This is the outermost runtime, not JavaScript's event loop
25
62
  */
26
63
  export function* tufa(args = []) {
27
- const executionContext = {};
28
- const commandHandlers = createCoreCommandHandlers();
29
- if (isStubCommandsEnabled()) {
30
- for (const [key, handler] of createStubCommandHandlers()) {
31
- commandHandlers.set(key, handler);
32
- }
33
- }
64
+ const dispatch = {};
65
+ const commandHandlers = createCmdHandlers();
34
66
  // Use Commander.js for all command parsing
35
67
  const program = createCLIProgram((next) => {
36
- executionContext.selection = next;
68
+ dispatch.selection = next;
37
69
  });
38
70
  try {
39
- // Parse arguments - Commander expects full argv or args array
40
- // In Deno, Deno.args gives us the arguments without the executable info
41
- const argsToParse = args.length > 0 ? args : dntShim.Deno.args;
42
- program.parse(argsToParse, { from: "user" });
71
+ parseCLIArgs(program, args);
43
72
  }
44
73
  catch (error) {
45
- // Handle Commander-specific errors
46
- if (error && typeof error === "object" && "code" in error) {
47
- const commanderError = error;
48
- // Help was requested - Commander already printed it, just return
49
- if (commanderError.code === "commander.help" ||
50
- commanderError.code === "commander.helpDisplayed" ||
51
- commanderError.code === "commander.version") {
52
- return;
53
- }
54
- // Unknown command or other parsing errors - Commander already printed the error
55
- if (commanderError.code === "commander.unknownCommand" ||
56
- commanderError.code === "commander.missingArgument") {
57
- // Commander already printed the error message, just exit gracefully
58
- return;
59
- }
60
- }
61
- // For other errors, log and rethrow
62
- const message = error instanceof Error ? error.message : String(error);
63
- if (error instanceof AppError && error.context) {
64
- console.error(`Error: ${message}`, error.context);
65
- }
66
- else {
67
- console.error(`Error: ${message}`);
68
- }
69
- throw error;
70
- }
71
- // Execute the appropriate command operation based on context
72
- const selected = executionContext.selection;
73
- if (selected) {
74
- const handler = commandHandlers.get(selected.name);
75
- if (handler) {
76
- // Execute the command operation within Effection's structured concurrency
77
- yield* handler(selected.args);
78
- }
74
+ handleParseError(error);
75
+ return;
79
76
  }
77
+ yield* runCmd(dispatch.selection, commandHandlers);
80
78
  }