@xrkseek/harness 0.6.23 → 0.7.0-rc.2

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 (738) hide show
  1. package/node_modules/@xrkseek/a2a/README.md +45 -45
  2. package/node_modules/@xrkseek/attachment/README.md +23 -23
  3. package/node_modules/@xrkseek/attachment-local/README.md +6 -6
  4. package/node_modules/@xrkseek/attachment-local/package.json +26 -26
  5. package/node_modules/@xrkseek/checkpoint/README.md +90 -90
  6. package/node_modules/@xrkseek/checkpoint/dist/process-git.d.ts +5 -0
  7. package/node_modules/@xrkseek/checkpoint/dist/process-git.d.ts.map +1 -1
  8. package/node_modules/@xrkseek/checkpoint/dist/process-git.js +59 -2
  9. package/node_modules/@xrkseek/checkpoint/dist/process-git.js.map +1 -1
  10. package/node_modules/@xrkseek/checkpoint/dist/store.d.ts +45 -0
  11. package/node_modules/@xrkseek/checkpoint/dist/store.d.ts.map +1 -1
  12. package/node_modules/@xrkseek/checkpoint/dist/store.js +221 -60
  13. package/node_modules/@xrkseek/checkpoint/dist/store.js.map +1 -1
  14. package/node_modules/@xrkseek/checkpoint/package.json +26 -26
  15. package/node_modules/@xrkseek/claude-code-mods/README.md +152 -0
  16. package/node_modules/@xrkseek/claude-code-mods/README.zh.md +172 -0
  17. package/node_modules/@xrkseek/claude-code-mods/dist/api.d.ts +36 -0
  18. package/node_modules/@xrkseek/claude-code-mods/dist/api.d.ts.map +1 -0
  19. package/node_modules/@xrkseek/claude-code-mods/dist/api.js +215 -0
  20. package/node_modules/@xrkseek/claude-code-mods/dist/api.js.map +1 -0
  21. package/node_modules/@xrkseek/claude-code-mods/dist/attach.d.ts +92 -0
  22. package/node_modules/@xrkseek/claude-code-mods/dist/attach.d.ts.map +1 -0
  23. package/node_modules/@xrkseek/claude-code-mods/dist/attach.js +106 -0
  24. package/node_modules/@xrkseek/claude-code-mods/dist/attach.js.map +1 -0
  25. package/node_modules/@xrkseek/claude-code-mods/dist/chain.d.ts +105 -0
  26. package/node_modules/@xrkseek/claude-code-mods/dist/chain.d.ts.map +1 -0
  27. package/node_modules/@xrkseek/claude-code-mods/dist/chain.js +324 -0
  28. package/node_modules/@xrkseek/claude-code-mods/dist/chain.js.map +1 -0
  29. package/node_modules/@xrkseek/claude-code-mods/dist/define-mod.d.ts +39 -0
  30. package/node_modules/@xrkseek/claude-code-mods/dist/define-mod.d.ts.map +1 -0
  31. package/node_modules/@xrkseek/claude-code-mods/dist/define-mod.js +39 -0
  32. package/node_modules/@xrkseek/claude-code-mods/dist/define-mod.js.map +1 -0
  33. package/node_modules/@xrkseek/claude-code-mods/dist/elements.d.ts +96 -0
  34. package/node_modules/@xrkseek/claude-code-mods/dist/elements.d.ts.map +1 -0
  35. package/node_modules/@xrkseek/claude-code-mods/dist/elements.js +171 -0
  36. package/node_modules/@xrkseek/claude-code-mods/dist/elements.js.map +1 -0
  37. package/node_modules/@xrkseek/claude-code-mods/dist/engine.d.ts +155 -0
  38. package/node_modules/@xrkseek/claude-code-mods/dist/engine.d.ts.map +1 -0
  39. package/node_modules/@xrkseek/claude-code-mods/dist/engine.js +356 -0
  40. package/node_modules/@xrkseek/claude-code-mods/dist/engine.js.map +1 -0
  41. package/node_modules/@xrkseek/claude-code-mods/dist/host-ops.d.ts +72 -0
  42. package/node_modules/@xrkseek/claude-code-mods/dist/host-ops.d.ts.map +1 -0
  43. package/node_modules/@xrkseek/claude-code-mods/dist/host-ops.js +603 -0
  44. package/node_modules/@xrkseek/claude-code-mods/dist/host-ops.js.map +1 -0
  45. package/node_modules/@xrkseek/claude-code-mods/dist/index.d.ts +112 -0
  46. package/node_modules/@xrkseek/claude-code-mods/dist/index.d.ts.map +1 -0
  47. package/node_modules/@xrkseek/claude-code-mods/dist/index.js +654 -0
  48. package/node_modules/@xrkseek/claude-code-mods/dist/index.js.map +1 -0
  49. package/node_modules/@xrkseek/claude-code-mods/dist/matcher.d.ts +45 -0
  50. package/node_modules/@xrkseek/claude-code-mods/dist/matcher.d.ts.map +1 -0
  51. package/node_modules/@xrkseek/claude-code-mods/dist/matcher.js +195 -0
  52. package/node_modules/@xrkseek/claude-code-mods/dist/matcher.js.map +1 -0
  53. package/node_modules/@xrkseek/claude-code-mods/dist/module.d.ts +74 -0
  54. package/node_modules/@xrkseek/claude-code-mods/dist/module.d.ts.map +1 -0
  55. package/node_modules/@xrkseek/claude-code-mods/dist/module.js +167 -0
  56. package/node_modules/@xrkseek/claude-code-mods/dist/module.js.map +1 -0
  57. package/node_modules/@xrkseek/claude-code-mods/dist/native-import.d.ts +31 -0
  58. package/node_modules/@xrkseek/claude-code-mods/dist/native-import.d.ts.map +1 -0
  59. package/node_modules/@xrkseek/claude-code-mods/dist/native-import.js +32 -0
  60. package/node_modules/@xrkseek/claude-code-mods/dist/native-import.js.map +1 -0
  61. package/node_modules/@xrkseek/claude-code-mods/dist/plugin-dir.d.ts +70 -0
  62. package/node_modules/@xrkseek/claude-code-mods/dist/plugin-dir.d.ts.map +1 -0
  63. package/node_modules/@xrkseek/claude-code-mods/dist/plugin-dir.js +167 -0
  64. package/node_modules/@xrkseek/claude-code-mods/dist/plugin-dir.js.map +1 -0
  65. package/node_modules/@xrkseek/claude-code-mods/dist/product-agent.d.ts +57 -0
  66. package/node_modules/@xrkseek/claude-code-mods/dist/product-agent.d.ts.map +1 -0
  67. package/node_modules/@xrkseek/claude-code-mods/dist/product-agent.js +85 -0
  68. package/node_modules/@xrkseek/claude-code-mods/dist/product-agent.js.map +1 -0
  69. package/node_modules/@xrkseek/claude-code-mods/dist/runtime.d.ts +117 -0
  70. package/node_modules/@xrkseek/claude-code-mods/dist/runtime.d.ts.map +1 -0
  71. package/node_modules/@xrkseek/claude-code-mods/dist/runtime.js +252 -0
  72. package/node_modules/@xrkseek/claude-code-mods/dist/runtime.js.map +1 -0
  73. package/node_modules/@xrkseek/claude-code-mods/dist/storage-domain.d.ts +68 -0
  74. package/node_modules/@xrkseek/claude-code-mods/dist/storage-domain.d.ts.map +1 -0
  75. package/node_modules/@xrkseek/claude-code-mods/dist/storage-domain.js +104 -0
  76. package/node_modules/@xrkseek/claude-code-mods/dist/storage-domain.js.map +1 -0
  77. package/node_modules/@xrkseek/claude-code-mods/dist/surfaces.d.ts +82 -0
  78. package/node_modules/@xrkseek/claude-code-mods/dist/surfaces.d.ts.map +1 -0
  79. package/node_modules/@xrkseek/claude-code-mods/dist/surfaces.js +243 -0
  80. package/node_modules/@xrkseek/claude-code-mods/dist/surfaces.js.map +1 -0
  81. package/node_modules/@xrkseek/claude-code-mods/dist/testing.d.ts +157 -0
  82. package/node_modules/@xrkseek/claude-code-mods/dist/testing.d.ts.map +1 -0
  83. package/node_modules/@xrkseek/claude-code-mods/dist/testing.js +266 -0
  84. package/node_modules/@xrkseek/claude-code-mods/dist/testing.js.map +1 -0
  85. package/node_modules/@xrkseek/claude-code-mods/dist/tool-names.d.ts +21 -0
  86. package/node_modules/@xrkseek/claude-code-mods/dist/tool-names.d.ts.map +1 -0
  87. package/node_modules/@xrkseek/claude-code-mods/dist/tool-names.js +37 -0
  88. package/node_modules/@xrkseek/claude-code-mods/dist/tool-names.js.map +1 -0
  89. package/node_modules/@xrkseek/claude-code-mods/dist/types.d.ts +592 -0
  90. package/node_modules/@xrkseek/claude-code-mods/dist/types.d.ts.map +1 -0
  91. package/node_modules/@xrkseek/claude-code-mods/dist/types.js +10 -0
  92. package/node_modules/@xrkseek/claude-code-mods/dist/types.js.map +1 -0
  93. package/node_modules/@xrkseek/claude-code-mods/dist/values.d.ts +58 -0
  94. package/node_modules/@xrkseek/claude-code-mods/dist/values.d.ts.map +1 -0
  95. package/node_modules/@xrkseek/claude-code-mods/dist/values.js +75 -0
  96. package/node_modules/@xrkseek/claude-code-mods/dist/values.js.map +1 -0
  97. package/node_modules/@xrkseek/claude-code-mods/dist/working-directory.d.ts +45 -0
  98. package/node_modules/@xrkseek/claude-code-mods/dist/working-directory.d.ts.map +1 -0
  99. package/node_modules/@xrkseek/claude-code-mods/dist/working-directory.js +29 -0
  100. package/node_modules/@xrkseek/claude-code-mods/dist/working-directory.js.map +1 -0
  101. package/node_modules/@xrkseek/claude-code-mods/package.json +47 -0
  102. package/node_modules/@xrkseek/code-runtime/README.md +20 -20
  103. package/node_modules/@xrkseek/core-agent/dist/index.d.ts +87 -0
  104. package/node_modules/@xrkseek/core-agent/dist/index.d.ts.map +1 -1
  105. package/node_modules/@xrkseek/core-agent/dist/index.js.map +1 -1
  106. package/node_modules/@xrkseek/core-agent-loop/dist/index.d.ts.map +1 -1
  107. package/node_modules/@xrkseek/core-agent-loop/dist/index.js +62 -32
  108. package/node_modules/@xrkseek/core-agent-loop/dist/index.js.map +1 -1
  109. package/node_modules/@xrkseek/core-agent-loop/package.json +42 -42
  110. package/node_modules/@xrkseek/core-session/README.md +35 -35
  111. package/node_modules/@xrkseek/core-session/dist/compaction.d.ts +46 -2
  112. package/node_modules/@xrkseek/core-session/dist/compaction.d.ts.map +1 -1
  113. package/node_modules/@xrkseek/core-session/dist/compaction.js +124 -49
  114. package/node_modules/@xrkseek/core-session/dist/compaction.js.map +1 -1
  115. package/node_modules/@xrkseek/core-session/dist/freeze.d.ts +6 -0
  116. package/node_modules/@xrkseek/core-session/dist/freeze.d.ts.map +1 -1
  117. package/node_modules/@xrkseek/core-session/dist/freeze.js +9 -0
  118. package/node_modules/@xrkseek/core-session/dist/freeze.js.map +1 -1
  119. package/node_modules/@xrkseek/core-session/dist/index.d.ts +20 -4
  120. package/node_modules/@xrkseek/core-session/dist/index.d.ts.map +1 -1
  121. package/node_modules/@xrkseek/core-session/dist/index.js +55 -14
  122. package/node_modules/@xrkseek/core-session/dist/index.js.map +1 -1
  123. package/node_modules/@xrkseek/core-session/dist/list-hints.d.ts.map +1 -1
  124. package/node_modules/@xrkseek/core-session/dist/list-hints.js +14 -4
  125. package/node_modules/@xrkseek/core-session/dist/list-hints.js.map +1 -1
  126. package/node_modules/@xrkseek/core-session/dist/repair-open-turn.d.ts +8 -1
  127. package/node_modules/@xrkseek/core-session/dist/repair-open-turn.d.ts.map +1 -1
  128. package/node_modules/@xrkseek/core-session/dist/repair-open-turn.js +14 -4
  129. package/node_modules/@xrkseek/core-session/dist/repair-open-turn.js.map +1 -1
  130. package/node_modules/@xrkseek/core-session/dist/sqlite-store.d.ts +55 -0
  131. package/node_modules/@xrkseek/core-session/dist/sqlite-store.d.ts.map +1 -1
  132. package/node_modules/@xrkseek/core-session/dist/sqlite-store.js +670 -92
  133. package/node_modules/@xrkseek/core-session/dist/sqlite-store.js.map +1 -1
  134. package/node_modules/@xrkseek/core-session/dist/store.d.ts +38 -0
  135. package/node_modules/@xrkseek/core-session/dist/store.d.ts.map +1 -1
  136. package/node_modules/@xrkseek/core-session/dist/surface-estimate.d.ts +6 -0
  137. package/node_modules/@xrkseek/core-session/dist/surface-estimate.d.ts.map +1 -1
  138. package/node_modules/@xrkseek/core-session/dist/surface-estimate.js +23 -0
  139. package/node_modules/@xrkseek/core-session/dist/surface-estimate.js.map +1 -1
  140. package/node_modules/@xrkseek/core-session/dist/surface-fold.d.ts.map +1 -1
  141. package/node_modules/@xrkseek/core-session/dist/surface-fold.js +5 -7
  142. package/node_modules/@xrkseek/core-session/dist/surface-fold.js.map +1 -1
  143. package/node_modules/@xrkseek/core-session/package.json +34 -34
  144. package/node_modules/@xrkseek/core-system-prompt/README.md +14 -14
  145. package/node_modules/@xrkseek/core-tools/dist/session-query-prompt.d.ts.map +1 -1
  146. package/node_modules/@xrkseek/core-tools/dist/session-query-prompt.js +3 -2
  147. package/node_modules/@xrkseek/core-tools/dist/session-query-prompt.js.map +1 -1
  148. package/node_modules/@xrkseek/core-tools/dist/std-tools.d.ts.map +1 -1
  149. package/node_modules/@xrkseek/core-tools/dist/std-tools.js +1 -13
  150. package/node_modules/@xrkseek/core-tools/dist/std-tools.js.map +1 -1
  151. package/node_modules/@xrkseek/exec-computer-use/README.md +14 -14
  152. package/node_modules/@xrkseek/exec-computer-use/dist/windows-uia.js +402 -402
  153. package/node_modules/@xrkseek/exec-computer-use/package.json +26 -26
  154. package/node_modules/@xrkseek/exec-fs/README.md +12 -12
  155. package/node_modules/@xrkseek/exec-fs/dist/read-image.d.ts +7 -0
  156. package/node_modules/@xrkseek/exec-fs/dist/read-image.d.ts.map +1 -1
  157. package/node_modules/@xrkseek/exec-fs/dist/read-image.js +33 -15
  158. package/node_modules/@xrkseek/exec-fs/dist/read-image.js.map +1 -1
  159. package/node_modules/@xrkseek/exec-fs/dist/routing-prompt.js +1 -1
  160. package/node_modules/@xrkseek/exec-fs/dist/routing-prompt.js.map +1 -1
  161. package/node_modules/@xrkseek/exec-image-gen/README.md +13 -13
  162. package/node_modules/@xrkseek/exec-image-gen/package.json +28 -28
  163. package/node_modules/@xrkseek/exec-memory/README.md +14 -14
  164. package/node_modules/@xrkseek/exec-memory/dist/live-fragment.d.ts +11 -0
  165. package/node_modules/@xrkseek/exec-memory/dist/live-fragment.d.ts.map +1 -0
  166. package/node_modules/@xrkseek/exec-memory/dist/live-fragment.js +40 -0
  167. package/node_modules/@xrkseek/exec-memory/dist/live-fragment.js.map +1 -0
  168. package/node_modules/@xrkseek/exec-memory/package.json +28 -28
  169. package/node_modules/@xrkseek/exec-sandbox/README.md +15 -15
  170. package/node_modules/@xrkseek/exec-ssh/README.md +19 -19
  171. package/node_modules/@xrkseek/exec-subprocess/README.md +10 -10
  172. package/node_modules/@xrkseek/exec-video-analyze/README.md +11 -11
  173. package/node_modules/@xrkseek/exec-video-analyze/package.json +26 -26
  174. package/node_modules/@xrkseek/exec-video-gen/README.md +26 -26
  175. package/node_modules/@xrkseek/exec-voice/README.md +25 -25
  176. package/node_modules/@xrkseek/exec-web/README.md +11 -11
  177. package/node_modules/@xrkseek/exec-web/dist/fetch-http.d.ts +8 -0
  178. package/node_modules/@xrkseek/exec-web/dist/fetch-http.d.ts.map +1 -1
  179. package/node_modules/@xrkseek/exec-web/dist/fetch-http.js +5 -1
  180. package/node_modules/@xrkseek/exec-web/dist/fetch-http.js.map +1 -1
  181. package/node_modules/@xrkseek/exec-web/dist/format.d.ts.map +1 -1
  182. package/node_modules/@xrkseek/exec-web/dist/format.js +1 -0
  183. package/node_modules/@xrkseek/exec-web/dist/format.js.map +1 -1
  184. package/node_modules/@xrkseek/exec-web/dist/index.d.ts +2 -2
  185. package/node_modules/@xrkseek/exec-web/dist/index.d.ts.map +1 -1
  186. package/node_modules/@xrkseek/exec-web/dist/index.js +2 -2
  187. package/node_modules/@xrkseek/exec-web/dist/index.js.map +1 -1
  188. package/node_modules/@xrkseek/exec-web/dist/search-duckduckgo.d.ts.map +1 -1
  189. package/node_modules/@xrkseek/exec-web/dist/search-duckduckgo.js +15 -8
  190. package/node_modules/@xrkseek/exec-web/dist/search-duckduckgo.js.map +1 -1
  191. package/node_modules/@xrkseek/exec-web/dist/search-parallel-free.d.ts.map +1 -1
  192. package/node_modules/@xrkseek/exec-web/dist/search-parallel-free.js +21 -13
  193. package/node_modules/@xrkseek/exec-web/dist/search-parallel-free.js.map +1 -1
  194. package/node_modules/@xrkseek/exec-web/dist/search-providers.d.ts +16 -3
  195. package/node_modules/@xrkseek/exec-web/dist/search-providers.d.ts.map +1 -1
  196. package/node_modules/@xrkseek/exec-web/dist/search-providers.js +113 -7
  197. package/node_modules/@xrkseek/exec-web/dist/search-providers.js.map +1 -1
  198. package/node_modules/@xrkseek/exec-web/dist/tools.d.ts.map +1 -1
  199. package/node_modules/@xrkseek/exec-web/dist/tools.js +15 -2
  200. package/node_modules/@xrkseek/exec-web/dist/tools.js.map +1 -1
  201. package/node_modules/@xrkseek/exec-web/dist/types.d.ts +6 -0
  202. package/node_modules/@xrkseek/exec-web/dist/types.d.ts.map +1 -1
  203. package/node_modules/@xrkseek/llm-deepseek/README.md +22 -22
  204. package/node_modules/@xrkseek/llm-deepseek/package.json +30 -30
  205. package/node_modules/@xrkseek/llm-registry/dist/index.d.ts +2 -2
  206. package/node_modules/@xrkseek/llm-registry/dist/index.d.ts.map +1 -1
  207. package/node_modules/@xrkseek/llm-registry/dist/index.js +1 -1
  208. package/node_modules/@xrkseek/llm-registry/dist/index.js.map +1 -1
  209. package/node_modules/@xrkseek/llm-registry/dist/models-dev-catalog.d.ts.map +1 -1
  210. package/node_modules/@xrkseek/llm-registry/dist/models-dev-catalog.js +13 -2
  211. package/node_modules/@xrkseek/llm-registry/dist/models-dev-catalog.js.map +1 -1
  212. package/node_modules/@xrkseek/llm-registry/dist/registry.d.ts +6 -0
  213. package/node_modules/@xrkseek/llm-registry/dist/registry.d.ts.map +1 -1
  214. package/node_modules/@xrkseek/llm-registry/dist/registry.js +6 -0
  215. package/node_modules/@xrkseek/llm-registry/dist/registry.js.map +1 -1
  216. package/node_modules/@xrkseek/llm-registry/dist/types.d.ts +29 -0
  217. package/node_modules/@xrkseek/llm-registry/dist/types.d.ts.map +1 -1
  218. package/node_modules/@xrkseek/llm-registry/dist/types.js +21 -0
  219. package/node_modules/@xrkseek/llm-registry/dist/types.js.map +1 -1
  220. package/node_modules/@xrkseek/mcp/README.md +78 -78
  221. package/node_modules/@xrkseek/policy/README.md +18 -18
  222. package/node_modules/@xrkseek/policy/package.json +31 -31
  223. package/node_modules/@xrkseek/preset-harness/README.md +7 -7
  224. package/node_modules/@xrkseek/preset-harness/dist/mods.d.ts +68 -0
  225. package/node_modules/@xrkseek/preset-harness/dist/mods.d.ts.map +1 -0
  226. package/node_modules/@xrkseek/preset-harness/dist/mods.js +510 -0
  227. package/node_modules/@xrkseek/preset-harness/dist/mods.js.map +1 -0
  228. package/node_modules/@xrkseek/preset-harness/dist/preset.d.ts +12 -1
  229. package/node_modules/@xrkseek/preset-harness/dist/preset.d.ts.map +1 -1
  230. package/node_modules/@xrkseek/preset-harness/dist/preset.js +73 -26
  231. package/node_modules/@xrkseek/preset-harness/dist/preset.js.map +1 -1
  232. package/node_modules/@xrkseek/preset-harness/dist/tsconfig.tsbuildinfo +1 -1
  233. package/node_modules/@xrkseek/preset-harness/package.json +9 -8
  234. package/node_modules/@xrkseek/preset-minimal/README.md +6 -6
  235. package/node_modules/@xrkseek/preset-minimal/dist/preset.d.ts.map +1 -1
  236. package/node_modules/@xrkseek/preset-minimal/dist/preset.js +9 -3
  237. package/node_modules/@xrkseek/preset-minimal/dist/preset.js.map +1 -1
  238. package/node_modules/@xrkseek/preset-minimal/dist/tsconfig.tsbuildinfo +1 -1
  239. package/node_modules/@xrkseek/preset-server/README.md +4 -4
  240. package/node_modules/@xrkseek/preset-server/dist/preset.d.ts.map +1 -1
  241. package/node_modules/@xrkseek/preset-server/dist/preset.js +2 -1
  242. package/node_modules/@xrkseek/preset-server/dist/preset.js.map +1 -1
  243. package/node_modules/@xrkseek/preset-server/dist/tsconfig.tsbuildinfo +1 -1
  244. package/node_modules/@xrkseek/protocol/README.md +34 -34
  245. package/node_modules/@xrkseek/protocol/dist/content.d.ts.map +1 -1
  246. package/node_modules/@xrkseek/protocol/dist/content.js +6 -1
  247. package/node_modules/@xrkseek/protocol/dist/content.js.map +1 -1
  248. package/node_modules/@xrkseek/protocol/dist/index.d.ts +3 -2
  249. package/node_modules/@xrkseek/protocol/dist/index.d.ts.map +1 -1
  250. package/node_modules/@xrkseek/protocol/dist/index.js +1 -0
  251. package/node_modules/@xrkseek/protocol/dist/index.js.map +1 -1
  252. package/node_modules/@xrkseek/protocol/dist/json-schema.d.ts +12 -0
  253. package/node_modules/@xrkseek/protocol/dist/json-schema.d.ts.map +1 -1
  254. package/node_modules/@xrkseek/protocol/dist/json-schema.js +9 -0
  255. package/node_modules/@xrkseek/protocol/dist/json-schema.js.map +1 -1
  256. package/node_modules/@xrkseek/protocol/dist/json-value.d.ts +25 -0
  257. package/node_modules/@xrkseek/protocol/dist/json-value.d.ts.map +1 -0
  258. package/node_modules/@xrkseek/protocol/dist/json-value.js +181 -0
  259. package/node_modules/@xrkseek/protocol/dist/json-value.js.map +1 -0
  260. package/node_modules/@xrkseek/protocol/dist/session-events.d.ts +21 -1
  261. package/node_modules/@xrkseek/protocol/dist/session-events.d.ts.map +1 -1
  262. package/node_modules/@xrkseek/protocol/dist/session-events.js +1 -0
  263. package/node_modules/@xrkseek/protocol/dist/session-events.js.map +1 -1
  264. package/node_modules/@xrkseek/protocol/dist/validate.d.ts +4 -1
  265. package/node_modules/@xrkseek/protocol/dist/validate.d.ts.map +1 -1
  266. package/node_modules/@xrkseek/protocol/dist/validate.js +28 -2
  267. package/node_modules/@xrkseek/protocol/dist/validate.js.map +1 -1
  268. package/node_modules/@xrkseek/schemastery/lib/index.cjs +597 -597
  269. package/node_modules/@xrkseek/schemastery/lib/index.mjs +597 -597
  270. package/node_modules/@xrkseek/schemastery/lib/types/index.d.ts +203 -203
  271. package/node_modules/@xrkseek/schemastery/src/index.d.ts +203 -203
  272. package/node_modules/@xrkseek/schemastery/src/index.ts +906 -906
  273. package/node_modules/@xrkseek/server-config/package.json +28 -28
  274. package/node_modules/@xrkseek/server-cron/README.md +12 -12
  275. package/node_modules/@xrkseek/server-cron/package.json +26 -26
  276. package/node_modules/@xrkseek/server-face/dist/adapt/history-paginate.d.ts +22 -0
  277. package/node_modules/@xrkseek/server-face/dist/adapt/history-paginate.d.ts.map +1 -1
  278. package/node_modules/@xrkseek/server-face/dist/adapt/history-paginate.js +40 -3
  279. package/node_modules/@xrkseek/server-face/dist/adapt/history-paginate.js.map +1 -1
  280. package/node_modules/@xrkseek/server-face/dist/adapt/subagent-notice.d.ts.map +1 -1
  281. package/node_modules/@xrkseek/server-face/dist/adapt/subagent-notice.js +2 -0
  282. package/node_modules/@xrkseek/server-face/dist/adapt/subagent-notice.js.map +1 -1
  283. package/node_modules/@xrkseek/server-face/dist/adapt/wire-event.d.ts +1 -0
  284. package/node_modules/@xrkseek/server-face/dist/adapt/wire-event.d.ts.map +1 -1
  285. package/node_modules/@xrkseek/server-face/dist/adapt/wire-event.js +2 -0
  286. package/node_modules/@xrkseek/server-face/dist/adapt/wire-event.js.map +1 -1
  287. package/node_modules/@xrkseek/server-face/dist/adapt/wire-ids.d.ts +5 -0
  288. package/node_modules/@xrkseek/server-face/dist/adapt/wire-ids.d.ts.map +1 -1
  289. package/node_modules/@xrkseek/server-face/dist/adapt/wire-ids.js +7 -0
  290. package/node_modules/@xrkseek/server-face/dist/adapt/wire-ids.js.map +1 -1
  291. package/node_modules/@xrkseek/server-face/dist/agent-home-boundary.d.ts +31 -0
  292. package/node_modules/@xrkseek/server-face/dist/agent-home-boundary.d.ts.map +1 -0
  293. package/node_modules/@xrkseek/server-face/dist/agent-home-boundary.js +71 -0
  294. package/node_modules/@xrkseek/server-face/dist/agent-home-boundary.js.map +1 -0
  295. package/node_modules/@xrkseek/server-face/dist/agent-home.d.ts +18 -0
  296. package/node_modules/@xrkseek/server-face/dist/agent-home.d.ts.map +1 -0
  297. package/node_modules/@xrkseek/server-face/dist/agent-home.js +64 -0
  298. package/node_modules/@xrkseek/server-face/dist/agent-home.js.map +1 -0
  299. package/node_modules/@xrkseek/server-face/dist/agent-roster-store.d.ts +41 -2
  300. package/node_modules/@xrkseek/server-face/dist/agent-roster-store.d.ts.map +1 -1
  301. package/node_modules/@xrkseek/server-face/dist/agent-roster-store.js +200 -28
  302. package/node_modules/@xrkseek/server-face/dist/agent-roster-store.js.map +1 -1
  303. package/node_modules/@xrkseek/server-face/dist/agent-team-roles.js +1 -1
  304. package/node_modules/@xrkseek/server-face/dist/agent-team-roles.js.map +1 -1
  305. package/node_modules/@xrkseek/server-face/dist/attach-http.d.ts.map +1 -1
  306. package/node_modules/@xrkseek/server-face/dist/attach-http.js +9 -0
  307. package/node_modules/@xrkseek/server-face/dist/attach-http.js.map +1 -1
  308. package/node_modules/@xrkseek/server-face/dist/boss-status-broadcast.d.ts +55 -0
  309. package/node_modules/@xrkseek/server-face/dist/boss-status-broadcast.d.ts.map +1 -0
  310. package/node_modules/@xrkseek/server-face/dist/boss-status-broadcast.js +167 -0
  311. package/node_modules/@xrkseek/server-face/dist/boss-status-broadcast.js.map +1 -0
  312. package/node_modules/@xrkseek/server-face/dist/collab-board.d.ts +12 -0
  313. package/node_modules/@xrkseek/server-face/dist/collab-board.d.ts.map +1 -1
  314. package/node_modules/@xrkseek/server-face/dist/collab-board.js +101 -19
  315. package/node_modules/@xrkseek/server-face/dist/collab-board.js.map +1 -1
  316. package/node_modules/@xrkseek/server-face/dist/community-llm-sync.d.ts +2 -2
  317. package/node_modules/@xrkseek/server-face/dist/community-llm-sync.d.ts.map +1 -1
  318. package/node_modules/@xrkseek/server-face/dist/community-llm-sync.js +19 -7
  319. package/node_modules/@xrkseek/server-face/dist/community-llm-sync.js.map +1 -1
  320. package/node_modules/@xrkseek/server-face/dist/context.d.ts +29 -0
  321. package/node_modules/@xrkseek/server-face/dist/context.d.ts.map +1 -1
  322. package/node_modules/@xrkseek/server-face/dist/dispatch.d.ts.map +1 -1
  323. package/node_modules/@xrkseek/server-face/dist/dispatch.js +4 -1
  324. package/node_modules/@xrkseek/server-face/dist/dispatch.js.map +1 -1
  325. package/node_modules/@xrkseek/server-face/dist/face-schema.d.ts.map +1 -1
  326. package/node_modules/@xrkseek/server-face/dist/face-schema.js +2 -1
  327. package/node_modules/@xrkseek/server-face/dist/face-schema.js.map +1 -1
  328. package/node_modules/@xrkseek/server-face/dist/fork-cut.d.ts.map +1 -1
  329. package/node_modules/@xrkseek/server-face/dist/fork-cut.js +15 -3
  330. package/node_modules/@xrkseek/server-face/dist/fork-cut.js.map +1 -1
  331. package/node_modules/@xrkseek/server-face/dist/fork-lineage.d.ts +7 -0
  332. package/node_modules/@xrkseek/server-face/dist/fork-lineage.d.ts.map +1 -1
  333. package/node_modules/@xrkseek/server-face/dist/fork-lineage.js +23 -8
  334. package/node_modules/@xrkseek/server-face/dist/fork-lineage.js.map +1 -1
  335. package/node_modules/@xrkseek/server-face/dist/handlers/band.d.ts +7 -0
  336. package/node_modules/@xrkseek/server-face/dist/handlers/band.d.ts.map +1 -0
  337. package/node_modules/@xrkseek/server-face/dist/handlers/band.js +40 -0
  338. package/node_modules/@xrkseek/server-face/dist/handlers/band.js.map +1 -0
  339. package/node_modules/@xrkseek/server-face/dist/handlers/checkpoint.d.ts.map +1 -1
  340. package/node_modules/@xrkseek/server-face/dist/handlers/checkpoint.js +81 -3
  341. package/node_modules/@xrkseek/server-face/dist/handlers/checkpoint.js.map +1 -1
  342. package/node_modules/@xrkseek/server-face/dist/handlers/remotes.d.ts.map +1 -1
  343. package/node_modules/@xrkseek/server-face/dist/handlers/remotes.js +20 -7
  344. package/node_modules/@xrkseek/server-face/dist/handlers/remotes.js.map +1 -1
  345. package/node_modules/@xrkseek/server-face/dist/handlers/session.d.ts +2 -0
  346. package/node_modules/@xrkseek/server-face/dist/handlers/session.d.ts.map +1 -1
  347. package/node_modules/@xrkseek/server-face/dist/handlers/session.js +236 -62
  348. package/node_modules/@xrkseek/server-face/dist/handlers/session.js.map +1 -1
  349. package/node_modules/@xrkseek/server-face/dist/handlers/team.d.ts.map +1 -1
  350. package/node_modules/@xrkseek/server-face/dist/handlers/team.js +100 -9
  351. package/node_modules/@xrkseek/server-face/dist/handlers/team.js.map +1 -1
  352. package/node_modules/@xrkseek/server-face/dist/host-open-in-app.d.ts.map +1 -1
  353. package/node_modules/@xrkseek/server-face/dist/host-open-in-app.js +9 -0
  354. package/node_modules/@xrkseek/server-face/dist/host-open-in-app.js.map +1 -1
  355. package/node_modules/@xrkseek/server-face/dist/host-open-path.d.ts +8 -3
  356. package/node_modules/@xrkseek/server-face/dist/host-open-path.d.ts.map +1 -1
  357. package/node_modules/@xrkseek/server-face/dist/host-open-path.js +61 -19
  358. package/node_modules/@xrkseek/server-face/dist/host-open-path.js.map +1 -1
  359. package/node_modules/@xrkseek/server-face/dist/host-pick-directory.d.ts +2 -1
  360. package/node_modules/@xrkseek/server-face/dist/host-pick-directory.d.ts.map +1 -1
  361. package/node_modules/@xrkseek/server-face/dist/host-pick-directory.js +12 -2
  362. package/node_modules/@xrkseek/server-face/dist/host-pick-directory.js.map +1 -1
  363. package/node_modules/@xrkseek/server-face/dist/index.d.ts +6 -2
  364. package/node_modules/@xrkseek/server-face/dist/index.d.ts.map +1 -1
  365. package/node_modules/@xrkseek/server-face/dist/index.js +6 -2
  366. package/node_modules/@xrkseek/server-face/dist/index.js.map +1 -1
  367. package/node_modules/@xrkseek/server-face/dist/instruction-authority-fragment.d.ts +19 -0
  368. package/node_modules/@xrkseek/server-face/dist/instruction-authority-fragment.d.ts.map +1 -0
  369. package/node_modules/@xrkseek/server-face/dist/instruction-authority-fragment.js +28 -0
  370. package/node_modules/@xrkseek/server-face/dist/instruction-authority-fragment.js.map +1 -0
  371. package/node_modules/@xrkseek/server-face/dist/log-cut-reset.d.ts +3 -0
  372. package/node_modules/@xrkseek/server-face/dist/log-cut-reset.d.ts.map +1 -0
  373. package/node_modules/@xrkseek/server-face/dist/log-cut-reset.js +22 -0
  374. package/node_modules/@xrkseek/server-face/dist/log-cut-reset.js.map +1 -0
  375. package/node_modules/@xrkseek/server-face/dist/model-catalog.d.ts.map +1 -1
  376. package/node_modules/@xrkseek/server-face/dist/model-catalog.js +60 -5
  377. package/node_modules/@xrkseek/server-face/dist/model-catalog.js.map +1 -1
  378. package/node_modules/@xrkseek/server-face/dist/projections/index.d.ts +2 -2
  379. package/node_modules/@xrkseek/server-face/dist/projections/index.d.ts.map +1 -1
  380. package/node_modules/@xrkseek/server-face/dist/projections/index.js +2 -2
  381. package/node_modules/@xrkseek/server-face/dist/projections/index.js.map +1 -1
  382. package/node_modules/@xrkseek/server-face/dist/projections/list-checkpoint-cache.d.ts +50 -4
  383. package/node_modules/@xrkseek/server-face/dist/projections/list-checkpoint-cache.d.ts.map +1 -1
  384. package/node_modules/@xrkseek/server-face/dist/projections/list-checkpoint-cache.js +167 -19
  385. package/node_modules/@xrkseek/server-face/dist/projections/list-checkpoint-cache.js.map +1 -1
  386. package/node_modules/@xrkseek/server-face/dist/projections/snapshot-keys.d.ts +21 -1
  387. package/node_modules/@xrkseek/server-face/dist/projections/snapshot-keys.d.ts.map +1 -1
  388. package/node_modules/@xrkseek/server-face/dist/projections/snapshot-keys.js +21 -1
  389. package/node_modules/@xrkseek/server-face/dist/projections/snapshot-keys.js.map +1 -1
  390. package/node_modules/@xrkseek/server-face/dist/projections/units/context-pressure.d.ts +8 -4
  391. package/node_modules/@xrkseek/server-face/dist/projections/units/context-pressure.d.ts.map +1 -1
  392. package/node_modules/@xrkseek/server-face/dist/projections/units/context-pressure.js +2 -7
  393. package/node_modules/@xrkseek/server-face/dist/projections/units/context-pressure.js.map +1 -1
  394. package/node_modules/@xrkseek/server-face/dist/projections/units/context-timeline.d.ts.map +1 -1
  395. package/node_modules/@xrkseek/server-face/dist/projections/units/context-timeline.js +58 -0
  396. package/node_modules/@xrkseek/server-face/dist/projections/units/context-timeline.js.map +1 -1
  397. package/node_modules/@xrkseek/server-face/dist/projections/units/cost-usage.d.ts.map +1 -1
  398. package/node_modules/@xrkseek/server-face/dist/projections/units/cost-usage.js +85 -0
  399. package/node_modules/@xrkseek/server-face/dist/projections/units/cost-usage.js.map +1 -1
  400. package/node_modules/@xrkseek/server-face/dist/projections/units/session-list-metadata.d.ts.map +1 -1
  401. package/node_modules/@xrkseek/server-face/dist/projections/units/session-list-metadata.js +14 -0
  402. package/node_modules/@xrkseek/server-face/dist/projections/units/session-list-metadata.js.map +1 -1
  403. package/node_modules/@xrkseek/server-face/dist/projections/units/title.d.ts.map +1 -1
  404. package/node_modules/@xrkseek/server-face/dist/projections/units/title.js +14 -0
  405. package/node_modules/@xrkseek/server-face/dist/projections/units/title.js.map +1 -1
  406. package/node_modules/@xrkseek/server-face/dist/projections/units/turn-outline.d.ts.map +1 -1
  407. package/node_modules/@xrkseek/server-face/dist/projections/units/turn-outline.js +24 -0
  408. package/node_modules/@xrkseek/server-face/dist/projections/units/turn-outline.js.map +1 -1
  409. package/node_modules/@xrkseek/server-face/dist/runtime.d.ts +11 -1
  410. package/node_modules/@xrkseek/server-face/dist/runtime.d.ts.map +1 -1
  411. package/node_modules/@xrkseek/server-face/dist/runtime.js +118 -15
  412. package/node_modules/@xrkseek/server-face/dist/runtime.js.map +1 -1
  413. package/node_modules/@xrkseek/server-face/dist/seat-identity.d.ts +26 -0
  414. package/node_modules/@xrkseek/server-face/dist/seat-identity.d.ts.map +1 -0
  415. package/node_modules/@xrkseek/server-face/dist/seat-identity.js +137 -0
  416. package/node_modules/@xrkseek/server-face/dist/seat-identity.js.map +1 -0
  417. package/node_modules/@xrkseek/server-face/dist/seat-titles.d.ts +29 -0
  418. package/node_modules/@xrkseek/server-face/dist/seat-titles.d.ts.map +1 -0
  419. package/node_modules/@xrkseek/server-face/dist/seat-titles.js +74 -0
  420. package/node_modules/@xrkseek/server-face/dist/seat-titles.js.map +1 -0
  421. package/node_modules/@xrkseek/server-face/dist/session-capability.d.ts.map +1 -1
  422. package/node_modules/@xrkseek/server-face/dist/session-capability.js +9 -6
  423. package/node_modules/@xrkseek/server-face/dist/session-capability.js.map +1 -1
  424. package/node_modules/@xrkseek/server-face/dist/session-event-window.d.ts +37 -0
  425. package/node_modules/@xrkseek/server-face/dist/session-event-window.d.ts.map +1 -0
  426. package/node_modules/@xrkseek/server-face/dist/session-event-window.js +88 -0
  427. package/node_modules/@xrkseek/server-face/dist/session-event-window.js.map +1 -0
  428. package/node_modules/@xrkseek/server-face/dist/session-identity-store.d.ts +20 -0
  429. package/node_modules/@xrkseek/server-face/dist/session-identity-store.d.ts.map +1 -0
  430. package/node_modules/@xrkseek/server-face/dist/session-identity-store.js +82 -0
  431. package/node_modules/@xrkseek/server-face/dist/session-identity-store.js.map +1 -0
  432. package/node_modules/@xrkseek/server-face/dist/session-posture.d.ts +1 -1
  433. package/node_modules/@xrkseek/server-face/dist/session-posture.d.ts.map +1 -1
  434. package/node_modules/@xrkseek/server-face/dist/session-posture.js +20 -5
  435. package/node_modules/@xrkseek/server-face/dist/session-posture.js.map +1 -1
  436. package/node_modules/@xrkseek/server-face/dist/session-query-tools.d.ts +1 -0
  437. package/node_modules/@xrkseek/server-face/dist/session-query-tools.d.ts.map +1 -1
  438. package/node_modules/@xrkseek/server-face/dist/session-query-tools.js +172 -25
  439. package/node_modules/@xrkseek/server-face/dist/session-query-tools.js.map +1 -1
  440. package/node_modules/@xrkseek/server-face/dist/session-search.d.ts +20 -2
  441. package/node_modules/@xrkseek/server-face/dist/session-search.d.ts.map +1 -1
  442. package/node_modules/@xrkseek/server-face/dist/session-search.js +125 -19
  443. package/node_modules/@xrkseek/server-face/dist/session-search.js.map +1 -1
  444. package/node_modules/@xrkseek/server-face/dist/session-status.d.ts +6 -0
  445. package/node_modules/@xrkseek/server-face/dist/session-status.d.ts.map +1 -1
  446. package/node_modules/@xrkseek/server-face/dist/session-status.js +161 -21
  447. package/node_modules/@xrkseek/server-face/dist/session-status.js.map +1 -1
  448. package/node_modules/@xrkseek/server-face/dist/session-thread-tools.d.ts.map +1 -1
  449. package/node_modules/@xrkseek/server-face/dist/session-thread-tools.js +5 -0
  450. package/node_modules/@xrkseek/server-face/dist/session-thread-tools.js.map +1 -1
  451. package/node_modules/@xrkseek/server-face/dist/session-tool-copy.d.ts.map +1 -1
  452. package/node_modules/@xrkseek/server-face/dist/session-tool-copy.js +2 -1
  453. package/node_modules/@xrkseek/server-face/dist/session-tool-copy.js.map +1 -1
  454. package/node_modules/@xrkseek/server-face/dist/settings-credentials.d.ts.map +1 -1
  455. package/node_modules/@xrkseek/server-face/dist/settings-credentials.js +43 -3
  456. package/node_modules/@xrkseek/server-face/dist/settings-credentials.js.map +1 -1
  457. package/node_modules/@xrkseek/server-face/dist/settings-document.d.ts.map +1 -1
  458. package/node_modules/@xrkseek/server-face/dist/settings-document.js +4 -0
  459. package/node_modules/@xrkseek/server-face/dist/settings-document.js.map +1 -1
  460. package/node_modules/@xrkseek/server-face/dist/settings-schemas.d.ts.map +1 -1
  461. package/node_modules/@xrkseek/server-face/dist/settings-schemas.js +76 -11
  462. package/node_modules/@xrkseek/server-face/dist/settings-schemas.js.map +1 -1
  463. package/node_modules/@xrkseek/server-face/dist/skill-documents.d.ts.map +1 -1
  464. package/node_modules/@xrkseek/server-face/dist/skill-documents.js +14 -4
  465. package/node_modules/@xrkseek/server-face/dist/skill-documents.js.map +1 -1
  466. package/node_modules/@xrkseek/server-face/dist/skill-list.d.ts +4 -2
  467. package/node_modules/@xrkseek/server-face/dist/skill-list.d.ts.map +1 -1
  468. package/node_modules/@xrkseek/server-face/dist/skill-list.js +10 -4
  469. package/node_modules/@xrkseek/server-face/dist/skill-list.js.map +1 -1
  470. package/node_modules/@xrkseek/server-face/dist/skill-read.d.ts.map +1 -1
  471. package/node_modules/@xrkseek/server-face/dist/skill-read.js +9 -2
  472. package/node_modules/@xrkseek/server-face/dist/skill-read.js.map +1 -1
  473. package/node_modules/@xrkseek/server-face/dist/skill-source.d.ts +2 -1
  474. package/node_modules/@xrkseek/server-face/dist/skill-source.d.ts.map +1 -1
  475. package/node_modules/@xrkseek/server-face/dist/skill-source.js +12 -2
  476. package/node_modules/@xrkseek/server-face/dist/skill-source.js.map +1 -1
  477. package/node_modules/@xrkseek/server-face/dist/slash.d.ts +10 -1
  478. package/node_modules/@xrkseek/server-face/dist/slash.d.ts.map +1 -1
  479. package/node_modules/@xrkseek/server-face/dist/slash.js +118 -26
  480. package/node_modules/@xrkseek/server-face/dist/slash.js.map +1 -1
  481. package/node_modules/@xrkseek/server-face/dist/status-snapshot-cache.d.ts.map +1 -1
  482. package/node_modules/@xrkseek/server-face/dist/status-snapshot-cache.js +53 -0
  483. package/node_modules/@xrkseek/server-face/dist/status-snapshot-cache.js.map +1 -1
  484. package/node_modules/@xrkseek/server-face/dist/subagent-tools.d.ts.map +1 -1
  485. package/node_modules/@xrkseek/server-face/dist/subagent-tools.js +7 -2
  486. package/node_modules/@xrkseek/server-face/dist/subagent-tools.js.map +1 -1
  487. package/node_modules/@xrkseek/server-face/dist/types.d.ts +23 -0
  488. package/node_modules/@xrkseek/server-face/dist/types.d.ts.map +1 -1
  489. package/node_modules/@xrkseek/server-face/dist/workspace-checkpoint.d.ts +17 -2
  490. package/node_modules/@xrkseek/server-face/dist/workspace-checkpoint.d.ts.map +1 -1
  491. package/node_modules/@xrkseek/server-face/dist/workspace-checkpoint.js +111 -10
  492. package/node_modules/@xrkseek/server-face/dist/workspace-checkpoint.js.map +1 -1
  493. package/node_modules/@xrkseek/server-face/dist/workspace-face.d.ts.map +1 -1
  494. package/node_modules/@xrkseek/server-face/dist/workspace-face.js +19 -14
  495. package/node_modules/@xrkseek/server-face/dist/workspace-face.js.map +1 -1
  496. package/node_modules/@xrkseek/server-face/dist/workspace-member-look.d.ts +22 -0
  497. package/node_modules/@xrkseek/server-face/dist/workspace-member-look.d.ts.map +1 -0
  498. package/node_modules/@xrkseek/server-face/dist/workspace-member-look.js +35 -0
  499. package/node_modules/@xrkseek/server-face/dist/workspace-member-look.js.map +1 -0
  500. package/node_modules/@xrkseek/server-face/dist/workspace-orchestrate-tools.d.ts +3 -2
  501. package/node_modules/@xrkseek/server-face/dist/workspace-orchestrate-tools.d.ts.map +1 -1
  502. package/node_modules/@xrkseek/server-face/dist/workspace-orchestrate-tools.js +74 -57
  503. package/node_modules/@xrkseek/server-face/dist/workspace-orchestrate-tools.js.map +1 -1
  504. package/node_modules/@xrkseek/server-face/dist/workspace-registry.d.ts +31 -0
  505. package/node_modules/@xrkseek/server-face/dist/workspace-registry.d.ts.map +1 -1
  506. package/node_modules/@xrkseek/server-face/dist/workspace-registry.js +109 -0
  507. package/node_modules/@xrkseek/server-face/dist/workspace-registry.js.map +1 -1
  508. package/node_modules/@xrkseek/server-face/dist/workspace-store.d.ts +2 -0
  509. package/node_modules/@xrkseek/server-face/dist/workspace-store.d.ts.map +1 -1
  510. package/node_modules/@xrkseek/server-face/dist/workspace-store.js +7 -0
  511. package/node_modules/@xrkseek/server-face/dist/workspace-store.js.map +1 -1
  512. package/node_modules/@xrkseek/server-face/package.json +60 -60
  513. package/node_modules/@xrkseek/server-host/dist/index.d.ts +37 -6
  514. package/node_modules/@xrkseek/server-host/dist/index.d.ts.map +1 -1
  515. package/node_modules/@xrkseek/server-host/dist/index.js +182 -28
  516. package/node_modules/@xrkseek/server-host/dist/index.js.map +1 -1
  517. package/node_modules/@xrkseek/server-host/dist/log.d.ts +6 -0
  518. package/node_modules/@xrkseek/server-host/dist/log.d.ts.map +1 -1
  519. package/node_modules/@xrkseek/server-host/dist/sidebar-face-bridge.d.ts.map +1 -1
  520. package/node_modules/@xrkseek/server-host/dist/sidebar-face-bridge.js +17 -2
  521. package/node_modules/@xrkseek/server-host/dist/sidebar-face-bridge.js.map +1 -1
  522. package/node_modules/@xrkseek/server-host/dist/standing-tools.d.ts.map +1 -1
  523. package/node_modules/@xrkseek/server-host/dist/standing-tools.js +3 -3
  524. package/node_modules/@xrkseek/server-host/dist/standing-tools.js.map +1 -1
  525. package/node_modules/@xrkseek/server-host/package.json +75 -75
  526. package/node_modules/@xrkseek/server-http/dist/dsh-compat/adapter-types.d.ts +5 -0
  527. package/node_modules/@xrkseek/server-http/dist/dsh-compat/adapter-types.d.ts.map +1 -1
  528. package/node_modules/@xrkseek/server-http/dist/dsh-compat/auto-review-tool-pre.d.ts +1 -1
  529. package/node_modules/@xrkseek/server-http/dist/dsh-compat/auto-review-tool-pre.d.ts.map +1 -1
  530. package/node_modules/@xrkseek/server-http/dist/dsh-compat/genui-browser-runtime.js +188 -188
  531. package/node_modules/@xrkseek/server-http/dist/dsh-compat/index.d.ts +1 -1
  532. package/node_modules/@xrkseek/server-http/dist/dsh-compat/index.d.ts.map +1 -1
  533. package/node_modules/@xrkseek/server-http/dist/dsh-compat/index.js +1 -1
  534. package/node_modules/@xrkseek/server-http/dist/dsh-compat/index.js.map +1 -1
  535. package/node_modules/@xrkseek/server-http/dist/dsh-compat/mobile-access-auth.d.ts.map +1 -1
  536. package/node_modules/@xrkseek/server-http/dist/dsh-compat/mobile-access-auth.js +292 -24
  537. package/node_modules/@xrkseek/server-http/dist/dsh-compat/mobile-access-auth.js.map +1 -1
  538. package/node_modules/@xrkseek/server-http/dist/dsh-compat/mobile-access-gate.d.ts.map +1 -1
  539. package/node_modules/@xrkseek/server-http/dist/dsh-compat/mobile-access-gate.js +12 -1
  540. package/node_modules/@xrkseek/server-http/dist/dsh-compat/mobile-access-gate.js.map +1 -1
  541. package/node_modules/@xrkseek/server-http/dist/dsh-compat/mobile-access.d.ts +16 -1
  542. package/node_modules/@xrkseek/server-http/dist/dsh-compat/mobile-access.d.ts.map +1 -1
  543. package/node_modules/@xrkseek/server-http/dist/dsh-compat/mobile-access.js +47 -2
  544. package/node_modules/@xrkseek/server-http/dist/dsh-compat/mobile-access.js.map +1 -1
  545. package/node_modules/@xrkseek/server-http/dist/dsh-compat/skin-center.d.ts +1 -1
  546. package/node_modules/@xrkseek/server-http/dist/dsh-compat/token-usage-stats-dash.js +53 -53
  547. package/node_modules/@xrkseek/server-http/dist/dsh-compat/underlying/mobile-gate-kit.d.ts +9 -4
  548. package/node_modules/@xrkseek/server-http/dist/dsh-compat/underlying/mobile-gate-kit.d.ts.map +1 -1
  549. package/node_modules/@xrkseek/server-http/dist/dsh-compat/underlying/mobile-gate-kit.js +39 -20
  550. package/node_modules/@xrkseek/server-http/dist/dsh-compat/underlying/mobile-gate-kit.js.map +1 -1
  551. package/node_modules/@xrkseek/server-http/dist/index.d.ts +2 -1
  552. package/node_modules/@xrkseek/server-http/dist/index.d.ts.map +1 -1
  553. package/node_modules/@xrkseek/server-http/dist/index.js +2 -1
  554. package/node_modules/@xrkseek/server-http/dist/index.js.map +1 -1
  555. package/node_modules/@xrkseek/server-http/dist/sunflower-free/ensure.d.ts +55 -0
  556. package/node_modules/@xrkseek/server-http/dist/sunflower-free/ensure.d.ts.map +1 -0
  557. package/node_modules/@xrkseek/server-http/dist/sunflower-free/ensure.js +176 -0
  558. package/node_modules/@xrkseek/server-http/dist/sunflower-free/ensure.js.map +1 -0
  559. package/node_modules/@xrkseek/server-http/dist/xrk/plugin-mutate.d.ts +2 -0
  560. package/node_modules/@xrkseek/server-http/dist/xrk/plugin-mutate.d.ts.map +1 -1
  561. package/node_modules/@xrkseek/server-http/dist/xrk/plugin-mutate.js +7 -3
  562. package/node_modules/@xrkseek/server-http/dist/xrk/plugin-mutate.js.map +1 -1
  563. package/node_modules/@xrkseek/server-http/package.json +72 -72
  564. package/node_modules/@xrkseek/server-loader/dist/load.d.ts.map +1 -1
  565. package/node_modules/@xrkseek/server-loader/dist/load.js +132 -0
  566. package/node_modules/@xrkseek/server-loader/dist/load.js.map +1 -1
  567. package/node_modules/@xrkseek/session-projection/README.md +26 -26
  568. package/node_modules/@xrkseek/session-projection/dist/index.d.ts +31 -2
  569. package/node_modules/@xrkseek/session-projection/dist/index.d.ts.map +1 -1
  570. package/node_modules/@xrkseek/session-projection/dist/index.js +135 -19
  571. package/node_modules/@xrkseek/session-projection/dist/index.js.map +1 -1
  572. package/node_modules/@xrkseek/session-telemetry/README.md +11 -11
  573. package/node_modules/@xrkseek/session-telemetry/dist/index.d.ts +1 -0
  574. package/node_modules/@xrkseek/session-telemetry/dist/index.d.ts.map +1 -1
  575. package/node_modules/@xrkseek/session-telemetry/dist/index.js +1 -0
  576. package/node_modules/@xrkseek/session-telemetry/dist/index.js.map +1 -1
  577. package/node_modules/@xrkseek/session-telemetry/dist/redact.d.ts +14 -0
  578. package/node_modules/@xrkseek/session-telemetry/dist/redact.d.ts.map +1 -0
  579. package/node_modules/@xrkseek/session-telemetry/dist/redact.js +58 -0
  580. package/node_modules/@xrkseek/session-telemetry/dist/redact.js.map +1 -0
  581. package/node_modules/@xrkseek/session-telemetry/dist/wrap-store.d.ts +7 -0
  582. package/node_modules/@xrkseek/session-telemetry/dist/wrap-store.d.ts.map +1 -1
  583. package/node_modules/@xrkseek/session-telemetry/dist/wrap-store.js +43 -12
  584. package/node_modules/@xrkseek/session-telemetry/dist/wrap-store.js.map +1 -1
  585. package/node_modules/@xrkseek/session-telemetry/package.json +27 -27
  586. package/node_modules/@xrkseek/workspace/dist/durable-inject.d.ts +13 -0
  587. package/node_modules/@xrkseek/workspace/dist/durable-inject.d.ts.map +1 -1
  588. package/node_modules/@xrkseek/workspace/dist/durable-inject.js +40 -4
  589. package/node_modules/@xrkseek/workspace/dist/durable-inject.js.map +1 -1
  590. package/node_modules/@xrkseek/workspace/dist/ecosystem-instructions.d.ts +10 -9
  591. package/node_modules/@xrkseek/workspace/dist/ecosystem-instructions.d.ts.map +1 -1
  592. package/node_modules/@xrkseek/workspace/dist/ecosystem-instructions.js +67 -19
  593. package/node_modules/@xrkseek/workspace/dist/ecosystem-instructions.js.map +1 -1
  594. package/node_modules/@xrkseek/workspace/dist/index.d.ts +19 -20
  595. package/node_modules/@xrkseek/workspace/dist/index.d.ts.map +1 -1
  596. package/node_modules/@xrkseek/workspace/dist/index.js +43 -20
  597. package/node_modules/@xrkseek/workspace/dist/index.js.map +1 -1
  598. package/node_modules/@xrkseek/workspace/dist/inject-fingerprint.d.ts +2 -0
  599. package/node_modules/@xrkseek/workspace/dist/inject-fingerprint.d.ts.map +1 -1
  600. package/node_modules/@xrkseek/workspace/dist/inject-fingerprint.js +23 -12
  601. package/node_modules/@xrkseek/workspace/dist/inject-fingerprint.js.map +1 -1
  602. package/node_modules/@xrkseek/workspace/dist/inject-sources.d.ts +7 -4
  603. package/node_modules/@xrkseek/workspace/dist/inject-sources.d.ts.map +1 -1
  604. package/node_modules/@xrkseek/workspace/dist/inject-sources.js +10 -0
  605. package/node_modules/@xrkseek/workspace/dist/inject-sources.js.map +1 -1
  606. package/node_modules/@xrkseek/workspace/dist/instruction-authority.d.ts +27 -0
  607. package/node_modules/@xrkseek/workspace/dist/instruction-authority.d.ts.map +1 -0
  608. package/node_modules/@xrkseek/workspace/dist/instruction-authority.js +78 -0
  609. package/node_modules/@xrkseek/workspace/dist/instruction-authority.js.map +1 -0
  610. package/node_modules/@xrkseek/workspace/dist/skill-dirs.d.ts +7 -0
  611. package/node_modules/@xrkseek/workspace/dist/skill-dirs.d.ts.map +1 -1
  612. package/node_modules/@xrkseek/workspace/dist/skill-dirs.js +4 -2
  613. package/node_modules/@xrkseek/workspace/dist/skill-dirs.js.map +1 -1
  614. package/node_modules/@xrkseek/workspace/dist/skill-tools.js +1 -1
  615. package/node_modules/@xrkseek/workspace/dist/skill-tools.js.map +1 -1
  616. package/node_modules/@xrkseek/workspace/dist/skills.d.ts +13 -1
  617. package/node_modules/@xrkseek/workspace/dist/skills.d.ts.map +1 -1
  618. package/node_modules/@xrkseek/workspace/dist/skills.js +45 -5
  619. package/node_modules/@xrkseek/workspace/dist/skills.js.map +1 -1
  620. package/node_modules/@xrkseek/workspace/dist/standing-skill-dirs.d.ts +26 -0
  621. package/node_modules/@xrkseek/workspace/dist/standing-skill-dirs.d.ts.map +1 -0
  622. package/node_modules/@xrkseek/workspace/dist/standing-skill-dirs.js +80 -0
  623. package/node_modules/@xrkseek/workspace/dist/standing-skill-dirs.js.map +1 -0
  624. package/node_modules/@xrkseek/workspace/dist/workspace-anchor.d.ts +7 -1
  625. package/node_modules/@xrkseek/workspace/dist/workspace-anchor.d.ts.map +1 -1
  626. package/node_modules/@xrkseek/workspace/dist/workspace-anchor.js +21 -1
  627. package/node_modules/@xrkseek/workspace/dist/workspace-anchor.js.map +1 -1
  628. package/node_modules/@xrkseek/workspace/package.json +28 -28
  629. package/node_modules/@xrkseek/xrk-agent/lib/index.js +1 -793
  630. package/node_modules/@xrkseek/xrk-agent/lib/invariant.js +1 -23
  631. package/node_modules/@xrkseek/xrk-attachment/lib/index.js +1 -1
  632. package/node_modules/@xrkseek/xrk-attachment/lib/invariant.js +1 -0
  633. package/node_modules/@xrkseek/xrk-attachment/lib/types/brand.js +10 -0
  634. package/node_modules/@xrkseek/xrk-attachment/lib/types/error.js +48 -0
  635. package/node_modules/@xrkseek/xrk-attachment/lib/types/index.js +42 -0
  636. package/node_modules/@xrkseek/xrk-attachment/lib/types/invariant.js +16 -0
  637. package/node_modules/@xrkseek/xrk-attachment/lib/types/types.d.ts +6 -0
  638. package/node_modules/@xrkseek/xrk-attachment/lib/types/types.js +3 -0
  639. package/node_modules/@xrkseek/xrk-attachment/package.json +1 -0
  640. package/node_modules/@xrkseek/xrk-brand/lib/index.js +1 -1
  641. package/node_modules/@xrkseek/xrk-brand/lib/invariant.js +1 -0
  642. package/node_modules/@xrkseek/xrk-brand/lib/types/index.js +24 -0
  643. package/node_modules/@xrkseek/xrk-brand/lib/types/invariant.js +22 -0
  644. package/node_modules/@xrkseek/xrk-brand/package.json +1 -0
  645. package/node_modules/@xrkseek/xrk-commands/lib/index.js +1 -1
  646. package/node_modules/@xrkseek/xrk-commands/lib/invariant.js +1 -0
  647. package/node_modules/@xrkseek/xrk-file-reference-local/README.md +46 -46
  648. package/node_modules/@xrkseek/xrk-file-reference-local/README.zh.md +46 -46
  649. package/node_modules/@xrkseek/xrk-file-reference-local/package.json +30 -30
  650. package/node_modules/@xrkseek/xrk-invariants/lib/index.js +1 -1
  651. package/node_modules/@xrkseek/xrk-invariants/lib/invariant.js +1 -0
  652. package/node_modules/@xrkseek/xrk-invariants/lib/types/index.js +148 -0
  653. package/node_modules/@xrkseek/xrk-invariants/lib/types/invariant.js +22 -0
  654. package/node_modules/@xrkseek/xrk-invariants/package.json +1 -0
  655. package/node_modules/@xrkseek/xrk-llm/lib/index.js +1 -1
  656. package/node_modules/@xrkseek/xrk-llm/lib/invariant.js +1 -0
  657. package/node_modules/@xrkseek/xrk-llm/lib/types/index.js +4 -0
  658. package/node_modules/@xrkseek/xrk-llm/lib/types/types.d.ts +11 -0
  659. package/node_modules/@xrkseek/xrk-permission-presets/lib/index.js +1 -1
  660. package/node_modules/@xrkseek/xrk-permission-presets/lib/invariant.js +1 -0
  661. package/node_modules/@xrkseek/xrk-scope/lib/index.js +1 -0
  662. package/node_modules/@xrkseek/xrk-scope/lib/types/index.d.ts +129 -0
  663. package/node_modules/@xrkseek/xrk-scope/lib/types/index.js +243 -0
  664. package/node_modules/@xrkseek/xrk-scope/package.json +34 -0
  665. package/node_modules/@xrkseek/xrk-session/lib/index.js +1 -1
  666. package/node_modules/@xrkseek/xrk-session/lib/invariant.js +1 -0
  667. package/node_modules/@xrkseek/xrk-session-projection/lib/index.js +1 -1
  668. package/node_modules/@xrkseek/xrk-session-projection/lib/invariant.js +1 -0
  669. package/node_modules/@xrkseek/xrk-session-reference/README.md +50 -50
  670. package/node_modules/@xrkseek/xrk-session-reference/README.zh.md +50 -50
  671. package/node_modules/@xrkseek/xrk-session-reference/dist/prepare-face.js +13 -13
  672. package/node_modules/@xrkseek/xrk-session-reference/dist/spill.js +2 -2
  673. package/node_modules/@xrkseek/xrk-session-reference/package.json +56 -56
  674. package/node_modules/@xrkseek/xrk-settings/lib/index.js +1 -638
  675. package/node_modules/@xrkseek/xrk-settings/lib/invariant.js +1 -67
  676. package/node_modules/@xrkseek/xrk-system-prompt/package.json +15 -15
  677. package/node_modules/@xrkseek/xrk-system-prompt/src/index.ts +144 -144
  678. package/node_modules/@xrkseek/xrk-token-meter/README.i18n.yaml +6 -0
  679. package/node_modules/@xrkseek/xrk-token-meter/README.md +68 -0
  680. package/node_modules/@xrkseek/xrk-token-meter/README.zh.md +68 -0
  681. package/node_modules/@xrkseek/xrk-token-meter/lib/index.js +1 -0
  682. package/node_modules/@xrkseek/xrk-token-meter/lib/invariant.js +1 -0
  683. package/node_modules/@xrkseek/xrk-token-meter/lib/types/breakdown-projection.d.ts +29 -0
  684. package/node_modules/@xrkseek/xrk-token-meter/lib/types/breakdown-projection.js +56 -0
  685. package/node_modules/@xrkseek/xrk-token-meter/lib/types/client.d.ts +9 -0
  686. package/node_modules/@xrkseek/xrk-token-meter/lib/types/client.js +7 -0
  687. package/node_modules/@xrkseek/xrk-token-meter/lib/types/estimate.d.ts +42 -0
  688. package/node_modules/@xrkseek/xrk-token-meter/lib/types/estimate.js +79 -0
  689. package/node_modules/@xrkseek/xrk-token-meter/lib/types/index.d.ts +62 -0
  690. package/node_modules/@xrkseek/xrk-token-meter/lib/types/index.js +250 -0
  691. package/node_modules/@xrkseek/xrk-token-meter/lib/types/invariant.d.ts +16 -0
  692. package/node_modules/@xrkseek/xrk-token-meter/lib/types/invariant.js +30 -0
  693. package/node_modules/@xrkseek/xrk-token-meter/lib/types/projection.d.ts +74 -0
  694. package/node_modules/@xrkseek/xrk-token-meter/lib/types/projection.js +7 -0
  695. package/node_modules/@xrkseek/xrk-token-meter/lib/types/surface-fold.d.ts +38 -0
  696. package/node_modules/@xrkseek/xrk-token-meter/lib/types/surface-fold.js +47 -0
  697. package/node_modules/@xrkseek/xrk-token-meter/lib/types/surface-projection.d.ts +59 -0
  698. package/node_modules/@xrkseek/xrk-token-meter/lib/types/surface-projection.js +66 -0
  699. package/node_modules/@xrkseek/xrk-token-meter/lib/types/turn-usage.d.ts +33 -0
  700. package/node_modules/@xrkseek/xrk-token-meter/lib/types/turn-usage.js +247 -0
  701. package/node_modules/@xrkseek/xrk-token-meter/lib/types/types.d.ts +44 -0
  702. package/node_modules/@xrkseek/xrk-token-meter/lib/types/types.js +7 -0
  703. package/node_modules/@xrkseek/xrk-token-meter/lib/types/usage-projection.d.ts +64 -0
  704. package/node_modules/@xrkseek/xrk-token-meter/lib/types/usage-projection.js +161 -0
  705. package/node_modules/@xrkseek/xrk-token-meter/package.json +57 -0
  706. package/node_modules/@xrkseek/xrk-tools/lib/index.js +1 -1
  707. package/node_modules/@xrkseek/xrk-tools/lib/invariant.js +1 -1
  708. package/node_modules/@xrkseek/xrk-tools/src/presentation.ts +39 -39
  709. package/node_modules/@xrkseek/xrk-typert-protocol/lib/index.js +1 -1
  710. package/node_modules/@xrkseek/xrk-typert-protocol/lib/invariant.js +1 -0
  711. package/node_modules/@xrkseek/xrk-workflow/README.md +73 -73
  712. package/node_modules/@xrkseek/xrk-workflow/README.zh.md +72 -72
  713. package/node_modules/@xrkseek/xrk-workflow/lib/types/index.js +118 -118
  714. package/package.json +7 -1
  715. package/node_modules/@xrkseek/llm/dist/reasoning-effort.d.ts +0 -14
  716. package/node_modules/@xrkseek/llm/dist/reasoning-effort.d.ts.map +0 -1
  717. package/node_modules/@xrkseek/llm/dist/reasoning-effort.js +0 -21
  718. package/node_modules/@xrkseek/llm/dist/reasoning-effort.js.map +0 -1
  719. package/node_modules/@xrkseek/server-face/dist/index.d.mts +0 -3734
  720. package/node_modules/@xrkseek/server-face/dist/index.d.mts.map +0 -1
  721. package/node_modules/@xrkseek/server-face/dist/index.mjs +0 -22085
  722. package/node_modules/@xrkseek/server-face/dist/index.mjs.map +0 -1
  723. package/node_modules/@xrkseek/server-face/dist/model-reasoning.d.ts +0 -51
  724. package/node_modules/@xrkseek/server-face/dist/model-reasoning.d.ts.map +0 -1
  725. package/node_modules/@xrkseek/server-face/dist/model-reasoning.js +0 -104
  726. package/node_modules/@xrkseek/server-face/dist/model-reasoning.js.map +0 -1
  727. package/node_modules/@xrkseek/server-host/dist/sidebar-pty-agent.d.ts +0 -2
  728. package/node_modules/@xrkseek/server-host/dist/sidebar-pty-agent.d.ts.map +0 -1
  729. package/node_modules/@xrkseek/server-host/dist/sidebar-pty-agent.js +0 -98
  730. package/node_modules/@xrkseek/server-host/dist/sidebar-pty-agent.js.map +0 -1
  731. package/node_modules/@xrkseek/server-host/dist/sidebar-pty-worker.d.ts +0 -18
  732. package/node_modules/@xrkseek/server-host/dist/sidebar-pty-worker.d.ts.map +0 -1
  733. package/node_modules/@xrkseek/server-host/dist/sidebar-pty-worker.js +0 -141
  734. package/node_modules/@xrkseek/server-host/dist/sidebar-pty-worker.js.map +0 -1
  735. package/node_modules/@xrkseek/server-host/dist/win-fd-inherit.d.ts +0 -30
  736. package/node_modules/@xrkseek/server-host/dist/win-fd-inherit.d.ts.map +0 -1
  737. package/node_modules/@xrkseek/server-host/dist/win-fd-inherit.js +0 -96
  738. package/node_modules/@xrkseek/server-host/dist/win-fd-inherit.js.map +0 -1
@@ -1,13 +1,12 @@
1
- import { assertSessionEvent } from "@xrkseek/protocol";
2
1
  export { SessionBusyError, createTurnLatch, createSessionDrainLatch, } from "./latch.js";
3
2
  export { createSessionDrainHub } from "./drain-hub.js";
4
3
  export { NoPendingAdmitError, AdmitNotPendingError, admitPrompt, withdrawAdmit, listPendingAdmits, listSessionsWithPendingAdmits, newSession, promoteNextAdmit, promoteAdmitsForTurn, promotePendingSteers, } from "./admit.js";
5
4
  export { SessionSafetyLimitError, checkRepeatedToolCall, createLoopDetectionTracker, createMistakeTracker, createSessionSafety, DEFAULT_LOOP_CONFIG, DEFAULT_MAX_CONSECUTIVE_MISTAKES, emptyLoopState, hardLoopNotice, mistakeLimitNotice, softLoopNotice, toolCallSignature, } from "./safety/index.js";
6
- export { COMPACTION_SUMMARY_TEMPLATE, COMPACT_RECENT_MAX_TOKENS, DEFAULT_COMPACTION_BUFFER_TOKENS, DEFAULT_COMPACTION_HEAD_TOKENS, DEFAULT_COMPACTION_KEEP_TOKENS, DEFAULT_SOFT_BUDGET_COMPACT_ATTEMPTS, DEFAULT_SOFT_BUDGET_PEEL_ATTEMPTS, SOFT_BUDGET_COMPACT_TRIGGER_RATIO, buildCompactionPrompt, deriveMessagesUnwindowed, estimateMessagesTokens, estimateRequestTokens, estimateTokens, findLatestCompaction, formatCompactionForModel, prepareCompactionPayload, resolveSoftBudgetCeiling, resolveSoftBudgetTokens, parseCompactionStrategy, resolveCompactionStrategy, COMPACTION_STRATEGIES, selectHeadRecent, } from "./compaction.js";
5
+ export { COMPACTION_SUMMARY_TEMPLATE, AUTO_COMPACT_MIN_CONTEXT_WINDOW, AUTO_COMPACT_WINDOW_RATIO, COMPACT_RECENT_MAX_TOKENS, DEFAULT_COMPACTION_BUFFER_TOKENS, DEFAULT_COMPACTION_HEAD_TOKENS, DEFAULT_COMPACTION_KEEP_TOKENS, DEFAULT_SOFT_BUDGET_COMPACT_ATTEMPTS, DEFAULT_SOFT_BUDGET_PEEL_ATTEMPTS, SOFT_BUDGET_COMPACT_TRIGGER_RATIO, buildCompactionPrompt, deriveAutoCompactMaxTokens, deriveMessagesUnwindowed, estimateMessagesTokens, estimateRequestTokens, estimateTokens, findLatestCompaction, formatCompactionForModel, prepareCompactionPayload, resolveSoftBudgetCeiling, resolveSoftBudgetTriggerTokens, resolveSoftBudgetTokens, parseCompactionStrategy, resolveCompactionStrategy, COMPACTION_STRATEGIES, selectHeadRecent, } from "./compaction.js";
7
6
  export { DEFAULT_MAX_REQUEST_IMAGE_BYTES, describeShadowedImages, ensureDurableImageOffloads, foldImageOffloadMarks, messageHasImageBlocks, MAX_DESCRIBED_SHADOWED_IMAGES, planImageOffloadTargets, projectOffloadedImages, } from "./image-offload.js";
8
7
  import { deriveMessagesUnwindowed, findLatestCompaction, formatCompactionForModel, } from "./compaction.js";
9
8
  import { describeShadowedImages } from "./image-offload.js";
10
- export { estimateAssistantSurface, estimateMessageContent, estimateSystemTokens, estimateToolsTokens, priceRouteImageTokens, } from "./surface-estimate.js";
9
+ export { estimateAssistantSurface, estimateMessageContent, estimateSystemTokens, estimateText, estimateTextForSoftBudget, estimateToolsTokens, priceRouteImageTokens, } from "./surface-estimate.js";
11
10
  export { foldSurfaceTokens, priceCurrentSurfaceWindow, projectedInputPressureTokens, } from "./surface-fold.js";
12
11
  export { TOOL_NOT_STARTED, TOOL_NOT_STARTED_MESSAGE, TOOL_OUTCOME_UNKNOWN, TOOL_OUTCOME_UNKNOWN_MESSAGE, TOOL_ABORTED_BEFORE_DISPATCH, TOOL_ABORTED_BEFORE_DISPATCH_MESSAGE, TOOL_ABORTED, TOOL_ABORTED_MESSAGE, ToolSettlementError, ToolAdjacencyError, assertToolCallsSettled, assertAssistantToolCallAdjacency, abortedBeforeDispatchSettlement, danglingSettlement, listDanglingToolCalls, settleDanglingTools, } from "./dangling.js";
13
12
  export { TOOL_RESULT_PRUNE_HEAD_CHARS, TOOL_RESULT_PRUNE_META_PREV_TOKENS, TOOL_RESULT_PRUNE_TAIL_CHARS, TOOL_RESULT_PRUNE_THRESHOLD_CHARS, pruneOversizedToolResults, pruneToolResultText, } from "./tool-result-prune.js";
@@ -17,7 +16,7 @@ export { SessionLogOffset, SessionSeq, SessionSeqCursor, eventAt, eventCount, la
17
16
  export { computeListHints, sessionHintsBlank, sessionListHints } from "./list-hints.js";
18
17
  import { SessionLogOffset, readSessionEvents, sessionEventCount, snapshotEvents, } from "./seq.js";
19
18
  import { computeListHints } from "./list-hints.js";
20
- import { deepFreeze, newSessionId } from "./freeze.js";
19
+ import { freezeSessionEvent, newSessionId } from "./freeze.js";
21
20
  export function createMemorySessionStore() {
22
21
  const sessions = new Map();
23
22
  return {
@@ -47,8 +46,7 @@ export function createMemorySessionStore() {
47
46
  if (!events) {
48
47
  throw new Error(`session not found: ${id}`);
49
48
  }
50
- const parsed = assertSessionEvent(event);
51
- const frozen = deepFreeze(structuredClone(parsed));
49
+ const frozen = freezeSessionEvent(event);
52
50
  events.push(frozen);
53
51
  return frozen;
54
52
  },
@@ -58,7 +56,7 @@ export function createMemorySessionStore() {
58
56
  }
59
57
  const frozen = [];
60
58
  for (const event of events) {
61
- frozen.push(deepFreeze(structuredClone(assertSessionEvent(event))));
59
+ frozen.push(freezeSessionEvent(event));
62
60
  }
63
61
  sessions.set(id, frozen);
64
62
  return { id, events: frozen };
@@ -69,7 +67,7 @@ export function createMemorySessionStore() {
69
67
  }
70
68
  const frozen = [];
71
69
  for (const event of events) {
72
- frozen.push(deepFreeze(structuredClone(assertSessionEvent(event))));
70
+ frozen.push(freezeSessionEvent(event));
73
71
  }
74
72
  sessions.set(id, frozen);
75
73
  return { id, events: frozen };
@@ -192,22 +190,65 @@ export function assertModelVisible(events, requestMessages) {
192
190
  }
193
191
  export { fromJSONL, parseJSONL, toJSONL } from "./jsonl.js";
194
192
  export { exportSessionInterchange, importSessionInterchange, readSessionInterchange, SESSION_INTERCHANGE_VERSION, } from "./session-interchange.js";
195
- export { createPersistentSessionStore, ftsMatchQuery, isLikelyRemoteSessionsPath, resolveSqliteJournalMode, SESSION_ARCHIVE_DB_FILENAME, SESSION_DB_FILENAME, SESSION_SCHEMA_VERSION, SessionsDirInUseError, SESSIONS_WRITE_LOCK_FILENAME, } from "./sqlite-store.js";
193
+ export { createPersistentSessionStore, ftsMatchQuery, planFtsQuery, SessionLogUnreadableError, isLikelyRemoteSessionsPath, resolveSqliteJournalMode, SESSION_ARCHIVE_DB_FILENAME, SESSION_DB_FILENAME, SESSION_SCHEMA_VERSION, SessionsDirInUseError, SESSIONS_WRITE_LOCK_FILENAME, } from "./sqlite-store.js";
196
194
  export { expandPackedStorageRecords, fromPackedJSONL, fromPackedJSONLZstd, isPackedChunkRow, isTextChunkRow, isToolCallChunkRow, packChunkRunsForExport, parsePackedJSONL, toPackedJSONL, zstdCompressUtf8, zstdDecompressUtf8, } from "./chunk-pack.js";
197
- export { listOpenTurnIds, repairOpenTurnEvents, sessionHasOpenTurn, } from "./repair-open-turn.js";
195
+ import { closeOpenTurns, FORKED_TURN_END, listOpenTurnIds, repairOpenTurnEvents, sessionHasOpenTurn, } from "./repair-open-turn.js";
196
+ export { closeOpenTurns, FORKED_TURN_END, listOpenTurnIds, repairOpenTurnEvents, sessionHasOpenTurn, };
198
197
  export { extractEventSearchText, extractSessionSearchTexts } from "./search-text.js";
199
198
  export { writeTextFileAtomicSync } from "./atomic-write.js";
199
+ /**
200
+ * Durability checkpoint for one session (or every session when `sessionId`
201
+ * is omitted). No-op on stores without {@link SessionStore.flush}.
202
+ */
203
+ export function flushSession(store, sessionId) {
204
+ store.flush?.(sessionId);
205
+ }
206
+ /**
207
+ * Release a cold-observed session from the resident LRU when it has no open
208
+ * turn. No-op / false on memory stores or pinned open turns.
209
+ */
210
+ export function releaseSessionResident(store, sessionId) {
211
+ return store.releaseResident?.(sessionId) ?? false;
212
+ }
213
+ /**
214
+ * Build a fork child seed: parent prefix + forked closers for any open turn +
215
+ * durable `session/end-seed` inheritance marker (DSH).
216
+ */
217
+ export function buildForkSeed(prefix, now = Date.now) {
218
+ const closers = closeOpenTurns(prefix, FORKED_TURN_END, now);
219
+ const seed = [...prefix, ...closers];
220
+ seed.push({
221
+ type: "session/end-seed",
222
+ ts: now(),
223
+ inherited: true,
224
+ });
225
+ return seed;
226
+ }
200
227
  export function forkSession(store, sourceId, boundaryIndex, childId) {
201
228
  const total = sessionEventCount(store, sourceId);
202
229
  const end = SessionLogOffset(boundaryIndex === undefined ? total : Math.max(0, Math.min(boundaryIndex, total)));
203
230
  const prefix = readSessionEvents(store, sourceId, SessionLogOffset(0), end);
204
- // Bulk seed: one durable commit (SQLite) and no per-event Face mux when the
205
- // store implements seed. Fallback keeps lightweight test doubles working.
231
+ const closers = closeOpenTurns(prefix, FORKED_TURN_END);
232
+ const suffix = [
233
+ ...closers,
234
+ {
235
+ type: "session/end-seed",
236
+ ts: Date.now(),
237
+ inherited: true,
238
+ },
239
+ ];
240
+ // Prefer SQL prefix copy (R6) when the durable store can; else one-shot seed.
241
+ if (typeof store.seedFromSession === "function") {
242
+ const hit = store.seedFromSession(sourceId, end, childId, suffix);
243
+ if (hit)
244
+ return hit;
245
+ }
246
+ const seed = [...prefix, ...suffix];
206
247
  if (typeof store.seed === "function") {
207
- return store.seed(childId, prefix);
248
+ return store.seed(childId, seed);
208
249
  }
209
250
  const child = store.create(childId);
210
- for (const ev of prefix) {
251
+ for (const ev of seed) {
211
252
  store.append(child.id, ev);
212
253
  }
213
254
  return store.get(child.id);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAEvD,OAAO,EACL,gBAAgB,EAChB,eAAe,EACf,uBAAuB,GAKxB,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,qBAAqB,EAAwB,MAAM,gBAAgB,CAAC;AAE7E,OAAO,EACL,mBAAmB,EACnB,oBAAoB,EACpB,WAAW,EACX,aAAa,EACb,iBAAiB,EACjB,6BAA6B,EAC7B,UAAU,EACV,gBAAgB,EAChB,oBAAoB,EACpB,oBAAoB,GAIrB,MAAM,YAAY,CAAC;AAEpB,OAAO,EACL,uBAAuB,EACvB,qBAAqB,EACrB,0BAA0B,EAC1B,oBAAoB,EACpB,mBAAmB,EACnB,mBAAmB,EACnB,gCAAgC,EAChC,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CAAC;QACxB,OAAO,KAAK,CAAC,IAAI,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;IACvC,CAAC;IACD,MAAM,IAAI,KAAK,CAAC,8CAA8C,CAAC,CAAC;AAClE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"list-hints.d.ts","sourceRoot":"","sources":["../src/list-hints.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,KAAK,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAGjE,wDAAwD;AACxD,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,SAAS,YAAY,EAAE,GAC9B,gBAAgB,CAgBlB;AAED,4EAA4E;AAC5E,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,gBAAgB,GAAG,OAAO,CAElE;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,IAAI,CAAC,YAAY,EAAE,YAAY,CAAC,GAAG,IAAI,CAAC,YAAY,EAAE,WAAW,CAAC,EACzE,SAAS,EAAE,MAAM,GAChB,gBAAgB,CAKlB"}
1
+ {"version":3,"file":"list-hints.d.ts","sourceRoot":"","sources":["../src/list-hints.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,KAAK,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAGjE,wDAAwD;AACxD,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,SAAS,YAAY,EAAE,GAC9B,gBAAgB,CA0BlB;AAED,4EAA4E;AAC5E,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,gBAAgB,GAAG,OAAO,CAElE;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,IAAI,CAAC,YAAY,EAAE,YAAY,CAAC,GAAG,IAAI,CAAC,YAAY,EAAE,WAAW,CAAC,EACzE,SAAS,EAAE,MAAM,GAChB,gBAAgB,CAKlB"}
@@ -2,20 +2,30 @@ import { readSessionEvents } from "./seq.js";
2
2
  /** Fold list metadata from an in-memory event array. */
3
3
  export function computeListHints(events) {
4
4
  if (events.length === 0) {
5
- return { lastEventTs: null, hasTurnStart: false, hasCommandRun: false };
5
+ return {
6
+ lastEventTs: null,
7
+ eventCount: 0,
8
+ hasTurnStart: false,
9
+ hasCommandRun: false,
10
+ };
6
11
  }
12
+ // Match durable hint columns: `last_ts = MAX(ts)` (not “last row’s ts”).
13
+ // Title / end-seed often use `Date.now()` while replayed prefix keeps small
14
+ // synthetic clocks — last-row would disagree with the cold DB path.
15
+ let lastEventTs = events[0].ts;
7
16
  let hasTurnStart = false;
8
17
  let hasCommandRun = false;
9
18
  for (const event of events) {
19
+ if (event.ts > lastEventTs)
20
+ lastEventTs = event.ts;
10
21
  if (event.type === "turn/start")
11
22
  hasTurnStart = true;
12
23
  else if (event.type === "command/run")
13
24
  hasCommandRun = true;
14
- if (hasTurnStart && hasCommandRun)
15
- break;
16
25
  }
17
26
  return {
18
- lastEventTs: events[events.length - 1]?.ts ?? null,
27
+ lastEventTs,
28
+ eventCount: events.length,
19
29
  hasTurnStart,
20
30
  hasCommandRun,
21
31
  };
@@ -1 +1 @@
1
- {"version":3,"file":"list-hints.js","sourceRoot":"","sources":["../src/list-hints.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAE7C,wDAAwD;AACxD,MAAM,UAAU,gBAAgB,CAC9B,MAA+B;IAE/B,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACxB,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,YAAY,EAAE,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE,CAAC;IAC1E,CAAC;IACD,IAAI,YAAY,GAAG,KAAK,CAAC;IACzB,IAAI,aAAa,GAAG,KAAK,CAAC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E,IAAI,WAAW,GAAG,MAAM,CAAC,CAAC,CAAE,CAAC,EAAE,CAAC;IAChC,IAAI,YAAY,GAAG,KAAK,CAAC;IACzB,IAAI,aAAa,GAAG,KAAK,CAAC;IAC1B,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;QAC3B,IAAI,KAAK,CAAC,EAAE,GAAG,WAAW;YAAE,WAAW,GAAG,KAAK,CAAC,EAAE,CAAC;QACnD,IAAI,KAAK,CAAC,IAAI,KAAK,YAAY;YAAE,YAAY,GAAG,IAAI,CAAC;aAChD,IAAI,KAAK,CAAC,IAAI,KAAK,aAAa;YAAE,aAAa,GAAG,IAAI,CAAC;IAC9D,CAAC;IACD,OAAO;QACL,WAAW;QACX,UAAU,EAAE,MAAM,CAAC,MAAM;QACzB,YAAY;QACZ,aAAa;KACd,CAAC;AACJ,CAAC;AAED,4EAA4E;AAC5E,MAAM,UAAU,iBAAiB,CAAC,KAAuB;IACvD,OAAO,CAAC,KAAK,CAAC,YAAY,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC;AACrD,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,gBAAgB,CAC9B,KAAyE,EACzE,SAAiB;IAEjB,IAAI,OAAO,KAAK,CAAC,SAAS,KAAK,UAAU,EAAE,CAAC;QAC1C,OAAO,KAAK,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;IACpC,CAAC;IACD,OAAO,gBAAgB,CAAC,iBAAiB,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC;AAC/D,CAAC"}
@@ -1,4 +1,4 @@
1
- import type { SessionEvent } from "@xrkseek/protocol";
1
+ import type { SessionEvent, TurnEndReason } from "@xrkseek/protocol";
2
2
  /**
3
3
  * Every `turn/start` without a matching `turn/end`, in start order.
4
4
  * Unlike a "latest only" cursor, this keeps earlier orphans visible after a
@@ -14,4 +14,11 @@ export declare function sessionHasOpenTurn(events: readonly SessionEvent[]): boo
14
14
  * `reason: { kind: "interrupted" }` (newest open turn first).
15
15
  */
16
16
  export declare function repairOpenTurnEvents(events: readonly SessionEvent[], now?: () => number): SessionEvent[];
17
+ /**
18
+ * Close every open turn in `events` with the given reason (newest first).
19
+ * Used by crash repair (`interrupted`) and fork seed (`forked`).
20
+ */
21
+ export declare function closeOpenTurns(events: readonly SessionEvent[], reason: TurnEndReason, now?: () => number): SessionEvent[];
22
+ /** Reason used when a fork seeds a prefix that still had an open turn. */
23
+ export declare const FORKED_TURN_END: TurnEndReason;
17
24
  //# sourceMappingURL=repair-open-turn.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"repair-open-turn.d.ts","sourceRoot":"","sources":["../src/repair-open-turn.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAuEtD;;;;GAIG;AACH,wBAAgB,eAAe,CAC7B,MAAM,EAAE,SAAS,YAAY,EAAE,GAC9B,SAAS,MAAM,EAAE,CAYnB;AAED,0EAA0E;AAC1E,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,SAAS,YAAY,EAAE,GAAG,OAAO,CAE3E;AA8ID;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,SAAS,YAAY,EAAE,EAC/B,GAAG,GAAE,MAAM,MAAiB,GAC3B,YAAY,EAAE,CAchB"}
1
+ {"version":3,"file":"repair-open-turn.d.ts","sourceRoot":"","sources":["../src/repair-open-turn.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AA0ErE;;;;GAIG;AACH,wBAAgB,eAAe,CAC7B,MAAM,EAAE,SAAS,YAAY,EAAE,GAC9B,SAAS,MAAM,EAAE,CAYnB;AAED,0EAA0E;AAC1E,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,SAAS,YAAY,EAAE,GAAG,OAAO,CAE3E;AA+ID;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,SAAS,YAAY,EAAE,EAC/B,GAAG,GAAE,MAAM,MAAiB,GAC3B,YAAY,EAAE,CAEhB;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAC5B,MAAM,EAAE,SAAS,YAAY,EAAE,EAC/B,MAAM,EAAE,aAAa,EACrB,GAAG,GAAE,MAAM,MAAiB,GAC3B,YAAY,EAAE,CAahB;AAED,0EAA0E;AAC1E,eAAO,MAAM,eAAe,EAAE,aAAsB,CAAC"}
@@ -1,4 +1,6 @@
1
1
  import { danglingSettlement, listDanglingToolCalls, } from "./dangling.js";
2
+ const INTERRUPTED = { kind: "interrupted" };
3
+ const FORKED = { kind: "forked" };
2
4
  /** Latest attempt only — skip chunks before the last in-step `llm/retry`. */
3
5
  function foldStepStreamChunks(events, turnId, stepId) {
4
6
  let attemptStart = 0;
@@ -108,7 +110,7 @@ function stepHasEnd(events, turnId, stepId) {
108
110
  function turnHasEnd(events, turnId) {
109
111
  return events.some((e) => e.type === "turn/end" && e.turnId === turnId);
110
112
  }
111
- function closeOneOpenTurn(events, turnId, openTurnIds, out, ts) {
113
+ function closeOneOpenTurn(events, turnId, openTurnIds, out, ts, reason) {
112
114
  // `out` grows while this pass runs; rebuilding `[...events, ...out]` on every
113
115
  // probe copied the whole log dozens of times (O(n²) on a crashed 6k log).
114
116
  // Cache the join and only rebuild when `out` actually grew.
@@ -183,7 +185,7 @@ function closeOneOpenTurn(events, turnId, openTurnIds, out, ts) {
183
185
  type: "turn/end",
184
186
  ts: ts(),
185
187
  turnId,
186
- reason: { kind: "interrupted" },
188
+ reason,
187
189
  });
188
190
  }
189
191
  }
@@ -194,16 +196,24 @@ function closeOneOpenTurn(events, turnId, openTurnIds, out, ts) {
194
196
  * `reason: { kind: "interrupted" }` (newest open turn first).
195
197
  */
196
198
  export function repairOpenTurnEvents(events, now = Date.now) {
199
+ return closeOpenTurns(events, INTERRUPTED, now);
200
+ }
201
+ /**
202
+ * Close every open turn in `events` with the given reason (newest first).
203
+ * Used by crash repair (`interrupted`) and fork seed (`forked`).
204
+ */
205
+ export function closeOpenTurns(events, reason, now = Date.now) {
197
206
  const openIds = listOpenTurnIds(events);
198
207
  if (openIds.length === 0)
199
208
  return [];
200
209
  const openSet = new Set(openIds);
201
210
  const out = [];
202
211
  const ts = () => now();
203
- // Newest first: close the abandoned in-flight turn before older orphans.
204
212
  for (const turnId of [...openIds].reverse()) {
205
- closeOneOpenTurn(events, turnId, openSet, out, ts);
213
+ closeOneOpenTurn(events, turnId, openSet, out, ts, reason);
206
214
  }
207
215
  return out;
208
216
  }
217
+ /** Reason used when a fork seeds a prefix that still had an open turn. */
218
+ export const FORKED_TURN_END = FORKED;
209
219
  //# sourceMappingURL=repair-open-turn.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"repair-open-turn.js","sourceRoot":"","sources":["../src/repair-open-turn.ts"],"names":[],"mappings":"AACA,OAAO,EACL,kBAAkB,EAClB,qBAAqB,GACtB,MAAM,eAAe,CAAC;AAEvB,6EAA6E;AAC7E,SAAS,oBAAoB,CAC3B,MAA+B,EAC/B,MAAc,EACd,MAAc;IAMd,IAAI,YAAY,GAAG,CAAC,CAAC;IACrB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC;QAC1C,MAAM,QAAQ,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;QAC3B,IACE,QAAQ,EAAE,IAAI,KAAK,WAAW;YAC9B,QAAQ,CAAC,MAAM,KAAK,MAAM;YAC1B,QAAQ,CAAC,MAAM,KAAK,MAAM,EAC1B,CAAC;YACD,YAAY,GAAG,CAAC,GAAG,CAAC,CAAC;QACvB,CAAC;IACH,CAAC;IACD,IAAI,OAAO,GAAG,EAAE,CAAC;IACjB,IAAI,SAAS,GAAG,EAAE,CAAC;IACnB,MAAM,OAAO,GAAG,IAAI,GAAG,EAGpB,CAAC;IACJ,KAAK,IAAI,CAAC,GAAG,YAAY,EAAE,CAAC,GAAG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EAAE,EAAE,MAAM,CAAC,CAAC;IAC7D,CAAC;IAED,OAAO,GAAG,CAAC;AACb,CAAC;AAED,0EAA0E;AAC1E,MAAM,CAAC,MAAM,eAAe,GAAkB,MAAM,CAAC"}
@@ -27,6 +27,21 @@ export interface PersistentSessionStore extends SessionStore {
27
27
  * Face writes list-tier checkpoints here, then clears projection cells.
28
28
  */
29
29
  bindSessionEviction(handler: (sessionId: string) => void): void;
30
+ /**
31
+ * Drop one idle session from the resident set (cold history / search).
32
+ * Flushes pending writes and notifies {@link bindSessionEviction} first.
33
+ * Refuses (returns false) while a turn is still open.
34
+ */
35
+ releaseResident(sessionId: string): boolean;
36
+ /**
37
+ * Background microtask flush failures (DSH-style loud drain pause).
38
+ * Cleared after a successful explicit {@link flush}.
39
+ */
40
+ flushFailureReport(): {
41
+ readonly failures: number;
42
+ readonly paused: boolean;
43
+ readonly lastError?: string;
44
+ };
30
45
  /**
31
46
  * VACUUM when freelist is meaningful after deletes or archive offload.
32
47
  */
@@ -72,6 +87,46 @@ export interface PersistentSessionStoreOptions {
72
87
  }
73
88
  /** Escape a user query for FTS5 MATCH (trigram substring). */
74
89
  export declare function ftsMatchQuery(query: string): string;
90
+ /**
91
+ * How one user query should reach `search_fts`.
92
+ *
93
+ * The `trigram` tokenizer only indexes runs of three or more code points, so
94
+ * a shorter needle can never match — SQLite's rule is "substrings consisting
95
+ * of fewer than 3 unicode characters do not match any rows when used with a
96
+ * full-text query". Chinese two-character words ("部署", "修复", "测试") and
97
+ * short acronyms ("AI", "PR") are exactly that shape, and MATCHing them
98
+ * returned nothing while thousands of matching rows sat in the index. Short
99
+ * needles therefore take the LIKE scan (`text` is UNINDEXED, so this is a
100
+ * plain column scan bounded by the DISTINCT id projection).
101
+ */
102
+ export type FtsQueryPlan = {
103
+ readonly kind: "match";
104
+ readonly value: string;
105
+ } | {
106
+ readonly kind: "like";
107
+ readonly value: string;
108
+ } | null;
109
+ export declare function planFtsQuery(query: string): FtsQueryPlan;
110
+ /**
111
+ * A stored row this build cannot read: corrupt JSON, an unknown event type, or
112
+ * a row written by a newer format.
113
+ *
114
+ * Loading stops here instead of returning the rows that happened to work,
115
+ * because `ensureLoaded` feeds whatever it gets straight into crash repair: a
116
+ * silently truncated view makes the store append a synthetic `turn/end` into
117
+ * the real log, which pushes every surviving event behind a turn boundary that
118
+ * never existed. Refusing to load is the only failure that leaves the log
119
+ * intact, so the caller can tell the user to upgrade instead.
120
+ */
121
+ export declare class SessionLogUnreadableError extends Error {
122
+ readonly sessionId: string;
123
+ /** Position of the first unreadable row. */
124
+ readonly seq: number;
125
+ readonly reason: string;
126
+ constructor(sessionId: string,
127
+ /** Position of the first unreadable row. */
128
+ seq: number, reason: string);
129
+ }
75
130
  /**
76
131
  * Durable SessionStore: hot `sessions.db` + cold `sessions-archive.db` (WAL).
77
132
  * Lazy session load; batched chunk writes packed as `text-chunks` (≥3);
@@ -1 +1 @@
1
- {"version":3,"file":"sqlite-store.d.ts","sourceRoot":"","sources":["../src/sqlite-store.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAkBtD,OAAO,KAAK,EAAmC,YAAY,EAAE,MAAM,YAAY,CAAC;AAWhF,OAAO,EACL,sBAAsB,EACtB,qBAAqB,EACrB,4BAA4B,EAC5B,KAAK,eAAe,GACrB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,0BAA0B,EAC1B,wBAAwB,EACxB,KAAK,iBAAiB,GACvB,MAAM,qBAAqB,CAAC;AAS7B,MAAM,WAAW,sBAAuB,SAAQ,YAAY;IAC1D;;;OAGG;IACH,KAAK,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,kFAAkF;IAClF,KAAK,IAAI,IAAI,CAAC;IACd;;;OAGG;IACH,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,MAAM,EAAE,CAAC;IACnD;;;;OAIG;IACH,SAAS,CAAC,EAAE,EAAE,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