@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,11 +1,48 @@
1
1
  import { createHash } from "node:crypto";
2
- import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
2
+ import { existsSync, mkdirSync, readFileSync, statSync, writeFileSync, } from "node:fs";
3
3
  import path from "node:path";
4
4
  import { resolveXrkHome } from "@xrkseek/xrk-home-paths";
5
5
  import { readJsonFile, writeJsonFileAtomic } from "./json-file.js";
6
6
  import { WorkspaceCheckpointError, } from "./types.js";
7
7
  const INDEX_VERSION = 1;
8
8
  const ID_LENGTH = 12;
9
+ /**
10
+ * Serializes work on one shadow repo **inside this process**.
11
+ *
12
+ * Every write command (`init` / `add` / `commit`) takes the shadow repo's
13
+ * `index.lock`; two overlapping snapshots in the same Host (Host drain
14
+ * `beforeTools`, a manual `session.checkpoint.snapshot`, two sessions sharing
15
+ * one cwd) used to race for it and lose one point to
16
+ * `fatal: Unable to create '…/index.lock': File exists`. The store is cached
17
+ * per workspace, but nothing stopped concurrent method calls on it.
18
+ */
19
+ const shadowGates = new Map();
20
+ async function withShadowGate(key, run) {
21
+ const prev = shadowGates.get(key) ?? Promise.resolve();
22
+ let release;
23
+ const gate = new Promise((resolve) => {
24
+ release = resolve;
25
+ });
26
+ const tail = prev.then(() => gate);
27
+ shadowGates.set(key, tail);
28
+ await prev.catch(() => undefined);
29
+ try {
30
+ return await run();
31
+ }
32
+ finally {
33
+ release();
34
+ if (shadowGates.get(key) === tail)
35
+ shadowGates.delete(key);
36
+ }
37
+ }
38
+ /** `git` uses this phrasing when another process holds the lock file. */
39
+ const LOCK_CONTENTION = /(Unable to create '[^']*\.lock'|Unable to create [^\s]*\.lock|cannot lock ref|index\.lock)/iu;
40
+ function sleep(ms) {
41
+ return new Promise((resolve) => {
42
+ const timer = setTimeout(resolve, ms);
43
+ timer.unref?.();
44
+ });
45
+ }
9
46
  /**
10
47
  * Hard deadline for a single snapshot git command. A hung git process (a
11
48
  * shadow-repo auto-repack holding object locks, antivirus scan, network fs
@@ -117,6 +154,10 @@ export class WorkspaceCheckpointStore {
117
154
  /** Work-tree-relative shadow path, when the shadow lives in the workspace. */
118
155
  shadowRelPath;
119
156
  records;
157
+ /** Ids this instance intentionally dropped (`prune`), so a merge cannot resurrect them. */
158
+ tombstones = new Set();
159
+ /** `mtimeMs:size` of the index file when {@link records} was last synced. */
160
+ indexSignature;
120
161
  repoReady = false;
121
162
  constructor(options) {
122
163
  const workspace = path.resolve(options.workspaceDir);
@@ -137,12 +178,19 @@ export class WorkspaceCheckpointStore {
137
178
  this.timeoutMs = options.timeoutMs ?? readTimeoutMs();
138
179
  this.now = options.now ?? (() => Date.now());
139
180
  this.records = this.loadIndex();
181
+ this.indexSignature = this.indexStat();
140
182
  }
141
183
  /**
142
184
  * Git-level argv shared by every command.
143
185
  *
144
186
  * - `core.excludesFile` keeps the shadow dir out of staging and `clean`.
145
187
  * - `core.autocrlf=false` stops a Windows checkout rewriting line endings.
188
+ * - `core.quotepath=false` keeps non-ASCII paths literal. `clean -nd` /
189
+ * `ls-files` feed `extra` / `removed` straight into the UI; the default
190
+ * C-style escaping (`"\344\270\255\346\226\207"`) is unreadable and can
191
+ * never match a real path.
192
+ * - `core.longpaths=true` lets Windows restore files below a deep
193
+ * `node_modules`/monorepo path instead of failing at MAX_PATH.
146
194
  * - A synthetic commit identity + `commit.gpgsign=false` make shadow commits
147
195
  * independent of the operator's git config, so snapshotting works on a
148
196
  * machine with no `user.name` / `user.email` and never tries to sign.
@@ -167,6 +215,10 @@ export class WorkspaceCheckpointStore {
167
215
  "-c",
168
216
  "core.filemode=false",
169
217
  "-c",
218
+ "core.quotepath=false",
219
+ "-c",
220
+ "core.longpaths=true",
221
+ "-c",
170
222
  "commit.gpgsign=false",
171
223
  "-c",
172
224
  `user.name=${CHECKPOINT_AUTHOR_NAME}`,
@@ -177,18 +229,30 @@ export class WorkspaceCheckpointStore {
177
229
  async exec(args, budgetMs = this.timeoutMs) {
178
230
  return this.runGit([...this.baseArgs, ...args], { timeoutMs: budgetMs });
179
231
  }
180
- async execOk(args, errorCode, what, budgetMs = this.timeoutMs) {
181
- const result = await this.exec(args, budgetMs);
182
- if (result.timedOut) {
183
- throw new WorkspaceCheckpointError("timed-out", `git ${what} exceeded its ${budgetMs}ms budget; snapshot skipped (workspace unchanged)`);
184
- }
185
- if (result.code === -1) {
186
- throw new WorkspaceCheckpointError("git-unavailable", `git ${what} could not start: ${result.stderr.trim() || "git was not found on PATH"}`);
187
- }
188
- if (result.code !== 0) {
189
- throw new WorkspaceCheckpointError(errorCode, `git ${what} failed (exit ${result.code}): ${result.stderr.trim() || result.stdout.trim()}`);
232
+ async execOk(args, errorCode, what, budgetMs = this.timeoutMs, retries = 0) {
233
+ let last;
234
+ for (let attempt = 0; attempt <= retries; attempt += 1) {
235
+ const result = await this.exec(args, budgetMs);
236
+ if (result.timedOut) {
237
+ throw new WorkspaceCheckpointError("timed-out", `git ${what} exceeded its ${budgetMs}ms budget; snapshot skipped (workspace unchanged)`);
238
+ }
239
+ if (result.code === -1) {
240
+ throw new WorkspaceCheckpointError("git-unavailable", `git ${what} could not start: ${result.stderr.trim() || "git was not found on PATH"}`);
241
+ }
242
+ if (result.code === 0)
243
+ return result;
244
+ last = result;
245
+ // Another process (a second Host on the same XRK home, or a leftover
246
+ // `git gc`) held the lock. One short retry wins the common case without
247
+ // waiting on a long repack; the budget is the same either way.
248
+ const text = `${result.stderr}\n${result.stdout}`;
249
+ if (attempt < retries && LOCK_CONTENTION.test(text)) {
250
+ await sleep(150 + attempt * 100);
251
+ continue;
252
+ }
253
+ break;
190
254
  }
191
- return result;
255
+ throw new WorkspaceCheckpointError(errorCode, `git ${what} failed (exit ${last?.code ?? -1}): ${last?.stderr.trim() || last?.stdout.trim() || "no output"}`);
192
256
  }
193
257
  /**
194
258
  * (Re)write the git-level ignore file. Idempotent and cheap: patterns are
@@ -254,42 +318,49 @@ export class WorkspaceCheckpointStore {
254
318
  if (!Number.isFinite(input.seq)) {
255
319
  throw new WorkspaceCheckpointError("bad-argument", "snapshot: seq must be a finite number");
256
320
  }
257
- // Whole-operation budget: each git command gets the remaining time, so a
258
- // slow start cannot leak into an unbounded tail (5 commands × full
259
- // per-command timeout would otherwise stall the turn queue for minutes).
260
- const deadline = this.now() + this.timeoutMs;
261
- const remaining = () => Math.max(1, deadline - this.now());
262
- await this.ensureRepo(remaining());
263
- await this.execOk(["add", "-A"], "snapshot-failed", "add -A", remaining());
264
- const label = input.label?.trim();
265
- const message = [
266
- `xrk checkpoint session=${sessionId} seq=${input.seq}`,
267
- ...(label ? [`label=${label}`] : []),
268
- ].join(" ");
269
- await this.execOk(["commit", "--quiet", "--allow-empty", "-m", message], "snapshot-failed", "commit", remaining());
270
- const rev = await this.execOk(["rev-parse", "HEAD"], "snapshot-failed", "rev-parse HEAD", remaining());
271
- const id = rev.stdout.trim();
272
- if (!id) {
273
- throw new WorkspaceCheckpointError("snapshot-failed", "git rev-parse HEAD returned no commit id");
274
- }
275
- const files = await this.execOk(["ls-files"], "snapshot-failed", "ls-files", remaining());
276
- const record = {
277
- id,
278
- sessionId,
279
- seq: input.seq,
280
- createdAt: this.now(),
281
- ...(label ? { label } : {}),
282
- fileCount: splitLines(files.stdout).length,
283
- };
284
- this.records.push(record);
285
- this.saveIndex();
286
- return record;
321
+ return withShadowGate(this.shadowDir, async () => {
322
+ // Pick up points another Host process recorded, so this write merges
323
+ // instead of overwriting them.
324
+ this.refreshIndex();
325
+ // Whole-operation budget: each git command gets the remaining time, so a
326
+ // slow start cannot leak into an unbounded tail (5 commands × full
327
+ // per-command timeout would otherwise stall the turn queue for minutes).
328
+ const deadline = this.now() + this.timeoutMs;
329
+ const remaining = () => Math.max(1, deadline - this.now());
330
+ await this.ensureRepo(remaining());
331
+ await this.execOk(["add", "-A"], "snapshot-failed", "add -A", remaining(), 1);
332
+ const label = input.label?.trim();
333
+ const message = [
334
+ `xrk checkpoint session=${sessionId} seq=${input.seq}`,
335
+ ...(label ? [`label=${label}`] : []),
336
+ ].join(" ");
337
+ await this.execOk(["commit", "--quiet", "--allow-empty", "-m", message], "snapshot-failed", "commit", remaining(), 1);
338
+ const rev = await this.execOk(["rev-parse", "HEAD"], "snapshot-failed", "rev-parse HEAD", remaining());
339
+ const id = rev.stdout.trim();
340
+ if (!id) {
341
+ throw new WorkspaceCheckpointError("snapshot-failed", "git rev-parse HEAD returned no commit id");
342
+ }
343
+ const files = await this.execOk(["ls-files"], "snapshot-failed", "ls-files", remaining());
344
+ const record = {
345
+ id,
346
+ sessionId,
347
+ seq: input.seq,
348
+ createdAt: this.now(),
349
+ ...(label ? { label } : {}),
350
+ fileCount: splitLines(files.stdout).length,
351
+ };
352
+ this.records.push(record);
353
+ this.saveIndex();
354
+ return record;
355
+ });
287
356
  }
288
357
  /** Chronological (oldest first) records, newest last. */
289
358
  list() {
359
+ this.refreshIndex();
290
360
  return [...this.records];
291
361
  }
292
362
  get(id) {
363
+ this.refreshIndex();
293
364
  const needle = id.trim();
294
365
  const found = this.records.find((record) => record.id === needle);
295
366
  if (!found) {
@@ -304,9 +375,15 @@ export class WorkspaceCheckpointStore {
304
375
  }
305
376
  /** What a restore would restore and which files it would leave behind. */
306
377
  async planRestore(id) {
307
- this.get(id);
308
- await this.requireRepo();
309
- const target = id.trim();
378
+ return withShadowGate(this.shadowDir, async () => {
379
+ this.refreshIndex();
380
+ this.get(id);
381
+ await this.requireRepo();
382
+ return this.planRestoreLocked(id.trim());
383
+ });
384
+ }
385
+ /** {@link planRestore} body; the caller already holds the shadow gate. */
386
+ async planRestoreLocked(target) {
310
387
  const tree = await this.execOk(["ls-tree", "-r", "--name-only", target], "restore-failed", `ls-tree ${target}`);
311
388
  return {
312
389
  id: target,
@@ -319,21 +396,24 @@ export class WorkspaceCheckpointStore {
319
396
  * about survive unless `prune` is set.
320
397
  */
321
398
  async restore(id, options = {}) {
322
- this.get(id);
323
- await this.requireRepo();
324
- const target = id.trim();
325
- const plan = await this.planRestore(target);
326
- await this.execOk(["checkout", "--force", target, "--", "."], "restore-failed", `checkout ${target}`);
327
- let removed = [];
328
- if (options.prune) {
329
- const clean = await this.execOk(["clean", "-fd"], "restore-failed", "clean -fd");
330
- removed = parseCleanOutput(clean.stdout, "Removing ");
331
- }
332
- return {
333
- ...plan,
334
- restored: plan.fileCount,
335
- removed,
336
- };
399
+ return withShadowGate(this.shadowDir, async () => {
400
+ this.refreshIndex();
401
+ this.get(id);
402
+ await this.requireRepo();
403
+ const target = id.trim();
404
+ const plan = await this.planRestoreLocked(target);
405
+ await this.execOk(["checkout", "--force", target, "--", "."], "restore-failed", `checkout ${target}`, this.timeoutMs, 1);
406
+ let removed = [];
407
+ if (options.prune) {
408
+ const clean = await this.execOk(["clean", "-fd"], "restore-failed", "clean -fd");
409
+ removed = parseCleanOutput(clean.stdout, "Removing ");
410
+ }
411
+ return {
412
+ ...plan,
413
+ restored: plan.fileCount,
414
+ removed,
415
+ };
416
+ });
337
417
  }
338
418
  /**
339
419
  * Drop the oldest records, keeping the newest `keep`. Index-only: the
@@ -344,13 +424,55 @@ export class WorkspaceCheckpointStore {
344
424
  if (!Number.isInteger(keep) || keep < 0) {
345
425
  throw new WorkspaceCheckpointError("bad-argument", `prune: keep must be a non-negative integer (got ${String(keep)})`);
346
426
  }
427
+ this.refreshIndex();
347
428
  const drop = Math.max(0, this.records.length - keep);
348
429
  if (drop === 0)
349
430
  return [];
350
431
  const removed = this.records.splice(0, drop).map((record) => record.id);
432
+ for (const id of removed)
433
+ this.tombstones.add(id);
351
434
  this.saveIndex();
352
435
  return removed;
353
436
  }
437
+ /**
438
+ * Pack the shadow repo's loose objects when git decides it is worth it.
439
+ *
440
+ * {@link baseArgs} disables `maintenance.auto` so a background maintenance
441
+ * run can never fight a concurrent `add`/`commit` for the object and index
442
+ * locks. The side effect is that nothing ever packs what those commits
443
+ * produce: a live shadow repo reached 27,828 loose objects / 12.79 GiB with
444
+ * zero packs. An explicit `gc --auto` is the cheap half of that trade — git
445
+ * returns immediately while the loose count is under `gc.auto`, and when it
446
+ * does run it packs in one pass and only drops unreachable objects older than
447
+ * `gc.pruneExpire` (two weeks by default), so a recently dropped index record
448
+ * stays restorable by sha.
449
+ *
450
+ * Call this from an idle moment (startup), never per commit: packing is I/O
451
+ * heavy and the caller must not be holding a snapshot lock.
452
+ * @param budgetMs - hard git budget; a timeout leaves the repo untouched.
453
+ * @returns true when the loose-object count actually went down.
454
+ */
455
+ async reclaim(budgetMs = 10 * 60_000) {
456
+ // Packing while a snapshot holds the repo is the very lock fight
457
+ // `maintenance.auto=false` exists to avoid. Skip this idle moment and let
458
+ // the next startup try again instead of queueing behind (or blocking) a
459
+ // turn's snapshot.
460
+ if (shadowGates.has(this.shadowDir))
461
+ return false;
462
+ const before = await this.looseObjectCount();
463
+ const result = await this.exec(["gc", "--auto", "--quiet"], budgetMs);
464
+ if (result.timedOut || result.code !== 0)
465
+ return false;
466
+ return (await this.looseObjectCount()) < before;
467
+ }
468
+ /** Loose object count from `git count-objects -v` (0 when git cannot answer). */
469
+ async looseObjectCount() {
470
+ const result = await this.exec(["count-objects", "-v"], 30_000);
471
+ if (result.code !== 0)
472
+ return 0;
473
+ const match = /^count:\s*(\d+)$/m.exec(result.stdout);
474
+ return match === null ? 0 : Number(match[1]);
475
+ }
354
476
  loadIndex() {
355
477
  const raw = readJsonFile(this.indexFile);
356
478
  const records = raw?.records;
@@ -358,11 +480,50 @@ export class WorkspaceCheckpointStore {
358
480
  return [];
359
481
  return records.filter(isCheckpointRecord);
360
482
  }
483
+ /** Cheap change detector for the shared index file (`mtime:size`). */
484
+ indexStat() {
485
+ try {
486
+ const s = statSync(this.indexFile);
487
+ return `${s.mtimeMs}:${s.size}`;
488
+ }
489
+ catch {
490
+ return undefined;
491
+ }
492
+ }
493
+ /**
494
+ * Re-read `index.json` when another process changed it.
495
+ *
496
+ * The index is shared by every Host on the same XRK home (desktop app +
497
+ * `xrkh web` + a remote/HTTP Host). A store cached at session start used to
498
+ * keep its constructor-time snapshot forever, so a point recorded by the
499
+ * other process was invisible: `/rollback seq:N` answered "Unknown
500
+ * checkpoint" for a snapshot that exists on disk.
501
+ */
502
+ refreshIndex() {
503
+ const signature = this.indexStat();
504
+ if (signature === undefined)
505
+ return;
506
+ if (signature === this.indexSignature)
507
+ return;
508
+ this.records = this.loadIndex();
509
+ this.indexSignature = signature;
510
+ }
361
511
  saveIndex() {
512
+ // Merge rows the other process wrote since our last read: a blind
513
+ // whole-file write drops every point recorded elsewhere. Tombstones keep
514
+ // an intentional `prune` from being resurrected by this merge.
515
+ const known = new Set(this.records.map((record) => record.id));
516
+ for (const row of this.loadIndex()) {
517
+ if (known.has(row.id) || this.tombstones.has(row.id))
518
+ continue;
519
+ this.records.push(row);
520
+ known.add(row.id);
521
+ }
362
522
  writeJsonFileAtomic(this.indexFile, {
363
523
  version: INDEX_VERSION,
364
524
  records: this.records,
365
525
  });
526
+ this.indexSignature = this.indexStat();
366
527
  }
367
528
  }
368
529
  //# sourceMappingURL=store.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"store.js","sourceRoot":"","sources":["../src/store.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC7E,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AACnE,OAAO,EACL,wBAAwB,GASzB,MAAM,YAAY,CAAC;AAEpB,MAAM,aAAa,GAAG,CAAC,CAAC;AACxB,MAAM,SAAS,GAAG,EAAE,CAAC;AAErB;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,MAAM,CAAC;AAE7C;;;GAGG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,gBAAgB,CAAC;AACvD,MAAM,CAAC,MAAM,uBAAuB,GAAG,wBAAwB,CAAC;AAEhE,yDAAyD;AACzD,MAAM,UAAU,qBAAqB,CAAC,YAAoB;IACxD,OAAO,UAAU,CAAC,MAAM,CAAC;SACtB,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;SAClC,MAAM,CAAC,KAAK,CAAC;SACb,KAAK,CAAC,CAAC,EAA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CAAC,EAAE,CAAC,CAAC,CAAC;QAC/D,KAAK,MAAM,GAAG,IAAI,IAAI,CAAC,SAAS,EAAE,EAAE,CAAC;YACnC,IAAI,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC;gBAAE,SAAS;YAC/D,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;YACvB,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QACpB,CAAC;QACD,mBAAmB,CAAC,IAAI,CAAC,SAAS,EAAE;YAClC,OAAO,EAAE,aAAa;YACtB,OAAO,EAAE,IAAI,CAAC,OAAO;SACG,CAAC,CAAC;QAC5B,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,SAAS,EAAE,CAAC;IACzC,CAAC;CACF"}
@@ -1,26 +1,26 @@
1
- {
2
- "name": "@xrkseek/checkpoint",
3
- "version": "0.1.0",
4
- "type": "module",
5
- "exports": {
6
- ".": {
7
- "types": "./dist/index.d.ts",
8
- "import": "./dist/index.js",
9
- "default": "./dist/index.js"
10
- }
11
- },
12
- "files": [
13
- "dist",
14
- "README.md"
15
- ],
16
- "license": "MIT",
17
- "repository": {
18
- "type": "git",
19
- "url": "git+https://github.com/xrkseek/XRK-harness.git",
20
- "directory": "packages/checkpoint"
21
- },
22
- "private": true,
23
- "dependencies": {
24
- "@xrkseek/xrk-home-paths": "workspace:*"
25
- }
26
- }
1
+ {
2
+ "name": "@xrkseek/checkpoint",
3
+ "version": "0.1.0",
4
+ "type": "module",
5
+ "exports": {
6
+ ".": {
7
+ "types": "./dist/index.d.ts",
8
+ "import": "./dist/index.js",
9
+ "default": "./dist/index.js"
10
+ }
11
+ },
12
+ "files": [
13
+ "dist",
14
+ "README.md"
15
+ ],
16
+ "license": "MIT",
17
+ "repository": {
18
+ "type": "git",
19
+ "url": "git+https://github.com/xrkseek/XRK-harness.git",
20
+ "directory": "packages/checkpoint"
21
+ },
22
+ "private": true,
23
+ "dependencies": {
24
+ "@xrkseek/xrk-home-paths": "workspace:*"
25
+ }
26
+ }
@@ -0,0 +1,152 @@
1
+ # @xrkseek/claude-code-mods
2
+
3
+ Run **Claude Code plugins (mods)** inside this harness: read
4
+ `.claude-plugin/plugin.json` + `hooks/hooks.json`, import the hook modules with
5
+ the native ESM loader, run their `register(on)` handlers as one middleware
6
+ chain, and serve the `$` API from our own tool pipeline and services.
7
+
8
+ A plugin author changes nothing — you ship the same directory that
9
+ `claude --plugin-dir` accepts.
10
+
11
+ ```
12
+ my-plugin/
13
+ .claude-plugin/plugin.json { "name": "my-plugin", "version": "0.1.0" }
14
+ hooks/hooks.json { "modules": ["./my-plugin.mjs"] }
15
+ hooks/my-plugin.mjs export function register(on) { … }
16
+ ```
17
+
18
+ ## Use
19
+
20
+ The shipped runtime (`core-agent` / `core-tools`, no Cordis container in the
21
+ request path) uses `createModsRuntime`:
22
+
23
+ ```ts
24
+ import { createModsRuntime } from "@xrkseek/claude-code-mods";
25
+
26
+ const mods = await createModsRuntime({
27
+ services: { fs, subprocess, commands, tools, workingDirectory, storageDomain },
28
+ pipeline, // the composition's ToolPipeline
29
+ agentOf: ({ call }) => agentForSession(call),
30
+ dirs: ["~/.xrk/plugins/claude-code/my-plugin"],
31
+ });
32
+
33
+ await mods.dispatch("prompt.submit", { text }, () => ({ text }), { agent, signal });
34
+ await mods.dispose();
35
+ ```
36
+
37
+ A Cordis composition (tests, or a host that already runs one) uses
38
+ `attachClaudeCodeMods`:
39
+
40
+ ```ts
41
+ import { attachClaudeCodeMods } from "@xrkseek/claude-code-mods";
42
+
43
+ const mods = await attachClaudeCodeMods({
44
+ ctx,
45
+ pipeline, // the composition's ToolPipeline
46
+ dirs: ["~/.xrk/plugins/claude-code/my-plugin"],
47
+ agentOf: ({ call }) => agentForSession(call),
48
+ });
49
+
50
+ // live now: a plugin observes, refuses, or rewrites every tool call
51
+ // other events are raised by the host on its own seam:
52
+ await mods.dispatch("prompt.submit", { text, messages }, () => ({ text }), {
53
+ agent,
54
+ signal,
55
+ });
56
+ ```
57
+
58
+ `definePluginDir(dir)` is usable on its own: it turns a plugin directory into an
59
+ ordinary Cordis plugin (`ctx.plugin(...)`) for hosts that do not want the tool
60
+ interceptor installed.
61
+
62
+ ## Product wiring
63
+
64
+ `presets/harness/mods.ts` is the only place that knows the tool pipeline, the
65
+ filesystem seam, and the session identity at once. `createHarnessComposition()`
66
+ uses it to:
67
+
68
+ 1. `await mods.attach(handle)` in `createAgent()` — raises `session.start`, then
69
+ hands back `mods.wrap(handle)`;
70
+ 2. wrap `continueTurn` / `run` — `prompt.submit` (a plugin may rewrite or drop
71
+ the turn), then `turn.start`, then `turn.complete` on both the answer and the
72
+ error path;
73
+ 3. `await mods.dispose()` first in `dispose()` — `session.end` runs while
74
+ `$.state` is still readable, and only then do the seams come down.
75
+
76
+ Plugins live at `~/.xrk/plugins/claude-code/<name>/.claude-plugin/plugin.json`
77
+ by default; `createHarnessComposition({ claudeCodePluginsRoot })` points
78
+ somewhere else. A missing directory means "no plugins installed" and costs the
79
+ composition nothing.
80
+
81
+ Inside a composition `$.fs`, `$.process`, `$.store` and `$.session` are the
82
+ product's own services (workspace-confined fs, the shell's own subprocess, a
83
+ `.state/` directory beside the plugins, the session cwd). Everything else fails
84
+ with the service name:
85
+
86
+ | Call | Result in the product |
87
+ | ------------------------------------- | -------------------------------------------------------------------------------------- |
88
+ | `$.tool.list` | the product registry's `name` / `description` (never `execute`) |
89
+ | `$.tool.register` | lands in the product registry as `mcp__<plugin>__<tool>`, dropped with the session |
90
+ | `$.tool.call` | runs the product `ToolPipeline` (policy, sandbox, other plugins' hooks), returns text |
91
+ | `$.command.register` / `run` / `list` | the composition's own table: listed in Face's `/` panel, a typed `/name` dispatches it |
92
+ | `$.ui.ask` | throws (no question surface yet) |
93
+
94
+ Plugin tools are named `mcp__<plugin>__<tool>` (Claude Code's namespace rule) and are
95
+ registered `direct`, so the model sees them immediately. Their `execute` is still a
96
+ placeholder that rejects: the result has to come from
97
+ `on('tool.call', { tool: 'mcp__<plugin>__<tool>' }, …)`. With no hook answering, the
98
+ model reads "no tool.call hook answered it" — a diagnosable failure, not an empty result.
99
+
100
+ The per-method wiring matrix (9 events × 36 `$` methods, including _why_ each gap is a
101
+ gap) lives in [`docs/claude-code-mods-wiring.md`](../../docs/claude-code-mods-wiring.md).
102
+ Change either side, update that table.
103
+
104
+ ## Events
105
+
106
+ | Event | Raised here by | A hook may |
107
+ | ------------------------------ | ---------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- |
108
+ | `tool.call` | **wired**: `ToolPipeline.onPre` / `onExecute` / `onPost` | observe, `{ deny }`, answer before dispatch with `{ result }` (body skipped), or replace after `next` |
109
+ | `session.start` | **wired**: harness composition, before `createAgent()` returns | observe; register commands and tools |
110
+ | `prompt.submit` | **wired**: harness composition, before `continueTurn` | rewrite `text`, `{ drop }`; `context` has no seam here and is reported then dropped |
111
+ | `turn.start` / `turn.complete` | **wired**: harness composition, around `continueTurn` | observe; `{ text }` for the host log |
112
+ | `command.run` | **wired**: `$.command.run`, and harness composition on a typed `/name` | answer `{ text }` or `{}` |
113
+ | `ui.render` | ✅ AbovePrompt band (`session/band` + `ModBandDock`) | return a `Box`/`Text`/`Button` tree, or `next` |
114
+ | `session.end` | **wired**: harness composition, first thing in `dispose()` | observe; `$.state` still readable |
115
+
116
+ Unwired events are not silently broken: they can be registered, never fire, and
117
+ are named in a load-time warning — the same deal Claude Code gives an event it
118
+ never raises.
119
+
120
+ Tool names translate both ways (`Bash` ↔ `bash`), for `e.tool` and for matchers.
121
+
122
+ ## `$` surface
123
+
124
+ `plugin`, `ui`, `command`, `tool`, `prompt`, `session`, `state`, `store`,
125
+ `clock`, `fs`, `process`, `http`, `env` — all implemented **by the bridge**. A
126
+ service the deployment did not compose fails the call with the package name;
127
+ anything outside the table rejects with `no implementation for <namespace>.<method>`.
128
+ Which method actually runs inside this product's composition is the matrix in
129
+ [`docs/claude-code-mods-wiring.md`](../../docs/claude-code-mods-wiring.md).
130
+ See `README.zh.md` for the per-method table and the security boundary
131
+ (plugins run with the host process's full privileges).
132
+
133
+ ## Differences from the upstream bridge
134
+
135
+ Ported from `@deepseek-ai/dsh-experimental-claude-code-mods` (v0.2.1-rc.3).
136
+ Chain, engine and `$` semantics match; the differences are the host seams and
137
+ four self-supplied dependencies (`storage-domain`, `working-directory`,
138
+ `deepFreeze`/`JsonValue`, `randomUUID`). `README.zh.md` carries the full table.
139
+
140
+ ## Tests
141
+
142
+ ```
143
+ npx vitest run packages/claude-code-mods/tests
144
+ ```
145
+
146
+ 63 tests, including real plugin directories driven through a real
147
+ `ToolPipeline`: refuse → tool error, pass → body runs, rewrite after `next`,
148
+ pipeline restored after `dispose`.
149
+
150
+ ## License
151
+
152
+ MIT