@37chengshan/ompweb 4.0.4 → 4.0.7

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 (493) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/app-path-routes-manifest.json +17 -7
  3. package/.next/build-manifest.json +3 -3
  4. package/.next/prerender-manifest.json +28 -0
  5. package/.next/react-loadable-manifest.json +13 -6
  6. package/.next/required-server-files.js +2 -2
  7. package/.next/required-server-files.json +2 -2
  8. package/.next/routes-manifest.json +86 -2
  9. package/.next/server/app/_global-error/page.js +1 -1
  10. package/.next/server/app/_global-error/page.js.nft.json +1 -1
  11. package/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  12. package/.next/server/app/_global-error.html +1 -1
  13. package/.next/server/app/_global-error.rsc +2 -2
  14. package/.next/server/app/_global-error.segments/_full.segment.rsc +2 -2
  15. package/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +2 -2
  16. package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  17. package/.next/server/app/_not-found/page.js +1 -1
  18. package/.next/server/app/_not-found/page.js.nft.json +1 -1
  19. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  20. package/.next/server/app/_not-found.html +1 -1
  21. package/.next/server/app/_not-found.rsc +2 -2
  22. package/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
  23. package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
  24. package/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  25. package/.next/server/app/api/agent/[id]/bash-output/route.js +1 -1
  26. package/.next/server/app/api/agent/[id]/events/route.js +2 -2
  27. package/.next/server/app/api/agent/[id]/route.js +1 -1
  28. package/.next/server/app/api/agent/new/route.js +1 -1
  29. package/.next/server/app/api/agent/running/events/route.js +1 -1
  30. package/.next/server/app/api/agents/route.js +1 -1
  31. package/.next/server/app/api/app-update/releases/route.js +1 -1
  32. package/.next/server/app/api/app-update/route.js +2 -1
  33. package/.next/server/app/api/auth/all-providers/route.js +1 -1
  34. package/.next/server/app/api/auth/api-key/[provider]/route.js +1 -1
  35. package/.next/server/app/api/auth/login/[provider]/route.js +2 -2
  36. package/.next/server/app/api/auth/logout/[provider]/route.js +1 -1
  37. package/.next/server/app/api/auth/providers/route.js +1 -1
  38. package/.next/server/app/api/cwd/browse/route.js +1 -1
  39. package/.next/server/app/api/cwd/validate/route.js +1 -1
  40. package/.next/server/app/api/default-cwd/route.js +1 -1
  41. package/.next/server/app/api/diagnostics/route.js +1 -1
  42. package/.next/server/app/api/file-index/route.js +1 -1
  43. package/.next/server/app/api/files/[...path]/route.js +2 -2
  44. package/.next/server/app/api/git/diff/route.js +2 -2
  45. package/.next/server/app/api/git/status/route.js +2 -2
  46. package/.next/server/app/api/github/status/route.js +1 -1
  47. package/.next/server/app/api/home/route.js +1 -1
  48. package/.next/server/app/api/mcp/route.js +2 -2
  49. package/.next/server/app/api/mcp/route.js.nft.json +1 -1
  50. package/.next/server/app/api/model-roles/route.js +1 -1
  51. package/.next/server/app/api/models/fetch/route.js +1 -1
  52. package/.next/server/app/api/models/route.js +1 -1
  53. package/.next/server/app/api/models-config/catalog/route.js +1 -1
  54. package/.next/server/app/api/models-config/route.js +1 -1
  55. package/.next/server/app/api/models-config/test/route.js +1 -1
  56. package/.next/server/app/api/omp-settings/route.js +1 -1
  57. package/.next/server/app/api/omp-update/route.js +2 -2
  58. package/.next/server/app/api/omp-version/route.js +1 -1
  59. package/.next/server/app/api/pair/accept/route.js +1 -0
  60. package/.next/server/app/api/pair/accept/route.js.nft.json +1 -0
  61. package/.next/server/app/api/pair/accept/route_client-reference-manifest.js +1 -0
  62. package/.next/server/app/api/pair/config/route.js +1 -0
  63. package/.next/server/app/api/pair/config/route.js.nft.json +1 -0
  64. package/.next/server/app/api/pair/config/route_client-reference-manifest.js +1 -0
  65. package/.next/server/app/api/pair/devices/[id]/route.js +1 -0
  66. package/.next/server/app/api/pair/devices/[id]/route.js.nft.json +1 -0
  67. package/.next/server/app/api/pair/devices/[id]/route_client-reference-manifest.js +1 -0
  68. package/.next/server/app/api/pair/devices/route.js +1 -0
  69. package/.next/server/app/api/pair/devices/route.js.nft.json +1 -0
  70. package/.next/server/app/api/pair/devices/route_client-reference-manifest.js +1 -0
  71. package/.next/server/app/api/pair/heartbeat/route.js +1 -0
  72. package/.next/server/app/api/pair/heartbeat/route.js.nft.json +1 -0
  73. package/.next/server/app/api/pair/heartbeat/route_client-reference-manifest.js +1 -0
  74. package/.next/server/app/api/pair/revoke-all/route.js +1 -0
  75. package/.next/server/app/api/pair/revoke-all/route.js.nft.json +1 -0
  76. package/.next/server/app/api/pair/revoke-all/route_client-reference-manifest.js +1 -0
  77. package/.next/server/app/api/pair/token/route.js +1 -0
  78. package/.next/server/app/api/pair/token/route.js.nft.json +1 -0
  79. package/.next/server/app/api/pair/token/route_client-reference-manifest.js +1 -0
  80. package/.next/server/app/api/pair/tunnel/route.js +1 -0
  81. package/.next/server/app/api/pair/tunnel/route.js.nft.json +1 -0
  82. package/.next/server/app/api/pair/tunnel/route_client-reference-manifest.js +1 -0
  83. package/.next/server/app/api/plugins/route.js +1 -1
  84. package/.next/server/app/api/projects/route.js +2 -2
  85. package/.next/server/app/api/provider-usage/route.js +1 -0
  86. package/.next/server/app/api/provider-usage/route.js.nft.json +1 -0
  87. package/.next/server/app/api/provider-usage/route_client-reference-manifest.js +1 -0
  88. package/.next/server/app/api/providers/enable/route.js +1 -1
  89. package/.next/server/app/api/proxy/route.js +1 -1
  90. package/.next/server/app/api/reveal/route.js +1 -1
  91. package/.next/server/app/api/scripts/route.js +1 -1
  92. package/.next/server/app/api/scripts/run/route.js +1 -1
  93. package/.next/server/app/api/sessions/[id]/archive/route.js +1 -1
  94. package/.next/server/app/api/sessions/[id]/auto-name/route.js +1 -1
  95. package/.next/server/app/api/sessions/[id]/context/route.js +1 -1
  96. package/.next/server/app/api/sessions/[id]/entries/[entryId]/thinking/route.js +1 -1
  97. package/.next/server/app/api/sessions/[id]/export/route.js +1 -1
  98. package/.next/server/app/api/sessions/[id]/plan/route.js +1 -1
  99. package/.next/server/app/api/sessions/[id]/route.js +1 -1
  100. package/.next/server/app/api/sessions/[id]/state/route.js +1 -1
  101. package/.next/server/app/api/sessions/[id]/subagents/[subagentId]/route.js +1 -1
  102. package/.next/server/app/api/sessions/[id]/subagents/route.js +1 -1
  103. package/.next/server/app/api/sessions/archive/route.js +1 -1
  104. package/.next/server/app/api/sessions/import/route.js +1 -1
  105. package/.next/server/app/api/sessions/route.js +1 -1
  106. package/.next/server/app/api/skills/check/route.js +1 -1
  107. package/.next/server/app/api/skills/install/route.js +1 -1
  108. package/.next/server/app/api/skills/route.js +1 -1
  109. package/.next/server/app/api/skills/search/route.js +1 -1
  110. package/.next/server/app/api/skills/update/route.js +1 -1
  111. package/.next/server/app/api/terminal/input/route.js +1 -1
  112. package/.next/server/app/api/terminal/open/route.js +1 -1
  113. package/.next/server/app/api/terminal/resize/route.js +1 -1
  114. package/.next/server/app/api/terminal/session/route.js +1 -1
  115. package/.next/server/app/api/terminal/stream/route.js +2 -2
  116. package/.next/server/app/api/web-auth/session/route.js +1 -1
  117. package/.next/server/app/api/worktrees/route.js +1 -1
  118. package/.next/server/app/favicon.ico/route.js +1 -1
  119. package/.next/server/app/index.html +1 -1
  120. package/.next/server/app/index.rsc +3 -3
  121. package/.next/server/app/index.segments/__PAGE__.segment.rsc +3 -3
  122. package/.next/server/app/index.segments/_full.segment.rsc +3 -3
  123. package/.next/server/app/index.segments/_tree.segment.rsc +1 -1
  124. package/.next/server/app/login/page.js +1 -1
  125. package/.next/server/app/login/page.js.nft.json +1 -1
  126. package/.next/server/app/login/page_client-reference-manifest.js +1 -1
  127. package/.next/server/app/login.html +1 -1
  128. package/.next/server/app/login.rsc +2 -2
  129. package/.next/server/app/login.segments/_full.segment.rsc +2 -2
  130. package/.next/server/app/login.segments/_tree.segment.rsc +1 -1
  131. package/.next/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
  132. package/.next/server/app/manifest.webmanifest/route.js +2 -2
  133. package/.next/server/app/page.js +1 -1
  134. package/.next/server/app/page.js.nft.json +1 -1
  135. package/.next/server/app/page_client-reference-manifest.js +1 -1
  136. package/.next/server/app/remote/page.js +1 -0
  137. package/.next/server/app/remote/page.js.nft.json +1 -0
  138. package/.next/server/app/remote/page_client-reference-manifest.js +1 -0
  139. package/.next/server/app/remote.html +1 -0
  140. package/.next/server/app/remote.meta +26 -0
  141. package/.next/server/app/remote.rsc +32 -0
  142. package/.next/server/app/remote.segments/_full.segment.rsc +32 -0
  143. package/.next/server/app/remote.segments/_tree.segment.rsc +8 -0
  144. package/.next/server/app/remote.segments/remote/__PAGE__.segment.rsc +31 -0
  145. package/.next/server/app-paths-manifest.json +17 -7
  146. package/.next/server/chunks/2760.js +3 -3
  147. package/.next/server/chunks/3798.js +2 -2
  148. package/.next/server/chunks/4791.js +1 -0
  149. package/.next/server/chunks/5309.js +1 -1
  150. package/.next/server/chunks/{3425.js → 5806.js} +1 -1
  151. package/.next/server/chunks/6465.js +1 -1
  152. package/.next/server/chunks/7839.js +1 -1
  153. package/.next/server/middleware-build-manifest.js +1 -1
  154. package/.next/server/middleware-react-loadable-manifest.js +1 -1
  155. package/.next/server/middleware.js +3 -3
  156. package/.next/server/pages/404.html +1 -1
  157. package/.next/server/pages/500.html +1 -1
  158. package/.next/server/prefetch-hints.json +14 -0
  159. package/.next/standalone/.next/BUILD_ID +1 -1
  160. package/.next/standalone/.next/app-path-routes-manifest.json +17 -7
  161. package/.next/standalone/.next/build-manifest.json +3 -3
  162. package/.next/standalone/.next/prerender-manifest.json +28 -0
  163. package/.next/standalone/.next/react-loadable-manifest.json +13 -6
  164. package/.next/standalone/.next/required-server-files.json +2 -2
  165. package/.next/standalone/.next/routes-manifest.json +86 -2
  166. package/.next/standalone/.next/server/app/_global-error/page.js +1 -1
  167. package/.next/standalone/.next/server/app/_global-error/page.js.nft.json +1 -1
  168. package/.next/standalone/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  169. package/.next/standalone/.next/server/app/_global-error.html +1 -1
  170. package/.next/standalone/.next/server/app/_global-error.rsc +2 -2
  171. package/.next/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +2 -2
  172. package/.next/standalone/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +2 -2
  173. package/.next/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  174. package/.next/standalone/.next/server/app/_not-found/page.js +1 -1
  175. package/.next/standalone/.next/server/app/_not-found/page.js.nft.json +1 -1
  176. package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  177. package/.next/standalone/.next/server/app/_not-found.html +1 -1
  178. package/.next/standalone/.next/server/app/_not-found.rsc +2 -2
  179. package/.next/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
  180. package/.next/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
  181. package/.next/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  182. package/.next/standalone/.next/server/app/api/agent/[id]/bash-output/route.js +1 -1
  183. package/.next/standalone/.next/server/app/api/agent/[id]/events/route.js +2 -2
  184. package/.next/standalone/.next/server/app/api/agent/[id]/route.js +1 -1
  185. package/.next/standalone/.next/server/app/api/agent/new/route.js +1 -1
  186. package/.next/standalone/.next/server/app/api/agent/running/events/route.js +1 -1
  187. package/.next/standalone/.next/server/app/api/agents/route.js +1 -1
  188. package/.next/standalone/.next/server/app/api/app-update/releases/route.js +1 -1
  189. package/.next/standalone/.next/server/app/api/app-update/route.js +2 -1
  190. package/.next/standalone/.next/server/app/api/auth/all-providers/route.js +1 -1
  191. package/.next/standalone/.next/server/app/api/auth/api-key/[provider]/route.js +1 -1
  192. package/.next/standalone/.next/server/app/api/auth/login/[provider]/route.js +2 -2
  193. package/.next/standalone/.next/server/app/api/auth/logout/[provider]/route.js +1 -1
  194. package/.next/standalone/.next/server/app/api/auth/providers/route.js +1 -1
  195. package/.next/standalone/.next/server/app/api/cwd/browse/route.js +1 -1
  196. package/.next/standalone/.next/server/app/api/cwd/validate/route.js +1 -1
  197. package/.next/standalone/.next/server/app/api/default-cwd/route.js +1 -1
  198. package/.next/standalone/.next/server/app/api/diagnostics/route.js +1 -1
  199. package/.next/standalone/.next/server/app/api/file-index/route.js +1 -1
  200. package/.next/standalone/.next/server/app/api/files/[...path]/route.js +2 -2
  201. package/.next/standalone/.next/server/app/api/git/diff/route.js +2 -2
  202. package/.next/standalone/.next/server/app/api/git/status/route.js +2 -2
  203. package/.next/standalone/.next/server/app/api/github/status/route.js +1 -1
  204. package/.next/standalone/.next/server/app/api/home/route.js +1 -1
  205. package/.next/standalone/.next/server/app/api/mcp/route.js +2 -2
  206. package/.next/standalone/.next/server/app/api/mcp/route.js.nft.json +1 -1
  207. package/.next/standalone/.next/server/app/api/model-roles/route.js +1 -1
  208. package/.next/standalone/.next/server/app/api/models/fetch/route.js +1 -1
  209. package/.next/standalone/.next/server/app/api/models/route.js +1 -1
  210. package/.next/standalone/.next/server/app/api/models-config/catalog/route.js +1 -1
  211. package/.next/standalone/.next/server/app/api/models-config/route.js +1 -1
  212. package/.next/standalone/.next/server/app/api/models-config/test/route.js +1 -1
  213. package/.next/standalone/.next/server/app/api/omp-settings/route.js +1 -1
  214. package/.next/standalone/.next/server/app/api/omp-update/route.js +2 -2
  215. package/.next/standalone/.next/server/app/api/omp-version/route.js +1 -1
  216. package/.next/standalone/.next/server/app/api/pair/accept/route.js +1 -0
  217. package/.next/standalone/.next/server/app/api/pair/accept/route.js.nft.json +1 -0
  218. package/.next/standalone/.next/server/app/api/pair/accept/route_client-reference-manifest.js +1 -0
  219. package/.next/standalone/.next/server/app/api/pair/config/route.js +1 -0
  220. package/.next/standalone/.next/server/app/api/pair/config/route.js.nft.json +1 -0
  221. package/.next/standalone/.next/server/app/api/pair/config/route_client-reference-manifest.js +1 -0
  222. package/.next/standalone/.next/server/app/api/pair/devices/[id]/route.js +1 -0
  223. package/.next/standalone/.next/server/app/api/pair/devices/[id]/route.js.nft.json +1 -0
  224. package/.next/standalone/.next/server/app/api/pair/devices/[id]/route_client-reference-manifest.js +1 -0
  225. package/.next/standalone/.next/server/app/api/pair/devices/route.js +1 -0
  226. package/.next/standalone/.next/server/app/api/pair/devices/route.js.nft.json +1 -0
  227. package/.next/standalone/.next/server/app/api/pair/devices/route_client-reference-manifest.js +1 -0
  228. package/.next/standalone/.next/server/app/api/pair/heartbeat/route.js +1 -0
  229. package/.next/standalone/.next/server/app/api/pair/heartbeat/route.js.nft.json +1 -0
  230. package/.next/standalone/.next/server/app/api/pair/heartbeat/route_client-reference-manifest.js +1 -0
  231. package/.next/standalone/.next/server/app/api/pair/revoke-all/route.js +1 -0
  232. package/.next/standalone/.next/server/app/api/pair/revoke-all/route.js.nft.json +1 -0
  233. package/.next/standalone/.next/server/app/api/pair/revoke-all/route_client-reference-manifest.js +1 -0
  234. package/.next/standalone/.next/server/app/api/pair/token/route.js +1 -0
  235. package/.next/standalone/.next/server/app/api/pair/token/route.js.nft.json +1 -0
  236. package/.next/standalone/.next/server/app/api/pair/token/route_client-reference-manifest.js +1 -0
  237. package/.next/standalone/.next/server/app/api/pair/tunnel/route.js +1 -0
  238. package/.next/standalone/.next/server/app/api/pair/tunnel/route.js.nft.json +1 -0
  239. package/.next/standalone/.next/server/app/api/pair/tunnel/route_client-reference-manifest.js +1 -0
  240. package/.next/standalone/.next/server/app/api/plugins/route.js +1 -1
  241. package/.next/standalone/.next/server/app/api/projects/route.js +2 -2
  242. package/.next/standalone/.next/server/app/api/provider-usage/route.js +1 -0
  243. package/.next/standalone/.next/server/app/api/provider-usage/route.js.nft.json +1 -0
  244. package/.next/standalone/.next/server/app/api/provider-usage/route_client-reference-manifest.js +1 -0
  245. package/.next/standalone/.next/server/app/api/providers/enable/route.js +1 -1
  246. package/.next/standalone/.next/server/app/api/proxy/route.js +1 -1
  247. package/.next/standalone/.next/server/app/api/reveal/route.js +1 -1
  248. package/.next/standalone/.next/server/app/api/scripts/route.js +1 -1
  249. package/.next/standalone/.next/server/app/api/scripts/run/route.js +1 -1
  250. package/.next/standalone/.next/server/app/api/sessions/[id]/archive/route.js +1 -1
  251. package/.next/standalone/.next/server/app/api/sessions/[id]/auto-name/route.js +1 -1
  252. package/.next/standalone/.next/server/app/api/sessions/[id]/context/route.js +1 -1
  253. package/.next/standalone/.next/server/app/api/sessions/[id]/entries/[entryId]/thinking/route.js +1 -1
  254. package/.next/standalone/.next/server/app/api/sessions/[id]/export/route.js +1 -1
  255. package/.next/standalone/.next/server/app/api/sessions/[id]/plan/route.js +1 -1
  256. package/.next/standalone/.next/server/app/api/sessions/[id]/route.js +1 -1
  257. package/.next/standalone/.next/server/app/api/sessions/[id]/state/route.js +1 -1
  258. package/.next/standalone/.next/server/app/api/sessions/[id]/subagents/[subagentId]/route.js +1 -1
  259. package/.next/standalone/.next/server/app/api/sessions/[id]/subagents/route.js +1 -1
  260. package/.next/standalone/.next/server/app/api/sessions/archive/route.js +1 -1
  261. package/.next/standalone/.next/server/app/api/sessions/import/route.js +1 -1
  262. package/.next/standalone/.next/server/app/api/sessions/route.js +1 -1
  263. package/.next/standalone/.next/server/app/api/skills/check/route.js +1 -1
  264. package/.next/standalone/.next/server/app/api/skills/install/route.js +1 -1
  265. package/.next/standalone/.next/server/app/api/skills/route.js +1 -1
  266. package/.next/standalone/.next/server/app/api/skills/search/route.js +1 -1
  267. package/.next/standalone/.next/server/app/api/skills/update/route.js +1 -1
  268. package/.next/standalone/.next/server/app/api/terminal/input/route.js +1 -1
  269. package/.next/standalone/.next/server/app/api/terminal/open/route.js +1 -1
  270. package/.next/standalone/.next/server/app/api/terminal/resize/route.js +1 -1
  271. package/.next/standalone/.next/server/app/api/terminal/session/route.js +1 -1
  272. package/.next/standalone/.next/server/app/api/terminal/stream/route.js +2 -2
  273. package/.next/standalone/.next/server/app/api/web-auth/session/route.js +1 -1
  274. package/.next/standalone/.next/server/app/api/worktrees/route.js +1 -1
  275. package/.next/standalone/.next/server/app/favicon.ico/route.js +1 -1
  276. package/.next/standalone/.next/server/app/index.html +1 -1
  277. package/.next/standalone/.next/server/app/index.rsc +3 -3
  278. package/.next/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +3 -3
  279. package/.next/standalone/.next/server/app/index.segments/_full.segment.rsc +3 -3
  280. package/.next/standalone/.next/server/app/index.segments/_tree.segment.rsc +1 -1
  281. package/.next/standalone/.next/server/app/login/page.js +1 -1
  282. package/.next/standalone/.next/server/app/login/page.js.nft.json +1 -1
  283. package/.next/standalone/.next/server/app/login/page_client-reference-manifest.js +1 -1
  284. package/.next/standalone/.next/server/app/login.html +1 -1
  285. package/.next/standalone/.next/server/app/login.rsc +2 -2
  286. package/.next/standalone/.next/server/app/login.segments/_full.segment.rsc +2 -2
  287. package/.next/standalone/.next/server/app/login.segments/_tree.segment.rsc +1 -1
  288. package/.next/standalone/.next/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
  289. package/.next/standalone/.next/server/app/manifest.webmanifest/route.js +2 -2
  290. package/.next/standalone/.next/server/app/page.js +1 -1
  291. package/.next/standalone/.next/server/app/page.js.nft.json +1 -1
  292. package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
  293. package/.next/standalone/.next/server/app/remote/page.js +1 -0
  294. package/.next/standalone/.next/server/app/remote/page.js.nft.json +1 -0
  295. package/.next/standalone/.next/server/app/remote/page_client-reference-manifest.js +1 -0
  296. package/.next/standalone/.next/server/app/remote.html +1 -0
  297. package/.next/standalone/.next/server/app/remote.meta +26 -0
  298. package/.next/standalone/.next/server/app/remote.rsc +32 -0
  299. package/.next/standalone/.next/server/app/remote.segments/_full.segment.rsc +32 -0
  300. package/.next/standalone/.next/server/app/remote.segments/_tree.segment.rsc +8 -0
  301. package/.next/standalone/.next/server/app/remote.segments/remote/__PAGE__.segment.rsc +31 -0
  302. package/.next/standalone/.next/server/app-paths-manifest.json +17 -7
  303. package/.next/standalone/.next/server/chunks/2760.js +3 -3
  304. package/.next/standalone/.next/server/chunks/3798.js +2 -2
  305. package/.next/standalone/.next/server/chunks/4791.js +1 -0
  306. package/.next/standalone/.next/server/chunks/5309.js +1 -1
  307. package/.next/standalone/.next/server/chunks/{3425.js → 5806.js} +1 -1
  308. package/.next/standalone/.next/server/chunks/6465.js +1 -1
  309. package/.next/standalone/.next/server/chunks/7839.js +1 -1
  310. package/.next/standalone/.next/server/middleware-build-manifest.js +1 -1
  311. package/.next/standalone/.next/server/middleware-react-loadable-manifest.js +1 -1
  312. package/.next/standalone/.next/server/middleware.js +3 -3
  313. package/.next/standalone/.next/server/pages/404.html +1 -1
  314. package/.next/standalone/.next/server/pages/500.html +1 -1
  315. package/.next/standalone/.next/server/prefetch-hints.json +14 -0
  316. package/.next/standalone/dist-desktop/mac-arm64/OmpWeb.app/Contents/Resources/standalone/dist-desktop/mac-arm64/OmpWeb.app/Contents/Resources/standalone/dist-desktop/mac-arm64/OmpWeb.app/Contents/Resources/standalone/dist-desktop/mac-arm64/OmpWeb.app/Contents/Resources/standalone/dist-desktop/mac-arm64/OmpWeb.app/Contents/Resources/standalone/dist-desktop/linux-arm64-unpacked/resources/standalone/.omp/mcp.json +11 -0
  317. package/.next/standalone/dist-desktop/mac-arm64/OmpWeb.app/Contents/Resources/standalone/dist-desktop/mac-arm64/OmpWeb.app/Contents/Resources/standalone/dist-desktop/mac-arm64/OmpWeb.app/Contents/Resources/standalone/dist-desktop/mac-arm64/OmpWeb.app/Contents/Resources/standalone/dist-desktop/mac-arm64/OmpWeb.app/Contents/Resources/standalone/dist-desktop/mac-arm64/OmpWeb.app/Contents/Resources/standalone/.omp/mcp.json +11 -0
  318. package/.next/standalone/dist-desktop/mac-arm64/OmpWeb.app/Contents/Resources/standalone/dist-desktop/mac-arm64/OmpWeb.app/Contents/Resources/standalone/dist-desktop/mac-arm64/OmpWeb.app/Contents/Resources/standalone/dist-desktop/mac-arm64/OmpWeb.app/Contents/Resources/standalone/dist-desktop/mac-arm64/OmpWeb.app/Contents/Resources/standalone/dist-desktop/win-arm64-unpacked/resources/standalone/.omp/mcp.json +11 -0
  319. package/.next/standalone/package.json +25 -4
  320. package/.next/standalone/server.js +1 -1
  321. package/.next/static/Q-0mKyL6V7YpE6pf8ZoFy/_buildManifest.js +1 -0
  322. package/.next/static/chunks/2201.d0a54d53ec6d60af.js +1 -0
  323. package/.next/static/chunks/2584-77204310e58868e3.js +1 -0
  324. package/.next/static/chunks/3651.f68fccde22153b7d.js +1 -0
  325. package/.next/static/chunks/6608.d79f10dc7b2f3e7d.js +1 -0
  326. package/.next/static/chunks/7408.8fb61f7f23253d4d.js +126 -0
  327. package/.next/static/chunks/8422.475d97d0a80e2827.js +1 -0
  328. package/.next/static/chunks/852.e2bbfb3632f6b0fe.js +1 -0
  329. package/.next/static/chunks/app/_global-error/page-f97ee162e6cb1325.js +1 -0
  330. package/.next/static/chunks/app/api/agent/[id]/bash-output/route-f97ee162e6cb1325.js +1 -0
  331. package/.next/static/chunks/app/api/agent/[id]/events/route-f97ee162e6cb1325.js +1 -0
  332. package/.next/static/chunks/app/api/agent/[id]/route-f97ee162e6cb1325.js +1 -0
  333. package/.next/static/chunks/app/api/agent/new/route-f97ee162e6cb1325.js +1 -0
  334. package/.next/static/chunks/app/api/agent/running/events/route-f97ee162e6cb1325.js +1 -0
  335. package/.next/static/chunks/app/api/agents/route-f97ee162e6cb1325.js +1 -0
  336. package/.next/static/chunks/app/api/app-update/releases/route-f97ee162e6cb1325.js +1 -0
  337. package/.next/static/chunks/app/api/app-update/route-f97ee162e6cb1325.js +1 -0
  338. package/.next/static/chunks/app/api/auth/all-providers/route-f97ee162e6cb1325.js +1 -0
  339. package/.next/static/chunks/app/api/auth/api-key/[provider]/route-f97ee162e6cb1325.js +1 -0
  340. package/.next/static/chunks/app/api/auth/login/[provider]/route-f97ee162e6cb1325.js +1 -0
  341. package/.next/static/chunks/app/api/auth/logout/[provider]/route-f97ee162e6cb1325.js +1 -0
  342. package/.next/static/chunks/app/api/auth/providers/route-f97ee162e6cb1325.js +1 -0
  343. package/.next/static/chunks/app/api/cwd/browse/route-f97ee162e6cb1325.js +1 -0
  344. package/.next/static/chunks/app/api/cwd/validate/route-f97ee162e6cb1325.js +1 -0
  345. package/.next/static/chunks/app/api/default-cwd/route-f97ee162e6cb1325.js +1 -0
  346. package/.next/static/chunks/app/api/diagnostics/route-f97ee162e6cb1325.js +1 -0
  347. package/.next/static/chunks/app/api/file-index/route-f97ee162e6cb1325.js +1 -0
  348. package/.next/static/chunks/app/api/files/[...path]/route-f97ee162e6cb1325.js +1 -0
  349. package/.next/static/chunks/app/api/git/diff/route-f97ee162e6cb1325.js +1 -0
  350. package/.next/static/chunks/app/api/git/status/route-f97ee162e6cb1325.js +1 -0
  351. package/.next/static/chunks/app/api/github/status/route-f97ee162e6cb1325.js +1 -0
  352. package/.next/static/chunks/app/api/home/route-f97ee162e6cb1325.js +1 -0
  353. package/.next/static/chunks/app/api/mcp/route-f97ee162e6cb1325.js +1 -0
  354. package/.next/static/chunks/app/api/model-roles/route-f97ee162e6cb1325.js +1 -0
  355. package/.next/static/chunks/app/api/models/fetch/route-f97ee162e6cb1325.js +1 -0
  356. package/.next/static/chunks/app/api/models/route-f97ee162e6cb1325.js +1 -0
  357. package/.next/static/chunks/app/api/models-config/catalog/route-f97ee162e6cb1325.js +1 -0
  358. package/.next/static/chunks/app/api/models-config/route-f97ee162e6cb1325.js +1 -0
  359. package/.next/static/chunks/app/api/models-config/test/route-f97ee162e6cb1325.js +1 -0
  360. package/.next/static/chunks/app/api/omp-settings/route-f97ee162e6cb1325.js +1 -0
  361. package/.next/static/chunks/app/api/omp-update/route-f97ee162e6cb1325.js +1 -0
  362. package/.next/static/chunks/app/api/omp-version/route-f97ee162e6cb1325.js +1 -0
  363. package/.next/static/chunks/app/api/pair/accept/route-f97ee162e6cb1325.js +1 -0
  364. package/.next/static/chunks/app/api/pair/config/route-f97ee162e6cb1325.js +1 -0
  365. package/.next/static/chunks/app/api/pair/devices/[id]/route-f97ee162e6cb1325.js +1 -0
  366. package/.next/static/chunks/app/api/pair/devices/route-f97ee162e6cb1325.js +1 -0
  367. package/.next/static/chunks/app/api/pair/heartbeat/route-f97ee162e6cb1325.js +1 -0
  368. package/.next/static/chunks/app/api/pair/revoke-all/route-f97ee162e6cb1325.js +1 -0
  369. package/.next/static/chunks/app/api/pair/token/route-f97ee162e6cb1325.js +1 -0
  370. package/.next/static/chunks/app/api/pair/tunnel/route-f97ee162e6cb1325.js +1 -0
  371. package/.next/static/chunks/app/api/plugins/route-f97ee162e6cb1325.js +1 -0
  372. package/.next/static/chunks/app/api/projects/route-f97ee162e6cb1325.js +1 -0
  373. package/.next/static/chunks/app/api/provider-usage/route-f97ee162e6cb1325.js +1 -0
  374. package/.next/static/chunks/app/api/providers/enable/route-f97ee162e6cb1325.js +1 -0
  375. package/.next/static/chunks/app/api/proxy/route-f97ee162e6cb1325.js +1 -0
  376. package/.next/static/chunks/app/api/reveal/route-f97ee162e6cb1325.js +1 -0
  377. package/.next/static/chunks/app/api/scripts/route-f97ee162e6cb1325.js +1 -0
  378. package/.next/static/chunks/app/api/scripts/run/route-f97ee162e6cb1325.js +1 -0
  379. package/.next/static/chunks/app/api/sessions/[id]/archive/route-f97ee162e6cb1325.js +1 -0
  380. package/.next/static/chunks/app/api/sessions/[id]/auto-name/route-f97ee162e6cb1325.js +1 -0
  381. package/.next/static/chunks/app/api/sessions/[id]/context/route-f97ee162e6cb1325.js +1 -0
  382. package/.next/static/chunks/app/api/sessions/[id]/entries/[entryId]/thinking/route-f97ee162e6cb1325.js +1 -0
  383. package/.next/static/chunks/app/api/sessions/[id]/export/route-f97ee162e6cb1325.js +1 -0
  384. package/.next/static/chunks/app/api/sessions/[id]/plan/route-f97ee162e6cb1325.js +1 -0
  385. package/.next/static/chunks/app/api/sessions/[id]/route-f97ee162e6cb1325.js +1 -0
  386. package/.next/static/chunks/app/api/sessions/[id]/state/route-f97ee162e6cb1325.js +1 -0
  387. package/.next/static/chunks/app/api/sessions/[id]/subagents/[subagentId]/route-f97ee162e6cb1325.js +1 -0
  388. package/.next/static/chunks/app/api/sessions/[id]/subagents/route-f97ee162e6cb1325.js +1 -0
  389. package/.next/static/chunks/app/api/sessions/archive/route-f97ee162e6cb1325.js +1 -0
  390. package/.next/static/chunks/app/api/sessions/import/route-f97ee162e6cb1325.js +1 -0
  391. package/.next/static/chunks/app/api/sessions/route-f97ee162e6cb1325.js +1 -0
  392. package/.next/static/chunks/app/api/skills/check/route-f97ee162e6cb1325.js +1 -0
  393. package/.next/static/chunks/app/api/skills/install/route-f97ee162e6cb1325.js +1 -0
  394. package/.next/static/chunks/app/api/skills/route-f97ee162e6cb1325.js +1 -0
  395. package/.next/static/chunks/app/api/skills/search/route-f97ee162e6cb1325.js +1 -0
  396. package/.next/static/chunks/app/api/skills/update/route-f97ee162e6cb1325.js +1 -0
  397. package/.next/static/chunks/app/api/terminal/input/route-f97ee162e6cb1325.js +1 -0
  398. package/.next/static/chunks/app/api/terminal/open/route-f97ee162e6cb1325.js +1 -0
  399. package/.next/static/chunks/app/api/terminal/resize/route-f97ee162e6cb1325.js +1 -0
  400. package/.next/static/chunks/app/api/terminal/session/route-f97ee162e6cb1325.js +1 -0
  401. package/.next/static/chunks/app/api/terminal/stream/route-f97ee162e6cb1325.js +1 -0
  402. package/.next/static/chunks/app/api/web-auth/session/route-f97ee162e6cb1325.js +1 -0
  403. package/.next/static/chunks/app/api/worktrees/route-f97ee162e6cb1325.js +1 -0
  404. package/.next/static/chunks/app/manifest.webmanifest/route-f97ee162e6cb1325.js +1 -0
  405. package/.next/static/chunks/app/{page-e7e7426ef3ec9ec1.js → page-48b96ccb13ebd7bb.js} +1 -1
  406. package/.next/static/chunks/app/remote/page-3f3f16f1d3808f92.js +1 -0
  407. package/.next/static/chunks/next/dist/client/components/builtin/app-error-f97ee162e6cb1325.js +1 -0
  408. package/.next/static/chunks/next/dist/client/components/builtin/forbidden-f97ee162e6cb1325.js +1 -0
  409. package/.next/static/chunks/next/dist/client/components/builtin/not-found-f97ee162e6cb1325.js +1 -0
  410. package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-f97ee162e6cb1325.js +1 -0
  411. package/.next/static/chunks/webpack-18d04f872fe12139.js +1 -0
  412. package/desktop/main.js +112 -3
  413. package/next.config.ts +40 -23
  414. package/package.json +25 -4
  415. package/.next/static/chunks/1147.a11b66ffeb201d02.js +0 -126
  416. package/.next/static/chunks/2201.08d1cac24fc438ee.js +0 -1
  417. package/.next/static/chunks/2584-d4cd2d8de76d5e35.js +0 -1
  418. package/.next/static/chunks/3596.9fdb605d40673ac8.js +0 -1
  419. package/.next/static/chunks/852.60444b32fcbeb00c.js +0 -1
  420. package/.next/static/chunks/app/_global-error/page-b24b35e3a039f3af.js +0 -1
  421. package/.next/static/chunks/app/api/agent/[id]/bash-output/route-b24b35e3a039f3af.js +0 -1
  422. package/.next/static/chunks/app/api/agent/[id]/events/route-b24b35e3a039f3af.js +0 -1
  423. package/.next/static/chunks/app/api/agent/[id]/route-b24b35e3a039f3af.js +0 -1
  424. package/.next/static/chunks/app/api/agent/new/route-b24b35e3a039f3af.js +0 -1
  425. package/.next/static/chunks/app/api/agent/running/events/route-b24b35e3a039f3af.js +0 -1
  426. package/.next/static/chunks/app/api/agents/route-b24b35e3a039f3af.js +0 -1
  427. package/.next/static/chunks/app/api/app-update/releases/route-b24b35e3a039f3af.js +0 -1
  428. package/.next/static/chunks/app/api/app-update/route-b24b35e3a039f3af.js +0 -1
  429. package/.next/static/chunks/app/api/auth/all-providers/route-b24b35e3a039f3af.js +0 -1
  430. package/.next/static/chunks/app/api/auth/api-key/[provider]/route-b24b35e3a039f3af.js +0 -1
  431. package/.next/static/chunks/app/api/auth/login/[provider]/route-b24b35e3a039f3af.js +0 -1
  432. package/.next/static/chunks/app/api/auth/logout/[provider]/route-b24b35e3a039f3af.js +0 -1
  433. package/.next/static/chunks/app/api/auth/providers/route-b24b35e3a039f3af.js +0 -1
  434. package/.next/static/chunks/app/api/cwd/browse/route-b24b35e3a039f3af.js +0 -1
  435. package/.next/static/chunks/app/api/cwd/validate/route-b24b35e3a039f3af.js +0 -1
  436. package/.next/static/chunks/app/api/default-cwd/route-b24b35e3a039f3af.js +0 -1
  437. package/.next/static/chunks/app/api/diagnostics/route-b24b35e3a039f3af.js +0 -1
  438. package/.next/static/chunks/app/api/file-index/route-b24b35e3a039f3af.js +0 -1
  439. package/.next/static/chunks/app/api/files/[...path]/route-b24b35e3a039f3af.js +0 -1
  440. package/.next/static/chunks/app/api/git/diff/route-b24b35e3a039f3af.js +0 -1
  441. package/.next/static/chunks/app/api/git/status/route-b24b35e3a039f3af.js +0 -1
  442. package/.next/static/chunks/app/api/github/status/route-b24b35e3a039f3af.js +0 -1
  443. package/.next/static/chunks/app/api/home/route-b24b35e3a039f3af.js +0 -1
  444. package/.next/static/chunks/app/api/mcp/route-b24b35e3a039f3af.js +0 -1
  445. package/.next/static/chunks/app/api/model-roles/route-b24b35e3a039f3af.js +0 -1
  446. package/.next/static/chunks/app/api/models/fetch/route-b24b35e3a039f3af.js +0 -1
  447. package/.next/static/chunks/app/api/models/route-b24b35e3a039f3af.js +0 -1
  448. package/.next/static/chunks/app/api/models-config/catalog/route-b24b35e3a039f3af.js +0 -1
  449. package/.next/static/chunks/app/api/models-config/route-b24b35e3a039f3af.js +0 -1
  450. package/.next/static/chunks/app/api/models-config/test/route-b24b35e3a039f3af.js +0 -1
  451. package/.next/static/chunks/app/api/omp-settings/route-b24b35e3a039f3af.js +0 -1
  452. package/.next/static/chunks/app/api/omp-update/route-b24b35e3a039f3af.js +0 -1
  453. package/.next/static/chunks/app/api/omp-version/route-b24b35e3a039f3af.js +0 -1
  454. package/.next/static/chunks/app/api/plugins/route-b24b35e3a039f3af.js +0 -1
  455. package/.next/static/chunks/app/api/projects/route-b24b35e3a039f3af.js +0 -1
  456. package/.next/static/chunks/app/api/providers/enable/route-b24b35e3a039f3af.js +0 -1
  457. package/.next/static/chunks/app/api/proxy/route-b24b35e3a039f3af.js +0 -1
  458. package/.next/static/chunks/app/api/reveal/route-b24b35e3a039f3af.js +0 -1
  459. package/.next/static/chunks/app/api/scripts/route-b24b35e3a039f3af.js +0 -1
  460. package/.next/static/chunks/app/api/scripts/run/route-b24b35e3a039f3af.js +0 -1
  461. package/.next/static/chunks/app/api/sessions/[id]/archive/route-b24b35e3a039f3af.js +0 -1
  462. package/.next/static/chunks/app/api/sessions/[id]/auto-name/route-b24b35e3a039f3af.js +0 -1
  463. package/.next/static/chunks/app/api/sessions/[id]/context/route-b24b35e3a039f3af.js +0 -1
  464. package/.next/static/chunks/app/api/sessions/[id]/entries/[entryId]/thinking/route-b24b35e3a039f3af.js +0 -1
  465. package/.next/static/chunks/app/api/sessions/[id]/export/route-b24b35e3a039f3af.js +0 -1
  466. package/.next/static/chunks/app/api/sessions/[id]/plan/route-b24b35e3a039f3af.js +0 -1
  467. package/.next/static/chunks/app/api/sessions/[id]/route-b24b35e3a039f3af.js +0 -1
  468. package/.next/static/chunks/app/api/sessions/[id]/state/route-b24b35e3a039f3af.js +0 -1
  469. package/.next/static/chunks/app/api/sessions/[id]/subagents/[subagentId]/route-b24b35e3a039f3af.js +0 -1
  470. package/.next/static/chunks/app/api/sessions/[id]/subagents/route-b24b35e3a039f3af.js +0 -1
  471. package/.next/static/chunks/app/api/sessions/archive/route-b24b35e3a039f3af.js +0 -1
  472. package/.next/static/chunks/app/api/sessions/import/route-b24b35e3a039f3af.js +0 -1
  473. package/.next/static/chunks/app/api/sessions/route-b24b35e3a039f3af.js +0 -1
  474. package/.next/static/chunks/app/api/skills/check/route-b24b35e3a039f3af.js +0 -1
  475. package/.next/static/chunks/app/api/skills/install/route-b24b35e3a039f3af.js +0 -1
  476. package/.next/static/chunks/app/api/skills/route-b24b35e3a039f3af.js +0 -1
  477. package/.next/static/chunks/app/api/skills/search/route-b24b35e3a039f3af.js +0 -1
  478. package/.next/static/chunks/app/api/skills/update/route-b24b35e3a039f3af.js +0 -1
  479. package/.next/static/chunks/app/api/terminal/input/route-b24b35e3a039f3af.js +0 -1
  480. package/.next/static/chunks/app/api/terminal/open/route-b24b35e3a039f3af.js +0 -1
  481. package/.next/static/chunks/app/api/terminal/resize/route-b24b35e3a039f3af.js +0 -1
  482. package/.next/static/chunks/app/api/terminal/session/route-b24b35e3a039f3af.js +0 -1
  483. package/.next/static/chunks/app/api/terminal/stream/route-b24b35e3a039f3af.js +0 -1
  484. package/.next/static/chunks/app/api/web-auth/session/route-b24b35e3a039f3af.js +0 -1
  485. package/.next/static/chunks/app/api/worktrees/route-b24b35e3a039f3af.js +0 -1
  486. package/.next/static/chunks/app/manifest.webmanifest/route-b24b35e3a039f3af.js +0 -1
  487. package/.next/static/chunks/next/dist/client/components/builtin/app-error-b24b35e3a039f3af.js +0 -1
  488. package/.next/static/chunks/next/dist/client/components/builtin/forbidden-b24b35e3a039f3af.js +0 -1
  489. package/.next/static/chunks/next/dist/client/components/builtin/not-found-b24b35e3a039f3af.js +0 -1
  490. package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-b24b35e3a039f3af.js +0 -1
  491. package/.next/static/chunks/webpack-9691f4590ba70cb8.js +0 -1
  492. package/.next/static/r2kW0snAtbTZ8muUOUByQ/_buildManifest.js +0 -1
  493. /package/.next/static/{r2kW0snAtbTZ8muUOUByQ → Q-0mKyL6V7YpE6pf8ZoFy}/_ssgManifest.js +0 -0
@@ -24,31 +24,40 @@
24
24
  "/api/worktrees/route": "app/api/worktrees/route.js",
25
25
  "/favicon.ico/route": "app/favicon.ico/route.js",
26
26
  "/manifest.webmanifest/route": "app/manifest.webmanifest/route.js",
27
- "/api/agent/new/route": "app/api/agent/new/route.js",
28
27
  "/api/agent/[id]/events/route": "app/api/agent/[id]/events/route.js",
28
+ "/api/agent/[id]/route": "app/api/agent/[id]/route.js",
29
+ "/api/agent/new/route": "app/api/agent/new/route.js",
30
+ "/api/agent/running/events/route": "app/api/agent/running/events/route.js",
31
+ "/api/agents/route": "app/api/agents/route.js",
29
32
  "/api/app-update/releases/route": "app/api/app-update/releases/route.js",
30
33
  "/api/app-update/route": "app/api/app-update/route.js",
31
34
  "/api/auth/all-providers/route": "app/api/auth/all-providers/route.js",
32
35
  "/api/auth/api-key/[provider]/route": "app/api/auth/api-key/[provider]/route.js",
33
- "/api/agents/route": "app/api/agents/route.js",
34
- "/api/agent/running/events/route": "app/api/agent/running/events/route.js",
35
- "/api/agent/[id]/route": "app/api/agent/[id]/route.js",
36
36
  "/api/auth/logout/[provider]/route": "app/api/auth/logout/[provider]/route.js",
37
37
  "/api/auth/login/[provider]/route": "app/api/auth/login/[provider]/route.js",
38
38
  "/api/auth/providers/route": "app/api/auth/providers/route.js",
39
39
  "/api/diagnostics/route": "app/api/diagnostics/route.js",
40
40
  "/api/github/status/route": "app/api/github/status/route.js",
41
- "/api/mcp/route": "app/api/mcp/route.js",
42
41
  "/api/model-roles/route": "app/api/model-roles/route.js",
43
42
  "/api/models-config/catalog/route": "app/api/models-config/catalog/route.js",
44
43
  "/api/models-config/route": "app/api/models-config/route.js",
44
+ "/api/mcp/route": "app/api/mcp/route.js",
45
45
  "/api/models-config/test/route": "app/api/models-config/test/route.js",
46
46
  "/api/models/fetch/route": "app/api/models/fetch/route.js",
47
+ "/api/omp-settings/route": "app/api/omp-settings/route.js",
47
48
  "/api/models/route": "app/api/models/route.js",
48
49
  "/api/omp-update/route": "app/api/omp-update/route.js",
49
50
  "/api/omp-version/route": "app/api/omp-version/route.js",
50
- "/api/omp-settings/route": "app/api/omp-settings/route.js",
51
+ "/api/pair/accept/route": "app/api/pair/accept/route.js",
52
+ "/api/pair/config/route": "app/api/pair/config/route.js",
53
+ "/api/pair/devices/[id]/route": "app/api/pair/devices/[id]/route.js",
54
+ "/api/pair/devices/route": "app/api/pair/devices/route.js",
55
+ "/api/pair/heartbeat/route": "app/api/pair/heartbeat/route.js",
56
+ "/api/pair/revoke-all/route": "app/api/pair/revoke-all/route.js",
57
+ "/api/pair/token/route": "app/api/pair/token/route.js",
58
+ "/api/pair/tunnel/route": "app/api/pair/tunnel/route.js",
51
59
  "/api/plugins/route": "app/api/plugins/route.js",
60
+ "/api/provider-usage/route": "app/api/provider-usage/route.js",
52
61
  "/api/proxy/route": "app/api/proxy/route.js",
53
62
  "/api/reveal/route": "app/api/reveal/route.js",
54
63
  "/api/scripts/route": "app/api/scripts/route.js",
@@ -69,5 +78,6 @@
69
78
  "/api/terminal/session/route": "app/api/terminal/session/route.js",
70
79
  "/api/terminal/stream/route": "app/api/terminal/stream/route.js",
71
80
  "/login/page": "app/login/page.js",
72
- "/page": "app/page.js"
81
+ "/page": "app/page.js",
82
+ "/remote/page": "app/remote/page.js"
73
83
  }
@@ -1,5 +1,5 @@
1
- "use strict";exports.id=2760,exports.ids=[1671,2760],exports.modules={32760:(a,b,c)=>{c.d(b,{runUtilityCommand:()=>q});var d=c(21820),e=c(79646),f=c(4984);c(29021);var g=c(33873);c(91645),(0,g.join)((0,d.homedir)(),".omp","agent","proxy.json");var h=c(51671);function i(a){return"object"==typeof a&&null!==a&&!Array.isArray(a)}function j(a){return"number"==typeof a&&Number.isSafeInteger(a)}function k(a){return Buffer.byteLength(a,"utf8")+1}class l{push(a){if(!i(a)||"rpc_chunk"!==a.type){if(this.pending)throw Error("RPC chunk sequence interrupted");if(!i(a)||"string"!=typeof a.type)throw Error("RPC frame must be an object");return a}let{chunkId:b,index:c,count:d,byteLength:e}=a;if("string"!=typeof b||0===b.length||b.length>128||!j(c)||!j(d)||!j(e)||c<0||d<2||d>Math.ceil(256)||c>=d||e<1048576||e>0x4000000)throw Error("invalid RPC chunk metadata");let f=function(a){if("string"!=typeof a||0===a.length||!/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(a))throw Error("invalid RPC chunk data");let b=Buffer.from(a,"base64");if(b.toString("base64")!==a)throw Error("invalid RPC chunk data");return b}(a.data);if(f.byteLength>262144)throw Error("RPC chunk payload exceeds the transport limit");if(!this.pending){if(0!==c)throw Error("RPC chunk sequence must start at index 0");this.pending={chunkId:b,count:d,byteLength:e,nextIndex:0,chunks:[],receivedBytes:0}}let g=this.pending;if(g.chunkId!==b||g.count!==d||g.byteLength!==e||g.nextIndex!==c)throw Error("RPC chunk sequence mismatch");if(g.chunks.push(f),g.receivedBytes+=f.byteLength,g.nextIndex++,g.receivedBytes>g.byteLength)throw Error("RPC chunk sequence exceeds declared length");if(g.nextIndex<g.count)return;if(g.receivedBytes!==g.byteLength)throw Error("RPC chunk sequence length mismatch");this.pending=void 0;let h=JSON.parse(new TextDecoder("utf-8",{fatal:!0}).decode(Buffer.concat(g.chunks)));if(!i(h)||"string"!=typeof h.type)throw Error("RPC frame must be an object");return h}}class m extends Error{constructor(a,b,c){super(b),this.name="RpcCommandError",this.command=a,this.code=c}}class n{constructor(a){let b,c;this.pending=new Map,this.frameListeners=new Set,this.nextId=1,this.stderrTail="",this.exited=!1,this.exitInfo=null,this.protocolVersion=1,this.nextChunkId=1,this.writeQueue=Promise.resolve();const d=a.dependencies?.resolveOmpBin??h.resolveOmpBin;this.spawnProcess=a.dependencies?.spawn??e.spawn;const g=d();if(!g)throw Error("omp binary not found. Install oh-my-pi or set OMP_WEB_OMP_BIN.");this.cwd=a.cwd,a.onFrame&&this.frameListeners.add(a.onFrame);const i=["--mode","rpc-ui","--cwd",a.cwd,...a.extraArgs??[]],j="win32"===process.platform&&/\.cmd$/i.test(g);this.child=this.spawnProcess(j?"cmd.exe":g,j?["/d","/s","/c",function(a,b){return[a,...b].map(a=>/\s/.test(a)?`"${a.replace(/"/g,'\\"')}"`:a).join(" ")}(g,i)]:i,{cwd:a.cwd,env:function(a,b=process.platform){let c={...a};for(let a of Object.keys(c))(function(a,b){let c="win32"===b?a.toUpperCase():a;return"PORT"===c||"NODE_ENV"===c||c.startsWith("NEXT_")})(a,b)&&delete c[a];return c}({...process.env,...function(a){return a?{HTTP_PROXY:a,HTTPS_PROXY:a,ALL_PROXY:a,http_proxy:a,https_proxy:a,all_proxy:a}:{}}(process.env.OMP_WEB_PROXY_URL||null),...a.env}),stdio:["pipe","pipe","pipe"],windowsHide:!0,detached:"win32"!==process.platform}),this.child.stdin.on("error",()=>{}),this.child.stdout.on("error",()=>{}),this.readyPromise=new Promise((a,d)=>{b=a,c=d}),this.readyPromise.catch(()=>{});const k=new l;(0,f.createInterface)({input:this.child.stdout,crlfDelay:1/0}).on("line",a=>{let c,d,e=a.trim();if(e){try{c=JSON.parse(e)}catch{return}try{if(c&&"object"==typeof c&&"rpc_chunk"===c.type&&2!==this.protocolVersion)throw Error("RPC chunk received before protocol negotiation");let a=k.push(c);if(!a)return;d=a}catch(a){this.stderrTail=(this.stderrTail+`
1
+ "use strict";exports.id=2760,exports.ids=[1671,2760],exports.modules={32760:(a,b,c)=>{c.d(b,{runUtilityCommand:()=>r});var d=c(21820),e=c(79646),f=c(4984);c(29021);var g=c(33873);c(91645),(0,g.join)((0,d.homedir)(),".omp","agent","proxy.json");var h=c(51671);function i(a){return"object"==typeof a&&null!==a&&!Array.isArray(a)}function j(a){return"number"==typeof a&&Number.isSafeInteger(a)}function k(a){return Buffer.byteLength(a,"utf8")+1}class l{push(a){if(!i(a)||"rpc_chunk"!==a.type){if(this.pending)throw Error("RPC chunk sequence interrupted");if(!i(a)||"string"!=typeof a.type)throw Error("RPC frame must be an object");return a}let{chunkId:b,index:c,count:d,byteLength:e}=a;if("string"!=typeof b||0===b.length||b.length>128||!j(c)||!j(d)||!j(e)||c<0||d<2||d>Math.ceil(256)||c>=d||e<1048576||e>0x4000000)throw Error("invalid RPC chunk metadata");let f=function(a){if("string"!=typeof a||0===a.length||!/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(a))throw Error("invalid RPC chunk data");let b=Buffer.from(a,"base64");if(b.toString("base64")!==a)throw Error("invalid RPC chunk data");return b}(a.data);if(f.byteLength>262144)throw Error("RPC chunk payload exceeds the transport limit");if(!this.pending){if(0!==c)throw Error("RPC chunk sequence must start at index 0");this.pending={chunkId:b,count:d,byteLength:e,nextIndex:0,chunks:[],receivedBytes:0}}let g=this.pending;if(g.chunkId!==b||g.count!==d||g.byteLength!==e||g.nextIndex!==c)throw Error("RPC chunk sequence mismatch");if(g.chunks.push(f),g.receivedBytes+=f.byteLength,g.nextIndex++,g.receivedBytes>g.byteLength)throw Error("RPC chunk sequence exceeds declared length");if(g.nextIndex<g.count)return;if(g.receivedBytes!==g.byteLength)throw Error("RPC chunk sequence length mismatch");this.pending=void 0;let h=JSON.parse(new TextDecoder("utf-8",{fatal:!0}).decode(Buffer.concat(g.chunks)));if(!i(h)||"string"!=typeof h.type)throw Error("RPC frame must be an object");return h}}class m extends Error{constructor(a,b,c){super(b),this.name="RpcCommandError",this.command=a,this.code=c}}class n extends Error{constructor(a,b,c){super(c??`RPC command ${a} timed out after ${b}ms`),this.name="RpcCommandTimeoutError",this.command=a,this.timeoutMs=b}}class o{constructor(a){let b,c;this.pending=new Map,this.frameListeners=new Set,this.nextId=1,this.stderrTail="",this.exited=!1,this.exitInfo=null,this.protocolVersion=1,this.nextChunkId=1,this.writeQueue=Promise.resolve();const d=a.dependencies?.resolveOmpBin??h.resolveOmpBin;this.spawnProcess=a.dependencies?.spawn??e.spawn;const g=d();if(!g)throw Error("omp binary not found. Install oh-my-pi or set OMP_WEB_OMP_BIN.");this.cwd=a.cwd,a.onFrame&&this.frameListeners.add(a.onFrame);const i=["--mode","rpc-ui","--cwd",a.cwd,...a.extraArgs??[]],j="win32"===process.platform&&/\.cmd$/i.test(g);this.child=this.spawnProcess(j?"cmd.exe":g,j?["/d","/s","/c",function(a,b){return[a,...b].map(a=>/\s/.test(a)?`"${a.replace(/"/g,'\\"')}"`:a).join(" ")}(g,i)]:i,{cwd:a.cwd,env:function(a,b=process.platform){let c={...a};for(let a of Object.keys(c))(function(a,b){let c="win32"===b?a.toUpperCase():a;return"PORT"===c||"NODE_ENV"===c||c.startsWith("NEXT_")})(a,b)&&delete c[a];return c}({...process.env,...function(a){return a?{HTTP_PROXY:a,HTTPS_PROXY:a,ALL_PROXY:a,http_proxy:a,https_proxy:a,all_proxy:a}:{}}(process.env.OMP_WEB_PROXY_URL||null),...a.env}),stdio:["pipe","pipe","pipe"],windowsHide:!0,detached:"win32"!==process.platform}),this.child.stdin.on("error",()=>{}),this.child.stdout.on("error",()=>{}),this.readyPromise=new Promise((a,d)=>{b=a,c=d}),this.readyPromise.catch(()=>{});const k=new l;(0,f.createInterface)({input:this.child.stdout,crlfDelay:1/0}).on("line",a=>{let c,d,e=a.trim();if(e){try{c=JSON.parse(e)}catch{return}try{if(c&&"object"==typeof c&&"rpc_chunk"===c.type&&2!==this.protocolVersion)throw Error("RPC chunk received before protocol negotiation");let a=k.push(c);if(!a)return;d=a}catch(a){this.stderrTail=(this.stderrTail+`
2
2
  RPC protocol error: ${a instanceof Error?a.message:String(a)}`).slice(-8192),this.dispose(0);return}if("ready"===d.type)return void b(d);if("response"===d.type)return void this.handleResponse(d);for(let a of this.frameListeners)try{a(d)}catch{}}}),this.child.stderr.on("data",a=>{this.stderrTail=(this.stderrTail+a.toString("utf8")).slice(-8192)});const m=(b,d)=>{if(this.exited)return;this.exited=!0,this.exitInfo={code:b,signal:d};let e=Error(`omp exited (code ${b??"null"}, signal ${d??"none"})${this.stderrTail?`: ${this.stderrTail.slice(-500)}`:""}`);for(let[,a]of(c(e),this.pending))a.timer&&clearTimeout(a.timer),a.reject(e);this.pending.clear(),a.onExit?.({code:b,signal:d,stderrTail:this.stderrTail})};this.child.on("exit",m),this.child.on("error",a=>{this.stderrTail=(this.stderrTail+`
3
- spawn error: ${a.message}`).slice(-8192),m(null,null)})}get isAlive(){return!this.exited}get exitDetails(){return this.exitInfo?{...this.exitInfo,stderrTail:this.stderrTail}:null}waitReady(a=6e4){let b=new Promise((b,c)=>{let d=setTimeout(()=>c(Error(`omp RPC ready timeout after ${a}ms`)),a);d.unref?.(),this.readyPromise.finally(()=>clearTimeout(d)).catch(()=>{})});return Promise.race([this.readyPromise,b])}async negotiateProtocol(a){if(!(Array.isArray(a.supportedProtocolVersions)?a.supportedProtocolVersions:[]).includes(2))return this.protocolVersion;let b=await this.sendCommand({type:"negotiate_protocol",protocolVersion:2});if(b?.protocolVersion!==2)throw Error("OMP rejected RPC protocol v2 negotiation");return this.protocolVersion=2,this.protocolVersion}onFrame(a){return this.frameListeners.add(a),()=>this.frameListeners.delete(a)}sendCommand(a,b){if(this.exited)return Promise.reject(Error("omp RPC process has exited"));let c=`w${this.nextId++}`;return new Promise((d,e)=>{let f={command:a.type,resolve:d,reject:e};b&&b>0&&(f.timer=setTimeout(()=>{this.pending.get(c)===f&&(this.pending.delete(c),e(Error(`RPC command ${a.type} timed out after ${b}ms`)))},b),f.timer.unref?.()),this.pending.set(c,f),this.writeFrame({...a,id:c},a=>{if(a){let b=this.pending.get(c);b&&(this.pending.delete(c),b.timer&&clearTimeout(b.timer),e(a))}})})}sendFrame(a){this.exited||this.writeFrame(a,()=>{})}writeFrame(a,b){let c;try{c=function(a,b,c){let d=JSON.stringify(a);if(1048576>=k(d))return[`${d}
3
+ spawn error: ${a.message}`).slice(-8192),m(null,null)})}get isAlive(){return!this.exited}get exitDetails(){return this.exitInfo?{...this.exitInfo,stderrTail:this.stderrTail}:null}waitReady(a=6e4){let b=new Promise((b,c)=>{let d=setTimeout(()=>c(Error(`omp RPC ready timeout after ${a}ms`)),a);d.unref?.(),this.readyPromise.finally(()=>clearTimeout(d)).catch(()=>{})});return Promise.race([this.readyPromise,b])}async negotiateProtocol(a){if(!(Array.isArray(a.supportedProtocolVersions)?a.supportedProtocolVersions:[]).includes(2))return this.protocolVersion;let b=await this.sendCommand({type:"negotiate_protocol",protocolVersion:2});if(b?.protocolVersion!==2)throw Error("OMP rejected RPC protocol v2 negotiation");return this.protocolVersion=2,this.protocolVersion}onFrame(a){return this.frameListeners.add(a),()=>this.frameListeners.delete(a)}sendCommand(a,b){if(this.exited)return Promise.reject(Error("omp RPC process has exited"));let c=`w${this.nextId++}`;return new Promise((d,e)=>{let f={command:a.type,resolve:d,reject:e};b&&b>0&&(f.timer=setTimeout(()=>{this.pending.get(c)===f&&(this.pending.delete(c),e(new n(a.type,b)))},b),f.timer.unref?.()),this.pending.set(c,f),this.writeFrame({...a,id:c},a=>{if(a){let b=this.pending.get(c);b&&(this.pending.delete(c),b.timer&&clearTimeout(b.timer),e(a))}})})}sendFrame(a){this.exited||this.writeFrame(a,()=>{})}writeFrame(a,b){let c;try{c=function(a,b,c){let d=JSON.stringify(a);if(1048576>=k(d))return[`${d}
4
4
  `];if(1===b)throw Error("RPC frame exceeds the v1 transport limit");let e=Buffer.from(d,"utf8");if(e.byteLength>0x4000000)throw Error("RPC frame exceeds the v2 reassembly limit");let f=Math.ceil(e.byteLength/262144),g=[];for(let a=0;a<f;a++){let b=JSON.stringify({type:"rpc_chunk",chunkId:c,index:a,count:f,byteLength:e.byteLength,data:e.subarray(262144*a,(a+1)*262144).toString("base64")});if(k(b)>1048576)throw Error("RPC chunk exceeds the transport limit");g.push(`${b}
5
- `)}return g}(a,this.protocolVersion,`web-${this.nextChunkId++}`)}catch(a){b(a instanceof Error?a:Error(String(a)));return}this.writeQueue=this.writeQueue.then(()=>new Promise(a=>{if(this.exited||this.child.stdin.destroyed){b(Error("RPC process is not running")),a();return}let d=0,e=f=>{if(f||d===c.length){b(f??null),a();return}this.child.stdin.write(c[d++],e)};e()}))}handleResponse(a){let b=a.id,c=b?this.pending.get(b):void 0;if(!c||!b){for(let b of this.frameListeners)try{b(a)}catch{}return}this.pending.delete(b),c.timer&&clearTimeout(c.timer),a.success?c.resolve(a.data):c.reject(new m(a.command,a.error??"RPC command failed",a.code))}async dispose(a=5e3){if(this.exited)return;let b=new Promise(a=>{if(this.exited)return a();this.child.once("exit",()=>a())});try{this.child.stdin.end()}catch{}let c=(a,b)=>{let c=this.child.pid;if(c){if("win32"===process.platform){let d=["/pid",String(c),"/t",...a?["/f"]:[]];this.spawnProcess("taskkill",d,{windowsHide:!0,stdio:"ignore"}).once("error",()=>{try{this.child.kill(b)}catch{}});return}try{process.kill(-c,b)}catch{try{this.child.kill(b)}catch{}}}},d=setTimeout(()=>{this.exited||c(!1,"SIGTERM")},a),e=setTimeout(()=>{this.exited||c(!0,"SIGKILL")},2*a);d.unref?.(),e.unref?.();let f=new Promise(b=>{let c=setTimeout(b,3*a);c.unref?.()});await Promise.race([b,f]),clearTimeout(d),clearTimeout(e)}}let o=["--no-session","--no-skills","--no-lsp"];async function p(a){let b=new n({cwd:(0,d.homedir)(),extraArgs:o,onExit:()=>{a.proc===b&&(a.proc=null)}});try{let a=await b.waitReady(6e4);await b.negotiateProtocol(a)}catch(a){throw b.dispose(),a}return b}function q(a,b=6e4){let c=function(){if(!globalThis.__ompUtilityRpcState){globalThis.__ompUtilityRpcState={proc:null,idleTimer:null,queue:Promise.resolve()};let a=()=>(function(){let a=globalThis.__ompUtilityRpcState;if(!a)return;a.idleTimer&&(clearTimeout(a.idleTimer),a.idleTimer=null);let b=a.proc;a.proc=null,b&&b.dispose()})();process.once("exit",a),process.once("SIGINT",a),process.once("SIGTERM",a)}return globalThis.__ompUtilityRpcState}(),d=c.queue.then(async()=>{c.idleTimer&&(clearTimeout(c.idleTimer),c.idleTimer=null);try{return c.proc&&c.proc.isAlive||(c.proc=await p(c)),await c.proc.sendCommand(a,b)}finally{c.idleTimer&&clearTimeout(c.idleTimer),c.idleTimer=setTimeout(()=>{c.idleTimer=null;let a=c.proc;c.proc=null,a&&a.dispose()},3e5),c.idleTimer.unref?.()}});return c.queue=d.then(()=>void 0,()=>void 0),d}},51671:(a,b,c)=>{c.d(b,{getOmpVersion:()=>n,resolveOmpBin:()=>m});var d=c(79646),e=c(29021),f=c(21820),g=c(33873);let h=null,i=0,j=null,k=0,l="win32"===process.platform?["omp.exe","omp.cmd","omp"]:["omp"];function m(){if(h&&(0,e.existsSync)(h))return h;if(h=null,Date.now()-i<3e4)return null;let a=function(){let a=process.env.OMP_WEB_OMP_BIN;if(a)return(0,e.existsSync)(a)?a:null;for(let a of(process.env.PATH??"").split(g.delimiter))if(a)for(let b of l){let c=(0,g.join)(a,b);if((0,e.existsSync)(c))return c}for(let a of["/opt/homebrew/bin","/usr/local/bin",(0,g.join)((0,f.homedir)(),".bun","bin"),(0,g.join)((0,f.homedir)(),".local","bin")])for(let b of l){let c=(0,g.join)(a,b);if((0,e.existsSync)(c))return c}return null}();return a?(h=a,i=0,a):(i=Date.now(),null)}async function n(){if(j)return j;if(Date.now()-k<3e4)return null;let a=m();if(!a)return k=Date.now(),null;try{let b=(await new Promise((b,c)=>{(0,d.execFile)(a,["--version"],{timeout:1e4,windowsHide:!0},(a,d)=>{a?c(a):b(d)})})).trim();if(b)return j=b,k=0,b}catch{}return k=Date.now(),null}}};
5
+ `)}return g}(a,this.protocolVersion,`web-${this.nextChunkId++}`)}catch(a){b(a instanceof Error?a:Error(String(a)));return}this.writeQueue=this.writeQueue.then(()=>new Promise(a=>{if(this.exited||this.child.stdin.destroyed){b(Error("RPC process is not running")),a();return}let d=0,e=f=>{if(f||d===c.length){b(f??null),a();return}this.child.stdin.write(c[d++],e)};e()}))}handleResponse(a){let b=a.id,c=b?this.pending.get(b):void 0;if(!c||!b){for(let b of this.frameListeners)try{b(a)}catch{}return}this.pending.delete(b),c.timer&&clearTimeout(c.timer),a.success?c.resolve(a.data):c.reject(new m(a.command,a.error??"RPC command failed",a.code))}async dispose(a=5e3){if(this.exited)return;let b=new Promise(a=>{if(this.exited)return a();this.child.once("exit",()=>a())});try{this.child.stdin.end()}catch{}let c=(a,b)=>{let c=this.child.pid;if(c){if("win32"===process.platform){let d=["/pid",String(c),"/t",...a?["/f"]:[]];this.spawnProcess("taskkill",d,{windowsHide:!0,stdio:"ignore"}).once("error",()=>{try{this.child.kill(b)}catch{}});return}try{process.kill(-c,b)}catch{try{this.child.kill(b)}catch{}}}},d=setTimeout(()=>{this.exited||c(!1,"SIGTERM")},a),e=setTimeout(()=>{this.exited||c(!0,"SIGKILL")},2*a);d.unref?.(),e.unref?.();let f=new Promise(b=>{let c=setTimeout(b,3*a);c.unref?.()});await Promise.race([b,f]),clearTimeout(d),clearTimeout(e)}}let p=["--no-session","--no-skills","--no-lsp"];async function q(a){let b=new o({cwd:(0,d.homedir)(),extraArgs:p,onExit:()=>{a.proc===b&&(a.proc=null)}});try{let a=await b.waitReady(6e4);await b.negotiateProtocol(a)}catch(a){throw b.dispose(),a}return b}function r(a,b=6e4){let c=function(){if(!globalThis.__ompUtilityRpcState){globalThis.__ompUtilityRpcState={proc:null,idleTimer:null,queue:Promise.resolve()};let a=()=>(function(){let a=globalThis.__ompUtilityRpcState;if(!a)return;a.idleTimer&&(clearTimeout(a.idleTimer),a.idleTimer=null);let b=a.proc;a.proc=null,b&&b.dispose()})();process.once("exit",a),process.once("SIGINT",a),process.once("SIGTERM",a)}return globalThis.__ompUtilityRpcState}(),d=c.queue.then(async()=>{c.idleTimer&&(clearTimeout(c.idleTimer),c.idleTimer=null);try{return c.proc&&c.proc.isAlive||(c.proc=await q(c)),await c.proc.sendCommand(a,b)}finally{c.idleTimer&&clearTimeout(c.idleTimer),c.idleTimer=setTimeout(()=>{c.idleTimer=null;let a=c.proc;c.proc=null,a&&a.dispose()},3e5),c.idleTimer.unref?.()}});return c.queue=d.then(()=>void 0,()=>void 0),d}},51671:(a,b,c)=>{c.d(b,{getOmpVersion:()=>n,resolveOmpBin:()=>m});var d=c(79646),e=c(29021),f=c(21820),g=c(33873);let h=null,i=0,j=null,k=0,l="win32"===process.platform?["omp.exe","omp.cmd","omp"]:["omp"];function m(){if(h&&(0,e.existsSync)(h))return h;if(h=null,Date.now()-i<3e4)return null;let a=function(){let a=process.env.OMP_WEB_OMP_BIN;if(a)return(0,e.existsSync)(a)?a:null;for(let a of(process.env.PATH??"").split(g.delimiter))if(a)for(let b of l){let c=(0,g.join)(a,b);if((0,e.existsSync)(c))return c}for(let a of["/opt/homebrew/bin","/usr/local/bin",(0,g.join)((0,f.homedir)(),".bun","bin"),(0,g.join)((0,f.homedir)(),".local","bin")])for(let b of l){let c=(0,g.join)(a,b);if((0,e.existsSync)(c))return c}return null}();return a?(h=a,i=0,a):(i=Date.now(),null)}async function n(){if(j)return j;if(Date.now()-k<3e4)return null;let a=m();if(!a)return k=Date.now(),null;try{let b=(await new Promise((b,c)=>{(0,d.execFile)(a,["--version"],{timeout:1e4,windowsHide:!0},(a,d)=>{a?c(a):b(d)})})).trim();if(b)return j=b,k=0,b}catch{}return k=Date.now(),null}}};
@@ -1,5 +1,5 @@
1
- "use strict";exports.id=3798,exports.ids=[3798],exports.modules={13798:(a,b,c)=>{c.d(b,{x:()=>l,X:()=>m});var d=c(79646),e=c(4984),f=c(87831),g=c(79588),h=c(20565);function i(a){return"number"==typeof a&&Number.isSafeInteger(a)}function j(a){return Buffer.byteLength(a,"utf8")+1}class k{push(a){if(!(0,h.u4)(a)||"rpc_chunk"!==a.type){if(this.pending)throw Error("RPC chunk sequence interrupted");if(!(0,h.u4)(a)||"string"!=typeof a.type)throw Error("RPC frame must be an object");return a}let{chunkId:b,index:c,count:d,byteLength:e}=a;if("string"!=typeof b||0===b.length||b.length>128||!i(c)||!i(d)||!i(e)||c<0||d<2||d>Math.ceil(256)||c>=d||e<1048576||e>0x4000000)throw Error("invalid RPC chunk metadata");let f=function(a){if("string"!=typeof a||0===a.length||!/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(a))throw Error("invalid RPC chunk data");let b=Buffer.from(a,"base64");if(b.toString("base64")!==a)throw Error("invalid RPC chunk data");return b}(a.data);if(f.byteLength>262144)throw Error("RPC chunk payload exceeds the transport limit");if(!this.pending){if(0!==c)throw Error("RPC chunk sequence must start at index 0");this.pending={chunkId:b,count:d,byteLength:e,nextIndex:0,chunks:[],receivedBytes:0}}let g=this.pending;if(g.chunkId!==b||g.count!==d||g.byteLength!==e||g.nextIndex!==c)throw Error("RPC chunk sequence mismatch");if(g.chunks.push(f),g.receivedBytes+=f.byteLength,g.nextIndex++,g.receivedBytes>g.byteLength)throw Error("RPC chunk sequence exceeds declared length");if(g.nextIndex<g.count)return;if(g.receivedBytes!==g.byteLength)throw Error("RPC chunk sequence length mismatch");this.pending=void 0;let j=JSON.parse(new TextDecoder("utf-8",{fatal:!0}).decode(Buffer.concat(g.chunks)));if(!(0,h.u4)(j)||"string"!=typeof j.type)throw Error("RPC frame must be an object");return j}}class l extends Error{constructor(a,b,c){super(b),this.name="RpcCommandError",this.command=a,this.code=c}}class m{constructor(a){let b,c;this.pending=new Map,this.frameListeners=new Set,this.nextId=1,this.stderrTail="",this.exited=!1,this.exitInfo=null,this.protocolVersion=1,this.nextChunkId=1,this.writeQueue=Promise.resolve();const h=a.dependencies?.resolveOmpBin??g.wS;this.spawnProcess=a.dependencies?.spawn??d.spawn;const i=h();if(!i)throw Error("omp binary not found. Install oh-my-pi or set OMP_WEB_OMP_BIN.");this.cwd=a.cwd,a.onFrame&&this.frameListeners.add(a.onFrame);const j=["--mode","rpc-ui","--cwd",a.cwd,...a.extraArgs??[]],l="win32"===process.platform&&/\.cmd$/i.test(i);this.child=this.spawnProcess(l?"cmd.exe":i,l?["/d","/s","/c",function(a,b){return[a,...b].map(a=>/\s/.test(a)?`"${a.replace(/"/g,'\\"')}"`:a).join(" ")}(i,j)]:j,{cwd:a.cwd,env:function(a,b=process.platform){let c={...a};for(let a of Object.keys(c))(function(a,b){let c="win32"===b?a.toUpperCase():a;return"PORT"===c||"NODE_ENV"===c||c.startsWith("NEXT_")})(a,b)&&delete c[a];return c}({...process.env,...(0,f.cS)(process.env.OMP_WEB_PROXY_URL||null),...a.env}),stdio:["pipe","pipe","pipe"],windowsHide:!0,detached:"win32"!==process.platform}),this.child.stdin.on("error",()=>{}),this.child.stdout.on("error",()=>{}),this.readyPromise=new Promise((a,d)=>{b=a,c=d}),this.readyPromise.catch(()=>{});const m=new k;(0,e.createInterface)({input:this.child.stdout,crlfDelay:1/0}).on("line",a=>{let c,d,e=a.trim();if(e){try{c=JSON.parse(e)}catch{return}try{if(c&&"object"==typeof c&&"rpc_chunk"===c.type&&2!==this.protocolVersion)throw Error("RPC chunk received before protocol negotiation");let a=m.push(c);if(!a)return;d=a}catch(a){this.stderrTail=(this.stderrTail+`
1
+ "use strict";exports.id=3798,exports.ids=[3798],exports.modules={13798:(a,b,c)=>{c.d(b,{xg:()=>l,XF:()=>n});var d=c(79646),e=c(4984),f=c(87831),g=c(79588),h=c(20565);function i(a){return"number"==typeof a&&Number.isSafeInteger(a)}function j(a){return Buffer.byteLength(a,"utf8")+1}class k{push(a){if(!(0,h.u4)(a)||"rpc_chunk"!==a.type){if(this.pending)throw Error("RPC chunk sequence interrupted");if(!(0,h.u4)(a)||"string"!=typeof a.type)throw Error("RPC frame must be an object");return a}let{chunkId:b,index:c,count:d,byteLength:e}=a;if("string"!=typeof b||0===b.length||b.length>128||!i(c)||!i(d)||!i(e)||c<0||d<2||d>Math.ceil(256)||c>=d||e<1048576||e>0x4000000)throw Error("invalid RPC chunk metadata");let f=function(a){if("string"!=typeof a||0===a.length||!/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(a))throw Error("invalid RPC chunk data");let b=Buffer.from(a,"base64");if(b.toString("base64")!==a)throw Error("invalid RPC chunk data");return b}(a.data);if(f.byteLength>262144)throw Error("RPC chunk payload exceeds the transport limit");if(!this.pending){if(0!==c)throw Error("RPC chunk sequence must start at index 0");this.pending={chunkId:b,count:d,byteLength:e,nextIndex:0,chunks:[],receivedBytes:0}}let g=this.pending;if(g.chunkId!==b||g.count!==d||g.byteLength!==e||g.nextIndex!==c)throw Error("RPC chunk sequence mismatch");if(g.chunks.push(f),g.receivedBytes+=f.byteLength,g.nextIndex++,g.receivedBytes>g.byteLength)throw Error("RPC chunk sequence exceeds declared length");if(g.nextIndex<g.count)return;if(g.receivedBytes!==g.byteLength)throw Error("RPC chunk sequence length mismatch");this.pending=void 0;let j=JSON.parse(new TextDecoder("utf-8",{fatal:!0}).decode(Buffer.concat(g.chunks)));if(!(0,h.u4)(j)||"string"!=typeof j.type)throw Error("RPC frame must be an object");return j}}class l extends Error{constructor(a,b,c){super(b),this.name="RpcCommandError",this.command=a,this.code=c}}class m extends Error{constructor(a,b,c){super(c??`RPC command ${a} timed out after ${b}ms`),this.name="RpcCommandTimeoutError",this.command=a,this.timeoutMs=b}}class n{constructor(a){let b,c;this.pending=new Map,this.frameListeners=new Set,this.nextId=1,this.stderrTail="",this.exited=!1,this.exitInfo=null,this.protocolVersion=1,this.nextChunkId=1,this.writeQueue=Promise.resolve();const h=a.dependencies?.resolveOmpBin??g.wS;this.spawnProcess=a.dependencies?.spawn??d.spawn;const i=h();if(!i)throw Error("omp binary not found. Install oh-my-pi or set OMP_WEB_OMP_BIN.");this.cwd=a.cwd,a.onFrame&&this.frameListeners.add(a.onFrame);const j=["--mode","rpc-ui","--cwd",a.cwd,...a.extraArgs??[]],l="win32"===process.platform&&/\.cmd$/i.test(i);this.child=this.spawnProcess(l?"cmd.exe":i,l?["/d","/s","/c",function(a,b){return[a,...b].map(a=>/\s/.test(a)?`"${a.replace(/"/g,'\\"')}"`:a).join(" ")}(i,j)]:j,{cwd:a.cwd,env:function(a,b=process.platform){let c={...a};for(let a of Object.keys(c))(function(a,b){let c="win32"===b?a.toUpperCase():a;return"PORT"===c||"NODE_ENV"===c||c.startsWith("NEXT_")})(a,b)&&delete c[a];return c}({...process.env,...(0,f.cS)(process.env.OMP_WEB_PROXY_URL||null),...a.env}),stdio:["pipe","pipe","pipe"],windowsHide:!0,detached:"win32"!==process.platform}),this.child.stdin.on("error",()=>{}),this.child.stdout.on("error",()=>{}),this.readyPromise=new Promise((a,d)=>{b=a,c=d}),this.readyPromise.catch(()=>{});const m=new k;(0,e.createInterface)({input:this.child.stdout,crlfDelay:1/0}).on("line",a=>{let c,d,e=a.trim();if(e){try{c=JSON.parse(e)}catch{return}try{if(c&&"object"==typeof c&&"rpc_chunk"===c.type&&2!==this.protocolVersion)throw Error("RPC chunk received before protocol negotiation");let a=m.push(c);if(!a)return;d=a}catch(a){this.stderrTail=(this.stderrTail+`
2
2
  RPC protocol error: ${a instanceof Error?a.message:String(a)}`).slice(-8192),this.dispose(0);return}if("ready"===d.type)return void b(d);if("response"===d.type)return void this.handleResponse(d);for(let a of this.frameListeners)try{a(d)}catch{}}}),this.child.stderr.on("data",a=>{this.stderrTail=(this.stderrTail+a.toString("utf8")).slice(-8192)});const n=(b,d)=>{if(this.exited)return;this.exited=!0,this.exitInfo={code:b,signal:d};let e=Error(`omp exited (code ${b??"null"}, signal ${d??"none"})${this.stderrTail?`: ${this.stderrTail.slice(-500)}`:""}`);for(let[,a]of(c(e),this.pending))a.timer&&clearTimeout(a.timer),a.reject(e);this.pending.clear(),a.onExit?.({code:b,signal:d,stderrTail:this.stderrTail})};this.child.on("exit",n),this.child.on("error",a=>{this.stderrTail=(this.stderrTail+`
3
- spawn error: ${a.message}`).slice(-8192),n(null,null)})}get isAlive(){return!this.exited}get exitDetails(){return this.exitInfo?{...this.exitInfo,stderrTail:this.stderrTail}:null}waitReady(a=6e4){let b=new Promise((b,c)=>{let d=setTimeout(()=>c(Error(`omp RPC ready timeout after ${a}ms`)),a);d.unref?.(),this.readyPromise.finally(()=>clearTimeout(d)).catch(()=>{})});return Promise.race([this.readyPromise,b])}async negotiateProtocol(a){if(!(Array.isArray(a.supportedProtocolVersions)?a.supportedProtocolVersions:[]).includes(2))return this.protocolVersion;let b=await this.sendCommand({type:"negotiate_protocol",protocolVersion:2});if(b?.protocolVersion!==2)throw Error("OMP rejected RPC protocol v2 negotiation");return this.protocolVersion=2,this.protocolVersion}onFrame(a){return this.frameListeners.add(a),()=>this.frameListeners.delete(a)}sendCommand(a,b){if(this.exited)return Promise.reject(Error("omp RPC process has exited"));let c=`w${this.nextId++}`;return new Promise((d,e)=>{let f={command:a.type,resolve:d,reject:e};b&&b>0&&(f.timer=setTimeout(()=>{this.pending.get(c)===f&&(this.pending.delete(c),e(Error(`RPC command ${a.type} timed out after ${b}ms`)))},b),f.timer.unref?.()),this.pending.set(c,f),this.writeFrame({...a,id:c},a=>{if(a){let b=this.pending.get(c);b&&(this.pending.delete(c),b.timer&&clearTimeout(b.timer),e(a))}})})}sendFrame(a){this.exited||this.writeFrame(a,()=>{})}writeFrame(a,b){let c;try{c=function(a,b,c){let d=JSON.stringify(a);if(1048576>=j(d))return[`${d}
3
+ spawn error: ${a.message}`).slice(-8192),n(null,null)})}get isAlive(){return!this.exited}get exitDetails(){return this.exitInfo?{...this.exitInfo,stderrTail:this.stderrTail}:null}waitReady(a=6e4){let b=new Promise((b,c)=>{let d=setTimeout(()=>c(Error(`omp RPC ready timeout after ${a}ms`)),a);d.unref?.(),this.readyPromise.finally(()=>clearTimeout(d)).catch(()=>{})});return Promise.race([this.readyPromise,b])}async negotiateProtocol(a){if(!(Array.isArray(a.supportedProtocolVersions)?a.supportedProtocolVersions:[]).includes(2))return this.protocolVersion;let b=await this.sendCommand({type:"negotiate_protocol",protocolVersion:2});if(b?.protocolVersion!==2)throw Error("OMP rejected RPC protocol v2 negotiation");return this.protocolVersion=2,this.protocolVersion}onFrame(a){return this.frameListeners.add(a),()=>this.frameListeners.delete(a)}sendCommand(a,b){if(this.exited)return Promise.reject(Error("omp RPC process has exited"));let c=`w${this.nextId++}`;return new Promise((d,e)=>{let f={command:a.type,resolve:d,reject:e};b&&b>0&&(f.timer=setTimeout(()=>{this.pending.get(c)===f&&(this.pending.delete(c),e(new m(a.type,b)))},b),f.timer.unref?.()),this.pending.set(c,f),this.writeFrame({...a,id:c},a=>{if(a){let b=this.pending.get(c);b&&(this.pending.delete(c),b.timer&&clearTimeout(b.timer),e(a))}})})}sendFrame(a){this.exited||this.writeFrame(a,()=>{})}writeFrame(a,b){let c;try{c=function(a,b,c){let d=JSON.stringify(a);if(1048576>=j(d))return[`${d}
4
4
  `];if(1===b)throw Error("RPC frame exceeds the v1 transport limit");let e=Buffer.from(d,"utf8");if(e.byteLength>0x4000000)throw Error("RPC frame exceeds the v2 reassembly limit");let f=Math.ceil(e.byteLength/262144),g=[];for(let a=0;a<f;a++){let b=JSON.stringify({type:"rpc_chunk",chunkId:c,index:a,count:f,byteLength:e.byteLength,data:e.subarray(262144*a,(a+1)*262144).toString("base64")});if(j(b)>1048576)throw Error("RPC chunk exceeds the transport limit");g.push(`${b}
5
5
  `)}return g}(a,this.protocolVersion,`web-${this.nextChunkId++}`)}catch(a){b(a instanceof Error?a:Error(String(a)));return}this.writeQueue=this.writeQueue.then(()=>new Promise(a=>{if(this.exited||this.child.stdin.destroyed){b(Error("RPC process is not running")),a();return}let d=0,e=f=>{if(f||d===c.length){b(f??null),a();return}this.child.stdin.write(c[d++],e)};e()}))}handleResponse(a){let b=a.id,c=b?this.pending.get(b):void 0;if(!c||!b){for(let b of this.frameListeners)try{b(a)}catch{}return}this.pending.delete(b),c.timer&&clearTimeout(c.timer),a.success?c.resolve(a.data):c.reject(new l(a.command,a.error??"RPC command failed",a.code))}async dispose(a=5e3){if(this.exited)return;let b=new Promise(a=>{if(this.exited)return a();this.child.once("exit",()=>a())});try{this.child.stdin.end()}catch{}let c=(a,b)=>{let c=this.child.pid;if(c){if("win32"===process.platform){let d=["/pid",String(c),"/t",...a?["/f"]:[]];this.spawnProcess("taskkill",d,{windowsHide:!0,stdio:"ignore"}).once("error",()=>{try{this.child.kill(b)}catch{}});return}try{process.kill(-c,b)}catch{try{this.child.kill(b)}catch{}}}},d=setTimeout(()=>{this.exited||c(!1,"SIGTERM")},a),e=setTimeout(()=>{this.exited||c(!0,"SIGKILL")},2*a);d.unref?.(),e.unref?.();let f=new Promise(b=>{let c=setTimeout(b,3*a);c.unref?.()});await Promise.race([b,f]),clearTimeout(d),clearTimeout(e)}}},79588:(a,b,c)=>{c.d(b,{F1:()=>n,wS:()=>m});var d=c(79646),e=c(29021),f=c(21820),g=c(33873);let h=null,i=0,j=null,k=0,l="win32"===process.platform?["omp.exe","omp.cmd","omp"]:["omp"];function m(){if(h&&(0,e.existsSync)(h))return h;if(h=null,Date.now()-i<3e4)return null;let a=function(){let a=process.env.OMP_WEB_OMP_BIN;if(a)return(0,e.existsSync)(a)?a:null;for(let a of(process.env.PATH??"").split(g.delimiter))if(a)for(let b of l){let c=(0,g.join)(a,b);if((0,e.existsSync)(c))return c}for(let a of["/opt/homebrew/bin","/usr/local/bin",(0,g.join)((0,f.homedir)(),".bun","bin"),(0,g.join)((0,f.homedir)(),".local","bin")])for(let b of l){let c=(0,g.join)(a,b);if((0,e.existsSync)(c))return c}return null}();return a?(h=a,i=0,a):(i=Date.now(),null)}async function n(){if(j)return j;if(Date.now()-k<3e4)return null;let a=m();if(!a)return k=Date.now(),null;try{let b=(await new Promise((b,c)=>{(0,d.execFile)(a,["--version"],{timeout:1e4,windowsHide:!0},(a,d)=>{a?c(a):b(d)})})).trim();if(b)return j=b,k=0,b}catch{}return k=Date.now(),null}},87831:(a,b,c)=>{c.d(b,{Cn:()=>o,cS:()=>q,li:()=>l,qM:()=>p,qt:()=>m});var d=c(79646),e=c(29021),f=c(21820),g=c(33873),h=c(91645),i=c.n(h);let j=(0,g.join)((0,f.homedir)(),".omp","agent","proxy.json"),k=[7890,7897,1087,1080,8118,8888];function l(){try{let a=JSON.parse((0,e.readFileSync)(j,"utf8"));if("auto"===a.mode||"manual"===a.mode||"off"===a.mode)return{mode:a.mode,url:"string"==typeof a.url?a.url:void 0}}catch{}return{mode:"auto"}}function m(a){(0,e.mkdirSync)((0,g.dirname)(j),{recursive:!0});let b=`${j}.tmp-${process.pid}`;(0,e.writeFileSync)(b,JSON.stringify(a,null,2)+"\n"),(0,e.renameSync)(b,j)}function n(a,b="127.0.0.1",c=400){return new Promise(d=>{let e=new(i()).Socket,f=a=>{e.destroy(),d(a)};e.setTimeout(c),e.once("connect",()=>f(!0)),e.once("timeout",()=>f(!1)),e.once("error",()=>f(!1)),e.connect(a,b)})}async function o(){let a=[];for(let b of function(){let a=process.platform;try{if("darwin"===a){let a=(0,d.execFileSync)("scutil",["--proxy"],{encoding:"utf8",timeout:3e3}),b=[],c=/HTTPProxy\s*:\s*(\S+)/.exec(a)?.[1],e=/HTTPPort\s*:\s*(\d+)/.exec(a)?.[1],f=/HTTPSProxy\s*:\s*(\S+)/.exec(a)?.[1],g=/HTTPSPort\s*:\s*(\d+)/.exec(a)?.[1];return c&&e&&b.push({url:`http://${c}:${e}`,source:"system-http"}),f&&g&&b.push({url:`http://${f}:${g}`,source:"system-https"}),b}if("win32"===a){let a=(0,d.execFileSync)("reg",["query","HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings"],{encoding:"utf8",timeout:3e3}),b=/ProxyEnable\s+REG_DWORD\s+0x(\d+)/i.exec(a)?.[1];if("1"===b){let b=/ProxyServer\s+REG_SZ\s+(\S+)/i.exec(a)?.[1];if(b)return[{url:/^https?:\/\//i.test(b)?b:`http://${b}`,source:"system-proxy"}]}return[]}if("linux"===a){let a=[];for(let b of["HTTPS_PROXY","https_proxy","HTTP_PROXY","http_proxy"]){let c=process.env[b];if(c){let b=/^https?:\/\//i.test(c)?c:`http://${c}`;a.some(a=>a.url===b)||a.push({url:b,source:"env"})}}try{let b=(0,d.execFileSync)("gsettings",["get","org.gnome.system.proxy","mode"],{encoding:"utf8",timeout:2e3}).trim();if("'manual'"===b){let b=(0,d.execFileSync)("gsettings",["get","org.gnome.system.proxy.http","host"],{encoding:"utf8",timeout:2e3}).trim().replace(/^'|'$/g,""),c=(0,d.execFileSync)("gsettings",["get","org.gnome.system.proxy.http","port"],{encoding:"utf8",timeout:2e3}).trim();b&&c&&a.push({url:`http://${b}:${c}`,source:"gnome"})}}catch{}return a}}catch{}return[]}())await n(Number(new URL(b.url).port))&&a.push(b);for(let b of k)if(await n(b)){let c=`http://127.0.0.1:${b}`;a.some(a=>a.url===c)||a.push({url:c,source:"local-port"})}let b=l(),c=!1;if("manual"===b.mode&&b.url)try{let a=Number(new URL(b.url).port);c=await n(a,new URL(b.url).hostname)}catch{c=!1}let e=a[0]?.url??(c&&b.url?b.url:null);return{candidates:a,recommended:e,manualReachable:c}}async function p(){let a=l();if("off"===a.mode)return null;if("manual"===a.mode){if(!a.url)return null;try{let b=Number(new URL(a.url).port);return await n(b,new URL(a.url).hostname)?a.url:null}catch{return null}}return(await o()).recommended}function q(a){return a?{HTTP_PROXY:a,HTTPS_PROXY:a,ALL_PROXY:a,http_proxy:a,https_proxy:a,all_proxy:a}:{}}}};
@@ -0,0 +1 @@
1
+ exports.id=4791,exports.ids=[4791],exports.modules={20565:(a,b,c)=>{"use strict";function d(a){return"object"==typeof a&&null!==a&&!Array.isArray(a)}function e(a){return"string"==typeof a?a:void 0}function f(a){return"number"==typeof a&&Number.isFinite(a)?a:void 0}c.d(b,{i:()=>f,oJ:()=>e,u4:()=>d})},43851:(a,b,c)=>{"use strict";c.d(b,{gN:()=>m});var d=c(33873),e=c(55511),f=c(29021),g=c(20565);let h={tokenTtlMs:6e5,offlineAfterMs:25e3,maxDevices:4,idleExpireMs:6048e5,cookieName:"dsh_pair",requirePairingForLan:!0,autoTunnel:!1,mobileEnterToSend:!1},i={now:()=>Date.now(),randomToken:()=>(0,e.randomBytes)(16).toString("hex")};class j{constructor(a={},b=i,c=null){this.tokens=new Map,this.devices=new Map,this.persistPath=null,this.stopped=!1,this.tokenSerial=0,this.config={...h,...a},this.store=b,this.persistPath=c,c&&(0,f.existsSync)(c)&&this.load()}load(){try{var a;let b,c=JSON.parse((0,f.readFileSync)(this.persistPath,"utf8"));if(!(0,g.u4)(c))return;if((0,g.u4)(c.config)&&(this.config={...this.config,...(a=c.config,b={},"number"==typeof a.tokenTtlMs&&(b.tokenTtlMs=a.tokenTtlMs),"number"==typeof a.offlineAfterMs&&(b.offlineAfterMs=a.offlineAfterMs),"number"==typeof a.maxDevices&&(b.maxDevices=a.maxDevices),"number"==typeof a.idleExpireMs&&(b.idleExpireMs=a.idleExpireMs),"string"==typeof a.cookieName&&(b.cookieName=a.cookieName),"boolean"==typeof a.requirePairingForLan&&(b.requirePairingForLan=a.requirePairingForLan),"string"==typeof a.publicUrl&&(b.publicUrl=a.publicUrl),"boolean"==typeof a.autoTunnel&&(b.autoTunnel=a.autoTunnel),"boolean"==typeof a.mobileEnterToSend&&(b.mobileEnterToSend=a.mobileEnterToSend),b)}),(0,g.u4)(c.token)&&"string"==typeof c.token.value&&"number"==typeof c.token.expiresAt&&c.token.expiresAt>this.store.now()&&this.tokens.set(c.token.value,c.token.expiresAt),Array.isArray(c.devices))for(let a of c.devices){if(!(0,g.u4)(a)||"string"!=typeof a.id)continue;let b={id:a.id,name:"string"==typeof a.name?a.name:"Paired device",pairedAt:"number"==typeof a.pairedAt?a.pairedAt:this.store.now(),lastActiveAt:"number"==typeof a.lastActiveAt?a.lastActiveAt:this.store.now(),..."string"==typeof a.userAgent?{userAgent:a.userAgent}:{},mobile:!0===a.mobile};this.devices.set(b.id,b)}this.sweep()}catch{}}persist(){if(this.persistPath)try{(0,f.mkdirSync)((0,d.dirname)(this.persistPath),{recursive:!0});let a=`${this.persistPath}.tmp`;(0,f.writeFileSync)(a,JSON.stringify({config:this.config,token:this.activeToken(),devices:[...this.devices.values()]})),(0,f.renameSync)(a,this.persistPath)}catch{}}updateConfig(a){return this.config={...this.config,...a},this.persist(),this.config}getConfig(){return{...this.config}}issue(){let a=this.store.now(),b=`${this.store.randomToken()}${this.tokenSerial++}`,c=a+this.config.tokenTtlMs;return this.tokens.clear(),this.tokens.set(b,c),this.persist(),{token:b,expiresAt:c}}accept(a,b,c){let d,e=this.store.now(),f=this.tokens.get(a);if(void 0===f||f<e)return null;this.tokens.delete(a);let g={id:this.store.randomToken(),name:(d=(b??"").slice(0,180),c?"Phone":/Windows/i.test(d)?"Windows PC":/Macintosh|Mac OS/i.test(d)?"Mac":/Linux/i.test(d)?"Linux PC":/iPhone|iPad|Android/i.test(d)?"Phone":"Paired device"),pairedAt:e,lastActiveAt:e,...b?{userAgent:b.slice(0,180)}:{},mobile:c};return this.devices.set(g.id,g),this.sweepDevices(e),this.persist(),g}touch(a){let b=this.devices.get(a);return!!b&&(b.lastActiveAt=this.store.now(),this.sweepDevices(b.lastActiveAt),this.devices.has(a))}revoke(a){let b=this.devices.delete(a);return b&&this.persist(),b}stop(){this.tokens.clear(),this.devices.clear(),this.stopped=!0,this.persist()}isStopped(){return this.stopped}getDevice(a){let b=this.devices.get(a);return b?this.store.now()-b.lastActiveAt>this.config.idleExpireMs?(this.devices.delete(a),this.persist(),null):{...b}:null}listDevices(){return this.sweep(),[...this.devices.values()].map(a=>({...a}))}isOnline(a){return this.store.now()-a.lastActiveAt<=this.config.offlineAfterMs}activeToken(){let a=this.store.now();for(let[b,c]of this.tokens){if(c>=a)return{value:b,expiresAt:c};this.tokens.delete(b)}return null}sweep(){let a=this.store.now();for(let[b,c]of(this.sweepDevices(a),this.tokens))c<a&&this.tokens.delete(b)}sweepDevices(a){let b=[];for(let[c,d]of this.devices)a-d.lastActiveAt>this.config.idleExpireMs&&b.push(c);for(let a of b)this.devices.delete(a);if(this.devices.size>this.config.maxDevices){let a=[...this.devices.values()].sort((a,b)=>a.lastActiveAt-b.lastActiveAt);for(let b of a.slice(0,a.length-this.config.maxDevices))this.devices.delete(b.id)}}}var k=c(85887);let l="__ompWebPairingService__";function m(){let a=globalThis;return a[l]||(a[l]=new j({},void 0,(0,d.join)((0,k.$M)(),"remote-pairing.json"))),a[l]}},78335:()=>{},85887:(a,b,c)=>{"use strict";c.d(b,{$M:()=>l,OK:()=>r,Pp:()=>w,Ym:()=>x,_8:()=>u,fL:()=>v,ny:()=>o,pA:()=>q,tE:()=>n,yG:()=>p});var d=c(29021),e=c(21820),f=c(33873);let g=/^[a-z0-9][a-z0-9._-]{0,63}$/,h=/^(?:CON|PRN|AUX|NUL|COM[0-9]|LPT[0-9])(?:\..*)?$/i;function i(a){let b=a?.trim();if(b&&"default"!==b){if("."===b||".."===b||b.endsWith(".")||!g.test(b)||h.test(b))throw Error(`Invalid OMP profile "${a}". Profile names must match ${g.source}, cannot be "." or "..", cannot end with ".", and cannot be a Windows reserved device name (CON, PRN, AUX, NUL, COM0-9, LPT0-9, or any of those with an extension).`);return b}}function j(){return void 0!==process.env.OMP_PROFILE?i(process.env.OMP_PROFILE):i(process.env.PI_PROFILE)}function k(){let a=f.join((0,e.homedir)(),process.env.PI_CONFIG_DIR||".omp"),b=j();return b?f.join(a,"profiles",b):a}function l(){let a=j(),b=process.env.PI_CODING_AGENT_DIR;return b&&!a?f.resolve(b):f.join(k(),"agent")}function m(a){let b=function(){let a,b;if("linux"!==process.platform&&"darwin"!==process.platform||(a=j(),(b=process.env.PI_CODING_AGENT_DIR)&&!a&&f.resolve(b)!==f.join(k(),"agent")))return;let c=process.env.XDG_DATA_HOME;if(c)try{let a=f.join(c,"omp"),b=j();if(b){let c=f.join(a,"profiles",b);return(0,d.existsSync)(c)?c:void 0}return(0,d.existsSync)(a)?a:void 0}catch{return}}();return f.join(b??l(),a)}function n(){return m("sessions")}function o(){return f.join(f.dirname(n()),"archive","sessions")}function p(){return m("blobs")}function q(){let a=l(),b=f.join(a,"config.yml");if((0,d.existsSync)(b))return b;let c=f.join(a,"config.yaml");return(0,d.existsSync)(c)?c:b}function r(){let a=l(),b=f.join(a,"models.yml");if((0,d.existsSync)(b))return b;let c=f.join(a,"models.yaml");return(0,d.existsSync)(c)?c:b}function s(a){try{return d.realpathSync.native(a)}catch{return a}}function t(a,b){let c=b.replace(/[/\\:]/g,"-");return c?a.endsWith("-")?`${a}${c}`:`${a}-${c}`:a}function u(a){let b,c=s(f.resolve(a)),d=s((0,e.homedir)()),g=s((0,e.tmpdir)()),h=f.relative(d,c),i=f.relative(g,c);return""!==h&&(h.startsWith("..")||f.isAbsolute(h))?""!==i&&(i.startsWith("..")||f.isAbsolute(i))?(b=f.resolve(c),`--${b.replace(/^[/\\]/,"").replace(/[/\\:]/g,"-")}--`):t("-tmp",i):t("-",h)}function v(){return f.join(l(),"agents")}function w(a){let b=f.resolve(a),c=(0,e.homedir)();for(;;){let a=f.join(b,".omp","agents");try{if((0,d.statSync)(a).isDirectory())return a}catch{}if((0,d.existsSync)(f.join(b,".git")))return a;if(b===c)break;let e=f.dirname(b);if(e===b)break;b=e}return f.join(f.resolve(a),".omp","agents")}function x(){return f.join((0,e.tmpdir)(),"omp-web-bundled-agents")}},96487:()=>{}};