@xrkseek/harness 0.4.12 → 0.5.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 (518) hide show
  1. package/node_modules/@xrkseek/a2a/README.md +8 -6
  2. package/node_modules/@xrkseek/a2a/dist/client.d.ts +1 -0
  3. package/node_modules/@xrkseek/a2a/dist/client.d.ts.map +1 -1
  4. package/node_modules/@xrkseek/a2a/dist/client.js +36 -20
  5. package/node_modules/@xrkseek/a2a/dist/client.js.map +1 -1
  6. package/node_modules/@xrkseek/a2a/dist/inbound.d.ts +9 -2
  7. package/node_modules/@xrkseek/a2a/dist/inbound.d.ts.map +1 -1
  8. package/node_modules/@xrkseek/a2a/dist/inbound.js +86 -41
  9. package/node_modules/@xrkseek/a2a/dist/inbound.js.map +1 -1
  10. package/node_modules/@xrkseek/a2a/dist/index.d.ts +2 -1
  11. package/node_modules/@xrkseek/a2a/dist/index.d.ts.map +1 -1
  12. package/node_modules/@xrkseek/a2a/dist/index.js +2 -1
  13. package/node_modules/@xrkseek/a2a/dist/index.js.map +1 -1
  14. package/node_modules/@xrkseek/a2a/dist/protocol.d.ts +9 -0
  15. package/node_modules/@xrkseek/a2a/dist/protocol.d.ts.map +1 -1
  16. package/node_modules/@xrkseek/a2a/dist/protocol.js +25 -0
  17. package/node_modules/@xrkseek/a2a/dist/protocol.js.map +1 -1
  18. package/node_modules/@xrkseek/a2a/dist/task-store.d.ts +43 -0
  19. package/node_modules/@xrkseek/a2a/dist/task-store.d.ts.map +1 -0
  20. package/node_modules/@xrkseek/a2a/dist/task-store.js +105 -0
  21. package/node_modules/@xrkseek/a2a/dist/task-store.js.map +1 -0
  22. package/node_modules/@xrkseek/context-fragments/README.md +4 -2
  23. package/node_modules/@xrkseek/context-fragments/dist/index.d.ts +10 -2
  24. package/node_modules/@xrkseek/context-fragments/dist/index.d.ts.map +1 -1
  25. package/node_modules/@xrkseek/context-fragments/dist/index.js +16 -11
  26. package/node_modules/@xrkseek/context-fragments/dist/index.js.map +1 -1
  27. package/node_modules/@xrkseek/core-agent/dist/index.d.ts +5 -0
  28. package/node_modules/@xrkseek/core-agent/dist/index.d.ts.map +1 -1
  29. package/node_modules/@xrkseek/core-agent/dist/index.js +3 -0
  30. package/node_modules/@xrkseek/core-agent/dist/index.js.map +1 -1
  31. package/node_modules/@xrkseek/core-agent-loop/dist/index.d.ts +11 -0
  32. package/node_modules/@xrkseek/core-agent-loop/dist/index.d.ts.map +1 -1
  33. package/node_modules/@xrkseek/core-agent-loop/dist/index.js +9 -0
  34. package/node_modules/@xrkseek/core-agent-loop/dist/index.js.map +1 -1
  35. package/node_modules/@xrkseek/exec-computer-use/dist/background.js +2 -2
  36. package/node_modules/@xrkseek/exec-computer-use/dist/background.js.map +1 -1
  37. package/node_modules/@xrkseek/exec-computer-use/dist/format.d.ts +22 -1
  38. package/node_modules/@xrkseek/exec-computer-use/dist/format.d.ts.map +1 -1
  39. package/node_modules/@xrkseek/exec-computer-use/dist/format.js +75 -9
  40. package/node_modules/@xrkseek/exec-computer-use/dist/format.js.map +1 -1
  41. package/node_modules/@xrkseek/exec-computer-use/dist/index.d.ts +2 -2
  42. package/node_modules/@xrkseek/exec-computer-use/dist/index.d.ts.map +1 -1
  43. package/node_modules/@xrkseek/exec-computer-use/dist/index.js +2 -2
  44. package/node_modules/@xrkseek/exec-computer-use/dist/index.js.map +1 -1
  45. package/node_modules/@xrkseek/exec-computer-use/dist/memory.d.ts +2 -0
  46. package/node_modules/@xrkseek/exec-computer-use/dist/memory.d.ts.map +1 -1
  47. package/node_modules/@xrkseek/exec-computer-use/dist/memory.js +18 -2
  48. package/node_modules/@xrkseek/exec-computer-use/dist/memory.js.map +1 -1
  49. package/node_modules/@xrkseek/exec-computer-use/dist/tools.d.ts +15 -1
  50. package/node_modules/@xrkseek/exec-computer-use/dist/tools.d.ts.map +1 -1
  51. package/node_modules/@xrkseek/exec-computer-use/dist/tools.js +77 -22
  52. package/node_modules/@xrkseek/exec-computer-use/dist/tools.js.map +1 -1
  53. package/node_modules/@xrkseek/exec-computer-use/dist/types.d.ts +5 -0
  54. package/node_modules/@xrkseek/exec-computer-use/dist/types.d.ts.map +1 -1
  55. package/node_modules/@xrkseek/exec-computer-use/dist/types.js.map +1 -1
  56. package/node_modules/@xrkseek/exec-computer-use/dist/windows-uia.d.ts +4 -0
  57. package/node_modules/@xrkseek/exec-computer-use/dist/windows-uia.d.ts.map +1 -1
  58. package/node_modules/@xrkseek/exec-computer-use/dist/windows-uia.js +138 -6
  59. package/node_modules/@xrkseek/exec-computer-use/dist/windows-uia.js.map +1 -1
  60. package/node_modules/@xrkseek/exec-environment/README.md +2 -2
  61. package/node_modules/@xrkseek/exec-environment/dist/index.d.ts +1 -0
  62. package/node_modules/@xrkseek/exec-environment/dist/index.d.ts.map +1 -1
  63. package/node_modules/@xrkseek/exec-environment/dist/index.js +1 -0
  64. package/node_modules/@xrkseek/exec-environment/dist/index.js.map +1 -1
  65. package/node_modules/@xrkseek/exec-environment/dist/memory.d.ts +25 -0
  66. package/node_modules/@xrkseek/exec-environment/dist/memory.d.ts.map +1 -0
  67. package/node_modules/@xrkseek/exec-environment/dist/memory.js +290 -0
  68. package/node_modules/@xrkseek/exec-environment/dist/memory.js.map +1 -0
  69. package/node_modules/@xrkseek/exec-environment/dist/resolve.d.ts +5 -3
  70. package/node_modules/@xrkseek/exec-environment/dist/resolve.d.ts.map +1 -1
  71. package/node_modules/@xrkseek/exec-environment/dist/resolve.js +13 -5
  72. package/node_modules/@xrkseek/exec-environment/dist/resolve.js.map +1 -1
  73. package/node_modules/@xrkseek/exec-environment/dist/types.d.ts +1 -1
  74. package/node_modules/@xrkseek/exec-environment/dist/types.d.ts.map +1 -1
  75. package/node_modules/@xrkseek/exec-environment/package.json +1 -1
  76. package/node_modules/@xrkseek/exec-fs/dist/index.d.ts +1 -1
  77. package/node_modules/@xrkseek/exec-fs/dist/index.d.ts.map +1 -1
  78. package/node_modules/@xrkseek/exec-fs/dist/index.js +1 -1
  79. package/node_modules/@xrkseek/exec-fs/dist/index.js.map +1 -1
  80. package/node_modules/@xrkseek/exec-fs/dist/read-image.d.ts +2 -0
  81. package/node_modules/@xrkseek/exec-fs/dist/read-image.d.ts.map +1 -1
  82. package/node_modules/@xrkseek/exec-fs/dist/read-image.js +69 -31
  83. package/node_modules/@xrkseek/exec-fs/dist/read-image.js.map +1 -1
  84. package/node_modules/@xrkseek/exec-fs/dist/routing-prompt.d.ts.map +1 -1
  85. package/node_modules/@xrkseek/exec-fs/dist/routing-prompt.js +10 -1
  86. package/node_modules/@xrkseek/exec-fs/dist/routing-prompt.js.map +1 -1
  87. package/node_modules/@xrkseek/exec-image-gen/dist/format.d.ts +14 -0
  88. package/node_modules/@xrkseek/exec-image-gen/dist/format.d.ts.map +1 -1
  89. package/node_modules/@xrkseek/exec-image-gen/dist/format.js +28 -6
  90. package/node_modules/@xrkseek/exec-image-gen/dist/format.js.map +1 -1
  91. package/node_modules/@xrkseek/exec-image-gen/dist/index.d.ts +1 -1
  92. package/node_modules/@xrkseek/exec-image-gen/dist/index.d.ts.map +1 -1
  93. package/node_modules/@xrkseek/exec-image-gen/dist/index.js +1 -1
  94. package/node_modules/@xrkseek/exec-image-gen/dist/index.js.map +1 -1
  95. package/node_modules/@xrkseek/exec-image-gen/dist/references.d.ts.map +1 -1
  96. package/node_modules/@xrkseek/exec-image-gen/dist/references.js +8 -1
  97. package/node_modules/@xrkseek/exec-image-gen/dist/references.js.map +1 -1
  98. package/node_modules/@xrkseek/exec-image-gen/dist/schema.d.ts.map +1 -1
  99. package/node_modules/@xrkseek/exec-image-gen/dist/schema.js +11 -7
  100. package/node_modules/@xrkseek/exec-image-gen/dist/schema.js.map +1 -1
  101. package/node_modules/@xrkseek/exec-image-gen/dist/tools.d.ts +2 -2
  102. package/node_modules/@xrkseek/exec-image-gen/dist/tools.d.ts.map +1 -1
  103. package/node_modules/@xrkseek/exec-image-gen/dist/tools.js +38 -14
  104. package/node_modules/@xrkseek/exec-image-gen/dist/tools.js.map +1 -1
  105. package/node_modules/@xrkseek/exec-image-gen/package.json +2 -1
  106. package/node_modules/@xrkseek/exec-sandbox/dist/bwrap.d.ts +23 -3
  107. package/node_modules/@xrkseek/exec-sandbox/dist/bwrap.d.ts.map +1 -1
  108. package/node_modules/@xrkseek/exec-sandbox/dist/bwrap.js +40 -5
  109. package/node_modules/@xrkseek/exec-sandbox/dist/bwrap.js.map +1 -1
  110. package/node_modules/@xrkseek/exec-sandbox/dist/doctor.js +1 -1
  111. package/node_modules/@xrkseek/exec-sandbox/dist/doctor.js.map +1 -1
  112. package/node_modules/@xrkseek/exec-sandbox/dist/index.d.ts +1 -1
  113. package/node_modules/@xrkseek/exec-sandbox/dist/index.d.ts.map +1 -1
  114. package/node_modules/@xrkseek/exec-sandbox/dist/index.js +1 -1
  115. package/node_modules/@xrkseek/exec-sandbox/dist/index.js.map +1 -1
  116. package/node_modules/@xrkseek/exec-sandbox/dist/resolve.d.ts +8 -0
  117. package/node_modules/@xrkseek/exec-sandbox/dist/resolve.d.ts.map +1 -1
  118. package/node_modules/@xrkseek/exec-sandbox/dist/resolve.js +13 -4
  119. package/node_modules/@xrkseek/exec-sandbox/dist/resolve.js.map +1 -1
  120. package/node_modules/@xrkseek/exec-shell/dist/index.d.ts +6 -3
  121. package/node_modules/@xrkseek/exec-shell/dist/index.d.ts.map +1 -1
  122. package/node_modules/@xrkseek/exec-shell/dist/index.js +40 -10
  123. package/node_modules/@xrkseek/exec-shell/dist/index.js.map +1 -1
  124. package/node_modules/@xrkseek/exec-subprocess/dist/index.d.ts +4 -0
  125. package/node_modules/@xrkseek/exec-subprocess/dist/index.d.ts.map +1 -1
  126. package/node_modules/@xrkseek/exec-subprocess/dist/index.js +2 -0
  127. package/node_modules/@xrkseek/exec-subprocess/dist/index.js.map +1 -1
  128. package/node_modules/@xrkseek/exec-video-gen/dist/format.js +6 -6
  129. package/node_modules/@xrkseek/exec-video-gen/dist/format.js.map +1 -1
  130. package/node_modules/@xrkseek/exec-video-gen/dist/tools.js +2 -2
  131. package/node_modules/@xrkseek/exec-video-gen/dist/tools.js.map +1 -1
  132. package/node_modules/@xrkseek/exec-web/dist/browser-cdp.d.ts.map +1 -1
  133. package/node_modules/@xrkseek/exec-web/dist/browser-cdp.js +26 -1
  134. package/node_modules/@xrkseek/exec-web/dist/browser-cdp.js.map +1 -1
  135. package/node_modules/@xrkseek/exec-web/dist/browser-session.d.ts +10 -2
  136. package/node_modules/@xrkseek/exec-web/dist/browser-session.d.ts.map +1 -1
  137. package/node_modules/@xrkseek/exec-web/dist/browser-session.js +27 -4
  138. package/node_modules/@xrkseek/exec-web/dist/browser-session.js.map +1 -1
  139. package/node_modules/@xrkseek/exec-web/dist/browser-tools.d.ts.map +1 -1
  140. package/node_modules/@xrkseek/exec-web/dist/browser-tools.js +43 -14
  141. package/node_modules/@xrkseek/exec-web/dist/browser-tools.js.map +1 -1
  142. package/node_modules/@xrkseek/exec-web/dist/format.d.ts.map +1 -1
  143. package/node_modules/@xrkseek/exec-web/dist/format.js +2 -1
  144. package/node_modules/@xrkseek/exec-web/dist/format.js.map +1 -1
  145. package/node_modules/@xrkseek/exec-web/dist/index.d.ts +1 -1
  146. package/node_modules/@xrkseek/exec-web/dist/index.d.ts.map +1 -1
  147. package/node_modules/@xrkseek/exec-web/dist/index.js.map +1 -1
  148. package/node_modules/@xrkseek/llm/dist/reasoning-effort.d.ts +14 -0
  149. package/node_modules/@xrkseek/llm/dist/reasoning-effort.d.ts.map +1 -0
  150. package/node_modules/@xrkseek/llm/dist/reasoning-effort.js +21 -0
  151. package/node_modules/@xrkseek/llm/dist/reasoning-effort.js.map +1 -0
  152. package/node_modules/@xrkseek/preset-harness/dist/preset.d.ts.map +1 -1
  153. package/node_modules/@xrkseek/preset-harness/dist/preset.js +28 -4
  154. package/node_modules/@xrkseek/preset-harness/dist/preset.js.map +1 -1
  155. package/node_modules/@xrkseek/preset-harness/dist/tsconfig.tsbuildinfo +1 -1
  156. package/node_modules/@xrkseek/preset-minimal/dist/tsconfig.tsbuildinfo +1 -1
  157. package/node_modules/@xrkseek/preset-server/dist/tsconfig.tsbuildinfo +1 -1
  158. package/node_modules/@xrkseek/protocol/dist/workspace-changes.d.ts.map +1 -1
  159. package/node_modules/@xrkseek/protocol/dist/workspace-changes.js +3 -1
  160. package/node_modules/@xrkseek/protocol/dist/workspace-changes.js.map +1 -1
  161. package/node_modules/@xrkseek/server-face/dist/attach-http.d.ts +6 -2
  162. package/node_modules/@xrkseek/server-face/dist/attach-http.d.ts.map +1 -1
  163. package/node_modules/@xrkseek/server-face/dist/attach-http.js +120 -46
  164. package/node_modules/@xrkseek/server-face/dist/attach-http.js.map +1 -1
  165. package/node_modules/@xrkseek/server-face/dist/context.d.ts +18 -3
  166. package/node_modules/@xrkseek/server-face/dist/context.d.ts.map +1 -1
  167. package/node_modules/@xrkseek/server-face/dist/dispatch.d.ts.map +1 -1
  168. package/node_modules/@xrkseek/server-face/dist/dispatch.js +6 -2
  169. package/node_modules/@xrkseek/server-face/dist/dispatch.js.map +1 -1
  170. package/node_modules/@xrkseek/server-face/dist/face-schema.d.ts.map +1 -1
  171. package/node_modules/@xrkseek/server-face/dist/face-schema.js +1 -0
  172. package/node_modules/@xrkseek/server-face/dist/face-schema.js.map +1 -1
  173. package/node_modules/@xrkseek/server-face/dist/handlers/catalog.d.ts.map +1 -1
  174. package/node_modules/@xrkseek/server-face/dist/handlers/catalog.js +2 -1
  175. package/node_modules/@xrkseek/server-face/dist/handlers/catalog.js.map +1 -1
  176. package/node_modules/@xrkseek/server-face/dist/handlers/remotes.d.ts +11 -1
  177. package/node_modules/@xrkseek/server-face/dist/handlers/remotes.d.ts.map +1 -1
  178. package/node_modules/@xrkseek/server-face/dist/handlers/remotes.js +170 -4
  179. package/node_modules/@xrkseek/server-face/dist/handlers/remotes.js.map +1 -1
  180. package/node_modules/@xrkseek/server-face/dist/handlers/session-added.d.ts.map +1 -1
  181. package/node_modules/@xrkseek/server-face/dist/handlers/session-added.js +3 -2
  182. package/node_modules/@xrkseek/server-face/dist/handlers/session-added.js.map +1 -1
  183. package/node_modules/@xrkseek/server-face/dist/handlers/session.d.ts.map +1 -1
  184. package/node_modules/@xrkseek/server-face/dist/handlers/session.js +7 -6
  185. package/node_modules/@xrkseek/server-face/dist/handlers/session.js.map +1 -1
  186. package/node_modules/@xrkseek/server-face/dist/index.d.mts +3734 -0
  187. package/node_modules/@xrkseek/server-face/dist/index.d.mts.map +1 -0
  188. package/node_modules/@xrkseek/server-face/dist/index.d.ts +6 -3
  189. package/node_modules/@xrkseek/server-face/dist/index.d.ts.map +1 -1
  190. package/node_modules/@xrkseek/server-face/dist/index.js +6 -3
  191. package/node_modules/@xrkseek/server-face/dist/index.js.map +1 -1
  192. package/node_modules/@xrkseek/server-face/dist/index.mjs +22085 -0
  193. package/node_modules/@xrkseek/server-face/dist/index.mjs.map +1 -0
  194. package/node_modules/@xrkseek/server-face/dist/model-reasoning.d.ts +51 -0
  195. package/node_modules/@xrkseek/server-face/dist/model-reasoning.d.ts.map +1 -0
  196. package/node_modules/@xrkseek/server-face/dist/model-reasoning.js +104 -0
  197. package/node_modules/@xrkseek/server-face/dist/model-reasoning.js.map +1 -0
  198. package/node_modules/@xrkseek/server-face/dist/plugin-agent-presets.d.ts +34 -0
  199. package/node_modules/@xrkseek/server-face/dist/plugin-agent-presets.d.ts.map +1 -0
  200. package/node_modules/@xrkseek/server-face/dist/plugin-agent-presets.js +41 -0
  201. package/node_modules/@xrkseek/server-face/dist/plugin-agent-presets.js.map +1 -0
  202. package/node_modules/@xrkseek/server-face/dist/plugin-inventory.d.ts +5 -2
  203. package/node_modules/@xrkseek/server-face/dist/plugin-inventory.d.ts.map +1 -1
  204. package/node_modules/@xrkseek/server-face/dist/plugin-inventory.js +13 -2
  205. package/node_modules/@xrkseek/server-face/dist/plugin-inventory.js.map +1 -1
  206. package/node_modules/@xrkseek/server-face/dist/projections/units/context-timeline.d.ts.map +1 -1
  207. package/node_modules/@xrkseek/server-face/dist/projections/units/context-timeline.js +3 -1
  208. package/node_modules/@xrkseek/server-face/dist/projections/units/context-timeline.js.map +1 -1
  209. package/node_modules/@xrkseek/server-face/dist/remote-event.d.ts +1 -1
  210. package/node_modules/@xrkseek/server-face/dist/remote-event.d.ts.map +1 -1
  211. package/node_modules/@xrkseek/server-face/dist/remote-event.js +1 -0
  212. package/node_modules/@xrkseek/server-face/dist/remote-event.js.map +1 -1
  213. package/node_modules/@xrkseek/server-face/dist/runtime.d.ts +17 -4
  214. package/node_modules/@xrkseek/server-face/dist/runtime.d.ts.map +1 -1
  215. package/node_modules/@xrkseek/server-face/dist/runtime.js +14 -2
  216. package/node_modules/@xrkseek/server-face/dist/runtime.js.map +1 -1
  217. package/node_modules/@xrkseek/server-face/dist/session-agent-preset-store.d.ts +14 -0
  218. package/node_modules/@xrkseek/server-face/dist/session-agent-preset-store.d.ts.map +1 -0
  219. package/node_modules/@xrkseek/server-face/dist/session-agent-preset-store.js +71 -0
  220. package/node_modules/@xrkseek/server-face/dist/session-agent-preset-store.js.map +1 -0
  221. package/node_modules/@xrkseek/server-face/dist/session-agent-preset.d.ts +17 -0
  222. package/node_modules/@xrkseek/server-face/dist/session-agent-preset.d.ts.map +1 -0
  223. package/node_modules/@xrkseek/server-face/dist/session-agent-preset.js +50 -0
  224. package/node_modules/@xrkseek/server-face/dist/session-agent-preset.js.map +1 -0
  225. package/node_modules/@xrkseek/server-face/dist/session-attachment.d.ts +4 -0
  226. package/node_modules/@xrkseek/server-face/dist/session-attachment.d.ts.map +1 -1
  227. package/node_modules/@xrkseek/server-face/dist/session-attachment.js +30 -7
  228. package/node_modules/@xrkseek/server-face/dist/session-attachment.js.map +1 -1
  229. package/node_modules/@xrkseek/server-face/dist/session-status.d.ts.map +1 -1
  230. package/node_modules/@xrkseek/server-face/dist/session-status.js +2 -1
  231. package/node_modules/@xrkseek/server-face/dist/session-status.js.map +1 -1
  232. package/node_modules/@xrkseek/server-face/dist/settings-credentials.d.ts +6 -0
  233. package/node_modules/@xrkseek/server-face/dist/settings-credentials.d.ts.map +1 -1
  234. package/node_modules/@xrkseek/server-face/dist/settings-credentials.js +68 -12
  235. package/node_modules/@xrkseek/server-face/dist/settings-credentials.js.map +1 -1
  236. package/node_modules/@xrkseek/server-face/dist/settings-schemas.d.ts.map +1 -1
  237. package/node_modules/@xrkseek/server-face/dist/settings-schemas.js +7 -3
  238. package/node_modules/@xrkseek/server-face/dist/settings-schemas.js.map +1 -1
  239. package/node_modules/@xrkseek/server-face/dist/subagent-tools.d.ts.map +1 -1
  240. package/node_modules/@xrkseek/server-face/dist/subagent-tools.js +25 -1
  241. package/node_modules/@xrkseek/server-face/dist/subagent-tools.js.map +1 -1
  242. package/node_modules/@xrkseek/server-face/dist/types.d.ts +3 -0
  243. package/node_modules/@xrkseek/server-face/dist/types.d.ts.map +1 -1
  244. package/node_modules/@xrkseek/server-face/dist/workspace-face.d.ts +2 -0
  245. package/node_modules/@xrkseek/server-face/dist/workspace-face.d.ts.map +1 -1
  246. package/node_modules/@xrkseek/server-face/dist/workspace-face.js +61 -3
  247. package/node_modules/@xrkseek/server-face/dist/workspace-face.js.map +1 -1
  248. package/node_modules/@xrkseek/server-face/dist/workspace-registry.d.ts +23 -2
  249. package/node_modules/@xrkseek/server-face/dist/workspace-registry.d.ts.map +1 -1
  250. package/node_modules/@xrkseek/server-face/dist/workspace-registry.js +37 -2
  251. package/node_modules/@xrkseek/server-face/dist/workspace-registry.js.map +1 -1
  252. package/node_modules/@xrkseek/server-face/dist/workspace-store.d.ts +2 -0
  253. package/node_modules/@xrkseek/server-face/dist/workspace-store.d.ts.map +1 -1
  254. package/node_modules/@xrkseek/server-face/dist/workspace-store.js +4 -0
  255. package/node_modules/@xrkseek/server-face/dist/workspace-store.js.map +1 -1
  256. package/node_modules/@xrkseek/server-host/dist/cron-http.d.ts +26 -0
  257. package/node_modules/@xrkseek/server-host/dist/cron-http.d.ts.map +1 -0
  258. package/node_modules/@xrkseek/server-host/dist/cron-http.js +77 -0
  259. package/node_modules/@xrkseek/server-host/dist/cron-http.js.map +1 -0
  260. package/node_modules/@xrkseek/server-host/dist/index.d.ts.map +1 -1
  261. package/node_modules/@xrkseek/server-host/dist/index.js +222 -123
  262. package/node_modules/@xrkseek/server-host/dist/index.js.map +1 -1
  263. package/node_modules/@xrkseek/server-host/dist/mcp-wire.d.ts +8 -0
  264. package/node_modules/@xrkseek/server-host/dist/mcp-wire.d.ts.map +1 -1
  265. package/node_modules/@xrkseek/server-host/dist/mcp-wire.js +33 -1
  266. package/node_modules/@xrkseek/server-host/dist/mcp-wire.js.map +1 -1
  267. package/node_modules/@xrkseek/server-host/dist/sidebar-face-bridge.d.ts.map +1 -1
  268. package/node_modules/@xrkseek/server-host/dist/sidebar-face-bridge.js +2 -1
  269. package/node_modules/@xrkseek/server-host/dist/sidebar-face-bridge.js.map +1 -1
  270. package/node_modules/@xrkseek/server-host/dist/sidebar-pty-agent.d.ts +2 -0
  271. package/node_modules/@xrkseek/server-host/dist/sidebar-pty-agent.d.ts.map +1 -0
  272. package/node_modules/@xrkseek/server-host/dist/sidebar-pty-agent.js +98 -0
  273. package/node_modules/@xrkseek/server-host/dist/sidebar-pty-agent.js.map +1 -0
  274. package/node_modules/@xrkseek/server-host/dist/sidebar-pty-worker.d.ts +18 -0
  275. package/node_modules/@xrkseek/server-host/dist/sidebar-pty-worker.d.ts.map +1 -0
  276. package/node_modules/@xrkseek/server-host/dist/sidebar-pty-worker.js +141 -0
  277. package/node_modules/@xrkseek/server-host/dist/sidebar-pty-worker.js.map +1 -0
  278. package/node_modules/@xrkseek/server-host/dist/sidebar-pty.d.ts +11 -4
  279. package/node_modules/@xrkseek/server-host/dist/sidebar-pty.d.ts.map +1 -1
  280. package/node_modules/@xrkseek/server-host/dist/sidebar-pty.js +353 -2
  281. package/node_modules/@xrkseek/server-host/dist/sidebar-pty.js.map +1 -1
  282. package/node_modules/@xrkseek/server-host/dist/win-fd-inherit.d.ts +30 -0
  283. package/node_modules/@xrkseek/server-host/dist/win-fd-inherit.d.ts.map +1 -0
  284. package/node_modules/@xrkseek/server-host/dist/win-fd-inherit.js +96 -0
  285. package/node_modules/@xrkseek/server-host/dist/win-fd-inherit.js.map +1 -0
  286. package/node_modules/@xrkseek/server-http/dist/dsh-compat/adapter-providers.d.ts.map +1 -1
  287. package/node_modules/@xrkseek/server-http/dist/dsh-compat/adapter-providers.js +306 -11
  288. package/node_modules/@xrkseek/server-http/dist/dsh-compat/adapter-providers.js.map +1 -1
  289. package/node_modules/@xrkseek/server-http/dist/dsh-compat/audit-community-client.d.ts.map +1 -1
  290. package/node_modules/@xrkseek/server-http/dist/dsh-compat/audit-community-client.js +53 -3
  291. package/node_modules/@xrkseek/server-http/dist/dsh-compat/audit-community-client.js.map +1 -1
  292. package/node_modules/@xrkseek/server-http/dist/dsh-compat/billing.d.ts +9 -0
  293. package/node_modules/@xrkseek/server-http/dist/dsh-compat/billing.d.ts.map +1 -0
  294. package/node_modules/@xrkseek/server-http/dist/dsh-compat/billing.js +80 -0
  295. package/node_modules/@xrkseek/server-http/dist/dsh-compat/billing.js.map +1 -0
  296. package/node_modules/@xrkseek/server-http/dist/dsh-compat/code-server.d.ts +11 -0
  297. package/node_modules/@xrkseek/server-http/dist/dsh-compat/code-server.d.ts.map +1 -0
  298. package/node_modules/@xrkseek/server-http/dist/dsh-compat/code-server.js +152 -0
  299. package/node_modules/@xrkseek/server-http/dist/dsh-compat/code-server.js.map +1 -0
  300. package/node_modules/@xrkseek/server-http/dist/dsh-compat/community-plugin-root.d.ts +5 -0
  301. package/node_modules/@xrkseek/server-http/dist/dsh-compat/community-plugin-root.d.ts.map +1 -0
  302. package/node_modules/@xrkseek/server-http/dist/dsh-compat/community-plugin-root.js +31 -0
  303. package/node_modules/@xrkseek/server-http/dist/dsh-compat/community-plugin-root.js.map +1 -0
  304. package/node_modules/@xrkseek/server-http/dist/dsh-compat/community-root-http.d.ts +17 -3
  305. package/node_modules/@xrkseek/server-http/dist/dsh-compat/community-root-http.d.ts.map +1 -1
  306. package/node_modules/@xrkseek/server-http/dist/dsh-compat/community-root-http.js +265 -8
  307. package/node_modules/@xrkseek/server-http/dist/dsh-compat/community-root-http.js.map +1 -1
  308. package/node_modules/@xrkseek/server-http/dist/dsh-compat/dsh-client-scan.d.ts.map +1 -1
  309. package/node_modules/@xrkseek/server-http/dist/dsh-compat/dsh-client-scan.js +6 -1
  310. package/node_modules/@xrkseek/server-http/dist/dsh-compat/dsh-client-scan.js.map +1 -1
  311. package/node_modules/@xrkseek/server-http/dist/dsh-compat/dsh-codex-ui.d.ts +7 -0
  312. package/node_modules/@xrkseek/server-http/dist/dsh-compat/dsh-codex-ui.d.ts.map +1 -0
  313. package/node_modules/@xrkseek/server-http/dist/dsh-compat/dsh-codex-ui.js +188 -0
  314. package/node_modules/@xrkseek/server-http/dist/dsh-compat/dsh-codex-ui.js.map +1 -0
  315. package/node_modules/@xrkseek/server-http/dist/dsh-compat/dsh-compat-matrix.d.ts.map +1 -1
  316. package/node_modules/@xrkseek/server-http/dist/dsh-compat/dsh-compat-matrix.js +3 -3
  317. package/node_modules/@xrkseek/server-http/dist/dsh-compat/dsh-compat-matrix.js.map +1 -1
  318. package/node_modules/@xrkseek/server-http/dist/dsh-compat/dsh-context.d.ts +11 -0
  319. package/node_modules/@xrkseek/server-http/dist/dsh-compat/dsh-context.d.ts.map +1 -0
  320. package/node_modules/@xrkseek/server-http/dist/dsh-compat/dsh-context.js +117 -0
  321. package/node_modules/@xrkseek/server-http/dist/dsh-compat/dsh-context.js.map +1 -0
  322. package/node_modules/@xrkseek/server-http/dist/dsh-compat/dsh-email.d.ts +11 -0
  323. package/node_modules/@xrkseek/server-http/dist/dsh-compat/dsh-email.d.ts.map +1 -0
  324. package/node_modules/@xrkseek/server-http/dist/dsh-compat/dsh-email.js +381 -0
  325. package/node_modules/@xrkseek/server-http/dist/dsh-compat/dsh-email.js.map +1 -0
  326. package/node_modules/@xrkseek/server-http/dist/dsh-compat/dsh-path-capabilities.d.ts.map +1 -1
  327. package/node_modules/@xrkseek/server-http/dist/dsh-compat/dsh-path-capabilities.js +43 -1
  328. package/node_modules/@xrkseek/server-http/dist/dsh-compat/dsh-path-capabilities.js.map +1 -1
  329. package/node_modules/@xrkseek/server-http/dist/dsh-compat/dsh-pet-legacy.d.ts +11 -0
  330. package/node_modules/@xrkseek/server-http/dist/dsh-compat/dsh-pet-legacy.d.ts.map +1 -0
  331. package/node_modules/@xrkseek/server-http/dist/dsh-compat/dsh-pet-legacy.js +173 -0
  332. package/node_modules/@xrkseek/server-http/dist/dsh-compat/dsh-pet-legacy.js.map +1 -0
  333. package/node_modules/@xrkseek/server-http/dist/dsh-compat/dsh-skins.d.ts +17 -0
  334. package/node_modules/@xrkseek/server-http/dist/dsh-compat/dsh-skins.d.ts.map +1 -0
  335. package/node_modules/@xrkseek/server-http/dist/dsh-compat/dsh-skins.js +209 -0
  336. package/node_modules/@xrkseek/server-http/dist/dsh-compat/dsh-skins.js.map +1 -0
  337. package/node_modules/@xrkseek/server-http/dist/dsh-compat/dsh-ssh.d.ts +7 -0
  338. package/node_modules/@xrkseek/server-http/dist/dsh-compat/dsh-ssh.d.ts.map +1 -0
  339. package/node_modules/@xrkseek/server-http/dist/dsh-compat/dsh-ssh.js +470 -0
  340. package/node_modules/@xrkseek/server-http/dist/dsh-compat/dsh-ssh.js.map +1 -0
  341. package/node_modules/@xrkseek/server-http/dist/dsh-compat/dsh-update.d.ts +7 -0
  342. package/node_modules/@xrkseek/server-http/dist/dsh-compat/dsh-update.d.ts.map +1 -0
  343. package/node_modules/@xrkseek/server-http/dist/dsh-compat/dsh-update.js +93 -0
  344. package/node_modules/@xrkseek/server-http/dist/dsh-compat/dsh-update.js.map +1 -0
  345. package/node_modules/@xrkseek/server-http/dist/dsh-compat/free-search.d.ts +27 -0
  346. package/node_modules/@xrkseek/server-http/dist/dsh-compat/free-search.d.ts.map +1 -0
  347. package/node_modules/@xrkseek/server-http/dist/dsh-compat/free-search.js +213 -0
  348. package/node_modules/@xrkseek/server-http/dist/dsh-compat/free-search.js.map +1 -0
  349. package/node_modules/@xrkseek/server-http/dist/dsh-compat/generic-dsh-http.d.ts +6 -2
  350. package/node_modules/@xrkseek/server-http/dist/dsh-compat/generic-dsh-http.d.ts.map +1 -1
  351. package/node_modules/@xrkseek/server-http/dist/dsh-compat/generic-dsh-http.js +92 -14
  352. package/node_modules/@xrkseek/server-http/dist/dsh-compat/generic-dsh-http.js.map +1 -1
  353. package/node_modules/@xrkseek/server-http/dist/dsh-compat/generic-plugin-http.d.ts +1 -0
  354. package/node_modules/@xrkseek/server-http/dist/dsh-compat/generic-plugin-http.d.ts.map +1 -1
  355. package/node_modules/@xrkseek/server-http/dist/dsh-compat/generic-plugin-http.js +72 -1
  356. package/node_modules/@xrkseek/server-http/dist/dsh-compat/generic-plugin-http.js.map +1 -1
  357. package/node_modules/@xrkseek/server-http/dist/dsh-compat/git-graph.d.ts +9 -0
  358. package/node_modules/@xrkseek/server-http/dist/dsh-compat/git-graph.d.ts.map +1 -0
  359. package/node_modules/@xrkseek/server-http/dist/dsh-compat/git-graph.js +341 -0
  360. package/node_modules/@xrkseek/server-http/dist/dsh-compat/git-graph.js.map +1 -0
  361. package/node_modules/@xrkseek/server-http/dist/dsh-compat/honest-http-catchall.d.ts.map +1 -1
  362. package/node_modules/@xrkseek/server-http/dist/dsh-compat/honest-http-catchall.js +3 -0
  363. package/node_modules/@xrkseek/server-http/dist/dsh-compat/honest-http-catchall.js.map +1 -1
  364. package/node_modules/@xrkseek/server-http/dist/dsh-compat/im-connect.d.ts +7 -0
  365. package/node_modules/@xrkseek/server-http/dist/dsh-compat/im-connect.d.ts.map +1 -0
  366. package/node_modules/@xrkseek/server-http/dist/dsh-compat/im-connect.js +138 -0
  367. package/node_modules/@xrkseek/server-http/dist/dsh-compat/im-connect.js.map +1 -0
  368. package/node_modules/@xrkseek/server-http/dist/dsh-compat/install.d.ts +11 -0
  369. package/node_modules/@xrkseek/server-http/dist/dsh-compat/install.d.ts.map +1 -0
  370. package/node_modules/@xrkseek/server-http/dist/dsh-compat/install.js +85 -0
  371. package/node_modules/@xrkseek/server-http/dist/dsh-compat/install.js.map +1 -0
  372. package/node_modules/@xrkseek/server-http/dist/dsh-compat/market.d.ts +27 -0
  373. package/node_modules/@xrkseek/server-http/dist/dsh-compat/market.d.ts.map +1 -1
  374. package/node_modules/@xrkseek/server-http/dist/dsh-compat/market.js +230 -52
  375. package/node_modules/@xrkseek/server-http/dist/dsh-compat/market.js.map +1 -1
  376. package/node_modules/@xrkseek/server-http/dist/dsh-compat/mcp-connector.d.ts +11 -0
  377. package/node_modules/@xrkseek/server-http/dist/dsh-compat/mcp-connector.d.ts.map +1 -0
  378. package/node_modules/@xrkseek/server-http/dist/dsh-compat/mcp-connector.js +182 -0
  379. package/node_modules/@xrkseek/server-http/dist/dsh-compat/mcp-connector.js.map +1 -0
  380. package/node_modules/@xrkseek/server-http/dist/dsh-compat/michengai.d.ts +13 -0
  381. package/node_modules/@xrkseek/server-http/dist/dsh-compat/michengai.d.ts.map +1 -0
  382. package/node_modules/@xrkseek/server-http/dist/dsh-compat/michengai.js +151 -0
  383. package/node_modules/@xrkseek/server-http/dist/dsh-compat/michengai.js.map +1 -0
  384. package/node_modules/@xrkseek/server-http/dist/dsh-compat/mnemon-store.d.ts +6 -0
  385. package/node_modules/@xrkseek/server-http/dist/dsh-compat/mnemon-store.d.ts.map +1 -1
  386. package/node_modules/@xrkseek/server-http/dist/dsh-compat/mnemon-store.js +34 -0
  387. package/node_modules/@xrkseek/server-http/dist/dsh-compat/mnemon-store.js.map +1 -1
  388. package/node_modules/@xrkseek/server-http/dist/dsh-compat/mnemon.d.ts +2 -0
  389. package/node_modules/@xrkseek/server-http/dist/dsh-compat/mnemon.d.ts.map +1 -1
  390. package/node_modules/@xrkseek/server-http/dist/dsh-compat/mnemon.js +271 -20
  391. package/node_modules/@xrkseek/server-http/dist/dsh-compat/mnemon.js.map +1 -1
  392. package/node_modules/@xrkseek/server-http/dist/dsh-compat/modlens.d.ts +1 -1
  393. package/node_modules/@xrkseek/server-http/dist/dsh-compat/modlens.d.ts.map +1 -1
  394. package/node_modules/@xrkseek/server-http/dist/dsh-compat/modlens.js +105 -21
  395. package/node_modules/@xrkseek/server-http/dist/dsh-compat/modlens.js.map +1 -1
  396. package/node_modules/@xrkseek/server-http/dist/dsh-compat/niulai-kws.d.ts +7 -0
  397. package/node_modules/@xrkseek/server-http/dist/dsh-compat/niulai-kws.d.ts.map +1 -0
  398. package/node_modules/@xrkseek/server-http/dist/dsh-compat/niulai-kws.js +81 -0
  399. package/node_modules/@xrkseek/server-http/dist/dsh-compat/niulai-kws.js.map +1 -0
  400. package/node_modules/@xrkseek/server-http/dist/dsh-compat/pet.d.ts +8 -0
  401. package/node_modules/@xrkseek/server-http/dist/dsh-compat/pet.d.ts.map +1 -0
  402. package/node_modules/@xrkseek/server-http/dist/dsh-compat/pet.js +378 -0
  403. package/node_modules/@xrkseek/server-http/dist/dsh-compat/pet.js.map +1 -0
  404. package/node_modules/@xrkseek/server-http/dist/dsh-compat/remote-web-ui.d.ts +7 -0
  405. package/node_modules/@xrkseek/server-http/dist/dsh-compat/remote-web-ui.d.ts.map +1 -0
  406. package/node_modules/@xrkseek/server-http/dist/dsh-compat/remote-web-ui.js +229 -0
  407. package/node_modules/@xrkseek/server-http/dist/dsh-compat/remote-web-ui.js.map +1 -0
  408. package/node_modules/@xrkseek/server-http/dist/dsh-compat/server-deck.d.ts +7 -0
  409. package/node_modules/@xrkseek/server-http/dist/dsh-compat/server-deck.d.ts.map +1 -0
  410. package/node_modules/@xrkseek/server-http/dist/dsh-compat/server-deck.js +300 -0
  411. package/node_modules/@xrkseek/server-http/dist/dsh-compat/server-deck.js.map +1 -0
  412. package/node_modules/@xrkseek/server-http/dist/dsh-compat/settings-defaults.d.ts.map +1 -1
  413. package/node_modules/@xrkseek/server-http/dist/dsh-compat/settings-defaults.js +10 -1
  414. package/node_modules/@xrkseek/server-http/dist/dsh-compat/settings-defaults.js.map +1 -1
  415. package/node_modules/@xrkseek/server-http/dist/dsh-compat/settings-store.d.ts.map +1 -1
  416. package/node_modules/@xrkseek/server-http/dist/dsh-compat/settings-store.js +40 -9
  417. package/node_modules/@xrkseek/server-http/dist/dsh-compat/settings-store.js.map +1 -1
  418. package/node_modules/@xrkseek/server-http/dist/dsh-compat/skills-manager.d.ts +8 -0
  419. package/node_modules/@xrkseek/server-http/dist/dsh-compat/skills-manager.d.ts.map +1 -0
  420. package/node_modules/@xrkseek/server-http/dist/dsh-compat/skills-manager.js +428 -0
  421. package/node_modules/@xrkseek/server-http/dist/dsh-compat/skills-manager.js.map +1 -0
  422. package/node_modules/@xrkseek/server-http/dist/dsh-compat/skin-assets.d.ts +12 -0
  423. package/node_modules/@xrkseek/server-http/dist/dsh-compat/skin-assets.d.ts.map +1 -0
  424. package/node_modules/@xrkseek/server-http/dist/dsh-compat/skin-assets.js +166 -0
  425. package/node_modules/@xrkseek/server-http/dist/dsh-compat/skin-assets.js.map +1 -0
  426. package/node_modules/@xrkseek/server-http/dist/dsh-compat/skin-center.d.ts +20 -0
  427. package/node_modules/@xrkseek/server-http/dist/dsh-compat/skin-center.d.ts.map +1 -0
  428. package/node_modules/@xrkseek/server-http/dist/dsh-compat/skin-center.js +308 -0
  429. package/node_modules/@xrkseek/server-http/dist/dsh-compat/skin-center.js.map +1 -0
  430. package/node_modules/@xrkseek/server-http/dist/dsh-compat/skin-discover.d.ts +32 -0
  431. package/node_modules/@xrkseek/server-http/dist/dsh-compat/skin-discover.d.ts.map +1 -0
  432. package/node_modules/@xrkseek/server-http/dist/dsh-compat/skin-discover.js +183 -0
  433. package/node_modules/@xrkseek/server-http/dist/dsh-compat/skin-discover.js.map +1 -0
  434. package/node_modules/@xrkseek/server-http/dist/dsh-compat/skin-market.d.ts +2 -0
  435. package/node_modules/@xrkseek/server-http/dist/dsh-compat/skin-market.d.ts.map +1 -1
  436. package/node_modules/@xrkseek/server-http/dist/dsh-compat/skin-market.js +20 -16
  437. package/node_modules/@xrkseek/server-http/dist/dsh-compat/skin-market.js.map +1 -1
  438. package/node_modules/@xrkseek/server-http/dist/dsh-compat/task-board.d.ts +7 -0
  439. package/node_modules/@xrkseek/server-http/dist/dsh-compat/task-board.d.ts.map +1 -0
  440. package/node_modules/@xrkseek/server-http/dist/dsh-compat/task-board.js +245 -0
  441. package/node_modules/@xrkseek/server-http/dist/dsh-compat/task-board.js.map +1 -0
  442. package/node_modules/@xrkseek/server-http/dist/dsh-compat/token-usage-stats-dash.d.ts +9 -0
  443. package/node_modules/@xrkseek/server-http/dist/dsh-compat/token-usage-stats-dash.d.ts.map +1 -0
  444. package/node_modules/@xrkseek/server-http/dist/dsh-compat/token-usage-stats-dash.js +116 -0
  445. package/node_modules/@xrkseek/server-http/dist/dsh-compat/token-usage-stats-dash.js.map +1 -0
  446. package/node_modules/@xrkseek/server-http/dist/dsh-compat/underlying/http-json.d.ts +1 -0
  447. package/node_modules/@xrkseek/server-http/dist/dsh-compat/underlying/http-json.d.ts.map +1 -1
  448. package/node_modules/@xrkseek/server-http/dist/dsh-compat/underlying/http-json.js +5 -2
  449. package/node_modules/@xrkseek/server-http/dist/dsh-compat/underlying/http-json.js.map +1 -1
  450. package/node_modules/@xrkseek/server-http/dist/dsh-compat/underlying/index.d.ts +2 -1
  451. package/node_modules/@xrkseek/server-http/dist/dsh-compat/underlying/index.d.ts.map +1 -1
  452. package/node_modules/@xrkseek/server-http/dist/dsh-compat/underlying/index.js +2 -1
  453. package/node_modules/@xrkseek/server-http/dist/dsh-compat/underlying/index.js.map +1 -1
  454. package/node_modules/@xrkseek/server-http/dist/dsh-compat/underlying/plugin-surface-store.d.ts +18 -0
  455. package/node_modules/@xrkseek/server-http/dist/dsh-compat/underlying/plugin-surface-store.d.ts.map +1 -0
  456. package/node_modules/@xrkseek/server-http/dist/dsh-compat/underlying/plugin-surface-store.js +65 -0
  457. package/node_modules/@xrkseek/server-http/dist/dsh-compat/underlying/plugin-surface-store.js.map +1 -0
  458. package/node_modules/@xrkseek/server-http/dist/dsh-compat/univer-api.d.ts +11 -0
  459. package/node_modules/@xrkseek/server-http/dist/dsh-compat/univer-api.d.ts.map +1 -0
  460. package/node_modules/@xrkseek/server-http/dist/dsh-compat/univer-api.js +114 -0
  461. package/node_modules/@xrkseek/server-http/dist/dsh-compat/univer-api.js.map +1 -0
  462. package/node_modules/@xrkseek/server-http/dist/dsh-compat/wallpaper.d.ts +3 -1
  463. package/node_modules/@xrkseek/server-http/dist/dsh-compat/wallpaper.d.ts.map +1 -1
  464. package/node_modules/@xrkseek/server-http/dist/dsh-compat/wallpaper.js +42 -1
  465. package/node_modules/@xrkseek/server-http/dist/dsh-compat/wallpaper.js.map +1 -1
  466. package/node_modules/@xrkseek/server-http/dist/dsh-compat/wire/stub-handlers.d.ts +6 -1
  467. package/node_modules/@xrkseek/server-http/dist/dsh-compat/wire/stub-handlers.d.ts.map +1 -1
  468. package/node_modules/@xrkseek/server-http/dist/dsh-compat/wire/stub-handlers.js +68 -8
  469. package/node_modules/@xrkseek/server-http/dist/dsh-compat/wire/stub-handlers.js.map +1 -1
  470. package/node_modules/@xrkseek/server-http/dist/fetch-dispatch.d.ts.map +1 -1
  471. package/node_modules/@xrkseek/server-http/dist/fetch-dispatch.js +111 -26
  472. package/node_modules/@xrkseek/server-http/dist/fetch-dispatch.js.map +1 -1
  473. package/node_modules/@xrkseek/server-http/dist/host-owned-paths.d.ts +6 -0
  474. package/node_modules/@xrkseek/server-http/dist/host-owned-paths.d.ts.map +1 -0
  475. package/node_modules/@xrkseek/server-http/dist/host-owned-paths.js +32 -0
  476. package/node_modules/@xrkseek/server-http/dist/host-owned-paths.js.map +1 -0
  477. package/node_modules/@xrkseek/server-http/dist/index.d.ts +1 -0
  478. package/node_modules/@xrkseek/server-http/dist/index.d.ts.map +1 -1
  479. package/node_modules/@xrkseek/server-http/dist/index.js +1 -0
  480. package/node_modules/@xrkseek/server-http/dist/index.js.map +1 -1
  481. package/node_modules/@xrkseek/server-http/dist/sidebar/sidebar-adapter.d.ts.map +1 -1
  482. package/node_modules/@xrkseek/server-http/dist/sidebar/sidebar-adapter.js +10 -0
  483. package/node_modules/@xrkseek/server-http/dist/sidebar/sidebar-adapter.js.map +1 -1
  484. package/node_modules/@xrkseek/server-http/dist/xrk/plugin-mutate.d.ts +9 -0
  485. package/node_modules/@xrkseek/server-http/dist/xrk/plugin-mutate.d.ts.map +1 -1
  486. package/node_modules/@xrkseek/server-http/dist/xrk/plugin-mutate.js +68 -21
  487. package/node_modules/@xrkseek/server-http/dist/xrk/plugin-mutate.js.map +1 -1
  488. package/node_modules/@xrkseek/server-http/package.json +1 -0
  489. package/node_modules/@xrkseek/server-loader/dist/index.d.ts +1 -1
  490. package/node_modules/@xrkseek/server-loader/dist/index.d.ts.map +1 -1
  491. package/node_modules/@xrkseek/server-loader/dist/index.js.map +1 -1
  492. package/node_modules/@xrkseek/server-loader/dist/load.d.ts.map +1 -1
  493. package/node_modules/@xrkseek/server-loader/dist/load.js +5 -2
  494. package/node_modules/@xrkseek/server-loader/dist/load.js.map +1 -1
  495. package/node_modules/@xrkseek/server-loader/dist/managed-state.d.ts +11 -1
  496. package/node_modules/@xrkseek/server-loader/dist/managed-state.d.ts.map +1 -1
  497. package/node_modules/@xrkseek/server-loader/dist/managed-state.js +11 -2
  498. package/node_modules/@xrkseek/server-loader/dist/managed-state.js.map +1 -1
  499. package/node_modules/@xrkseek/workspace/dist/index.d.ts +9 -0
  500. package/node_modules/@xrkseek/workspace/dist/index.d.ts.map +1 -1
  501. package/node_modules/@xrkseek/workspace/dist/index.js +4 -2
  502. package/node_modules/@xrkseek/workspace/dist/index.js.map +1 -1
  503. package/node_modules/@xrkseek/workspace/dist/workspace-anchor.d.ts +32 -2
  504. package/node_modules/@xrkseek/workspace/dist/workspace-anchor.d.ts.map +1 -1
  505. package/node_modules/@xrkseek/workspace/dist/workspace-anchor.js +69 -2
  506. package/node_modules/@xrkseek/workspace/dist/workspace-anchor.js.map +1 -1
  507. package/node_modules/@xrkseek/xrk-session-reference/README.md +1 -1
  508. package/node_modules/@xrkseek/xrk-session-reference/README.zh.md +1 -1
  509. package/node_modules/@xrkseek/xrk-session-reference/dist/spill.d.ts +5 -3
  510. package/node_modules/@xrkseek/xrk-session-reference/dist/spill.d.ts.map +1 -1
  511. package/node_modules/@xrkseek/xrk-session-reference/dist/spill.js +20 -17
  512. package/node_modules/@xrkseek/xrk-session-reference/dist/spill.js.map +1 -1
  513. package/node_modules/@xrkseek/xrk-session-reference/package.json +1 -1
  514. package/package.json +1 -1
  515. package/node_modules/@xrkseek/server-face/dist/opencode-zen.d.ts +0 -13
  516. package/node_modules/@xrkseek/server-face/dist/opencode-zen.d.ts.map +0 -1
  517. package/node_modules/@xrkseek/server-face/dist/opencode-zen.js +0 -40
  518. package/node_modules/@xrkseek/server-face/dist/opencode-zen.js.map +0 -1
@@ -0,0 +1,80 @@
1
+ import { readBody, sendJson } from "./underlying/http-json.js";
2
+ import { DSH_COMPAT_ADAPTER } from "./meta.js";
3
+ const EMPTY_USAGE = {
4
+ total: {
5
+ inputTokens: 0,
6
+ outputTokens: 0,
7
+ totalTokens: 0,
8
+ cost: 0,
9
+ requestCount: 0,
10
+ },
11
+ byModel: {},
12
+ byDay: {},
13
+ };
14
+ const EMPTY_PRICING = {
15
+ source: "xrk-compat",
16
+ catalog: [],
17
+ aliases: {},
18
+ fetchedAt: 0,
19
+ };
20
+ export function isBillingPath(pathname) {
21
+ return pathname === "/api/billing" || pathname.startsWith("/api/billing/");
22
+ }
23
+ async function drain(req, method) {
24
+ if (method === "POST" || method === "PUT" || method === "PATCH") {
25
+ await readBody(req);
26
+ }
27
+ }
28
+ export async function handleBillingHttp(req, res, pathname, options = {}) {
29
+ if (!isBillingPath(pathname))
30
+ return false;
31
+ const method = (req.method ?? "GET").toUpperCase();
32
+ await drain(req, method);
33
+ if (pathname === "/api/billing/usage-stats") {
34
+ const aggregated = options.aggregateUsage
35
+ ? await options.aggregateUsage({})
36
+ : undefined;
37
+ const body = aggregated && typeof aggregated === "object" && "total" in aggregated
38
+ ? aggregated
39
+ : EMPTY_USAGE;
40
+ sendJson(res, 200, { ...body, adapter: DSH_COMPAT_ADAPTER });
41
+ return true;
42
+ }
43
+ if (pathname === "/api/billing/pricing" ||
44
+ pathname === "/api/billing/pricing/refresh") {
45
+ sendJson(res, 200, { ...EMPTY_PRICING, adapter: DSH_COMPAT_ADAPTER });
46
+ return true;
47
+ }
48
+ if (pathname === "/api/billing/balance") {
49
+ const balance = options.fetchBalance
50
+ ? await options.fetchBalance()
51
+ : undefined;
52
+ sendJson(res, 200, {
53
+ balances: Array.isArray(balance?.balances)
54
+ ? balance.balances
55
+ : [],
56
+ adapter: DSH_COMPAT_ADAPTER,
57
+ });
58
+ return true;
59
+ }
60
+ if (pathname === "/api/billing/subscriptions" ||
61
+ pathname === "/api/billing/relay-quotas") {
62
+ sendJson(res, 200, { quotas: {}, adapter: DSH_COMPAT_ADAPTER });
63
+ return true;
64
+ }
65
+ if (pathname === "/api/billing/usage-tool") {
66
+ sendJson(res, 200, { enabled: false, adapter: DSH_COMPAT_ADAPTER });
67
+ return true;
68
+ }
69
+ if (pathname === "/api/billing/notify-claim") {
70
+ sendJson(res, 200, { claimed: true, adapter: DSH_COMPAT_ADAPTER });
71
+ return true;
72
+ }
73
+ sendJson(res, 200, {
74
+ ok: true,
75
+ path: pathname,
76
+ adapter: DSH_COMPAT_ADAPTER,
77
+ });
78
+ return true;
79
+ }
80
+ //# sourceMappingURL=billing.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"billing.js","sourceRoot":"","sources":["../../src/dsh-compat/billing.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAK/C,MAAM,WAAW,GAAG;IAClB,KAAK,EAAE;QACL,WAAW,EAAE,CAAC;QACd,YAA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E,CAAC;QAC7C,QAAQ,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,kBAAkB,EAAE,CAAC,CAAC;QACnE,OAAO,IAAI,CAAC;IACd,CAAC;IAED,QAAQ,CAAC,GAAG,EAAE,GAAG,EAAE;QACjB,EAAE,EAAE,IAAI;QACR,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,kBAAkB;KAC5B,CAAC,CAAC;IACH,OAAO,IAAI,CAAC;AACd,CAAC"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * dsh-code-server-app — `/code-server/*`, `/api/code-server/*`, `/ask/*`.
3
+ * Process spawn stays deferred; preferred port / start attempts persist.
4
+ */
5
+ import type { IncomingMessage, ServerResponse } from "node:http";
6
+ export interface CodeServerOptions {
7
+ readonly xrkHome?: string;
8
+ }
9
+ export declare function isCodeServerPath(pathname: string): boolean;
10
+ export declare function handleCodeServerHttp(req: IncomingMessage, res: ServerResponse, pathname: string, options?: CodeServerOptions): Promise<boolean>;
11
+ //# sourceMappingURL=code-server.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"code-server.d.ts","sourceRoot":"","sources":["../../src/dsh-compat/code-server.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAMjE,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;CAC3B;AAuBD,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAS1D;AA4BD,wBAAsB,oBAAoB,CACxC,GAAG,EAAE,eAAe,EACpB,GAAG,EAAE,cAAc,EACnB,QAAQ,EAAE,MAAM,EAChB,OAAO,GAAE,iBAAsB,GAC9B,OAAO,CAAC,OAAO,CAAC,CAwHlB"}
@@ -0,0 +1,152 @@
1
+ import { sendJson } from "./underlying/http-json.js";
2
+ import { createXrkDocStore } from "./underlying/doc-store.js";
3
+ import { httpMethod, parseJsonBody } from "./underlying/http-kit.js";
4
+ import { DSH_COMPAT_ADAPTER } from "./meta.js";
5
+ const STORE = createXrkDocStore(["dsh-code-server", "state.json"], {
6
+ preferredPort: null,
7
+ uiMode: "iframe",
8
+ startAttempts: 0,
9
+ lastStartAttemptAt: null,
10
+ askRev: 0,
11
+ askMessages: [],
12
+ });
13
+ export function isCodeServerPath(pathname) {
14
+ return (pathname === "/code-server" ||
15
+ pathname.startsWith("/code-server/") ||
16
+ pathname === "/api/code-server" ||
17
+ pathname.startsWith("/api/code-server/") ||
18
+ pathname === "/ask" ||
19
+ pathname.startsWith("/ask/"));
20
+ }
21
+ function offlineStatus(doc) {
22
+ return {
23
+ ok: true,
24
+ running: false,
25
+ status: "stopped",
26
+ pid: null,
27
+ port: doc.preferredPort,
28
+ url: null,
29
+ serve: null,
30
+ uiMode: doc.uiMode,
31
+ startAttempts: doc.startAttempts,
32
+ lastStartAttemptAt: doc.lastStartAttemptAt,
33
+ adapter: DSH_COMPAT_ADAPTER,
34
+ note: "code-server process host is not embedded on XRK; start stays deferred.",
35
+ };
36
+ }
37
+ function normalizePath(pathname) {
38
+ if (pathname.startsWith("/api/code-server")) {
39
+ return (pathname.replace(/^\/api\/code-server/, "/code-server") || "/code-server");
40
+ }
41
+ return pathname;
42
+ }
43
+ export async function handleCodeServerHttp(req, res, pathname, options = {}) {
44
+ if (!isCodeServerPath(pathname))
45
+ return false;
46
+ const method = httpMethod(req);
47
+ const xrkHome = options.xrkHome;
48
+ const pathNorm = normalizePath(pathname);
49
+ if (pathNorm === "/code-server/status" ||
50
+ pathNorm === "/code-server/status/" ||
51
+ pathNorm === "/code-server" ||
52
+ pathNorm === "/code-server/") {
53
+ if (method === "POST")
54
+ await parseJsonBody(req).catch(() => ({}));
55
+ sendJson(res, 200, offlineStatus(STORE.read(xrkHome).data));
56
+ return true;
57
+ }
58
+ if (pathNorm === "/code-server/start") {
59
+ await parseJsonBody(req).catch(() => ({}));
60
+ const doc = STORE.patch(xrkHome, (current) => ({
61
+ ...current,
62
+ startAttempts: current.startAttempts + 1,
63
+ lastStartAttemptAt: new Date().toISOString(),
64
+ }));
65
+ sendJson(res, 200, {
66
+ ...offlineStatus(doc.data),
67
+ accepted: false,
68
+ deferred: true,
69
+ path: pathname,
70
+ });
71
+ return true;
72
+ }
73
+ if (pathNorm === "/code-server/stop" ||
74
+ pathNorm === "/code-server/setup" ||
75
+ pathNorm === "/code-server/open-file") {
76
+ await parseJsonBody(req).catch(() => ({}));
77
+ sendJson(res, 200, {
78
+ ...offlineStatus(STORE.read(xrkHome).data),
79
+ accepted: false,
80
+ deferred: true,
81
+ path: pathname,
82
+ });
83
+ return true;
84
+ }
85
+ if (pathNorm === "/code-server/ui-mode") {
86
+ if (method === "GET" || method === "HEAD") {
87
+ sendJson(res, 200, {
88
+ ok: true,
89
+ uiMode: STORE.read(xrkHome).data.uiMode,
90
+ adapter: DSH_COMPAT_ADAPTER,
91
+ });
92
+ return true;
93
+ }
94
+ const body = await parseJsonBody(req);
95
+ const uiMode = typeof body.uiMode === "string"
96
+ ? body.uiMode
97
+ : typeof body.mode === "string"
98
+ ? body.mode
99
+ : "iframe";
100
+ STORE.patch(xrkHome, (current) => ({ ...current, uiMode }));
101
+ sendJson(res, 200, {
102
+ ok: true,
103
+ uiMode,
104
+ adapter: DSH_COMPAT_ADAPTER,
105
+ });
106
+ return true;
107
+ }
108
+ if (pathname === "/ask/state" || pathname.startsWith("/ask/state")) {
109
+ const url = new URL(req.url ?? "/", "http://127.0.0.1");
110
+ const rev = url.searchParams.get("rev");
111
+ const doc = STORE.read(xrkHome).data;
112
+ if (rev !== null && rev !== "" && Number(rev) === doc.askRev) {
113
+ sendJson(res, 200, doc.askRev);
114
+ return true;
115
+ }
116
+ sendJson(res, 200, {
117
+ rev: doc.askRev,
118
+ messages: doc.askMessages,
119
+ pending: null,
120
+ open: false,
121
+ adapter: DSH_COMPAT_ADAPTER,
122
+ });
123
+ return true;
124
+ }
125
+ if (pathname === "/ask/send" ||
126
+ pathname === "/ask/approve" ||
127
+ pathname === "/ask/close" ||
128
+ pathname === "/ask/bundle" ||
129
+ pathNorm === "/code-server/ask/send" ||
130
+ pathNorm === "/code-server/ask/approve" ||
131
+ pathNorm === "/code-server/ask/close") {
132
+ await parseJsonBody(req).catch(() => ({}));
133
+ sendJson(res, 200, {
134
+ ok: true,
135
+ deferred: true,
136
+ path: pathname,
137
+ adapter: DSH_COMPAT_ADAPTER,
138
+ js: "",
139
+ css: "",
140
+ });
141
+ return true;
142
+ }
143
+ if (method === "POST" || method === "PUT" || method === "PATCH") {
144
+ await parseJsonBody(req).catch(() => ({}));
145
+ }
146
+ sendJson(res, 200, {
147
+ ...offlineStatus(STORE.read(xrkHome).data),
148
+ path: pathname,
149
+ });
150
+ return true;
151
+ }
152
+ //# sourceMappingURL=code-server.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"code-server.js","sourceRoot":"","sources":["../../src/dsh-compat/code-server.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AACrD,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACrE,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAe/C,MAAM,KAAK,GAAG,iBAAiB,CAC7B,CAAC,iBAAiB,EAAE,YAAY,CAAC,EACjC;IACE,aAAa,EAAE,IAAI;IACnB,MAAM,EAAE,QAAQ;IAChB,aAAa,EAAE,CAAC;IAChB,kBAAkB,EAAE,IAAI;IACxB,MAAM,EAAE,CAAC;IACT,WAAW,EAAE,EAAE;CAChB,CACF,CAAC;AAEF,MAAM,UAAU,gBAAgB,CAAC,QAAgB;IAC/C,OAAO,CACL,QAAQ,KAAK,cAAc;QAC3B,QAAQ,CAAC,UAAU,CAAC,eAAe,CAAC;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AK,IAAI,MAAM,KAAK,OAAO,EAAE,CAAC;QAChE,MAAM,aAAa,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAC7C,CAAC;IACD,QAAQ,CAAC,GAAG,EAAE,GAAG,EAAE;QACjB,GAAG,aAAa,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC;QAC1C,IAAI,EAAE,QAAQ;KACf,CAAC,CAAC;IACH,OAAO,IAAI,CAAC;AACd,CAAC"}
@@ -0,0 +1,5 @@
1
+ /** Candidate install dirs for one npm package id (scoped or bare). */
2
+ export declare function communityPluginCandidates(pluginsDir: string, packageName: string): string[];
3
+ /** First existing package root that has package.json. */
4
+ export declare function findCommunityPluginRoot(pluginsDir: string | undefined, packageNames: readonly string[]): string | undefined;
5
+ //# sourceMappingURL=community-plugin-root.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"community-plugin-root.d.ts","sourceRoot":"","sources":["../../src/dsh-compat/community-plugin-root.ts"],"names":[],"mappings":"AAMA,sEAAsE;AACtE,wBAAgB,yBAAyB,CACvC,UAAU,EAAE,MAAM,EAClB,WAAW,EAAE,MAAM,GAClB,MAAM,EAAE,CAUV;AAED,yDAAyD;AACzD,wBAAgB,uBAAuB,CACrC,UAAU,EAAE,MAAM,GAAG,SAAS,EAC9B,YAAY,EAAE,SAAS,MAAM,EAAE,GAC9B,MAAM,GAAG,SAAS,CAQpB"}
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Resolve staged community plugin package roots under pluginsDir.
3
+ */
4
+ import { existsSync } from "node:fs";
5
+ import path from "node:path";
6
+ /** Candidate install dirs for one npm package id (scoped or bare). */
7
+ export function communityPluginCandidates(pluginsDir, packageName) {
8
+ const name = packageName.trim();
9
+ if (!name)
10
+ return [];
11
+ const parts = name.split("/");
12
+ return [
13
+ path.join(pluginsDir, "web", "plugins", ...parts),
14
+ path.join(pluginsDir, ...parts),
15
+ path.join(pluginsDir, "web", "plugins", parts[parts.length - 1]),
16
+ path.join(pluginsDir, parts[parts.length - 1]),
17
+ ];
18
+ }
19
+ /** First existing package root that has package.json. */
20
+ export function findCommunityPluginRoot(pluginsDir, packageNames) {
21
+ if (!pluginsDir?.trim())
22
+ return undefined;
23
+ for (const name of packageNames) {
24
+ for (const candidate of communityPluginCandidates(pluginsDir, name)) {
25
+ if (existsSync(path.join(candidate, "package.json")))
26
+ return candidate;
27
+ }
28
+ }
29
+ return undefined;
30
+ }
31
+ //# sourceMappingURL=community-plugin-root.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"community-plugin-root.js","sourceRoot":"","sources":["../../src/dsh-compat/community-plugin-root.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,sEAAsE;AACtE,MAAM,UAAU,yBAAyB,CACvC,UAAkB,EAClB,WAAmB;IAEnB,MAAM,IAAI,GAAG,WAAW,CAAC,IAAI,EAAE,CAAC;IAChC,IAAI,CAAC,IAAI;QAAE,OAAO,EAAE,CAAC;IACrB,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAC9B,OAAO;QACL,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,KAAK,CAAC;QACjD,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,GAAG,KAAK,CAAC;QAC/B,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAE,CAAC;QACjE,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAE,CAAC;KAChD,CAAC;AACJ,CAAC;AAED,yDAAyD;AACzD,MAAM,UAAU,uBAAuB,CACrC,UAA8B,EAC9B,YAA+B;IAE/B,IAAI,CAAC,UAAU,EAAE,IAAI,EAAE;QAAE,OAAO,SAAS,CAAC;IAC1C,KAAK,MAAM,IAAI,IAAI,YAAY,EAAE,CAAC;QAChC,KAAK,MAAM,SAAS,IAAI,yBAAyB,CAAC,UAAU,EAAE,IAAI,CAAC,EAAE,CAAC;YACpE,IAAI,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,cAAc,CAAC,CAAC;gBAAE,OAAO,SAAS,CAAC;QACzE,CAAC;IACH,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC"}
@@ -1,7 +1,21 @@
1
+ import type { IncomingMessage, ServerResponse } from "node:http";
2
+ export interface CommunityRootOptions {
3
+ readonly pluginsDir?: string;
4
+ readonly xrkHome?: string;
5
+ }
1
6
  /**
2
- * Community root paths such as `/whale-girl` (not `/api`, not capability-table prefixes).
7
+ * First path segment + optional nested community surface under a `dsh-*` slug.
8
+ *
9
+ * Nested trees must NOT claim Cordis / settings RPC (`/dsh-foo-settings/get`,
10
+ * `/dsh-pocket/pocket.status`) — those go to the RPC registry after HTTP
11
+ * matches. Only `api/…` and staged static assets are community-root under
12
+ * nested `dsh-*` paths.
3
13
  */
4
- import type { IncomingMessage, ServerResponse } from "node:http";
5
14
  export declare function isCommunityRootPath(pathname: string): boolean;
6
- export declare function handleCommunityRootHttp(req: IncomingMessage, res: ServerResponse, pathname: string): Promise<boolean>;
15
+ /**
16
+ * Honest JSON (+ staged static assets) for community slug roots.
17
+ * Specific capability prefixes register earlier and win first-match.
18
+ * `api/state` · `api/config` persist under ~/.xrk/community-surfaces/<slug>/.
19
+ */
20
+ export declare function handleCommunityRootHttp(req: IncomingMessage, res: ServerResponse, pathname: string, options?: CommunityRootOptions): Promise<boolean>;
7
21
  //# sourceMappingURL=community-root-http.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"community-root-http.d.ts","sourceRoot":"","sources":["../../src/dsh-compat/community-root-http.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAqCjE,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAI7D;AAED,wBAAsB,uBAAuB,CAC3C,GAAG,EAAE,eAAe,EACpB,GAAG,EAAE,cAAc,EACnB,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,OAAO,CAAC,CAuBlB"}
1
+ {"version":3,"file":"community-root-http.d.ts","sourceRoot":"","sources":["../../src/dsh-compat/community-root-http.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAkDjE,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAe7D;AAqHD;;;;GAIG;AACH,wBAAsB,uBAAuB,CAC3C,GAAG,EAAE,eAAe,EACpB,GAAG,EAAE,cAAc,EACnB,QAAQ,EAAE,MAAM,EAChB,OAAO,GAAE,oBAAyB,GACjC,OAAO,CAAC,OAAO,CAAC,CAgLlB"}
@@ -1,9 +1,18 @@
1
- import { readBody, sendJson } from "./underlying/http-json.js";
1
+ /**
2
+ * Community root paths such as `/whale-girl` and nested `/dsh-whale-girl/api/…`
3
+ * (not `/api`, not capability-table prefixes that register earlier).
4
+ */
5
+ import { createReadStream, existsSync, statSync } from "node:fs";
6
+ import path from "node:path";
7
+ import { sendJson } from "./underlying/http-json.js";
8
+ import { httpMethod, isMutatingMethod, parseJsonBody, } from "./underlying/http-kit.js";
9
+ import { patchPluginSurface, readPluginSurface, } from "./underlying/plugin-surface-store.js";
2
10
  import { DSH_COMPAT_ADAPTER, tag } from "./meta.js";
3
11
  const RESERVED_ROOT = new Set([
4
12
  "api",
5
13
  "sidebar",
6
14
  "modlens",
15
+ "niulai-kws",
7
16
  "modsearch",
8
17
  "releases",
9
18
  "health",
@@ -19,9 +28,12 @@ const RESERVED_ROOT = new Set([
19
28
  "dream-skin",
20
29
  "dsh-market",
21
30
  "dsh-skin-market",
31
+ "skin-assets",
32
+ "dsh-genui",
22
33
  "turn-rewind",
23
34
  "auto-review",
24
35
  "tokenledger",
36
+ "wallet",
25
37
  "weixin",
26
38
  "feishu",
27
39
  "dingtalk",
@@ -32,20 +44,265 @@ const RESERVED_ROOT = new Set([
32
44
  "slack",
33
45
  "whatsapp",
34
46
  ]);
47
+ /**
48
+ * First path segment + optional nested community surface under a `dsh-*` slug.
49
+ *
50
+ * Nested trees must NOT claim Cordis / settings RPC (`/dsh-foo-settings/get`,
51
+ * `/dsh-pocket/pocket.status`) — those go to the RPC registry after HTTP
52
+ * matches. Only `api/…` and staged static assets are community-root under
53
+ * nested `dsh-*` paths.
54
+ */
35
55
  export function isCommunityRootPath(pathname) {
36
- const m = /^\/([a-z][a-z0-9-]*)$/.exec(pathname);
56
+ const m = /^\/([a-z][a-z0-9-]*)(\/.*)?$/.exec(pathname);
37
57
  if (!m)
38
58
  return false;
39
- return !RESERVED_ROOT.has(m[1]);
59
+ const slug = m[1];
60
+ if (RESERVED_ROOT.has(slug))
61
+ return false;
62
+ const nested = m[2];
63
+ // Exact `/slug` stays open for short aliases (`/whale-girl`).
64
+ if (!nested)
65
+ return true;
66
+ // Nested `/slug/…` only for `dsh-*` packs; keep non-dsh nested as Host gaps.
67
+ if (!slug.startsWith("dsh-"))
68
+ return false;
69
+ const tail = nested.slice(1);
70
+ if (tail === "api" || tail.startsWith("api/"))
71
+ return true;
72
+ // Staged assets only — Cordis RPC methods may contain dots (`pocket.status`).
73
+ const base = tail.split("/").pop() ?? "";
74
+ return COMMUNITY_ASSET_EXT.has(path.extname(base).toLowerCase());
75
+ }
76
+ const COMMUNITY_ASSET_EXT = new Set([
77
+ ".png",
78
+ ".jpg",
79
+ ".jpeg",
80
+ ".webp",
81
+ ".gif",
82
+ ".svg",
83
+ ".mp3",
84
+ ".wav",
85
+ ".js",
86
+ ".mjs",
87
+ ".css",
88
+ ".json",
89
+ ".html",
90
+ ".ico",
91
+ ".woff",
92
+ ".woff2",
93
+ ".ttf",
94
+ ".map",
95
+ ]);
96
+ function contentType(file) {
97
+ switch (path.extname(file).toLowerCase()) {
98
+ case ".png":
99
+ return "image/png";
100
+ case ".jpg":
101
+ case ".jpeg":
102
+ return "image/jpeg";
103
+ case ".webp":
104
+ return "image/webp";
105
+ case ".gif":
106
+ return "image/gif";
107
+ case ".svg":
108
+ return "image/svg+xml";
109
+ case ".mp3":
110
+ return "audio/mpeg";
111
+ case ".wav":
112
+ return "audio/wav";
113
+ case ".js":
114
+ case ".mjs":
115
+ return "application/javascript; charset=utf-8";
116
+ case ".css":
117
+ return "text/css; charset=utf-8";
118
+ case ".json":
119
+ return "application/json; charset=utf-8";
120
+ default:
121
+ return "application/octet-stream";
122
+ }
40
123
  }
41
- export async function handleCommunityRootHttp(req, res, pathname) {
124
+ function stagedPluginRoots(pluginsDir, slug) {
125
+ if (!pluginsDir?.trim())
126
+ return [];
127
+ const web = path.join(pluginsDir, "web", "plugins");
128
+ const roots = [path.join(web, slug)];
129
+ // Staged npm scopes flatten to `scope/name` dirs; also try bare short names.
130
+ if (slug.startsWith("dsh-")) {
131
+ roots.push(path.join(web, slug.slice(4)));
132
+ }
133
+ else {
134
+ roots.push(path.join(web, `dsh-${slug}`));
135
+ }
136
+ return roots;
137
+ }
138
+ function tryServeStagedAsset(res, method, pluginsDir, slug, rel) {
139
+ if (!rel || rel.includes(".."))
140
+ return false;
141
+ const safe = rel
142
+ .split("/")
143
+ .filter((seg) => seg && seg !== "." && seg !== "..")
144
+ .join("/");
145
+ if (!safe)
146
+ return false;
147
+ for (const root of stagedPluginRoots(pluginsDir, slug)) {
148
+ if (!existsSync(root))
149
+ continue;
150
+ for (const candidate of [
151
+ path.join(root, safe),
152
+ path.join(root, "assets", safe),
153
+ path.join(root, "static", safe),
154
+ ]) {
155
+ try {
156
+ const st = statSync(candidate);
157
+ if (!st.isFile())
158
+ continue;
159
+ res.writeHead(200, {
160
+ "content-type": contentType(candidate),
161
+ "content-length": String(st.size),
162
+ "cache-control": "no-store",
163
+ });
164
+ if (method === "HEAD") {
165
+ res.end();
166
+ return true;
167
+ }
168
+ createReadStream(candidate).pipe(res);
169
+ return true;
170
+ }
171
+ catch {
172
+ /* try next */
173
+ }
174
+ }
175
+ }
176
+ return false;
177
+ }
178
+ function apiTail(pathname, slug) {
179
+ const prefix = `/${slug}/`;
180
+ if (!pathname.startsWith(prefix))
181
+ return "";
182
+ return pathname.slice(prefix.length);
183
+ }
184
+ /**
185
+ * Honest JSON (+ staged static assets) for community slug roots.
186
+ * Specific capability prefixes register earlier and win first-match.
187
+ * `api/state` · `api/config` persist under ~/.xrk/community-surfaces/<slug>/.
188
+ */
189
+ export async function handleCommunityRootHttp(req, res, pathname, options = {}) {
42
190
  if (!isCommunityRootPath(pathname))
43
191
  return false;
44
- const method = (req.method ?? "GET").toUpperCase();
45
- if (method === "POST" || method === "PUT" || method === "PATCH") {
46
- await readBody(req);
192
+ const method = httpMethod(req);
193
+ const m = /^\/([a-z][a-z0-9-]*)(\/.*)?$/.exec(pathname);
194
+ const plugin = m?.[1] ?? pathname.slice(1);
195
+ const tail = apiTail(pathname, plugin);
196
+ const xrkHome = options.xrkHome;
197
+ if ((method === "GET" || method === "HEAD") && tail) {
198
+ const base = tail.split("/").pop() ?? "";
199
+ if (path.extname(base)) {
200
+ if (tryServeStagedAsset(res, method, options.pluginsDir, plugin, tail)) {
201
+ return true;
202
+ }
203
+ }
204
+ }
205
+ // Whale-girl / desktop-pet style surfaces: keep shapes the client merges.
206
+ if (tail === "api/state" || tail === "api/state.js" || tail === "api/workstate") {
207
+ let surface = readPluginSurface(xrkHome, plugin);
208
+ if (isMutatingMethod(method)) {
209
+ const body = await parseJsonBody(req);
210
+ const patch = body.state && typeof body.state === "object" && !Array.isArray(body.state)
211
+ ? body.state
212
+ : body.value &&
213
+ typeof body.value === "object" &&
214
+ !Array.isArray(body.value)
215
+ ? body.value
216
+ : (() => {
217
+ const { action: _a, ...rest } = body;
218
+ return rest;
219
+ })();
220
+ if (Object.keys(patch).length > 0) {
221
+ surface = patchPluginSurface(xrkHome, plugin, "state", patch, "merge");
222
+ }
223
+ }
224
+ sendJson(res, 200, tag({
225
+ ok: true,
226
+ balance: typeof surface.state.balance === "number" ? surface.state.balance : 0,
227
+ provider: surface.state.provider ?? null,
228
+ model: surface.state.model ?? null,
229
+ status: typeof surface.state.status === "string"
230
+ ? surface.state.status
231
+ : "ready",
232
+ ...surface.state,
233
+ plugin,
234
+ path: pathname,
235
+ adapter: DSH_COMPAT_ADAPTER,
236
+ writable: true,
237
+ revision: surface.revision,
238
+ }));
239
+ return true;
240
+ }
241
+ if (tail === "api/config") {
242
+ let surface = readPluginSurface(xrkHome, plugin);
243
+ if (isMutatingMethod(method)) {
244
+ const body = await parseJsonBody(req);
245
+ const patch = body.config && typeof body.config === "object" && !Array.isArray(body.config)
246
+ ? body.config
247
+ : body.value &&
248
+ typeof body.value === "object" &&
249
+ !Array.isArray(body.value)
250
+ ? body.value
251
+ : (() => {
252
+ const { action: _a, ...rest } = body;
253
+ return rest;
254
+ })();
255
+ if (Object.keys(patch).length > 0) {
256
+ surface = patchPluginSurface(xrkHome, plugin, "config", patch, "merge");
257
+ }
258
+ }
259
+ sendJson(res, 200, tag({
260
+ ok: true,
261
+ config: surface.config,
262
+ plugin,
263
+ path: pathname,
264
+ adapter: DSH_COMPAT_ADAPTER,
265
+ writable: true,
266
+ revision: surface.revision,
267
+ }));
268
+ return true;
269
+ }
270
+ if (isMutatingMethod(method)) {
271
+ await parseJsonBody(req).catch(() => ({}));
272
+ }
273
+ if (tail === "api/providers") {
274
+ sendJson(res, 200, tag({
275
+ ok: true,
276
+ providers: [],
277
+ plugin,
278
+ path: pathname,
279
+ adapter: DSH_COMPAT_ADAPTER,
280
+ writable: false,
281
+ }, ["dsh-host"]));
282
+ return true;
283
+ }
284
+ if (tail === "api/select-model") {
285
+ sendJson(res, 200, tag({
286
+ ok: true,
287
+ plugin,
288
+ path: pathname,
289
+ adapter: DSH_COMPAT_ADAPTER,
290
+ writable: false,
291
+ }, ["dsh-host"]));
292
+ return true;
293
+ }
294
+ if (tail.startsWith("api/") || tail === "api") {
295
+ sendJson(res, 200, tag({
296
+ ok: true,
297
+ status: "ready",
298
+ plugin,
299
+ path: pathname,
300
+ endpoint: tail,
301
+ adapter: DSH_COMPAT_ADAPTER,
302
+ writable: false,
303
+ }, ["dsh-host"]));
304
+ return true;
47
305
  }
48
- const plugin = pathname.slice(1);
49
306
  sendJson(res, 200, tag({
50
307
  ok: true,
51
308
  status: "ready",