@xrkseek/harness 0.4.0-rc.4 → 0.4.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 (625) hide show
  1. package/dist/index.d.ts +3 -2
  2. package/dist/index.d.ts.map +1 -1
  3. package/dist/index.js +3 -2
  4. package/dist/index.js.map +1 -1
  5. package/node_modules/@xrkseek/checkpoint/README.md +88 -0
  6. package/node_modules/@xrkseek/checkpoint/dist/index.d.ts +5 -0
  7. package/node_modules/@xrkseek/checkpoint/dist/index.d.ts.map +1 -0
  8. package/node_modules/@xrkseek/checkpoint/dist/index.js +5 -0
  9. package/node_modules/@xrkseek/checkpoint/dist/index.js.map +1 -0
  10. package/node_modules/@xrkseek/checkpoint/dist/json-file.d.ts +5 -0
  11. package/node_modules/@xrkseek/checkpoint/dist/json-file.d.ts.map +1 -0
  12. package/node_modules/@xrkseek/checkpoint/dist/json-file.js +29 -0
  13. package/node_modules/@xrkseek/checkpoint/dist/json-file.js.map +1 -0
  14. package/node_modules/@xrkseek/checkpoint/dist/process-git.d.ts +8 -0
  15. package/node_modules/@xrkseek/checkpoint/dist/process-git.d.ts.map +1 -0
  16. package/node_modules/@xrkseek/checkpoint/dist/process-git.js +40 -0
  17. package/node_modules/@xrkseek/checkpoint/dist/process-git.js.map +1 -0
  18. package/node_modules/@xrkseek/checkpoint/dist/store.d.ts +101 -0
  19. package/node_modules/@xrkseek/checkpoint/dist/store.d.ts.map +1 -0
  20. package/node_modules/@xrkseek/checkpoint/dist/store.js +312 -0
  21. package/node_modules/@xrkseek/checkpoint/dist/store.js.map +1 -0
  22. package/node_modules/@xrkseek/checkpoint/dist/types.d.ts +65 -0
  23. package/node_modules/@xrkseek/checkpoint/dist/types.d.ts.map +1 -0
  24. package/node_modules/@xrkseek/checkpoint/dist/types.js +18 -0
  25. package/node_modules/@xrkseek/checkpoint/dist/types.js.map +1 -0
  26. package/node_modules/@xrkseek/checkpoint/package.json +23 -0
  27. package/node_modules/@xrkseek/code-runtime/README.md +11 -4
  28. package/node_modules/@xrkseek/code-runtime/dist/index.d.ts +43 -3
  29. package/node_modules/@xrkseek/code-runtime/dist/index.d.ts.map +1 -1
  30. package/node_modules/@xrkseek/code-runtime/dist/index.js +209 -7
  31. package/node_modules/@xrkseek/code-runtime/dist/index.js.map +1 -1
  32. package/node_modules/@xrkseek/context-fragments/README.md +28 -0
  33. package/node_modules/@xrkseek/context-fragments/dist/index.d.ts +104 -0
  34. package/node_modules/@xrkseek/context-fragments/dist/index.d.ts.map +1 -0
  35. package/node_modules/@xrkseek/context-fragments/dist/index.js +192 -0
  36. package/node_modules/@xrkseek/context-fragments/dist/index.js.map +1 -0
  37. package/node_modules/@xrkseek/context-fragments/package.json +27 -0
  38. package/node_modules/@xrkseek/core-agent-loop/dist/index.d.ts +1 -1
  39. package/node_modules/@xrkseek/core-agent-loop/dist/index.d.ts.map +1 -1
  40. package/node_modules/@xrkseek/core-agent-loop/dist/index.js +7 -4
  41. package/node_modules/@xrkseek/core-agent-loop/dist/index.js.map +1 -1
  42. package/node_modules/@xrkseek/core-agent-loop/dist/invariant.d.ts +11 -0
  43. package/node_modules/@xrkseek/core-agent-loop/dist/invariant.d.ts.map +1 -0
  44. package/node_modules/@xrkseek/core-agent-loop/dist/invariant.js +21 -0
  45. package/node_modules/@xrkseek/core-agent-loop/dist/invariant.js.map +1 -0
  46. package/node_modules/@xrkseek/core-agent-loop/dist/tool-result-bound.d.ts +7 -5
  47. package/node_modules/@xrkseek/core-agent-loop/dist/tool-result-bound.d.ts.map +1 -1
  48. package/node_modules/@xrkseek/core-agent-loop/dist/tool-result-bound.js +24 -109
  49. package/node_modules/@xrkseek/core-agent-loop/dist/tool-result-bound.js.map +1 -1
  50. package/node_modules/@xrkseek/core-agent-loop/package.json +7 -0
  51. package/node_modules/@xrkseek/core-session/README.md +3 -1
  52. package/node_modules/@xrkseek/core-session/dist/invariant.d.ts +18 -0
  53. package/node_modules/@xrkseek/core-session/dist/invariant.d.ts.map +1 -0
  54. package/node_modules/@xrkseek/core-session/dist/invariant.js +114 -0
  55. package/node_modules/@xrkseek/core-session/dist/invariant.js.map +1 -0
  56. package/node_modules/@xrkseek/core-session/dist/session-interchange.d.ts +2 -1
  57. package/node_modules/@xrkseek/core-session/dist/session-interchange.d.ts.map +1 -1
  58. package/node_modules/@xrkseek/core-session/dist/session-interchange.js +6 -1
  59. package/node_modules/@xrkseek/core-session/dist/session-interchange.js.map +1 -1
  60. package/node_modules/@xrkseek/core-session/dist/sqlite-store.d.ts.map +1 -1
  61. package/node_modules/@xrkseek/core-session/dist/sqlite-store.js +37 -23
  62. package/node_modules/@xrkseek/core-session/dist/sqlite-store.js.map +1 -1
  63. package/node_modules/@xrkseek/core-session/package.json +33 -26
  64. package/node_modules/@xrkseek/core-system-prompt/README.md +7 -7
  65. package/node_modules/@xrkseek/core-system-prompt/dist/index.d.ts +1 -1
  66. package/node_modules/@xrkseek/core-system-prompt/dist/index.d.ts.map +1 -1
  67. package/node_modules/@xrkseek/core-system-prompt/dist/index.js +1 -1
  68. package/node_modules/@xrkseek/core-system-prompt/dist/index.js.map +1 -1
  69. package/node_modules/@xrkseek/core-system-prompt/dist/three-layer.d.ts +55 -3
  70. package/node_modules/@xrkseek/core-system-prompt/dist/three-layer.d.ts.map +1 -1
  71. package/node_modules/@xrkseek/core-system-prompt/dist/three-layer.js +107 -11
  72. package/node_modules/@xrkseek/core-system-prompt/dist/three-layer.js.map +1 -1
  73. package/node_modules/@xrkseek/core-tools/dist/guards.d.ts +9 -1
  74. package/node_modules/@xrkseek/core-tools/dist/guards.d.ts.map +1 -1
  75. package/node_modules/@xrkseek/core-tools/dist/guards.js +53 -9
  76. package/node_modules/@xrkseek/core-tools/dist/guards.js.map +1 -1
  77. package/node_modules/@xrkseek/core-tools/dist/index.d.ts +2 -1
  78. package/node_modules/@xrkseek/core-tools/dist/index.d.ts.map +1 -1
  79. package/node_modules/@xrkseek/core-tools/dist/index.js +2 -1
  80. package/node_modules/@xrkseek/core-tools/dist/index.js.map +1 -1
  81. package/node_modules/@xrkseek/core-tools/dist/session-query-prompt.d.ts +5 -0
  82. package/node_modules/@xrkseek/core-tools/dist/session-query-prompt.d.ts.map +1 -0
  83. package/node_modules/@xrkseek/core-tools/dist/session-query-prompt.js +12 -0
  84. package/node_modules/@xrkseek/core-tools/dist/session-query-prompt.js.map +1 -0
  85. package/node_modules/@xrkseek/core-tools/dist/subagent-prompt.d.ts.map +1 -1
  86. package/node_modules/@xrkseek/core-tools/dist/subagent-prompt.js +6 -2
  87. package/node_modules/@xrkseek/core-tools/dist/subagent-prompt.js.map +1 -1
  88. package/node_modules/@xrkseek/exec-computer-use/README.md +1 -1
  89. package/node_modules/@xrkseek/exec-computer-use/dist/format.d.ts.map +1 -1
  90. package/node_modules/@xrkseek/exec-computer-use/dist/format.js +7 -5
  91. package/node_modules/@xrkseek/exec-computer-use/dist/format.js.map +1 -1
  92. package/node_modules/@xrkseek/exec-computer-use/dist/index.d.ts +14 -3
  93. package/node_modules/@xrkseek/exec-computer-use/dist/index.d.ts.map +1 -1
  94. package/node_modules/@xrkseek/exec-computer-use/dist/index.js +22 -8
  95. package/node_modules/@xrkseek/exec-computer-use/dist/index.js.map +1 -1
  96. package/node_modules/@xrkseek/exec-computer-use/dist/keys.d.ts +10 -0
  97. package/node_modules/@xrkseek/exec-computer-use/dist/keys.d.ts.map +1 -0
  98. package/node_modules/@xrkseek/exec-computer-use/dist/keys.js +89 -0
  99. package/node_modules/@xrkseek/exec-computer-use/dist/keys.js.map +1 -0
  100. package/node_modules/@xrkseek/exec-computer-use/dist/tools.d.ts +3 -1
  101. package/node_modules/@xrkseek/exec-computer-use/dist/tools.d.ts.map +1 -1
  102. package/node_modules/@xrkseek/exec-computer-use/dist/tools.js +12 -8
  103. package/node_modules/@xrkseek/exec-computer-use/dist/tools.js.map +1 -1
  104. package/node_modules/@xrkseek/exec-computer-use/dist/windows-uia.d.ts.map +1 -1
  105. package/node_modules/@xrkseek/exec-computer-use/dist/windows-uia.js +138 -2
  106. package/node_modules/@xrkseek/exec-computer-use/dist/windows-uia.js.map +1 -1
  107. package/node_modules/@xrkseek/exec-fs/README.md +12 -9
  108. package/node_modules/@xrkseek/exec-fs/dist/apply-patch-apply.d.ts +32 -0
  109. package/node_modules/@xrkseek/exec-fs/dist/apply-patch-apply.d.ts.map +1 -0
  110. package/node_modules/@xrkseek/exec-fs/dist/apply-patch-apply.js +203 -0
  111. package/node_modules/@xrkseek/exec-fs/dist/apply-patch-apply.js.map +1 -0
  112. package/node_modules/@xrkseek/exec-fs/dist/apply-patch-parser.d.ts +52 -0
  113. package/node_modules/@xrkseek/exec-fs/dist/apply-patch-parser.d.ts.map +1 -0
  114. package/node_modules/@xrkseek/exec-fs/dist/apply-patch-parser.js +260 -0
  115. package/node_modules/@xrkseek/exec-fs/dist/apply-patch-parser.js.map +1 -0
  116. package/node_modules/@xrkseek/exec-fs/dist/apply-patch.d.ts +27 -0
  117. package/node_modules/@xrkseek/exec-fs/dist/apply-patch.d.ts.map +1 -0
  118. package/node_modules/@xrkseek/exec-fs/dist/apply-patch.js +69 -0
  119. package/node_modules/@xrkseek/exec-fs/dist/apply-patch.js.map +1 -0
  120. package/node_modules/@xrkseek/exec-fs/dist/index.d.ts +6 -1
  121. package/node_modules/@xrkseek/exec-fs/dist/index.d.ts.map +1 -1
  122. package/node_modules/@xrkseek/exec-fs/dist/index.js +72 -3
  123. package/node_modules/@xrkseek/exec-fs/dist/index.js.map +1 -1
  124. package/node_modules/@xrkseek/exec-fs/dist/present.d.ts +4 -0
  125. package/node_modules/@xrkseek/exec-fs/dist/present.d.ts.map +1 -1
  126. package/node_modules/@xrkseek/exec-fs/dist/present.js +25 -0
  127. package/node_modules/@xrkseek/exec-fs/dist/present.js.map +1 -1
  128. package/node_modules/@xrkseek/exec-fs/dist/routing-prompt.d.ts +1 -1
  129. package/node_modules/@xrkseek/exec-fs/dist/routing-prompt.d.ts.map +1 -1
  130. package/node_modules/@xrkseek/exec-fs/dist/routing-prompt.js +10 -6
  131. package/node_modules/@xrkseek/exec-fs/dist/routing-prompt.js.map +1 -1
  132. package/node_modules/@xrkseek/exec-image-gen/dist/index.d.ts +15 -2
  133. package/node_modules/@xrkseek/exec-image-gen/dist/index.d.ts.map +1 -1
  134. package/node_modules/@xrkseek/exec-image-gen/dist/index.js +14 -7
  135. package/node_modules/@xrkseek/exec-image-gen/dist/index.js.map +1 -1
  136. package/node_modules/@xrkseek/exec-image-gen/dist/tools.d.ts +6 -1
  137. package/node_modules/@xrkseek/exec-image-gen/dist/tools.d.ts.map +1 -1
  138. package/node_modules/@xrkseek/exec-image-gen/dist/tools.js +14 -8
  139. package/node_modules/@xrkseek/exec-image-gen/dist/tools.js.map +1 -1
  140. package/node_modules/@xrkseek/exec-memory/README.md +5 -3
  141. package/node_modules/@xrkseek/exec-memory/dist/http.d.ts +42 -0
  142. package/node_modules/@xrkseek/exec-memory/dist/http.d.ts.map +1 -0
  143. package/node_modules/@xrkseek/exec-memory/dist/http.js +232 -0
  144. package/node_modules/@xrkseek/exec-memory/dist/http.js.map +1 -0
  145. package/node_modules/@xrkseek/exec-memory/dist/index.d.ts +5 -2
  146. package/node_modules/@xrkseek/exec-memory/dist/index.d.ts.map +1 -1
  147. package/node_modules/@xrkseek/exec-memory/dist/index.js +3 -1
  148. package/node_modules/@xrkseek/exec-memory/dist/index.js.map +1 -1
  149. package/node_modules/@xrkseek/exec-memory/dist/provider.d.ts +19 -0
  150. package/node_modules/@xrkseek/exec-memory/dist/provider.d.ts.map +1 -0
  151. package/node_modules/@xrkseek/exec-memory/dist/provider.js +8 -0
  152. package/node_modules/@xrkseek/exec-memory/dist/provider.js.map +1 -0
  153. package/node_modules/@xrkseek/exec-memory/dist/resolve.d.ts +25 -0
  154. package/node_modules/@xrkseek/exec-memory/dist/resolve.d.ts.map +1 -0
  155. package/node_modules/@xrkseek/exec-memory/dist/resolve.js +46 -0
  156. package/node_modules/@xrkseek/exec-memory/dist/resolve.js.map +1 -0
  157. package/node_modules/@xrkseek/exec-memory/dist/store.d.ts +8 -4
  158. package/node_modules/@xrkseek/exec-memory/dist/store.d.ts.map +1 -1
  159. package/node_modules/@xrkseek/exec-memory/dist/store.js +6 -0
  160. package/node_modules/@xrkseek/exec-memory/dist/store.js.map +1 -1
  161. package/node_modules/@xrkseek/exec-memory/dist/tools.d.ts.map +1 -1
  162. package/node_modules/@xrkseek/exec-memory/dist/tools.js +12 -9
  163. package/node_modules/@xrkseek/exec-memory/dist/tools.js.map +1 -1
  164. package/node_modules/@xrkseek/exec-memory/dist/write-path.d.ts +17 -6
  165. package/node_modules/@xrkseek/exec-memory/dist/write-path.d.ts.map +1 -1
  166. package/node_modules/@xrkseek/exec-memory/dist/write-path.js +81 -20
  167. package/node_modules/@xrkseek/exec-memory/dist/write-path.js.map +1 -1
  168. package/node_modules/@xrkseek/exec-memory/package.json +1 -0
  169. package/node_modules/@xrkseek/exec-sandbox/dist/doctor.d.ts +24 -0
  170. package/node_modules/@xrkseek/exec-sandbox/dist/doctor.d.ts.map +1 -0
  171. package/node_modules/@xrkseek/exec-sandbox/dist/doctor.js +118 -0
  172. package/node_modules/@xrkseek/exec-sandbox/dist/doctor.js.map +1 -0
  173. package/node_modules/@xrkseek/exec-sandbox/dist/hardline.d.ts +24 -0
  174. package/node_modules/@xrkseek/exec-sandbox/dist/hardline.d.ts.map +1 -0
  175. package/node_modules/@xrkseek/exec-sandbox/dist/hardline.js +93 -0
  176. package/node_modules/@xrkseek/exec-sandbox/dist/hardline.js.map +1 -0
  177. package/node_modules/@xrkseek/exec-sandbox/dist/index.d.ts +3 -1
  178. package/node_modules/@xrkseek/exec-sandbox/dist/index.d.ts.map +1 -1
  179. package/node_modules/@xrkseek/exec-sandbox/dist/index.js +3 -1
  180. package/node_modules/@xrkseek/exec-sandbox/dist/index.js.map +1 -1
  181. package/node_modules/@xrkseek/exec-sandbox/dist/resolve.d.ts +17 -0
  182. package/node_modules/@xrkseek/exec-sandbox/dist/resolve.d.ts.map +1 -1
  183. package/node_modules/@xrkseek/exec-sandbox/dist/resolve.js +47 -5
  184. package/node_modules/@xrkseek/exec-sandbox/dist/resolve.js.map +1 -1
  185. package/node_modules/@xrkseek/exec-sandbox/dist/service.d.ts.map +1 -1
  186. package/node_modules/@xrkseek/exec-sandbox/dist/service.js +2 -5
  187. package/node_modules/@xrkseek/exec-sandbox/dist/service.js.map +1 -1
  188. package/node_modules/@xrkseek/exec-ssh/README.md +16 -16
  189. package/node_modules/@xrkseek/exec-ssh/dist/config.d.ts +10 -0
  190. package/node_modules/@xrkseek/exec-ssh/dist/config.d.ts.map +1 -1
  191. package/node_modules/@xrkseek/exec-ssh/dist/config.js +50 -0
  192. package/node_modules/@xrkseek/exec-ssh/dist/config.js.map +1 -1
  193. package/node_modules/@xrkseek/exec-ssh/dist/fs.d.ts +1 -1
  194. package/node_modules/@xrkseek/exec-ssh/dist/fs.d.ts.map +1 -1
  195. package/node_modules/@xrkseek/exec-ssh/dist/fs.js +18 -1
  196. package/node_modules/@xrkseek/exec-ssh/dist/fs.js.map +1 -1
  197. package/node_modules/@xrkseek/exec-ssh/dist/index.d.ts +1 -1
  198. package/node_modules/@xrkseek/exec-ssh/dist/index.d.ts.map +1 -1
  199. package/node_modules/@xrkseek/exec-ssh/dist/index.js +1 -1
  200. package/node_modules/@xrkseek/exec-ssh/dist/index.js.map +1 -1
  201. package/node_modules/@xrkseek/exec-video-gen/dist/index.d.ts +15 -2
  202. package/node_modules/@xrkseek/exec-video-gen/dist/index.d.ts.map +1 -1
  203. package/node_modules/@xrkseek/exec-video-gen/dist/index.js +14 -9
  204. package/node_modules/@xrkseek/exec-video-gen/dist/index.js.map +1 -1
  205. package/node_modules/@xrkseek/exec-video-gen/dist/tools.d.ts +6 -1
  206. package/node_modules/@xrkseek/exec-video-gen/dist/tools.d.ts.map +1 -1
  207. package/node_modules/@xrkseek/exec-video-gen/dist/tools.js +14 -10
  208. package/node_modules/@xrkseek/exec-video-gen/dist/tools.js.map +1 -1
  209. package/node_modules/@xrkseek/exec-voice/README.md +25 -25
  210. package/node_modules/@xrkseek/exec-voice/dist/index.d.ts +16 -3
  211. package/node_modules/@xrkseek/exec-voice/dist/index.d.ts.map +1 -1
  212. package/node_modules/@xrkseek/exec-voice/dist/index.js +14 -8
  213. package/node_modules/@xrkseek/exec-voice/dist/index.js.map +1 -1
  214. package/node_modules/@xrkseek/exec-voice/dist/readiness.d.ts +26 -0
  215. package/node_modules/@xrkseek/exec-voice/dist/readiness.d.ts.map +1 -0
  216. package/node_modules/@xrkseek/exec-voice/dist/readiness.js +69 -0
  217. package/node_modules/@xrkseek/exec-voice/dist/readiness.js.map +1 -0
  218. package/node_modules/@xrkseek/exec-voice/dist/tools.d.ts +4 -1
  219. package/node_modules/@xrkseek/exec-voice/dist/tools.d.ts.map +1 -1
  220. package/node_modules/@xrkseek/exec-voice/dist/tools.js +3 -14
  221. package/node_modules/@xrkseek/exec-voice/dist/tools.js.map +1 -1
  222. package/node_modules/@xrkseek/exec-web/README.md +11 -11
  223. package/node_modules/@xrkseek/exec-web/dist/browser-cdp.d.ts +22 -0
  224. package/node_modules/@xrkseek/exec-web/dist/browser-cdp.d.ts.map +1 -1
  225. package/node_modules/@xrkseek/exec-web/dist/browser-cdp.js +32 -1
  226. package/node_modules/@xrkseek/exec-web/dist/browser-cdp.js.map +1 -1
  227. package/node_modules/@xrkseek/exec-web/dist/browser-runtime-registry.d.ts +21 -0
  228. package/node_modules/@xrkseek/exec-web/dist/browser-runtime-registry.d.ts.map +1 -0
  229. package/node_modules/@xrkseek/exec-web/dist/browser-runtime-registry.js +52 -0
  230. package/node_modules/@xrkseek/exec-web/dist/browser-runtime-registry.js.map +1 -0
  231. package/node_modules/@xrkseek/exec-web/dist/browser-session.d.ts +2 -0
  232. package/node_modules/@xrkseek/exec-web/dist/browser-session.d.ts.map +1 -1
  233. package/node_modules/@xrkseek/exec-web/dist/browser-session.js +3 -0
  234. package/node_modules/@xrkseek/exec-web/dist/browser-session.js.map +1 -1
  235. package/node_modules/@xrkseek/exec-web/dist/browser-tools.d.ts +9 -0
  236. package/node_modules/@xrkseek/exec-web/dist/browser-tools.d.ts.map +1 -1
  237. package/node_modules/@xrkseek/exec-web/dist/browser-tools.js +34 -15
  238. package/node_modules/@xrkseek/exec-web/dist/browser-tools.js.map +1 -1
  239. package/node_modules/@xrkseek/exec-web/dist/fetch-http.d.ts +7 -0
  240. package/node_modules/@xrkseek/exec-web/dist/fetch-http.d.ts.map +1 -1
  241. package/node_modules/@xrkseek/exec-web/dist/fetch-http.js +8 -2
  242. package/node_modules/@xrkseek/exec-web/dist/fetch-http.js.map +1 -1
  243. package/node_modules/@xrkseek/exec-web/dist/format.d.ts.map +1 -1
  244. package/node_modules/@xrkseek/exec-web/dist/format.js +4 -3
  245. package/node_modules/@xrkseek/exec-web/dist/format.js.map +1 -1
  246. package/node_modules/@xrkseek/exec-web/dist/index.d.ts +4 -2
  247. package/node_modules/@xrkseek/exec-web/dist/index.d.ts.map +1 -1
  248. package/node_modules/@xrkseek/exec-web/dist/index.js +8 -3
  249. package/node_modules/@xrkseek/exec-web/dist/index.js.map +1 -1
  250. package/node_modules/@xrkseek/exec-web/dist/outbound-allowlist.d.ts +46 -0
  251. package/node_modules/@xrkseek/exec-web/dist/outbound-allowlist.d.ts.map +1 -0
  252. package/node_modules/@xrkseek/exec-web/dist/outbound-allowlist.js +144 -0
  253. package/node_modules/@xrkseek/exec-web/dist/outbound-allowlist.js.map +1 -0
  254. package/node_modules/@xrkseek/exec-web/dist/url-policy.d.ts +6 -1
  255. package/node_modules/@xrkseek/exec-web/dist/url-policy.d.ts.map +1 -1
  256. package/node_modules/@xrkseek/exec-web/dist/url-policy.js +5 -2
  257. package/node_modules/@xrkseek/exec-web/dist/url-policy.js.map +1 -1
  258. package/node_modules/@xrkseek/im-gateway-contract/README.md +50 -0
  259. package/node_modules/@xrkseek/im-gateway-contract/dist/index.d.ts +77 -0
  260. package/node_modules/@xrkseek/im-gateway-contract/dist/index.d.ts.map +1 -0
  261. package/node_modules/@xrkseek/im-gateway-contract/dist/index.js +120 -0
  262. package/node_modules/@xrkseek/im-gateway-contract/dist/index.js.map +1 -0
  263. package/node_modules/@xrkseek/im-gateway-contract/examples/mock-sidecar.mjs +124 -0
  264. package/node_modules/@xrkseek/im-gateway-contract/package.json +25 -0
  265. package/node_modules/@xrkseek/mcp/dist/index.d.ts +1 -0
  266. package/node_modules/@xrkseek/mcp/dist/index.d.ts.map +1 -1
  267. package/node_modules/@xrkseek/mcp/dist/index.js +1 -0
  268. package/node_modules/@xrkseek/mcp/dist/index.js.map +1 -1
  269. package/node_modules/@xrkseek/mcp/dist/oauth-product.d.ts +31 -0
  270. package/node_modules/@xrkseek/mcp/dist/oauth-product.d.ts.map +1 -0
  271. package/node_modules/@xrkseek/mcp/dist/oauth-product.js +72 -0
  272. package/node_modules/@xrkseek/mcp/dist/oauth-product.js.map +1 -0
  273. package/node_modules/@xrkseek/policy/README.md +18 -15
  274. package/node_modules/@xrkseek/policy/dist/index.d.ts +1 -0
  275. package/node_modules/@xrkseek/policy/dist/index.d.ts.map +1 -1
  276. package/node_modules/@xrkseek/policy/dist/index.js +1 -0
  277. package/node_modules/@xrkseek/policy/dist/index.js.map +1 -1
  278. package/node_modules/@xrkseek/policy/dist/permission-pre.d.ts.map +1 -1
  279. package/node_modules/@xrkseek/policy/dist/permission-pre.js +1 -0
  280. package/node_modules/@xrkseek/policy/dist/permission-pre.js.map +1 -1
  281. package/node_modules/@xrkseek/policy/dist/security-guidance.d.ts +50 -0
  282. package/node_modules/@xrkseek/policy/dist/security-guidance.d.ts.map +1 -0
  283. package/node_modules/@xrkseek/policy/dist/security-guidance.js +262 -0
  284. package/node_modules/@xrkseek/policy/dist/security-guidance.js.map +1 -0
  285. package/node_modules/@xrkseek/preset-harness/dist/preset.d.ts +81 -7
  286. package/node_modules/@xrkseek/preset-harness/dist/preset.d.ts.map +1 -1
  287. package/node_modules/@xrkseek/preset-harness/dist/preset.js +307 -63
  288. package/node_modules/@xrkseek/preset-harness/dist/preset.js.map +1 -1
  289. package/node_modules/@xrkseek/preset-harness/dist/tsconfig.tsbuildinfo +1 -1
  290. package/node_modules/@xrkseek/preset-harness/package.json +53 -52
  291. package/node_modules/@xrkseek/preset-minimal/dist/preset.d.ts.map +1 -1
  292. package/node_modules/@xrkseek/preset-minimal/dist/preset.js +7 -2
  293. package/node_modules/@xrkseek/preset-minimal/dist/preset.js.map +1 -1
  294. package/node_modules/@xrkseek/preset-minimal/dist/tsconfig.tsbuildinfo +1 -1
  295. package/node_modules/@xrkseek/preset-server/dist/preset.d.ts.map +1 -1
  296. package/node_modules/@xrkseek/preset-server/dist/preset.js +19 -1
  297. package/node_modules/@xrkseek/preset-server/dist/preset.js.map +1 -1
  298. package/node_modules/@xrkseek/preset-server/dist/tsconfig.tsbuildinfo +1 -1
  299. package/node_modules/@xrkseek/protocol/dist/json-schema.d.ts.map +1 -1
  300. package/node_modules/@xrkseek/protocol/dist/json-schema.js +3 -0
  301. package/node_modules/@xrkseek/protocol/dist/json-schema.js.map +1 -1
  302. package/node_modules/@xrkseek/protocol/dist/session-events.d.ts +18 -0
  303. package/node_modules/@xrkseek/protocol/dist/session-events.d.ts.map +1 -1
  304. package/node_modules/@xrkseek/protocol/dist/session-events.js.map +1 -1
  305. package/node_modules/@xrkseek/protocol/dist/validate.d.ts.map +1 -1
  306. package/node_modules/@xrkseek/protocol/dist/validate.js +30 -0
  307. package/node_modules/@xrkseek/protocol/dist/validate.js.map +1 -1
  308. package/node_modules/@xrkseek/runtime-invariants/README.md +28 -0
  309. package/node_modules/@xrkseek/runtime-invariants/dist/index.d.ts +94 -0
  310. package/node_modules/@xrkseek/runtime-invariants/dist/index.d.ts.map +1 -0
  311. package/node_modules/@xrkseek/runtime-invariants/dist/index.js +163 -0
  312. package/node_modules/@xrkseek/runtime-invariants/dist/index.js.map +1 -0
  313. package/node_modules/@xrkseek/runtime-invariants/package.json +27 -0
  314. package/node_modules/@xrkseek/secrets/README.md +28 -0
  315. package/node_modules/@xrkseek/secrets/dist/index.d.ts +11 -0
  316. package/node_modules/@xrkseek/secrets/dist/index.d.ts.map +1 -0
  317. package/node_modules/@xrkseek/secrets/dist/index.js +23 -0
  318. package/node_modules/@xrkseek/secrets/dist/index.js.map +1 -0
  319. package/node_modules/@xrkseek/secrets/dist/keyring.d.ts +10 -0
  320. package/node_modules/@xrkseek/secrets/dist/keyring.d.ts.map +1 -0
  321. package/node_modules/@xrkseek/secrets/dist/keyring.js +77 -0
  322. package/node_modules/@xrkseek/secrets/dist/keyring.js.map +1 -0
  323. package/node_modules/@xrkseek/secrets/dist/memory.d.ts +4 -0
  324. package/node_modules/@xrkseek/secrets/dist/memory.d.ts.map +1 -0
  325. package/node_modules/@xrkseek/secrets/dist/memory.js +21 -0
  326. package/node_modules/@xrkseek/secrets/dist/memory.js.map +1 -0
  327. package/node_modules/@xrkseek/secrets/dist/redact.d.ts +23 -0
  328. package/node_modules/@xrkseek/secrets/dist/redact.d.ts.map +1 -0
  329. package/node_modules/@xrkseek/secrets/dist/redact.js +38 -0
  330. package/node_modules/@xrkseek/secrets/dist/redact.js.map +1 -0
  331. package/node_modules/@xrkseek/secrets/dist/resolve.d.ts +10 -0
  332. package/node_modules/@xrkseek/secrets/dist/resolve.d.ts.map +1 -0
  333. package/node_modules/@xrkseek/secrets/dist/resolve.js +24 -0
  334. package/node_modules/@xrkseek/secrets/dist/resolve.js.map +1 -0
  335. package/node_modules/@xrkseek/secrets/dist/types.d.ts +27 -0
  336. package/node_modules/@xrkseek/secrets/dist/types.d.ts.map +1 -0
  337. package/node_modules/@xrkseek/secrets/dist/types.js +15 -0
  338. package/node_modules/@xrkseek/secrets/dist/types.js.map +1 -0
  339. package/node_modules/@xrkseek/secrets/package.json +29 -0
  340. package/node_modules/@xrkseek/server-config/dist/index.d.ts +6 -0
  341. package/node_modules/@xrkseek/server-config/dist/index.d.ts.map +1 -1
  342. package/node_modules/@xrkseek/server-config/dist/index.js +12 -0
  343. package/node_modules/@xrkseek/server-config/dist/index.js.map +1 -1
  344. package/node_modules/@xrkseek/server-cron/README.md +1 -1
  345. package/node_modules/@xrkseek/server-cron/dist/index.d.ts +10 -1
  346. package/node_modules/@xrkseek/server-cron/dist/index.d.ts.map +1 -1
  347. package/node_modules/@xrkseek/server-cron/dist/index.js +9 -2
  348. package/node_modules/@xrkseek/server-cron/dist/index.js.map +1 -1
  349. package/node_modules/@xrkseek/server-face/dist/adapt/wire-event.d.ts.map +1 -1
  350. package/node_modules/@xrkseek/server-face/dist/adapt/wire-event.js +6 -2
  351. package/node_modules/@xrkseek/server-face/dist/adapt/wire-event.js.map +1 -1
  352. package/node_modules/@xrkseek/server-face/dist/agent-team-output.d.ts +34 -0
  353. package/node_modules/@xrkseek/server-face/dist/agent-team-output.d.ts.map +1 -0
  354. package/node_modules/@xrkseek/server-face/dist/agent-team-output.js +140 -0
  355. package/node_modules/@xrkseek/server-face/dist/agent-team-output.js.map +1 -0
  356. package/node_modules/@xrkseek/server-face/dist/agent-team-roles.d.ts +13 -0
  357. package/node_modules/@xrkseek/server-face/dist/agent-team-roles.d.ts.map +1 -0
  358. package/node_modules/@xrkseek/server-face/dist/agent-team-roles.js +67 -0
  359. package/node_modules/@xrkseek/server-face/dist/agent-team-roles.js.map +1 -0
  360. package/node_modules/@xrkseek/server-face/dist/agent-team-tasks.d.ts +79 -0
  361. package/node_modules/@xrkseek/server-face/dist/agent-team-tasks.d.ts.map +1 -0
  362. package/node_modules/@xrkseek/server-face/dist/agent-team-tasks.js +230 -0
  363. package/node_modules/@xrkseek/server-face/dist/agent-team-tasks.js.map +1 -0
  364. package/node_modules/@xrkseek/server-face/dist/approval-category.d.ts +25 -0
  365. package/node_modules/@xrkseek/server-face/dist/approval-category.d.ts.map +1 -0
  366. package/node_modules/@xrkseek/server-face/dist/approval-category.js +108 -0
  367. package/node_modules/@xrkseek/server-face/dist/approval-category.js.map +1 -0
  368. package/node_modules/@xrkseek/server-face/dist/approvals.d.ts +17 -0
  369. package/node_modules/@xrkseek/server-face/dist/approvals.d.ts.map +1 -1
  370. package/node_modules/@xrkseek/server-face/dist/approvals.js +50 -0
  371. package/node_modules/@xrkseek/server-face/dist/approvals.js.map +1 -1
  372. package/node_modules/@xrkseek/server-face/dist/context.d.ts +22 -0
  373. package/node_modules/@xrkseek/server-face/dist/context.d.ts.map +1 -1
  374. package/node_modules/@xrkseek/server-face/dist/cost-meter-store.d.ts.map +1 -1
  375. package/node_modules/@xrkseek/server-face/dist/cost-meter-store.js +22 -0
  376. package/node_modules/@xrkseek/server-face/dist/cost-meter-store.js.map +1 -1
  377. package/node_modules/@xrkseek/server-face/dist/dispatch.d.ts.map +1 -1
  378. package/node_modules/@xrkseek/server-face/dist/dispatch.js +14 -2
  379. package/node_modules/@xrkseek/server-face/dist/dispatch.js.map +1 -1
  380. package/node_modules/@xrkseek/server-face/dist/external-agent-runtime.d.ts +87 -2
  381. package/node_modules/@xrkseek/server-face/dist/external-agent-runtime.d.ts.map +1 -1
  382. package/node_modules/@xrkseek/server-face/dist/external-agent-runtime.js +456 -32
  383. package/node_modules/@xrkseek/server-face/dist/external-agent-runtime.js.map +1 -1
  384. package/node_modules/@xrkseek/server-face/dist/goal-round-driver.d.ts +48 -0
  385. package/node_modules/@xrkseek/server-face/dist/goal-round-driver.d.ts.map +1 -0
  386. package/node_modules/@xrkseek/server-face/dist/goal-round-driver.js +69 -0
  387. package/node_modules/@xrkseek/server-face/dist/goal-round-driver.js.map +1 -0
  388. package/node_modules/@xrkseek/server-face/dist/goal-store.d.ts +6 -1
  389. package/node_modules/@xrkseek/server-face/dist/goal-store.d.ts.map +1 -1
  390. package/node_modules/@xrkseek/server-face/dist/goal-store.js +45 -9
  391. package/node_modules/@xrkseek/server-face/dist/goal-store.js.map +1 -1
  392. package/node_modules/@xrkseek/server-face/dist/goal-tools.d.ts +13 -0
  393. package/node_modules/@xrkseek/server-face/dist/goal-tools.d.ts.map +1 -0
  394. package/node_modules/@xrkseek/server-face/dist/goal-tools.js +131 -0
  395. package/node_modules/@xrkseek/server-face/dist/goal-tools.js.map +1 -0
  396. package/node_modules/@xrkseek/server-face/dist/handlers/checkpoint.d.ts +10 -0
  397. package/node_modules/@xrkseek/server-face/dist/handlers/checkpoint.d.ts.map +1 -0
  398. package/node_modules/@xrkseek/server-face/dist/handlers/checkpoint.js +156 -0
  399. package/node_modules/@xrkseek/server-face/dist/handlers/checkpoint.js.map +1 -0
  400. package/node_modules/@xrkseek/server-face/dist/handlers/session.d.ts +7 -0
  401. package/node_modules/@xrkseek/server-face/dist/handlers/session.d.ts.map +1 -1
  402. package/node_modules/@xrkseek/server-face/dist/handlers/session.js +88 -2
  403. package/node_modules/@xrkseek/server-face/dist/handlers/session.js.map +1 -1
  404. package/node_modules/@xrkseek/server-face/dist/handlers/subagent.d.ts.map +1 -1
  405. package/node_modules/@xrkseek/server-face/dist/handlers/subagent.js +62 -3
  406. package/node_modules/@xrkseek/server-face/dist/handlers/subagent.js.map +1 -1
  407. package/node_modules/@xrkseek/server-face/dist/index.d.ts +19 -5
  408. package/node_modules/@xrkseek/server-face/dist/index.d.ts.map +1 -1
  409. package/node_modules/@xrkseek/server-face/dist/index.js +18 -4
  410. package/node_modules/@xrkseek/server-face/dist/index.js.map +1 -1
  411. package/node_modules/@xrkseek/server-face/dist/managed-worktree.d.ts +115 -0
  412. package/node_modules/@xrkseek/server-face/dist/managed-worktree.d.ts.map +1 -0
  413. package/node_modules/@xrkseek/server-face/dist/managed-worktree.js +330 -0
  414. package/node_modules/@xrkseek/server-face/dist/managed-worktree.js.map +1 -0
  415. package/node_modules/@xrkseek/server-face/dist/mcp-oauth.d.ts +33 -0
  416. package/node_modules/@xrkseek/server-face/dist/mcp-oauth.d.ts.map +1 -0
  417. package/node_modules/@xrkseek/server-face/dist/mcp-oauth.js +352 -0
  418. package/node_modules/@xrkseek/server-face/dist/mcp-oauth.js.map +1 -0
  419. package/node_modules/@xrkseek/server-face/dist/projections/index.d.ts +1 -1
  420. package/node_modules/@xrkseek/server-face/dist/projections/index.d.ts.map +1 -1
  421. package/node_modules/@xrkseek/server-face/dist/projections/index.js.map +1 -1
  422. package/node_modules/@xrkseek/server-face/dist/projections/units/context-timeline.d.ts +15 -1
  423. package/node_modules/@xrkseek/server-face/dist/projections/units/context-timeline.d.ts.map +1 -1
  424. package/node_modules/@xrkseek/server-face/dist/projections/units/context-timeline.js +26 -2
  425. package/node_modules/@xrkseek/server-face/dist/projections/units/context-timeline.js.map +1 -1
  426. package/node_modules/@xrkseek/server-face/dist/propose-skill.d.ts +20 -0
  427. package/node_modules/@xrkseek/server-face/dist/propose-skill.d.ts.map +1 -0
  428. package/node_modules/@xrkseek/server-face/dist/propose-skill.js +65 -0
  429. package/node_modules/@xrkseek/server-face/dist/propose-skill.js.map +1 -0
  430. package/node_modules/@xrkseek/server-face/dist/ralph-tool.d.ts +33 -0
  431. package/node_modules/@xrkseek/server-face/dist/ralph-tool.d.ts.map +1 -0
  432. package/node_modules/@xrkseek/server-face/dist/ralph-tool.js +366 -0
  433. package/node_modules/@xrkseek/server-face/dist/ralph-tool.js.map +1 -0
  434. package/node_modules/@xrkseek/server-face/dist/reference-discovery.d.ts.map +1 -1
  435. package/node_modules/@xrkseek/server-face/dist/reference-discovery.js +1 -0
  436. package/node_modules/@xrkseek/server-face/dist/reference-discovery.js.map +1 -1
  437. package/node_modules/@xrkseek/server-face/dist/rollout-trace.d.ts +58 -0
  438. package/node_modules/@xrkseek/server-face/dist/rollout-trace.d.ts.map +1 -0
  439. package/node_modules/@xrkseek/server-face/dist/rollout-trace.js +194 -0
  440. package/node_modules/@xrkseek/server-face/dist/rollout-trace.js.map +1 -0
  441. package/node_modules/@xrkseek/server-face/dist/runtime.d.ts +7 -0
  442. package/node_modules/@xrkseek/server-face/dist/runtime.d.ts.map +1 -1
  443. package/node_modules/@xrkseek/server-face/dist/runtime.js +93 -4
  444. package/node_modules/@xrkseek/server-face/dist/runtime.js.map +1 -1
  445. package/node_modules/@xrkseek/server-face/dist/session-export.d.ts.map +1 -1
  446. package/node_modules/@xrkseek/server-face/dist/session-export.js +74 -0
  447. package/node_modules/@xrkseek/server-face/dist/session-export.js.map +1 -1
  448. package/node_modules/@xrkseek/server-face/dist/session-query-tools.d.ts +23 -0
  449. package/node_modules/@xrkseek/server-face/dist/session-query-tools.d.ts.map +1 -0
  450. package/node_modules/@xrkseek/server-face/dist/session-query-tools.js +275 -0
  451. package/node_modules/@xrkseek/server-face/dist/session-query-tools.js.map +1 -0
  452. package/node_modules/@xrkseek/server-face/dist/session-status.d.ts +209 -0
  453. package/node_modules/@xrkseek/server-face/dist/session-status.d.ts.map +1 -0
  454. package/node_modules/@xrkseek/server-face/dist/session-status.js +559 -0
  455. package/node_modules/@xrkseek/server-face/dist/session-status.js.map +1 -0
  456. package/node_modules/@xrkseek/server-face/dist/settings-credentials.d.ts +2 -0
  457. package/node_modules/@xrkseek/server-face/dist/settings-credentials.d.ts.map +1 -1
  458. package/node_modules/@xrkseek/server-face/dist/settings-credentials.js +67 -0
  459. package/node_modules/@xrkseek/server-face/dist/settings-credentials.js.map +1 -1
  460. package/node_modules/@xrkseek/server-face/dist/settings-document.d.ts +5 -0
  461. package/node_modules/@xrkseek/server-face/dist/settings-document.d.ts.map +1 -1
  462. package/node_modules/@xrkseek/server-face/dist/settings-document.js +69 -0
  463. package/node_modules/@xrkseek/server-face/dist/settings-document.js.map +1 -1
  464. package/node_modules/@xrkseek/server-face/dist/settings-schemas.d.ts.map +1 -1
  465. package/node_modules/@xrkseek/server-face/dist/settings-schemas.js +220 -1
  466. package/node_modules/@xrkseek/server-face/dist/settings-schemas.js.map +1 -1
  467. package/node_modules/@xrkseek/server-face/dist/slash.d.ts.map +1 -1
  468. package/node_modules/@xrkseek/server-face/dist/slash.js +70 -16
  469. package/node_modules/@xrkseek/server-face/dist/slash.js.map +1 -1
  470. package/node_modules/@xrkseek/server-face/dist/subagent-registry.d.ts +4 -0
  471. package/node_modules/@xrkseek/server-face/dist/subagent-registry.d.ts.map +1 -1
  472. package/node_modules/@xrkseek/server-face/dist/subagent-registry.js +4 -0
  473. package/node_modules/@xrkseek/server-face/dist/subagent-registry.js.map +1 -1
  474. package/node_modules/@xrkseek/server-face/dist/subagent-tools.d.ts +14 -1
  475. package/node_modules/@xrkseek/server-face/dist/subagent-tools.d.ts.map +1 -1
  476. package/node_modules/@xrkseek/server-face/dist/subagent-tools.js +614 -62
  477. package/node_modules/@xrkseek/server-face/dist/subagent-tools.js.map +1 -1
  478. package/node_modules/@xrkseek/server-face/dist/subagent-worktree.d.ts.map +1 -1
  479. package/node_modules/@xrkseek/server-face/dist/subagent-worktree.js +7 -2
  480. package/node_modules/@xrkseek/server-face/dist/subagent-worktree.js.map +1 -1
  481. package/node_modules/@xrkseek/server-face/dist/types.d.ts +4 -0
  482. package/node_modules/@xrkseek/server-face/dist/types.d.ts.map +1 -1
  483. package/node_modules/@xrkseek/server-face/dist/wire/rpc-error.d.ts.map +1 -1
  484. package/node_modules/@xrkseek/server-face/dist/wire/rpc-error.js +11 -0
  485. package/node_modules/@xrkseek/server-face/dist/wire/rpc-error.js.map +1 -1
  486. package/node_modules/@xrkseek/server-face/dist/workspace-checkpoint.d.ts +40 -0
  487. package/node_modules/@xrkseek/server-face/dist/workspace-checkpoint.d.ts.map +1 -0
  488. package/node_modules/@xrkseek/server-face/dist/workspace-checkpoint.js +154 -0
  489. package/node_modules/@xrkseek/server-face/dist/workspace-checkpoint.js.map +1 -0
  490. package/node_modules/@xrkseek/server-face/dist/workspace-face.d.ts +1 -0
  491. package/node_modules/@xrkseek/server-face/dist/workspace-face.d.ts.map +1 -1
  492. package/node_modules/@xrkseek/server-face/dist/workspace-face.js +25 -0
  493. package/node_modules/@xrkseek/server-face/dist/workspace-face.js.map +1 -1
  494. package/node_modules/@xrkseek/server-face/dist/workspace-registry.d.ts +11 -0
  495. package/node_modules/@xrkseek/server-face/dist/workspace-registry.d.ts.map +1 -1
  496. package/node_modules/@xrkseek/server-face/dist/workspace-registry.js +14 -4
  497. package/node_modules/@xrkseek/server-face/dist/workspace-registry.js.map +1 -1
  498. package/node_modules/@xrkseek/server-face/package.json +3 -0
  499. package/node_modules/@xrkseek/server-host/dist/index.d.ts +61 -0
  500. package/node_modules/@xrkseek/server-host/dist/index.d.ts.map +1 -1
  501. package/node_modules/@xrkseek/server-host/dist/index.js +376 -10
  502. package/node_modules/@xrkseek/server-host/dist/index.js.map +1 -1
  503. package/node_modules/@xrkseek/server-host/dist/invariants-fail-fast.d.ts +16 -0
  504. package/node_modules/@xrkseek/server-host/dist/invariants-fail-fast.d.ts.map +1 -0
  505. package/node_modules/@xrkseek/server-host/dist/invariants-fail-fast.js +24 -0
  506. package/node_modules/@xrkseek/server-host/dist/invariants-fail-fast.js.map +1 -0
  507. package/node_modules/@xrkseek/server-host/dist/standing-tools.d.ts.map +1 -1
  508. package/node_modules/@xrkseek/server-host/dist/standing-tools.js +4 -1
  509. package/node_modules/@xrkseek/server-host/dist/standing-tools.js.map +1 -1
  510. package/node_modules/@xrkseek/server-host/package.json +10 -0
  511. package/node_modules/@xrkseek/server-http/dist/dsh-compat/adapter-providers.d.ts.map +1 -1
  512. package/node_modules/@xrkseek/server-http/dist/dsh-compat/adapter-providers.js +10 -4
  513. package/node_modules/@xrkseek/server-http/dist/dsh-compat/adapter-providers.js.map +1 -1
  514. package/node_modules/@xrkseek/server-http/dist/dsh-compat/adapter-types.d.ts +17 -0
  515. package/node_modules/@xrkseek/server-http/dist/dsh-compat/adapter-types.d.ts.map +1 -1
  516. package/node_modules/@xrkseek/server-http/dist/dsh-compat/auto-review-classifier.d.ts +8 -0
  517. package/node_modules/@xrkseek/server-http/dist/dsh-compat/auto-review-classifier.d.ts.map +1 -1
  518. package/node_modules/@xrkseek/server-http/dist/dsh-compat/auto-review-classifier.js +20 -5
  519. package/node_modules/@xrkseek/server-http/dist/dsh-compat/auto-review-classifier.js.map +1 -1
  520. package/node_modules/@xrkseek/server-http/dist/dsh-compat/auto-review-http.js +1 -1
  521. package/node_modules/@xrkseek/server-http/dist/dsh-compat/auto-review-http.js.map +1 -1
  522. package/node_modules/@xrkseek/server-http/dist/dsh-compat/dsh-compat-matrix.js +2 -2
  523. package/node_modules/@xrkseek/server-http/dist/dsh-compat/dsh-compat-matrix.js.map +1 -1
  524. package/node_modules/@xrkseek/server-http/dist/dsh-compat/im-gateway-sidecar.d.ts +5 -17
  525. package/node_modules/@xrkseek/server-http/dist/dsh-compat/im-gateway-sidecar.d.ts.map +1 -1
  526. package/node_modules/@xrkseek/server-http/dist/dsh-compat/im-gateway-sidecar.js +50 -49
  527. package/node_modules/@xrkseek/server-http/dist/dsh-compat/im-gateway-sidecar.js.map +1 -1
  528. package/node_modules/@xrkseek/server-http/dist/dsh-compat/memory-embeddings.d.ts +14 -4
  529. package/node_modules/@xrkseek/server-http/dist/dsh-compat/memory-embeddings.d.ts.map +1 -1
  530. package/node_modules/@xrkseek/server-http/dist/dsh-compat/memory-embeddings.js +30 -14
  531. package/node_modules/@xrkseek/server-http/dist/dsh-compat/memory-embeddings.js.map +1 -1
  532. package/node_modules/@xrkseek/server-http/dist/dsh-compat/noema.d.ts +3 -0
  533. package/node_modules/@xrkseek/server-http/dist/dsh-compat/noema.d.ts.map +1 -1
  534. package/node_modules/@xrkseek/server-http/dist/dsh-compat/noema.js +5 -5
  535. package/node_modules/@xrkseek/server-http/dist/dsh-compat/noema.js.map +1 -1
  536. package/node_modules/@xrkseek/server-http/dist/sidebar/sidebar-adapter.d.ts +5 -0
  537. package/node_modules/@xrkseek/server-http/dist/sidebar/sidebar-adapter.d.ts.map +1 -1
  538. package/node_modules/@xrkseek/server-http/dist/sidebar/sidebar-adapter.js +1 -0
  539. package/node_modules/@xrkseek/server-http/dist/sidebar/sidebar-adapter.js.map +1 -1
  540. package/node_modules/@xrkseek/server-http/package.json +1 -0
  541. package/node_modules/@xrkseek/server-loader/dist/index.d.ts +1 -1
  542. package/node_modules/@xrkseek/server-loader/dist/index.d.ts.map +1 -1
  543. package/node_modules/@xrkseek/server-loader/dist/index.js +1 -1
  544. package/node_modules/@xrkseek/server-loader/dist/index.js.map +1 -1
  545. package/node_modules/@xrkseek/server-loader/dist/shell-hooks.d.ts +75 -3
  546. package/node_modules/@xrkseek/server-loader/dist/shell-hooks.d.ts.map +1 -1
  547. package/node_modules/@xrkseek/server-loader/dist/shell-hooks.js +415 -46
  548. package/node_modules/@xrkseek/server-loader/dist/shell-hooks.js.map +1 -1
  549. package/node_modules/@xrkseek/session-format/README.md +20 -0
  550. package/node_modules/@xrkseek/session-format/dist/catalog.d.ts +27 -0
  551. package/node_modules/@xrkseek/session-format/dist/catalog.d.ts.map +1 -0
  552. package/node_modules/@xrkseek/session-format/dist/catalog.js +36 -0
  553. package/node_modules/@xrkseek/session-format/dist/catalog.js.map +1 -0
  554. package/node_modules/@xrkseek/session-format/dist/chain.d.ts +38 -0
  555. package/node_modules/@xrkseek/session-format/dist/chain.d.ts.map +1 -0
  556. package/node_modules/@xrkseek/session-format/dist/chain.js +86 -0
  557. package/node_modules/@xrkseek/session-format/dist/chain.js.map +1 -0
  558. package/node_modules/@xrkseek/session-format/dist/detect.d.ts +29 -0
  559. package/node_modules/@xrkseek/session-format/dist/detect.d.ts.map +1 -0
  560. package/node_modules/@xrkseek/session-format/dist/detect.js +68 -0
  561. package/node_modules/@xrkseek/session-format/dist/detect.js.map +1 -0
  562. package/node_modules/@xrkseek/session-format/dist/index.d.ts +12 -0
  563. package/node_modules/@xrkseek/session-format/dist/index.d.ts.map +1 -0
  564. package/node_modules/@xrkseek/session-format/dist/index.js +12 -0
  565. package/node_modules/@xrkseek/session-format/dist/index.js.map +1 -0
  566. package/node_modules/@xrkseek/session-format/dist/interchange-version.d.ts +6 -0
  567. package/node_modules/@xrkseek/session-format/dist/interchange-version.d.ts.map +1 -0
  568. package/node_modules/@xrkseek/session-format/dist/interchange-version.js +6 -0
  569. package/node_modules/@xrkseek/session-format/dist/interchange-version.js.map +1 -0
  570. package/node_modules/@xrkseek/session-format/dist/sqlite-schema.d.ts +31 -0
  571. package/node_modules/@xrkseek/session-format/dist/sqlite-schema.d.ts.map +1 -0
  572. package/node_modules/@xrkseek/session-format/dist/sqlite-schema.js +52 -0
  573. package/node_modules/@xrkseek/session-format/dist/sqlite-schema.js.map +1 -0
  574. package/node_modules/@xrkseek/session-format/package.json +24 -0
  575. package/node_modules/@xrkseek/session-telemetry/dist/index.d.ts +18 -4
  576. package/node_modules/@xrkseek/session-telemetry/dist/index.d.ts.map +1 -1
  577. package/node_modules/@xrkseek/session-telemetry/dist/index.js +97 -36
  578. package/node_modules/@xrkseek/session-telemetry/dist/index.js.map +1 -1
  579. package/node_modules/@xrkseek/spill/README.md +27 -0
  580. package/node_modules/@xrkseek/spill/dist/index.d.ts +11 -0
  581. package/node_modules/@xrkseek/spill/dist/index.d.ts.map +1 -0
  582. package/node_modules/@xrkseek/spill/dist/index.js +11 -0
  583. package/node_modules/@xrkseek/spill/dist/index.js.map +1 -0
  584. package/node_modules/@xrkseek/spill/dist/local-store.d.ts +30 -0
  585. package/node_modules/@xrkseek/spill/dist/local-store.d.ts.map +1 -0
  586. package/node_modules/@xrkseek/spill/dist/local-store.js +73 -0
  587. package/node_modules/@xrkseek/spill/dist/local-store.js.map +1 -0
  588. package/node_modules/@xrkseek/spill/dist/policy.d.ts +59 -0
  589. package/node_modules/@xrkseek/spill/dist/policy.d.ts.map +1 -0
  590. package/node_modules/@xrkseek/spill/dist/policy.js +143 -0
  591. package/node_modules/@xrkseek/spill/dist/policy.js.map +1 -0
  592. package/node_modules/@xrkseek/spill/dist/types.d.ts +46 -0
  593. package/node_modules/@xrkseek/spill/dist/types.d.ts.map +1 -0
  594. package/node_modules/@xrkseek/spill/dist/types.js +8 -0
  595. package/node_modules/@xrkseek/spill/dist/types.js.map +1 -0
  596. package/node_modules/@xrkseek/spill/package.json +27 -0
  597. package/node_modules/@xrkseek/workspace/dist/ecosystem-instructions.d.ts.map +1 -1
  598. package/node_modules/@xrkseek/workspace/dist/ecosystem-instructions.js +2 -0
  599. package/node_modules/@xrkseek/workspace/dist/ecosystem-instructions.js.map +1 -1
  600. package/node_modules/@xrkseek/workspace/dist/index.d.ts +1 -0
  601. package/node_modules/@xrkseek/workspace/dist/index.d.ts.map +1 -1
  602. package/node_modules/@xrkseek/workspace/dist/index.js +1 -0
  603. package/node_modules/@xrkseek/workspace/dist/index.js.map +1 -1
  604. package/node_modules/@xrkseek/workspace/dist/skill-propose.d.ts +71 -0
  605. package/node_modules/@xrkseek/workspace/dist/skill-propose.d.ts.map +1 -0
  606. package/node_modules/@xrkseek/workspace/dist/skill-propose.js +259 -0
  607. package/node_modules/@xrkseek/workspace/dist/skill-propose.js.map +1 -0
  608. package/node_modules/@xrkseek/xrk-file-reference-local/README.md +46 -45
  609. package/node_modules/@xrkseek/xrk-file-reference-local/README.zh.md +46 -45
  610. package/node_modules/@xrkseek/xrk-file-reference-local/dist/gitignore.d.ts +37 -0
  611. package/node_modules/@xrkseek/xrk-file-reference-local/dist/gitignore.d.ts.map +1 -0
  612. package/node_modules/@xrkseek/xrk-file-reference-local/dist/gitignore.js +91 -0
  613. package/node_modules/@xrkseek/xrk-file-reference-local/dist/gitignore.js.map +1 -0
  614. package/node_modules/@xrkseek/xrk-file-reference-local/dist/search.d.ts +7 -0
  615. package/node_modules/@xrkseek/xrk-file-reference-local/dist/search.d.ts.map +1 -1
  616. package/node_modules/@xrkseek/xrk-file-reference-local/dist/search.js +46 -4
  617. package/node_modules/@xrkseek/xrk-file-reference-local/dist/search.js.map +1 -1
  618. package/node_modules/@xrkseek/xrk-file-reference-local/package.json +30 -29
  619. package/node_modules/ignore/LICENSE-MIT +21 -0
  620. package/node_modules/ignore/README.md +452 -0
  621. package/node_modules/ignore/index.d.ts +81 -0
  622. package/node_modules/ignore/index.js +793 -0
  623. package/node_modules/ignore/legacy.js +690 -0
  624. package/node_modules/ignore/package.json +87 -0
  625. package/package.json +17 -1
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Map model-facing key combos (ctrl+s, return, …) onto WinForms SendKeys.
3
+ * Escape reserved SendKeys punctuation in bare character tokens.
4
+ */
5
+ /**
6
+ * Convert `ctrl+shift+s` / `return` into a SendKeys string.
7
+ * Throws if the combo is empty or contains an unknown named key.
8
+ */
9
+ export declare function mapKeysToSendKeys(keys: string): string;
10
+ //# sourceMappingURL=keys.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"keys.d.ts","sourceRoot":"","sources":["../src/keys.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAsCH;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CA2CtD"}
@@ -0,0 +1,89 @@
1
+ /**
2
+ * Map model-facing key combos (ctrl+s, return, …) onto WinForms SendKeys.
3
+ * Escape reserved SendKeys punctuation in bare character tokens.
4
+ */
5
+ const NAMED = {
6
+ return: "{ENTER}",
7
+ enter: "{ENTER}",
8
+ tab: "{TAB}",
9
+ escape: "{ESC}",
10
+ esc: "{ESC}",
11
+ backspace: "{BACKSPACE}",
12
+ bksp: "{BACKSPACE}",
13
+ delete: "{DELETE}",
14
+ del: "{DELETE}",
15
+ space: " ",
16
+ up: "{UP}",
17
+ down: "{DOWN}",
18
+ left: "{LEFT}",
19
+ right: "{RIGHT}",
20
+ home: "{HOME}",
21
+ end: "{END}",
22
+ pageup: "{PGUP}",
23
+ pagedown: "{PGDN}",
24
+ pgup: "{PGUP}",
25
+ pgdn: "{PGDN}",
26
+ insert: "{INSERT}",
27
+ };
28
+ for (let i = 1; i <= 12; i += 1) {
29
+ NAMED[`f${i}`] = `{F${i}}`;
30
+ }
31
+ function escapeLiteral(ch) {
32
+ // SendKeys treats these as meta unless braced.
33
+ if ("+^%~(){}".includes(ch))
34
+ return `{${ch}}`;
35
+ if (ch === "[")
36
+ return "{[}";
37
+ if (ch === "]")
38
+ return "{]}";
39
+ return ch;
40
+ }
41
+ /**
42
+ * Convert `ctrl+shift+s` / `return` into a SendKeys string.
43
+ * Throws if the combo is empty or contains an unknown named key.
44
+ */
45
+ export function mapKeysToSendKeys(keys) {
46
+ const raw = keys.trim();
47
+ if (!raw) {
48
+ throw new Error("keys must be a non-empty string");
49
+ }
50
+ const parts = raw.split("+").map((p) => p.trim()).filter(Boolean);
51
+ if (parts.length === 0) {
52
+ throw new Error("keys must be a non-empty string");
53
+ }
54
+ let mods = "";
55
+ const keyParts = [];
56
+ for (const part of parts) {
57
+ const lower = part.toLowerCase();
58
+ if (lower === "ctrl" || lower === "control") {
59
+ mods += "^";
60
+ continue;
61
+ }
62
+ if (lower === "alt") {
63
+ mods += "%";
64
+ continue;
65
+ }
66
+ if (lower === "shift") {
67
+ mods += "+";
68
+ continue;
69
+ }
70
+ if (lower === "win" || lower === "meta" || lower === "cmd") {
71
+ throw new Error("win/meta keys are not supported via SendKeys");
72
+ }
73
+ const named = NAMED[lower];
74
+ if (named !== undefined) {
75
+ keyParts.push(named);
76
+ continue;
77
+ }
78
+ if (part.length === 1) {
79
+ keyParts.push(escapeLiteral(part));
80
+ continue;
81
+ }
82
+ throw new Error(`unknown key token: ${part}`);
83
+ }
84
+ if (keyParts.length === 0) {
85
+ throw new Error("keys must include a non-modifier key");
86
+ }
87
+ return `${mods}${keyParts.join("")}`;
88
+ }
89
+ //# sourceMappingURL=keys.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"keys.js","sourceRoot":"","sources":["../src/keys.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,KAAK,GAA2B;IACpC,MAAM,EAAE,SAAS;IACjB,KAAK,EAAE,SAAS;IAChB,GAAG,EAAE,OAAO;IACZ,MAAM,EAAE,OAAO;IACf,GAAG,EAAE,OAAO;IACZ,SAAS,EAAE,aAAa;IACxB,IAAI,EAAE,aAAa;IACnB,MAAM,EAAE,UAAU;IAClB,GAAG,EAAE,UAAU;IACf,KAAK,EAAE,GAAG;IACV,EAAE,EAAE,MAAM;IACV,IAAI,EAAE,QAAQ;IACd,IAAI,EAAE,QAAQ;IACd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PT_TEXT } from "./format.js";
3
3
  import { type ComputerUseService } from "./types.js";
4
4
  export { COMPUTER_USE_PROMPT_TEXT };
5
- export declare function computerUseUnavailableMessage(env?: NodeJS.ProcessEnv): string;
5
+ export declare function computerUseUnavailableMessage(env?: NodeJS.ProcessEnv, product?: {
6
+ readonly mode?: string;
7
+ }): string;
6
8
  export interface CreateComputerUseToolsOptions {
7
9
  readonly service?: ComputerUseService;
8
10
  readonly env?: NodeJS.ProcessEnv;
@@ -1 +1 @@
1
- {"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../src/tools.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAqB,MAAM,qBAAqB,CAAC;AAC7E,OAAO,EACL,wBAAwB,EAEzB,MAAM,aAAa,CAAC;AACrB,OAAO,EAKL,KAAK,kBAAkB,EACxB,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,wBAAwB,EAAE,CAAC;AAEpC,wBAAgB,6BAA6B,CAC3C,GAAG,GAAE,MAAM,CAAC,UAAwB,GACnC,MAAM,CAcR;AAED,MAAM,WAAW,6BAA6B;IAC5C,QAAQ,CAAC,OAAO,CAAC,EAAE,kBAAkB,CAAC;IACtC,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC;CAClC;AAoBD;;;GAGG;AACH,wBAAgB,sBAAsB,CACpC,OAAO,GAAE,6BAAkC,GAC1C,cAAc,EAAE,CA0HlB"}
1
+ {"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../src/tools.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAqB,MAAM,qBAAqB,CAAC;AAC7E,OAAO,EACL,wBAAwB,EAEzB,MAAM,aAAa,CAAC;AACrB,OAAO,EAKL,KAAK,kBAAkB,EACxB,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,wBAAwB,EAAE,CAAC;AAEpC,wBAAgB,6BAA6B,CAC3C,GAAG,GAAE,MAAM,CAAC,UAAwB,EACpC,OAAO,CAAC,EAAE;IAAE,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,GACnC,MAAM,CAmBR;AAED,MAAM,WAAW,6BAA6B;IAC5C,QAAQ,CAAC,OAAO,CAAC,EAAE,kBAAkB,CAAC;IACtC,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC;CAClC;AAoBD;;;GAGG;AACH,wBAAgB,sBAAsB,CACpC,OAAO,GAAE,6BAAkC,GAC1C,cAAc,EAAE,CA0HlB"}
@@ -1,16 +1,20 @@
1
1
  import { COMPUTER_USE_PROMPT_TEXT, formatWindowsList, } from "./format.js";
2
2
  import { COMPUTER_USE_ACTIONS, ComputerUseError, isComputerUseError, } from "./types.js";
3
3
  export { COMPUTER_USE_PROMPT_TEXT };
4
- export function computerUseUnavailableMessage(env = process.env) {
4
+ export function computerUseUnavailableMessage(env = process.env, product) {
5
+ const envFlag = String(env.XRK_COMPUTER_USE ?? "").trim();
6
+ const productOn = product?.mode === "uia" || product?.mode === "background";
5
7
  if (process.platform === "win32") {
6
- if (String(env.XRK_COMPUTER_USE ?? "").trim() !== "1") {
7
- return ("Error: desktop computer-use is not enabled. Set XRK_COMPUTER_USE=1 to use the Windows UI Automation Provider " +
8
- "(accessibility tree + click/type). Separate from browser_* page tools. " +
8
+ if (envFlag === "" && !productOn) {
9
+ return ("Error: desktop computer-use is not enabled. Set Settings → Plugins → Computer use " +
10
+ "(or XRK_COMPUTER_USE=1) for the Windows UI Automation Provider " +
11
+ "(accessibility tree + click/type/key/scroll). Separate from browser_* page tools. " +
9
12
  "Delivery is UIA, not full background SPI (cua-driver).");
10
13
  }
11
14
  }
12
15
  return ("Error: no computer-use Provider is configured. Inject a ComputerUseService " +
13
- "(or set XRK_COMPUTER_USE=1 on Windows). Prefer browser_* for web pages.");
16
+ "(or enable Settings → Plugins → Computer use / XRK_COMPUTER_USE=1 on Windows). " +
17
+ "Prefer browser_* for web pages; reserve computer_use for native desktop apps.");
14
18
  }
15
19
  function fail(err) {
16
20
  const message = isComputerUseError(err)
@@ -33,10 +37,10 @@ export function createComputerUseTools(options = {}) {
33
37
  const missing = computerUseUnavailableMessage(options.env ?? process.env);
34
38
  const tool = {
35
39
  name: "computer_use",
36
- description: "Operate the host desktop via an accessibility tree + input Provider. " +
40
+ description: "Operate native host GUI apps via an accessibility tree + input Provider. " +
37
41
  "Actions: capture (AX snapshot with element indices), click, type, key, scroll, list_windows. " +
38
- "Prefer capture then click/type by element index. " +
39
- "Not for web pages — use browser_open / browser_snapshot / browser_act instead.",
42
+ "Prefer capture then click/type/key/scroll by element index. " +
43
+ "Not for web pages — use browser_open / browser_snapshot / browser_act (browser_vision for screenshots).",
40
44
  parameters: {
41
45
  type: "object",
42
46
  properties: {
@@ -1 +1 @@
1
- {"version":3,"file":"tools.js","sourceRoot":"","sources":["../src/tools.ts"],"names":[],"mappings":"AACA,OAAO,EACL,wBAAwB,EACxB,iBAAiB,GAClB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,oBAAoB,EACpB,gBAAgB,EAChB,kBAAkB,GAGnB,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,wBAAwB,EAAE,CAAC;AAEpC,MAAM,UAAU,6BAA6B,CAC3C,MAAyB,OAAO,CAAC,GAAG;IAEpC,IAAI,OAAO,CAAC,QAAQ,KAAK,OAAO,EAAE,CAAC;QACjC,IAAI,MAAM,CAAC,GAAG,CAAC,gBAAgB,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,KAAK,GAAG,EAAE,CAAC;YACtD,OAAO,CACL,+GAA+G;gBAC/G,yEAAyE;gBACzE,wDAAwD,CACzD,CAAC;QACJ,CAAC;IACH,CAAC;IACD,OAAO,CACL,6EAA6E;QAC7E,yEAAyE,CAC1E,CAAC;AACJ,CAAC;AAOD,SAAS,IAAI,CAAC,GAAY;IACxB,MAAM,OAAO,GAAG,kBAAkB,CAAC,GAAG,CAAC;QACrC,CAAC,CAAC,UAAU,G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C5B,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE;wBACjC,CAAC,CAAC,EAAE,CAAC;iBACR,EACD,MAAM,CACP,CAAC;gBACF,OAAO;oBACL,OAAO,EAAE,GAAG,MAAM,CAAC,OAAO,cAAc,MAAM,CAAC,QAAQ,GAAG;iBAC3D,CAAC;YACJ,CAAC;YAAC,OAAO,GAAG,EAAE,CAAC;gBACb,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC;YACnB,CAAC;QACH,CAAC;QACD,iBAAiB,EAAE,CAAC,IAAI,EAAE,EAAE;YAC1B,MAAM,MAAM,GAAG,MAAM,CAAC,IAAI,EAAE,MAAM,IAAI,EAAE,CAAC,CAAC;YAC1C,OAAO,MAAM,KAAK,SAAS,IAAI,MAAM,KAAK,cAAc,CAAC;QAC3D,CAAC;KACF,CAAC;IAEF,OAAO,CAAC,IAAI,CAAC,CAAC;AAChB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"windows-uia.d.ts","sourceRoot":"","sources":["../src/windows-uia.ts"],"names":[],"mappings":"AAMA,OAAO,EAML,KAAK,kBAAkB,EAExB,MAAM,YAAY,CAAC;AAEpB,MAAM,MAAM,gBAAgB,GAAG,CAC7B,MAAM,EAAE,MAAM,EACd,MAAM,CAAC,EAAE,WAAW,KACjB,OAAO,CAAC,MAAM,CAAC,CAAC;AA0LrB,MAAM,WAAW,0BAA0B;IACzC,QAAQ,CAAC,aAAa,CAAC,EAAE,gBAAgB,CAAC;CAC3C;AAiBD;;GAEG;AACH,wBAAgB,iCAAiC,CAC/C,OAAO,GAAE,0BAA+B,GACvC,kBAAkB,CAkGpB"}
1
+ {"version":3,"file":"windows-uia.d.ts","sourceRoot":"","sources":["../src/windows-uia.ts"],"names":[],"mappings":"AAOA,OAAO,EAML,KAAK,kBAAkB,EAExB,MAAM,YAAY,CAAC;AAEpB,MAAM,MAAM,gBAAgB,GAAG,CAC7B,MAAM,EAAE,MAAM,EACd,MAAM,CAAC,EAAE,WAAW,KACjB,OAAO,CAAC,MAAM,CAAC,CAAC;AAqRrB,MAAM,WAAW,0BAA0B;IACzC,QAAQ,CAAC,aAAa,CAAC,EAAE,gBAAgB,CAAC;CAC3C;AAiBD;;GAEG;AACH,wBAAgB,iCAAiC,CAC/C,OAAO,GAAE,0BAA+B,GACvC,kBAAkB,CAmKpB"}
@@ -4,6 +4,7 @@
4
4
  */
5
5
  import { spawn } from "node:child_process";
6
6
  import { buildCaptureResult, DEFAULT_MAX_ELEMENTS } from "./format.js";
7
+ import { mapKeysToSendKeys } from "./keys.js";
7
8
  import { ComputerUseError, } from "./types.js";
8
9
  async function defaultRunPowerShell(script, signal) {
9
10
  return await new Promise((resolve, reject) => {
@@ -145,6 +146,91 @@ $el.SetFocus()
145
146
  'typed-sendkeys'
146
147
  `.trim();
147
148
  }
149
+ function keyScript(keysSendWait, runtimeId) {
150
+ const keysLit = JSON.stringify(keysSendWait);
151
+ const focusBlock = runtimeId
152
+ ? `
153
+ $ids = @((${JSON.stringify(runtimeId)}) -split ',' | ForEach-Object { [int]$_ })
154
+ $el = [System.Windows.Automation.AutomationElement]::AutomationElementFromRuntimeId($ids)
155
+ if (-not $el) { throw 'element not found' }
156
+ $el.SetFocus()
157
+ Start-Sleep -Milliseconds 40
158
+ `
159
+ : "";
160
+ return `
161
+ Add-Type -AssemblyName UIAutomationClient
162
+ Add-Type -AssemblyName UIAutomationTypes
163
+ Add-Type -AssemblyName System.Windows.Forms
164
+ $ErrorActionPreference = 'Stop'
165
+ ${focusBlock}[System.Windows.Forms.SendKeys]::SendWait(${keysLit})
166
+ 'keyed'
167
+ `.trim();
168
+ }
169
+ function scrollScript(options) {
170
+ const amount = Math.max(1, Math.min(50, Math.floor(options.amount)));
171
+ const dir = options.direction;
172
+ const idLit = options.runtimeId
173
+ ? JSON.stringify(options.runtimeId)
174
+ : '""';
175
+ return `
176
+ Add-Type -AssemblyName UIAutomationClient
177
+ Add-Type -AssemblyName UIAutomationTypes
178
+ Add-Type -AssemblyName System.Windows.Forms
179
+ Add-Type -AssemblyName System.Drawing
180
+ $ErrorActionPreference = 'Stop'
181
+ $dir = ${JSON.stringify(dir)}
182
+ $amount = ${amount}
183
+ $runtimeId = ${idLit}
184
+ $el = $null
185
+ if ($runtimeId -ne '') {
186
+ $ids = @(($runtimeId) -split ',' | ForEach-Object { [int]$_ })
187
+ $el = [System.Windows.Automation.AutomationElement]::AutomationElementFromRuntimeId($ids)
188
+ if (-not $el) { throw 'element not found' }
189
+ }
190
+ if ($el) {
191
+ $scroll = $null
192
+ if ($el.TryGetCurrentPattern([System.Windows.Automation.ScrollPattern]::Pattern, [ref]$scroll)) {
193
+ $horiz = [System.Windows.Automation.ScrollAmount]::NoAmount
194
+ $vert = [System.Windows.Automation.ScrollAmount]::NoAmount
195
+ $large = [System.Windows.Automation.ScrollAmount]::LargeIncrement
196
+ $largeNeg = [System.Windows.Automation.ScrollAmount]::LargeDecrement
197
+ $small = [System.Windows.Automation.ScrollAmount]::SmallIncrement
198
+ $smallNeg = [System.Windows.Automation.ScrollAmount]::SmallDecrement
199
+ for ($i = 0; $i -lt $amount; $i++) {
200
+ if ($dir -eq 'down') { $vert = $large }
201
+ elseif ($dir -eq 'up') { $vert = $largeNeg }
202
+ elseif ($dir -eq 'right') { $horiz = $small }
203
+ elseif ($dir -eq 'left') { $horiz = $smallNeg }
204
+ $scroll.Scroll($horiz, $vert)
205
+ }
206
+ 'scrolled-pattern'
207
+ return
208
+ }
209
+ $el.SetFocus()
210
+ Start-Sleep -Milliseconds 40
211
+ $r = $el.Current.BoundingRectangle
212
+ $x = [int]($r.X + $r.Width / 2)
213
+ $y = [int]($r.Y + $r.Height / 2)
214
+ [System.Windows.Forms.Cursor]::Position = New-Object System.Drawing.Point($x, $y)
215
+ }
216
+ Add-Type @"
217
+ using System;
218
+ using System.Runtime.InteropServices;
219
+ public static class XrkMouseWheel {
220
+ [DllImport("user32.dll")]
221
+ public static extern void mouse_event(uint dwFlags, uint dx, uint dy, int dwData, UIntPtr dwExtraInfo);
222
+ public const uint MOUSEEVENTF_WHEEL = 0x0800;
223
+ public const uint MOUSEEVENTF_HWHEEL = 0x01000;
224
+ }
225
+ "@
226
+ $delta = 120 * $amount
227
+ if ($dir -eq 'down' -or $dir -eq 'right') { $delta = -$delta }
228
+ $flags = [XrkMouseWheel]::MOUSEEVENTF_WHEEL
229
+ if ($dir -eq 'left' -or $dir -eq 'right') { $flags = [XrkMouseWheel]::MOUSEEVENTF_HWHEEL }
230
+ [XrkMouseWheel]::mouse_event($flags, 0, 0, $delta, [UIntPtr]::Zero)
231
+ 'scrolled-wheel'
232
+ `.trim();
233
+ }
148
234
  function listWindowsScript() {
149
235
  return `
150
236
  Add-Type -AssemblyName UIAutomationClient
@@ -213,8 +299,58 @@ export function createWindowsUiAutomationProvider(options = {}) {
213
299
  });
214
300
  },
215
301
  async act(request, signal) {
216
- if (request.action === "scroll" || request.action === "key") {
217
- throw new ComputerUseError(`${request.action} via windows-uia is not implemented yet; inject a custom ComputerUseService or use cua-driver later`, "COMPUTER_USE_UNAVAILABLE");
302
+ if (request.action === "key") {
303
+ const keysRaw = String(request.keys ?? "").trim();
304
+ if (!keysRaw) {
305
+ throw new ComputerUseError("keys is required", "COMPUTER_USE_BAD_ARGS");
306
+ }
307
+ let sendKeys;
308
+ try {
309
+ sendKeys = mapKeysToSendKeys(keysRaw);
310
+ }
311
+ catch (err) {
312
+ throw new ComputerUseError(err instanceof Error ? err.message : String(err), "COMPUTER_USE_BAD_ARGS");
313
+ }
314
+ const runtimeId = request.element !== undefined
315
+ ? tokens.get(request.element)
316
+ : undefined;
317
+ if (request.element !== undefined && !runtimeId) {
318
+ throw new ComputerUseError(`stale or unknown element [${request.element}] — capture again`, "COMPUTER_USE_STALE_ELEMENT");
319
+ }
320
+ const out = await run(keyScript(sendKeys, runtimeId), signal);
321
+ return {
322
+ ok: true,
323
+ action: "key",
324
+ message: out || `pressed ${keysRaw}`,
325
+ delivery: "uia",
326
+ };
327
+ }
328
+ if (request.action === "scroll") {
329
+ const direction = request.direction ?? "down";
330
+ if (direction !== "up" &&
331
+ direction !== "down" &&
332
+ direction !== "left" &&
333
+ direction !== "right") {
334
+ throw new ComputerUseError("direction must be up|down|left|right", "COMPUTER_USE_BAD_ARGS");
335
+ }
336
+ const amount = request.amount ?? 3;
337
+ const runtimeId = request.element !== undefined
338
+ ? tokens.get(request.element)
339
+ : undefined;
340
+ if (request.element !== undefined && !runtimeId) {
341
+ throw new ComputerUseError(`stale or unknown element [${request.element}] — capture again`, "COMPUTER_USE_STALE_ELEMENT");
342
+ }
343
+ const out = await run(scrollScript({
344
+ ...(runtimeId !== undefined ? { runtimeId } : {}),
345
+ direction,
346
+ amount,
347
+ }), signal);
348
+ return {
349
+ ok: true,
350
+ action: "scroll",
351
+ message: out || `scrolled ${direction}`,
352
+ delivery: "uia",
353
+ };
218
354
  }
219
355
  if (request.element === undefined) {
220
356
  throw new ComputerUseError("element index is required", "COMPUTER_USE_BAD_ARGS");
@@ -1 +1 @@
1
- {"version":3,"file":"windows-uia.js","sourceRoot":"","sources":["../src/windows-uia.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AACvE,OAAO,EACL,gBAAgB,GAOjB,MAAM,YAAY,CAAC;AAOpB,KAAK,UAAU,oBAAoB,CACjC,MAAc,EACd,MAAoB;IAEpB,OAAO,MAAM,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QAC3C,MAAM,KAAK,GAAG,KAAK,CACjB,gBAAgB,EAChB,CAAC,YAAY,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,CAAC,EACnF,EAAE,WAAW,EAAE,IAAI,EAAE,CACtB,CAAC;QACF,IAAI,MAAM,GAAG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B,QAAQ,EAAE,KAAK;iBAChB,CAAC;YACJ,CAAC;YACD,IAAI,OAAO,CAAC,MAAM,KAAK,MAAM,EAAE,CAAC;gBAC9B,MAAM,GAAG,GAAG,MAAM,GAAG,CAAC,UAAU,CAAC,SAAS,EAAE,OAAO,CAAC,IAAI,IAAI,EAAE,CAAC,EAAE,MAAM,CAAC,CAAC;gBACzE,OAAO;oBACL,EAAE,EAAE,IAAI;oBACR,MAAM,EAAE,MAAM;oBACd,OAAO,EAAE,GAAG,IAAI,OAAO;oBACvB,QAAQ,EAAE,KAAK;iBAChB,CAAC;YACJ,CAAC;YACD,MAAM,IAAI,gBAAgB,CAAC,oBAAoB,EAAE,uBAAuB,CAAC,CAAC;QAC5E,CAAC;QACD,KAAK,CAAC,WAAW,CAAC,MAAoB;YACpC,MAAM,GAAG,GAAG,MAAM,GAAG,CAAC,iBAAiB,EAAE,EAAE,MAAM,CAAC,CAAC;YACnD,MAAM,MAAM,GAAG,SAAS,CACtB,GAAG,EACH,SAAS,CACV,CAAC;YACF,OAAO,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;QACnD,CAAC;KACF,CAAC;AACJ,CAAC"}
@@ -1,9 +1,12 @@
1
- # @xrkseek/exec-fs
2
-
3
- Workspace-rooted `FsService` + tools:
4
-
5
- - `read_file` / `write_file` / `apply_edit`
6
- - `glob` / `grep` (built-in; no shell rg)
7
-
8
- Provider: `createFsLocalProvider`. Consumer: `createFsTools(fs)`.
9
- See `docs/seams.md`.
1
+ # @xrkseek/exec-fs
2
+
3
+ Workspace-rooted `FsService` + tools:
4
+
5
+ - `read_file` / `write_file` / `apply_edit` / `apply_patch` (Codex `*** Begin Patch` format)
6
+ - `glob` / `grep` (built-in; no shell rg)
7
+
8
+ Provider: `createFsLocalProvider`. Consumer: `createFsTools(fs)`.
9
+ `apply_patch` shares the session cwd (including managed subagent worktrees);
10
+ folding a worktree branch back into the parent repo is Face
11
+ `ManagedWorktreeManager.mergeIntoParent` (ff-only), not this package.
12
+ See `docs/seams.md` · `docs/status.md`.
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Apply parsed Codex-style hunks onto LF-normalized file text (seek_sequence).
3
+ */
4
+ import type { PatchHunk, UpdateFileChunk } from "./apply-patch-parser.js";
5
+ export declare class ApplyPatchError extends Error {
6
+ constructor(message: string);
7
+ }
8
+ /** Locate `pattern` in `lines` at/after `start` (Codex seek_sequence). */
9
+ export declare function seekSequence(lines: readonly string[], pattern: readonly string[], start: number, eof: boolean): number | undefined;
10
+ /** Derive new file body (LF + trailing newline) from update chunks. */
11
+ export declare function deriveUpdatedContents(originalRaw: string, path: string, chunks: readonly UpdateFileChunk[]): {
12
+ readonly original: string;
13
+ readonly next: string;
14
+ };
15
+ export interface ApplyPatchFileOp {
16
+ readonly action: "add" | "update" | "delete" | "move";
17
+ readonly path: string;
18
+ readonly fromPath?: string;
19
+ }
20
+ export interface ApplyPatchPlan {
21
+ readonly ops: readonly ApplyPatchFileOp[];
22
+ /** Path → final UTF-8 contents (missing for pure deletes). */
23
+ readonly writes: ReadonlyMap<string, string>;
24
+ /** Paths to unlink after writes (delete + move source). */
25
+ readonly deletes: readonly string[];
26
+ }
27
+ /**
28
+ * Pure planning step: compute all writes/deletes from hunks + current file map.
29
+ * `readFile` returns raw UTF-8 or `undefined` when missing.
30
+ */
31
+ export declare function planPatchApplication(hunks: readonly PatchHunk[], readFile: (path: string) => string | undefined): ApplyPatchPlan;
32
+ //# sourceMappingURL=apply-patch-apply.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"apply-patch-apply.d.ts","sourceRoot":"","sources":["../src/apply-patch-apply.ts"],"names":[],"mappings":"AAAA;;GAEG;AAOH,OAAO,KAAK,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE1E,qBAAa,eAAgB,SAAQ,KAAK;gBAC5B,OAAO,EAAE,MAAM;C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