keri-ts 0.2.3 → 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 (282) hide show
  1. package/README.md +57 -8
  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 +2 -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 +3 -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/package.json +4 -2
  96. package/types/app/cli/agent.d.ts.map +1 -1
  97. package/types/app/cli/annotate.d.ts.map +1 -1
  98. package/types/app/cli/benchmark.d.ts +11 -0
  99. package/types/app/cli/benchmark.d.ts.map +1 -0
  100. package/types/app/cli/cli.d.ts.map +1 -1
  101. package/types/app/cli/command-definitions.d.ts +5 -2
  102. package/types/app/cli/command-definitions.d.ts.map +1 -1
  103. package/types/app/cli/command-types.d.ts +12 -0
  104. package/types/app/cli/command-types.d.ts.map +1 -1
  105. package/types/app/cli/common/existing.d.ts +4 -0
  106. package/types/app/cli/common/existing.d.ts.map +1 -0
  107. package/types/app/cli/common/parsing.d.ts +15 -0
  108. package/types/app/cli/common/parsing.d.ts.map +1 -0
  109. package/types/app/cli/export.d.ts +8 -0
  110. package/types/app/cli/export.d.ts.map +1 -0
  111. package/types/app/cli/incept.d.ts +8 -0
  112. package/types/app/cli/incept.d.ts.map +1 -0
  113. package/types/app/cli/index.d.ts +2 -0
  114. package/types/app/cli/index.d.ts.map +1 -1
  115. package/types/app/cli/init.d.ts +5 -0
  116. package/types/app/cli/init.d.ts.map +1 -1
  117. package/types/app/configing.d.ts +57 -0
  118. package/types/app/configing.d.ts.map +1 -0
  119. package/types/app/habbing.d.ts +107 -0
  120. package/types/app/habbing.d.ts.map +1 -0
  121. package/types/app/index.d.ts +3 -0
  122. package/types/app/index.d.ts.map +1 -1
  123. package/types/app/keeping.d.ts +72 -0
  124. package/types/app/keeping.d.ts.map +1 -0
  125. package/types/app/version.d.ts +2 -2
  126. package/types/db/basing.d.ts +16 -1
  127. package/types/db/basing.d.ts.map +1 -1
  128. package/types/db/core/lmdber.d.ts +8 -4
  129. package/types/db/core/lmdber.d.ts.map +1 -1
  130. package/types/db/core/path-manager.d.ts +88 -24
  131. package/types/db/core/path-manager.d.ts.map +1 -1
  132. package/types/db/index.d.ts +1 -0
  133. package/types/db/index.d.ts.map +1 -1
  134. package/types/db/keeping.d.ts +73 -0
  135. package/types/db/keeping.d.ts.map +1 -0
  136. package/types/deps/jsr.io/@std/internal/1.0.12/_os.d.ts +2 -0
  137. package/types/deps/jsr.io/@std/internal/1.0.12/_os.d.ts.map +1 -0
  138. package/types/deps/jsr.io/@std/internal/1.0.12/os.d.ts +3 -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/path/1.1.4/_common/assert_path.d.ts +2 -0
  141. package/types/deps/jsr.io/@std/path/1.1.4/_common/assert_path.d.ts.map +1 -0
  142. package/types/deps/jsr.io/@std/path/1.1.4/_common/basename.d.ts +4 -0
  143. package/types/deps/jsr.io/@std/path/1.1.4/_common/basename.d.ts.map +1 -0
  144. package/types/deps/jsr.io/@std/path/1.1.4/_common/common.d.ts +2 -0
  145. package/types/deps/jsr.io/@std/path/1.1.4/_common/common.d.ts.map +1 -0
  146. package/types/deps/jsr.io/@std/path/1.1.4/_common/constants.d.ts +40 -0
  147. package/types/deps/jsr.io/@std/path/1.1.4/_common/constants.d.ts.map +1 -0
  148. package/types/deps/jsr.io/@std/path/1.1.4/_common/dirname.d.ts +2 -0
  149. package/types/deps/jsr.io/@std/path/1.1.4/_common/dirname.d.ts.map +1 -0
  150. package/types/deps/jsr.io/@std/path/1.1.4/_common/format.d.ts +4 -0
  151. package/types/deps/jsr.io/@std/path/1.1.4/_common/format.d.ts.map +1 -0
  152. package/types/deps/jsr.io/@std/path/1.1.4/_common/from_file_url.d.ts +2 -0
  153. package/types/deps/jsr.io/@std/path/1.1.4/_common/from_file_url.d.ts.map +1 -0
  154. package/types/deps/jsr.io/@std/path/1.1.4/_common/glob_to_reg_exp.d.ts +35 -0
  155. package/types/deps/jsr.io/@std/path/1.1.4/_common/glob_to_reg_exp.d.ts.map +1 -0
  156. package/types/deps/jsr.io/@std/path/1.1.4/_common/normalize.d.ts +2 -0
  157. package/types/deps/jsr.io/@std/path/1.1.4/_common/normalize.d.ts.map +1 -0
  158. package/types/deps/jsr.io/@std/path/1.1.4/_common/normalize_string.d.ts +2 -0
  159. package/types/deps/jsr.io/@std/path/1.1.4/_common/normalize_string.d.ts.map +1 -0
  160. package/types/deps/jsr.io/@std/path/1.1.4/_common/relative.d.ts +2 -0
  161. package/types/deps/jsr.io/@std/path/1.1.4/_common/relative.d.ts.map +1 -0
  162. package/types/deps/jsr.io/@std/path/1.1.4/_common/strip_trailing_separators.d.ts +2 -0
  163. package/types/deps/jsr.io/@std/path/1.1.4/_common/strip_trailing_separators.d.ts.map +1 -0
  164. package/types/deps/jsr.io/@std/path/1.1.4/_common/to_file_url.d.ts +2 -0
  165. package/types/deps/jsr.io/@std/path/1.1.4/_common/to_file_url.d.ts.map +1 -0
  166. package/types/deps/jsr.io/@std/path/1.1.4/basename.d.ts +27 -0
  167. package/types/deps/jsr.io/@std/path/1.1.4/basename.d.ts.map +1 -0
  168. package/types/deps/jsr.io/@std/path/1.1.4/common.d.ts +28 -0
  169. package/types/deps/jsr.io/@std/path/1.1.4/common.d.ts.map +1 -0
  170. package/types/deps/jsr.io/@std/path/1.1.4/constants.d.ts +15 -0
  171. package/types/deps/jsr.io/@std/path/1.1.4/constants.d.ts.map +1 -0
  172. package/types/deps/jsr.io/@std/path/1.1.4/dirname.d.ts +22 -0
  173. package/types/deps/jsr.io/@std/path/1.1.4/dirname.d.ts.map +1 -0
  174. package/types/deps/jsr.io/@std/path/1.1.4/extname.d.ts +22 -0
  175. package/types/deps/jsr.io/@std/path/1.1.4/extname.d.ts.map +1 -0
  176. package/types/deps/jsr.io/@std/path/1.1.4/format.d.ts +22 -0
  177. package/types/deps/jsr.io/@std/path/1.1.4/format.d.ts.map +1 -0
  178. package/types/deps/jsr.io/@std/path/1.1.4/from_file_url.d.ts +22 -0
  179. package/types/deps/jsr.io/@std/path/1.1.4/from_file_url.d.ts.map +1 -0
  180. package/types/deps/jsr.io/@std/path/1.1.4/glob_to_regexp.d.ts +77 -0
  181. package/types/deps/jsr.io/@std/path/1.1.4/glob_to_regexp.d.ts.map +1 -0
  182. package/types/deps/jsr.io/@std/path/1.1.4/is_absolute.d.ts +22 -0
  183. package/types/deps/jsr.io/@std/path/1.1.4/is_absolute.d.ts.map +1 -0
  184. package/types/deps/jsr.io/@std/path/1.1.4/is_glob.d.ts +17 -0
  185. package/types/deps/jsr.io/@std/path/1.1.4/is_glob.d.ts.map +1 -0
  186. package/types/deps/jsr.io/@std/path/1.1.4/join.d.ts +23 -0
  187. package/types/deps/jsr.io/@std/path/1.1.4/join.d.ts.map +1 -0
  188. package/types/deps/jsr.io/@std/path/1.1.4/join_globs.d.ts +28 -0
  189. package/types/deps/jsr.io/@std/path/1.1.4/join_globs.d.ts.map +1 -0
  190. package/types/deps/jsr.io/@std/path/1.1.4/mod.d.ts +213 -0
  191. package/types/deps/jsr.io/@std/path/1.1.4/mod.d.ts.map +1 -0
  192. package/types/deps/jsr.io/@std/path/1.1.4/normalize.d.ts +26 -0
  193. package/types/deps/jsr.io/@std/path/1.1.4/normalize.d.ts.map +1 -0
  194. package/types/deps/jsr.io/@std/path/1.1.4/normalize_glob.d.ts +29 -0
  195. package/types/deps/jsr.io/@std/path/1.1.4/normalize_glob.d.ts.map +1 -0
  196. package/types/deps/jsr.io/@std/path/1.1.4/parse.d.ts +35 -0
  197. package/types/deps/jsr.io/@std/path/1.1.4/parse.d.ts.map +1 -0
  198. package/types/deps/jsr.io/@std/path/1.1.4/posix/_util.d.ts +2 -0
  199. package/types/deps/jsr.io/@std/path/1.1.4/posix/_util.d.ts.map +1 -0
  200. package/types/deps/jsr.io/@std/path/1.1.4/posix/basename.d.ts +39 -0
  201. package/types/deps/jsr.io/@std/path/1.1.4/posix/basename.d.ts.map +1 -0
  202. package/types/deps/jsr.io/@std/path/1.1.4/posix/constants.d.ts +13 -0
  203. package/types/deps/jsr.io/@std/path/1.1.4/posix/constants.d.ts.map +1 -0
  204. package/types/deps/jsr.io/@std/path/1.1.4/posix/dirname.d.ts +30 -0
  205. package/types/deps/jsr.io/@std/path/1.1.4/posix/dirname.d.ts.map +1 -0
  206. package/types/deps/jsr.io/@std/path/1.1.4/posix/extname.d.ts +37 -0
  207. package/types/deps/jsr.io/@std/path/1.1.4/posix/extname.d.ts.map +1 -0
  208. package/types/deps/jsr.io/@std/path/1.1.4/posix/format.d.ts +24 -0
  209. package/types/deps/jsr.io/@std/path/1.1.4/posix/format.d.ts.map +1 -0
  210. package/types/deps/jsr.io/@std/path/1.1.4/posix/from_file_url.d.ts +16 -0
  211. package/types/deps/jsr.io/@std/path/1.1.4/posix/from_file_url.d.ts.map +1 -0
  212. package/types/deps/jsr.io/@std/path/1.1.4/posix/glob_to_regexp.d.ts +72 -0
  213. package/types/deps/jsr.io/@std/path/1.1.4/posix/glob_to_regexp.d.ts.map +1 -0
  214. package/types/deps/jsr.io/@std/path/1.1.4/posix/is_absolute.d.ts +17 -0
  215. package/types/deps/jsr.io/@std/path/1.1.4/posix/is_absolute.d.ts.map +1 -0
  216. package/types/deps/jsr.io/@std/path/1.1.4/posix/join.d.ts +31 -0
  217. package/types/deps/jsr.io/@std/path/1.1.4/posix/join.d.ts.map +1 -0
  218. package/types/deps/jsr.io/@std/path/1.1.4/posix/join_globs.d.ts +20 -0
  219. package/types/deps/jsr.io/@std/path/1.1.4/posix/join_globs.d.ts.map +1 -0
  220. package/types/deps/jsr.io/@std/path/1.1.4/posix/normalize.d.ts +37 -0
  221. package/types/deps/jsr.io/@std/path/1.1.4/posix/normalize.d.ts.map +1 -0
  222. package/types/deps/jsr.io/@std/path/1.1.4/posix/normalize_glob.d.ts +20 -0
  223. package/types/deps/jsr.io/@std/path/1.1.4/posix/normalize_glob.d.ts.map +1 -0
  224. package/types/deps/jsr.io/@std/path/1.1.4/posix/parse.d.ts +25 -0
  225. package/types/deps/jsr.io/@std/path/1.1.4/posix/parse.d.ts.map +1 -0
  226. package/types/deps/jsr.io/@std/path/1.1.4/posix/relative.d.ts +20 -0
  227. package/types/deps/jsr.io/@std/path/1.1.4/posix/relative.d.ts.map +1 -0
  228. package/types/deps/jsr.io/@std/path/1.1.4/posix/resolve.d.ts +17 -0
  229. package/types/deps/jsr.io/@std/path/1.1.4/posix/resolve.d.ts.map +1 -0
  230. package/types/deps/jsr.io/@std/path/1.1.4/posix/to_file_url.d.ts +17 -0
  231. package/types/deps/jsr.io/@std/path/1.1.4/posix/to_file_url.d.ts.map +1 -0
  232. package/types/deps/jsr.io/@std/path/1.1.4/posix/to_namespaced_path.d.ts +16 -0
  233. package/types/deps/jsr.io/@std/path/1.1.4/posix/to_namespaced_path.d.ts.map +1 -0
  234. package/types/deps/jsr.io/@std/path/1.1.4/relative.d.ts +24 -0
  235. package/types/deps/jsr.io/@std/path/1.1.4/relative.d.ts.map +1 -0
  236. package/types/deps/jsr.io/@std/path/1.1.4/resolve.d.ts +22 -0
  237. package/types/deps/jsr.io/@std/path/1.1.4/resolve.d.ts.map +1 -0
  238. package/types/deps/jsr.io/@std/path/1.1.4/to_file_url.d.ts +22 -0
  239. package/types/deps/jsr.io/@std/path/1.1.4/to_file_url.d.ts.map +1 -0
  240. package/types/deps/jsr.io/@std/path/1.1.4/to_namespaced_path.d.ts +21 -0
  241. package/types/deps/jsr.io/@std/path/1.1.4/to_namespaced_path.d.ts.map +1 -0
  242. package/types/deps/jsr.io/@std/path/1.1.4/types.d.ts +38 -0
  243. package/types/deps/jsr.io/@std/path/1.1.4/types.d.ts.map +1 -0
  244. package/types/deps/jsr.io/@std/path/1.1.4/windows/_util.d.ts +4 -0
  245. package/types/deps/jsr.io/@std/path/1.1.4/windows/_util.d.ts.map +1 -0
  246. package/types/deps/jsr.io/@std/path/1.1.4/windows/basename.d.ts +22 -0
  247. package/types/deps/jsr.io/@std/path/1.1.4/windows/basename.d.ts.map +1 -0
  248. package/types/deps/jsr.io/@std/path/1.1.4/windows/constants.d.ts +13 -0
  249. package/types/deps/jsr.io/@std/path/1.1.4/windows/constants.d.ts.map +1 -0
  250. package/types/deps/jsr.io/@std/path/1.1.4/windows/dirname.d.ts +17 -0
  251. package/types/deps/jsr.io/@std/path/1.1.4/windows/dirname.d.ts.map +1 -0
  252. package/types/deps/jsr.io/@std/path/1.1.4/windows/extname.d.ts +17 -0
  253. package/types/deps/jsr.io/@std/path/1.1.4/windows/extname.d.ts.map +1 -0
  254. package/types/deps/jsr.io/@std/path/1.1.4/windows/format.d.ts +24 -0
  255. package/types/deps/jsr.io/@std/path/1.1.4/windows/format.d.ts.map +1 -0
  256. package/types/deps/jsr.io/@std/path/1.1.4/windows/from_file_url.d.ts +18 -0
  257. package/types/deps/jsr.io/@std/path/1.1.4/windows/from_file_url.d.ts.map +1 -0
  258. package/types/deps/jsr.io/@std/path/1.1.4/windows/glob_to_regexp.d.ts +71 -0
  259. package/types/deps/jsr.io/@std/path/1.1.4/windows/glob_to_regexp.d.ts.map +1 -0
  260. package/types/deps/jsr.io/@std/path/1.1.4/windows/is_absolute.d.ts +17 -0
  261. package/types/deps/jsr.io/@std/path/1.1.4/windows/is_absolute.d.ts.map +1 -0
  262. package/types/deps/jsr.io/@std/path/1.1.4/windows/join.d.ts +18 -0
  263. package/types/deps/jsr.io/@std/path/1.1.4/windows/join.d.ts.map +1 -0
  264. package/types/deps/jsr.io/@std/path/1.1.4/windows/join_globs.d.ts +21 -0
  265. package/types/deps/jsr.io/@std/path/1.1.4/windows/join_globs.d.ts.map +1 -0
  266. package/types/deps/jsr.io/@std/path/1.1.4/windows/normalize.d.ts +19 -0
  267. package/types/deps/jsr.io/@std/path/1.1.4/windows/normalize.d.ts.map +1 -0
  268. package/types/deps/jsr.io/@std/path/1.1.4/windows/normalize_glob.d.ts +20 -0
  269. package/types/deps/jsr.io/@std/path/1.1.4/windows/normalize_glob.d.ts.map +1 -0
  270. package/types/deps/jsr.io/@std/path/1.1.4/windows/parse.d.ts +25 -0
  271. package/types/deps/jsr.io/@std/path/1.1.4/windows/parse.d.ts.map +1 -0
  272. package/types/deps/jsr.io/@std/path/1.1.4/windows/relative.d.ts +23 -0
  273. package/types/deps/jsr.io/@std/path/1.1.4/windows/relative.d.ts.map +1 -0
  274. package/types/deps/jsr.io/@std/path/1.1.4/windows/resolve.d.ts +17 -0
  275. package/types/deps/jsr.io/@std/path/1.1.4/windows/resolve.d.ts.map +1 -0
  276. package/types/deps/jsr.io/@std/path/1.1.4/windows/to_file_url.d.ts +17 -0
  277. package/types/deps/jsr.io/@std/path/1.1.4/windows/to_file_url.d.ts.map +1 -0
  278. package/types/deps/jsr.io/@std/path/1.1.4/windows/to_namespaced_path.d.ts +17 -0
  279. package/types/deps/jsr.io/@std/path/1.1.4/windows/to_namespaced_path.d.ts.map +1 -0
  280. package/esm/app/cli/stub-commands.js +0 -61
  281. package/types/app/cli/stub-commands.d.ts +0 -6
  282. package/types/app/cli/stub-commands.d.ts.map +0 -1
@@ -0,0 +1,261 @@
1
+ import * as dntShim from "../_dnt.shims.js";
2
+ import { basename, dirname, join } from "../deps/jsr.io/@std/path/1.1.4/mod.js";
3
+ import { ValidationError } from "../core/errors.js";
4
+ import { PathManager, } from "../db/core/path-manager.js";
5
+ const CONFIGER_DEFAULTS = {
6
+ tailDirPath: "keri/cf",
7
+ cleanTailDirPath: "keri/clean/cf",
8
+ altTailDirPath: ".tufa/cf",
9
+ altCleanTailDirPath: ".tufa/clean/cf",
10
+ tempPrefix: "keri_cf_",
11
+ fext: "json",
12
+ };
13
+ /**
14
+ * Habitat Config File.
15
+ *
16
+ * This TypeScript implementation intentionally uses stateless file I/O for reads
17
+ * and an atomic-write strategy for updates (temp file + sync + rename).
18
+ * That differs from KERIpy's handle-oriented Configer, which keeps an open file
19
+ * handle and uses seek/truncate/write/flush on that handle.
20
+ *
21
+ * We keep the public API simple (`get`/`put`) while hardening writes against
22
+ * partial-file outcomes during unexpected process exits.
23
+ *
24
+ * Supports only JSON at the moment.
25
+ */
26
+ export class Configer {
27
+ /** Create a config manager bound to a PathManager-backed directory. */
28
+ constructor(options = {}) {
29
+ Object.defineProperty(this, "name", {
30
+ enumerable: true,
31
+ configurable: true,
32
+ writable: true,
33
+ value: void 0
34
+ });
35
+ Object.defineProperty(this, "base", {
36
+ enumerable: true,
37
+ configurable: true,
38
+ writable: true,
39
+ value: void 0
40
+ });
41
+ Object.defineProperty(this, "temp", {
42
+ enumerable: true,
43
+ configurable: true,
44
+ writable: true,
45
+ value: void 0
46
+ });
47
+ Object.defineProperty(this, "fext", {
48
+ enumerable: true,
49
+ configurable: true,
50
+ writable: true,
51
+ value: void 0
52
+ });
53
+ Object.defineProperty(this, "pathManager", {
54
+ enumerable: true,
55
+ configurable: true,
56
+ writable: true,
57
+ value: void 0
58
+ });
59
+ Object.defineProperty(this, "path", {
60
+ enumerable: true,
61
+ configurable: true,
62
+ writable: true,
63
+ value: null
64
+ });
65
+ this.name = options.name || "conf";
66
+ this.base = options.base || "";
67
+ this.temp = options.temp || false;
68
+ this.fext = options.fext || CONFIGER_DEFAULTS.fext;
69
+ this.pathManager = new PathManager({
70
+ ...options,
71
+ name: this.name,
72
+ base: this.base,
73
+ temp: this.temp,
74
+ }, {
75
+ tailDirPath: CONFIGER_DEFAULTS.tailDirPath,
76
+ cleanTailDirPath: CONFIGER_DEFAULTS.cleanTailDirPath,
77
+ altTailDirPath: CONFIGER_DEFAULTS.altTailDirPath,
78
+ altCleanTailDirPath: CONFIGER_DEFAULTS.altCleanTailDirPath,
79
+ tempPrefix: CONFIGER_DEFAULTS.tempPrefix,
80
+ });
81
+ }
82
+ get opened() {
83
+ return this.path !== null;
84
+ }
85
+ /** Resolve and validate the config filename and extension. */
86
+ resolvedFileName() {
87
+ if (this.name.endsWith(`.${this.fext}`)) {
88
+ return this.name;
89
+ }
90
+ const hasExt = this.name.includes(".");
91
+ if (hasExt) {
92
+ throw new ValidationError(`Unsupported config extension for '${this.name}'. Only .${this.fext} is supported.`);
93
+ }
94
+ return `${this.name}.${this.fext}`;
95
+ }
96
+ ensureOpenPath() {
97
+ if (!this.path) {
98
+ throw new ValidationError("Config file is not opened");
99
+ }
100
+ return this.path;
101
+ }
102
+ /** Flush parent directory metadata when the platform supports it. */
103
+ syncDirBestEffort(dirPath) {
104
+ try {
105
+ const dir = dntShim.Deno.openSync(dirPath, { read: true });
106
+ try {
107
+ dir.syncSync();
108
+ }
109
+ finally {
110
+ dir.close();
111
+ }
112
+ }
113
+ catch {
114
+ // Best effort: some platforms/filesystems may not allow directory sync.
115
+ }
116
+ }
117
+ /** Rename temp file into place with a Windows compatibility fallback. */
118
+ renameIntoPlace(tempPath, path) {
119
+ try {
120
+ dntShim.Deno.renameSync(tempPath, path);
121
+ return;
122
+ }
123
+ catch (error) {
124
+ if (dntShim.Deno.build.os !== "windows") {
125
+ throw error;
126
+ }
127
+ // On Windows, rename may fail when target already exists.
128
+ if (!(error instanceof dntShim.Deno.errors.AlreadyExists) &&
129
+ !(error instanceof dntShim.Deno.errors.PermissionDenied)) {
130
+ throw error;
131
+ }
132
+ // Best-effort replacement fallback for Windows. This is not fully atomic,
133
+ // but keeps behavior consistent across platforms when overwrite-on-rename is blocked.
134
+ try {
135
+ dntShim.Deno.removeSync(path);
136
+ }
137
+ catch (removeError) {
138
+ if (!(removeError instanceof dntShim.Deno.errors.NotFound)) {
139
+ throw removeError;
140
+ }
141
+ }
142
+ dntShim.Deno.renameSync(tempPath, path);
143
+ }
144
+ }
145
+ /**
146
+ * Atomically persist config content using temp-file + sync + rename.
147
+ *
148
+ * Why this shape:
149
+ * - writing directly to the target can leave a truncated/partial file on crash
150
+ * - rename gives us an atomic switch from old file to new file
151
+ * - syncing the parent directory makes the rename metadata more durable
152
+ * if a crash happens immediately after rename returns
153
+ */
154
+ writeAtomic(path, content) {
155
+ const dirPath = dirname(path);
156
+ const baseName = basename(path);
157
+ const tempPath = join(dirPath, `.${baseName}.tmp-${crypto.randomUUID()}`);
158
+ const encoder = new TextEncoder();
159
+ let written = false;
160
+ try {
161
+ const tempFile = dntShim.Deno.openSync(tempPath, {
162
+ write: true,
163
+ create: true,
164
+ truncate: true,
165
+ mode: 0o600,
166
+ });
167
+ try {
168
+ tempFile.writeSync(encoder.encode(content));
169
+ tempFile.syncSync();
170
+ }
171
+ finally {
172
+ tempFile.close();
173
+ }
174
+ this.renameIntoPlace(tempPath, path);
175
+ written = true;
176
+ this.syncDirBestEffort(dirPath);
177
+ }
178
+ finally {
179
+ if (!written) {
180
+ try {
181
+ dntShim.Deno.removeSync(tempPath);
182
+ }
183
+ catch (error) {
184
+ if (!(error instanceof dntShim.Deno.errors.NotFound)) {
185
+ throw error;
186
+ }
187
+ }
188
+ }
189
+ }
190
+ }
191
+ /** Open or create the config file in the resolved Configer directory. */
192
+ *reopen(options = {}) {
193
+ const opened = yield* this.pathManager.reopen({
194
+ ...options,
195
+ name: this.name,
196
+ base: this.base,
197
+ temp: this.temp,
198
+ });
199
+ if (!opened || !this.pathManager.path) {
200
+ return false;
201
+ }
202
+ const fileName = this.resolvedFileName();
203
+ this.path = join(this.pathManager.path, fileName);
204
+ try {
205
+ dntShim.Deno.statSync(this.path);
206
+ }
207
+ catch (error) {
208
+ if (error instanceof dntShim.Deno.errors.NotFound) {
209
+ this.writeAtomic(this.path, "{}\n");
210
+ }
211
+ else {
212
+ throw error;
213
+ }
214
+ }
215
+ return true;
216
+ }
217
+ /** Close the config manager and optionally remove files. */
218
+ *close(clear = false) {
219
+ if (clear && this.path) {
220
+ try {
221
+ dntShim.Deno.removeSync(this.path);
222
+ }
223
+ catch (error) {
224
+ if (!(error instanceof dntShim.Deno.errors.NotFound)) {
225
+ throw error;
226
+ }
227
+ }
228
+ }
229
+ this.path = null;
230
+ yield* this.pathManager.close(clear);
231
+ return true;
232
+ }
233
+ /** Read and parse JSON config from disk. */
234
+ get() {
235
+ const path = this.ensureOpenPath();
236
+ const raw = dntShim.Deno.readTextFileSync(path).trim();
237
+ if (!raw) {
238
+ return {};
239
+ }
240
+ try {
241
+ return JSON.parse(raw);
242
+ }
243
+ catch (error) {
244
+ throw new ValidationError(`Invalid JSON configuration at ${path}: ${error instanceof Error ? error.message : String(error)}`);
245
+ }
246
+ }
247
+ /** Serialize and persist JSON config to disk. */
248
+ put(data) {
249
+ const path = this.ensureOpenPath();
250
+ this.writeAtomic(path, `${JSON.stringify(data, null, 2)}\n`);
251
+ return true;
252
+ }
253
+ }
254
+ export function* createConfiger(options = {}) {
255
+ const configer = new Configer(options);
256
+ const opened = yield* configer.reopen(options);
257
+ if (!opened) {
258
+ throw new ValidationError("Failed to open config file");
259
+ }
260
+ return configer;
261
+ }
@@ -0,0 +1,386 @@
1
+ import { createConfiger } from "./configing.js";
2
+ import { createBaser } from "../db/basing.js";
3
+ import { createKeeper } from "../db/keeping.js";
4
+ import { branToSaltQb64, encodeCounterV1, encodeDateTimeToDater, encodeHugeNumber, makeSaider, Manager, normalizeSaltQb64, saltySigner, } from "./keeping.js";
5
+ export const SIGNER = "__signatory__";
6
+ function versifyV1(size) {
7
+ return `KERI10JSON${size.toString(16).padStart(6, "0")}_`;
8
+ }
9
+ function serializeKed(ked) {
10
+ return new TextEncoder().encode(JSON.stringify(ked));
11
+ }
12
+ function makeNowIso8601() {
13
+ const now = new Date();
14
+ const y = now.getUTCFullYear().toString().padStart(4, "0");
15
+ const m = (now.getUTCMonth() + 1).toString().padStart(2, "0");
16
+ const d = now.getUTCDate().toString().padStart(2, "0");
17
+ const hh = now.getUTCHours().toString().padStart(2, "0");
18
+ const mm = now.getUTCMinutes().toString().padStart(2, "0");
19
+ const ss = now.getUTCSeconds().toString().padStart(2, "0");
20
+ const micros = (now.getUTCMilliseconds() * 1000).toString().padStart(6, "0");
21
+ return `${y}-${m}-${d}T${hh}:${mm}:${ss}.${micros}+00:00`;
22
+ }
23
+ function defaultThreshold(count, min) {
24
+ return `${Math.max(min, Math.ceil(count / 2)).toString(16)}`;
25
+ }
26
+ function makeInceptRaw(keys, ndigs, args) {
27
+ const ilk = args.delpre ? "dip" : "icp";
28
+ const kt = args.isith ?? defaultThreshold(keys.length, 1);
29
+ const nt = args.nsith ?? defaultThreshold(ndigs.length, 0);
30
+ const saidDummy = "#".repeat(44);
31
+ const ked = {
32
+ v: versifyV1(0),
33
+ t: ilk,
34
+ d: saidDummy,
35
+ i: args.code === "E" ? saidDummy : keys[0],
36
+ s: "0",
37
+ kt,
38
+ k: keys,
39
+ nt,
40
+ n: ndigs,
41
+ bt: `${args.toad.toString(16)}`,
42
+ b: args.wits,
43
+ c: args.cnfg,
44
+ a: args.data,
45
+ };
46
+ if (args.delpre)
47
+ ked.di = args.delpre;
48
+ ked.v = versifyV1(serializeKed(ked).length);
49
+ const sizedDummied = serializeKed(ked);
50
+ const said = makeSaider(sizedDummied);
51
+ ked.d = said;
52
+ if (args.code === "E")
53
+ ked.i = said;
54
+ const raw = serializeKed(ked);
55
+ return { raw, pre: ked.i };
56
+ }
57
+ /** Represents a local identifier habitat and its current key state. */
58
+ export class Hab {
59
+ constructor(name, db, ks, mgr, ns, pre = "") {
60
+ Object.defineProperty(this, "name", {
61
+ enumerable: true,
62
+ configurable: true,
63
+ writable: true,
64
+ value: void 0
65
+ });
66
+ Object.defineProperty(this, "ns", {
67
+ enumerable: true,
68
+ configurable: true,
69
+ writable: true,
70
+ value: void 0
71
+ });
72
+ Object.defineProperty(this, "db", {
73
+ enumerable: true,
74
+ configurable: true,
75
+ writable: true,
76
+ value: void 0
77
+ });
78
+ Object.defineProperty(this, "ks", {
79
+ enumerable: true,
80
+ configurable: true,
81
+ writable: true,
82
+ value: void 0
83
+ });
84
+ Object.defineProperty(this, "mgr", {
85
+ enumerable: true,
86
+ configurable: true,
87
+ writable: true,
88
+ value: void 0
89
+ });
90
+ Object.defineProperty(this, "pre", {
91
+ enumerable: true,
92
+ configurable: true,
93
+ writable: true,
94
+ value: ""
95
+ });
96
+ Object.defineProperty(this, "kever", {
97
+ enumerable: true,
98
+ configurable: true,
99
+ writable: true,
100
+ value: null
101
+ });
102
+ this.name = name;
103
+ this.db = db;
104
+ this.ks = ks;
105
+ this.mgr = mgr;
106
+ this.ns = ns;
107
+ this.pre = pre;
108
+ }
109
+ /** Incepts this habitat and persists its inception event and habitat record. */
110
+ make(args = {}) {
111
+ const { code = "E", transferable = true, isith = undefined, icount = 1, nsith = undefined, ncount = undefined, toad = 0, wits = [], delpre = undefined, estOnly = false, DnD = false, hidden = false, data = [], algo = undefined, salt = undefined, tier = undefined, } = args;
112
+ let nextCount = ncount ?? icount;
113
+ let nextSith = nsith ?? isith;
114
+ let prefixCode = code;
115
+ if (!transferable) {
116
+ nextCount = 0;
117
+ nextSith = "0";
118
+ prefixCode = "B";
119
+ }
120
+ const [verfers, digers] = this.mgr.incept({
121
+ icount,
122
+ ncount: nextCount,
123
+ stem: this.ns ? `${this.ns}${this.name}` : this.name,
124
+ transferable,
125
+ algo,
126
+ salt,
127
+ tier,
128
+ });
129
+ const keys = verfers.map((v) => v.qb64);
130
+ const ndigs = digers.map((d) => d.qb64);
131
+ const cnfg = [...(estOnly ? ["EO"] : []), ...(DnD ? ["DND"] : [])];
132
+ const { raw, pre } = makeInceptRaw(keys, ndigs, {
133
+ code: prefixCode,
134
+ isith,
135
+ nsith: nextSith,
136
+ toad,
137
+ wits,
138
+ cnfg,
139
+ data,
140
+ delpre,
141
+ });
142
+ const opre = verfers[0].qb64;
143
+ this.mgr.move(opre, pre);
144
+ this.pre = pre;
145
+ const sigs = this.mgr.sign(raw, keys, true);
146
+ let atc = "";
147
+ atc += encodeCounterV1("-A", sigs.length);
148
+ for (const sig of sigs)
149
+ atc += sig;
150
+ atc += encodeCounterV1("-E", 1);
151
+ atc += encodeHugeNumber(0);
152
+ atc += encodeDateTimeToDater(makeNowIso8601());
153
+ if (atc.length % 4 !== 0) {
154
+ throw new Error("Invalid attachment size, nonintegral quadlets.");
155
+ }
156
+ const msg = new TextEncoder().encode(`${new TextDecoder().decode(raw)}${encodeCounterV1("-V", atc.length / 4)}${atc}`);
157
+ this.db.putEvt(new TextEncoder().encode(`${pre}:0`), msg);
158
+ this.kever = {
159
+ pre,
160
+ verfers: keys,
161
+ digers: ndigs,
162
+ sn: 0,
163
+ delpre,
164
+ wits,
165
+ };
166
+ if (!hidden) {
167
+ const habord = {
168
+ hid: pre,
169
+ name: this.name,
170
+ domain: this.ns,
171
+ };
172
+ this.db.pinHab(pre, { ...habord, sigs });
173
+ this.db.pinName(this.ns ?? "", this.name, pre);
174
+ }
175
+ }
176
+ /** Produces signatures with this habitat's current signing keys. */
177
+ sign(ser, indexed = false) {
178
+ const pubs = this.kever?.verfers ?? [];
179
+ return this.mgr.sign(ser, pubs, indexed);
180
+ }
181
+ }
182
+ /** Local signatory wrapper for `__signatory__` signing used by habery internals. */
183
+ export class Signator {
184
+ constructor(db, habery) {
185
+ Object.defineProperty(this, "db", {
186
+ enumerable: true,
187
+ configurable: true,
188
+ writable: true,
189
+ value: void 0
190
+ });
191
+ Object.defineProperty(this, "hab", {
192
+ enumerable: true,
193
+ configurable: true,
194
+ writable: true,
195
+ value: void 0
196
+ });
197
+ Object.defineProperty(this, "pre", {
198
+ enumerable: true,
199
+ configurable: true,
200
+ writable: true,
201
+ value: void 0
202
+ });
203
+ this.db = db;
204
+ const spre = this.db.getHby(SIGNER);
205
+ if (!spre) {
206
+ const hab = new Hab(SIGNER, habery.db, habery.ks, habery.mgr);
207
+ hab.make({ transferable: false, hidden: true });
208
+ this.hab = hab;
209
+ this.pre = hab.pre;
210
+ this.db.pinHby(SIGNER, this.pre);
211
+ }
212
+ else {
213
+ const hab = new Hab(SIGNER, habery.db, habery.ks, habery.mgr, undefined, spre);
214
+ this.hab = hab;
215
+ this.pre = spre;
216
+ }
217
+ }
218
+ /** Signs arbitrary serialized bytes with the signatory habitat. */
219
+ sign(ser) {
220
+ const sig = this.hab.sign(ser, false)[0];
221
+ if (!sig)
222
+ throw new Error("Unable to sign");
223
+ return sig;
224
+ }
225
+ /** Verifies by recomputing the expected deterministic signature. */
226
+ verify(ser, cigar) {
227
+ const expected = this.sign(ser);
228
+ return expected === cigar;
229
+ }
230
+ }
231
+ /** Top-level container for database, keystore, manager, and habitats. */
232
+ export class Habery {
233
+ constructor(name, base, temp, db, ks, mgr, cf, config = {}) {
234
+ Object.defineProperty(this, "name", {
235
+ enumerable: true,
236
+ configurable: true,
237
+ writable: true,
238
+ value: void 0
239
+ });
240
+ Object.defineProperty(this, "base", {
241
+ enumerable: true,
242
+ configurable: true,
243
+ writable: true,
244
+ value: void 0
245
+ });
246
+ Object.defineProperty(this, "temp", {
247
+ enumerable: true,
248
+ configurable: true,
249
+ writable: true,
250
+ value: void 0
251
+ });
252
+ Object.defineProperty(this, "db", {
253
+ enumerable: true,
254
+ configurable: true,
255
+ writable: true,
256
+ value: void 0
257
+ });
258
+ Object.defineProperty(this, "ks", {
259
+ enumerable: true,
260
+ configurable: true,
261
+ writable: true,
262
+ value: void 0
263
+ });
264
+ Object.defineProperty(this, "mgr", {
265
+ enumerable: true,
266
+ configurable: true,
267
+ writable: true,
268
+ value: void 0
269
+ });
270
+ Object.defineProperty(this, "cf", {
271
+ enumerable: true,
272
+ configurable: true,
273
+ writable: true,
274
+ value: void 0
275
+ });
276
+ Object.defineProperty(this, "config", {
277
+ enumerable: true,
278
+ configurable: true,
279
+ writable: true,
280
+ value: void 0
281
+ });
282
+ Object.defineProperty(this, "habs", {
283
+ enumerable: true,
284
+ configurable: true,
285
+ writable: true,
286
+ value: new Map()
287
+ });
288
+ Object.defineProperty(this, "signator", {
289
+ enumerable: true,
290
+ configurable: true,
291
+ writable: true,
292
+ value: void 0
293
+ });
294
+ this.name = name;
295
+ this.base = base;
296
+ this.temp = temp;
297
+ this.db = db;
298
+ this.ks = ks;
299
+ this.mgr = mgr;
300
+ this.cf = cf;
301
+ this.config = config;
302
+ this.signator = new Signator(this.db, this);
303
+ }
304
+ /** Creates and caches a new habitat under this habery. */
305
+ makeHab(name, ns, args = {}) {
306
+ const hab = new Hab(name, this.db, this.ks, this.mgr, ns);
307
+ hab.make(args);
308
+ if (!hab.pre)
309
+ throw new Error("Hab creation failed");
310
+ this.habs.set(hab.pre, hab);
311
+ return hab;
312
+ }
313
+ /** Resolves a habitat by alias (and optional namespace). */
314
+ habByName(name, ns) {
315
+ const pre = this.db.getName(ns ?? "", name);
316
+ if (!pre)
317
+ return null;
318
+ if (this.habs.has(pre))
319
+ return this.habs.get(pre);
320
+ const rec = this.db.getHab(pre);
321
+ if (!rec)
322
+ return null;
323
+ const hab = new Hab(name, this.db, this.ks, this.mgr, ns, pre);
324
+ this.habs.set(pre, hab);
325
+ return hab;
326
+ }
327
+ /** Closes backing databases and optionally clears temp storage. */
328
+ *close(clear = false) {
329
+ yield* this.db.close(clear);
330
+ yield* this.ks.close(clear);
331
+ if (this.cf) {
332
+ yield* this.cf.close(clear && this.temp);
333
+ }
334
+ }
335
+ }
336
+ /** Derives deterministic seed/aeid values from passcode material exactly as KERIpy bran flow. */
337
+ export function branToSeedAeid(bran) {
338
+ const branSalt = branToSaltQb64(bran);
339
+ const signer = saltySigner(branSalt, "", false, "low", false);
340
+ return { seed: signer.seedQb64, aeid: signer.verferQb64 };
341
+ }
342
+ /** Creates a habery with opened database/keystore and initialized manager state. */
343
+ export function* createHabery(args) {
344
+ const { name, base = "", temp = false, headDirPath, cf: providedCf, bran, seed, aeid, salt, algo, } = args;
345
+ const db = yield* createBaser({
346
+ name,
347
+ base,
348
+ temp,
349
+ headDirPath,
350
+ reopen: true,
351
+ readonly: false,
352
+ });
353
+ const ks = yield* createKeeper({
354
+ name,
355
+ base,
356
+ temp,
357
+ headDirPath,
358
+ reopen: true,
359
+ readonly: false,
360
+ });
361
+ const cf = providedCf ?? (yield* createConfiger({
362
+ name,
363
+ base,
364
+ temp,
365
+ headDirPath,
366
+ reopen: true,
367
+ clear: false,
368
+ }));
369
+ const config = cf ? cf.get() : {};
370
+ let usedSeed = seed ?? "";
371
+ let usedAeid = aeid ?? "";
372
+ if (bran && !seed) {
373
+ const derived = branToSeedAeid(bran);
374
+ usedSeed = derived.seed;
375
+ if (!usedAeid)
376
+ usedAeid = derived.aeid;
377
+ }
378
+ const mgr = new Manager({
379
+ ks,
380
+ seed: usedSeed,
381
+ aeid: usedAeid,
382
+ algo,
383
+ salt: normalizeSaltQb64(salt),
384
+ });
385
+ return new Habery(name, base, temp, db, ks, mgr, cf, config);
386
+ }
package/esm/app/index.js CHANGED
@@ -5,3 +5,6 @@
5
5
  */
6
6
  export * from "./cli/index.js";
7
7
  export { startServer } from "./server.js";
8
+ export * from "./habbing.js";
9
+ export * from "./keeping.js";
10
+ export * from "./configing.js";