@xrkseek/harness 0.6.21 → 0.7.0-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (677) 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/store.d.ts +21 -0
  7. package/node_modules/@xrkseek/checkpoint/dist/store.d.ts.map +1 -1
  8. package/node_modules/@xrkseek/checkpoint/dist/store.js +33 -0
  9. package/node_modules/@xrkseek/checkpoint/dist/store.js.map +1 -1
  10. package/node_modules/@xrkseek/checkpoint/package.json +26 -26
  11. package/node_modules/@xrkseek/claude-code-mods/README.md +152 -0
  12. package/node_modules/@xrkseek/claude-code-mods/README.zh.md +172 -0
  13. package/node_modules/@xrkseek/claude-code-mods/dist/api.d.ts +36 -0
  14. package/node_modules/@xrkseek/claude-code-mods/dist/api.d.ts.map +1 -0
  15. package/node_modules/@xrkseek/claude-code-mods/dist/api.js +215 -0
  16. package/node_modules/@xrkseek/claude-code-mods/dist/api.js.map +1 -0
  17. package/node_modules/@xrkseek/claude-code-mods/dist/attach.d.ts +92 -0
  18. package/node_modules/@xrkseek/claude-code-mods/dist/attach.d.ts.map +1 -0
  19. package/node_modules/@xrkseek/claude-code-mods/dist/attach.js +106 -0
  20. package/node_modules/@xrkseek/claude-code-mods/dist/attach.js.map +1 -0
  21. package/node_modules/@xrkseek/claude-code-mods/dist/chain.d.ts +105 -0
  22. package/node_modules/@xrkseek/claude-code-mods/dist/chain.d.ts.map +1 -0
  23. package/node_modules/@xrkseek/claude-code-mods/dist/chain.js +324 -0
  24. package/node_modules/@xrkseek/claude-code-mods/dist/chain.js.map +1 -0
  25. package/node_modules/@xrkseek/claude-code-mods/dist/define-mod.d.ts +39 -0
  26. package/node_modules/@xrkseek/claude-code-mods/dist/define-mod.d.ts.map +1 -0
  27. package/node_modules/@xrkseek/claude-code-mods/dist/define-mod.js +39 -0
  28. package/node_modules/@xrkseek/claude-code-mods/dist/define-mod.js.map +1 -0
  29. package/node_modules/@xrkseek/claude-code-mods/dist/elements.d.ts +96 -0
  30. package/node_modules/@xrkseek/claude-code-mods/dist/elements.d.ts.map +1 -0
  31. package/node_modules/@xrkseek/claude-code-mods/dist/elements.js +171 -0
  32. package/node_modules/@xrkseek/claude-code-mods/dist/elements.js.map +1 -0
  33. package/node_modules/@xrkseek/claude-code-mods/dist/engine.d.ts +155 -0
  34. package/node_modules/@xrkseek/claude-code-mods/dist/engine.d.ts.map +1 -0
  35. package/node_modules/@xrkseek/claude-code-mods/dist/engine.js +356 -0
  36. package/node_modules/@xrkseek/claude-code-mods/dist/engine.js.map +1 -0
  37. package/node_modules/@xrkseek/claude-code-mods/dist/host-ops.d.ts +72 -0
  38. package/node_modules/@xrkseek/claude-code-mods/dist/host-ops.d.ts.map +1 -0
  39. package/node_modules/@xrkseek/claude-code-mods/dist/host-ops.js +603 -0
  40. package/node_modules/@xrkseek/claude-code-mods/dist/host-ops.js.map +1 -0
  41. package/node_modules/@xrkseek/claude-code-mods/dist/index.d.ts +112 -0
  42. package/node_modules/@xrkseek/claude-code-mods/dist/index.d.ts.map +1 -0
  43. package/node_modules/@xrkseek/claude-code-mods/dist/index.js +654 -0
  44. package/node_modules/@xrkseek/claude-code-mods/dist/index.js.map +1 -0
  45. package/node_modules/@xrkseek/claude-code-mods/dist/matcher.d.ts +45 -0
  46. package/node_modules/@xrkseek/claude-code-mods/dist/matcher.d.ts.map +1 -0
  47. package/node_modules/@xrkseek/claude-code-mods/dist/matcher.js +195 -0
  48. package/node_modules/@xrkseek/claude-code-mods/dist/matcher.js.map +1 -0
  49. package/node_modules/@xrkseek/claude-code-mods/dist/module.d.ts +74 -0
  50. package/node_modules/@xrkseek/claude-code-mods/dist/module.d.ts.map +1 -0
  51. package/node_modules/@xrkseek/claude-code-mods/dist/module.js +167 -0
  52. package/node_modules/@xrkseek/claude-code-mods/dist/module.js.map +1 -0
  53. package/node_modules/@xrkseek/claude-code-mods/dist/native-import.d.ts +31 -0
  54. package/node_modules/@xrkseek/claude-code-mods/dist/native-import.d.ts.map +1 -0
  55. package/node_modules/@xrkseek/claude-code-mods/dist/native-import.js +32 -0
  56. package/node_modules/@xrkseek/claude-code-mods/dist/native-import.js.map +1 -0
  57. package/node_modules/@xrkseek/claude-code-mods/dist/plugin-dir.d.ts +70 -0
  58. package/node_modules/@xrkseek/claude-code-mods/dist/plugin-dir.d.ts.map +1 -0
  59. package/node_modules/@xrkseek/claude-code-mods/dist/plugin-dir.js +167 -0
  60. package/node_modules/@xrkseek/claude-code-mods/dist/plugin-dir.js.map +1 -0
  61. package/node_modules/@xrkseek/claude-code-mods/dist/product-agent.d.ts +57 -0
  62. package/node_modules/@xrkseek/claude-code-mods/dist/product-agent.d.ts.map +1 -0
  63. package/node_modules/@xrkseek/claude-code-mods/dist/product-agent.js +85 -0
  64. package/node_modules/@xrkseek/claude-code-mods/dist/product-agent.js.map +1 -0
  65. package/node_modules/@xrkseek/claude-code-mods/dist/runtime.d.ts +117 -0
  66. package/node_modules/@xrkseek/claude-code-mods/dist/runtime.d.ts.map +1 -0
  67. package/node_modules/@xrkseek/claude-code-mods/dist/runtime.js +252 -0
  68. package/node_modules/@xrkseek/claude-code-mods/dist/runtime.js.map +1 -0
  69. package/node_modules/@xrkseek/claude-code-mods/dist/storage-domain.d.ts +68 -0
  70. package/node_modules/@xrkseek/claude-code-mods/dist/storage-domain.d.ts.map +1 -0
  71. package/node_modules/@xrkseek/claude-code-mods/dist/storage-domain.js +104 -0
  72. package/node_modules/@xrkseek/claude-code-mods/dist/storage-domain.js.map +1 -0
  73. package/node_modules/@xrkseek/claude-code-mods/dist/surfaces.d.ts +82 -0
  74. package/node_modules/@xrkseek/claude-code-mods/dist/surfaces.d.ts.map +1 -0
  75. package/node_modules/@xrkseek/claude-code-mods/dist/surfaces.js +243 -0
  76. package/node_modules/@xrkseek/claude-code-mods/dist/surfaces.js.map +1 -0
  77. package/node_modules/@xrkseek/claude-code-mods/dist/testing.d.ts +157 -0
  78. package/node_modules/@xrkseek/claude-code-mods/dist/testing.d.ts.map +1 -0
  79. package/node_modules/@xrkseek/claude-code-mods/dist/testing.js +266 -0
  80. package/node_modules/@xrkseek/claude-code-mods/dist/testing.js.map +1 -0
  81. package/node_modules/@xrkseek/claude-code-mods/dist/tool-names.d.ts +21 -0
  82. package/node_modules/@xrkseek/claude-code-mods/dist/tool-names.d.ts.map +1 -0
  83. package/node_modules/@xrkseek/claude-code-mods/dist/tool-names.js +37 -0
  84. package/node_modules/@xrkseek/claude-code-mods/dist/tool-names.js.map +1 -0
  85. package/node_modules/@xrkseek/claude-code-mods/dist/types.d.ts +592 -0
  86. package/node_modules/@xrkseek/claude-code-mods/dist/types.d.ts.map +1 -0
  87. package/node_modules/@xrkseek/claude-code-mods/dist/types.js +10 -0
  88. package/node_modules/@xrkseek/claude-code-mods/dist/types.js.map +1 -0
  89. package/node_modules/@xrkseek/claude-code-mods/dist/values.d.ts +58 -0
  90. package/node_modules/@xrkseek/claude-code-mods/dist/values.d.ts.map +1 -0
  91. package/node_modules/@xrkseek/claude-code-mods/dist/values.js +75 -0
  92. package/node_modules/@xrkseek/claude-code-mods/dist/values.js.map +1 -0
  93. package/node_modules/@xrkseek/claude-code-mods/dist/working-directory.d.ts +45 -0
  94. package/node_modules/@xrkseek/claude-code-mods/dist/working-directory.d.ts.map +1 -0
  95. package/node_modules/@xrkseek/claude-code-mods/dist/working-directory.js +29 -0
  96. package/node_modules/@xrkseek/claude-code-mods/dist/working-directory.js.map +1 -0
  97. package/node_modules/@xrkseek/claude-code-mods/package.json +47 -0
  98. package/node_modules/@xrkseek/code-runtime/README.md +20 -20
  99. package/node_modules/@xrkseek/core-agent/dist/index.d.ts +87 -0
  100. package/node_modules/@xrkseek/core-agent/dist/index.d.ts.map +1 -1
  101. package/node_modules/@xrkseek/core-agent/dist/index.js.map +1 -1
  102. package/node_modules/@xrkseek/core-agent-loop/dist/index.d.ts.map +1 -1
  103. package/node_modules/@xrkseek/core-agent-loop/dist/index.js +9 -1
  104. package/node_modules/@xrkseek/core-agent-loop/dist/index.js.map +1 -1
  105. package/node_modules/@xrkseek/core-agent-loop/package.json +42 -42
  106. package/node_modules/@xrkseek/core-session/README.md +35 -35
  107. package/node_modules/@xrkseek/core-session/dist/compaction.d.ts.map +1 -1
  108. package/node_modules/@xrkseek/core-session/dist/compaction.js +62 -37
  109. package/node_modules/@xrkseek/core-session/dist/compaction.js.map +1 -1
  110. package/node_modules/@xrkseek/core-session/dist/freeze.d.ts +6 -0
  111. package/node_modules/@xrkseek/core-session/dist/freeze.d.ts.map +1 -1
  112. package/node_modules/@xrkseek/core-session/dist/freeze.js +9 -0
  113. package/node_modules/@xrkseek/core-session/dist/freeze.js.map +1 -1
  114. package/node_modules/@xrkseek/core-session/dist/index.d.ts +18 -2
  115. package/node_modules/@xrkseek/core-session/dist/index.d.ts.map +1 -1
  116. package/node_modules/@xrkseek/core-session/dist/index.js +53 -12
  117. package/node_modules/@xrkseek/core-session/dist/index.js.map +1 -1
  118. package/node_modules/@xrkseek/core-session/dist/list-hints.d.ts.map +1 -1
  119. package/node_modules/@xrkseek/core-session/dist/list-hints.js +14 -4
  120. package/node_modules/@xrkseek/core-session/dist/list-hints.js.map +1 -1
  121. package/node_modules/@xrkseek/core-session/dist/repair-open-turn.d.ts +8 -1
  122. package/node_modules/@xrkseek/core-session/dist/repair-open-turn.d.ts.map +1 -1
  123. package/node_modules/@xrkseek/core-session/dist/repair-open-turn.js +14 -4
  124. package/node_modules/@xrkseek/core-session/dist/repair-open-turn.js.map +1 -1
  125. package/node_modules/@xrkseek/core-session/dist/sqlite-store.d.ts +55 -0
  126. package/node_modules/@xrkseek/core-session/dist/sqlite-store.d.ts.map +1 -1
  127. package/node_modules/@xrkseek/core-session/dist/sqlite-store.js +670 -92
  128. package/node_modules/@xrkseek/core-session/dist/sqlite-store.js.map +1 -1
  129. package/node_modules/@xrkseek/core-session/dist/store.d.ts +38 -0
  130. package/node_modules/@xrkseek/core-session/dist/store.d.ts.map +1 -1
  131. package/node_modules/@xrkseek/core-session/package.json +34 -34
  132. package/node_modules/@xrkseek/core-system-prompt/README.md +14 -14
  133. package/node_modules/@xrkseek/core-tools/dist/session-query-prompt.d.ts.map +1 -1
  134. package/node_modules/@xrkseek/core-tools/dist/session-query-prompt.js +3 -2
  135. package/node_modules/@xrkseek/core-tools/dist/session-query-prompt.js.map +1 -1
  136. package/node_modules/@xrkseek/core-tools/dist/std-tools.d.ts.map +1 -1
  137. package/node_modules/@xrkseek/core-tools/dist/std-tools.js +1 -13
  138. package/node_modules/@xrkseek/core-tools/dist/std-tools.js.map +1 -1
  139. package/node_modules/@xrkseek/exec-computer-use/README.md +14 -14
  140. package/node_modules/@xrkseek/exec-computer-use/dist/windows-uia.js +402 -402
  141. package/node_modules/@xrkseek/exec-computer-use/package.json +26 -26
  142. package/node_modules/@xrkseek/exec-fs/README.md +12 -12
  143. package/node_modules/@xrkseek/exec-fs/dist/read-image.js +4 -4
  144. package/node_modules/@xrkseek/exec-image-gen/README.md +13 -13
  145. package/node_modules/@xrkseek/exec-image-gen/package.json +28 -28
  146. package/node_modules/@xrkseek/exec-memory/README.md +14 -14
  147. package/node_modules/@xrkseek/exec-memory/dist/live-fragment.d.ts +11 -0
  148. package/node_modules/@xrkseek/exec-memory/dist/live-fragment.d.ts.map +1 -0
  149. package/node_modules/@xrkseek/exec-memory/dist/live-fragment.js +40 -0
  150. package/node_modules/@xrkseek/exec-memory/dist/live-fragment.js.map +1 -0
  151. package/node_modules/@xrkseek/exec-memory/package.json +28 -28
  152. package/node_modules/@xrkseek/exec-sandbox/README.md +15 -15
  153. package/node_modules/@xrkseek/exec-ssh/README.md +19 -19
  154. package/node_modules/@xrkseek/exec-subprocess/README.md +10 -10
  155. package/node_modules/@xrkseek/exec-video-analyze/README.md +11 -11
  156. package/node_modules/@xrkseek/exec-video-analyze/package.json +26 -26
  157. package/node_modules/@xrkseek/exec-video-gen/README.md +26 -26
  158. package/node_modules/@xrkseek/exec-voice/README.md +25 -25
  159. package/node_modules/@xrkseek/exec-web/README.md +11 -11
  160. package/node_modules/@xrkseek/llm-deepseek/README.md +22 -22
  161. package/node_modules/@xrkseek/llm-deepseek/package.json +30 -30
  162. package/node_modules/@xrkseek/llm-registry/dist/index.d.ts +2 -2
  163. package/node_modules/@xrkseek/llm-registry/dist/index.d.ts.map +1 -1
  164. package/node_modules/@xrkseek/llm-registry/dist/index.js +1 -1
  165. package/node_modules/@xrkseek/llm-registry/dist/index.js.map +1 -1
  166. package/node_modules/@xrkseek/llm-registry/dist/types.d.ts +29 -0
  167. package/node_modules/@xrkseek/llm-registry/dist/types.d.ts.map +1 -1
  168. package/node_modules/@xrkseek/llm-registry/dist/types.js +21 -0
  169. package/node_modules/@xrkseek/llm-registry/dist/types.js.map +1 -1
  170. package/node_modules/@xrkseek/mcp/README.md +78 -78
  171. package/node_modules/@xrkseek/policy/README.md +18 -18
  172. package/node_modules/@xrkseek/policy/package.json +31 -31
  173. package/node_modules/@xrkseek/preset-harness/README.md +7 -7
  174. package/node_modules/@xrkseek/preset-harness/dist/mods.d.ts +68 -0
  175. package/node_modules/@xrkseek/preset-harness/dist/mods.d.ts.map +1 -0
  176. package/node_modules/@xrkseek/preset-harness/dist/mods.js +510 -0
  177. package/node_modules/@xrkseek/preset-harness/dist/mods.js.map +1 -0
  178. package/node_modules/@xrkseek/preset-harness/dist/preset.d.ts +12 -1
  179. package/node_modules/@xrkseek/preset-harness/dist/preset.d.ts.map +1 -1
  180. package/node_modules/@xrkseek/preset-harness/dist/preset.js +73 -26
  181. package/node_modules/@xrkseek/preset-harness/dist/preset.js.map +1 -1
  182. package/node_modules/@xrkseek/preset-harness/dist/tsconfig.tsbuildinfo +1 -1
  183. package/node_modules/@xrkseek/preset-harness/package.json +9 -8
  184. package/node_modules/@xrkseek/preset-minimal/README.md +6 -6
  185. package/node_modules/@xrkseek/preset-minimal/dist/preset.d.ts.map +1 -1
  186. package/node_modules/@xrkseek/preset-minimal/dist/preset.js +9 -3
  187. package/node_modules/@xrkseek/preset-minimal/dist/preset.js.map +1 -1
  188. package/node_modules/@xrkseek/preset-minimal/dist/tsconfig.tsbuildinfo +1 -1
  189. package/node_modules/@xrkseek/preset-server/README.md +4 -4
  190. package/node_modules/@xrkseek/preset-server/dist/preset.d.ts.map +1 -1
  191. package/node_modules/@xrkseek/preset-server/dist/preset.js +2 -1
  192. package/node_modules/@xrkseek/preset-server/dist/preset.js.map +1 -1
  193. package/node_modules/@xrkseek/preset-server/dist/tsconfig.tsbuildinfo +1 -1
  194. package/node_modules/@xrkseek/protocol/README.md +34 -34
  195. package/node_modules/@xrkseek/protocol/dist/index.d.ts +3 -2
  196. package/node_modules/@xrkseek/protocol/dist/index.d.ts.map +1 -1
  197. package/node_modules/@xrkseek/protocol/dist/index.js +1 -0
  198. package/node_modules/@xrkseek/protocol/dist/index.js.map +1 -1
  199. package/node_modules/@xrkseek/protocol/dist/json-schema.d.ts +12 -0
  200. package/node_modules/@xrkseek/protocol/dist/json-schema.d.ts.map +1 -1
  201. package/node_modules/@xrkseek/protocol/dist/json-schema.js +9 -0
  202. package/node_modules/@xrkseek/protocol/dist/json-schema.js.map +1 -1
  203. package/node_modules/@xrkseek/protocol/dist/json-value.d.ts +25 -0
  204. package/node_modules/@xrkseek/protocol/dist/json-value.d.ts.map +1 -0
  205. package/node_modules/@xrkseek/protocol/dist/json-value.js +181 -0
  206. package/node_modules/@xrkseek/protocol/dist/json-value.js.map +1 -0
  207. package/node_modules/@xrkseek/protocol/dist/session-events.d.ts +21 -1
  208. package/node_modules/@xrkseek/protocol/dist/session-events.d.ts.map +1 -1
  209. package/node_modules/@xrkseek/protocol/dist/session-events.js +1 -0
  210. package/node_modules/@xrkseek/protocol/dist/session-events.js.map +1 -1
  211. package/node_modules/@xrkseek/protocol/dist/validate.d.ts +4 -1
  212. package/node_modules/@xrkseek/protocol/dist/validate.d.ts.map +1 -1
  213. package/node_modules/@xrkseek/protocol/dist/validate.js +28 -2
  214. package/node_modules/@xrkseek/protocol/dist/validate.js.map +1 -1
  215. package/node_modules/@xrkseek/schemastery/lib/index.cjs +597 -597
  216. package/node_modules/@xrkseek/schemastery/lib/index.mjs +597 -597
  217. package/node_modules/@xrkseek/schemastery/lib/types/index.d.ts +203 -203
  218. package/node_modules/@xrkseek/schemastery/src/index.d.ts +203 -203
  219. package/node_modules/@xrkseek/schemastery/src/index.ts +906 -906
  220. package/node_modules/@xrkseek/server-config/package.json +28 -28
  221. package/node_modules/@xrkseek/server-cron/README.md +12 -12
  222. package/node_modules/@xrkseek/server-cron/package.json +26 -26
  223. package/node_modules/@xrkseek/server-face/dist/adapt/history-paginate.d.ts +22 -0
  224. package/node_modules/@xrkseek/server-face/dist/adapt/history-paginate.d.ts.map +1 -1
  225. package/node_modules/@xrkseek/server-face/dist/adapt/history-paginate.js +40 -3
  226. package/node_modules/@xrkseek/server-face/dist/adapt/history-paginate.js.map +1 -1
  227. package/node_modules/@xrkseek/server-face/dist/adapt/subagent-notice.d.ts.map +1 -1
  228. package/node_modules/@xrkseek/server-face/dist/adapt/subagent-notice.js +2 -0
  229. package/node_modules/@xrkseek/server-face/dist/adapt/subagent-notice.js.map +1 -1
  230. package/node_modules/@xrkseek/server-face/dist/adapt/wire-event.d.ts +1 -0
  231. package/node_modules/@xrkseek/server-face/dist/adapt/wire-event.d.ts.map +1 -1
  232. package/node_modules/@xrkseek/server-face/dist/adapt/wire-event.js +2 -0
  233. package/node_modules/@xrkseek/server-face/dist/adapt/wire-event.js.map +1 -1
  234. package/node_modules/@xrkseek/server-face/dist/adapt/wire-ids.d.ts +5 -0
  235. package/node_modules/@xrkseek/server-face/dist/adapt/wire-ids.d.ts.map +1 -1
  236. package/node_modules/@xrkseek/server-face/dist/adapt/wire-ids.js +7 -0
  237. package/node_modules/@xrkseek/server-face/dist/adapt/wire-ids.js.map +1 -1
  238. package/node_modules/@xrkseek/server-face/dist/agent-home-boundary.d.ts +31 -0
  239. package/node_modules/@xrkseek/server-face/dist/agent-home-boundary.d.ts.map +1 -0
  240. package/node_modules/@xrkseek/server-face/dist/agent-home-boundary.js +71 -0
  241. package/node_modules/@xrkseek/server-face/dist/agent-home-boundary.js.map +1 -0
  242. package/node_modules/@xrkseek/server-face/dist/agent-home.d.ts +18 -0
  243. package/node_modules/@xrkseek/server-face/dist/agent-home.d.ts.map +1 -0
  244. package/node_modules/@xrkseek/server-face/dist/agent-home.js +64 -0
  245. package/node_modules/@xrkseek/server-face/dist/agent-home.js.map +1 -0
  246. package/node_modules/@xrkseek/server-face/dist/agent-roster-store.d.ts +41 -2
  247. package/node_modules/@xrkseek/server-face/dist/agent-roster-store.d.ts.map +1 -1
  248. package/node_modules/@xrkseek/server-face/dist/agent-roster-store.js +200 -28
  249. package/node_modules/@xrkseek/server-face/dist/agent-roster-store.js.map +1 -1
  250. package/node_modules/@xrkseek/server-face/dist/agent-team-roles.js +1 -1
  251. package/node_modules/@xrkseek/server-face/dist/agent-team-roles.js.map +1 -1
  252. package/node_modules/@xrkseek/server-face/dist/attach-http.d.ts.map +1 -1
  253. package/node_modules/@xrkseek/server-face/dist/attach-http.js +9 -0
  254. package/node_modules/@xrkseek/server-face/dist/attach-http.js.map +1 -1
  255. package/node_modules/@xrkseek/server-face/dist/boss-status-broadcast.d.ts +55 -0
  256. package/node_modules/@xrkseek/server-face/dist/boss-status-broadcast.d.ts.map +1 -0
  257. package/node_modules/@xrkseek/server-face/dist/boss-status-broadcast.js +167 -0
  258. package/node_modules/@xrkseek/server-face/dist/boss-status-broadcast.js.map +1 -0
  259. package/node_modules/@xrkseek/server-face/dist/collab-board.d.ts +12 -0
  260. package/node_modules/@xrkseek/server-face/dist/collab-board.d.ts.map +1 -1
  261. package/node_modules/@xrkseek/server-face/dist/collab-board.js +101 -19
  262. package/node_modules/@xrkseek/server-face/dist/collab-board.js.map +1 -1
  263. package/node_modules/@xrkseek/server-face/dist/context.d.ts +25 -2
  264. package/node_modules/@xrkseek/server-face/dist/context.d.ts.map +1 -1
  265. package/node_modules/@xrkseek/server-face/dist/dispatch.d.ts.map +1 -1
  266. package/node_modules/@xrkseek/server-face/dist/dispatch.js +6 -2
  267. package/node_modules/@xrkseek/server-face/dist/dispatch.js.map +1 -1
  268. package/node_modules/@xrkseek/server-face/dist/face-schema.d.ts.map +1 -1
  269. package/node_modules/@xrkseek/server-face/dist/face-schema.js +2 -1
  270. package/node_modules/@xrkseek/server-face/dist/face-schema.js.map +1 -1
  271. package/node_modules/@xrkseek/server-face/dist/fork-cut.d.ts.map +1 -1
  272. package/node_modules/@xrkseek/server-face/dist/fork-cut.js +15 -3
  273. package/node_modules/@xrkseek/server-face/dist/fork-cut.js.map +1 -1
  274. package/node_modules/@xrkseek/server-face/dist/fork-lineage.d.ts +7 -0
  275. package/node_modules/@xrkseek/server-face/dist/fork-lineage.d.ts.map +1 -1
  276. package/node_modules/@xrkseek/server-face/dist/fork-lineage.js +23 -8
  277. package/node_modules/@xrkseek/server-face/dist/fork-lineage.js.map +1 -1
  278. package/node_modules/@xrkseek/server-face/dist/handlers/band.d.ts +7 -0
  279. package/node_modules/@xrkseek/server-face/dist/handlers/band.d.ts.map +1 -0
  280. package/node_modules/@xrkseek/server-face/dist/handlers/band.js +40 -0
  281. package/node_modules/@xrkseek/server-face/dist/handlers/band.js.map +1 -0
  282. package/node_modules/@xrkseek/server-face/dist/handlers/checkpoint.d.ts.map +1 -1
  283. package/node_modules/@xrkseek/server-face/dist/handlers/checkpoint.js +81 -3
  284. package/node_modules/@xrkseek/server-face/dist/handlers/checkpoint.js.map +1 -1
  285. package/node_modules/@xrkseek/server-face/dist/handlers/remotes.d.ts.map +1 -1
  286. package/node_modules/@xrkseek/server-face/dist/handlers/remotes.js +4 -1
  287. package/node_modules/@xrkseek/server-face/dist/handlers/remotes.js.map +1 -1
  288. package/node_modules/@xrkseek/server-face/dist/handlers/session.d.ts +2 -0
  289. package/node_modules/@xrkseek/server-face/dist/handlers/session.d.ts.map +1 -1
  290. package/node_modules/@xrkseek/server-face/dist/handlers/session.js +236 -62
  291. package/node_modules/@xrkseek/server-face/dist/handlers/session.js.map +1 -1
  292. package/node_modules/@xrkseek/server-face/dist/handlers/team.d.ts.map +1 -1
  293. package/node_modules/@xrkseek/server-face/dist/handlers/team.js +100 -9
  294. package/node_modules/@xrkseek/server-face/dist/handlers/team.js.map +1 -1
  295. package/node_modules/@xrkseek/server-face/dist/handlers/worktree.d.ts +8 -1
  296. package/node_modules/@xrkseek/server-face/dist/handlers/worktree.d.ts.map +1 -1
  297. package/node_modules/@xrkseek/server-face/dist/handlers/worktree.js +15 -1
  298. package/node_modules/@xrkseek/server-face/dist/handlers/worktree.js.map +1 -1
  299. package/node_modules/@xrkseek/server-face/dist/index.d.ts +5 -1
  300. package/node_modules/@xrkseek/server-face/dist/index.d.ts.map +1 -1
  301. package/node_modules/@xrkseek/server-face/dist/index.js +5 -1
  302. package/node_modules/@xrkseek/server-face/dist/index.js.map +1 -1
  303. package/node_modules/@xrkseek/server-face/dist/instruction-authority-fragment.d.ts +19 -0
  304. package/node_modules/@xrkseek/server-face/dist/instruction-authority-fragment.d.ts.map +1 -0
  305. package/node_modules/@xrkseek/server-face/dist/instruction-authority-fragment.js +28 -0
  306. package/node_modules/@xrkseek/server-face/dist/instruction-authority-fragment.js.map +1 -0
  307. package/node_modules/@xrkseek/server-face/dist/log-cut-reset.d.ts +3 -0
  308. package/node_modules/@xrkseek/server-face/dist/log-cut-reset.d.ts.map +1 -0
  309. package/node_modules/@xrkseek/server-face/dist/log-cut-reset.js +22 -0
  310. package/node_modules/@xrkseek/server-face/dist/log-cut-reset.js.map +1 -0
  311. package/node_modules/@xrkseek/server-face/dist/managed-worktree.d.ts +66 -4
  312. package/node_modules/@xrkseek/server-face/dist/managed-worktree.d.ts.map +1 -1
  313. package/node_modules/@xrkseek/server-face/dist/managed-worktree.js +147 -5
  314. package/node_modules/@xrkseek/server-face/dist/managed-worktree.js.map +1 -1
  315. package/node_modules/@xrkseek/server-face/dist/model-catalog.d.ts.map +1 -1
  316. package/node_modules/@xrkseek/server-face/dist/model-catalog.js +60 -5
  317. package/node_modules/@xrkseek/server-face/dist/model-catalog.js.map +1 -1
  318. package/node_modules/@xrkseek/server-face/dist/projections/index.d.ts +2 -2
  319. package/node_modules/@xrkseek/server-face/dist/projections/index.d.ts.map +1 -1
  320. package/node_modules/@xrkseek/server-face/dist/projections/index.js +2 -2
  321. package/node_modules/@xrkseek/server-face/dist/projections/index.js.map +1 -1
  322. package/node_modules/@xrkseek/server-face/dist/projections/list-checkpoint-cache.d.ts +50 -4
  323. package/node_modules/@xrkseek/server-face/dist/projections/list-checkpoint-cache.d.ts.map +1 -1
  324. package/node_modules/@xrkseek/server-face/dist/projections/list-checkpoint-cache.js +167 -19
  325. package/node_modules/@xrkseek/server-face/dist/projections/list-checkpoint-cache.js.map +1 -1
  326. package/node_modules/@xrkseek/server-face/dist/projections/snapshot-keys.d.ts +21 -1
  327. package/node_modules/@xrkseek/server-face/dist/projections/snapshot-keys.d.ts.map +1 -1
  328. package/node_modules/@xrkseek/server-face/dist/projections/snapshot-keys.js +21 -1
  329. package/node_modules/@xrkseek/server-face/dist/projections/snapshot-keys.js.map +1 -1
  330. package/node_modules/@xrkseek/server-face/dist/projections/units/context-timeline.d.ts.map +1 -1
  331. package/node_modules/@xrkseek/server-face/dist/projections/units/context-timeline.js +58 -0
  332. package/node_modules/@xrkseek/server-face/dist/projections/units/context-timeline.js.map +1 -1
  333. package/node_modules/@xrkseek/server-face/dist/projections/units/cost-usage.d.ts.map +1 -1
  334. package/node_modules/@xrkseek/server-face/dist/projections/units/cost-usage.js +85 -0
  335. package/node_modules/@xrkseek/server-face/dist/projections/units/cost-usage.js.map +1 -1
  336. package/node_modules/@xrkseek/server-face/dist/projections/units/session-list-metadata.d.ts.map +1 -1
  337. package/node_modules/@xrkseek/server-face/dist/projections/units/session-list-metadata.js +14 -0
  338. package/node_modules/@xrkseek/server-face/dist/projections/units/session-list-metadata.js.map +1 -1
  339. package/node_modules/@xrkseek/server-face/dist/projections/units/title.d.ts.map +1 -1
  340. package/node_modules/@xrkseek/server-face/dist/projections/units/title.js +14 -0
  341. package/node_modules/@xrkseek/server-face/dist/projections/units/title.js.map +1 -1
  342. package/node_modules/@xrkseek/server-face/dist/projections/units/turn-outline.d.ts.map +1 -1
  343. package/node_modules/@xrkseek/server-face/dist/projections/units/turn-outline.js +24 -0
  344. package/node_modules/@xrkseek/server-face/dist/projections/units/turn-outline.js.map +1 -1
  345. package/node_modules/@xrkseek/server-face/dist/runtime.d.ts +4 -2
  346. package/node_modules/@xrkseek/server-face/dist/runtime.d.ts.map +1 -1
  347. package/node_modules/@xrkseek/server-face/dist/runtime.js +127 -17
  348. package/node_modules/@xrkseek/server-face/dist/runtime.js.map +1 -1
  349. package/node_modules/@xrkseek/server-face/dist/seat-identity.d.ts +26 -0
  350. package/node_modules/@xrkseek/server-face/dist/seat-identity.d.ts.map +1 -0
  351. package/node_modules/@xrkseek/server-face/dist/seat-identity.js +137 -0
  352. package/node_modules/@xrkseek/server-face/dist/seat-identity.js.map +1 -0
  353. package/node_modules/@xrkseek/server-face/dist/seat-titles.d.ts +29 -0
  354. package/node_modules/@xrkseek/server-face/dist/seat-titles.d.ts.map +1 -0
  355. package/node_modules/@xrkseek/server-face/dist/seat-titles.js +74 -0
  356. package/node_modules/@xrkseek/server-face/dist/seat-titles.js.map +1 -0
  357. package/node_modules/@xrkseek/server-face/dist/session-capability.d.ts.map +1 -1
  358. package/node_modules/@xrkseek/server-face/dist/session-capability.js +9 -6
  359. package/node_modules/@xrkseek/server-face/dist/session-capability.js.map +1 -1
  360. package/node_modules/@xrkseek/server-face/dist/session-cwd.d.ts.map +1 -1
  361. package/node_modules/@xrkseek/server-face/dist/session-cwd.js +3 -1
  362. package/node_modules/@xrkseek/server-face/dist/session-cwd.js.map +1 -1
  363. package/node_modules/@xrkseek/server-face/dist/session-event-window.d.ts +37 -0
  364. package/node_modules/@xrkseek/server-face/dist/session-event-window.d.ts.map +1 -0
  365. package/node_modules/@xrkseek/server-face/dist/session-event-window.js +88 -0
  366. package/node_modules/@xrkseek/server-face/dist/session-event-window.js.map +1 -0
  367. package/node_modules/@xrkseek/server-face/dist/session-identity-store.d.ts +20 -0
  368. package/node_modules/@xrkseek/server-face/dist/session-identity-store.d.ts.map +1 -0
  369. package/node_modules/@xrkseek/server-face/dist/session-identity-store.js +82 -0
  370. package/node_modules/@xrkseek/server-face/dist/session-identity-store.js.map +1 -0
  371. package/node_modules/@xrkseek/server-face/dist/session-posture.d.ts +1 -1
  372. package/node_modules/@xrkseek/server-face/dist/session-posture.d.ts.map +1 -1
  373. package/node_modules/@xrkseek/server-face/dist/session-posture.js +20 -5
  374. package/node_modules/@xrkseek/server-face/dist/session-posture.js.map +1 -1
  375. package/node_modules/@xrkseek/server-face/dist/session-query-tools.d.ts +1 -0
  376. package/node_modules/@xrkseek/server-face/dist/session-query-tools.d.ts.map +1 -1
  377. package/node_modules/@xrkseek/server-face/dist/session-query-tools.js +172 -25
  378. package/node_modules/@xrkseek/server-face/dist/session-query-tools.js.map +1 -1
  379. package/node_modules/@xrkseek/server-face/dist/session-search.d.ts +20 -2
  380. package/node_modules/@xrkseek/server-face/dist/session-search.d.ts.map +1 -1
  381. package/node_modules/@xrkseek/server-face/dist/session-search.js +125 -19
  382. package/node_modules/@xrkseek/server-face/dist/session-search.js.map +1 -1
  383. package/node_modules/@xrkseek/server-face/dist/session-status.d.ts +1 -1
  384. package/node_modules/@xrkseek/server-face/dist/session-status.d.ts.map +1 -1
  385. package/node_modules/@xrkseek/server-face/dist/session-status.js +143 -21
  386. package/node_modules/@xrkseek/server-face/dist/session-status.js.map +1 -1
  387. package/node_modules/@xrkseek/server-face/dist/session-thread-tools.d.ts.map +1 -1
  388. package/node_modules/@xrkseek/server-face/dist/session-thread-tools.js +5 -0
  389. package/node_modules/@xrkseek/server-face/dist/session-thread-tools.js.map +1 -1
  390. package/node_modules/@xrkseek/server-face/dist/session-tool-copy.d.ts.map +1 -1
  391. package/node_modules/@xrkseek/server-face/dist/session-tool-copy.js +2 -1
  392. package/node_modules/@xrkseek/server-face/dist/session-tool-copy.js.map +1 -1
  393. package/node_modules/@xrkseek/server-face/dist/settings-credentials.d.ts.map +1 -1
  394. package/node_modules/@xrkseek/server-face/dist/settings-credentials.js +10 -2
  395. package/node_modules/@xrkseek/server-face/dist/settings-credentials.js.map +1 -1
  396. package/node_modules/@xrkseek/server-face/dist/settings-schemas.d.ts.map +1 -1
  397. package/node_modules/@xrkseek/server-face/dist/settings-schemas.js +48 -10
  398. package/node_modules/@xrkseek/server-face/dist/settings-schemas.js.map +1 -1
  399. package/node_modules/@xrkseek/server-face/dist/skill-documents.d.ts.map +1 -1
  400. package/node_modules/@xrkseek/server-face/dist/skill-documents.js +14 -4
  401. package/node_modules/@xrkseek/server-face/dist/skill-documents.js.map +1 -1
  402. package/node_modules/@xrkseek/server-face/dist/skill-list.d.ts +4 -2
  403. package/node_modules/@xrkseek/server-face/dist/skill-list.d.ts.map +1 -1
  404. package/node_modules/@xrkseek/server-face/dist/skill-list.js +10 -4
  405. package/node_modules/@xrkseek/server-face/dist/skill-list.js.map +1 -1
  406. package/node_modules/@xrkseek/server-face/dist/skill-read.d.ts.map +1 -1
  407. package/node_modules/@xrkseek/server-face/dist/skill-read.js +9 -2
  408. package/node_modules/@xrkseek/server-face/dist/skill-read.js.map +1 -1
  409. package/node_modules/@xrkseek/server-face/dist/skill-source.d.ts +2 -1
  410. package/node_modules/@xrkseek/server-face/dist/skill-source.d.ts.map +1 -1
  411. package/node_modules/@xrkseek/server-face/dist/skill-source.js +12 -2
  412. package/node_modules/@xrkseek/server-face/dist/skill-source.js.map +1 -1
  413. package/node_modules/@xrkseek/server-face/dist/slash.d.ts +10 -1
  414. package/node_modules/@xrkseek/server-face/dist/slash.d.ts.map +1 -1
  415. package/node_modules/@xrkseek/server-face/dist/slash.js +97 -22
  416. package/node_modules/@xrkseek/server-face/dist/slash.js.map +1 -1
  417. package/node_modules/@xrkseek/server-face/dist/status-snapshot-cache.d.ts.map +1 -1
  418. package/node_modules/@xrkseek/server-face/dist/status-snapshot-cache.js +53 -0
  419. package/node_modules/@xrkseek/server-face/dist/status-snapshot-cache.js.map +1 -1
  420. package/node_modules/@xrkseek/server-face/dist/subagent-tools.d.ts.map +1 -1
  421. package/node_modules/@xrkseek/server-face/dist/subagent-tools.js +10 -5
  422. package/node_modules/@xrkseek/server-face/dist/subagent-tools.js.map +1 -1
  423. package/node_modules/@xrkseek/server-face/dist/types.d.ts +23 -0
  424. package/node_modules/@xrkseek/server-face/dist/types.d.ts.map +1 -1
  425. package/node_modules/@xrkseek/server-face/dist/workspace-checkpoint.d.ts +6 -1
  426. package/node_modules/@xrkseek/server-face/dist/workspace-checkpoint.d.ts.map +1 -1
  427. package/node_modules/@xrkseek/server-face/dist/workspace-checkpoint.js +17 -1
  428. package/node_modules/@xrkseek/server-face/dist/workspace-checkpoint.js.map +1 -1
  429. package/node_modules/@xrkseek/server-face/dist/workspace-face.d.ts.map +1 -1
  430. package/node_modules/@xrkseek/server-face/dist/workspace-face.js +19 -14
  431. package/node_modules/@xrkseek/server-face/dist/workspace-face.js.map +1 -1
  432. package/node_modules/@xrkseek/server-face/dist/workspace-member-look.d.ts +22 -0
  433. package/node_modules/@xrkseek/server-face/dist/workspace-member-look.d.ts.map +1 -0
  434. package/node_modules/@xrkseek/server-face/dist/workspace-member-look.js +35 -0
  435. package/node_modules/@xrkseek/server-face/dist/workspace-member-look.js.map +1 -0
  436. package/node_modules/@xrkseek/server-face/dist/workspace-orchestrate-tools.d.ts +3 -2
  437. package/node_modules/@xrkseek/server-face/dist/workspace-orchestrate-tools.d.ts.map +1 -1
  438. package/node_modules/@xrkseek/server-face/dist/workspace-orchestrate-tools.js +74 -57
  439. package/node_modules/@xrkseek/server-face/dist/workspace-orchestrate-tools.js.map +1 -1
  440. package/node_modules/@xrkseek/server-face/dist/workspace-registry.d.ts +31 -0
  441. package/node_modules/@xrkseek/server-face/dist/workspace-registry.d.ts.map +1 -1
  442. package/node_modules/@xrkseek/server-face/dist/workspace-registry.js +109 -0
  443. package/node_modules/@xrkseek/server-face/dist/workspace-registry.js.map +1 -1
  444. package/node_modules/@xrkseek/server-face/dist/workspace-store.d.ts +2 -0
  445. package/node_modules/@xrkseek/server-face/dist/workspace-store.d.ts.map +1 -1
  446. package/node_modules/@xrkseek/server-face/dist/workspace-store.js +7 -0
  447. package/node_modules/@xrkseek/server-face/dist/workspace-store.js.map +1 -1
  448. package/node_modules/@xrkseek/server-face/package.json +60 -60
  449. package/node_modules/@xrkseek/server-host/dist/agent-cache.d.ts +16 -2
  450. package/node_modules/@xrkseek/server-host/dist/agent-cache.d.ts.map +1 -1
  451. package/node_modules/@xrkseek/server-host/dist/agent-cache.js +84 -36
  452. package/node_modules/@xrkseek/server-host/dist/agent-cache.js.map +1 -1
  453. package/node_modules/@xrkseek/server-host/dist/index.d.ts +37 -6
  454. package/node_modules/@xrkseek/server-host/dist/index.d.ts.map +1 -1
  455. package/node_modules/@xrkseek/server-host/dist/index.js +124 -27
  456. package/node_modules/@xrkseek/server-host/dist/index.js.map +1 -1
  457. package/node_modules/@xrkseek/server-host/dist/log.d.ts +6 -0
  458. package/node_modules/@xrkseek/server-host/dist/log.d.ts.map +1 -1
  459. package/node_modules/@xrkseek/server-host/dist/sidebar-face-bridge.d.ts.map +1 -1
  460. package/node_modules/@xrkseek/server-host/dist/sidebar-face-bridge.js +17 -2
  461. package/node_modules/@xrkseek/server-host/dist/sidebar-face-bridge.js.map +1 -1
  462. package/node_modules/@xrkseek/server-host/dist/standing-tools.d.ts.map +1 -1
  463. package/node_modules/@xrkseek/server-host/dist/standing-tools.js +3 -3
  464. package/node_modules/@xrkseek/server-host/dist/standing-tools.js.map +1 -1
  465. package/node_modules/@xrkseek/server-host/package.json +75 -75
  466. package/node_modules/@xrkseek/server-http/dist/dsh-compat/adapter-types.d.ts +5 -0
  467. package/node_modules/@xrkseek/server-http/dist/dsh-compat/adapter-types.d.ts.map +1 -1
  468. package/node_modules/@xrkseek/server-http/dist/dsh-compat/auto-review-tool-pre.d.ts +1 -1
  469. package/node_modules/@xrkseek/server-http/dist/dsh-compat/auto-review-tool-pre.d.ts.map +1 -1
  470. package/node_modules/@xrkseek/server-http/dist/dsh-compat/generic-plugin-http.d.ts.map +1 -1
  471. package/node_modules/@xrkseek/server-http/dist/dsh-compat/generic-plugin-http.js +41 -6
  472. package/node_modules/@xrkseek/server-http/dist/dsh-compat/generic-plugin-http.js.map +1 -1
  473. package/node_modules/@xrkseek/server-http/dist/dsh-compat/genui-browser-runtime.js +188 -188
  474. package/node_modules/@xrkseek/server-http/dist/dsh-compat/index.d.ts +1 -1
  475. package/node_modules/@xrkseek/server-http/dist/dsh-compat/index.d.ts.map +1 -1
  476. package/node_modules/@xrkseek/server-http/dist/dsh-compat/index.js +1 -1
  477. package/node_modules/@xrkseek/server-http/dist/dsh-compat/index.js.map +1 -1
  478. package/node_modules/@xrkseek/server-http/dist/dsh-compat/mobile-access-auth.d.ts.map +1 -1
  479. package/node_modules/@xrkseek/server-http/dist/dsh-compat/mobile-access-auth.js +292 -24
  480. package/node_modules/@xrkseek/server-http/dist/dsh-compat/mobile-access-auth.js.map +1 -1
  481. package/node_modules/@xrkseek/server-http/dist/dsh-compat/mobile-access-gate.d.ts.map +1 -1
  482. package/node_modules/@xrkseek/server-http/dist/dsh-compat/mobile-access-gate.js +12 -1
  483. package/node_modules/@xrkseek/server-http/dist/dsh-compat/mobile-access-gate.js.map +1 -1
  484. package/node_modules/@xrkseek/server-http/dist/dsh-compat/mobile-access.d.ts +16 -1
  485. package/node_modules/@xrkseek/server-http/dist/dsh-compat/mobile-access.d.ts.map +1 -1
  486. package/node_modules/@xrkseek/server-http/dist/dsh-compat/mobile-access.js +47 -2
  487. package/node_modules/@xrkseek/server-http/dist/dsh-compat/mobile-access.js.map +1 -1
  488. package/node_modules/@xrkseek/server-http/dist/dsh-compat/skin-center.d.ts +1 -1
  489. package/node_modules/@xrkseek/server-http/dist/dsh-compat/token-usage-stats-dash.js +53 -53
  490. package/node_modules/@xrkseek/server-http/dist/dsh-compat/underlying/mobile-gate-kit.d.ts +9 -4
  491. package/node_modules/@xrkseek/server-http/dist/dsh-compat/underlying/mobile-gate-kit.d.ts.map +1 -1
  492. package/node_modules/@xrkseek/server-http/dist/dsh-compat/underlying/mobile-gate-kit.js +39 -20
  493. package/node_modules/@xrkseek/server-http/dist/dsh-compat/underlying/mobile-gate-kit.js.map +1 -1
  494. package/node_modules/@xrkseek/server-http/dist/index.d.ts +2 -1
  495. package/node_modules/@xrkseek/server-http/dist/index.d.ts.map +1 -1
  496. package/node_modules/@xrkseek/server-http/dist/index.js +2 -1
  497. package/node_modules/@xrkseek/server-http/dist/index.js.map +1 -1
  498. package/node_modules/@xrkseek/server-http/dist/sunflower-free/ensure.d.ts +11 -0
  499. package/node_modules/@xrkseek/server-http/dist/sunflower-free/ensure.d.ts.map +1 -0
  500. package/node_modules/@xrkseek/server-http/dist/sunflower-free/ensure.js +85 -0
  501. package/node_modules/@xrkseek/server-http/dist/sunflower-free/ensure.js.map +1 -0
  502. package/node_modules/@xrkseek/server-http/package.json +72 -72
  503. package/node_modules/@xrkseek/server-loader/dist/load.d.ts.map +1 -1
  504. package/node_modules/@xrkseek/server-loader/dist/load.js +132 -0
  505. package/node_modules/@xrkseek/server-loader/dist/load.js.map +1 -1
  506. package/node_modules/@xrkseek/session-projection/README.md +26 -26
  507. package/node_modules/@xrkseek/session-projection/dist/index.d.ts +31 -2
  508. package/node_modules/@xrkseek/session-projection/dist/index.d.ts.map +1 -1
  509. package/node_modules/@xrkseek/session-projection/dist/index.js +135 -19
  510. package/node_modules/@xrkseek/session-projection/dist/index.js.map +1 -1
  511. package/node_modules/@xrkseek/session-telemetry/README.md +11 -11
  512. package/node_modules/@xrkseek/session-telemetry/dist/index.d.ts +1 -0
  513. package/node_modules/@xrkseek/session-telemetry/dist/index.d.ts.map +1 -1
  514. package/node_modules/@xrkseek/session-telemetry/dist/index.js +1 -0
  515. package/node_modules/@xrkseek/session-telemetry/dist/index.js.map +1 -1
  516. package/node_modules/@xrkseek/session-telemetry/dist/redact.d.ts +14 -0
  517. package/node_modules/@xrkseek/session-telemetry/dist/redact.d.ts.map +1 -0
  518. package/node_modules/@xrkseek/session-telemetry/dist/redact.js +58 -0
  519. package/node_modules/@xrkseek/session-telemetry/dist/redact.js.map +1 -0
  520. package/node_modules/@xrkseek/session-telemetry/dist/wrap-store.d.ts +7 -0
  521. package/node_modules/@xrkseek/session-telemetry/dist/wrap-store.d.ts.map +1 -1
  522. package/node_modules/@xrkseek/session-telemetry/dist/wrap-store.js +43 -12
  523. package/node_modules/@xrkseek/session-telemetry/dist/wrap-store.js.map +1 -1
  524. package/node_modules/@xrkseek/session-telemetry/package.json +27 -27
  525. package/node_modules/@xrkseek/workspace/dist/durable-inject.d.ts +13 -0
  526. package/node_modules/@xrkseek/workspace/dist/durable-inject.d.ts.map +1 -1
  527. package/node_modules/@xrkseek/workspace/dist/durable-inject.js +40 -4
  528. package/node_modules/@xrkseek/workspace/dist/durable-inject.js.map +1 -1
  529. package/node_modules/@xrkseek/workspace/dist/ecosystem-instructions.d.ts +10 -9
  530. package/node_modules/@xrkseek/workspace/dist/ecosystem-instructions.d.ts.map +1 -1
  531. package/node_modules/@xrkseek/workspace/dist/ecosystem-instructions.js +67 -19
  532. package/node_modules/@xrkseek/workspace/dist/ecosystem-instructions.js.map +1 -1
  533. package/node_modules/@xrkseek/workspace/dist/index.d.ts +19 -20
  534. package/node_modules/@xrkseek/workspace/dist/index.d.ts.map +1 -1
  535. package/node_modules/@xrkseek/workspace/dist/index.js +43 -20
  536. package/node_modules/@xrkseek/workspace/dist/index.js.map +1 -1
  537. package/node_modules/@xrkseek/workspace/dist/inject-fingerprint.d.ts +2 -0
  538. package/node_modules/@xrkseek/workspace/dist/inject-fingerprint.d.ts.map +1 -1
  539. package/node_modules/@xrkseek/workspace/dist/inject-fingerprint.js +23 -12
  540. package/node_modules/@xrkseek/workspace/dist/inject-fingerprint.js.map +1 -1
  541. package/node_modules/@xrkseek/workspace/dist/inject-sources.d.ts +7 -4
  542. package/node_modules/@xrkseek/workspace/dist/inject-sources.d.ts.map +1 -1
  543. package/node_modules/@xrkseek/workspace/dist/inject-sources.js +10 -0
  544. package/node_modules/@xrkseek/workspace/dist/inject-sources.js.map +1 -1
  545. package/node_modules/@xrkseek/workspace/dist/instruction-authority.d.ts +27 -0
  546. package/node_modules/@xrkseek/workspace/dist/instruction-authority.d.ts.map +1 -0
  547. package/node_modules/@xrkseek/workspace/dist/instruction-authority.js +78 -0
  548. package/node_modules/@xrkseek/workspace/dist/instruction-authority.js.map +1 -0
  549. package/node_modules/@xrkseek/workspace/dist/skill-dirs.d.ts +7 -0
  550. package/node_modules/@xrkseek/workspace/dist/skill-dirs.d.ts.map +1 -1
  551. package/node_modules/@xrkseek/workspace/dist/skill-dirs.js +4 -2
  552. package/node_modules/@xrkseek/workspace/dist/skill-dirs.js.map +1 -1
  553. package/node_modules/@xrkseek/workspace/dist/skill-tools.js +1 -1
  554. package/node_modules/@xrkseek/workspace/dist/skill-tools.js.map +1 -1
  555. package/node_modules/@xrkseek/workspace/dist/skills.d.ts +13 -1
  556. package/node_modules/@xrkseek/workspace/dist/skills.d.ts.map +1 -1
  557. package/node_modules/@xrkseek/workspace/dist/skills.js +45 -5
  558. package/node_modules/@xrkseek/workspace/dist/skills.js.map +1 -1
  559. package/node_modules/@xrkseek/workspace/dist/standing-skill-dirs.d.ts +26 -0
  560. package/node_modules/@xrkseek/workspace/dist/standing-skill-dirs.d.ts.map +1 -0
  561. package/node_modules/@xrkseek/workspace/dist/standing-skill-dirs.js +80 -0
  562. package/node_modules/@xrkseek/workspace/dist/standing-skill-dirs.js.map +1 -0
  563. package/node_modules/@xrkseek/workspace/dist/workspace-anchor.d.ts +7 -1
  564. package/node_modules/@xrkseek/workspace/dist/workspace-anchor.d.ts.map +1 -1
  565. package/node_modules/@xrkseek/workspace/dist/workspace-anchor.js +21 -1
  566. package/node_modules/@xrkseek/workspace/dist/workspace-anchor.js.map +1 -1
  567. package/node_modules/@xrkseek/workspace/package.json +28 -28
  568. package/node_modules/@xrkseek/xrk-agent/lib/index.js +1 -793
  569. package/node_modules/@xrkseek/xrk-agent/lib/invariant.js +1 -23
  570. package/node_modules/@xrkseek/xrk-attachment/lib/index.js +1 -1
  571. package/node_modules/@xrkseek/xrk-attachment/lib/invariant.js +1 -0
  572. package/node_modules/@xrkseek/xrk-attachment/lib/types/brand.js +10 -0
  573. package/node_modules/@xrkseek/xrk-attachment/lib/types/error.js +48 -0
  574. package/node_modules/@xrkseek/xrk-attachment/lib/types/index.js +42 -0
  575. package/node_modules/@xrkseek/xrk-attachment/lib/types/invariant.js +16 -0
  576. package/node_modules/@xrkseek/xrk-attachment/lib/types/types.d.ts +6 -0
  577. package/node_modules/@xrkseek/xrk-attachment/lib/types/types.js +3 -0
  578. package/node_modules/@xrkseek/xrk-attachment/package.json +1 -0
  579. package/node_modules/@xrkseek/xrk-brand/lib/index.js +1 -1
  580. package/node_modules/@xrkseek/xrk-brand/lib/invariant.js +1 -0
  581. package/node_modules/@xrkseek/xrk-brand/lib/types/index.js +24 -0
  582. package/node_modules/@xrkseek/xrk-brand/lib/types/invariant.js +22 -0
  583. package/node_modules/@xrkseek/xrk-brand/package.json +1 -0
  584. package/node_modules/@xrkseek/xrk-commands/lib/index.js +1 -1
  585. package/node_modules/@xrkseek/xrk-commands/lib/invariant.js +1 -0
  586. package/node_modules/@xrkseek/xrk-file-reference-local/README.md +46 -46
  587. package/node_modules/@xrkseek/xrk-file-reference-local/README.zh.md +46 -46
  588. package/node_modules/@xrkseek/xrk-file-reference-local/package.json +30 -30
  589. package/node_modules/@xrkseek/xrk-invariants/lib/index.js +1 -1
  590. package/node_modules/@xrkseek/xrk-invariants/lib/invariant.js +1 -0
  591. package/node_modules/@xrkseek/xrk-invariants/lib/types/index.js +148 -0
  592. package/node_modules/@xrkseek/xrk-invariants/lib/types/invariant.js +22 -0
  593. package/node_modules/@xrkseek/xrk-invariants/package.json +1 -0
  594. package/node_modules/@xrkseek/xrk-llm/lib/index.js +1 -1
  595. package/node_modules/@xrkseek/xrk-llm/lib/invariant.js +1 -0
  596. package/node_modules/@xrkseek/xrk-llm/lib/types/index.js +4 -0
  597. package/node_modules/@xrkseek/xrk-llm/lib/types/types.d.ts +11 -0
  598. package/node_modules/@xrkseek/xrk-permission-presets/lib/index.js +1 -1
  599. package/node_modules/@xrkseek/xrk-permission-presets/lib/invariant.js +1 -0
  600. package/node_modules/@xrkseek/xrk-scope/lib/index.js +1 -0
  601. package/node_modules/@xrkseek/xrk-scope/lib/types/index.d.ts +129 -0
  602. package/node_modules/@xrkseek/xrk-scope/lib/types/index.js +243 -0
  603. package/node_modules/@xrkseek/xrk-scope/package.json +34 -0
  604. package/node_modules/@xrkseek/xrk-session/lib/index.js +1 -1
  605. package/node_modules/@xrkseek/xrk-session/lib/invariant.js +1 -0
  606. package/node_modules/@xrkseek/xrk-session-projection/lib/index.js +1 -1
  607. package/node_modules/@xrkseek/xrk-session-projection/lib/invariant.js +1 -0
  608. package/node_modules/@xrkseek/xrk-session-reference/README.md +50 -50
  609. package/node_modules/@xrkseek/xrk-session-reference/README.zh.md +50 -50
  610. package/node_modules/@xrkseek/xrk-session-reference/dist/prepare-face.js +13 -13
  611. package/node_modules/@xrkseek/xrk-session-reference/dist/spill.js +2 -2
  612. package/node_modules/@xrkseek/xrk-session-reference/package.json +56 -56
  613. package/node_modules/@xrkseek/xrk-settings/lib/index.js +1 -638
  614. package/node_modules/@xrkseek/xrk-settings/lib/invariant.js +1 -67
  615. package/node_modules/@xrkseek/xrk-system-prompt/package.json +15 -15
  616. package/node_modules/@xrkseek/xrk-system-prompt/src/index.ts +144 -144
  617. package/node_modules/@xrkseek/xrk-token-meter/README.i18n.yaml +6 -0
  618. package/node_modules/@xrkseek/xrk-token-meter/README.md +68 -0
  619. package/node_modules/@xrkseek/xrk-token-meter/README.zh.md +68 -0
  620. package/node_modules/@xrkseek/xrk-token-meter/lib/index.js +1 -0
  621. package/node_modules/@xrkseek/xrk-token-meter/lib/invariant.js +1 -0
  622. package/node_modules/@xrkseek/xrk-token-meter/lib/types/breakdown-projection.d.ts +29 -0
  623. package/node_modules/@xrkseek/xrk-token-meter/lib/types/breakdown-projection.js +56 -0
  624. package/node_modules/@xrkseek/xrk-token-meter/lib/types/client.d.ts +9 -0
  625. package/node_modules/@xrkseek/xrk-token-meter/lib/types/client.js +7 -0
  626. package/node_modules/@xrkseek/xrk-token-meter/lib/types/estimate.d.ts +42 -0
  627. package/node_modules/@xrkseek/xrk-token-meter/lib/types/estimate.js +79 -0
  628. package/node_modules/@xrkseek/xrk-token-meter/lib/types/index.d.ts +62 -0
  629. package/node_modules/@xrkseek/xrk-token-meter/lib/types/index.js +250 -0
  630. package/node_modules/@xrkseek/xrk-token-meter/lib/types/invariant.d.ts +16 -0
  631. package/node_modules/@xrkseek/xrk-token-meter/lib/types/invariant.js +30 -0
  632. package/node_modules/@xrkseek/xrk-token-meter/lib/types/projection.d.ts +74 -0
  633. package/node_modules/@xrkseek/xrk-token-meter/lib/types/projection.js +7 -0
  634. package/node_modules/@xrkseek/xrk-token-meter/lib/types/surface-fold.d.ts +38 -0
  635. package/node_modules/@xrkseek/xrk-token-meter/lib/types/surface-fold.js +47 -0
  636. package/node_modules/@xrkseek/xrk-token-meter/lib/types/surface-projection.d.ts +59 -0
  637. package/node_modules/@xrkseek/xrk-token-meter/lib/types/surface-projection.js +66 -0
  638. package/node_modules/@xrkseek/xrk-token-meter/lib/types/turn-usage.d.ts +33 -0
  639. package/node_modules/@xrkseek/xrk-token-meter/lib/types/turn-usage.js +247 -0
  640. package/node_modules/@xrkseek/xrk-token-meter/lib/types/types.d.ts +44 -0
  641. package/node_modules/@xrkseek/xrk-token-meter/lib/types/types.js +7 -0
  642. package/node_modules/@xrkseek/xrk-token-meter/lib/types/usage-projection.d.ts +64 -0
  643. package/node_modules/@xrkseek/xrk-token-meter/lib/types/usage-projection.js +161 -0
  644. package/node_modules/@xrkseek/xrk-token-meter/package.json +57 -0
  645. package/node_modules/@xrkseek/xrk-tools/lib/index.js +1 -1
  646. package/node_modules/@xrkseek/xrk-tools/lib/invariant.js +1 -1
  647. package/node_modules/@xrkseek/xrk-tools/src/presentation.ts +39 -39
  648. package/node_modules/@xrkseek/xrk-typert-protocol/lib/index.js +1 -1
  649. package/node_modules/@xrkseek/xrk-typert-protocol/lib/invariant.js +1 -0
  650. package/node_modules/@xrkseek/xrk-workflow/README.md +73 -73
  651. package/node_modules/@xrkseek/xrk-workflow/README.zh.md +72 -72
  652. package/node_modules/@xrkseek/xrk-workflow/lib/types/index.js +118 -118
  653. package/package.json +7 -1
  654. package/node_modules/@xrkseek/llm/dist/reasoning-effort.d.ts +0 -14
  655. package/node_modules/@xrkseek/llm/dist/reasoning-effort.d.ts.map +0 -1
  656. package/node_modules/@xrkseek/llm/dist/reasoning-effort.js +0 -21
  657. package/node_modules/@xrkseek/llm/dist/reasoning-effort.js.map +0 -1
  658. package/node_modules/@xrkseek/server-face/dist/index.d.mts +0 -3734
  659. package/node_modules/@xrkseek/server-face/dist/index.d.mts.map +0 -1
  660. package/node_modules/@xrkseek/server-face/dist/index.mjs +0 -22085
  661. package/node_modules/@xrkseek/server-face/dist/index.mjs.map +0 -1
  662. package/node_modules/@xrkseek/server-face/dist/model-reasoning.d.ts +0 -51
  663. package/node_modules/@xrkseek/server-face/dist/model-reasoning.d.ts.map +0 -1
  664. package/node_modules/@xrkseek/server-face/dist/model-reasoning.js +0 -104
  665. package/node_modules/@xrkseek/server-face/dist/model-reasoning.js.map +0 -1
  666. package/node_modules/@xrkseek/server-host/dist/sidebar-pty-agent.d.ts +0 -2
  667. package/node_modules/@xrkseek/server-host/dist/sidebar-pty-agent.d.ts.map +0 -1
  668. package/node_modules/@xrkseek/server-host/dist/sidebar-pty-agent.js +0 -98
  669. package/node_modules/@xrkseek/server-host/dist/sidebar-pty-agent.js.map +0 -1
  670. package/node_modules/@xrkseek/server-host/dist/sidebar-pty-worker.d.ts +0 -18
  671. package/node_modules/@xrkseek/server-host/dist/sidebar-pty-worker.d.ts.map +0 -1
  672. package/node_modules/@xrkseek/server-host/dist/sidebar-pty-worker.js +0 -141
  673. package/node_modules/@xrkseek/server-host/dist/sidebar-pty-worker.js.map +0 -1
  674. package/node_modules/@xrkseek/server-host/dist/win-fd-inherit.d.ts +0 -30
  675. package/node_modules/@xrkseek/server-host/dist/win-fd-inherit.d.ts.map +0 -1
  676. package/node_modules/@xrkseek/server-host/dist/win-fd-inherit.js +0 -96
  677. package/node_modules/@xrkseek/server-host/dist/win-fd-inherit.js.map +0 -1
@@ -2,11 +2,16 @@ import { createRootScope, ScopeState, } from "@xrkseek/compose";
2
2
  /** Realm key: host composition / plugin list snapshot for agent scopes. */
3
3
  export const HOST_PLUGINS_KEY = "host.plugins";
4
4
  /**
5
- * Badge / cwd rebuilds share the settings rule: do not dispose a live turn.
6
- * The caller invalidates the deferred id once that session's drain goes idle.
5
+ * Badge / cwd rebuilds share the settings rule: do not dispose a live turn
6
+ * (or a mid-build materialize — `isBusy` is still false then). The caller
7
+ * invalidates the deferred id once that session's drain goes idle.
8
+ *
9
+ * `force` is for intentional rebuilds that must win over an in-flight create
10
+ * (isolated worktree cwd bind): those callers await invalidate then prompt.
7
11
  */
8
12
  export function deferBusyAgentInvalidate(input) {
9
- if (input.drainActive || input.busy) {
13
+ if (!input.force
14
+ && (input.drainActive || input.busy || input.materializing === true)) {
10
15
  input.defer(input.sessionId);
11
16
  return;
12
17
  }
@@ -25,6 +30,8 @@ export function createHostAgentCache(plugins, opts) {
25
30
  hostScope.provide(HOST_PLUGINS_KEY, plugins);
26
31
  const agents = new Map();
27
32
  const scopes = new Map();
33
+ /** In-flight materialize per session; a second resolve waits instead of rebuilding. */
34
+ const materializing = new Map();
28
35
  /** Child → parent when the child realm is nested under the parent's scope. */
29
36
  const nestParent = new Map();
30
37
  function pruneDisposed() {
@@ -103,54 +110,95 @@ export function createHostAgentCache(plugins, opts) {
103
110
  await invalidate(id);
104
111
  }
105
112
  }
113
+ /**
114
+ * Build one session's agent and register it.
115
+ *
116
+ * Only ever entered through {@link resolve}, which owns the single-flight
117
+ * bookkeeping — two callers arriving during the same window used to see
118
+ * "scope present, handle absent" and each rebuild: the second caller disposed
119
+ * the first one's scope mid-`create()`, and the first threw
120
+ * `agent scope disposed during materialize`. Every delegated spawn hits that
121
+ * window (drain admit + spawn warm-up resolve the same fresh session id at
122
+ * once), so it surfaced as "subagents are broken" rather than a rare race.
123
+ */
124
+ async function materialize(sessionId, create, resolveOpts) {
125
+ const existingScope = scopes.get(sessionId);
126
+ const existing = agents.get(sessionId);
127
+ if (existing || existingScope) {
128
+ agents.delete(sessionId);
129
+ scopes.delete(sessionId);
130
+ if (existingScope && existingScope.state !== ScopeState.Disposed) {
131
+ await existingScope.dispose();
132
+ }
133
+ }
134
+ const child = openScope(sessionId, resolveOpts?.parentSessionId);
135
+ scopes.set(sessionId, child);
136
+ await child.activate(async () => {
137
+ // Touch inject so consumer edge is live for Ordering on host dispose.
138
+ child.inject(HOST_PLUGINS_KEY);
139
+ const agent = await create();
140
+ // A cache-wide invalidate can still cascade-dispose this scope while
141
+ // create() awaits (MCP remount, settings ns change); refuse to register
142
+ // effects on a terminal scope.
143
+ if (child.state !== ScopeState.Loading &&
144
+ child.state !== ScopeState.Active) {
145
+ agent.abort({ kind: "disposed" });
146
+ throw new Error(`agent scope disposed during materialize: ${sessionId}`);
147
+ }
148
+ child.effect(() => () => {
149
+ agent.abort({ kind: "disposed" });
150
+ }, { label: `agent.abort(${sessionId})` });
151
+ agents.set(sessionId, agent);
152
+ });
153
+ const agent = agents.get(sessionId);
154
+ if (!agent) {
155
+ scopes.delete(sessionId);
156
+ if (child.state !== ScopeState.Disposed)
157
+ await child.dispose();
158
+ throw new Error(`agent scope failed to materialize: ${sessionId}`);
159
+ }
160
+ return agent;
161
+ }
106
162
  return {
107
163
  hostScope,
108
- async resolve(sessionId, create, resolveOpts) {
164
+ resolve(sessionId, create, resolveOpts) {
109
165
  pruneDisposed();
110
166
  const existingScope = scopes.get(sessionId);
111
167
  const existing = agents.get(sessionId);
112
168
  if (existing &&
113
169
  existingScope &&
114
170
  existingScope.state !== ScopeState.Disposed) {
115
- return existing;
171
+ return Promise.resolve(existing);
116
172
  }
117
- if (existing || existingScope) {
118
- agents.delete(sessionId);
119
- scopes.delete(sessionId);
120
- if (existingScope && existingScope.state !== ScopeState.Disposed) {
121
- await existingScope.dispose();
173
+ const inflight = materializing.get(sessionId);
174
+ if (inflight)
175
+ return inflight;
176
+ // One retry: a concurrent per-session invalidate (cwd / badge) can still
177
+ // dispose the scope while create() awaits — invalidateAll already skips
178
+ // materializing, but deferBusy used to treat mid-build as idle.
179
+ const run = materialize(sessionId, create, resolveOpts).catch((err) => {
180
+ const msg = err instanceof Error ? err.message : String(err);
181
+ if (!msg.includes("agent scope disposed during materialize:")) {
182
+ throw err;
122
183
  }
123
- }
124
- const child = openScope(sessionId, resolveOpts?.parentSessionId);
125
- scopes.set(sessionId, child);
126
- await child.activate(async () => {
127
- // Touch inject so consumer edge is live for Ordering on host dispose.
128
- child.inject(HOST_PLUGINS_KEY);
129
- const agent = await create();
130
- // Parent invalidate can cascade-dispose this scope while create()
131
- // awaits; refuse to register effects on a terminal scope.
132
- if (child.state !== ScopeState.Loading &&
133
- child.state !== ScopeState.Active) {
134
- agent.abort({ kind: "disposed" });
135
- throw new Error(`agent scope disposed during materialize: ${sessionId}`);
136
- }
137
- child.effect(() => () => {
138
- agent.abort({ kind: "disposed" });
139
- }, { label: `agent.abort(${sessionId})` });
140
- agents.set(sessionId, agent);
184
+ return materialize(sessionId, create, resolveOpts);
141
185
  });
142
- const agent = agents.get(sessionId);
143
- if (!agent) {
144
- scopes.delete(sessionId);
145
- if (child.state !== ScopeState.Disposed)
146
- await child.dispose();
147
- throw new Error(`agent scope failed to materialize: ${sessionId}`);
148
- }
149
- return agent;
186
+ materializing.set(sessionId, run);
187
+ void run.then(() => {
188
+ if (materializing.get(sessionId) === run)
189
+ materializing.delete(sessionId);
190
+ }, () => {
191
+ if (materializing.get(sessionId) === run)
192
+ materializing.delete(sessionId);
193
+ });
194
+ return run;
150
195
  },
151
196
  isBusy(sessionId) {
152
197
  return agents.get(sessionId)?.isBusy() === true;
153
198
  },
199
+ isMaterializing(sessionId) {
200
+ return materializing.has(sessionId);
201
+ },
154
202
  hasProtectedNestedChild,
155
203
  invalidate,
156
204
  invalidateAll,
@@ -1 +1 @@
1
- {"version":3,"file":"agent-cache.js","sourceRoot":"","sources":["../src/agent-cache.ts"],"names":[],"mappings":"AACA,OAAO,EACL,eAAe,EACf,UAAU,GAEX,MAAM,kBAAkB,CAAC;AAG1B,2EAA2E;AAC3E,MAAM,CAAC,MAAM,gBAAgB,GAAG,cAAc,CAAC;AAU/C;;;GAGG;AACH,MAAM,UAAU,wBAAwB,CAAC,KAMxC;IACC,IAAI,KAAK,CAAC,WAAW,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC;QACpC,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;QAC7B,OAAO;IACT,CAAC;IACD,OAAO,KAAK,CAAC,UAAU,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;AAC3C,CAAC;AA0CD;;;;;GAKG;AACH,MAAM,UAAU,oBAAoB,CAClC,OAAoC,EACpC,IAA0B;IAE1B,MAAM,SAAS,GAAG,eAAe,CAAC;QAChC,EAAE,EAAE,IAAI,EAAE,MAAM,IAAI,MAAM;KAC3B,CAAC,CAAC;IACH,SAAS,CAAC,OAAO,CAAC,gBAAgB,EAAE,OAAO,CAAC,CAAC;IAE7C,MAAM,MAAM,GAAG,IAAI,GAAG,EAAuB,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AAC;YAC5E,CAAC,CACF,CAAC;YACF,OAAO,GAAG,CAAC;QACb,CAAC;QAED,MAAM,CAAC,SAAS;YACd,OAAO,MAAM,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;QAClD,CAAC;QAED,eAAe,CAAC,SAAS;YACvB,OAAO,aAAa,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;QACtC,CAAC;QAED,uBAAuB;QAEvB,UAAU;QACV,aAAa;QAEb,KAAK,CAAC,OAAO;YACX,MAAM,CAAC,KAAK,EAAE,CAAC;YACf,MAAM,CAAC,KAAK,EAAE,CAAC;YACf,MAAM,SAAS,CAAC,OAAO,EAAE,CAAC;QAC5B,CAAC;KACF,CAAC;AACJ,CAAC"}
@@ -5,7 +5,7 @@ import { type PathAccessMode } from "@xrkseek/protocol";
5
5
  import { type MemoryProvider } from "@xrkseek/exec-memory";
6
6
  import { type HostConfig } from "@xrkseek/server-config";
7
7
  import { type HarnessHttpServer } from "@xrkseek/server-http";
8
- import { createCollabBoardFragmentProvider, createSessionCapabilityFragmentProvider, createSessionPostureFragmentProvider } from "@xrkseek/server-face";
8
+ import { createBossStatusFragmentProvider, createCollabBoardFragmentProvider, createSeatIdentityFragmentProvider, createSessionCapabilityFragmentProvider, createSessionPostureFragmentProvider, createInstructionAuthorityFragmentProvider } from "@xrkseek/server-face";
9
9
  import { type PluginLoader, type RegisteredPlugin } from "@xrkseek/server-loader";
10
10
  import { type SessionDrainControl } from "./drain-status.js";
11
11
  import { createLocalShell } from "@xrkseek/exec-shell";
@@ -106,6 +106,37 @@ export type AgentFactory = (input: {
106
106
  toolSearchState?: import("@xrkseek/core-tools").ToolSearchState;
107
107
  /** Live route image gate for `read_image`. */
108
108
  routeAllowsImage?: () => boolean;
109
+ /**
110
+ * Face question broker for Claude Code mods `$.ui.ask` (structural; no Cordis).
111
+ * Host fills from `FaceQuestionBroker` once Face runtime exists.
112
+ */
113
+ userQuestions?: {
114
+ ask(input: {
115
+ readonly questions: readonly {
116
+ readonly id: string;
117
+ readonly question: string;
118
+ readonly header?: string;
119
+ readonly detail?: string;
120
+ readonly options?: readonly {
121
+ readonly label: string;
122
+ readonly description?: string;
123
+ }[];
124
+ readonly multiSelect?: boolean;
125
+ }[];
126
+ readonly agent: {
127
+ readonly session: {
128
+ readonly id: string;
129
+ };
130
+ };
131
+ readonly signal?: AbortSignal;
132
+ }): Promise<{
133
+ readonly answers: readonly {
134
+ readonly id: string;
135
+ readonly selected: readonly string[];
136
+ readonly custom?: string;
137
+ }[];
138
+ }>;
139
+ };
109
140
  /**
110
141
  * Host-shared PTY registry (harness/server). Survives agent invalidate so
111
142
  * sandbox-mode fence and open sessions stay composition-true.
@@ -181,9 +212,9 @@ export type AgentFactory = (input: {
181
212
  workspaceInject?: {
182
213
  readonly maxChars?: number;
183
214
  /**
184
- * `subagent` drops the home persona layer (SOUL.md / USER.md / home
185
- * AGENTS.md) — delegated children get their identity from the spawn
186
- * preamble, while workspace rules and the skills catalog stay on.
215
+ * `subagent` / `minimal` skip home **convention** drafts (`~/.agents`) but
216
+ * keep product standing (`~/.xrk` AGENTS/SOUL). Seat identity still comes
217
+ * from spawn / playbook; `minimal` thins the skill catalog (公文包).
187
218
  */
188
219
  readonly audience?: "user" | "subagent" | "minimal";
189
220
  };
@@ -249,7 +280,7 @@ export type AgentFactory = (input: {
249
280
  * Face `locale` product (Settings SoT) — drives the harness `language` prompt
250
281
  * section so reasoning follows the UI language.
251
282
  */
252
- locale?: "zh" | "en";
283
+ locale?: "zh" | "en" | "ja";
253
284
  /**
254
285
  * Auto-review tool pre (Host wires classifier tiers + enable gate).
255
286
  * Session Auto = no sandbox + per-call review — not a context-fragment.
@@ -260,7 +291,7 @@ export type AgentFactory = (input: {
260
291
  * Turn-start fragments (Agent Team catalog + last-day 主线).
261
292
  * Seed AGENTS.md / skills stay on workspace inject.
262
293
  */
263
- contextFragmentProviders?: Array<ReturnType<typeof createCollabBoardFragmentProvider> | ReturnType<typeof createSessionCapabilityFragmentProvider> | ReturnType<typeof createSessionPostureFragmentProvider>>;
294
+ contextFragmentProviders?: Array<ReturnType<typeof createInstructionAuthorityFragmentProvider> | ReturnType<typeof createBossStatusFragmentProvider> | ReturnType<typeof createCollabBoardFragmentProvider> | ReturnType<typeof createSeatIdentityFragmentProvider> | ReturnType<typeof createSessionCapabilityFragmentProvider> | ReturnType<typeof createSessionPostureFragmentProvider>>;
264
295
  /** Face-backed working_directory tool (Host wires per session). */
265
296
  workingDirectoryTools?: import("@xrkseek/core-tools").WorkingDirectoryToolsOptions;
266
297
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAkB,MAAM,qBAAqB,CAAC;AACvE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C,OAAO,EAQL,KAAK,YAAY,EAClB,MAAM,uBAAuB,CAAC;AAI/B,OAAO,EAKL,KAAK,cAAc,EACpB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAGL,KAAK,cAAc,EACpB,MAAM,sBAAsB,CAAC;AAQ9B,OAAO,EAKL,KAAK,UAAU,EAChB,MAAM,wBAAwB,CAAC;AAOhC,OAAO,EAmBL,KAAK,iBAAiB,EAkBvB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAoCL,iCAAiC,EACjC,uCAAuC,EACvC,oCAAoC,EAYrC,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAOL,KAAK,YAAY,EACjB,KAAK,gBAAgB,EACtB,MAAM,wBAAwB,CAAC;AAQhC,OAAO,EAAqC,KAAK,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAwBhG,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAiBvD,OAAO,KAAK,EAAc,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAK7D,OAAO,EAAE,oBAAoB,EAAE,w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AAM,EAAE,UAAU,GAAG,SAAS,GAAG,SAAS,CAAC;IACpD,MAAM,IAAI;QACR,EAAE,EAAE,OAAO,CAAC;QACZ,MAAM,EAAE,MAAM,CAAC;QACf,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,OAAO,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;QAC5B,sEAAsE;QACtE,eAAe,CAAC,EAAE,OAAO,CAAC;KAC3B,CAAC;IACF,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACvB;AAED,MAAM,WAAW,WAAW;IAC1B,KAAK,CACH,MAAM,EAAE,UAAU,EAClB,OAAO,EAAE,YAAY,EACrB,OAAO,CAAC,EAAE,gBAAgB,GACzB,OAAO,CAAC,YAAY,CAAC,CAAC;IACzB,GAAG,CAAC,EAAE,EAAE,MAAM,GAAG,YAAY,GAAG,SAAS,CAAC;IAC1C,IAAI,IAAI,SAAS,YAAY,EAAE,CAAC;IAChC,IAAI,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAChC,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CAC1B;AAqBD,wBAAgB,iBAAiB,IAAI,WAAW,CA8+F/C"}
@@ -15,8 +15,8 @@ import { watchPolicyFile } from "./policy-file-watch.js";
15
15
  import { createA2aInboundPublicHandler } from "./a2a-inbound-public.js";
16
16
  import { createCronApiHandler } from "./cron-http.js";
17
17
  import { tryMountHostIsolatingWorkflowEngine } from "./workflow-engine-mount.js";
18
- import { applyXrkProductBootPolicy, chainPublicHandlers, ensureDshCompatHostPlugin, DSH_COMPAT_HOST_PLUGIN_ID, createLiveHostPluginsPublicHandler, createHttpServer, createXrkPluginPublicHandler, createSidebarPublicHandler, prewarmDshCompatAdapters, shutdownDshCompatServices, applyHostPackageByName, stopHostPackage, listHostAppliedPackages, invokeDshCompatRpc, attachDshCompatUpgrades, DSH_SETTINGS_NAMESPACES, DSH_SETTINGS_DEFAULTS, runPluginMutate, ensureXrkPlatformClientBootEntries, injectBootIntoHtml, injectBootThemeIntoHtml, injectMobileAccessShellIntoHtml, loadBootManifestFromWebDist, mergeWebBootManifests, resolveWebBootManifest, createXrkWalletPort, createMobileAccessGateChecker, createMobileAccessGateHandler, loadSidebarPrefs, createAutoReviewToolPre, isAutoReviewEnabled, setAutoReviewEnabled, setImFaceAdmitHook, } from "@xrkseek/server-http";
19
- import { attachFaceUpgrades, bindSubagentTools, bindSessionQueryTools, createFaceRuntime, IM_AGENT_PRESET_ID, IM_WORKSPACE_ID, QICHUANG_AGENT_PRESET_ID, XIANGYANG_WORKSPACE_ID, isOrchestrationWorkspaceId, effectiveHostApiKey, ensureMcpLiveIfIdle, isLoopbackAddress, timingSafeStringEqual, listCredentialSlots, peekSettingsYamlSection, publishRemoteEvent, createSessionRoutingLlm, liveRouteAllowsImageInput, resolveSessionCwd, ensureSessionWorkingDirectory, setSessionWorkingDirectory, createSessionWorktree, canonicalAgentPresetId, resolveAgentPresetProfile, effectiveSessionAgentPreset, tryHandleFaceHttp, isPluginSoftDisabledAt, readDisabledPluginIdsAt, readManagedPackageIndexAt, reconcileManagedProcessPlugins, snapshotSessionWorkspace, SNAPSHOT_DRAIN_BUDGET_MS, applyRosterToolPolicy, migrateAutoSessionsToFullAccess, approvePendingAutoReview, createCollabBoardFragmentProvider, createSessionCapabilityFragmentProvider, createSessionPostureFragmentProvider, canvasWorkspaceIdForSession, memberPackSkillsDir, resolveSessionModelSelection, credentialsSet, settingsMutateFace, communityLoopbackBaseUrlCollision, existingPiAiProvider, mergeCommunityProviderModels, } from "@xrkseek/server-face";
18
+ import { applyXrkProductBootPolicy, chainPublicHandlers, ensureDshCompatHostPlugin, ensureSunflowerFreePlugin, DSH_COMPAT_HOST_PLUGIN_ID, SUNFLOWER_FREE_PLUGIN_ID, createLiveHostPluginsPublicHandler, createHttpServer, createXrkPluginPublicHandler, createSidebarPublicHandler, prewarmDshCompatAdapters, shutdownDshCompatServices, applyHostPackageByName, stopHostPackage, listHostAppliedPackages, invokeDshCompatRpc, attachDshCompatUpgrades, DSH_SETTINGS_NAMESPACES, DSH_SETTINGS_DEFAULTS, runPluginMutate, ensureXrkPlatformClientBootEntries, injectBootIntoHtml, injectBootThemeIntoHtml, injectMobileAccessShellIntoHtml, loadBootManifestFromWebDist, mergeWebBootManifests, resolveWebBootManifest, createXrkWalletPort, armAccessGateForListen, createMobileAccessGateChecker, createMobileAccessGateHandler, loadSidebarPrefs, createAutoReviewToolPre, isAutoReviewEnabled, setAutoReviewEnabled, setImFaceAdmitHook, } from "@xrkseek/server-http";
19
+ import { attachFaceUpgrades, bindSubagentTools, bindSessionQueryTools, createFaceRuntime, IM_AGENT_PRESET_ID, IM_WORKSPACE_ID, QICHUANG_AGENT_PRESET_ID, XIANGYANG_WORKSPACE_ID, isOrchestrationWorkspaceId, effectiveHostApiKey, ensureMcpLiveIfIdle, timingSafeStringEqual, listCredentialSlots, peekSettingsYamlSection, publishRemoteEvent, createSessionRoutingLlm, liveRouteAllowsImageInput, resolveSessionCwd, ensureSessionWorkingDirectory, setSessionWorkingDirectory, createSessionWorktree, canonicalAgentPresetId, resolveAgentPresetProfile, effectiveSessionAgentPreset, tryHandleFaceHttp, isPluginSoftDisabledAt, readDisabledPluginIdsAt, readManagedPackageIndexAt, reconcileManagedProcessPlugins, snapshotSessionWorkspace, SNAPSHOT_DRAIN_BUDGET_MS, applyRosterToolPolicy, migrateAutoSessionsToFullAccess, approvePendingAutoReview, createBossStatusFragmentProvider, createCollabBoardFragmentProvider, createSeatIdentityFragmentProvider, createSessionCapabilityFragmentProvider, createSessionPostureFragmentProvider, createInstructionAuthorityFragmentProvider, canvasWorkspaceIdForSession, memberPackSkillsDir, resolveSessionModelSelection, credentialsSet, settingsMutateFace, communityLoopbackBaseUrlCollision, existingPiAiProvider, mergeCommunityProviderModels, } from "@xrkseek/server-face";
20
20
  import { createPluginLoader, composeHostPolicyEngine, wireCompositionChannels, wireCompositionLlm, collectChannelPluginRegistrations, isOptionalBundleEnabledAt, } from "@xrkseek/server-loader";
21
21
  import { existsSync } from "node:fs";
22
22
  import { access } from "node:fs/promises";
@@ -258,11 +258,18 @@ export function createHostManager() {
258
258
  // background so the xrk-app:// Fetch bridge can open without waiting for
259
259
  // every extension ESM graph (Cursor-like first paint).
260
260
  const deferManagedPlugins = String(process.env.XRK_SURFACE ?? "").trim() === "desktop";
261
+ // Built-ins loaded outside pluginsDir (dsh-compat Host fiber + sunflower
262
+ // free LLM). Without preserveIds, Desktop's deferred reconcile unregisters
263
+ // them → dispose clears XRK_SUNFLOWER_SIDECAR_KEY while the brand stays.
264
+ const builtInPreserveIds = [
265
+ DSH_COMPAT_HOST_PLUGIN_ID,
266
+ SUNFLOWER_FREE_PLUGIN_ID,
267
+ ];
261
268
  let loadedPluginIds = [];
262
269
  const loadManagedPlugins = async () => {
263
270
  if (!managedPluginsRootReady())
264
271
  return;
265
- const bootPlugins = await reconcileManagedProcessPlugins(loader, resolvedPluginsDir, { preserveIds: [DSH_COMPAT_HOST_PLUGIN_ID] });
272
+ const bootPlugins = await reconcileManagedProcessPlugins(loader, resolvedPluginsDir, { preserveIds: [...builtInPreserveIds] });
266
273
  loadedPluginIds = [...bootPlugins.ids];
267
274
  for (const failure of bootPlugins.failures) {
268
275
  log?.warn(`plugin load failed (${failure.id}): ${failure.message}`);
@@ -460,8 +467,12 @@ export function createHostManager() {
460
467
  // Drain-active: mid-turn on the Hub bookkeeping path.
461
468
  // isBusy: subagent / edge cases where latch is live but drain
462
469
  // was not marked — disposing those was painting disposed 「已停止」.
470
+ // isMaterializing: has a scope but no handle yet (agent still being
471
+ // built). Disposing it aborts that build with "agent scope disposed
472
+ // during materialize", which a fresh spawn hits immediately.
463
473
  if (!drainActiveBox.isActive(sessionId) &&
464
- !agentCache.isBusy(sessionId)) {
474
+ !agentCache.isBusy(sessionId) &&
475
+ !agentCache.isMaterializing(sessionId)) {
465
476
  return false;
466
477
  }
467
478
  pendingAgentInvalidate.add(sessionId);
@@ -768,8 +779,8 @@ export function createHostManager() {
768
779
  // hot-switch without agentCache invalidate mid-turn.
769
780
  return agentCache.resolve(sessionId, async () => {
770
781
  const pluginSettings = pluginSettingsBox.read?.() ?? {};
771
- // Child inject: skip parent persona; advanced pack skills → child
772
- // catalog only (never parent). Curated memory is not in the pack.
782
+ // Child inject: same standing + convention as parents; only XRK.md
783
+ // ledger is audience-gated. Advanced pack skills → child catalog.
773
784
  let childWorkspaceInject;
774
785
  if (parentSessionId) {
775
786
  const link = faceBox.runtime?.subagents.getByChild(sessionId);
@@ -794,6 +805,32 @@ export function createHostManager() {
794
805
  ...(extraSkillDirs.length > 0 ? { extraSkillDirs } : {}),
795
806
  };
796
807
  }
808
+ else {
809
+ // Top-level identity (干员家): same inject as parents minus XRK.md;
810
+ // seat playbook still lives on cwd AGENTS / roster.
811
+ const identity = faceBox.runtime?.sessionIdentities.get(sessionId);
812
+ if (identity) {
813
+ const rt = faceBox.runtime;
814
+ const home = rt?.agentRoster.findHome(identity.memberId);
815
+ const member = home && rt
816
+ ? rt.agentRoster.get(home.rosterWorkspaceId, identity.memberId)
817
+ : undefined;
818
+ const audience = member?.inject === "subagent"
819
+ ? "subagent"
820
+ : "minimal";
821
+ const extraSkillDirs = [];
822
+ if (member?.kind === "advanced" && rt && home) {
823
+ const skillsRoot = memberPackSkillsDir(member.scope === "global" ? "global" : home.rosterWorkspaceId, member.id, rt.agentRoster.home);
824
+ if (existsSync(skillsRoot)) {
825
+ extraSkillDirs.push(skillsRoot);
826
+ }
827
+ }
828
+ childWorkspaceInject = {
829
+ audience,
830
+ ...(extraSkillDirs.length > 0 ? { extraSkillDirs } : {}),
831
+ };
832
+ }
833
+ }
797
834
  const agent = await factory({
798
835
  sessionId,
799
836
  store,
@@ -1007,8 +1044,11 @@ export function createHostManager() {
1007
1044
  ...(faceBox.runtime
1008
1045
  ? {
1009
1046
  contextFragmentProviders: [
1047
+ createInstructionAuthorityFragmentProvider(),
1010
1048
  createSessionCapabilityFragmentProvider(faceBox.runtime),
1011
1049
  createSessionPostureFragmentProvider(faceBox.runtime),
1050
+ createBossStatusFragmentProvider(faceBox.runtime),
1051
+ createSeatIdentityFragmentProvider(faceBox.runtime),
1012
1052
  createCollabBoardFragmentProvider(faceBox.runtime),
1013
1053
  ],
1014
1054
  workingDirectoryTools: {
@@ -1058,6 +1098,18 @@ export function createHostManager() {
1058
1098
  : {}),
1059
1099
  }
1060
1100
  : {}),
1101
+ // Claude Code `$.ui.ask` → Face question broker (same surface as
1102
+ // ask_user). Live getter: Face may finish wiring after this
1103
+ // composition starts building during boot.
1104
+ userQuestions: {
1105
+ ask: (input) => {
1106
+ const broker = faceBox.questions ?? faceBox.runtime?.questions;
1107
+ if (!broker) {
1108
+ return Promise.reject(new Error("$.ui.ask: Face question broker is not ready yet"));
1109
+ }
1110
+ return broker.ask(input.agent.session.id, input.questions, input.signal);
1111
+ },
1112
+ },
1061
1113
  autoReviewPre: createAutoReviewToolPre({
1062
1114
  xrkHome: resolveXrkHome(),
1063
1115
  // Master switch (Settings) AND session preset === auto (DSH).
@@ -1292,14 +1344,16 @@ export function createHostManager() {
1292
1344
  if (pending === sid)
1293
1345
  continue;
1294
1346
  if (drainActiveBox.isActive(pending) ||
1295
- agentCache.isBusy(pending)) {
1347
+ agentCache.isBusy(pending) ||
1348
+ agentCache.isMaterializing(pending)) {
1296
1349
  continue;
1297
1350
  }
1298
1351
  // Idle parent held only for a nested worker: wait until that
1299
1352
  // child is no longer protected, else parent.dispose cascades.
1300
1353
  if (agentCache.hasProtectedNestedChild(pending, (id) => pendingAgentInvalidate.has(id) ||
1301
1354
  drainActiveBox.isActive(id) ||
1302
- agentCache.isBusy(id))) {
1355
+ agentCache.isBusy(id) ||
1356
+ agentCache.isMaterializing(id))) {
1303
1357
  continue;
1304
1358
  }
1305
1359
  pendingAgentInvalidate.delete(pending);
@@ -1525,7 +1579,9 @@ export function createHostManager() {
1525
1579
  workspaceRoot: config.runtime.workspaceRoot,
1526
1580
  preset: config.runtime.preset,
1527
1581
  }),
1528
- version: "0.0.0",
1582
+ version: options?.version?.trim()
1583
+ || process.env.XRK_PRODUCT_VERSION?.trim()
1584
+ || "0.0.0",
1529
1585
  defaultAgentPreset: canonicalAgentPresetId(config.runtime.preset),
1530
1586
  registry,
1531
1587
  attachments,
@@ -1571,7 +1627,7 @@ export function createHostManager() {
1571
1627
  ...(options?.reloadIds !== undefined
1572
1628
  ? { reloadIds: options.reloadIds }
1573
1629
  : {}),
1574
- preserveIds: [DSH_COMPAT_HOST_PLUGIN_ID],
1630
+ preserveIds: [...builtInPreserveIds],
1575
1631
  });
1576
1632
  loadedPluginIds = [...synced.ids];
1577
1633
  for (const failure of synced.failures) {
@@ -1630,10 +1686,12 @@ export function createHostManager() {
1630
1686
  ...(config.runtime.policyFile
1631
1687
  ? { settingsDocumentPath: path.resolve(config.runtime.policyFile) }
1632
1688
  : {}),
1633
- invalidateAgent: (sessionId) => deferBusyAgentInvalidate({
1689
+ invalidateAgent: (sessionId, opts) => deferBusyAgentInvalidate({
1634
1690
  sessionId,
1635
1691
  drainActive: drainActiveBox.isActive(sessionId),
1636
1692
  busy: agentCache.isBusy(sessionId),
1693
+ materializing: agentCache.isMaterializing(sessionId),
1694
+ ...(opts?.force === true ? { force: true } : {}),
1637
1695
  defer: (id) => {
1638
1696
  pendingAgentInvalidate.add(id);
1639
1697
  },
@@ -2070,7 +2128,7 @@ export function createHostManager() {
2070
2128
  : undefined;
2071
2129
  const localeNs = faceRuntime.settingsNamespaces.view("locale")
2072
2130
  .value;
2073
- const asLocale = (raw) => raw === "zh" || raw === "en" ? raw : undefined;
2131
+ const asLocale = (raw) => raw === "zh" || raw === "en" || raw === "ja" ? raw : undefined;
2074
2132
  // Explicit Settings choice wins; older desktop builds stored the shell
2075
2133
  // language in the `ui` namespace (`ui.locale`) and never wrote
2076
2134
  // `locale.preference`, so honour it instead of dropping to the
@@ -2229,27 +2287,56 @@ export function createHostManager() {
2229
2287
  slot.revision,
2230
2288
  ]);
2231
2289
  };
2232
- const mobileAccessGate = createMobileAccessGateChecker({
2290
+ const bindHost = String(config.runtime.host ?? "127.0.0.1").trim();
2291
+ const ownLanHosts = (() => {
2292
+ const h = bindHost.toLowerCase();
2293
+ const m = /^(\d+)\.(\d+)\.(\d+)\.(\d+)$/.exec(h);
2294
+ if (!m)
2295
+ return [];
2296
+ const a = Number(m[1]);
2297
+ const b = Number(m[2]);
2298
+ if (a === 10 ||
2299
+ (a === 192 && b === 168) ||
2300
+ (a === 172 && b >= 16 && b <= 31) ||
2301
+ (a === 169 && b === 254)) {
2302
+ return [h];
2303
+ }
2304
+ return [];
2305
+ })();
2306
+ const mobileAccessOptions = {
2233
2307
  xrkHome: resolveXrkHome(),
2234
- });
2235
- const faceCheckAuth = (r) => {
2236
- if (!mobileAccessGate(r))
2237
- return false;
2238
- const expected = effectiveHostApiKey(faceRuntime);
2239
- if (!expected)
2240
- return true;
2308
+ ...(ownLanHosts.length > 0 ? { ownLanHosts } : {}),
2309
+ };
2310
+ const pinAccessGate = createMobileAccessGateChecker(mobileAccessOptions);
2311
+ const pinAccessHandler = createMobileAccessGateHandler(mobileAccessOptions);
2312
+ /** Bearer / x-api-key for automation; elevates past PIN on WAN/LAN. */
2313
+ const requestHostApiKey = (r) => {
2241
2314
  const auth = r.headers.authorization;
2242
2315
  const headerKey = r.headers["x-api-key"];
2243
2316
  const bearer = typeof auth === "string" && auth.startsWith("Bearer ")
2244
2317
  ? auth.slice("Bearer ".length)
2245
2318
  : undefined;
2246
- const key = bearer ?? (typeof headerKey === "string" ? headerKey : undefined);
2247
- if (timingSafeStringEqual(key, expected))
2248
- return true;
2249
- // DSH Web 同源不带 Authorization;本机回环放行。
2250
- return !key && isLoopbackAddress(r.socket.remoteAddress);
2319
+ return (bearer ?? (typeof headerKey === "string" ? headerKey : undefined));
2320
+ };
2321
+ const apiKeyElevates = (r) => {
2322
+ const expected = effectiveHostApiKey(faceRuntime);
2323
+ if (!expected)
2324
+ return false;
2325
+ return timingSafeStringEqual(requestHostApiKey(r), expected);
2326
+ };
2327
+ // Loopback / bind LAN free; WAN + foreign LAN need PIN *or* Host API key.
2328
+ // Browser after PIN must not also need XRK_API_KEY (shell omits Authorization).
2329
+ const mobileAccessGate = (r) => pinAccessGate(r) || apiKeyElevates(r);
2330
+ const faceCheckAuth = (r) => mobileAccessGate(r);
2331
+ const mobileAccessPublicHandler = async (req, res) => {
2332
+ if (apiKeyElevates(req))
2333
+ return false;
2334
+ return pinAccessHandler(req, res);
2251
2335
  };
2252
2336
  await ensureDshCompatHostPlugin(loader);
2337
+ // 向日葵免费车道:随产品内置的 LLM 插件。车道不可达时插件返回空
2338
+ // `llmBrands`,该 provider 不会进入 registry/catalog,启动不受影响。
2339
+ await ensureSunflowerFreePlugin(loader);
2253
2340
  refreshFacePlugins();
2254
2341
  const hostWireCtx = {
2255
2342
  pluginsDir: resolvedPluginsDir,
@@ -2416,7 +2503,7 @@ export function createHostManager() {
2416
2503
  return undefined;
2417
2504
  }
2418
2505
  },
2419
- }), createMobileAccessGateHandler({ xrkHome: resolveXrkHome() }), createSidebarPublicHandler({
2506
+ }), mobileAccessPublicHandler, createSidebarPublicHandler({
2420
2507
  xrkHome: resolveXrkHome(),
2421
2508
  defaultCwd: faceRuntime.workspaceRoot,
2422
2509
  resolveSessionCwd: (sessionId) => resolveSessionCwd(faceRuntime, sessionId),
@@ -2526,15 +2613,25 @@ export function createHostManager() {
2526
2613
  const addr = shouldListen
2527
2614
  ? await http.listen()
2528
2615
  : { host: config.runtime.host, port: 0 };
2616
+ process.env.XRK_SERVE_HOST = String(addr.host);
2617
+ process.env.XRK_SERVE_PORT = String(addr.port);
2529
2618
  if (shouldListen) {
2530
2619
  log?.info(`listening ${config.runtime.host}:${addr.port}`);
2620
+ const armed = armAccessGateForListen(mobileAccessOptions, String(addr.host), addr.port);
2621
+ if (armed.armed) {
2622
+ log?.info(`access gate armed · open ${armed.origin} · PIN ${armed.wanToken} (non-bind / public Host)`);
2623
+ }
2531
2624
  }
2532
2625
  else {
2533
2626
  log?.info("http stack ready (listen disabled — pipe / fetch transport)");
2534
2627
  }
2535
2628
  if (deferManagedPlugins) {
2536
2629
  void loadManagedPlugins()
2537
- .then(() => {
2630
+ .then(async () => {
2631
+ // Defense in depth: if preserveIds ever drops sunflower, re-ensure
2632
+ // so SIDECAR_KEY / sidecar stay alive for the free lane.
2633
+ await ensureSunflowerFreePlugin(loader);
2634
+ refreshFacePlugins();
2538
2635
  rebuildPolicyEngine();
2539
2636
  log?.info(`desktop process plugins ready (${String(loadedPluginIds.length)})`);
2540
2637
  })