keri-ts 0.10.0 → 0.10.1

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 (297) hide show
  1. package/esm/cesr/src/primitives/pwhash.js +64 -0
  2. package/esm/cesr/src/primitives/salter.js +3 -11
  3. package/esm/cesr/src/primitives/sealed-box.js +1 -2
  4. package/esm/cesr/src/primitives/sodium.js +5 -0
  5. package/esm/cesr/src/version.js +2 -2
  6. package/esm/keri/npm/src/_dnt.polyfills.js +14 -0
  7. package/esm/keri/npm/src/cesr/src/primitives/pwhash.js +64 -0
  8. package/esm/keri/npm/src/cesr/src/primitives/salter.js +3 -11
  9. package/esm/keri/npm/src/cesr/src/primitives/sealed-box.js +1 -2
  10. package/esm/keri/npm/src/cesr/src/primitives/sodium.js +5 -0
  11. package/esm/keri/npm/src/cesr/src/version.js +2 -2
  12. package/esm/keri/npm/src/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/posix/to_file_url.js +2 -1
  13. package/esm/keri/npm/src/keri/src/app/agent-runtime.js +1 -0
  14. package/esm/keri/npm/src/keri/src/app/cli/db-dump.js +13 -1
  15. package/esm/keri/npm/src/keri/src/app/cli/multisig.js +2 -0
  16. package/esm/keri/npm/src/keri/src/app/configing.js +1 -1
  17. package/esm/keri/npm/src/keri/src/app/exchanging.js +1 -1
  18. package/esm/keri/npm/src/keri/src/app/forwarding.js +96 -11
  19. package/esm/keri/npm/src/keri/src/app/habbing.js +166 -72
  20. package/esm/keri/npm/src/keri/src/app/mailboxing.js +6 -1
  21. package/esm/keri/npm/src/keri/src/app/multisig-workflows.js +4 -0
  22. package/esm/keri/npm/src/keri/src/app/parsering.js +2 -1
  23. package/esm/keri/npm/src/keri/src/app/version.js +2 -2
  24. package/esm/keri/npm/src/keri/src/app/witnessing.js +18 -1
  25. package/esm/keri/npm/src/keri/src/core/eventing.js +48 -7
  26. package/esm/keri/npm/src/keri/src/db/basing.js +24 -4
  27. package/esm/keri/npm/src/keri/src/db/core/index.js +6 -0
  28. package/esm/keri/npm/src/keri/src/db/core/lmdber.js +110 -13
  29. package/esm/keri/npm/src/keri/src/db/core/path-manager.js +1 -1
  30. package/esm/keri/npm/src/keri/src/db/index.js +2 -0
  31. package/esm/keri/npm/src/keri/src/db/keeping.js +12 -4
  32. package/esm/keri/npm/src/keri/src/db/mailbox-inbox.js +206 -0
  33. package/esm/keri/npm/src/keri/src/db/outboxing.js +19 -13
  34. package/esm/keri/npm/src/keri/src/db/reger.js +13 -5
  35. package/esm/keri/npm/src/keri/src/did/webs/documenting.js +176 -17
  36. package/esm/keri/npm/src/keri/src/runtime/index.js +9 -1
  37. package/package.json +2 -2
  38. package/types/_dnt.polyfills.d.ts +11 -0
  39. package/types/_dnt.polyfills.d.ts.map +1 -1
  40. package/types/cesr/src/primitives/pwhash.d.ts +6 -0
  41. package/types/cesr/src/primitives/pwhash.d.ts.map +1 -0
  42. package/types/cesr/src/primitives/salter.d.ts.map +1 -1
  43. package/types/cesr/src/primitives/sealed-box.d.ts.map +1 -1
  44. package/types/cesr/src/primitives/sodium.d.ts +3 -0
  45. package/types/cesr/src/primitives/sodium.d.ts.map +1 -0
  46. package/types/cesr/src/version.d.ts +2 -2
  47. package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/_common/assert_path.d.ts.map +1 -1
  48. package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/_common/basename.d.ts.map +1 -1
  49. package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/_common/common.d.ts.map +1 -1
  50. package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/_common/constants.d.ts.map +1 -1
  51. package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/_common/dirname.d.ts.map +1 -1
  52. package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/_common/env.d.ts.map +1 -1
  53. package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/_common/format.d.ts.map +1 -1
  54. package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/_common/from_file_url.d.ts.map +1 -1
  55. package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/_common/glob_to_reg_exp.d.ts.map +1 -1
  56. package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/_common/normalize.d.ts.map +1 -1
  57. package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/_common/normalize_string.d.ts.map +1 -1
  58. package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/_common/relative.d.ts.map +1 -1
  59. package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/_common/strip_trailing_separators.d.ts.map +1 -1
  60. package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/_common/to_file_url.d.ts.map +1 -1
  61. package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/basename.d.ts.map +1 -1
  62. package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/common.d.ts.map +1 -1
  63. package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/constants.d.ts.map +1 -1
  64. package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/dirname.d.ts.map +1 -1
  65. package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/extname.d.ts.map +1 -1
  66. package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/format.d.ts.map +1 -1
  67. package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/from_file_url.d.ts.map +1 -1
  68. package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/glob_to_regexp.d.ts.map +1 -1
  69. package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/is_absolute.d.ts.map +1 -1
  70. package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/is_glob.d.ts.map +1 -1
  71. package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/join.d.ts.map +1 -1
  72. package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/join_globs.d.ts.map +1 -1
  73. package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/mod.d.ts.map +1 -1
  74. package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/normalize.d.ts.map +1 -1
  75. package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/normalize_glob.d.ts.map +1 -1
  76. package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/parse.d.ts.map +1 -1
  77. package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/posix/_util.d.ts.map +1 -1
  78. package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/posix/basename.d.ts.map +1 -1
  79. package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/posix/constants.d.ts.map +1 -1
  80. package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/posix/dirname.d.ts.map +1 -1
  81. package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/posix/extname.d.ts.map +1 -1
  82. package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/posix/format.d.ts.map +1 -1
  83. package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/posix/from_file_url.d.ts.map +1 -1
  84. package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/posix/glob_to_regexp.d.ts.map +1 -1
  85. package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/posix/is_absolute.d.ts.map +1 -1
  86. package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/posix/join.d.ts.map +1 -1
  87. package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/posix/join_globs.d.ts.map +1 -1
  88. package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/posix/normalize.d.ts.map +1 -1
  89. package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/posix/normalize_glob.d.ts.map +1 -1
  90. package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/posix/parse.d.ts.map +1 -1
  91. package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/posix/relative.d.ts.map +1 -1
  92. package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/posix/resolve.d.ts.map +1 -1
  93. package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/posix/to_file_url.d.ts +1 -0
  94. package/types/deps/jsr.io/@std/path/1.1.6/posix/to_file_url.d.ts.map +1 -0
  95. package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/posix/to_namespaced_path.d.ts.map +1 -1
  96. package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/relative.d.ts.map +1 -1
  97. package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/resolve.d.ts.map +1 -1
  98. package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/to_file_url.d.ts.map +1 -1
  99. package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/to_namespaced_path.d.ts.map +1 -1
  100. package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/types.d.ts.map +1 -1
  101. package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/windows/_util.d.ts.map +1 -1
  102. package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/windows/basename.d.ts.map +1 -1
  103. package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/windows/constants.d.ts.map +1 -1
  104. package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/windows/dirname.d.ts.map +1 -1
  105. package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/windows/extname.d.ts.map +1 -1
  106. package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/windows/format.d.ts.map +1 -1
  107. package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/windows/from_file_url.d.ts.map +1 -1
  108. package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/windows/glob_to_regexp.d.ts.map +1 -1
  109. package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/windows/is_absolute.d.ts.map +1 -1
  110. package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/windows/join.d.ts.map +1 -1
  111. package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/windows/join_globs.d.ts.map +1 -1
  112. package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/windows/normalize.d.ts.map +1 -1
  113. package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/windows/normalize_glob.d.ts.map +1 -1
  114. package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/windows/parse.d.ts.map +1 -1
  115. package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/windows/relative.d.ts.map +1 -1
  116. package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/windows/resolve.d.ts.map +1 -1
  117. package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/windows/to_file_url.d.ts.map +1 -1
  118. package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/windows/to_namespaced_path.d.ts.map +1 -1
  119. package/types/keri/src/app/agent-runtime.d.ts +6 -0
  120. package/types/keri/src/app/agent-runtime.d.ts.map +1 -1
  121. package/types/keri/src/app/cli/common/parsing.d.ts +1 -1
  122. package/types/keri/src/app/cli/common/parsing.d.ts.map +1 -1
  123. package/types/keri/src/app/cli/db-dump.d.ts.map +1 -1
  124. package/types/keri/src/app/cli/multisig.d.ts.map +1 -1
  125. package/types/keri/src/app/forwarding.d.ts +14 -0
  126. package/types/keri/src/app/forwarding.d.ts.map +1 -1
  127. package/types/keri/src/app/habbing.d.ts +22 -4
  128. package/types/keri/src/app/habbing.d.ts.map +1 -1
  129. package/types/keri/src/app/mailboxing.d.ts.map +1 -1
  130. package/types/keri/src/app/parsering.d.ts +3 -1
  131. package/types/keri/src/app/parsering.d.ts.map +1 -1
  132. package/types/keri/src/app/version.d.ts +2 -2
  133. package/types/keri/src/app/witnessing.d.ts +15 -0
  134. package/types/keri/src/app/witnessing.d.ts.map +1 -1
  135. package/types/keri/src/core/eventing.d.ts +2 -0
  136. package/types/keri/src/core/eventing.d.ts.map +1 -1
  137. package/types/keri/src/core/kever-decisions.d.ts +2 -2
  138. package/types/keri/src/core/kever-decisions.d.ts.map +1 -1
  139. package/types/keri/src/db/basing.d.ts +4 -0
  140. package/types/keri/src/db/basing.d.ts.map +1 -1
  141. package/types/keri/src/db/core/index.d.ts +7 -0
  142. package/types/keri/src/db/core/index.d.ts.map +1 -0
  143. package/types/keri/src/db/core/lmdber.d.ts +38 -0
  144. package/types/keri/src/db/core/lmdber.d.ts.map +1 -1
  145. package/types/keri/src/db/index.d.ts +2 -0
  146. package/types/keri/src/db/index.d.ts.map +1 -1
  147. package/types/keri/src/db/keeping.d.ts.map +1 -1
  148. package/types/keri/src/db/mailbox-inbox.d.ts +72 -0
  149. package/types/keri/src/db/mailbox-inbox.d.ts.map +1 -0
  150. package/types/keri/src/db/outboxing.d.ts.map +1 -1
  151. package/types/keri/src/db/reger.d.ts +1 -1
  152. package/types/keri/src/db/reger.d.ts.map +1 -1
  153. package/types/keri/src/did/webs/documenting.d.ts +0 -7
  154. package/types/keri/src/did/webs/documenting.d.ts.map +1 -1
  155. package/types/keri/src/runtime/index.d.ts +9 -1
  156. package/types/keri/src/runtime/index.d.ts.map +1 -1
  157. package/types/deps/jsr.io/@std/path/1.1.5/posix/to_file_url.d.ts.map +0 -1
  158. /package/esm/keri/npm/src/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/_common/assert_path.js +0 -0
  159. /package/esm/keri/npm/src/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/_common/basename.js +0 -0
  160. /package/esm/keri/npm/src/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/_common/common.js +0 -0
  161. /package/esm/keri/npm/src/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/_common/constants.js +0 -0
  162. /package/esm/keri/npm/src/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/_common/dirname.js +0 -0
  163. /package/esm/keri/npm/src/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/_common/env.js +0 -0
  164. /package/esm/keri/npm/src/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/_common/format.js +0 -0
  165. /package/esm/keri/npm/src/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/_common/from_file_url.js +0 -0
  166. /package/esm/keri/npm/src/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/_common/glob_to_reg_exp.js +0 -0
  167. /package/esm/keri/npm/src/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/_common/normalize.js +0 -0
  168. /package/esm/keri/npm/src/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/_common/normalize_string.js +0 -0
  169. /package/esm/keri/npm/src/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/_common/relative.js +0 -0
  170. /package/esm/keri/npm/src/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/_common/strip_trailing_separators.js +0 -0
  171. /package/esm/keri/npm/src/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/_common/to_file_url.js +0 -0
  172. /package/esm/keri/npm/src/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/basename.js +0 -0
  173. /package/esm/keri/npm/src/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/common.js +0 -0
  174. /package/esm/keri/npm/src/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/constants.js +0 -0
  175. /package/esm/keri/npm/src/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/dirname.js +0 -0
  176. /package/esm/keri/npm/src/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/extname.js +0 -0
  177. /package/esm/keri/npm/src/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/format.js +0 -0
  178. /package/esm/keri/npm/src/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/from_file_url.js +0 -0
  179. /package/esm/keri/npm/src/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/glob_to_regexp.js +0 -0
  180. /package/esm/keri/npm/src/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/is_absolute.js +0 -0
  181. /package/esm/keri/npm/src/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/is_glob.js +0 -0
  182. /package/esm/keri/npm/src/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/join.js +0 -0
  183. /package/esm/keri/npm/src/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/join_globs.js +0 -0
  184. /package/esm/keri/npm/src/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/mod.js +0 -0
  185. /package/esm/keri/npm/src/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/normalize.js +0 -0
  186. /package/esm/keri/npm/src/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/normalize_glob.js +0 -0
  187. /package/esm/keri/npm/src/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/parse.js +0 -0
  188. /package/esm/keri/npm/src/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/posix/_util.js +0 -0
  189. /package/esm/keri/npm/src/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/posix/basename.js +0 -0
  190. /package/esm/keri/npm/src/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/posix/constants.js +0 -0
  191. /package/esm/keri/npm/src/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/posix/dirname.js +0 -0
  192. /package/esm/keri/npm/src/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/posix/extname.js +0 -0
  193. /package/esm/keri/npm/src/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/posix/format.js +0 -0
  194. /package/esm/keri/npm/src/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/posix/from_file_url.js +0 -0
  195. /package/esm/keri/npm/src/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/posix/glob_to_regexp.js +0 -0
  196. /package/esm/keri/npm/src/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/posix/is_absolute.js +0 -0
  197. /package/esm/keri/npm/src/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/posix/join.js +0 -0
  198. /package/esm/keri/npm/src/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/posix/join_globs.js +0 -0
  199. /package/esm/keri/npm/src/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/posix/normalize.js +0 -0
  200. /package/esm/keri/npm/src/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/posix/normalize_glob.js +0 -0
  201. /package/esm/keri/npm/src/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/posix/parse.js +0 -0
  202. /package/esm/keri/npm/src/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/posix/relative.js +0 -0
  203. /package/esm/keri/npm/src/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/posix/resolve.js +0 -0
  204. /package/esm/keri/npm/src/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/posix/to_namespaced_path.js +0 -0
  205. /package/esm/keri/npm/src/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/relative.js +0 -0
  206. /package/esm/keri/npm/src/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/resolve.js +0 -0
  207. /package/esm/keri/npm/src/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/to_file_url.js +0 -0
  208. /package/esm/keri/npm/src/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/to_namespaced_path.js +0 -0
  209. /package/esm/keri/npm/src/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/types.js +0 -0
  210. /package/esm/keri/npm/src/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/windows/_util.js +0 -0
  211. /package/esm/keri/npm/src/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/windows/basename.js +0 -0
  212. /package/esm/keri/npm/src/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/windows/constants.js +0 -0
  213. /package/esm/keri/npm/src/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/windows/dirname.js +0 -0
  214. /package/esm/keri/npm/src/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/windows/extname.js +0 -0
  215. /package/esm/keri/npm/src/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/windows/format.js +0 -0
  216. /package/esm/keri/npm/src/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/windows/from_file_url.js +0 -0
  217. /package/esm/keri/npm/src/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/windows/glob_to_regexp.js +0 -0
  218. /package/esm/keri/npm/src/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/windows/is_absolute.js +0 -0
  219. /package/esm/keri/npm/src/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/windows/join.js +0 -0
  220. /package/esm/keri/npm/src/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/windows/join_globs.js +0 -0
  221. /package/esm/keri/npm/src/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/windows/normalize.js +0 -0
  222. /package/esm/keri/npm/src/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/windows/normalize_glob.js +0 -0
  223. /package/esm/keri/npm/src/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/windows/parse.js +0 -0
  224. /package/esm/keri/npm/src/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/windows/relative.js +0 -0
  225. /package/esm/keri/npm/src/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/windows/resolve.js +0 -0
  226. /package/esm/keri/npm/src/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/windows/to_file_url.js +0 -0
  227. /package/esm/keri/npm/src/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/windows/to_namespaced_path.js +0 -0
  228. /package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/_common/assert_path.d.ts +0 -0
  229. /package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/_common/basename.d.ts +0 -0
  230. /package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/_common/common.d.ts +0 -0
  231. /package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/_common/constants.d.ts +0 -0
  232. /package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/_common/dirname.d.ts +0 -0
  233. /package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/_common/env.d.ts +0 -0
  234. /package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/_common/format.d.ts +0 -0
  235. /package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/_common/from_file_url.d.ts +0 -0
  236. /package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/_common/glob_to_reg_exp.d.ts +0 -0
  237. /package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/_common/normalize.d.ts +0 -0
  238. /package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/_common/normalize_string.d.ts +0 -0
  239. /package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/_common/relative.d.ts +0 -0
  240. /package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/_common/strip_trailing_separators.d.ts +0 -0
  241. /package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/_common/to_file_url.d.ts +0 -0
  242. /package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/basename.d.ts +0 -0
  243. /package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/common.d.ts +0 -0
  244. /package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/constants.d.ts +0 -0
  245. /package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/dirname.d.ts +0 -0
  246. /package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/extname.d.ts +0 -0
  247. /package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/format.d.ts +0 -0
  248. /package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/from_file_url.d.ts +0 -0
  249. /package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/glob_to_regexp.d.ts +0 -0
  250. /package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/is_absolute.d.ts +0 -0
  251. /package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/is_glob.d.ts +0 -0
  252. /package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/join.d.ts +0 -0
  253. /package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/join_globs.d.ts +0 -0
  254. /package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/mod.d.ts +0 -0
  255. /package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/normalize.d.ts +0 -0
  256. /package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/normalize_glob.d.ts +0 -0
  257. /package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/parse.d.ts +0 -0
  258. /package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/posix/_util.d.ts +0 -0
  259. /package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/posix/basename.d.ts +0 -0
  260. /package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/posix/constants.d.ts +0 -0
  261. /package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/posix/dirname.d.ts +0 -0
  262. /package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/posix/extname.d.ts +0 -0
  263. /package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/posix/format.d.ts +0 -0
  264. /package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/posix/from_file_url.d.ts +0 -0
  265. /package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/posix/glob_to_regexp.d.ts +0 -0
  266. /package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/posix/is_absolute.d.ts +0 -0
  267. /package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/posix/join.d.ts +0 -0
  268. /package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/posix/join_globs.d.ts +0 -0
  269. /package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/posix/normalize.d.ts +0 -0
  270. /package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/posix/normalize_glob.d.ts +0 -0
  271. /package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/posix/parse.d.ts +0 -0
  272. /package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/posix/relative.d.ts +0 -0
  273. /package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/posix/resolve.d.ts +0 -0
  274. /package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/posix/to_namespaced_path.d.ts +0 -0
  275. /package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/relative.d.ts +0 -0
  276. /package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/resolve.d.ts +0 -0
  277. /package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/to_file_url.d.ts +0 -0
  278. /package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/to_namespaced_path.d.ts +0 -0
  279. /package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/types.d.ts +0 -0
  280. /package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/windows/_util.d.ts +0 -0
  281. /package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/windows/basename.d.ts +0 -0
  282. /package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/windows/constants.d.ts +0 -0
  283. /package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/windows/dirname.d.ts +0 -0
  284. /package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/windows/extname.d.ts +0 -0
  285. /package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/windows/format.d.ts +0 -0
  286. /package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/windows/from_file_url.d.ts +0 -0
  287. /package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/windows/glob_to_regexp.d.ts +0 -0
  288. /package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/windows/is_absolute.d.ts +0 -0
  289. /package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/windows/join.d.ts +0 -0
  290. /package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/windows/join_globs.d.ts +0 -0
  291. /package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/windows/normalize.d.ts +0 -0
  292. /package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/windows/normalize_glob.d.ts +0 -0
  293. /package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/windows/parse.d.ts +0 -0
  294. /package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/windows/relative.d.ts +0 -0
  295. /package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/windows/resolve.d.ts +0 -0
  296. /package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/windows/to_file_url.d.ts +0 -0
  297. /package/types/deps/jsr.io/@std/path/{1.1.5 → 1.1.6}/windows/to_namespaced_path.d.ts +0 -0
@@ -0,0 +1,64 @@
1
+ import sodium from "./sodium.ts";
2
+ /** Derive Argon2id13 bytes with owned wasm32 buffers; caller owns the returned JS bytes.
3
+ * Tier policy belongs to Salter. WASM's high-water capacity is not reduced by free;
4
+ * this erases the owned input/output ranges, not arbitrary JS or native temporaries.
5
+ */
6
+ export function deriveArgon2id(password, salt, size, operations, memoryBytes) {
7
+ const max = 0x7fffffff;
8
+ if (!Number.isSafeInteger(size) || size < 16 || size > max) {
9
+ throw new RangeError("Argon2id output size must be an integer from 16 through 2147483647");
10
+ }
11
+ if (!(password instanceof Uint8Array) || password.length > max
12
+ || !(salt instanceof Uint8Array) || salt.length !== 16
13
+ || !Number.isSafeInteger(operations) || operations < 1 || operations > max
14
+ || !Number.isSafeInteger(memoryBytes) || memoryBytes < 8192 || memoryBytes > max) {
15
+ throw new RangeError("Invalid Argon2id wasm32 input");
16
+ }
17
+ const native = sodium.libsodium;
18
+ const owned = [];
19
+ const allocate = (length) => {
20
+ // Empty paths still own one initialized byte, while the C password length stays zero.
21
+ const bytes = Math.max(1, length);
22
+ const address = native._malloc(bytes);
23
+ if (!address)
24
+ throw new Error("Argon2id allocation failed");
25
+ owned.push({ address, length: bytes });
26
+ return address;
27
+ };
28
+ let result;
29
+ let failed = false, failure;
30
+ try {
31
+ const output = allocate(size), path = allocate(password.length), saltAddress = allocate(salt.length);
32
+ // Any allocation, and crypto_pwhash itself, may grow memory and replace HEAPU8.
33
+ native.HEAPU8.fill(0, path, path + Math.max(1, password.length));
34
+ native.HEAPU8.set(password, path);
35
+ native.HEAPU8.set(salt, saltAddress);
36
+ const status = native._crypto_pwhash(output, size, 0, path, password.length, 0, saltAddress, operations, 0, memoryBytes, sodium.crypto_pwhash_ALG_ARGON2ID13);
37
+ if (status !== 0)
38
+ throw new Error("Argon2id derivation failed");
39
+ result = native.HEAPU8.slice(output, output + size);
40
+ }
41
+ catch (error) {
42
+ failed = true;
43
+ failure = error;
44
+ }
45
+ finally {
46
+ for (const { address, length } of owned.reverse()) {
47
+ try {
48
+ native.HEAPU8.fill(0, address, address + length);
49
+ native._free(address);
50
+ }
51
+ catch (error) {
52
+ // One failed release must not skip the other owned buffers.
53
+ if (!failed)
54
+ failure = error;
55
+ failed = true;
56
+ }
57
+ }
58
+ }
59
+ if (failed) {
60
+ result?.fill(0);
61
+ throw failure;
62
+ }
63
+ return result;
64
+ }
@@ -1,9 +1,9 @@
1
- import { argon2id } from "npm:@noble/hashes@1.8.0/argon2";
2
1
  import { UnknownCodeError } from "../core/errors.ts";
3
2
  import { Tiers } from "../core/vocabulary.ts";
4
3
  import { MtrDex } from "./codex.ts";
5
4
  import { SALTER_CODES } from "./codex.ts";
6
5
  import { Matter } from "./matter.ts";
6
+ import { deriveArgon2id } from "./pwhash.ts";
7
7
  import { Signer } from "./signer.ts";
8
8
  /** Encode one KERI salty-derivation path string into bytes for Argon2id input. */
9
9
  function pathToBytes(path) {
@@ -49,9 +49,7 @@ export class Salter extends Matter {
49
49
  if (!SALTER_CODES.has(this.code)) {
50
50
  throw new UnknownCodeError(`Expected salt code, got ${this.code}`);
51
51
  }
52
- this.tier = init instanceof Salter
53
- ? init.tier
54
- : init.tier ?? Tiers.low;
52
+ this.tier = init instanceof Salter ? init.tier : init.tier ?? Tiers.low;
55
53
  }
56
54
  /** Raw salt bytes used by key-derivation consumers. */
57
55
  get salt() {
@@ -70,13 +68,7 @@ export class Salter extends Matter {
70
68
  */
71
69
  stretch({ size = 32, path = "", tier = this.tier, temp = false, } = {}) {
72
70
  const params = tierParams(tier, temp);
73
- return argon2id(pathToBytes(path), this.raw, {
74
- p: 1,
75
- t: params.t,
76
- m: params.m,
77
- dkLen: size,
78
- version: 0x13,
79
- });
71
+ return deriveArgon2id(pathToBytes(path), this.raw, size, params.t, params.m * 1024);
80
72
  }
81
73
  /**
82
74
  * Derive one deterministic executable signer from this salt and one path.
@@ -1,5 +1,4 @@
1
- import sodium from "npm:libsodium-wrappers@0.8.4";
2
- await sodium.ready;
1
+ import sodium from "./sodium.ts";
3
2
  /**
4
3
  * Internal libsodium-backed sealed-box seam for KERIpy cipher parity.
5
4
  *
@@ -0,0 +1,5 @@
1
+ import sodium from "npm:libsodium-wrappers-sumo@0.8.4";
2
+ // One initialized backend serves derivation and sealed boxes; no JS derived-secret cache is kept here.
3
+ // Existing primitive APIs remain synchronous after their module dependency has initialized.
4
+ await sodium.ready;
5
+ export default sodium;
@@ -6,9 +6,9 @@
6
6
  * `src/version.ts` files by hand; edit this template instead.
7
7
  */
8
8
  /** Package semantic version copied from the owning package manifest. */
9
- export const PACKAGE_VERSION = "0.9.1";
9
+ export const PACKAGE_VERSION = "0.9.2";
10
10
  /** Optional build metadata stamp injected by release/CI workflows. */
11
- export const BUILD_METADATA = "build.17.7138073e961abaff39463d54a03483c60b18b3aa";
11
+ export const BUILD_METADATA = "build.19.51e9c431fea67e90c7cec2be7f1e9a9cd2c3e4e4";
12
12
  /** User-facing version string with build metadata appended when present. */
13
13
  export const DISPLAY_VERSION = BUILD_METADATA
14
14
  ? `${PACKAGE_VERSION}+${BUILD_METADATA}`
@@ -125,3 +125,17 @@ export let import_meta_ponyfill = ((...args) => {
125
125
  //@ts-ignore
126
126
  return import_meta_ponyfill(...args);
127
127
  });
128
+ // https://github.com/tc39/proposal-accessible-object-hasownproperty/blob/main/polyfill.js
129
+ if (!Object.hasOwn) {
130
+ Object.defineProperty(Object, "hasOwn", {
131
+ value: function (object, property) {
132
+ if (object == null) {
133
+ throw new TypeError("Cannot convert undefined or null to object");
134
+ }
135
+ return Object.prototype.hasOwnProperty.call(Object(object), property);
136
+ },
137
+ configurable: true,
138
+ enumerable: false,
139
+ writable: true,
140
+ });
141
+ }
@@ -0,0 +1,64 @@
1
+ import sodium from "./sodium.js";
2
+ /** Derive Argon2id13 bytes with owned wasm32 buffers; caller owns the returned JS bytes.
3
+ * Tier policy belongs to Salter. WASM's high-water capacity is not reduced by free;
4
+ * this erases the owned input/output ranges, not arbitrary JS or native temporaries.
5
+ */
6
+ export function deriveArgon2id(password, salt, size, operations, memoryBytes) {
7
+ const max = 0x7fffffff;
8
+ if (!Number.isSafeInteger(size) || size < 16 || size > max) {
9
+ throw new RangeError("Argon2id output size must be an integer from 16 through 2147483647");
10
+ }
11
+ if (!(password instanceof Uint8Array) || password.length > max
12
+ || !(salt instanceof Uint8Array) || salt.length !== 16
13
+ || !Number.isSafeInteger(operations) || operations < 1 || operations > max
14
+ || !Number.isSafeInteger(memoryBytes) || memoryBytes < 8192 || memoryBytes > max) {
15
+ throw new RangeError("Invalid Argon2id wasm32 input");
16
+ }
17
+ const native = sodium.libsodium;
18
+ const owned = [];
19
+ const allocate = (length) => {
20
+ // Empty paths still own one initialized byte, while the C password length stays zero.
21
+ const bytes = Math.max(1, length);
22
+ const address = native._malloc(bytes);
23
+ if (!address)
24
+ throw new Error("Argon2id allocation failed");
25
+ owned.push({ address, length: bytes });
26
+ return address;
27
+ };
28
+ let result;
29
+ let failed = false, failure;
30
+ try {
31
+ const output = allocate(size), path = allocate(password.length), saltAddress = allocate(salt.length);
32
+ // Any allocation, and crypto_pwhash itself, may grow memory and replace HEAPU8.
33
+ native.HEAPU8.fill(0, path, path + Math.max(1, password.length));
34
+ native.HEAPU8.set(password, path);
35
+ native.HEAPU8.set(salt, saltAddress);
36
+ const status = native._crypto_pwhash(output, size, 0, path, password.length, 0, saltAddress, operations, 0, memoryBytes, sodium.crypto_pwhash_ALG_ARGON2ID13);
37
+ if (status !== 0)
38
+ throw new Error("Argon2id derivation failed");
39
+ result = native.HEAPU8.slice(output, output + size);
40
+ }
41
+ catch (error) {
42
+ failed = true;
43
+ failure = error;
44
+ }
45
+ finally {
46
+ for (const { address, length } of owned.reverse()) {
47
+ try {
48
+ native.HEAPU8.fill(0, address, address + length);
49
+ native._free(address);
50
+ }
51
+ catch (error) {
52
+ // One failed release must not skip the other owned buffers.
53
+ if (!failed)
54
+ failure = error;
55
+ failed = true;
56
+ }
57
+ }
58
+ }
59
+ if (failed) {
60
+ result?.fill(0);
61
+ throw failure;
62
+ }
63
+ return result;
64
+ }
@@ -1,9 +1,9 @@
1
- import { argon2id } from "@noble/hashes/argon2";
2
1
  import { UnknownCodeError } from "../core/errors.js";
3
2
  import { Tiers } from "../core/vocabulary.js";
4
3
  import { MtrDex } from "./codex.js";
5
4
  import { SALTER_CODES } from "./codex.js";
6
5
  import { Matter } from "./matter.js";
6
+ import { deriveArgon2id } from "./pwhash.js";
7
7
  import { Signer } from "./signer.js";
8
8
  /** Encode one KERI salty-derivation path string into bytes for Argon2id input. */
9
9
  function pathToBytes(path) {
@@ -49,9 +49,7 @@ export class Salter extends Matter {
49
49
  if (!SALTER_CODES.has(this.code)) {
50
50
  throw new UnknownCodeError(`Expected salt code, got ${this.code}`);
51
51
  }
52
- this.tier = init instanceof Salter
53
- ? init.tier
54
- : init.tier ?? Tiers.low;
52
+ this.tier = init instanceof Salter ? init.tier : init.tier ?? Tiers.low;
55
53
  }
56
54
  /** Raw salt bytes used by key-derivation consumers. */
57
55
  get salt() {
@@ -70,13 +68,7 @@ export class Salter extends Matter {
70
68
  */
71
69
  stretch({ size = 32, path = "", tier = this.tier, temp = false, } = {}) {
72
70
  const params = tierParams(tier, temp);
73
- return argon2id(pathToBytes(path), this.raw, {
74
- p: 1,
75
- t: params.t,
76
- m: params.m,
77
- dkLen: size,
78
- version: 0x13,
79
- });
71
+ return deriveArgon2id(pathToBytes(path), this.raw, size, params.t, params.m * 1024);
80
72
  }
81
73
  /**
82
74
  * Derive one deterministic executable signer from this salt and one path.
@@ -1,5 +1,4 @@
1
- import sodium from "libsodium-wrappers";
2
- await sodium.ready;
1
+ import sodium from "./sodium.js";
3
2
  /**
4
3
  * Internal libsodium-backed sealed-box seam for KERIpy cipher parity.
5
4
  *
@@ -0,0 +1,5 @@
1
+ import sodium from "libsodium-wrappers-sumo";
2
+ // One initialized backend serves derivation and sealed boxes; no JS derived-secret cache is kept here.
3
+ // Existing primitive APIs remain synchronous after their module dependency has initialized.
4
+ await sodium.ready;
5
+ export default sodium;
@@ -6,9 +6,9 @@
6
6
  * `src/version.ts` files by hand; edit this template instead.
7
7
  */
8
8
  /** Package semantic version copied from the owning package manifest. */
9
- export const PACKAGE_VERSION = "0.9.1";
9
+ export const PACKAGE_VERSION = "0.9.2";
10
10
  /** Optional build metadata stamp injected by release/CI workflows. */
11
- export const BUILD_METADATA = "build.17.7138073e961abaff39463d54a03483c60b18b3aa";
11
+ export const BUILD_METADATA = "build.19.51e9c431fea67e90c7cec2be7f1e9a9cd2c3e4e4";
12
12
  /** User-facing version string with build metadata appended when present. */
13
13
  export const DISPLAY_VERSION = BUILD_METADATA
14
14
  ? `${PACKAGE_VERSION}+${BUILD_METADATA}`
@@ -12,6 +12,7 @@ import { isAbsolute } from "./is_absolute.js";
12
12
  *
13
13
  * assertEquals(toFileUrl("/home/foo"), new URL("file:///home/foo"));
14
14
  * assertEquals(toFileUrl("/home/foo bar"), new URL("file:///home/foo%20bar"));
15
+ * assertEquals(toFileUrl("//foo/bar"), new URL("file:///foo/bar"));
15
16
  * ```
16
17
  *
17
18
  * @param path The path to convert.
@@ -22,6 +23,6 @@ export function toFileUrl(path) {
22
23
  throw new TypeError(`Path must be absolute: received "${path}"`);
23
24
  }
24
25
  const url = new URL("file:///");
25
- url.pathname = encodeWhitespace(path.replace(/%/g, "%25").replace(/\\/g, "%5C"));
26
+ url.pathname = encodeWhitespace(path.replace(/^\/+/, "/").replace(/%/g, "%25").replace(/\\/g, "%5C"));
26
27
  return url;
27
28
  }
@@ -101,6 +101,7 @@ export function* createAgentRuntime(hby, options = {}) {
101
101
  const mailboxPoller = new MailboxPoller(hby, mailboxDirector, {
102
102
  services,
103
103
  pollTransport: options.mailboxPollTransport,
104
+ mailboxAdmission: options.mailboxAdmission,
104
105
  });
105
106
  for (const topic of [
106
107
  DELEGATE_MAILBOX_TOPIC,
@@ -213,11 +213,21 @@ function buildOptions(args) {
213
213
  headDirPath: args.headDirPath,
214
214
  temp: args.temp,
215
215
  compat: args.compat,
216
+ mapSize: args.mapSize,
216
217
  reopen: true,
217
218
  readonly: true,
218
219
  dupsort: false,
219
220
  };
220
221
  }
222
+ function resolveMapSize(rawMapSize) {
223
+ if (rawMapSize === undefined) {
224
+ return undefined;
225
+ }
226
+ if (!Number.isInteger(rawMapSize) || rawMapSize <= 0) {
227
+ throw new ValidationError("`--map-size` must be a positive integer byte count");
228
+ }
229
+ return rawMapSize;
230
+ }
221
231
  function resolveLimit(rawLimit) {
222
232
  if (rawLimit === undefined) {
223
233
  return DEFAULT_LIMIT;
@@ -243,6 +253,7 @@ export function* dumpDatabase(args) {
243
253
  const headDirPath = args.headDirPath;
244
254
  const temp = args.temp;
245
255
  const compat = args.compat;
256
+ const mapSize = resolveMapSize(args.mapSize);
246
257
  const target = args.target;
247
258
  const prefix = args.prefix;
248
259
  const limit = resolveLimit(args.limit);
@@ -259,12 +270,13 @@ export function* dumpDatabase(args) {
259
270
  headDirPath,
260
271
  temp,
261
272
  compat,
273
+ mapSize,
262
274
  }));
263
275
  try {
264
276
  console.log(`Dumping ${parsedTarget.storeName
265
277
  ? `${parsedTarget.domain}.${parsedTarget.storeName}`
266
278
  : parsedTarget.domain} from ${domain.path ?? "(unknown path)"}`);
267
- console.log(`Mode: readonly compat=${compat ? "true" : "false"} temp=${temp ? "true" : "false"}`);
279
+ console.log(`Mode: readonly compat=${compat ? "true" : "false"} temp=${temp ? "true" : "false"}${mapSize !== undefined ? ` mapSize=${mapSize}` : ""}`);
268
280
  console.log("");
269
281
  if (!parsedTarget.storeName) {
270
282
  printStoreSummary(parsedTarget.domain, domain);
@@ -31,6 +31,8 @@ function loadMultisigInceptFile(path) {
31
31
  ...loaded,
32
32
  aids: Array.isArray(loaded.aids) ? loaded.aids.filter(isString) : loaded.aids,
33
33
  rmids: Array.isArray(loaded.rmids) ? loaded.rmids.filter(isString) : loaded.rmids,
34
+ isith: parseThresholdOption(loaded.isith),
35
+ nsith: parseThresholdOption(loaded.nsith),
34
36
  wits: Array.isArray(loaded.wits) ? loaded.wits.filter(isString) : loaded.wits,
35
37
  };
36
38
  }
@@ -1,5 +1,5 @@
1
1
  import * as dntShim from "../../../_dnt.shims.js";
2
- import { basename, dirname, join } from "../../../deps/jsr.io/@std/path/1.1.5/mod.js";
2
+ import { basename, dirname, join } from "../../../deps/jsr.io/@std/path/1.1.6/mod.js";
3
3
  import { ValidationError } from "../core/errors.js";
4
4
  import { PathManager } from "../db/core/path-manager.js";
5
5
  const CONFIGER_DEFAULTS = {
@@ -145,7 +145,7 @@ export class Exchanger {
145
145
  ptds: this.hby.db.epath.get([said]).map((text) => PathedMaterialGroup.fromRaw(new TextEncoder().encode(text))),
146
146
  essrs: this.hby.db.essrs.get([said]),
147
147
  });
148
- if (decision.kind === "accept" || decision.kind === "reject") {
148
+ if (decision.kind === "reject") {
149
149
  this.removeEscrow(said);
150
150
  }
151
151
  }
@@ -19,6 +19,7 @@ import { CREDENTIAL_MAILBOX_TOPIC, DELEGATE_MAILBOX_TOPIC, OOBI_MAILBOX_TOPIC }
19
19
  import { exchange } from "../core/protocol-exchanging.js";
20
20
  import { Roles } from "../core/roles.js";
21
21
  import { dgKey } from "../db/core/keys.js";
22
+ import { DEFAULT_MAILBOX_INBOX_LIMITS } from "../db/mailbox-inbox.js";
22
23
  import { makeNowIso8601 } from "../time/mod.js";
23
24
  import { buildCesrRequest, CESR_CONTENT_TYPE, KERIPY_CESR_JSON_CONTENT_TYPE, splitCesrStream } from "./cesr-http.js";
24
25
  import { closeResponseBody, fetchResponseHandle, fetchResponseHandleOrNull } from "./httping.js";
@@ -485,6 +486,24 @@ export class MailboxPoller {
485
486
  writable: true,
486
487
  value: void 0
487
488
  });
489
+ Object.defineProperty(this, "delivered", {
490
+ enumerable: true,
491
+ configurable: true,
492
+ writable: true,
493
+ value: new Set()
494
+ });
495
+ Object.defineProperty(this, "inboxLimits", {
496
+ enumerable: true,
497
+ configurable: true,
498
+ writable: true,
499
+ value: void 0
500
+ });
501
+ Object.defineProperty(this, "durableAdmission", {
502
+ enumerable: true,
503
+ configurable: true,
504
+ writable: true,
505
+ value: void 0
506
+ });
488
507
  Object.defineProperty(this, "localCursors", {
489
508
  enumerable: true,
490
509
  configurable: true,
@@ -493,6 +512,11 @@ export class MailboxPoller {
493
512
  });
494
513
  const { timeouts, services = defaultRuntimeServices, pollTransport = defaultMailboxPollTransport, } = options;
495
514
  this.hby = hby;
515
+ if (options.mailboxAdmission && options.mailboxAdmission.mode !== "durable") {
516
+ throw new Error("Unsupported mailbox admission mode");
517
+ }
518
+ this.durableAdmission = options.mailboxAdmission?.mode === "durable";
519
+ this.inboxLimits = { ...DEFAULT_MAILBOX_INBOX_LIMITS, ...options.mailboxAdmission?.limits };
496
520
  this.mailboxDirector = mailboxDirector;
497
521
  this.timeoutPolicy = normalizeMailboxPollingTimeoutPolicy(timeouts);
498
522
  this.services = services;
@@ -520,7 +544,7 @@ export class MailboxPoller {
520
544
  if (topics.length === 0) {
521
545
  return [];
522
546
  }
523
- const batches = [];
547
+ const batches = this.replayRetained();
524
548
  const deadline = this.services.clock.now() + positiveTimeoutMs(budgetMs, this.timeoutPolicy.commandLocalBudgetMs);
525
549
  for (const pre of this.hby.prefixes) {
526
550
  const local = this.readLocalMailbox(pre, topics);
@@ -533,7 +557,7 @@ export class MailboxPoller {
533
557
  for (const endpoint of remoteEndpoints) {
534
558
  const remainingBudgetMs = deadline - this.services.clock.now();
535
559
  if (remainingBudgetMs <= 0) {
536
- return batches;
560
+ return this.handOff(batches);
537
561
  }
538
562
  const batch = yield* this.pollRemoteEndpointOnce(target, endpoint, remainingBudgetMs);
539
563
  if (batch) {
@@ -541,7 +565,7 @@ export class MailboxPoller {
541
565
  }
542
566
  }
543
567
  }
544
- return batches;
568
+ return this.handOff(batches);
545
569
  }
546
570
  /**
547
571
  * Poll forever, streaming typed batches into one sink.
@@ -553,6 +577,10 @@ export class MailboxPoller {
553
577
  const remoteWorkers = new Map();
554
578
  try {
555
579
  while (true) {
580
+ for (const batch of this.replayRetained()) {
581
+ onBatch(batch);
582
+ this.handOff([batch]);
583
+ }
556
584
  const topics = this.mailboxDirector.registeredTopics();
557
585
  yield* this.syncRemoteWorkers(remoteWorkers, onBatch, topics);
558
586
  if (topics.length > 0) {
@@ -623,15 +651,71 @@ export class MailboxPoller {
623
651
  if (messages.length === 0) {
624
652
  return null;
625
653
  }
626
- for (const message of messages) {
627
- this.mailboxDirector.updateRemoteCursor(target.targetPre, endpoint.eid, message.topic, message.idx);
654
+ if (!this.durableAdmission) {
655
+ for (const message of messages) {
656
+ this.mailboxDirector.updateRemoteCursor(target.targetPre, endpoint.eid, message.topic, message.idx);
657
+ }
658
+ return {
659
+ source: "remote",
660
+ pre: target.targetPre,
661
+ eid: endpoint.eid,
662
+ messages: messages.map((message) => message.msg),
663
+ };
664
+ }
665
+ this.hby.db.mailboxInbox.admit(target.targetPre, endpoint.eid, messages, this.inboxLimits);
666
+ return this.replayRetained(target.targetPre, endpoint.eid)[0] ?? null;
667
+ }
668
+ /** Deliver retained ingress once per poller lifetime; consumers explicitly dispose durable outcomes. */
669
+ replayRetained(pre, eid) {
670
+ if (!this.durableAdmission)
671
+ return [];
672
+ const topics = new Set(this.mailboxDirector.registeredTopics());
673
+ if (topics.size === 0)
674
+ return [];
675
+ const retained = this.hby.db.mailboxInbox.pending({ pre, eid, topics, exclude: this.delivered });
676
+ const batches = new Map();
677
+ for (const { delivery, msg } of retained) {
678
+ if (this.delivered.has(delivery.id) || (pre && delivery.pre !== pre) || (eid && delivery.eid !== eid))
679
+ continue;
680
+ const key = JSON.stringify([delivery.pre, delivery.eid]);
681
+ let batch = batches.get(key);
682
+ if (!batch) {
683
+ batch = { source: "remote", pre: delivery.pre, eid: delivery.eid, messages: [], deliveries: [] };
684
+ batches.set(key, batch);
685
+ }
686
+ batch.messages.push(msg);
687
+ batch.deliveries.push(delivery);
688
+ }
689
+ return [...batches.values()];
690
+ }
691
+ /** Mark successful handoff only, never selection before later network work or a throwing sink. */
692
+ handOff(batches) {
693
+ // Validate/prune before marking new IDs: a corrupt retained row must not lose this handoff.
694
+ if (this.delivered.size + batches.reduce((n, batch) => n + (batch.deliveries?.length ?? 0), 0)
695
+ > this.inboxLimits.maxRetainedRecords) {
696
+ const retained = new Set(this.hby.db.mailboxInbox.retained().map((row) => row.id));
697
+ for (const id of this.delivered)
698
+ if (!retained.has(id))
699
+ this.delivered.delete(id);
700
+ }
701
+ const output = [];
702
+ for (const batch of batches) {
703
+ if (!batch.deliveries) {
704
+ output.push(batch);
705
+ continue;
706
+ }
707
+ const messages = [], deliveries = [];
708
+ for (const [index, delivery] of batch.deliveries.entries()) {
709
+ if (this.delivered.has(delivery.id))
710
+ continue;
711
+ this.delivered.add(delivery.id);
712
+ messages.push(batch.messages[index]);
713
+ deliveries.push(delivery);
714
+ }
715
+ if (messages.length)
716
+ output.push({ ...batch, messages, deliveries });
628
717
  }
629
- return {
630
- source: "remote",
631
- pre: target.targetPre,
632
- eid: endpoint.eid,
633
- messages: messages.map((message) => message.msg),
634
- };
718
+ return output;
635
719
  }
636
720
  /** Keep one long-lived worker running for each currently configured remote endpoint. */
637
721
  *syncRemoteWorkers(remoteWorkers, onBatch, topics) {
@@ -668,6 +752,7 @@ export class MailboxPoller {
668
752
  const batch = yield* this.pollRemoteEndpointOnce(target, endpoint, this.timeoutPolicy.maxPollDurationMs);
669
753
  if (batch) {
670
754
  onBatch(batch);
755
+ this.handOff([batch]);
671
756
  }
672
757
  yield* runtimeTurn();
673
758
  }