@psiclawops/hypermem 0.8.2 → 0.8.4

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 (735) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/INSTALL.md +135 -42
  3. package/README.md +36 -6
  4. package/dist/compaction-fence.d.ts +9 -1
  5. package/dist/compaction-fence.d.ts.map +1 -1
  6. package/dist/compaction-fence.js +25 -4
  7. package/dist/compositor.js +1 -1
  8. package/docs/API_STABILITY.md +33 -0
  9. package/docs/KNOWN_LIMITATIONS.md +35 -0
  10. package/docs/MEMORY_MD_AUTHORING.md +243 -0
  11. package/docs/MIGRATION.md +56 -0
  12. package/docs/MIGRATION_GUIDE.md +1083 -0
  13. package/docs/PHASE1-VALIDATION.md +132 -0
  14. package/docs/RELEASE_0.8.0_VALIDATION.md +70 -0
  15. package/docs/RELEASE_PROCESS.md +10 -0
  16. package/docs/ROADMAP.md +39 -0
  17. package/docs/SLASH_COMMANDS.md +93 -0
  18. package/docs/TUNING.md +866 -0
  19. package/install.sh +516 -0
  20. package/memory-plugin/dist/index.d.ts +24 -0
  21. package/memory-plugin/dist/index.d.ts.map +1 -0
  22. package/memory-plugin/dist/index.js +300 -0
  23. package/memory-plugin/dist/index.js.map +1 -0
  24. package/memory-plugin/openclaw.plugin.json +13 -0
  25. package/memory-plugin/package.json +64 -0
  26. package/node_modules/sqlite-vec/README.md +1 -0
  27. package/node_modules/sqlite-vec/index.cjs +46 -0
  28. package/node_modules/sqlite-vec/index.d.ts +17 -0
  29. package/node_modules/sqlite-vec/index.mjs +47 -0
  30. package/node_modules/sqlite-vec/package.json +1 -0
  31. package/node_modules/sqlite-vec-linux-x64/README.md +1 -0
  32. package/node_modules/sqlite-vec-linux-x64/package.json +1 -0
  33. package/node_modules/sqlite-vec-linux-x64/vec0.so +0 -0
  34. package/node_modules/zod/LICENSE +21 -0
  35. package/node_modules/zod/README.md +208 -0
  36. package/node_modules/zod/index.cjs +33 -0
  37. package/node_modules/zod/index.d.cts +4 -0
  38. package/node_modules/zod/index.d.ts +4 -0
  39. package/node_modules/zod/index.js +4 -0
  40. package/node_modules/zod/locales/index.cjs +17 -0
  41. package/node_modules/zod/locales/index.d.cts +1 -0
  42. package/node_modules/zod/locales/index.d.ts +1 -0
  43. package/node_modules/zod/locales/index.js +1 -0
  44. package/node_modules/zod/locales/package.json +6 -0
  45. package/node_modules/zod/mini/index.cjs +32 -0
  46. package/node_modules/zod/mini/index.d.cts +3 -0
  47. package/node_modules/zod/mini/index.d.ts +3 -0
  48. package/node_modules/zod/mini/index.js +3 -0
  49. package/node_modules/zod/mini/package.json +6 -0
  50. package/node_modules/zod/package.json +135 -0
  51. package/node_modules/zod/src/index.ts +4 -0
  52. package/node_modules/zod/src/locales/index.ts +1 -0
  53. package/node_modules/zod/src/mini/index.ts +3 -0
  54. package/node_modules/zod/src/v3/ZodError.ts +330 -0
  55. package/node_modules/zod/src/v3/benchmarks/datetime.ts +58 -0
  56. package/node_modules/zod/src/v3/benchmarks/discriminatedUnion.ts +80 -0
  57. package/node_modules/zod/src/v3/benchmarks/index.ts +59 -0
  58. package/node_modules/zod/src/v3/benchmarks/ipv4.ts +57 -0
  59. package/node_modules/zod/src/v3/benchmarks/object.ts +69 -0
  60. package/node_modules/zod/src/v3/benchmarks/primitives.ts +162 -0
  61. package/node_modules/zod/src/v3/benchmarks/realworld.ts +63 -0
  62. package/node_modules/zod/src/v3/benchmarks/string.ts +55 -0
  63. package/node_modules/zod/src/v3/benchmarks/union.ts +80 -0
  64. package/node_modules/zod/src/v3/errors.ts +13 -0
  65. package/node_modules/zod/src/v3/external.ts +6 -0
  66. package/node_modules/zod/src/v3/helpers/enumUtil.ts +17 -0
  67. package/node_modules/zod/src/v3/helpers/errorUtil.ts +8 -0
  68. package/node_modules/zod/src/v3/helpers/parseUtil.ts +176 -0
  69. package/node_modules/zod/src/v3/helpers/partialUtil.ts +34 -0
  70. package/node_modules/zod/src/v3/helpers/typeAliases.ts +2 -0
  71. package/node_modules/zod/src/v3/helpers/util.ts +224 -0
  72. package/node_modules/zod/src/v3/index.ts +4 -0
  73. package/node_modules/zod/src/v3/locales/en.ts +124 -0
  74. package/node_modules/zod/src/v3/standard-schema.ts +113 -0
  75. package/node_modules/zod/src/v3/tests/Mocker.ts +54 -0
  76. package/node_modules/zod/src/v3/tests/all-errors.test.ts +157 -0
  77. package/node_modules/zod/src/v3/tests/anyunknown.test.ts +28 -0
  78. package/node_modules/zod/src/v3/tests/array.test.ts +71 -0
  79. package/node_modules/zod/src/v3/tests/async-parsing.test.ts +388 -0
  80. package/node_modules/zod/src/v3/tests/async-refinements.test.ts +46 -0
  81. package/node_modules/zod/src/v3/tests/base.test.ts +29 -0
  82. package/node_modules/zod/src/v3/tests/bigint.test.ts +55 -0
  83. package/node_modules/zod/src/v3/tests/branded.test.ts +53 -0
  84. package/node_modules/zod/src/v3/tests/catch.test.ts +220 -0
  85. package/node_modules/zod/src/v3/tests/coerce.test.ts +133 -0
  86. package/node_modules/zod/src/v3/tests/complex.test.ts +70 -0
  87. package/node_modules/zod/src/v3/tests/custom.test.ts +31 -0
  88. package/node_modules/zod/src/v3/tests/date.test.ts +32 -0
  89. package/node_modules/zod/src/v3/tests/deepmasking.test.ts +186 -0
  90. package/node_modules/zod/src/v3/tests/default.test.ts +112 -0
  91. package/node_modules/zod/src/v3/tests/description.test.ts +33 -0
  92. package/node_modules/zod/src/v3/tests/discriminated-unions.test.ts +315 -0
  93. package/node_modules/zod/src/v3/tests/enum.test.ts +80 -0
  94. package/node_modules/zod/src/v3/tests/error.test.ts +551 -0
  95. package/node_modules/zod/src/v3/tests/firstparty.test.ts +87 -0
  96. package/node_modules/zod/src/v3/tests/firstpartyschematypes.test.ts +21 -0
  97. package/node_modules/zod/src/v3/tests/function.test.ts +261 -0
  98. package/node_modules/zod/src/v3/tests/generics.test.ts +48 -0
  99. package/node_modules/zod/src/v3/tests/instanceof.test.ts +37 -0
  100. package/node_modules/zod/src/v3/tests/intersection.test.ts +110 -0
  101. package/node_modules/zod/src/v3/tests/language-server.source.ts +76 -0
  102. package/node_modules/zod/src/v3/tests/language-server.test.ts +207 -0
  103. package/node_modules/zod/src/v3/tests/literal.test.ts +36 -0
  104. package/node_modules/zod/src/v3/tests/map.test.ts +110 -0
  105. package/node_modules/zod/src/v3/tests/masking.test.ts +4 -0
  106. package/node_modules/zod/src/v3/tests/mocker.test.ts +19 -0
  107. package/node_modules/zod/src/v3/tests/nan.test.ts +24 -0
  108. package/node_modules/zod/src/v3/tests/nativeEnum.test.ts +87 -0
  109. package/node_modules/zod/src/v3/tests/nullable.test.ts +42 -0
  110. package/node_modules/zod/src/v3/tests/number.test.ts +176 -0
  111. package/node_modules/zod/src/v3/tests/object-augmentation.test.ts +29 -0
  112. package/node_modules/zod/src/v3/tests/object-in-es5-env.test.ts +29 -0
  113. package/node_modules/zod/src/v3/tests/object.test.ts +434 -0
  114. package/node_modules/zod/src/v3/tests/optional.test.ts +42 -0
  115. package/node_modules/zod/src/v3/tests/parseUtil.test.ts +23 -0
  116. package/node_modules/zod/src/v3/tests/parser.test.ts +41 -0
  117. package/node_modules/zod/src/v3/tests/partials.test.ts +243 -0
  118. package/node_modules/zod/src/v3/tests/pickomit.test.ts +111 -0
  119. package/node_modules/zod/src/v3/tests/pipeline.test.ts +29 -0
  120. package/node_modules/zod/src/v3/tests/preprocess.test.ts +186 -0
  121. package/node_modules/zod/src/v3/tests/primitive.test.ts +440 -0
  122. package/node_modules/zod/src/v3/tests/promise.test.ts +90 -0
  123. package/node_modules/zod/src/v3/tests/readonly.test.ts +194 -0
  124. package/node_modules/zod/src/v3/tests/record.test.ts +171 -0
  125. package/node_modules/zod/src/v3/tests/recursive.test.ts +197 -0
  126. package/node_modules/zod/src/v3/tests/refine.test.ts +313 -0
  127. package/node_modules/zod/src/v3/tests/safeparse.test.ts +27 -0
  128. package/node_modules/zod/src/v3/tests/set.test.ts +142 -0
  129. package/node_modules/zod/src/v3/tests/standard-schema.test.ts +83 -0
  130. package/node_modules/zod/src/v3/tests/string.test.ts +916 -0
  131. package/node_modules/zod/src/v3/tests/transformer.test.ts +233 -0
  132. package/node_modules/zod/src/v3/tests/tuple.test.ts +90 -0
  133. package/node_modules/zod/src/v3/tests/unions.test.ts +57 -0
  134. package/node_modules/zod/src/v3/tests/validations.test.ts +133 -0
  135. package/node_modules/zod/src/v3/tests/void.test.ts +15 -0
  136. package/node_modules/zod/src/v3/types.ts +5138 -0
  137. package/node_modules/zod/src/v4/classic/checks.ts +32 -0
  138. package/node_modules/zod/src/v4/classic/coerce.ts +27 -0
  139. package/node_modules/zod/src/v4/classic/compat.ts +70 -0
  140. package/node_modules/zod/src/v4/classic/errors.ts +82 -0
  141. package/node_modules/zod/src/v4/classic/external.ts +51 -0
  142. package/node_modules/zod/src/v4/classic/from-json-schema.ts +643 -0
  143. package/node_modules/zod/src/v4/classic/index.ts +5 -0
  144. package/node_modules/zod/src/v4/classic/iso.ts +90 -0
  145. package/node_modules/zod/src/v4/classic/parse.ts +82 -0
  146. package/node_modules/zod/src/v4/classic/schemas.ts +2409 -0
  147. package/node_modules/zod/src/v4/classic/tests/anyunknown.test.ts +26 -0
  148. package/node_modules/zod/src/v4/classic/tests/apply.test.ts +59 -0
  149. package/node_modules/zod/src/v4/classic/tests/array.test.ts +264 -0
  150. package/node_modules/zod/src/v4/classic/tests/assignability.test.ts +210 -0
  151. package/node_modules/zod/src/v4/classic/tests/async-parsing.test.ts +381 -0
  152. package/node_modules/zod/src/v4/classic/tests/async-refinements.test.ts +68 -0
  153. package/node_modules/zod/src/v4/classic/tests/base.test.ts +7 -0
  154. package/node_modules/zod/src/v4/classic/tests/bigint.test.ts +54 -0
  155. package/node_modules/zod/src/v4/classic/tests/brand.test.ts +106 -0
  156. package/node_modules/zod/src/v4/classic/tests/catch.test.ts +276 -0
  157. package/node_modules/zod/src/v4/classic/tests/coalesce.test.ts +20 -0
  158. package/node_modules/zod/src/v4/classic/tests/codec-examples.test.ts +573 -0
  159. package/node_modules/zod/src/v4/classic/tests/codec.test.ts +562 -0
  160. package/node_modules/zod/src/v4/classic/tests/coerce.test.ts +160 -0
  161. package/node_modules/zod/src/v4/classic/tests/continuability.test.ts +374 -0
  162. package/node_modules/zod/src/v4/classic/tests/custom.test.ts +40 -0
  163. package/node_modules/zod/src/v4/classic/tests/date.test.ts +62 -0
  164. package/node_modules/zod/src/v4/classic/tests/datetime.test.ts +302 -0
  165. package/node_modules/zod/src/v4/classic/tests/default.test.ts +365 -0
  166. package/node_modules/zod/src/v4/classic/tests/describe-meta-checks.test.ts +27 -0
  167. package/node_modules/zod/src/v4/classic/tests/description.test.ts +32 -0
  168. package/node_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts +661 -0
  169. package/node_modules/zod/src/v4/classic/tests/enum.test.ts +285 -0
  170. package/node_modules/zod/src/v4/classic/tests/error-utils.test.ts +595 -0
  171. package/node_modules/zod/src/v4/classic/tests/error.test.ts +711 -0
  172. package/node_modules/zod/src/v4/classic/tests/file.test.ts +96 -0
  173. package/node_modules/zod/src/v4/classic/tests/firstparty.test.ts +179 -0
  174. package/node_modules/zod/src/v4/classic/tests/fix-json-issue.test.ts +26 -0
  175. package/node_modules/zod/src/v4/classic/tests/from-json-schema.test.ts +734 -0
  176. package/node_modules/zod/src/v4/classic/tests/function.test.ts +360 -0
  177. package/node_modules/zod/src/v4/classic/tests/generics.test.ts +72 -0
  178. package/node_modules/zod/src/v4/classic/tests/hash.test.ts +68 -0
  179. package/node_modules/zod/src/v4/classic/tests/index.test.ts +939 -0
  180. package/node_modules/zod/src/v4/classic/tests/instanceof.test.ts +60 -0
  181. package/node_modules/zod/src/v4/classic/tests/intersection.test.ts +198 -0
  182. package/node_modules/zod/src/v4/classic/tests/json.test.ts +109 -0
  183. package/node_modules/zod/src/v4/classic/tests/lazy.test.ts +227 -0
  184. package/node_modules/zod/src/v4/classic/tests/literal.test.ts +117 -0
  185. package/node_modules/zod/src/v4/classic/tests/map.test.ts +330 -0
  186. package/node_modules/zod/src/v4/classic/tests/nan.test.ts +21 -0
  187. package/node_modules/zod/src/v4/classic/tests/nested-refine.test.ts +168 -0
  188. package/node_modules/zod/src/v4/classic/tests/nonoptional.test.ts +101 -0
  189. package/node_modules/zod/src/v4/classic/tests/nullable.test.ts +22 -0
  190. package/node_modules/zod/src/v4/classic/tests/number.test.ts +270 -0
  191. package/node_modules/zod/src/v4/classic/tests/object.test.ts +640 -0
  192. package/node_modules/zod/src/v4/classic/tests/optional.test.ts +223 -0
  193. package/node_modules/zod/src/v4/classic/tests/partial.test.ts +427 -0
  194. package/node_modules/zod/src/v4/classic/tests/pickomit.test.ts +211 -0
  195. package/node_modules/zod/src/v4/classic/tests/pipe.test.ts +101 -0
  196. package/node_modules/zod/src/v4/classic/tests/prefault.test.ts +74 -0
  197. package/node_modules/zod/src/v4/classic/tests/preprocess.test.ts +282 -0
  198. package/node_modules/zod/src/v4/classic/tests/primitive.test.ts +175 -0
  199. package/node_modules/zod/src/v4/classic/tests/promise.test.ts +81 -0
  200. package/node_modules/zod/src/v4/classic/tests/prototypes.test.ts +23 -0
  201. package/node_modules/zod/src/v4/classic/tests/readonly.test.ts +252 -0
  202. package/node_modules/zod/src/v4/classic/tests/record.test.ts +632 -0
  203. package/node_modules/zod/src/v4/classic/tests/recursive-types.test.ts +582 -0
  204. package/node_modules/zod/src/v4/classic/tests/refine.test.ts +570 -0
  205. package/node_modules/zod/src/v4/classic/tests/registries.test.ts +243 -0
  206. package/node_modules/zod/src/v4/classic/tests/set.test.ts +181 -0
  207. package/node_modules/zod/src/v4/classic/tests/standard-schema.test.ts +134 -0
  208. package/node_modules/zod/src/v4/classic/tests/string-formats.test.ts +125 -0
  209. package/node_modules/zod/src/v4/classic/tests/string.test.ts +1175 -0
  210. package/node_modules/zod/src/v4/classic/tests/stringbool.test.ts +106 -0
  211. package/node_modules/zod/src/v4/classic/tests/template-literal.test.ts +771 -0
  212. package/node_modules/zod/src/v4/classic/tests/to-json-schema-methods.test.ts +438 -0
  213. package/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +2990 -0
  214. package/node_modules/zod/src/v4/classic/tests/transform.test.ts +361 -0
  215. package/node_modules/zod/src/v4/classic/tests/tuple.test.ts +183 -0
  216. package/node_modules/zod/src/v4/classic/tests/union.test.ts +219 -0
  217. package/node_modules/zod/src/v4/classic/tests/url.test.ts +13 -0
  218. package/node_modules/zod/src/v4/classic/tests/validations.test.ts +283 -0
  219. package/node_modules/zod/src/v4/classic/tests/void.test.ts +12 -0
  220. package/node_modules/zod/src/v4/core/api.ts +1798 -0
  221. package/node_modules/zod/src/v4/core/checks.ts +1293 -0
  222. package/node_modules/zod/src/v4/core/config.ts +15 -0
  223. package/node_modules/zod/src/v4/core/core.ts +138 -0
  224. package/node_modules/zod/src/v4/core/doc.ts +44 -0
  225. package/node_modules/zod/src/v4/core/errors.ts +448 -0
  226. package/node_modules/zod/src/v4/core/index.ts +16 -0
  227. package/node_modules/zod/src/v4/core/json-schema-generator.ts +126 -0
  228. package/node_modules/zod/src/v4/core/json-schema-processors.ts +667 -0
  229. package/node_modules/zod/src/v4/core/json-schema.ts +147 -0
  230. package/node_modules/zod/src/v4/core/parse.ts +195 -0
  231. package/node_modules/zod/src/v4/core/regexes.ts +183 -0
  232. package/node_modules/zod/src/v4/core/registries.ts +105 -0
  233. package/node_modules/zod/src/v4/core/schemas.ts +4538 -0
  234. package/node_modules/zod/src/v4/core/standard-schema.ts +159 -0
  235. package/node_modules/zod/src/v4/core/tests/extend.test.ts +59 -0
  236. package/node_modules/zod/src/v4/core/tests/index.test.ts +46 -0
  237. package/node_modules/zod/src/v4/core/tests/locales/be.test.ts +124 -0
  238. package/node_modules/zod/src/v4/core/tests/locales/en.test.ts +22 -0
  239. package/node_modules/zod/src/v4/core/tests/locales/es.test.ts +181 -0
  240. package/node_modules/zod/src/v4/core/tests/locales/he.test.ts +379 -0
  241. package/node_modules/zod/src/v4/core/tests/locales/nl.test.ts +46 -0
  242. package/node_modules/zod/src/v4/core/tests/locales/ru.test.ts +128 -0
  243. package/node_modules/zod/src/v4/core/tests/locales/tr.test.ts +69 -0
  244. package/node_modules/zod/src/v4/core/tests/locales/uz.test.ts +83 -0
  245. package/node_modules/zod/src/v4/core/tests/record-constructor.test.ts +67 -0
  246. package/node_modules/zod/src/v4/core/tests/recursive-tuples.test.ts +45 -0
  247. package/node_modules/zod/src/v4/core/to-json-schema.ts +613 -0
  248. package/node_modules/zod/src/v4/core/util.ts +966 -0
  249. package/node_modules/zod/src/v4/core/versions.ts +5 -0
  250. package/node_modules/zod/src/v4/core/zsf.ts +323 -0
  251. package/node_modules/zod/src/v4/index.ts +4 -0
  252. package/node_modules/zod/src/v4/locales/ar.ts +115 -0
  253. package/node_modules/zod/src/v4/locales/az.ts +111 -0
  254. package/node_modules/zod/src/v4/locales/be.ts +176 -0
  255. package/node_modules/zod/src/v4/locales/bg.ts +128 -0
  256. package/node_modules/zod/src/v4/locales/ca.ts +116 -0
  257. package/node_modules/zod/src/v4/locales/cs.ts +118 -0
  258. package/node_modules/zod/src/v4/locales/da.ts +123 -0
  259. package/node_modules/zod/src/v4/locales/de.ts +116 -0
  260. package/node_modules/zod/src/v4/locales/en.ts +119 -0
  261. package/node_modules/zod/src/v4/locales/eo.ts +118 -0
  262. package/node_modules/zod/src/v4/locales/es.ts +141 -0
  263. package/node_modules/zod/src/v4/locales/fa.ts +126 -0
  264. package/node_modules/zod/src/v4/locales/fi.ts +121 -0
  265. package/node_modules/zod/src/v4/locales/fr-CA.ts +116 -0
  266. package/node_modules/zod/src/v4/locales/fr.ts +116 -0
  267. package/node_modules/zod/src/v4/locales/he.ts +246 -0
  268. package/node_modules/zod/src/v4/locales/hu.ts +117 -0
  269. package/node_modules/zod/src/v4/locales/hy.ts +164 -0
  270. package/node_modules/zod/src/v4/locales/id.ts +115 -0
  271. package/node_modules/zod/src/v4/locales/index.ts +49 -0
  272. package/node_modules/zod/src/v4/locales/is.ts +119 -0
  273. package/node_modules/zod/src/v4/locales/it.ts +116 -0
  274. package/node_modules/zod/src/v4/locales/ja.ts +114 -0
  275. package/node_modules/zod/src/v4/locales/ka.ts +123 -0
  276. package/node_modules/zod/src/v4/locales/kh.ts +7 -0
  277. package/node_modules/zod/src/v4/locales/km.ts +119 -0
  278. package/node_modules/zod/src/v4/locales/ko.ts +121 -0
  279. package/node_modules/zod/src/v4/locales/lt.ts +239 -0
  280. package/node_modules/zod/src/v4/locales/mk.ts +118 -0
  281. package/node_modules/zod/src/v4/locales/ms.ts +115 -0
  282. package/node_modules/zod/src/v4/locales/nl.ts +121 -0
  283. package/node_modules/zod/src/v4/locales/no.ts +116 -0
  284. package/node_modules/zod/src/v4/locales/ota.ts +117 -0
  285. package/node_modules/zod/src/v4/locales/pl.ts +118 -0
  286. package/node_modules/zod/src/v4/locales/ps.ts +126 -0
  287. package/node_modules/zod/src/v4/locales/pt.ts +116 -0
  288. package/node_modules/zod/src/v4/locales/ru.ts +176 -0
  289. package/node_modules/zod/src/v4/locales/sl.ts +118 -0
  290. package/node_modules/zod/src/v4/locales/sv.ts +119 -0
  291. package/node_modules/zod/src/v4/locales/ta.ts +118 -0
  292. package/node_modules/zod/src/v4/locales/th.ts +119 -0
  293. package/node_modules/zod/src/v4/locales/tr.ts +111 -0
  294. package/node_modules/zod/src/v4/locales/ua.ts +7 -0
  295. package/node_modules/zod/src/v4/locales/uk.ts +117 -0
  296. package/node_modules/zod/src/v4/locales/ur.ts +119 -0
  297. package/node_modules/zod/src/v4/locales/uz.ts +116 -0
  298. package/node_modules/zod/src/v4/locales/vi.ts +117 -0
  299. package/node_modules/zod/src/v4/locales/yo.ts +124 -0
  300. package/node_modules/zod/src/v4/locales/zh-CN.ts +116 -0
  301. package/node_modules/zod/src/v4/locales/zh-TW.ts +115 -0
  302. package/node_modules/zod/src/v4/mini/checks.ts +32 -0
  303. package/node_modules/zod/src/v4/mini/coerce.ts +27 -0
  304. package/node_modules/zod/src/v4/mini/external.ts +40 -0
  305. package/node_modules/zod/src/v4/mini/index.ts +3 -0
  306. package/node_modules/zod/src/v4/mini/iso.ts +66 -0
  307. package/node_modules/zod/src/v4/mini/parse.ts +14 -0
  308. package/node_modules/zod/src/v4/mini/schemas.ts +1916 -0
  309. package/node_modules/zod/src/v4/mini/tests/apply.test.ts +24 -0
  310. package/node_modules/zod/src/v4/mini/tests/assignability.test.ts +129 -0
  311. package/node_modules/zod/src/v4/mini/tests/brand.test.ts +94 -0
  312. package/node_modules/zod/src/v4/mini/tests/checks.test.ts +144 -0
  313. package/node_modules/zod/src/v4/mini/tests/codec.test.ts +529 -0
  314. package/node_modules/zod/src/v4/mini/tests/computed.test.ts +36 -0
  315. package/node_modules/zod/src/v4/mini/tests/error.test.ts +22 -0
  316. package/node_modules/zod/src/v4/mini/tests/functions.test.ts +5 -0
  317. package/node_modules/zod/src/v4/mini/tests/index.test.ts +963 -0
  318. package/node_modules/zod/src/v4/mini/tests/number.test.ts +95 -0
  319. package/node_modules/zod/src/v4/mini/tests/object.test.ts +227 -0
  320. package/node_modules/zod/src/v4/mini/tests/prototypes.test.ts +43 -0
  321. package/node_modules/zod/src/v4/mini/tests/recursive-types.test.ts +275 -0
  322. package/node_modules/zod/src/v4/mini/tests/standard-schema.test.ts +50 -0
  323. package/node_modules/zod/src/v4/mini/tests/string.test.ts +347 -0
  324. package/node_modules/zod/src/v4-mini/index.ts +3 -0
  325. package/node_modules/zod/v3/ZodError.cjs +138 -0
  326. package/node_modules/zod/v3/ZodError.d.cts +164 -0
  327. package/node_modules/zod/v3/ZodError.d.ts +164 -0
  328. package/node_modules/zod/v3/ZodError.js +133 -0
  329. package/node_modules/zod/v3/errors.cjs +17 -0
  330. package/node_modules/zod/v3/errors.d.cts +5 -0
  331. package/node_modules/zod/v3/errors.d.ts +5 -0
  332. package/node_modules/zod/v3/errors.js +9 -0
  333. package/node_modules/zod/v3/external.cjs +22 -0
  334. package/node_modules/zod/v3/external.d.cts +6 -0
  335. package/node_modules/zod/v3/external.d.ts +6 -0
  336. package/node_modules/zod/v3/external.js +6 -0
  337. package/node_modules/zod/v3/helpers/enumUtil.cjs +2 -0
  338. package/node_modules/zod/v3/helpers/enumUtil.d.cts +8 -0
  339. package/node_modules/zod/v3/helpers/enumUtil.d.ts +8 -0
  340. package/node_modules/zod/v3/helpers/enumUtil.js +1 -0
  341. package/node_modules/zod/v3/helpers/errorUtil.cjs +9 -0
  342. package/node_modules/zod/v3/helpers/errorUtil.d.cts +9 -0
  343. package/node_modules/zod/v3/helpers/errorUtil.d.ts +9 -0
  344. package/node_modules/zod/v3/helpers/errorUtil.js +6 -0
  345. package/node_modules/zod/v3/helpers/parseUtil.cjs +124 -0
  346. package/node_modules/zod/v3/helpers/parseUtil.d.cts +78 -0
  347. package/node_modules/zod/v3/helpers/parseUtil.d.ts +78 -0
  348. package/node_modules/zod/v3/helpers/parseUtil.js +109 -0
  349. package/node_modules/zod/v3/helpers/partialUtil.cjs +2 -0
  350. package/node_modules/zod/v3/helpers/partialUtil.d.cts +8 -0
  351. package/node_modules/zod/v3/helpers/partialUtil.d.ts +8 -0
  352. package/node_modules/zod/v3/helpers/partialUtil.js +1 -0
  353. package/node_modules/zod/v3/helpers/typeAliases.cjs +2 -0
  354. package/node_modules/zod/v3/helpers/typeAliases.d.cts +2 -0
  355. package/node_modules/zod/v3/helpers/typeAliases.d.ts +2 -0
  356. package/node_modules/zod/v3/helpers/typeAliases.js +1 -0
  357. package/node_modules/zod/v3/helpers/util.cjs +137 -0
  358. package/node_modules/zod/v3/helpers/util.d.cts +85 -0
  359. package/node_modules/zod/v3/helpers/util.d.ts +85 -0
  360. package/node_modules/zod/v3/helpers/util.js +133 -0
  361. package/node_modules/zod/v3/index.cjs +33 -0
  362. package/node_modules/zod/v3/index.d.cts +4 -0
  363. package/node_modules/zod/v3/index.d.ts +4 -0
  364. package/node_modules/zod/v3/index.js +4 -0
  365. package/node_modules/zod/v3/locales/en.cjs +112 -0
  366. package/node_modules/zod/v3/locales/en.d.cts +3 -0
  367. package/node_modules/zod/v3/locales/en.d.ts +3 -0
  368. package/node_modules/zod/v3/locales/en.js +109 -0
  369. package/node_modules/zod/v3/package.json +6 -0
  370. package/node_modules/zod/v3/standard-schema.cjs +2 -0
  371. package/node_modules/zod/v3/standard-schema.d.cts +102 -0
  372. package/node_modules/zod/v3/standard-schema.d.ts +102 -0
  373. package/node_modules/zod/v3/standard-schema.js +1 -0
  374. package/node_modules/zod/v3/types.cjs +3777 -0
  375. package/node_modules/zod/v3/types.d.cts +1034 -0
  376. package/node_modules/zod/v3/types.d.ts +1034 -0
  377. package/node_modules/zod/v3/types.js +3695 -0
  378. package/node_modules/zod/v4/classic/checks.cjs +33 -0
  379. package/node_modules/zod/v4/classic/checks.d.cts +1 -0
  380. package/node_modules/zod/v4/classic/checks.d.ts +1 -0
  381. package/node_modules/zod/v4/classic/checks.js +1 -0
  382. package/node_modules/zod/v4/classic/coerce.cjs +47 -0
  383. package/node_modules/zod/v4/classic/coerce.d.cts +17 -0
  384. package/node_modules/zod/v4/classic/coerce.d.ts +17 -0
  385. package/node_modules/zod/v4/classic/coerce.js +17 -0
  386. package/node_modules/zod/v4/classic/compat.cjs +61 -0
  387. package/node_modules/zod/v4/classic/compat.d.cts +50 -0
  388. package/node_modules/zod/v4/classic/compat.d.ts +50 -0
  389. package/node_modules/zod/v4/classic/compat.js +31 -0
  390. package/node_modules/zod/v4/classic/errors.cjs +74 -0
  391. package/node_modules/zod/v4/classic/errors.d.cts +30 -0
  392. package/node_modules/zod/v4/classic/errors.d.ts +30 -0
  393. package/node_modules/zod/v4/classic/errors.js +48 -0
  394. package/node_modules/zod/v4/classic/external.cjs +73 -0
  395. package/node_modules/zod/v4/classic/external.d.cts +15 -0
  396. package/node_modules/zod/v4/classic/external.d.ts +15 -0
  397. package/node_modules/zod/v4/classic/external.js +20 -0
  398. package/node_modules/zod/v4/classic/from-json-schema.cjs +610 -0
  399. package/node_modules/zod/v4/classic/from-json-schema.d.cts +12 -0
  400. package/node_modules/zod/v4/classic/from-json-schema.d.ts +12 -0
  401. package/node_modules/zod/v4/classic/from-json-schema.js +584 -0
  402. package/node_modules/zod/v4/classic/index.cjs +33 -0
  403. package/node_modules/zod/v4/classic/index.d.cts +4 -0
  404. package/node_modules/zod/v4/classic/index.d.ts +4 -0
  405. package/node_modules/zod/v4/classic/index.js +4 -0
  406. package/node_modules/zod/v4/classic/iso.cjs +60 -0
  407. package/node_modules/zod/v4/classic/iso.d.cts +22 -0
  408. package/node_modules/zod/v4/classic/iso.d.ts +22 -0
  409. package/node_modules/zod/v4/classic/iso.js +30 -0
  410. package/node_modules/zod/v4/classic/package.json +6 -0
  411. package/node_modules/zod/v4/classic/parse.cjs +41 -0
  412. package/node_modules/zod/v4/classic/parse.d.cts +31 -0
  413. package/node_modules/zod/v4/classic/parse.d.ts +31 -0
  414. package/node_modules/zod/v4/classic/parse.js +15 -0
  415. package/node_modules/zod/v4/classic/schemas.cjs +1272 -0
  416. package/node_modules/zod/v4/classic/schemas.d.cts +739 -0
  417. package/node_modules/zod/v4/classic/schemas.d.ts +739 -0
  418. package/node_modules/zod/v4/classic/schemas.js +1157 -0
  419. package/node_modules/zod/v4/core/api.cjs +1222 -0
  420. package/node_modules/zod/v4/core/api.d.cts +304 -0
  421. package/node_modules/zod/v4/core/api.d.ts +304 -0
  422. package/node_modules/zod/v4/core/api.js +1082 -0
  423. package/node_modules/zod/v4/core/checks.cjs +601 -0
  424. package/node_modules/zod/v4/core/checks.d.cts +278 -0
  425. package/node_modules/zod/v4/core/checks.d.ts +278 -0
  426. package/node_modules/zod/v4/core/checks.js +575 -0
  427. package/node_modules/zod/v4/core/core.cjs +83 -0
  428. package/node_modules/zod/v4/core/core.d.cts +70 -0
  429. package/node_modules/zod/v4/core/core.d.ts +70 -0
  430. package/node_modules/zod/v4/core/core.js +76 -0
  431. package/node_modules/zod/v4/core/doc.cjs +39 -0
  432. package/node_modules/zod/v4/core/doc.d.cts +14 -0
  433. package/node_modules/zod/v4/core/doc.d.ts +14 -0
  434. package/node_modules/zod/v4/core/doc.js +35 -0
  435. package/node_modules/zod/v4/core/errors.cjs +213 -0
  436. package/node_modules/zod/v4/core/errors.d.cts +220 -0
  437. package/node_modules/zod/v4/core/errors.d.ts +220 -0
  438. package/node_modules/zod/v4/core/errors.js +182 -0
  439. package/node_modules/zod/v4/core/index.cjs +47 -0
  440. package/node_modules/zod/v4/core/index.d.cts +16 -0
  441. package/node_modules/zod/v4/core/index.d.ts +16 -0
  442. package/node_modules/zod/v4/core/index.js +16 -0
  443. package/node_modules/zod/v4/core/json-schema-generator.cjs +99 -0
  444. package/node_modules/zod/v4/core/json-schema-generator.d.cts +65 -0
  445. package/node_modules/zod/v4/core/json-schema-generator.d.ts +65 -0
  446. package/node_modules/zod/v4/core/json-schema-generator.js +95 -0
  447. package/node_modules/zod/v4/core/json-schema-processors.cjs +648 -0
  448. package/node_modules/zod/v4/core/json-schema-processors.d.cts +49 -0
  449. package/node_modules/zod/v4/core/json-schema-processors.d.ts +49 -0
  450. package/node_modules/zod/v4/core/json-schema-processors.js +605 -0
  451. package/node_modules/zod/v4/core/json-schema.cjs +2 -0
  452. package/node_modules/zod/v4/core/json-schema.d.cts +88 -0
  453. package/node_modules/zod/v4/core/json-schema.d.ts +88 -0
  454. package/node_modules/zod/v4/core/json-schema.js +1 -0
  455. package/node_modules/zod/v4/core/package.json +6 -0
  456. package/node_modules/zod/v4/core/parse.cjs +131 -0
  457. package/node_modules/zod/v4/core/parse.d.cts +49 -0
  458. package/node_modules/zod/v4/core/parse.d.ts +49 -0
  459. package/node_modules/zod/v4/core/parse.js +93 -0
  460. package/node_modules/zod/v4/core/regexes.cjs +166 -0
  461. package/node_modules/zod/v4/core/regexes.d.cts +79 -0
  462. package/node_modules/zod/v4/core/regexes.d.ts +79 -0
  463. package/node_modules/zod/v4/core/regexes.js +133 -0
  464. package/node_modules/zod/v4/core/registries.cjs +56 -0
  465. package/node_modules/zod/v4/core/registries.d.cts +35 -0
  466. package/node_modules/zod/v4/core/registries.d.ts +35 -0
  467. package/node_modules/zod/v4/core/registries.js +51 -0
  468. package/node_modules/zod/v4/core/schemas.cjs +2124 -0
  469. package/node_modules/zod/v4/core/schemas.d.cts +1146 -0
  470. package/node_modules/zod/v4/core/schemas.d.ts +1146 -0
  471. package/node_modules/zod/v4/core/schemas.js +2093 -0
  472. package/node_modules/zod/v4/core/standard-schema.cjs +2 -0
  473. package/node_modules/zod/v4/core/standard-schema.d.cts +126 -0
  474. package/node_modules/zod/v4/core/standard-schema.d.ts +126 -0
  475. package/node_modules/zod/v4/core/standard-schema.js +1 -0
  476. package/node_modules/zod/v4/core/to-json-schema.cjs +446 -0
  477. package/node_modules/zod/v4/core/to-json-schema.d.cts +114 -0
  478. package/node_modules/zod/v4/core/to-json-schema.d.ts +114 -0
  479. package/node_modules/zod/v4/core/to-json-schema.js +437 -0
  480. package/node_modules/zod/v4/core/util.cjs +710 -0
  481. package/node_modules/zod/v4/core/util.d.cts +199 -0
  482. package/node_modules/zod/v4/core/util.d.ts +199 -0
  483. package/node_modules/zod/v4/core/util.js +651 -0
  484. package/node_modules/zod/v4/core/versions.cjs +8 -0
  485. package/node_modules/zod/v4/core/versions.d.cts +5 -0
  486. package/node_modules/zod/v4/core/versions.d.ts +5 -0
  487. package/node_modules/zod/v4/core/versions.js +5 -0
  488. package/node_modules/zod/v4/index.cjs +22 -0
  489. package/node_modules/zod/v4/index.d.cts +3 -0
  490. package/node_modules/zod/v4/index.d.ts +3 -0
  491. package/node_modules/zod/v4/index.js +3 -0
  492. package/node_modules/zod/v4/locales/ar.cjs +133 -0
  493. package/node_modules/zod/v4/locales/ar.d.cts +5 -0
  494. package/node_modules/zod/v4/locales/ar.d.ts +4 -0
  495. package/node_modules/zod/v4/locales/ar.js +106 -0
  496. package/node_modules/zod/v4/locales/az.cjs +132 -0
  497. package/node_modules/zod/v4/locales/az.d.cts +5 -0
  498. package/node_modules/zod/v4/locales/az.d.ts +4 -0
  499. package/node_modules/zod/v4/locales/az.js +105 -0
  500. package/node_modules/zod/v4/locales/be.cjs +183 -0
  501. package/node_modules/zod/v4/locales/be.d.cts +5 -0
  502. package/node_modules/zod/v4/locales/be.d.ts +4 -0
  503. package/node_modules/zod/v4/locales/be.js +156 -0
  504. package/node_modules/zod/v4/locales/bg.cjs +147 -0
  505. package/node_modules/zod/v4/locales/bg.d.cts +5 -0
  506. package/node_modules/zod/v4/locales/bg.d.ts +4 -0
  507. package/node_modules/zod/v4/locales/bg.js +120 -0
  508. package/node_modules/zod/v4/locales/ca.cjs +134 -0
  509. package/node_modules/zod/v4/locales/ca.d.cts +5 -0
  510. package/node_modules/zod/v4/locales/ca.d.ts +4 -0
  511. package/node_modules/zod/v4/locales/ca.js +107 -0
  512. package/node_modules/zod/v4/locales/cs.cjs +138 -0
  513. package/node_modules/zod/v4/locales/cs.d.cts +5 -0
  514. package/node_modules/zod/v4/locales/cs.d.ts +4 -0
  515. package/node_modules/zod/v4/locales/cs.js +111 -0
  516. package/node_modules/zod/v4/locales/da.cjs +142 -0
  517. package/node_modules/zod/v4/locales/da.d.cts +5 -0
  518. package/node_modules/zod/v4/locales/da.d.ts +4 -0
  519. package/node_modules/zod/v4/locales/da.js +115 -0
  520. package/node_modules/zod/v4/locales/de.cjs +135 -0
  521. package/node_modules/zod/v4/locales/de.d.cts +5 -0
  522. package/node_modules/zod/v4/locales/de.d.ts +4 -0
  523. package/node_modules/zod/v4/locales/de.js +108 -0
  524. package/node_modules/zod/v4/locales/en.cjs +136 -0
  525. package/node_modules/zod/v4/locales/en.d.cts +5 -0
  526. package/node_modules/zod/v4/locales/en.d.ts +4 -0
  527. package/node_modules/zod/v4/locales/en.js +109 -0
  528. package/node_modules/zod/v4/locales/eo.cjs +136 -0
  529. package/node_modules/zod/v4/locales/eo.d.cts +5 -0
  530. package/node_modules/zod/v4/locales/eo.d.ts +4 -0
  531. package/node_modules/zod/v4/locales/eo.js +109 -0
  532. package/node_modules/zod/v4/locales/es.cjs +159 -0
  533. package/node_modules/zod/v4/locales/es.d.cts +5 -0
  534. package/node_modules/zod/v4/locales/es.d.ts +4 -0
  535. package/node_modules/zod/v4/locales/es.js +132 -0
  536. package/node_modules/zod/v4/locales/fa.cjs +141 -0
  537. package/node_modules/zod/v4/locales/fa.d.cts +5 -0
  538. package/node_modules/zod/v4/locales/fa.d.ts +4 -0
  539. package/node_modules/zod/v4/locales/fa.js +114 -0
  540. package/node_modules/zod/v4/locales/fi.cjs +139 -0
  541. package/node_modules/zod/v4/locales/fi.d.cts +5 -0
  542. package/node_modules/zod/v4/locales/fi.d.ts +4 -0
  543. package/node_modules/zod/v4/locales/fi.js +112 -0
  544. package/node_modules/zod/v4/locales/fr-CA.cjs +134 -0
  545. package/node_modules/zod/v4/locales/fr-CA.d.cts +5 -0
  546. package/node_modules/zod/v4/locales/fr-CA.d.ts +4 -0
  547. package/node_modules/zod/v4/locales/fr-CA.js +107 -0
  548. package/node_modules/zod/v4/locales/fr.cjs +135 -0
  549. package/node_modules/zod/v4/locales/fr.d.cts +5 -0
  550. package/node_modules/zod/v4/locales/fr.d.ts +4 -0
  551. package/node_modules/zod/v4/locales/fr.js +108 -0
  552. package/node_modules/zod/v4/locales/he.cjs +241 -0
  553. package/node_modules/zod/v4/locales/he.d.cts +5 -0
  554. package/node_modules/zod/v4/locales/he.d.ts +4 -0
  555. package/node_modules/zod/v4/locales/he.js +214 -0
  556. package/node_modules/zod/v4/locales/hu.cjs +135 -0
  557. package/node_modules/zod/v4/locales/hu.d.cts +5 -0
  558. package/node_modules/zod/v4/locales/hu.d.ts +4 -0
  559. package/node_modules/zod/v4/locales/hu.js +108 -0
  560. package/node_modules/zod/v4/locales/hy.cjs +174 -0
  561. package/node_modules/zod/v4/locales/hy.d.cts +5 -0
  562. package/node_modules/zod/v4/locales/hy.d.ts +4 -0
  563. package/node_modules/zod/v4/locales/hy.js +147 -0
  564. package/node_modules/zod/v4/locales/id.cjs +133 -0
  565. package/node_modules/zod/v4/locales/id.d.cts +5 -0
  566. package/node_modules/zod/v4/locales/id.d.ts +4 -0
  567. package/node_modules/zod/v4/locales/id.js +106 -0
  568. package/node_modules/zod/v4/locales/index.cjs +104 -0
  569. package/node_modules/zod/v4/locales/index.d.cts +49 -0
  570. package/node_modules/zod/v4/locales/index.d.ts +49 -0
  571. package/node_modules/zod/v4/locales/index.js +49 -0
  572. package/node_modules/zod/v4/locales/is.cjs +136 -0
  573. package/node_modules/zod/v4/locales/is.d.cts +5 -0
  574. package/node_modules/zod/v4/locales/is.d.ts +4 -0
  575. package/node_modules/zod/v4/locales/is.js +109 -0
  576. package/node_modules/zod/v4/locales/it.cjs +135 -0
  577. package/node_modules/zod/v4/locales/it.d.cts +5 -0
  578. package/node_modules/zod/v4/locales/it.d.ts +4 -0
  579. package/node_modules/zod/v4/locales/it.js +108 -0
  580. package/node_modules/zod/v4/locales/ja.cjs +134 -0
  581. package/node_modules/zod/v4/locales/ja.d.cts +5 -0
  582. package/node_modules/zod/v4/locales/ja.d.ts +4 -0
  583. package/node_modules/zod/v4/locales/ja.js +107 -0
  584. package/node_modules/zod/v4/locales/ka.cjs +139 -0
  585. package/node_modules/zod/v4/locales/ka.d.cts +5 -0
  586. package/node_modules/zod/v4/locales/ka.d.ts +4 -0
  587. package/node_modules/zod/v4/locales/ka.js +112 -0
  588. package/node_modules/zod/v4/locales/kh.cjs +12 -0
  589. package/node_modules/zod/v4/locales/kh.d.cts +5 -0
  590. package/node_modules/zod/v4/locales/kh.d.ts +5 -0
  591. package/node_modules/zod/v4/locales/kh.js +5 -0
  592. package/node_modules/zod/v4/locales/km.cjs +137 -0
  593. package/node_modules/zod/v4/locales/km.d.cts +5 -0
  594. package/node_modules/zod/v4/locales/km.d.ts +4 -0
  595. package/node_modules/zod/v4/locales/km.js +110 -0
  596. package/node_modules/zod/v4/locales/ko.cjs +138 -0
  597. package/node_modules/zod/v4/locales/ko.d.cts +5 -0
  598. package/node_modules/zod/v4/locales/ko.d.ts +4 -0
  599. package/node_modules/zod/v4/locales/ko.js +111 -0
  600. package/node_modules/zod/v4/locales/lt.cjs +230 -0
  601. package/node_modules/zod/v4/locales/lt.d.cts +5 -0
  602. package/node_modules/zod/v4/locales/lt.d.ts +4 -0
  603. package/node_modules/zod/v4/locales/lt.js +203 -0
  604. package/node_modules/zod/v4/locales/mk.cjs +136 -0
  605. package/node_modules/zod/v4/locales/mk.d.cts +5 -0
  606. package/node_modules/zod/v4/locales/mk.d.ts +4 -0
  607. package/node_modules/zod/v4/locales/mk.js +109 -0
  608. package/node_modules/zod/v4/locales/ms.cjs +134 -0
  609. package/node_modules/zod/v4/locales/ms.d.cts +5 -0
  610. package/node_modules/zod/v4/locales/ms.d.ts +4 -0
  611. package/node_modules/zod/v4/locales/ms.js +107 -0
  612. package/node_modules/zod/v4/locales/nl.cjs +137 -0
  613. package/node_modules/zod/v4/locales/nl.d.cts +5 -0
  614. package/node_modules/zod/v4/locales/nl.d.ts +4 -0
  615. package/node_modules/zod/v4/locales/nl.js +110 -0
  616. package/node_modules/zod/v4/locales/no.cjs +135 -0
  617. package/node_modules/zod/v4/locales/no.d.cts +5 -0
  618. package/node_modules/zod/v4/locales/no.d.ts +4 -0
  619. package/node_modules/zod/v4/locales/no.js +108 -0
  620. package/node_modules/zod/v4/locales/ota.cjs +136 -0
  621. package/node_modules/zod/v4/locales/ota.d.cts +5 -0
  622. package/node_modules/zod/v4/locales/ota.d.ts +4 -0
  623. package/node_modules/zod/v4/locales/ota.js +109 -0
  624. package/node_modules/zod/v4/locales/package.json +6 -0
  625. package/node_modules/zod/v4/locales/pl.cjs +136 -0
  626. package/node_modules/zod/v4/locales/pl.d.cts +5 -0
  627. package/node_modules/zod/v4/locales/pl.d.ts +4 -0
  628. package/node_modules/zod/v4/locales/pl.js +109 -0
  629. package/node_modules/zod/v4/locales/ps.cjs +141 -0
  630. package/node_modules/zod/v4/locales/ps.d.cts +5 -0
  631. package/node_modules/zod/v4/locales/ps.d.ts +4 -0
  632. package/node_modules/zod/v4/locales/ps.js +114 -0
  633. package/node_modules/zod/v4/locales/pt.cjs +135 -0
  634. package/node_modules/zod/v4/locales/pt.d.cts +5 -0
  635. package/node_modules/zod/v4/locales/pt.d.ts +4 -0
  636. package/node_modules/zod/v4/locales/pt.js +108 -0
  637. package/node_modules/zod/v4/locales/ru.cjs +183 -0
  638. package/node_modules/zod/v4/locales/ru.d.cts +5 -0
  639. package/node_modules/zod/v4/locales/ru.d.ts +4 -0
  640. package/node_modules/zod/v4/locales/ru.js +156 -0
  641. package/node_modules/zod/v4/locales/sl.cjs +136 -0
  642. package/node_modules/zod/v4/locales/sl.d.cts +5 -0
  643. package/node_modules/zod/v4/locales/sl.d.ts +4 -0
  644. package/node_modules/zod/v4/locales/sl.js +109 -0
  645. package/node_modules/zod/v4/locales/sv.cjs +137 -0
  646. package/node_modules/zod/v4/locales/sv.d.cts +5 -0
  647. package/node_modules/zod/v4/locales/sv.d.ts +4 -0
  648. package/node_modules/zod/v4/locales/sv.js +110 -0
  649. package/node_modules/zod/v4/locales/ta.cjs +137 -0
  650. package/node_modules/zod/v4/locales/ta.d.cts +5 -0
  651. package/node_modules/zod/v4/locales/ta.d.ts +4 -0
  652. package/node_modules/zod/v4/locales/ta.js +110 -0
  653. package/node_modules/zod/v4/locales/th.cjs +137 -0
  654. package/node_modules/zod/v4/locales/th.d.cts +5 -0
  655. package/node_modules/zod/v4/locales/th.d.ts +4 -0
  656. package/node_modules/zod/v4/locales/th.js +110 -0
  657. package/node_modules/zod/v4/locales/tr.cjs +132 -0
  658. package/node_modules/zod/v4/locales/tr.d.cts +5 -0
  659. package/node_modules/zod/v4/locales/tr.d.ts +4 -0
  660. package/node_modules/zod/v4/locales/tr.js +105 -0
  661. package/node_modules/zod/v4/locales/ua.cjs +12 -0
  662. package/node_modules/zod/v4/locales/ua.d.cts +5 -0
  663. package/node_modules/zod/v4/locales/ua.d.ts +5 -0
  664. package/node_modules/zod/v4/locales/ua.js +5 -0
  665. package/node_modules/zod/v4/locales/uk.cjs +135 -0
  666. package/node_modules/zod/v4/locales/uk.d.cts +5 -0
  667. package/node_modules/zod/v4/locales/uk.d.ts +4 -0
  668. package/node_modules/zod/v4/locales/uk.js +108 -0
  669. package/node_modules/zod/v4/locales/ur.cjs +137 -0
  670. package/node_modules/zod/v4/locales/ur.d.cts +5 -0
  671. package/node_modules/zod/v4/locales/ur.d.ts +4 -0
  672. package/node_modules/zod/v4/locales/ur.js +110 -0
  673. package/node_modules/zod/v4/locales/uz.cjs +136 -0
  674. package/node_modules/zod/v4/locales/uz.d.cts +5 -0
  675. package/node_modules/zod/v4/locales/uz.d.ts +4 -0
  676. package/node_modules/zod/v4/locales/uz.js +109 -0
  677. package/node_modules/zod/v4/locales/vi.cjs +135 -0
  678. package/node_modules/zod/v4/locales/vi.d.cts +5 -0
  679. package/node_modules/zod/v4/locales/vi.d.ts +4 -0
  680. package/node_modules/zod/v4/locales/vi.js +108 -0
  681. package/node_modules/zod/v4/locales/yo.cjs +134 -0
  682. package/node_modules/zod/v4/locales/yo.d.cts +5 -0
  683. package/node_modules/zod/v4/locales/yo.d.ts +4 -0
  684. package/node_modules/zod/v4/locales/yo.js +107 -0
  685. package/node_modules/zod/v4/locales/zh-CN.cjs +136 -0
  686. package/node_modules/zod/v4/locales/zh-CN.d.cts +5 -0
  687. package/node_modules/zod/v4/locales/zh-CN.d.ts +4 -0
  688. package/node_modules/zod/v4/locales/zh-CN.js +109 -0
  689. package/node_modules/zod/v4/locales/zh-TW.cjs +134 -0
  690. package/node_modules/zod/v4/locales/zh-TW.d.cts +5 -0
  691. package/node_modules/zod/v4/locales/zh-TW.d.ts +4 -0
  692. package/node_modules/zod/v4/locales/zh-TW.js +107 -0
  693. package/node_modules/zod/v4/mini/checks.cjs +34 -0
  694. package/node_modules/zod/v4/mini/checks.d.cts +1 -0
  695. package/node_modules/zod/v4/mini/checks.d.ts +1 -0
  696. package/node_modules/zod/v4/mini/checks.js +1 -0
  697. package/node_modules/zod/v4/mini/coerce.cjs +52 -0
  698. package/node_modules/zod/v4/mini/coerce.d.cts +7 -0
  699. package/node_modules/zod/v4/mini/coerce.d.ts +7 -0
  700. package/node_modules/zod/v4/mini/coerce.js +22 -0
  701. package/node_modules/zod/v4/mini/external.cjs +63 -0
  702. package/node_modules/zod/v4/mini/external.d.cts +12 -0
  703. package/node_modules/zod/v4/mini/external.d.ts +12 -0
  704. package/node_modules/zod/v4/mini/external.js +14 -0
  705. package/node_modules/zod/v4/mini/index.cjs +32 -0
  706. package/node_modules/zod/v4/mini/index.d.cts +3 -0
  707. package/node_modules/zod/v4/mini/index.d.ts +3 -0
  708. package/node_modules/zod/v4/mini/index.js +3 -0
  709. package/node_modules/zod/v4/mini/iso.cjs +64 -0
  710. package/node_modules/zod/v4/mini/iso.d.cts +22 -0
  711. package/node_modules/zod/v4/mini/iso.d.ts +22 -0
  712. package/node_modules/zod/v4/mini/iso.js +34 -0
  713. package/node_modules/zod/v4/mini/package.json +6 -0
  714. package/node_modules/zod/v4/mini/parse.cjs +16 -0
  715. package/node_modules/zod/v4/mini/parse.d.cts +1 -0
  716. package/node_modules/zod/v4/mini/parse.d.ts +1 -0
  717. package/node_modules/zod/v4/mini/parse.js +1 -0
  718. package/node_modules/zod/v4/mini/schemas.cjs +1046 -0
  719. package/node_modules/zod/v4/mini/schemas.d.cts +427 -0
  720. package/node_modules/zod/v4/mini/schemas.d.ts +427 -0
  721. package/node_modules/zod/v4/mini/schemas.js +925 -0
  722. package/node_modules/zod/v4/package.json +6 -0
  723. package/node_modules/zod/v4-mini/index.cjs +32 -0
  724. package/node_modules/zod/v4-mini/index.d.cts +3 -0
  725. package/node_modules/zod/v4-mini/index.d.ts +3 -0
  726. package/node_modules/zod/v4-mini/index.js +3 -0
  727. package/node_modules/zod/v4-mini/package.json +6 -0
  728. package/package.json +19 -3
  729. package/plugin/dist/index.d.ts +153 -0
  730. package/plugin/dist/index.d.ts.map +1 -0
  731. package/plugin/dist/index.js +3154 -0
  732. package/plugin/dist/index.js.map +1 -0
  733. package/plugin/openclaw.plugin.json +13 -0
  734. package/plugin/package.json +65 -0
  735. package/scripts/install-runtime.mjs +81 -0
package/docs/TUNING.md ADDED
@@ -0,0 +1,866 @@
1
+ # hypermem Tuning Guide
2
+
3
+ Configuration reference for operators and agents. All settings are optional, but the installer now writes a fully-expanded `config.json` so operators can see every default in one place.
4
+
5
+ Config lives in `~/.openclaw/hypermem/config.json` (takes effect on gateway restart) or is passed programmatically via `HyperMem.create()`:
6
+
7
+ ```ts
8
+ const hm = await HyperMem.create({
9
+ compositor: { budgetFraction: 0.70, hyperformProfile: 'standard' },
10
+ });
11
+ ```
12
+
13
+ Lookup paths for operators and agents:
14
+
15
+ ```bash
16
+ cat ~/.openclaw/hypermem/config.json
17
+ openclaw config get plugins.entries.hypercompositor.config
18
+ openclaw config get plugins.slots.contextEngine
19
+ ```
20
+
21
+ Resolution order is:
22
+ 1. `plugins.entries.hypercompositor.config` in `openclaw.json`
23
+ 2. `~/.openclaw/hypermem/config.json`
24
+ 3. code defaults
25
+
26
+ ---
27
+
28
+ ## Token Cost Philosophy
29
+
30
+ HyperMem is deliberately context-heavy. Before you reach for the light preset, understand the tradeoff you're making.
31
+
32
+ **The core proposition:** spending more tokens per turn means fewer turns to reach a useful answer.
33
+
34
+ A standard HyperMem turn injects 40–90k tokens of structured context: recent conversation history, relevant facts, knowledge pages, semantic recall from past sessions, and behavioral directives. That context costs tokens. What it buys you:
35
+
36
+ - The model starts each turn knowing what it already decided, not re-discovering it
37
+ - Recalled facts prevent drift across long sessions
38
+ - Keystone messages surface relevant older decisions without re-reading history
39
+ - Behavioral directives compress output — the model writes tighter answers, which costs fewer output tokens and less follow-up clarification
40
+
41
+ **The math most token-counters miss:** a 90k-token context turn that resolves a task in 1 exchange is cheaper than a 20k-token context turn that takes 4 exchanges to converge on the same answer. Input tokens are priced lower than output tokens at most providers; large context is less expensive than it appears in the first-turn sticker shock.
42
+
43
+ That said, not every deployment needs full context richness. If you're running a single-purpose tool agent, a CI pipeline, or a constrained environment, the light preset is the right starting point.
44
+
45
+ ### Choosing a starting point
46
+
47
+ | Situation | Preset | Reason |
48
+ |---|---|---|
49
+ | First install, trying it out | `light` | Minimal overhead, easy to reason about |
50
+ | Single conversational agent | `standard` | Richer memory without fleet overhead |
51
+ | Multi-agent fleet, long-running sessions | `full` | Full continuity, keystone recall, cross-session context |
52
+ | CI pipelines, one-shot tasks | Custom light | Disable indexer, keep only history |
53
+ | Cost audit / benchmarking | `light` + `enableFOS: false` | Near-zero memory overhead for baseline comparison |
54
+
55
+ ### What each preset costs per turn
56
+
57
+ Estimates on a 200k model (Claude Sonnet). Scale proportionally for smaller windows — on a 128k model expect roughly 60% of these figures. Actual cost depends on session length and indexer trigger hits.
58
+
59
+ | Preset | Turn 1 (warm) | Turn 5+ (established) | Layers active |
60
+ |---|---|---|---|
61
+ | `light` | **12–18k** | 25–35k | History, facts (10 cap), keystones (5 cap), behavior |
62
+ | `standard` (default) | **35–50k** | 55–80k | All layers, default caps |
63
+ | `full` | **40–55k** | 60–85k | All layers, raised caps, cross-session on |
64
+
65
+ Standard turn 1 is lower than full because `warmHistoryBudgetFraction` is the same, but full enables cross-session context which adds tokens immediately; by turn 5 full overtakes standard as more layers accumulate history.
66
+
67
+ **Turn 1 is where token-conscious users will react.** Light vs full on turn 1 is roughly 25–40k tokens — the number that shows up in provider dashboards. By turn 5 the gap is still real, but the value case is easier to make because the user has already experienced continuity.
68
+
69
+ **At Claude Sonnet input pricing ($3/M tokens):** the turn-1 delta between light and standard is roughly $0.06–$0.11 per turn. The question is whether you recover that in fewer follow-up turns. For agents doing multi-session work, the answer is almost always yes.
70
+
71
+ ### Light setup
72
+
73
+ For cost-sensitive deployments or users who want a gentler start. The light philosophy is not "turn it off" — it's **lower first-turn warming and less aggressive fact loading**. Every memory layer still runs; it just loads less on turn 1 and scales up as the session accumulates history.
74
+
75
+ The key lever here is `warmHistoryBudgetFraction`: it controls how much of the budget is used for history on the first warm session turn. Lowering it reduces the turn-1 context sticker shock without disabling recall for the rest of the session.
76
+
77
+ ```json
78
+ {
79
+ "compositor": {
80
+ "budgetFraction": 0.55,
81
+ "contextWindowReserve": 0.30,
82
+ "warmHistoryBudgetFraction": 0.20,
83
+ "maxFacts": 10,
84
+ "maxHistoryMessages": 150,
85
+ "maxCrossSessionContext": 0,
86
+ "keystoneHistoryFraction": 0.10,
87
+ "keystoneMaxMessages": 5,
88
+ "wikiTokenCap": 200,
89
+ "hyperformProfile": "light"
90
+ },
91
+ "indexer": {
92
+ "factExtractionMode": "pattern",
93
+ "periodicInterval": 600000
94
+ },
95
+ "dreaming": {
96
+ "enabled": false
97
+ }
98
+ }
99
+ ```
100
+
101
+ Estimated context per turn: **12–35k tokens** on a 200k model (lower on smaller models), rising from turn 1 as history accumulates. Fact recall and keystone injection are active but conservative. Good for: users trying HyperMem for the first time, single-agent setups on smaller models, or any deployment where turn-1 context size is a concern.
102
+
103
+ **Session continuity still works at light budget.** Cross-session history threads carry over, so returning users don't start from scratch. The semantic recall layer fires against the content of each incoming message — so by turn 2 or 3, as the user starts expressing what they actually want to work on, recall naturally surfaces relevant facts and context for that topic. Turn 1 is lean; the session warms into the right knowledge as the conversation takes shape. Users who are token-conscious will see a modest first turn, then progressively richer context as their topic clarifies — which is exactly when they need it.
104
+
105
+ ### Standard setup
106
+
107
+ The default out-of-the-box configuration. All memory layers active with balanced caps. Good for most single-agent deployments.
108
+
109
+ ```json
110
+ {
111
+ "compositor": {
112
+ "budgetFraction": 0.703,
113
+ "contextWindowReserve": 0.25,
114
+ "maxFacts": 28,
115
+ "maxHistoryMessages": 250,
116
+ "maxCrossSessionContext": 0,
117
+ "keystoneHistoryFraction": 0.20,
118
+ "keystoneMaxMessages": 15,
119
+ "hyperformProfile": "standard"
120
+ },
121
+ "indexer": {
122
+ "factExtractionMode": "tiered",
123
+ "periodicInterval": 300000
124
+ }
125
+ }
126
+ ```
127
+
128
+ Estimated context per turn: **35–80k tokens** on a 200k model. This is what ships if you don't touch the config.
129
+
130
+ ### Full performance setup
131
+
132
+ For long-running sessions, multi-agent fleets, or any deployment where the agent needs to remember what happened and why. All memory layers active, caps raised.
133
+
134
+ ```json
135
+ {
136
+ "compositor": {
137
+ "budgetFraction": 0.70,
138
+ "contextWindowReserve": 0.22,
139
+ "maxFacts": 40,
140
+ "maxHistoryMessages": 500,
141
+ "maxCrossSessionContext": 6000,
142
+ "keystoneHistoryFraction": 0.22,
143
+ "keystoneMaxMessages": 20,
144
+ "wikiTokenCap": 600,
145
+ "hyperformProfile": "full"
146
+ },
147
+ "indexer": {
148
+ "factExtractionMode": "tiered",
149
+ "periodicInterval": 300000
150
+ },
151
+ "dreaming": {
152
+ "enabled": true,
153
+ "maxPromotionsPerRun": 5,
154
+ "tickInterval": 12
155
+ }
156
+ }
157
+ ```
158
+
159
+ Estimated context per turn: **40–85k tokens** on a 200k model. Full fact recall, semantic search, keystone injection, cross-session context, and behavioral directives all active. Good for: persistent agents, council seats, agents that work across multiple sessions on the same project.
160
+
161
+ ### Tuning down from full without going to light
162
+
163
+ You don't have to choose between light and full. The most common middle-ground adjustments:
164
+
165
+ **Reduce fact injection** (saves 3–10k tokens): `maxFacts: 15`
166
+
167
+ **Disable cross-session context** (saves 2–6k tokens): `maxCrossSessionContext: 0`
168
+
169
+ **Reduce keystones** (saves 2–8k tokens): `keystoneHistoryFraction: 0.10`
170
+
171
+ **Reduce wiki/knowledge** (saves 2–4k tokens): `wikiTokenCap: 300`
172
+
173
+ **Drop to standard Hyperform** (saves 1–2k tokens): `hyperformProfile: 'standard'`
174
+
175
+ A targeted combination of the above can bring a full-performance setup from 80k to 55k per turn without losing the core memory continuity that makes HyperMem worth running.
176
+
177
+ ---
178
+
179
+ ## Quick Start: Pick a Profile
180
+
181
+ Three pre-built profiles ship with hypermem. Each configures every setting to a coherent default for a common deployment pattern:
182
+
183
+ | Profile | Context window | Budget | Hyperform | Best for |
184
+ |---|---|---|---|---|
185
+ | `light` | 64k | 40k effective | `light` (behavior only) | Single agent, small models, constrained resources |
186
+ | `standard` | 128k | 90k effective | `standard` (behavior + structure) | Normal deployments, small fleets |
187
+ | `full` | 200k+ | 160k effective | `full` (behavior + model adaptation) | Multi-agent fleets, large-context models |
188
+
189
+ ```ts
190
+ import { getProfile, mergeProfile } from '@psiclawops/hypermem';
191
+
192
+ // Use a profile as-is
193
+ const config = getProfile('light');
194
+
195
+ // Start from a profile, adjust specific settings
196
+ const custom = mergeProfile('standard', {
197
+ compositor: { maxFacts: 40, hyperformProfile: 'full' },
198
+ });
199
+ ```
200
+
201
+ Start with `light`. Move up when you need richer context and have the headroom.
202
+
203
+ ---
204
+
205
+ ## Hyperform: Output Shaping
206
+
207
+ Hyperform controls output normalization directives injected into every composed context. Two independent layers: **behavior** (how the model writes) and **model adaptation** (corrections for specific model tendencies). See the [README](../README.md#hyperform) for the full rationale and before/after examples.
208
+
209
+ ### The two layers
210
+
211
+ #### Behavior standards
212
+
213
+ Shared rules that apply to all models equally (anti-sycophancy, density targets, anti-pattern bans).
214
+
215
+ | Tier | Tokens | What's included |
216
+ |---|---|---|
217
+ | `light` | ~100 | 9 standalone directives. No database required. |
218
+ | `standard` | ~250 | Full directive set from the `fleet_output_standard` DB table. Falls back to `light` if no record exists. |
219
+ | `full` | ~250 + adaptation | Same as `standard`, plus model adaptation (see below). |
220
+
221
+ The `light` tier is hardcoded. `standard` and `full` read from `fleet_output_standard` in `library.db`.
222
+
223
+ #### Model adaptation
224
+
225
+ Per-model corrections for known tendencies (verbosity, hedging, list inflation). Only active at the `full` tier.
226
+
227
+ Entries in the `model_output_directives` DB table are matched by model ID:
228
+ 1. Exact match (case-insensitive)
229
+ 2. Glob pattern (longest wins)
230
+ 3. Wildcard `*` fallback
231
+ 4. No adaptation
232
+
233
+ Each entry contains calibration (known tendencies + adjustments), corrections (hard/medium/soft severity), and task overrides. The table starts empty; populate it for the models you run (see [Creating custom entries](#creating-custom-entries) below).
234
+
235
+ ### Choosing a tier
236
+
237
+ | Situation | Tier | Reason |
238
+ |---|---|---|
239
+ | Single agent, 64k or smaller model | `light` | Minimal token overhead, no DB dependency |
240
+ | Single agent, 128k+ model | `standard` | Richer output control, worth the extra ~150 tokens |
241
+ | Fleet with mixed models | `full` | Different models need different corrections |
242
+ | Cost-sensitive deployment | `light` or `standard` | Avoids adaptation overhead; consistent behavior standards already reduce output tokens |
243
+ | Benchmarking model quality | `light` with `enableFOS: false` | Minimal interference for apples-to-apples comparison |
244
+
245
+ ### Configuring hyperform
246
+
247
+ **Via config file** (`~/.openclaw/hypermem/config.json`):
248
+
249
+ ```json
250
+ {
251
+ "compositor": {
252
+ "hyperformProfile": "standard"
253
+ }
254
+ }
255
+ ```
256
+
257
+ **Via programmatic config:**
258
+
259
+ ```ts
260
+ const hm = await HyperMem.create(mergeProfile('light', {
261
+ compositor: { hyperformProfile: 'standard' },
262
+ }));
263
+ ```
264
+
265
+ **Fine-grained control:**
266
+
267
+ | Knob | Default | Effect |
268
+ |---|---|---|
269
+ | `compositor.hyperformProfile` | `'full'` (existing), `'light'` (new installs) | Sets the tier. Backward-compat aliases: `'starter'` → `'light'`, `'fleet'` → `'full'`. |
270
+ | `compositor.enableFOS` | `true` | Set `false` to suppress all behavior directives (saves ~100-250 tokens/turn) |
271
+ | `compositor.enableMOD` | `true` | Set `false` to suppress model adaptation (saves ~0-150 tokens/turn depending on match) |
272
+
273
+ At `light` tier, `enableFOS` and `enableMOD` are both effectively `false` — the light directives are injected directly, not through the behavior/adaptation pipeline. At `standard`, behavior standards are active and model adaptation is suppressed. At `full`, both are active unless explicitly disabled.
274
+
275
+ ### Creating custom entries
276
+
277
+ Behavior and adaptation records live in the `fleet_output_standard` and `model_output_directives` tables in `library.db`. There is no API endpoint for these — write directly to the database.
278
+
279
+ **Adding a behavior record:**
280
+
281
+ ```sql
282
+ INSERT INTO fleet_output_standard (
283
+ id, name, directives, task_variants, token_budget, active, source, version
284
+ ) VALUES (
285
+ 'my-fos',
286
+ 'My Output Standard',
287
+ json('{
288
+ "structural": ["Lead with the answer", "One idea per paragraph"],
289
+ "anti_patterns": ["certainly", "it''s worth noting", "delve"],
290
+ "density_targets": {"simple": "1-3 sentences", "analysis": "200-500 words", "code": "code first, explain only non-obvious parts"},
291
+ "voice": ["Direct tone", "No hedging on factual claims"]
292
+ }'),
293
+ json('{"code_review": {"density_target": "2-4 sentences per finding", "list_cap": "5 items max"}}'),
294
+ 250,
295
+ 1,
296
+ 'custom',
297
+ 1
298
+ );
299
+ ```
300
+
301
+ **Adding an adaptation record for a specific model:**
302
+
303
+ ```sql
304
+ INSERT INTO model_output_directives (
305
+ id, match_pattern, priority, corrections, calibration, task_overrides, token_budget, version, source, enabled
306
+ ) VALUES (
307
+ 'gpt-5.4-mod',
308
+ 'gpt-5.4*', -- glob pattern: matches gpt-5.4, gpt-5.4-turbo, etc.
309
+ 10, -- higher priority wins on equal pattern length
310
+ json('[
311
+ {"id": "v1", "rule": "Cut first drafts in half. Then cut again.", "severity": "hard"},
312
+ {"id": "v2", "rule": "No preamble before the answer.", "severity": "medium"},
313
+ {"id": "v3", "rule": "Lists: 5 items max unless explicitly requested.", "severity": "medium"}
314
+ ]'),
315
+ json('[
316
+ {"id": "c1", "fos_target": "simple answers: 1-3 sentences", "model_tendency": "2x verbosity, 1.8x list length", "adjustment": "Actively compress. Every sentence must state a fact, make a decision, or advance an argument."}
317
+ ]'),
318
+ json('{}'),
319
+ 150,
320
+ 1,
321
+ 'custom',
322
+ 1
323
+ );
324
+ ```
325
+
326
+ **Adding a wildcard adaptation fallback** (applies to any model without a specific match):
327
+
328
+ ```sql
329
+ INSERT INTO model_output_directives (
330
+ id, match_pattern, priority, corrections, calibration, task_overrides, token_budget, version, source, enabled
331
+ ) VALUES (
332
+ 'default-mod',
333
+ '*',
334
+ 0,
335
+ json('[]'),
336
+ json('[]'),
337
+ json('{}'),
338
+ 50,
339
+ 1,
340
+ 'custom',
341
+ 1
342
+ );
343
+ ```
344
+
345
+ To deactivate a behavior or adaptation entry without deleting it, set `active = 0` (behavior) or `enabled = 0` (adaptation). To switch between multiple behavior records, set `active = 1` on only one — `getActiveFOS()` selects the highest-version active record.
346
+
347
+ **Important:** Only one behavior record can be active at a time. Adaptation supports multiple entries — they're matched by model ID and the best match wins.
348
+
349
+ ---
350
+
351
+ ## HyperCompositor: Context Budget
352
+
353
+ The hypercompositor queries all four storage layers on every turn and composes context within a fixed token budget. This section explains how the budget is calculated, how it's divided, and how to adjust it.
354
+
355
+ ### How the budget is calculated
356
+
357
+ The plugin uses this order when deciding the budget source:
358
+ 1. runtime `tokenBudget` supplied by OpenClaw
359
+ 2. `contextWindowOverrides["provider/model"]` from config, if present
360
+ 3. `contextWindowSize` fallback from config
361
+
362
+ Three knobs then control the top-level budget:
363
+
364
+ ```
365
+ detected context window × budgetFraction × (1 - contextWindowReserve) = effective budget
366
+ ```
367
+
368
+ Then `targetBudgetFraction` splits the effective budget:
369
+
370
+ ```
371
+ effective budget × targetBudgetFraction = context assembly budget
372
+ effective budget × (1 - targetBudgetFraction) = history budget
373
+ ```
374
+
375
+ | Knob | Type | Range | What it controls |
376
+ |---|---|---|---|
377
+ | `budgetFraction` | 0.0–1.0 | Default: 0.703 | Fraction of the detected context window used as the input budget. This is the primary dial — raise it to use more of the window, lower it to leave more room. |
378
+ | `contextWindowReserve` | 0.0–1.0 | Default: 0.25 | Fraction reserved for model output and tool call responses. Higher = more headroom for large tool results, fewer tokens for context. Lower = more context available, higher saturation risk. |
379
+ | `targetBudgetFraction` | 0.3–0.85 | Default: 0.65 | Fraction of the effective budget allocated to assembled context (facts, wiki, cross-session, keystone). The remainder goes to conversation history. Lower = lighter context, more history room. Higher = richer context, less history. |
380
+
381
+ **Worked example (standard profile, 128k model):**
382
+
383
+ ```
384
+ 128,000 × 0.703 = 89,984 (effective budget before reserve)
385
+ 89,984 × (1 - 0.25) = 67,488 (effective budget after reserve)
386
+ 67,488 × 0.65 = 43,867 (context assembly budget)
387
+ 67,488 × 0.35 = 23,621 (history budget)
388
+ ```
389
+
390
+ **Model swap resilience:** The budget is computed from the model's actual context window at compose time when OpenClaw passes `tokenBudget`. If runtime metadata is missing, HyperMem falls back to `contextWindowOverrides` and then `contextWindowSize`. Structured tool history is guarded from being overwritten during a budget downshift — the compositor computes the new allocation but doesn't persist a lower-context snapshot to disk, preserving the full history for when the larger model returns.
391
+
392
+ ### Custom, local, or finetuned models (window-detection override)
393
+
394
+ The autodetect pattern table in step 2 covers known model families (`claude-*`, `gpt-*`, `gemini-*`, `glm-*`, `qwen-*`, `deepseek-*`). If your model string doesn't match any pattern — custom finetunes, local models behind unusual provider prefixes, experimental Ollama/vLLM/LM Studio names — resolution silently falls through to `defaultTokenBudget` (90k). **Every dial in this section is a fraction of the detected window, so wrong detection propagates everywhere**: `budgetFraction`, `warmHistoryBudgetFraction`, trim tier thresholds (50% / 65% / 85%), and compaction gates (80% afterTurn, 85% nuclear) all end up sized against the wrong ceiling.
395
+
396
+ Two failure signatures:
397
+
398
+ - **Undersized detection** (real 200k model detected as 90k): continuous warm→trim→compact cycling, starved facts/wiki slots, tight first-turn budgets. The agent feels "boxed in" even in short sessions.
399
+ - **Oversized detection** (real 32k local model detected as larger): first-turn warm load exceeds the real window, turns hit provider-side truncation or 400 errors on input overflow.
400
+
401
+ Verify what's being used by enabling `verboseLogging: true` and watching for the `budget source:` log line each turn. `runtime tokenBudget=...` or `contextWindowOverrides[...]` means HyperMem has the right number. `fallback contextWindowSize=...` with your model in the tail means detection failed.
402
+
403
+ Fix by adding `contextWindowOverrides` in the `compositor` block of `~/.openclaw/hypermem/config.json`:
404
+
405
+ ```json
406
+ {
407
+ "compositor": {
408
+ "contextWindowOverrides": {
409
+ "ollama/llama-3.3-70b": { "contextTokens": 131072 },
410
+ "copilot-local/custom-sft": { "contextTokens": 32768 },
411
+ "vllm/qwen3-coder-ft": { "contextTokens": 262144 }
412
+ }
413
+ }
414
+ }
415
+ ```
416
+
417
+ Key format: `"provider/model"`, lowercase, exact match against the model identifier your agent runs on. Values accept either `contextTokens` or `contextWindow` (same effect). Malformed keys, impossible ranges, and empty entries are dropped by the sanitizer on load with a warning; the override system is designed to be safe to edit without risking the resolver.
418
+
419
+ Gateway restart required after changes. Overrides interact with warming and trimming exactly as the autodetect path does — once the correct window is in place, every other knob here behaves as documented. Set `contextWindowOverrides` **before** tuning `budgetFraction`, `warmHistoryBudgetFraction`, or any trim-zone dials, otherwise you're tuning against the wrong window and the numbers won't behave.
420
+
421
+ ### How the budget fills
422
+
423
+ The compositor fills slots in priority order. Each slot consumes tokens from the remaining budget before the next slot runs (greedy fill, not proportional allocation):
424
+
425
+ | Order | Slot | Behavior | Configurable via |
426
+ |---|---|---|---|
427
+ | 1 | System prompt | Never truncated | Fixed — part of the agent definition |
428
+ | 2 | Identity (SOUL.md, USER.md, etc.) | Never truncated | Fixed — OpenClaw workspace files |
429
+ | 3 | Hyperform (behavior + adaptation) | Capped at tier token budgets | `hyperformProfile`, `enableFOS`, `enableMOD` |
430
+ | 4 | Conversation history | Largest slot; fills with tool-compressed history | `maxHistoryMessages`, `keystoneHistoryFraction` |
431
+ | 5 | Facts (L4) | Top N facts by confidence × recency | `maxFacts` |
432
+ | 6 | Wiki/knowledge | Compiled topic pages | `wikiTokenCap`, `maxTotalTriggerTokens` |
433
+ | 7 | Semantic recall (L3) | Hybrid FTS5 + KNN retrieval | Trigger budget, fallback KNN budget |
434
+ | 8 | Cross-session context | Other active sessions | `maxCrossSessionContext` |
435
+ | 9 | Action summary | Recent tool actions | Pressure-gated (5/3/1/0 actions by zone) |
436
+
437
+ **Greedy fill means:** if slot 4 (history) consumes most of the budget, slots 5-8 get whatever remains. This is intentional — history carries the immediate conversation and is always prioritized over background context. If you want more facts or wiki content, you either reduce history allocation (lower `targetBudgetFraction`) or increase the total budget (raise `budgetFraction`).
438
+
439
+ **Safety valve:** After all slots are assembled, a post-assembly check verifies the total doesn't exceed `budget × 1.05` (5% tolerance for estimation drift). If it does, the oldest history messages are trimmed until the composition fits. System and identity are never trimmed.
440
+
441
+ ### Adjusting the context/history balance
442
+
443
+ The most common tuning question is "I want more facts/wiki but less history" or the reverse.
444
+
445
+ **More context, less history:**
446
+
447
+ ```json
448
+ {
449
+ "compositor": {
450
+ "targetBudgetFraction": 0.75
451
+ }
452
+ }
453
+ ```
454
+
455
+ This gives 75% of the effective budget to context assembly (facts, wiki, recall, keystones) and 25% to history. Useful for knowledge-heavy agents where the current answer matters more than the full conversation.
456
+
457
+ **More history, less context:**
458
+
459
+ ```json
460
+ {
461
+ "compositor": {
462
+ "targetBudgetFraction": 0.45
463
+ }
464
+ }
465
+ ```
466
+
467
+ This gives only 45% to context assembly and 55% to history. Useful for coding agents that need to retain the full working conversation but don't need many facts or wiki pages.
468
+
469
+ **More facts specifically:**
470
+
471
+ ```json
472
+ {
473
+ "compositor": {
474
+ "maxFacts": 50,
475
+ "wikiTokenCap": 400
476
+ }
477
+ }
478
+ ```
479
+
480
+ Raises the fact injection cap from the default 30 to 50, and reduces wiki page space from 600 to 400 tokens.
481
+
482
+ **More keystone history (recalled older messages):**
483
+
484
+ ```json
485
+ {
486
+ "compositor": {
487
+ "keystoneHistoryFraction": 0.30,
488
+ "keystoneMaxMessages": 25
489
+ }
490
+ }
491
+ ```
492
+
493
+ Reserves 30% of the history budget for keystones (up from default 20%) and allows up to 25 keystone messages (up from 15). Keystones are high-significance older messages that survive pressure trimming ahead of ordinary history.
494
+
495
+ ### Adjusting for model context size
496
+
497
+ The three profiles cover the common cases — see [Quick Start: Pick a Profile](#quick-start-pick-a-profile) for the full table. For window sizes outside the profiles:
498
+
499
+ **For small models (32k context):**
500
+
501
+ ```json
502
+ {
503
+ "compositor": {
504
+ "budgetFraction": 0.55,
505
+ "contextWindowReserve": 0.35,
506
+ "maxFacts": 10,
507
+ "maxHistoryMessages": 100
508
+ }
509
+ }
510
+ ```
511
+
512
+ Small windows need aggressive reserve (tool results can easily consume 10k+ tokens) and limited fact injection.
513
+
514
+ **For large models (272k+ context):**
515
+
516
+ ```json
517
+ {
518
+ "compositor": {
519
+ "budgetFraction": 0.55,
520
+ "contextWindowReserve": 0.25,
521
+ "warmHistoryBudgetFraction": 0.27,
522
+ "maxFacts": 25,
523
+ "maxHistoryMessages": 500,
524
+ "keystoneHistoryFraction": 0.15,
525
+ "keystoneMaxMessages": 12
526
+ }
527
+ }
528
+ ```
529
+
530
+ Large windows tempt you to warm speculatively — don't. Keep warming lean, let semantic recall surface topic-relevant facts responsively, and reserve the extra window for tool-heavy turns and active conversation growth. The compositor naturally uses more of the window as the session accumulates real content.
531
+
532
+ ### Dynamic reserve
533
+
534
+ By default, the compositor projects forward from recent turn costs to adjust the reserve dynamically:
535
+
536
+ ```
537
+ safety_tokens = avg_turn_cost × dynamicReserveTurnHorizon
538
+ dynamic_reserve_fraction = safety_tokens / total_window
539
+ ```
540
+
541
+ | Knob | Default | Effect |
542
+ |---|---|---|
543
+ | `dynamicReserveEnabled` | `true` | Enable/disable dynamic adjustment |
544
+ | `dynamicReserveTurnHorizon` | 5 | How many turns ahead to project |
545
+ | `dynamicReserveMax` | 0.50 | Hard ceiling on dynamic reserve fraction |
546
+
547
+ When the projected reserve exceeds `dynamicReserveMax`, the system emits `SESSION_PRESSURE_HIGH` in diagnostics and clamps to the max. This prevents pathological sessions from starving context entirely.
548
+
549
+ Disable dynamic reserve to use a fixed reserve:
550
+
551
+ ```json
552
+ {
553
+ "compositor": {
554
+ "dynamicReserveEnabled": false,
555
+ "contextWindowReserve": 0.25
556
+ }
557
+ }
558
+ ```
559
+
560
+ ### Tool compression
561
+
562
+ Tool output is compressed by turn age to prevent old results from crowding out current work:
563
+
564
+ | Tier | Turns | Treatment | Per-message cap | Per-turn-pair cap |
565
+ |---|---|---|---|---|
566
+ | T0 | Current + 2 most recent | Full fidelity (matches OpenClaw `keepLastAssistants: 3`) | None | None |
567
+ | T1 | Turns 2-4 | Moderate truncation | 6,000 chars | 12,000 chars |
568
+ | T2 | Turns 4-7 | Aggressive truncation | 800 chars | 3,000 chars |
569
+ | T3 | Turns 8+ | One-liner stub | 150 chars | 800 chars |
570
+
571
+ Large T0 results (>40k chars) at high context pressure (>80%) get head-and-tail trimmed with a structured trim note rather than dropped entirely. The last 3 assistant turns are always protected.
572
+
573
+ | Knob | Default | Effect |
574
+ |---|---|---|
575
+ | `maxRecentToolPairs` | 3 | Tool pairs kept at full fidelity (T0) |
576
+ | `maxProseToolPairs` | 10 | Tool pairs converted to prose summary before stubbing |
577
+
578
+ **When `deferToolPruning: true`**: hypermem skips its own gradient when OpenClaw's native `contextPruning` is active. The native pruner handles tool result trimming on those providers. The gradient remains active as fallback for other providers.
579
+
580
+ > **Recommended:** disable OpenClaw's context pruning entirely (`openclaw config set agents.defaults.contextPruning.mode off`) and let HyperMem manage all context pressure. The two systems do not coordinate and can fight each other, causing unpredictable context loss. See INSTALL.md "OpenClaw Platform Settings" for the full recommended config.
581
+
582
+ **When `verboseLogging: true`**: HyperMem emits budget-source and trim-decision logs so you can see whether a turn used runtime `tokenBudget`, a manual `contextWindowOverrides` entry, or the `contextWindowSize` fallback.
583
+
584
+ ---
585
+
586
+ ## Cache / TTL
587
+
588
+ Controls how long data survives in the in-memory SQLite cache before expiry.
589
+
590
+ | Knob | Default | What it does |
591
+ |---|---|---|
592
+ | `cache.sessionTTL` | `14400` (4h) | TTL in seconds for non-history slots (system prompt, identity, meta) |
593
+ | `cache.historyTTL` | `86400` (24h) | TTL in seconds for the message history list |
594
+
595
+ **When to adjust:**
596
+ - **Short sessions** (CI pipelines, one-shot tasks): lower both to `3600`/`86400`
597
+ - **Long-lived agents** (persistent council seats): raise `historyTTL` to `1209600` (14d)
598
+
599
+ ---
600
+
601
+ ## Indexer
602
+
603
+ Controls background fact extraction and topic tracking.
604
+
605
+ | Knob | Default | What it does |
606
+ |---|---|---|
607
+ | `indexer.enabled` | `true` | Enable background indexing |
608
+ | `indexer.factExtractionMode` | `'tiered'` | `'off'` \| `'pattern'` \| `'tiered'` — extraction aggressiveness |
609
+ | `indexer.factDecayRate` | `0.01` | Per-tick decay applied to fact confidence scores |
610
+ | `indexer.episodeSignificanceThreshold` | `0.5` | Minimum score for an episode to be stored |
611
+ | `indexer.topicDormantAfter` | `'24h'` | Mark a topic dormant after this period of inactivity |
612
+ | `indexer.topicClosedAfter` | `'7d'` | Close a topic after this period |
613
+ | `indexer.periodicInterval` | `300000` (5min) | Indexer tick interval in ms |
614
+
615
+ **When to adjust:**
616
+ - **Privacy-sensitive deployments**: set `factExtractionMode: 'off'` — no facts extracted or stored
617
+ - **High-frequency sessions**: lower `periodicInterval` to `60000` (1min)
618
+ - **Resource-constrained hosts**: raise `periodicInterval` to `900000` (15min), set `factExtractionMode: 'pattern'`
619
+
620
+ ---
621
+
622
+ ## Dreaming (Memory Promotion)
623
+
624
+ The dreaming promoter runs periodically and promotes high-value facts to your agent's `MEMORY.md`. Disabled by default.
625
+
626
+ | Knob | Default | What it does |
627
+ |---|---|---|
628
+ | `dreaming.enabled` | `false` | Enable the promotion pass |
629
+ | `dreaming.minScore` | `0.75` | Minimum composite score for promotion |
630
+ | `dreaming.minConfidence` | `0.70` | Pre-scoring confidence gate |
631
+ | `dreaming.maxPromotionsPerRun` | `5` | Max new entries written per agent per run |
632
+ | `dreaming.tickInterval` | `12` | Run every N indexer ticks (default 5min ticks → ~1h) |
633
+ | `dreaming.dryRun` | `false` | Preview promotions without writing to MEMORY.md |
634
+
635
+ ---
636
+
637
+ ## Embeddings
638
+
639
+ | Knob | Default | What it does |
640
+ |---|---|---|
641
+ | `embedding.ollamaUrl` | `http://localhost:11434` | Ollama endpoint |
642
+ | `embedding.model` | `nomic-embed-text` | Embedding model (must match vector dimensions) |
643
+ | `embedding.dimensions` | `768` | Vector dimensions — must match your model |
644
+ | `embedding.timeout` | `10000` (10s) | Per-request timeout in ms |
645
+ | `embedding.batchSize` | `32` | Docs per embedding batch |
646
+
647
+ **Hosted embeddings (OpenRouter)** — recommended for installs without local GPU:
648
+
649
+ ```ts
650
+ embedding: {
651
+ provider: 'openai',
652
+ openaiApiKey: 'sk-or-...',
653
+ openaiBaseUrl: 'https://openrouter.ai/api/v1',
654
+ model: 'qwen/qwen3-embedding-8b',
655
+ dimensions: 4096,
656
+ batchSize: 128,
657
+ }
658
+ ```
659
+
660
+ If Ollama is unavailable, vector retrieval returns empty. Keyword and recency retrieval still work.
661
+
662
+ ---
663
+
664
+ ## Obsidian Vault Integration
665
+
666
+ Import notes from an Obsidian vault into hypermem's fact and doc-chunk pipeline.
667
+
668
+ ```json
669
+ {
670
+ "obsidian": {
671
+ "enabled": true,
672
+ "vaultPath": "/home/user/Documents/MyVault",
673
+ "collection": "obsidian/vault",
674
+ "watchInterval": 30000,
675
+ "excludeFolders": ["archive", "private"],
676
+ "importTags": true,
677
+ "importFrontmatter": true,
678
+ "staleDays": 7
679
+ }
680
+ }
681
+ ```
682
+
683
+ | Knob | Default | Effect |
684
+ |---|---|---|
685
+ | `enabled` | `false` | Master switch |
686
+ | `vaultPath` | _(required)_ | Absolute path to your Obsidian vault |
687
+ | `collection` | `obsidian/vault` | Doc-chunk collection name |
688
+ | `watchInterval` | `30000` | Polling interval ms |
689
+ | `excludeFolders` | `[]` | Additional folders to skip |
690
+ | `importTags` | `true` | Import `#tags` from content and frontmatter |
691
+ | `importFrontmatter` | `true` | Import YAML frontmatter key/value pairs |
692
+ | `staleDays` | `7` | Re-import files not seen in N days |
693
+
694
+ All files pass through `secret-scanner` before ingest. Notes containing API keys, tokens, or credentials are silently skipped.
695
+
696
+ ---
697
+
698
+ ## Example Configs
699
+
700
+ ### Minimal Footprint (single agent, 64k)
701
+
702
+ ```json
703
+ {
704
+ "compositor": {
705
+ "budgetFraction": 0.625,
706
+ "contextWindowReserve": 0.35,
707
+ "targetBudgetFraction": 0.50,
708
+ "maxFacts": 10,
709
+ "maxHistoryMessages": 100,
710
+ "maxCrossSessionContext": 0,
711
+ "hyperformProfile": "light"
712
+ },
713
+ "indexer": {
714
+ "factExtractionMode": "pattern",
715
+ "periodicInterval": 900000
716
+ }
717
+ }
718
+ ```
719
+
720
+ ### Balanced Fleet (128k, multi-agent)
721
+
722
+ ```json
723
+ {
724
+ "compositor": {
725
+ "budgetFraction": 0.703,
726
+ "contextWindowReserve": 0.25,
727
+ "targetBudgetFraction": 0.65,
728
+ "maxFacts": 30,
729
+ "hyperformProfile": "standard",
730
+ "keystoneHistoryFraction": 0.20,
731
+ "wikiTokenCap": 600
732
+ },
733
+ "dreaming": {
734
+ "enabled": true,
735
+ "maxPromotionsPerRun": 5,
736
+ "tickInterval": 12
737
+ }
738
+ }
739
+ ```
740
+
741
+ ### Full Fleet (200k+, council)
742
+
743
+ The recommended starting config for long-running multi-agent deployments. These values target a steady turn-over-turn pressure profile: warm lean enough that trim/compact cycles don't fire constantly, rely on semantic recall to surface topic-relevant facts responsively, leave meaningful headroom for tool-heavy turns.
744
+
745
+ ```json
746
+ {
747
+ "compositor": {
748
+ "budgetFraction": 0.55,
749
+ "contextWindowReserve": 0.25,
750
+ "targetBudgetFraction": 0.50,
751
+ "warmHistoryBudgetFraction": 0.27,
752
+ "maxFacts": 25,
753
+ "maxHistoryMessages": 500,
754
+ "maxCrossSessionContext": 4000,
755
+ "hyperformProfile": "full",
756
+ "keystoneHistoryFraction": 0.15,
757
+ "keystoneMaxMessages": 12,
758
+ "wikiTokenCap": 500,
759
+ "maxTotalTriggerTokens": 10000,
760
+ "maxRecentToolPairs": 3,
761
+ "maxProseToolPairs": 10
762
+ },
763
+ "eviction": {
764
+ "enabled": true,
765
+ "imageAgeTurns": 1,
766
+ "toolResultAgeTurns": 4,
767
+ "minTokensToEvict": 600,
768
+ "keepPreviewChars": 240
769
+ },
770
+ "dreaming": {
771
+ "enabled": true,
772
+ "maxPromotionsPerRun": 8,
773
+ "tickInterval": 6,
774
+ "minScore": 0.65
775
+ },
776
+ "deferToolPruning": true
777
+ }
778
+ ```
779
+
780
+ **Why these values differ from the `full` profile defaults.** The code-level `full` preset was tuned for maximum richness on first contact. In practice on 200k+ fleets, that turn-1 richness pushed sessions into warm→trim→compact cycling within 3–4 turns. Lowering `warmHistoryBudgetFraction` to 0.27 and trimming the fact/keystone caps leaves room for tool output and active conversation to grow without triggering eviction every turn. Semantic recall still fires against each incoming message, so topic-relevant facts surface when the conversation reaches them — the knowledge is still there, it just loads responsively instead of speculatively. If your fleet is idle for long stretches between sessions and amnesia is a bigger problem than pressure, raise `maxFacts` to 35 and `keystoneMaxMessages` to 18 as a gentler first step before touching `warmHistoryBudgetFraction`.
781
+
782
+ ### Code Agent (128k, high tool output)
783
+
784
+ ```json
785
+ {
786
+ "deferToolPruning": true,
787
+ "compositor": {
788
+ "budgetFraction": 0.703,
789
+ "contextWindowReserve": 0.30,
790
+ "targetBudgetFraction": 0.55,
791
+ "maxFacts": 15,
792
+ "maxRecentToolPairs": 5,
793
+ "maxProseToolPairs": 15,
794
+ "hyperformProfile": "light"
795
+ }
796
+ }
797
+ ```
798
+
799
+ Higher `contextWindowReserve` (0.30) gives more headroom for large tool results. Lower `targetBudgetFraction` (0.55) prioritizes history over background context. `maxRecentToolPairs: 5` keeps more recent tool output verbatim.
800
+
801
+ ---
802
+
803
+ ## Full Knob Reference
804
+
805
+ ### Window budget
806
+
807
+ | Knob | Type | Default | What it controls |
808
+ |---|---|---|---|
809
+ | `budgetFraction` | 0.0–1.0 | 0.703 | Fraction of detected context window used as input budget. Primary dial. |
810
+ | `contextWindowReserve` | 0.0–1.0 | 0.25 | Fraction reserved for output and tool responses. |
811
+ | `targetBudgetFraction` | 0.3–0.85 | 0.65 | Context vs. history split within the effective budget. |
812
+ | `defaultTokenBudget` | number | 90000 | Absolute fallback when model detection fails. Prefer `budgetFraction`. |
813
+
814
+ ### Fact injection
815
+
816
+ | Knob | Type | Default | What it controls |
817
+ |---|---|---|---|
818
+ | `maxFacts` | number | 30 | Maximum facts surfaced per compose pass. |
819
+ | `wikiTokenCap` | tokens | 600 | Hard ceiling on wiki/knowledge injection per pass. |
820
+ | `maxTotalTriggerTokens` | tokens | 4000 | Ceiling across all trigger-fired doc chunk collections. |
821
+
822
+ ### History and keystone
823
+
824
+ | Knob | Type | Default | What it controls |
825
+ |---|---|---|---|
826
+ | `maxHistoryMessages` | number | 500 | Maximum messages in the hot history window. |
827
+ | `keystoneHistoryFraction` | 0.0–0.5 | 0.20 | Fraction of history budget reserved for keystones. 0 disables. |
828
+ | `keystoneMaxMessages` | number | 15 | Max keystone messages injected per pass. |
829
+ | `keystoneMinSignificance` | 0.0–1.0 | 0.5 | Minimum episode significance for keystone qualification. |
830
+
831
+ ### Tool history
832
+
833
+ | Knob | Type | Default | What it controls |
834
+ |---|---|---|---|
835
+ | `maxRecentToolPairs` | number | 3 | Tool call/result pairs kept verbatim. |
836
+ | `maxProseToolPairs` | number | 10 | Older pairs converted to prose stubs. Beyond this, payloads dropped. |
837
+ | `maxCrossSessionContext` | tokens | 4000 | Token ceiling for cross-agent context. 0 disables. |
838
+
839
+ ### Dynamic reserve
840
+
841
+ | Knob | Type | Default | What it controls |
842
+ |---|---|---|---|
843
+ | `dynamicReserveEnabled` | boolean | `true` | Enable/disable dynamic reserve adjustment. |
844
+ | `dynamicReserveTurnHorizon` | number | 5 | Turns to project forward. |
845
+ | `dynamicReserveMax` | 0.0–1.0 | 0.50 | Hard ceiling on dynamic reserve fraction. |
846
+
847
+ ### Hyperform
848
+
849
+ | Knob | Type | Default | What it controls |
850
+ |---|---|---|---|
851
+ | `hyperformProfile` | `'light'` \| `'standard'` \| `'full'` | `'full'` | Output shaping tier. |
852
+ | `enableFOS` | boolean | `true` | Suppress behavior directives when `false`. |
853
+ | `enableMOD` | boolean | `true` | Suppress model adaptation when `false`. |
854
+
855
+ ### Background Maintenance
856
+
857
+ Controls for the proactive maintenance passes (noise sweep, tool decay) that run alongside the background indexer. These settings live under the `maintenance` key in config.json.
858
+
859
+ | Knob | Type | Default | What it controls |
860
+ |---|---|---|---|
861
+ | `maintenance.periodicInterval` | ms | `300000` | Interval between background indexer ticks (5 min default). |
862
+ | `maintenance.maxActiveConversations` | number | `5` | Max active conversations processed per agent per tick. Limits fanout. |
863
+ | `maintenance.recentConversationCooldownMs` | ms | `30000` | Skip conversations processed within this window. Prevents redundant sweeps. |
864
+ | `maintenance.maxCandidatesPerPass` | number | `200` | Cap on total mutations (deletes + truncations) per maintenance tick. |
865
+
866
+ Per-tick diagnostics are logged when `verboseLogging` is enabled, showing `considered`, `skipped`, `scanned`, `mutated`, `duration`, and `exitReason` fields. These help operators confirm maintenance is running and identify conversations that are generating the most noise.