@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
@@ -0,0 +1,137 @@
1
+ /**
2
+ * Turn-start `<seat_identity>` — who you are, who is speaking, who you report to.
3
+ * Keeps standing / playbook free of long identity theater.
4
+ */
5
+ import { MANAGER_MEMBER_ID, MEMBER_NICKNAME_MAX, SUNFLOWER_MEMBER_ID, } from "./agent-roster-store.js";
6
+ import { readSeatTitles, readUiLocalePreference, } from "./seat-titles.js";
7
+ import { XIANGYANG_WORKSPACE_ID } from "./xiangyang-workspace.js";
8
+ const BOSS_NICKNAME_MAX = 24;
9
+ /** Formal name with optional nickname: `经理(阿葵)`. */
10
+ export function formatNamedSeat(formal, nickname) {
11
+ const name = formal.trim() || "?";
12
+ const nick = nickname?.trim();
13
+ if (!nick)
14
+ return name;
15
+ return `${name}(${nick})`;
16
+ }
17
+ export function clipNickname(raw, max = MEMBER_NICKNAME_MAX) {
18
+ if (typeof raw !== "string")
19
+ return undefined;
20
+ const trimmed = raw.trim().slice(0, max);
21
+ return trimmed || undefined;
22
+ }
23
+ function readBossNickname(presenceUser) {
24
+ return clipNickname(presenceUser?.bossNickname, BOSS_NICKNAME_MAX);
25
+ }
26
+ function bossSeatLabel(titles, nickname) {
27
+ return formatNamedSeat(titles.boss, nickname);
28
+ }
29
+ function resolveMemberSeat(runtime, memberId, titles) {
30
+ const home = runtime.agentRoster.findHome(memberId);
31
+ const member = home
32
+ ? runtime.agentRoster.get(home.rosterWorkspaceId, memberId)
33
+ : undefined;
34
+ const formal = memberId === MANAGER_MEMBER_ID
35
+ ? titles.manager
36
+ : member?.name?.trim() || memberId;
37
+ const nick = memberId === SUNFLOWER_MEMBER_ID
38
+ ? undefined
39
+ : clipNickname(member?.nickname);
40
+ return { id: memberId, label: formatNamedSeat(formal, nick) };
41
+ }
42
+ function managerSeat(runtime, titles) {
43
+ return resolveMemberSeat(runtime, MANAGER_MEMBER_ID, titles).label;
44
+ }
45
+ /**
46
+ * Compact seat card for the current session. Empty when the session is unknown.
47
+ */
48
+ export function formatSeatIdentity(runtime, sessionId) {
49
+ if (!runtime.store.has(sessionId))
50
+ return "";
51
+ const presenceUser = runtime.settingsNamespaces.view("ui-presence")
52
+ .value;
53
+ const localeUser = runtime.settingsNamespaces.view("locale")
54
+ .value;
55
+ const titles = readSeatTitles(presenceUser, readUiLocalePreference(localeUser));
56
+ const bossNick = readBossNickname(presenceUser);
57
+ const boss = bossSeatLabel(titles, bossNick);
58
+ const titlesLine = `titles: ${titles.boss} / ${titles.manager} / ${titles.agent}`;
59
+ const childLink = runtime.subagents.getByChild(sessionId);
60
+ if (childLink && childLink.mode !== "fork") {
61
+ const you = childLink.memberId
62
+ ? resolveMemberSeat(runtime, childLink.memberId, titles).label
63
+ : childLink.label.trim() || titles.agent;
64
+ const parentId = childLink.parentSessionId;
65
+ const parentIdentity = runtime.sessionIdentities.get(parentId);
66
+ const parentWs = runtime.workspaces.workspaceIdOf(parentId);
67
+ let parent;
68
+ if (parentIdentity) {
69
+ parent = resolveMemberSeat(runtime, parentIdentity.memberId, titles).label;
70
+ }
71
+ else if (parentWs === XIANGYANG_WORKSPACE_ID) {
72
+ parent = resolveMemberSeat(runtime, SUNFLOWER_MEMBER_ID, titles).label;
73
+ }
74
+ else {
75
+ parent = managerSeat(runtime, titles);
76
+ }
77
+ const humanFace = runtime.subagents.humanFacingSessionId(sessionId);
78
+ return [
79
+ `you: ${you} (subagent)`,
80
+ `speaker: ${boss} (human_face=${humanFace})`,
81
+ `parent: ${parent}`,
82
+ `report: FINAL→parent; ask→parent (card on parent session — ${titles.manager} when parent is ${titles.manager})`,
83
+ titlesLine,
84
+ ].join("\n");
85
+ }
86
+ const identity = runtime.sessionIdentities.get(sessionId);
87
+ if (identity) {
88
+ const you = resolveMemberSeat(runtime, identity.memberId, titles).label;
89
+ return [
90
+ `you: ${you} (agent-home)`,
91
+ `speaker: ${boss}`,
92
+ // Same-lane only: agent-home ↔ agent-home. Project / 向阳 / IM are another lane.
93
+ `collab: other agent-home peers via thread_message (not project/向阳/IM sessions)`,
94
+ `report: ${titles.boss}`,
95
+ titlesLine,
96
+ ].join("\n");
97
+ }
98
+ const ws = runtime.workspaces.workspaceIdOf(sessionId);
99
+ if (ws === XIANGYANG_WORKSPACE_ID) {
100
+ const you = resolveMemberSeat(runtime, SUNFLOWER_MEMBER_ID, titles).label;
101
+ return [
102
+ `you: ${you} (xiangyang)`,
103
+ `speaker: ${boss}`,
104
+ `report: ${titles.boss}`,
105
+ "nickname: locked",
106
+ titlesLine,
107
+ ].join("\n");
108
+ }
109
+ return [
110
+ `you: ${managerSeat(runtime, titles)} (project)`,
111
+ `speaker: ${boss}`,
112
+ `report: ${titles.boss}`,
113
+ titlesLine,
114
+ ].join("\n");
115
+ }
116
+ export function createSeatIdentityFragmentProvider(runtime) {
117
+ return {
118
+ id: "seat-identity",
119
+ phases: ["turn-start"],
120
+ produce({ sessionId }) {
121
+ const value = formatSeatIdentity(runtime, sessionId);
122
+ if (!value)
123
+ return [];
124
+ return [
125
+ {
126
+ id: "additional_context.seat_identity",
127
+ kind: "additional_context",
128
+ text: `<seat_identity>\n${value}\n</seat_identity>`,
129
+ phase: "turn-start",
130
+ // After boss-status (8.2), ahead of collab board (8).
131
+ priority: 8.1,
132
+ },
133
+ ];
134
+ },
135
+ };
136
+ }
137
+ //# sourceMappingURL=seat-identity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"seat-identity.js","sourceRoot":"","sources":["../src/seat-identity.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EACL,iBAAiB,EACjB,mBAAmB,EACnB,mBAAmB,GACpB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,cAAc,EACd,sBAAsB,GAEvB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAElE,MAAM,iBAAiB,GAAG,EAAE,CAAC;AAE7B,oDAAoD;AACpD,MAAM,UAAU,eAAe,CAC7B,MAAc,EACd,QAA4B;IAE5B,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,EAAE,IAAI,GAAG,CAAC;IAClC,MAAM,IAAI,GAAG,QAAQ,EAAE,IAAI,EAAE,CAAC;IAC9B,IAAI,CAAC,IAAI;QAAE,OAAO,IAAI,CAAC;IACvB,OAAO,GAAG,IAAI,IAAI,IAAI,GAAG,CAAC;AAC5B,CAAC;AAED,MAAM,UAAU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C;IAED,MAAM,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC;IACvD,IAAI,EAAE,KAAK,sBAAsB,EAAE,CAAC;QAClC,MAAM,GAAG,GAAG,iBAAiB,CAAC,OAAO,EAAE,mBAAmB,EAAE,MAAM,CAAC,CAAC,KAAK,CAAC;QAC1E,OAAO;YACL,QAAQ,GAAG,cAAc;YACzB,YAAY,IAAI,EAAE;YAClB,WAAW,MAAM,CAAC,IAAI,EAAE;YACxB,kBAAkB;YAClB,UAAU;SACX,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACf,CAAC;IAED,OAAO;QACL,QAAQ,WAAW,CAAC,OAAO,EAAE,MAAM,CAAC,YAAY;QAChD,YAAY,IAAI,EAAE;QAClB,WAAW,MAAM,CAAC,IAAI,EAAE;QACxB,UAAU;KACX,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACf,CAAC;AAED,MAAM,UAAU,kCAAkC,CAAC,OAAoB;IAWrE,OAAO;QACL,EAAE,EAAE,eAAe;QACnB,MAAM,EAAE,CAAC,YAAY,CAAC;QACtB,OAAO,CAAC,EAAE,SAAS,EAAE;YACnB,MAAM,KAAK,GAAG,kBAAkB,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;YACrD,IAAI,CAAC,KAAK;gBAAE,OAAO,EAAE,CAAC;YACtB,OAAO;gBACL;oBACE,EAAE,EAAE,kCAAkC;oBACtC,IAAI,EAAE,oBAAoB;oBAC1B,IAAI,EAAE,oBAAoB,KAAK,oBAAoB;oBACnD,KAAK,EAAE,YAAY;oBACnB,sDAAsD;oBACtD,QAAQ,EAAE,GAAG;iBACd;aACF,CAAC;QACJ,CAAC;KACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Classic three-tier seat titles for inject + Overview.
3
+ * Live in Settings `ui-presence` — independent of the presence-ball appearance
4
+ * switch. Built-in presets are locale-aware (zh/en/ja); optional
5
+ * `titleBoss` / `titleManager` / `titleAgent` are free-form (any language).
6
+ */
7
+ export declare const SEAT_TITLE_SCHEMES: readonly ["office", "corp", "crew", "guild"];
8
+ export type SeatTitleSchemeId = (typeof SEAT_TITLE_SCHEMES)[number];
9
+ export type SeatTitleLocale = "zh" | "en" | "ja";
10
+ export type SeatTitles = {
11
+ readonly boss: string;
12
+ readonly manager: string;
13
+ readonly agent: string;
14
+ };
15
+ export declare const DEFAULT_SEAT_TITLE_SCHEME: SeatTitleSchemeId;
16
+ export declare const SEAT_TITLE_MAX = 24;
17
+ export declare function isSeatTitleSchemeId(raw: unknown): raw is SeatTitleSchemeId;
18
+ /** Legacy `en` preset → office (English copy comes from locale, not scheme id). */
19
+ export declare function parseSeatTitleScheme(raw: unknown): SeatTitleSchemeId;
20
+ export declare function parseSeatTitleLocale(raw: unknown): SeatTitleLocale;
21
+ export declare function seatTitlesForScheme(scheme: SeatTitleSchemeId, locale?: SeatTitleLocale): SeatTitles;
22
+ export declare function clipSeatTitle(raw: unknown, max?: number): string;
23
+ /**
24
+ * Custom fields win (any language). Empty → built-in preset in the given locale.
25
+ */
26
+ export declare function readSeatTitles(presenceUser: Record<string, unknown> | undefined, localeRaw?: unknown): SeatTitles;
27
+ /** Preference from Settings `locale` namespace (`zh` | `en` | `ja`). */
28
+ export declare function readUiLocalePreference(localeUser: Record<string, unknown> | undefined): SeatTitleLocale;
29
+ //# sourceMappingURL=seat-titles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"seat-titles.d.ts","sourceRoot":"","sources":["../src/seat-titles.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,eAAO,MAAM,kBAAkB,8CAKrB,CAAC;AAEX,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,kBAAkB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEpE,MAAM,MAAM,eAAe,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAEjD,MAAM,MAAM,UAAU,GAAG;IACvB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF,eAAO,MAAM,yBAAyB,EAAE,iBAA4B,CAAC;AACrE,eAAO,MAAM,cAAc,KAAK,CAAC;AA2BjC,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,iBAAiB,CAK1E;AAED,mFAAmF;AACnF,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,OAAO,GAAG,iBAAiB,CAGpE;AAED,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,OAAO,GAAG,eAAe,CAElE;AAED,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,iBAAiB,EACzB,MAAM,GAAE,eAAsB,GAC7B,UAAU,CAEZ;AAED,wBAAgB,aAAa,CAAC,GAAG,EAAE,OAAO,EAAE,GAAG,SAAiB,GAAG,MAAM,CAGxE;AAED;;GAEG;AACH,wBAAgB,cAAc,CAC5B,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,EACjD,SAAS,CAAC,EAAE,OAAO,GAClB,UAAU,CAWZ;AAED,wEAAwE;AACxE,wBAAgB,sBAAsB,CACpC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,GAC9C,eAAe,CAEjB"}
@@ -0,0 +1,74 @@
1
+ /**
2
+ * Classic three-tier seat titles for inject + Overview.
3
+ * Live in Settings `ui-presence` — independent of the presence-ball appearance
4
+ * switch. Built-in presets are locale-aware (zh/en/ja); optional
5
+ * `titleBoss` / `titleManager` / `titleAgent` are free-form (any language).
6
+ */
7
+ export const SEAT_TITLE_SCHEMES = [
8
+ "office",
9
+ "corp",
10
+ "crew",
11
+ "guild",
12
+ ];
13
+ export const DEFAULT_SEAT_TITLE_SCHEME = "office";
14
+ export const SEAT_TITLE_MAX = 24;
15
+ const SCHEME_TITLES = {
16
+ office: {
17
+ zh: { boss: "老板", manager: "经理", agent: "干员" },
18
+ en: { boss: "Boss", manager: "Manager", agent: "Agent" },
19
+ ja: { boss: "ボス", manager: "マネージャー", agent: "エージェント" },
20
+ },
21
+ corp: {
22
+ zh: { boss: "总裁", manager: "主管", agent: "专员" },
23
+ en: { boss: "CEO", manager: "Lead", agent: "Specialist" },
24
+ ja: { boss: "社長", manager: "課長", agent: "担当" },
25
+ },
26
+ crew: {
27
+ zh: { boss: "船长", manager: "大副", agent: "水手" },
28
+ en: { boss: "Captain", manager: "First mate", agent: "Crew" },
29
+ ja: { boss: "船長", manager: "一等航海士", agent: "船員" },
30
+ },
31
+ guild: {
32
+ zh: { boss: "会长", manager: "干部", agent: "成员" },
33
+ en: { boss: "Guild master", manager: "Officer", agent: "Member" },
34
+ ja: { boss: "会長", manager: "幹部", agent: "メンバー" },
35
+ },
36
+ };
37
+ export function isSeatTitleSchemeId(raw) {
38
+ return (typeof raw === "string"
39
+ && SEAT_TITLE_SCHEMES.includes(raw));
40
+ }
41
+ /** Legacy `en` preset → office (English copy comes from locale, not scheme id). */
42
+ export function parseSeatTitleScheme(raw) {
43
+ if (raw === "en")
44
+ return "office";
45
+ return isSeatTitleSchemeId(raw) ? raw : DEFAULT_SEAT_TITLE_SCHEME;
46
+ }
47
+ export function parseSeatTitleLocale(raw) {
48
+ return raw === "en" || raw === "ja" ? raw : "zh";
49
+ }
50
+ export function seatTitlesForScheme(scheme, locale = "zh") {
51
+ return SCHEME_TITLES[scheme][locale];
52
+ }
53
+ export function clipSeatTitle(raw, max = SEAT_TITLE_MAX) {
54
+ if (typeof raw !== "string")
55
+ return "";
56
+ return raw.trim().slice(0, max);
57
+ }
58
+ /**
59
+ * Custom fields win (any language). Empty → built-in preset in the given locale.
60
+ */
61
+ export function readSeatTitles(presenceUser, localeRaw) {
62
+ const locale = parseSeatTitleLocale(localeRaw);
63
+ const defaults = seatTitlesForScheme(parseSeatTitleScheme(presenceUser?.titleScheme), locale);
64
+ return {
65
+ boss: clipSeatTitle(presenceUser?.titleBoss) || defaults.boss,
66
+ manager: clipSeatTitle(presenceUser?.titleManager) || defaults.manager,
67
+ agent: clipSeatTitle(presenceUser?.titleAgent) || defaults.agent,
68
+ };
69
+ }
70
+ /** Preference from Settings `locale` namespace (`zh` | `en` | `ja`). */
71
+ export function readUiLocalePreference(localeUser) {
72
+ return parseSeatTitleLocale(localeUser?.preference);
73
+ }
74
+ //# sourceMappingURL=seat-titles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"seat-titles.js","sourceRoot":"","sources":["../src/seat-titles.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,QAAQ;IACR,MAAM;IACN,MAAM;IACN,OAAO;CACC,CAAC;AAYX,MAAM,CAAC,MAAM,yBAAyB,GAAsB,QAAQ,CAAC;AACrE,MAAM,CAAC,MAAM,cAAc,GAAG,EAAE,CAAC;AAEjC,MAAM,aAAa,GAEf;IACF,MAAM,EAAE;QACN,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE;QAC9C,EAAE,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,OAAO,EAAE;QACxD,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE;KACvD;IACD,IAAI,EAAE;QACJ,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE;QAC9C,EAAE,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,YAAY,EAAE;QACzD,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EA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4,7 +4,7 @@
4
4
  * per-session axes. Orthogonal to collab board / session_posture.
5
5
  */
6
6
  import { readSessionEvents } from "@xrkseek/core-session";
7
- import { effectiveApprovalPolicy, effectiveSandboxMode, foldPlanMode, pathAccessModeFromSandbox, shouldConfineSandbox, } from "@xrkseek/protocol";
7
+ import { effectiveApprovalPolicy, effectiveSandboxMode, pathAccessModeFromSandbox, shouldConfineSandbox, } from "@xrkseek/protocol";
8
8
  import { FACE_PERMISSION_TABLE, formatPermissionStatusLabel, permissionSelectFromEvents, resolvePermissionPresetSpec, } from "./permissions.js";
9
9
  import { effectiveSessionAgentPreset } from "./session-agent-preset.js";
10
10
  import { resolveAgentPresetProfile } from "./presets-catalog.js";
@@ -13,6 +13,7 @@ import { resolveSessionCwd } from "./session-cwd.js";
13
13
  import { roleCapsHint, roleDeniedTools } from "./agent-team-roles.js";
14
14
  import { DELEGATED_INHERIT_DENY } from "./agent-roster-store.js";
15
15
  import { formatMemberPackInventoryLines, listMemberPackInventory, } from "./agent-member-pack.js";
16
+ import { subagentDepth } from "./subagent-tools.js";
16
17
  /** Affirmative permission copy for the model (path gate only). */
17
18
  function permissionBrief(permission) {
18
19
  const known = resolvePermissionPresetSpec(permission, true)
@@ -36,7 +37,7 @@ function surfaceBrief(badge) {
36
37
  case "shell":
37
38
  return "kind=coding_parent · fs+bash+PTY — no web/lsp/subagents/peers.";
38
39
  case "frugal":
39
- return "kind=coding_parent · full tools + peers · no subagents — one session; xrk-plan-build for large work.";
40
+ return "kind=coding_parent · full tools + peers · no subagents — one session; large work: outline → ask → todo_write → build.";
40
41
  case "shallow":
41
42
  return "kind=coding_parent · full tools + subagents + peers — spawn when parallel helps (per-model live session cap).";
42
43
  case "harness":
@@ -103,18 +104,23 @@ function formatDelegatedCapability(runtime, sessionId) {
103
104
  const briefcase = link.memberId
104
105
  ? advancedBriefcaseCapabilityLines(runtime, link.memberId)
105
106
  : [];
107
+ const depth = subagentDepth(runtime, sessionId);
108
+ const nestBrief = depth <= 1
109
+ ? "L1 child — report FINAL to parent; no identity theater beyond playbook + seat_identity."
110
+ : `L${depth} nested — stay narrow; FINAL bubbles one parent at a time; do not restate manager standing.`;
106
111
  const lines = [
107
112
  "kind: delegated_child",
108
113
  `parent: ${link.parentSessionId}`,
109
114
  `you: ${sessionId}`,
110
115
  `human_face: ${humanFace}`,
116
+ `depth: ${depth}`,
111
117
  `role: ${role}`,
112
118
  `caps: ${roleCapsHint(link.role)}`,
113
119
  `cwd: ${cwd}`,
114
120
  ...briefcase,
115
121
  ...(link.memberId ? [`member_id: ${link.memberId}`] : []),
116
122
  ...(link.label.trim() ? [`label: ${link.label.trim()}`] : []),
117
- "brief: FINAL→parent (only visible result; include hard failures). ask→human_face. siblings→thread_message. catalog=truth. no self-spawn unless tasked.",
123
+ `brief: ${nestBrief} FINAL→parent (only visible result; include hard failures). ask→parent (card on parent session). siblings→thread_message. catalog=truth. no self-spawn unless tasked.`,
118
124
  `omitted: ${omittedChildTools(link.role)}`,
119
125
  ...childGapLines(runtime, sessionId),
120
126
  ];
@@ -154,7 +160,6 @@ export function formatSessionCapability(runtime, sessionId) {
154
160
  const approval = effectiveApprovalPolicy(events);
155
161
  const badge = effectiveSessionAgentPreset(runtime, sessionId);
156
162
  const allowN = runtime.pathAllowlist.count(sessionId);
157
- const planOn = foldPlanMode(events);
158
163
  const tools = runtime.tools?.list() ?? [];
159
164
  const counts = countExposures(tools);
160
165
  const expanded = runtime.toolDisclosure.count(sessionId);
@@ -171,8 +176,6 @@ export function formatSessionCapability(runtime, sessionId) {
171
176
  `path_allowlist: ${allowN} objects (session+settings)`,
172
177
  `tools: direct=${counts.direct} deferred=${counts.deferred} expanded=${expanded}`,
173
178
  ];
174
- if (planOn)
175
- lines.push("plan: on");
176
179
  lines.push(...childGapLines(runtime, sessionId));
177
180
  return lines.join("\n");
178
181
  }
@@ -1 +1 @@
1
- {"version":3,"file":"session-capability.js","sourceRoot":"","sources":["../src/session-capability.ts"],"names":[],"mappings":"AAAA;;;;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eq(i) === i + 1`); store indices are 0-based.
4
+ */
5
+ import { type SessionStore } from "@xrkseek/core-session";
6
+ import type { FaceRpcResult } from "./types.js";
7
+ /** Default / hard cap for `before` and `after` (DSH `SESSION_QUERY_READ_WINDOW_MAX`). */
8
+ export declare const SESSION_EVENT_WINDOW_MAX = 50;
9
+ export interface SessionEventWindowRow {
10
+ /** Face wire seq (1-based). */
11
+ readonly seq: number;
12
+ readonly type: string;
13
+ readonly ts: number;
14
+ }
15
+ export interface SessionEventWindowValue {
16
+ readonly sessionId: string;
17
+ /** Requested target Face seq. */
18
+ readonly seq: number;
19
+ /** First Face seq included in `events` (inclusive). */
20
+ readonly startSeq: number;
21
+ /** Last Face seq included in `events` (inclusive). */
22
+ readonly endSeq: number;
23
+ readonly events: readonly SessionEventWindowRow[];
24
+ }
25
+ export interface SessionEventWindowRequest {
26
+ readonly sessionId: string;
27
+ readonly seq: number;
28
+ readonly before: number;
29
+ readonly after: number;
30
+ }
31
+ export declare function parseEventWindowPayload(payload: unknown): FaceRpcResult<SessionEventWindowRequest>;
32
+ /**
33
+ * Read `[seq-before, seq+after]` clamped to the log.
34
+ * Missing target seq → `undefined` (caller maps to not-found).
35
+ */
36
+ export declare function readSessionEventWindow(store: SessionStore, request: SessionEventWindowRequest): SessionEventWindowValue | undefined;
37
+ //# sourceMappingURL=session-event-window.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"session-event-window.d.ts","sourceRoot":"","sources":["../src/session-event-window.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAIL,KAAK,YAAY,EAClB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAEhD,yFAAyF;AACzF,eAAO,MAAM,wBAAwB,KAAK,CAAC;AAE3C,MAAM,WAAW,qBAAqB;IACpC,+BAA+B;IAC/B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,iCAAiC;IACjC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,uDAAuD;IACvD,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,sDAAsD;IACtD,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,MAAM,EAAE,SAAS,qBAAqB,EAAE,CAAC;CACnD;AAED,MAAM,WAAW,yBAAyB;IACxC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB;AAUD,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,OAAO,GACf,aAAa,CAAC,yBAAyB,CAAC,CA2C1C;AAMD;;;GAGG;AACH,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,YAAY,EACnB,OAAO,EAAE,yBAAyB,GACjC,uBAAuB,GAAG,SAAS,CA0BrC"}
@@ -0,0 +1,88 @@
1
+ /**
2
+ * Bounded raw-log window around one Face seq (DSH `readEvent` / SessionEventWindow).
3
+ * Face seq is 1-based (`eventSeq(i) === i + 1`); store indices are 0-based.
4
+ */
5
+ import { readSessionEvents, SessionLogOffset, sessionEventCount, } from "@xrkseek/core-session";
6
+ /** Default / hard cap for `before` and `after` (DSH `SESSION_QUERY_READ_WINDOW_MAX`). */
7
+ export const SESSION_EVENT_WINDOW_MAX = 50;
8
+ function clampWindowSide(raw, fallback) {
9
+ if (raw === undefined)
10
+ return fallback;
11
+ if (typeof raw !== "number" || !Number.isSafeInteger(raw) || raw < 0) {
12
+ return undefined;
13
+ }
14
+ return Math.min(raw, SESSION_EVENT_WINDOW_MAX);
15
+ }
16
+ export function parseEventWindowPayload(payload) {
17
+ if (!payload || typeof payload !== "object" || Array.isArray(payload)) {
18
+ return {
19
+ ok: false,
20
+ error: { code: "invalid-payload", message: "sessionId and seq required" },
21
+ };
22
+ }
23
+ const body = payload;
24
+ const sessionId = typeof body.sessionId === "string" ? body.sessionId.trim() : "";
25
+ if (!sessionId) {
26
+ return {
27
+ ok: false,
28
+ error: { code: "invalid-payload", message: "sessionId required" },
29
+ };
30
+ }
31
+ if (typeof body.seq !== "number" ||
32
+ !Number.isSafeInteger(body.seq) ||
33
+ body.seq < 1) {
34
+ return {
35
+ ok: false,
36
+ error: {
37
+ code: "invalid-payload",
38
+ message: "seq must be a positive Face wire seq",
39
+ },
40
+ };
41
+ }
42
+ const before = clampWindowSide(body.before, 3);
43
+ const after = clampWindowSide(body.after, 3);
44
+ if (before === undefined || after === undefined) {
45
+ return {
46
+ ok: false,
47
+ error: {
48
+ code: "invalid-payload",
49
+ message: `before/after must be integers in 0..${SESSION_EVENT_WINDOW_MAX}`,
50
+ },
51
+ };
52
+ }
53
+ return {
54
+ ok: true,
55
+ value: { sessionId, seq: body.seq, before, after },
56
+ };
57
+ }
58
+ function toRow(event, seq) {
59
+ return { seq, type: event.type, ts: event.ts };
60
+ }
61
+ /**
62
+ * Read `[seq-before, seq+after]` clamped to the log.
63
+ * Missing target seq → `undefined` (caller maps to not-found).
64
+ */
65
+ export function readSessionEventWindow(store, request) {
66
+ if (!store.has(request.sessionId))
67
+ return undefined;
68
+ const length = sessionEventCount(store, request.sessionId);
69
+ if (request.seq < 1 || request.seq > length)
70
+ return undefined;
71
+ const targetIndex = request.seq - 1;
72
+ const from = Math.max(0, targetIndex - request.before);
73
+ const toExclusive = Math.min(length, targetIndex + request.after + 1);
74
+ const slice = readSessionEvents(store, request.sessionId, SessionLogOffset(from), SessionLogOffset(toExclusive));
75
+ const events = [];
76
+ for (let i = 0; i < slice.length; i += 1) {
77
+ const event = slice[i];
78
+ events.push(toRow(event, from + i + 1));
79
+ }
80
+ return {
81
+ sessionId: request.sessionId,
82
+ seq: request.seq,
83
+ startSeq: from + 1,
84
+ endSeq: toExclusive,
85
+ events,
86
+ };
87
+ }
88
+ //# sourceMappingURL=session-event-window.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"session-event-window.js","sourceRoot":"","sources":["../src/session-event-window.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EACL,iBAAiB,EACjB,gBAAgB,EAChB,iBAAiB,GAElB,MAAM,uBAAuB,CAAC;AAI/B,yFAAyF;AACzF,MAAM,CAAC,MAAM,wBAAwB,GAAG,EAAE,CAAC;AA2B3C,SAAS,eAAe,CAAC,GAAY,EAAE,QAAgB;IACrD,IAAI,GAAG,KAAK,SAAS;QAAE,OAAO,QAAQ,CAAC;IACvC,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,GAAG,CAAC,IAAI,GAAG,GAAG,CAAC,EAAE,CAAC;QACrE,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,wBAAwB,CAAC,CAAC;AACjD,CAAC;AAED,MAAM,UAAU,uBAAuB,CACrC,OAAgB;IAEhB,IAAI,CAAC,OAAO,IAAI,OAAO,OAAO,KAAK,QAAQ,IAAI,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC;QACtE,OAAO;YACL,EAAE,EAAE,KAAK;YACT,KAAK,EAAE,EAAE,IAAI,EAAE,iBAAiB,EAAE,OAAO,EAAE,4BAA4B,EAAE;SAC1E,CAAC;IACJ,CAAC;IACD,MAAM,IAAI,GAAG,OAAkC,CAAC;IAChD,MAAM,SAAS,GAAG,OAAO,IAAI,CAAC,SAAS,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;IAClF,IAAI,CAAC,SAAS,EAAE,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readonly workspaceId: string;
5
+ }
6
+ export declare class FaceSessionIdentityStore {
7
+ private readonly bySession;
8
+ private readonly persistPath;
9
+ constructor(persistPath?: string);
10
+ get(sessionId: string): SessionIdentityBinding | undefined;
11
+ bind(binding: SessionIdentityBinding): void;
12
+ forget(sessionId: string): void;
13
+ list(): readonly SessionIdentityBinding[];
14
+ private load;
15
+ private save;
16
+ }
17
+ export declare function sessionIdentitiesPath(productHome: string): string;
18
+ /** Async mkdir helper for Hosts that prefer await before first write. */
19
+ export declare function ensureSessionIdentitiesDir(productHome: string): Promise<string>;
20
+ //# sourceMappingURL=session-identity-store.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"session-identity-store.d.ts","sourceRoot":"","sources":["../src/session-identity-store.ts"],"names":[],"mappings":"AASA,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;CAC9B;AAOD,qBAAa,wBAAwB;IACnC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAA6C;IACvE,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAqB;gBAErC,WAAW,CAAC,EAAE,MAAM;IAKhC,GAAG,CAAC,SAAS,EAAE,MAAM,GAAG,sBAAsB,GAAG,SAAS;IAI1D,IAAI,CAAC,OAAO,EAAE,sBAAsB,GAAG,IAAI;IAS3C,MAAM,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI;IAK/B,IAAI,IAAI,SAAS,sBAAsB,EAAE;IAIzC,OAAO,CAAC,IAAI;IAoBZ,OAAO,CAAC,IAAI;CASb;AAED,wBAAgB,qBAAqB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAEjE;AAED,yEAAyE;AACzE,wBAAsB,0BAA0B,CAC9C,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC,MAAM,CAAC,CAKjB"}
@@ -0,0 +1,82 @@
1
+ /**
2
+ * Top-level identity sessions: main Agent = a roster 干员 (not a subagent child).
3
+ * Persists `{harnessHome}/session-identities.json`.
4
+ */
5
+ import { readFileSync } from "node:fs";
6
+ import { mkdir, writeFile } from "node:fs/promises";
7
+ import path from "node:path";
8
+ import { tryWriteJsonSidecar } from "./json-sidecar.js";
9
+ export class FaceSessionIdentityStore {
10
+ bySession = new Map();
11
+ persistPath;
12
+ constructor(persistPath) {
13
+ this.persistPath = persistPath;
14
+ if (persistPath)
15
+ this.load();
16
+ }
17
+ get(sessionId) {
18
+ return this.bySession.get(sessionId);
19
+ }
20
+ bind(binding) {
21
+ const sessionId = binding.sessionId.trim();
22
+ const memberId = binding.memberId.trim();
23
+ const workspaceId = binding.workspaceId.trim();
24
+ if (!sessionId || !memberId || !workspaceId)
25
+ return;
26
+ this.bySession.set(sessionId, { sessionId, memberId, workspaceId });
27
+ this.save();
28
+ }
29
+ forget(sessionId) {
30
+ if (!this.bySession.delete(sessionId))
31
+ return;
32
+ this.save();
33
+ }
34
+ list() {
35
+ return [...this.bySession.values()];
36
+ }
37
+ load() {
38
+ const file = this.persistPath;
39
+ if (!file)
40
+ return;
41
+ try {
42
+ const raw = readFileSync(file, "utf8").replace(/^\uFEFF/, "");
43
+ const doc = JSON.parse(raw);
44
+ if (!doc || doc.version !== 1 || !Array.isArray(doc.bindings))
45
+ return;
46
+ for (const row of doc.bindings) {
47
+ if (!row || typeof row !== "object")
48
+ continue;
49
+ const sessionId = String(row.sessionId ?? "").trim();
50
+ const memberId = String(row.memberId ?? "").trim();
51
+ const workspaceId = String(row.workspaceId ?? "").trim();
52
+ if (!sessionId || !memberId || !workspaceId)
53
+ continue;
54
+ this.bySession.set(sessionId, { sessionId, memberId, workspaceId });
55
+ }
56
+ }
57
+ catch {
58
+ /* missing / corrupt — empty */
59
+ }
60
+ }
61
+ save() {
62
+ const file = this.persistPath;
63
+ if (!file)
64
+ return;
65
+ const doc = {
66
+ version: 1,
67
+ bindings: this.list().map((b) => ({ ...b })),
68
+ };
69
+ tryWriteJsonSidecar(file, doc);
70
+ }
71
+ }
72
+ export function sessionIdentitiesPath(productHome) {
73
+ return path.join(path.resolve(productHome), "session-identities.json");
74
+ }
75
+ /** Async mkdir helper for Hosts that prefer await before first write. */
76
+ export async function ensureSessionIdentitiesDir(productHome) {
77
+ const file = sessionIdentitiesPath(productHome);
78
+ await mkdir(path.dirname(file), { recursive: true });
79
+ await writeFile(file, "", { flag: "a" });
80
+ return file;
81
+ }
82
+ //# sourceMappingURL=session-identity-store.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"session-identity-store.js","sourceRoot":"","sources":["../src/session-identity-store.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAaxD,MAAM,OAAO,wBAAwB;IAClB,SAAS,GAAG,IAAI,GAAG,EAAkC,CAAC;IACtD,WAAW,CAAqB;IAEjD,YAAY,WAAoB;QAC9B,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAC/B,IAAI,WAAW;YAAE,IAAI,CAAC,IAAI,EAAE,CAAC;IAC/B,CAAC;IAED,GAAG,CAAC,SAAiB;QACnB,OAAO,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IACvC,CAAC;IAED,IAAI,CAAC,OAA+B;QAClC,MAAM,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC;QAC3C,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC;QACzC,MAAM,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC,IAAI,EAAE,CAAC;QAC/C,IAAI,CAAC,SAAS,IAAI,CAAC,Q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skill and the dispatch chain.
5
5
  */
6
6
  import type { FaceRuntime } from "./context.js";
7
- /** Compact posture for IM / 奇创 parents. Empty for coding badges and children. */
7
+ /** Compact posture for IM / 奇创 / coding 经理 parents. Empty for children. */
8
8
  export declare function formatSessionPosture(runtime: FaceRuntime, sessionId: string): string;
9
9
  export declare function createSessionPostureFragmentProvider(runtime: FaceRuntime): {
10
10
  readonly id: "session-posture";