ompgui 0.6.5 → 0.7.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 (332) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/app-path-routes-manifest.json +10 -5
  3. package/.next/build-manifest.json +3 -3
  4. package/.next/prerender-manifest.json +31 -3
  5. package/.next/react-loadable-manifest.json +12 -12
  6. package/.next/required-server-files.js +2 -2
  7. package/.next/required-server-files.json +2 -2
  8. package/.next/routes-manifest.json +34 -2
  9. package/.next/server/app/_global-error/page.js +2 -2
  10. package/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  11. package/.next/server/app/_global-error.html +1 -1
  12. package/.next/server/app/_global-error.rsc +2 -2
  13. package/.next/server/app/_global-error.segments/_full.segment.rsc +2 -2
  14. package/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +2 -2
  15. package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  16. package/.next/server/app/_not-found/page.js +1 -1
  17. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  18. package/.next/server/app/_not-found.html +1 -1
  19. package/.next/server/app/_not-found.rsc +3 -3
  20. package/.next/server/app/_not-found.segments/_full.segment.rsc +3 -3
  21. package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +3 -3
  22. package/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  23. package/.next/server/app/api/agent/[id]/bash-output/route.js +1 -1
  24. package/.next/server/app/api/agent/[id]/events/route.js +2 -2
  25. package/.next/server/app/api/agent/[id]/events/route.js.nft.json +1 -1
  26. package/.next/server/app/api/agent/[id]/route.js +1 -1
  27. package/.next/server/app/api/agent/[id]/route.js.nft.json +1 -1
  28. package/.next/server/app/api/agent/new/route.js +1 -1
  29. package/.next/server/app/api/agent/new/route.js.nft.json +1 -1
  30. package/.next/server/app/api/agent/running/events/route.js +2 -2
  31. package/.next/server/app/api/agent/running/events/route.js.nft.json +1 -1
  32. package/.next/server/app/api/agents/[name]/route.js +1 -1
  33. package/.next/server/app/api/agents/route.js +1 -1
  34. package/.next/server/app/api/agents/unpack/route.js +1 -1
  35. package/.next/server/app/api/app-update/route.js +1 -1
  36. package/.next/server/app/api/auth/all-providers/route.js +1 -1
  37. package/.next/server/app/api/auth/api-key/[provider]/route.js +1 -1
  38. package/.next/server/app/api/auth/login/[provider]/route.js +1 -1
  39. package/.next/server/app/api/auth/logout/[provider]/route.js +1 -1
  40. package/.next/server/app/api/auth/providers/route.js +1 -1
  41. package/.next/server/app/api/cwd/browse/route.js +1 -1
  42. package/.next/server/app/api/cwd/validate/route.js +2 -1
  43. package/.next/server/app/api/default-cwd/route.js +1 -1
  44. package/.next/server/app/api/file-index/route.js +1 -1
  45. package/.next/server/app/api/files/[...path]/route.js +5 -5
  46. package/.next/server/app/api/files/[...path]/route.js.nft.json +1 -1
  47. package/.next/server/app/api/git/diff/route.js +2 -2
  48. package/.next/server/app/api/git/status/route.js +1 -1
  49. package/.next/server/app/api/home/route.js +1 -1
  50. package/.next/server/app/api/mcp/route.js +3 -3
  51. package/.next/server/app/api/mcp/route.js.nft.json +1 -1
  52. package/.next/server/app/api/model-roles/route.js +1 -1
  53. package/.next/server/app/api/models/route.js +1 -1
  54. package/.next/server/app/api/models-config/catalog/route.js +1 -1
  55. package/.next/server/app/api/models-config/route.js +1 -1
  56. package/.next/server/app/api/models-config/test/route.js +1 -1
  57. package/.next/server/app/api/omp-settings/route.js +1 -1
  58. package/.next/server/app/api/omp-update/route.js +1 -1
  59. package/.next/server/app/api/omp-update/route.js.nft.json +1 -1
  60. package/.next/server/app/api/omp-version/route.js +1 -1
  61. package/.next/server/app/api/plugins/route.js +1 -1
  62. package/.next/server/app/api/projects/route.js +2 -2
  63. package/.next/server/app/api/providers/enable/route.js +1 -1
  64. package/.next/server/app/api/relay/devices/[id]/route.js +1 -0
  65. package/.next/server/app/api/relay/devices/[id]/route.js.nft.json +1 -0
  66. package/.next/server/app/api/relay/devices/[id]/route_client-reference-manifest.js +1 -0
  67. package/.next/server/app/api/relay/devices/route.js +1 -0
  68. package/.next/server/app/api/relay/devices/route.js.nft.json +1 -0
  69. package/.next/server/app/api/relay/devices/route_client-reference-manifest.js +1 -0
  70. package/.next/server/app/api/relay/pair/route.js +1 -0
  71. package/.next/server/app/api/relay/pair/route.js.nft.json +1 -0
  72. package/.next/server/app/api/relay/pair/route_client-reference-manifest.js +1 -0
  73. package/.next/server/app/api/sessions/[id]/archive/route.js +1 -1
  74. package/.next/server/app/api/sessions/[id]/archive/route.js.nft.json +1 -1
  75. package/.next/server/app/api/sessions/[id]/auto-name/route.js +1 -1
  76. package/.next/server/app/api/sessions/[id]/auto-name/route.js.nft.json +1 -1
  77. package/.next/server/app/api/sessions/[id]/context/route.js +1 -1
  78. package/.next/server/app/api/sessions/[id]/entries/[entryId]/media/route.js +1 -1
  79. package/.next/server/app/api/sessions/[id]/entries/[entryId]/thinking/route.js +1 -1
  80. package/.next/server/app/api/sessions/[id]/export/route.js +1 -1
  81. package/.next/server/app/api/sessions/[id]/route.js +1 -1
  82. package/.next/server/app/api/sessions/[id]/route.js.nft.json +1 -1
  83. package/.next/server/app/api/sessions/[id]/state/route.js +1 -1
  84. package/.next/server/app/api/sessions/[id]/state/route.js.nft.json +1 -1
  85. package/.next/server/app/api/sessions/[id]/subagents/[subagentId]/route.js +1 -1
  86. package/.next/server/app/api/sessions/[id]/subagents/route.js +1 -1
  87. package/.next/server/app/api/sessions/[id]/subagents/route.js.nft.json +1 -1
  88. package/.next/server/app/api/sessions/archive/route.js +1 -1
  89. package/.next/server/app/api/sessions/import/route.js +1 -1
  90. package/.next/server/app/api/sessions/route.js +1 -1
  91. package/.next/server/app/api/sessions/route.js.nft.json +1 -1
  92. package/.next/server/app/api/skills/check/route.js +1 -1
  93. package/.next/server/app/api/skills/check/route.js.nft.json +1 -1
  94. package/.next/server/app/api/skills/install/route.js +1 -1
  95. package/.next/server/app/api/skills/route.js +2 -2
  96. package/.next/server/app/api/skills/search/route.js +1 -1
  97. package/.next/server/app/api/skills/update/route.js +1 -1
  98. package/.next/server/app/api/skills/update/route.js.nft.json +1 -1
  99. package/.next/server/app/api/usage/route.js +1 -1
  100. package/.next/server/app/api/web-auth/session/route.js +1 -1
  101. package/.next/server/app/api/worktrees/route.js +1 -1
  102. package/.next/server/app/apple-icon.png/route.js +1 -1
  103. package/.next/server/app/favicon.ico/route.js +1 -1
  104. package/.next/server/app/icon.svg/route.js +1 -1
  105. package/.next/server/app/index.html +1 -1
  106. package/.next/server/app/index.rsc +4 -4
  107. package/.next/server/app/index.segments/__PAGE__.segment.rsc +4 -4
  108. package/.next/server/app/index.segments/_full.segment.rsc +4 -4
  109. package/.next/server/app/index.segments/_tree.segment.rsc +2 -2
  110. package/.next/server/app/login/page.js +1 -1
  111. package/.next/server/app/login/page.js.nft.json +1 -1
  112. package/.next/server/app/login/page_client-reference-manifest.js +1 -1
  113. package/.next/server/app/login.html +1 -1
  114. package/.next/server/app/login.rsc +4 -4
  115. package/.next/server/app/login.segments/_full.segment.rsc +4 -4
  116. package/.next/server/app/login.segments/_tree.segment.rsc +2 -2
  117. package/.next/server/app/login.segments/login/__PAGE__.segment.rsc +4 -4
  118. package/.next/server/app/manifest.webmanifest/route.js +2 -2
  119. package/.next/server/app/page.js +2 -2
  120. package/.next/server/app/page.js.nft.json +1 -1
  121. package/.next/server/app/page_client-reference-manifest.js +1 -1
  122. package/.next/server/app/pair/page.js +1 -0
  123. package/.next/server/app/pair/page.js.nft.json +1 -0
  124. package/.next/server/app/pair/page_client-reference-manifest.js +1 -0
  125. package/.next/server/app/pair.html +1 -0
  126. package/.next/server/app/pair.meta +26 -0
  127. package/.next/server/app/pair.rsc +23 -0
  128. package/.next/server/app/pair.segments/_full.segment.rsc +23 -0
  129. package/.next/server/app/pair.segments/_tree.segment.rsc +4 -0
  130. package/.next/server/app/pair.segments/pair/__PAGE__.segment.rsc +25 -0
  131. package/.next/server/app/relay/route.js +1 -0
  132. package/.next/server/app/relay/route.js.nft.json +1 -0
  133. package/.next/server/app/relay/route_client-reference-manifest.js +1 -0
  134. package/.next/server/app-paths-manifest.json +10 -5
  135. package/.next/server/chunks/1448.js +1 -1
  136. package/.next/server/chunks/1671.js +1 -1
  137. package/.next/server/chunks/2043.js +12 -0
  138. package/.next/server/chunks/2676.js +4 -0
  139. package/.next/server/chunks/2865.js +1 -1
  140. package/.next/server/chunks/3100.js +2 -2
  141. package/.next/server/chunks/3798.js +4 -5
  142. package/.next/server/chunks/6209.js +4 -4
  143. package/.next/server/chunks/{8353.js → 6332.js} +2 -2
  144. package/.next/server/chunks/7077.js +1 -0
  145. package/.next/server/chunks/714.js +1 -1
  146. package/.next/server/chunks/7779.js +1 -0
  147. package/.next/server/chunks/795.js +105 -0
  148. package/.next/server/chunks/8501.js +1 -1
  149. package/.next/server/chunks/8672.js +1 -0
  150. package/.next/server/chunks/8834.js +18 -0
  151. package/.next/server/chunks/9145.js +2 -0
  152. package/.next/server/chunks/933.js +1 -1
  153. package/.next/server/instrumentation.js +1 -1
  154. package/.next/server/instrumentation.js.nft.json +1 -1
  155. package/.next/server/middleware-build-manifest.js +1 -1
  156. package/.next/server/middleware-react-loadable-manifest.js +1 -1
  157. package/.next/server/middleware.js +5 -5
  158. package/.next/server/pages/404.html +1 -1
  159. package/.next/server/pages/500.html +1 -1
  160. package/.next/server/prefetch-hints.json +14 -0
  161. package/.next/server/server-reference-manifest.json +1 -1
  162. package/.next/static/QFUZ5E_wgec_DUeAoDxrb/_buildManifest.js +1 -0
  163. package/.next/static/chunks/1012.2a9e89fd82a08863.js +17 -0
  164. package/.next/static/chunks/1108.1f1e4661b6e402fb.js +1 -0
  165. package/.next/static/chunks/{2201.46326eb058826eb2.js → 2201.e6bbfc26ce87920c.js} +1 -1
  166. package/.next/static/chunks/3065-24b6f2111fc740ea.js +1 -0
  167. package/.next/static/chunks/{3274.2a04ea2716225057.js → 3274.4cdcf3a52b884856.js} +1 -1
  168. package/.next/static/chunks/4315-bd1069a88334f3a3.js +1 -0
  169. package/.next/static/chunks/484.761e1ff01f663fb2.js +1 -0
  170. package/.next/static/chunks/5658.0fe2642c815aea9a.js +1 -0
  171. package/.next/static/chunks/{7488.1403755f69bda581.js → 7488.42415d6f1b86c86b.js} +1 -1
  172. package/.next/static/chunks/9090-6ce028ffeafe2aee.js +1 -0
  173. package/.next/static/chunks/9448.b6c5eb8f1356d5fd.js +2 -0
  174. package/.next/static/chunks/9668.b62ea9e45077f781.js +1 -0
  175. package/.next/static/chunks/app/_global-error/page-2900441d61e06609.js +1 -0
  176. package/.next/static/chunks/app/api/agent/[id]/bash-output/route-2900441d61e06609.js +1 -0
  177. package/.next/static/chunks/app/api/agent/[id]/events/route-2900441d61e06609.js +1 -0
  178. package/.next/static/chunks/app/api/agent/[id]/route-2900441d61e06609.js +1 -0
  179. package/.next/static/chunks/app/api/agent/new/route-2900441d61e06609.js +1 -0
  180. package/.next/static/chunks/app/api/agent/running/events/route-2900441d61e06609.js +1 -0
  181. package/.next/static/chunks/app/api/agents/[name]/route-2900441d61e06609.js +1 -0
  182. package/.next/static/chunks/app/api/agents/route-2900441d61e06609.js +1 -0
  183. package/.next/static/chunks/app/api/agents/unpack/route-2900441d61e06609.js +1 -0
  184. package/.next/static/chunks/app/api/app-update/route-2900441d61e06609.js +1 -0
  185. package/.next/static/chunks/app/api/auth/all-providers/route-2900441d61e06609.js +1 -0
  186. package/.next/static/chunks/app/api/auth/api-key/[provider]/route-2900441d61e06609.js +1 -0
  187. package/.next/static/chunks/app/api/auth/login/[provider]/route-2900441d61e06609.js +1 -0
  188. package/.next/static/chunks/app/api/auth/logout/[provider]/route-2900441d61e06609.js +1 -0
  189. package/.next/static/chunks/app/api/auth/providers/route-2900441d61e06609.js +1 -0
  190. package/.next/static/chunks/app/api/cwd/browse/route-2900441d61e06609.js +1 -0
  191. package/.next/static/chunks/app/api/cwd/validate/route-2900441d61e06609.js +1 -0
  192. package/.next/static/chunks/app/api/default-cwd/route-2900441d61e06609.js +1 -0
  193. package/.next/static/chunks/app/api/file-index/route-2900441d61e06609.js +1 -0
  194. package/.next/static/chunks/app/api/files/[...path]/route-2900441d61e06609.js +1 -0
  195. package/.next/static/chunks/app/api/git/diff/route-2900441d61e06609.js +1 -0
  196. package/.next/static/chunks/app/api/git/status/route-2900441d61e06609.js +1 -0
  197. package/.next/static/chunks/app/api/home/route-2900441d61e06609.js +1 -0
  198. package/.next/static/chunks/app/api/mcp/route-2900441d61e06609.js +1 -0
  199. package/.next/static/chunks/app/api/model-roles/route-2900441d61e06609.js +1 -0
  200. package/.next/static/chunks/app/api/models/route-2900441d61e06609.js +1 -0
  201. package/.next/static/chunks/app/api/models-config/catalog/route-2900441d61e06609.js +1 -0
  202. package/.next/static/chunks/app/api/models-config/route-2900441d61e06609.js +1 -0
  203. package/.next/static/chunks/app/api/models-config/test/route-2900441d61e06609.js +1 -0
  204. package/.next/static/chunks/app/api/omp-settings/route-2900441d61e06609.js +1 -0
  205. package/.next/static/chunks/app/api/omp-update/route-2900441d61e06609.js +1 -0
  206. package/.next/static/chunks/app/api/omp-version/route-2900441d61e06609.js +1 -0
  207. package/.next/static/chunks/app/api/plugins/route-2900441d61e06609.js +1 -0
  208. package/.next/static/chunks/app/api/projects/route-2900441d61e06609.js +1 -0
  209. package/.next/static/chunks/app/api/providers/enable/route-2900441d61e06609.js +1 -0
  210. package/.next/static/chunks/app/api/relay/devices/[id]/route-2900441d61e06609.js +1 -0
  211. package/.next/static/chunks/app/api/relay/devices/route-2900441d61e06609.js +1 -0
  212. package/.next/static/chunks/app/api/relay/pair/route-2900441d61e06609.js +1 -0
  213. package/.next/static/chunks/app/api/sessions/[id]/archive/route-2900441d61e06609.js +1 -0
  214. package/.next/static/chunks/app/api/sessions/[id]/auto-name/route-2900441d61e06609.js +1 -0
  215. package/.next/static/chunks/app/api/sessions/[id]/context/route-2900441d61e06609.js +1 -0
  216. package/.next/static/chunks/app/api/sessions/[id]/entries/[entryId]/media/route-2900441d61e06609.js +1 -0
  217. package/.next/static/chunks/app/api/sessions/[id]/entries/[entryId]/thinking/route-2900441d61e06609.js +1 -0
  218. package/.next/static/chunks/app/api/sessions/[id]/export/route-2900441d61e06609.js +1 -0
  219. package/.next/static/chunks/app/api/sessions/[id]/route-2900441d61e06609.js +1 -0
  220. package/.next/static/chunks/app/api/sessions/[id]/state/route-2900441d61e06609.js +1 -0
  221. package/.next/static/chunks/app/api/sessions/[id]/subagents/[subagentId]/route-2900441d61e06609.js +1 -0
  222. package/.next/static/chunks/app/api/sessions/[id]/subagents/route-2900441d61e06609.js +1 -0
  223. package/.next/static/chunks/app/api/sessions/archive/route-2900441d61e06609.js +1 -0
  224. package/.next/static/chunks/app/api/sessions/import/route-2900441d61e06609.js +1 -0
  225. package/.next/static/chunks/app/api/sessions/route-2900441d61e06609.js +1 -0
  226. package/.next/static/chunks/app/api/skills/check/route-2900441d61e06609.js +1 -0
  227. package/.next/static/chunks/app/api/skills/install/route-2900441d61e06609.js +1 -0
  228. package/.next/static/chunks/app/api/skills/route-2900441d61e06609.js +1 -0
  229. package/.next/static/chunks/app/api/skills/search/route-2900441d61e06609.js +1 -0
  230. package/.next/static/chunks/app/api/skills/update/route-2900441d61e06609.js +1 -0
  231. package/.next/static/chunks/app/api/usage/route-2900441d61e06609.js +1 -0
  232. package/.next/static/chunks/app/api/web-auth/session/route-2900441d61e06609.js +1 -0
  233. package/.next/static/chunks/app/api/worktrees/route-2900441d61e06609.js +1 -0
  234. package/.next/static/chunks/app/login/page-76b98ef41947c31b.js +1 -0
  235. package/.next/static/chunks/app/manifest.webmanifest/route-2900441d61e06609.js +1 -0
  236. package/.next/static/chunks/app/{page-2845a463e3b265c2.js → page-dcb62803f94d0c1c.js} +2 -2
  237. package/.next/static/chunks/app/pair/page-e1ad2578491903a8.js +1 -0
  238. package/.next/static/chunks/app/relay/route-2900441d61e06609.js +1 -0
  239. package/.next/static/chunks/next/dist/client/components/builtin/app-error-2900441d61e06609.js +1 -0
  240. package/.next/static/chunks/next/dist/client/components/builtin/forbidden-2900441d61e06609.js +1 -0
  241. package/.next/static/chunks/next/dist/client/components/builtin/not-found-2900441d61e06609.js +1 -0
  242. package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-2900441d61e06609.js +1 -0
  243. package/.next/static/chunks/webpack-789dbb5c37af2dc8.js +1 -0
  244. package/.next/static/css/d4456801cd2ff0da.css +3 -0
  245. package/README.ja.md +6 -0
  246. package/README.ko.md +8 -0
  247. package/README.md +9 -1
  248. package/README.zh-CN.md +6 -0
  249. package/bin/ompgui-options.js +11 -3
  250. package/bin/ompgui-pair.js +108 -0
  251. package/bin/ompgui.js +23 -11
  252. package/next.config.ts +3 -1
  253. package/package.json +8 -5
  254. package/.next/server/chunks/2118.js +0 -1
  255. package/.next/server/chunks/3379.js +0 -1
  256. package/.next/server/chunks/6777.js +0 -1
  257. package/.next/server/chunks/7834.js +0 -5
  258. package/.next/server/chunks/8816.js +0 -18
  259. package/.next/static/chunks/4315-6b59cc5d91fe9083.js +0 -1
  260. package/.next/static/chunks/484.3215a9f03ff865da.js +0 -1
  261. package/.next/static/chunks/4906-7dff29185f63f908.js +0 -1
  262. package/.next/static/chunks/5658.eb16997c19c2372b.js +0 -1
  263. package/.next/static/chunks/6139.8971a8cbb6c07ac8.js +0 -17
  264. package/.next/static/chunks/7194.651566324b8fac6f.js +0 -1
  265. package/.next/static/chunks/9448.3ded6700334581bd.js +0 -2
  266. package/.next/static/chunks/9668.5e681bc0055ed4d0.js +0 -1
  267. package/.next/static/chunks/app/_global-error/page-129e1f8238bd66db.js +0 -1
  268. package/.next/static/chunks/app/api/agent/[id]/bash-output/route-129e1f8238bd66db.js +0 -1
  269. package/.next/static/chunks/app/api/agent/[id]/events/route-129e1f8238bd66db.js +0 -1
  270. package/.next/static/chunks/app/api/agent/[id]/route-129e1f8238bd66db.js +0 -1
  271. package/.next/static/chunks/app/api/agent/new/route-129e1f8238bd66db.js +0 -1
  272. package/.next/static/chunks/app/api/agent/running/events/route-129e1f8238bd66db.js +0 -1
  273. package/.next/static/chunks/app/api/agents/[name]/route-129e1f8238bd66db.js +0 -1
  274. package/.next/static/chunks/app/api/agents/route-129e1f8238bd66db.js +0 -1
  275. package/.next/static/chunks/app/api/agents/unpack/route-129e1f8238bd66db.js +0 -1
  276. package/.next/static/chunks/app/api/app-update/route-129e1f8238bd66db.js +0 -1
  277. package/.next/static/chunks/app/api/auth/all-providers/route-129e1f8238bd66db.js +0 -1
  278. package/.next/static/chunks/app/api/auth/api-key/[provider]/route-129e1f8238bd66db.js +0 -1
  279. package/.next/static/chunks/app/api/auth/login/[provider]/route-129e1f8238bd66db.js +0 -1
  280. package/.next/static/chunks/app/api/auth/logout/[provider]/route-129e1f8238bd66db.js +0 -1
  281. package/.next/static/chunks/app/api/auth/providers/route-129e1f8238bd66db.js +0 -1
  282. package/.next/static/chunks/app/api/cwd/browse/route-129e1f8238bd66db.js +0 -1
  283. package/.next/static/chunks/app/api/cwd/validate/route-129e1f8238bd66db.js +0 -1
  284. package/.next/static/chunks/app/api/default-cwd/route-129e1f8238bd66db.js +0 -1
  285. package/.next/static/chunks/app/api/file-index/route-129e1f8238bd66db.js +0 -1
  286. package/.next/static/chunks/app/api/files/[...path]/route-129e1f8238bd66db.js +0 -1
  287. package/.next/static/chunks/app/api/git/diff/route-129e1f8238bd66db.js +0 -1
  288. package/.next/static/chunks/app/api/git/status/route-129e1f8238bd66db.js +0 -1
  289. package/.next/static/chunks/app/api/home/route-129e1f8238bd66db.js +0 -1
  290. package/.next/static/chunks/app/api/mcp/route-129e1f8238bd66db.js +0 -1
  291. package/.next/static/chunks/app/api/model-roles/route-129e1f8238bd66db.js +0 -1
  292. package/.next/static/chunks/app/api/models/route-129e1f8238bd66db.js +0 -1
  293. package/.next/static/chunks/app/api/models-config/catalog/route-129e1f8238bd66db.js +0 -1
  294. package/.next/static/chunks/app/api/models-config/route-129e1f8238bd66db.js +0 -1
  295. package/.next/static/chunks/app/api/models-config/test/route-129e1f8238bd66db.js +0 -1
  296. package/.next/static/chunks/app/api/omp-settings/route-129e1f8238bd66db.js +0 -1
  297. package/.next/static/chunks/app/api/omp-update/route-129e1f8238bd66db.js +0 -1
  298. package/.next/static/chunks/app/api/omp-version/route-129e1f8238bd66db.js +0 -1
  299. package/.next/static/chunks/app/api/plugins/route-129e1f8238bd66db.js +0 -1
  300. package/.next/static/chunks/app/api/projects/route-129e1f8238bd66db.js +0 -1
  301. package/.next/static/chunks/app/api/providers/enable/route-129e1f8238bd66db.js +0 -1
  302. package/.next/static/chunks/app/api/sessions/[id]/archive/route-129e1f8238bd66db.js +0 -1
  303. package/.next/static/chunks/app/api/sessions/[id]/auto-name/route-129e1f8238bd66db.js +0 -1
  304. package/.next/static/chunks/app/api/sessions/[id]/context/route-129e1f8238bd66db.js +0 -1
  305. package/.next/static/chunks/app/api/sessions/[id]/entries/[entryId]/media/route-129e1f8238bd66db.js +0 -1
  306. package/.next/static/chunks/app/api/sessions/[id]/entries/[entryId]/thinking/route-129e1f8238bd66db.js +0 -1
  307. package/.next/static/chunks/app/api/sessions/[id]/export/route-129e1f8238bd66db.js +0 -1
  308. package/.next/static/chunks/app/api/sessions/[id]/route-129e1f8238bd66db.js +0 -1
  309. package/.next/static/chunks/app/api/sessions/[id]/state/route-129e1f8238bd66db.js +0 -1
  310. package/.next/static/chunks/app/api/sessions/[id]/subagents/[subagentId]/route-129e1f8238bd66db.js +0 -1
  311. package/.next/static/chunks/app/api/sessions/[id]/subagents/route-129e1f8238bd66db.js +0 -1
  312. package/.next/static/chunks/app/api/sessions/archive/route-129e1f8238bd66db.js +0 -1
  313. package/.next/static/chunks/app/api/sessions/import/route-129e1f8238bd66db.js +0 -1
  314. package/.next/static/chunks/app/api/sessions/route-129e1f8238bd66db.js +0 -1
  315. package/.next/static/chunks/app/api/skills/check/route-129e1f8238bd66db.js +0 -1
  316. package/.next/static/chunks/app/api/skills/install/route-129e1f8238bd66db.js +0 -1
  317. package/.next/static/chunks/app/api/skills/route-129e1f8238bd66db.js +0 -1
  318. package/.next/static/chunks/app/api/skills/search/route-129e1f8238bd66db.js +0 -1
  319. package/.next/static/chunks/app/api/skills/update/route-129e1f8238bd66db.js +0 -1
  320. package/.next/static/chunks/app/api/usage/route-129e1f8238bd66db.js +0 -1
  321. package/.next/static/chunks/app/api/web-auth/session/route-129e1f8238bd66db.js +0 -1
  322. package/.next/static/chunks/app/api/worktrees/route-129e1f8238bd66db.js +0 -1
  323. package/.next/static/chunks/app/login/page-a54174ed920300f7.js +0 -1
  324. package/.next/static/chunks/app/manifest.webmanifest/route-129e1f8238bd66db.js +0 -1
  325. package/.next/static/chunks/next/dist/client/components/builtin/app-error-129e1f8238bd66db.js +0 -1
  326. package/.next/static/chunks/next/dist/client/components/builtin/forbidden-129e1f8238bd66db.js +0 -1
  327. package/.next/static/chunks/next/dist/client/components/builtin/not-found-129e1f8238bd66db.js +0 -1
  328. package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-129e1f8238bd66db.js +0 -1
  329. package/.next/static/chunks/webpack-9c013878cb300763.js +0 -1
  330. package/.next/static/css/dd19cac539e3e218.css +0 -3
  331. package/.next/static/wMrrM4WHr4pqT7Bavv79j/_buildManifest.js +0 -1
  332. /package/.next/static/{wMrrM4WHr4pqT7Bavv79j → QFUZ5E_wgec_DUeAoDxrb}/_ssgManifest.js +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ompgui",
3
- "version": "0.6.5",
3
+ "version": "0.7.1",
4
4
  "description": "Web UI & Browser GUI for the oh-my-pi (omp) coding agent",
5
5
  "homepage": "https://github.com/dbc-hbin/ompgui#readme",
6
6
  "repository": {
@@ -22,6 +22,7 @@
22
22
  "files": [
23
23
  "bin/ompgui.js",
24
24
  "bin/ompgui-update.js",
25
+ "bin/ompgui-pair.js",
25
26
  "bin/omp-web.js",
26
27
  "bin/ompgui-options.js",
27
28
  "bin/omp-web-options.js",
@@ -43,7 +44,7 @@
43
44
  "dev": "next dev -H 127.0.0.1 -p 30178",
44
45
  "build": "next build --webpack",
45
46
  "start": "next start -H 127.0.0.1 -p 30177",
46
- "test": "node --experimental-strip-types --test lib/*.test.mjs lib/omp/*.test.mjs components/*.test.mjs components/ui/*.test.mjs hooks/*.test.mjs bin/*.test.mjs",
47
+ "test": "node --experimental-strip-types --test lib/*.test.mjs lib/omp/*.test.mjs lib/relay/*.test.mjs components/*.test.mjs components/ui/*.test.mjs hooks/*.test.mjs bin/*.test.mjs",
47
48
  "typecheck": "tsc --noEmit",
48
49
  "lint": "eslint .",
49
50
  "prepack": "npm run build",
@@ -65,17 +66,18 @@
65
66
  "rehype-katex": "^7.0.1",
66
67
  "rehype-raw": "^7.0.0",
67
68
  "rehype-sanitize": "^6.0.0",
69
+ "rehype-stringify": "^10.0.1",
68
70
  "remark-gfm": "^4.0.1",
69
71
  "remark-math": "^6.0.0",
70
72
  "undici": "8.10.0",
73
+ "unified": "^11.0.5",
74
+ "uqr": "^0.1.3",
71
75
  "yaml": "^2"
72
76
  },
73
77
  "devDependencies": {
74
- "@capacitor/android": "^8.5.0",
75
- "@capacitor/cli": "^8.5.0",
76
- "@capacitor/core": "^8.5.0",
77
78
  "@lobehub/icons": "^5.6.0",
78
79
  "@tailwindcss/postcss": "^4.2.2",
80
+ "@types/hast": "^3.0.4",
79
81
  "@types/node": "^25",
80
82
  "@types/react": "^19",
81
83
  "@types/react-dom": "^19",
@@ -84,6 +86,7 @@
84
86
  "eslint-config-next": "16.2.9",
85
87
  "jiti": "^2.7.0",
86
88
  "postcss": "^8",
89
+ "prismjs": "^1.30.0",
87
90
  "typescript": "^5"
88
91
  }
89
92
  }
@@ -1 +0,0 @@
1
- "use strict";exports.id=2118,exports.ids=[2118],exports.modules={28967:(a,b,c)=>{function d(){return globalThis.__piModelsCacheState||(globalThis.__piModelsCacheState={entries:new Map,inFlight:new Map,generation:0}),globalThis.__piModelsCacheState}function e(){let a=d();a.generation+=1,a.entries.clear(),a.inFlight.clear()}function f(a){return{...a,modelError:"Model list is temporarily unavailable. Check your configuration and try again."}}function g(a,b){var c,e,f;let g,h,i=d(),j=i.entries.get(a);if(j&&j.expiresAt>Date.now())return Promise.resolve(j.data);let k=i.inFlight.get(a)??(c=i,e=a,f=b,g=c.generation,h=Promise.resolve().then(f).then(a=>{if(c.generation===g&&c.inFlight.get(e)===h){for(c.entries.delete(e);c.entries.size>=32;){let a=c.entries.keys().next().value;if(void 0===a)break;c.entries.delete(a)}c.entries.set(e,{data:a,expiresAt:Date.now()+6e4})}return a}).finally(()=>{c.inFlight.get(e)===h&&c.inFlight.delete(e)}),c.inFlight.set(e,h),h);return j?(k.catch(()=>{}),Promise.resolve(j.data)):k}c.d(b,{Fw:()=>f,kn:()=>e,rC:()=>g})},82118:(a,b,c)=>{c.d(b,{OZ:()=>l,A4:()=>y,HG:()=>z,rb:()=>u,Te:()=>A,OF:()=>F,Fn:()=>C});var d=c(29021),e=c(21820),f=c(78970),g=c(28967),h=c(13798),i=c(88501),j=c(78573);let k="This session is restarting — retry in a moment.";class l extends Error{constructor(a,b){super(a),this.name="WebRpcError",this.code=b}}let m=new Set(["select","confirm","input","editor","open_url"]),n=new Set(["abort","abort_and_prompt","set_thinking_level","cycle_thinking_level","cycle_model","get_available_models","set_auto_compaction","set_auto_retry","abort_retry","abort_bash","set_todos","set_steering_mode","set_follow_up_mode","set_interrupt_mode","get_branch_messages","get_messages","get_messages_page","export_html","handoff","get_subagents","get_subagent_messages","set_subagent_subscription","get_login_providers","login"]),o={navigate_tree:"Branch navigation is not supported over the omp RPC protocol",clear_queue:"Recalling queued messages is not supported over the omp RPC protocol",get_tools:"Per-session tool listing is not supported over the omp RPC protocol",set_tools:"Changing tools on a running session is not supported over the omp RPC protocol; tool presets apply to new sessions",extension_ui_input:"Extension custom UI is not supported over the omp RPC protocol"},p={find:"glob",search:"grep"},q=new Set(["ls"]),r=["bash","read","edit","write","grep","find","ls","task"].map(a=>a.toLowerCase()).sort().join(",");function s(a,b,c=!1){let d=[];if(a)d.push("--resume",a);else if(void 0!==b){let a=b.map(a=>a.toLowerCase()).sort().join(",");if(0===b.length)d.push("--no-tools");else if(a===r);else{let a=function(a){let b=[];for(let c of a){let a=c.toLowerCase();if(q.has(a))continue;let d=p[a]??a;b.includes(d)||b.push(d)}return b}(b);a.length>0&&d.push("--tools",a.join(","))}}return c&&!a&&d.push("--advisor"),d}function t(a){return a?.length?a:void 0}function u(a){if(a&&(0,d.existsSync)(a))return{cwd:a,fellBack:!1};try{let a=process.cwd();if(a&&(0,d.existsSync)(a))return{cwd:a,fellBack:!0}}catch{}return{cwd:(0,e.homedir)(),fellBack:!0}}function v(a){a&&"object"==typeof a&&void 0===a.estimatedTokensAfter&&(a.estimatedTokensAfter=Math.round((a.summary?.length??0)/4))}class w{constructor(a,b,c){this.listeners=[],this.pendingUiRequests=new Map,this.uiExpiryTimers=new Map,this.extensionStatuses=new Map,this.extensionWidgets=new Map,this.promptRunning=!1,this.bashRunning=!1,this.streaming=!1,this.compacting=!1,this.fastModeEnabled=!1,this.idleTimer=null,this.destroyListeners=[],this.onIdentityChangeCallback=null,this.unsubscribeFrames=null,this.initPromise=null,this.restarting=!1,this.mcpListWaiter=null,this._alive=!0,this.hostToolNames=new Set,this.pendingHostTools=new Map,this.hostUriSchemes=new Map,this.pendingHostUris=new Map,this.destroyPromise=null,this._sessionId="",this._sessionFile="",this.sessionFileSignalTimer=null,this.proc=a,this.cwd=b,this.recordedCwd=c??null}get sessionId(){return this._sessionId}get sessionFile(){return this._sessionFile}isAlive(){return this._alive&&this.proc.isAlive}isRunning(){return this.isAlive()&&(this.promptRunning||this.streaming||this.compacting||this.bashRunning)}start(){this.unsubscribeFrames=this.proc.onFrame(a=>this.handleFrame(a)),this.resetIdleTimer(),E()}waitUntilReady(){return this.initPromise||(this.initPromise=this.initialize()),this.initPromise}async initialize(){let a=await this.proc.waitReady(12e4);await this.proc.negotiateProtocol(a),await this.proc.sendCommand({type:"set_subagent_subscription",level:"events"}).catch(()=>{});let b=await this.proc.sendCommand({type:"get_state"});this.applyIdentity(b),this.recordedCwd&&this.recordedCwd!==this.cwd&&this.emit({type:"notice",level:"warning",message:`This session's working directory no longer exists; the agent is running in ${this.cwd}.`})}applyIdentity(a){this._sessionId=a.sessionId,this._sessionFile=a.sessionFile??"",this._sessionName=a.sessionName,this.streaming=a.isStreaming,this.compacting=a.isCompacting,this.fastModeEnabled=a.fastModeEnabled??a.fastMode??this.fastModeEnabled,this._sessionFile&&(0,j.O8)(this._sessionId,this._sessionFile)}handleProcessExit(a){if(!this._alive||this.restarting)return;let b=a.trim().split("\n").pop()??"";this.emit({type:"notice",level:"error",message:`The omp process for this session exited unexpectedly${b?`: ${b}`:"."}`}),(this.streaming||this.promptRunning)&&this.emit({type:"agent_end",isTerminal:!0,messages:[]}),this.destroy()}handleFrame(a){this.resetIdleTimer();let b=!1;switch(a.type){case"command_output":{let b=this.mcpListWaiter;if(b&&"string"==typeof a.text){clearTimeout(b.timer),this.mcpListWaiter=null,b.resolve(a.text),E();return}break}case"agent_start":this.streaming=!0,(0,j.mD)(),b=!0,this._sessionFile&&!(0,d.existsSync)(this._sessionFile)&&this.signalWhenSessionFileAppears();break;case"agent_end":!1!==a.isTerminal&&(this.streaming=!1,this.promptRunning=!1,(0,j.mD)());break;case"prompt_result":this.promptRunning=!1;break;case"auto_compaction_start":this.compacting=!0;break;case"auto_compaction_end":this.compacting=!1,v(a.result),(0,j.mD)();break;case"session_info_update":"string"==typeof a.title&&(this._sessionName=a.title),(0,j.mD)(),b=!0;break;case"response":if(!1===a.success&&"prompt"===a.command){this.promptRunning=!1,this.emit({type:"prompt_error",errorMessage:a.error??"Prompt failed"}),E();return}break;case"extension_ui_request":if(this.trackExtensionUiRequest(a))return void E();break;case"host_tool_call":{let b="string"==typeof a.id?a.id:"",c="string"==typeof a.toolName?a.toolName:"";if(b&&c&&this.hostToolNames.has(c)&&this.listeners.length>0){this.pendingHostTools.set(b,a),this.emit(a),E();return}this.rejectUnexpectedHostTool(a);return}case"host_tool_cancel":{let b="string"==typeof a.targetId?a.targetId:"";if(b&&this.pendingHostTools.delete(b)){this.emit(a),E();return}break}case"host_uri_request":{let b="string"==typeof a.id?a.id:"",c=("string"==typeof a.url?a.url:"").split(":")[0]??"",d="write"===a.operation?"write":"read",e=this.hostUriSchemes.get(c);if(b&&c&&e&&("write"!==d||e.writable)&&this.listeners.length>0){this.pendingHostUris.set(b,a),this.emit(a),E();return}this.proc.sendFrame({type:"host_uri_result",id:b,isError:!0,error:`URI scheme "${c}" is not registered by omp-web`});return}case"host_uri_cancel":{let b="string"==typeof a.targetId?a.targetId:"";if(b&&this.pendingHostUris.delete(b)){this.emit(a),E();return}}}this.emit(a),E({refreshSessionList:b})}forgetPendingUiRequest(a){this.pendingUiRequests.delete(a);let b=this.uiExpiryTimers.get(a);b&&(clearTimeout(b),this.uiExpiryTimers.delete(a))}clearPendingUiRequests(){for(let a of this.uiExpiryTimers.values())clearTimeout(a);this.uiExpiryTimers.clear(),this.pendingUiRequests.clear()}trackExtensionUiRequest(a){let b=a.method,c=a.id;if("cancel"===b)return this.forgetPendingUiRequest(a.targetId),!1;let d=!1;try{d=(0,i.rk)().settings.tools?.approval?.extension==="allow"}catch{}if("confirm"===b&&"string"==typeof a.title&&/^allow tool\s*:/i.test(a.title)&&d)return this.forgetPendingUiRequest(c),this.proc.sendFrame({type:"extension_ui_response",id:c,confirmed:!0}),!0;if(m.has(b)){this.forgetPendingUiRequest(c);let b="number"==typeof a.timeout?a.timeout:void 0;if(b&&b>0){a.expiresAt=Date.now()+b;let d=setTimeout(()=>this.forgetPendingUiRequest(c),b);d.unref?.(),this.uiExpiryTimers.set(c,d)}return this.pendingUiRequests.set(c,a),!1}if("setStatus"===b){let b=a.statusKey,c=a.statusText;return void 0===c?this.extensionStatuses.delete(b):this.extensionStatuses.set(b,c),!1}if("setWidget"===b){let b=a.widgetKey,c=a.widgetLines;void 0===c?this.extensionWidgets.delete(b):this.extensionWidgets.set(b,{key:b,lines:c,placement:a.widgetPlacement??"aboveEditor"})}return!1}rejectUnexpectedHostTool(a){let b="string"==typeof a.id?a.id:"";if(!b)return;let c="string"==typeof a.toolName?a.toolName:"unknown";this.proc.sendFrame({type:"host_tool_result",id:b,isError:!0,result:{content:[{type:"text",text:`Host tool "${c}" is not available in ompgui. Use OMP's built-in tools within the selected workspace.`}]}}),this.emit({type:"notice",level:"warning",message:`Rejected unavailable host tool: ${c}`})}rejectPendingHostTools(a){for(let b of this.pendingHostTools.keys())this.proc.sendFrame({type:"host_tool_result",id:b,isError:!0,result:{content:[{type:"text",text:a}]}});this.pendingHostTools.clear()}rejectPendingHostUris(a){for(let b of this.pendingHostUris.keys())this.proc.sendFrame({type:"host_uri_result",id:b,isError:!0,error:a});this.pendingHostUris.clear()}emit(a){for(let b of this.listeners)try{b(a)}catch{}}signalWhenSessionFileAppears(){if(this.sessionFileSignalTimer)return;let a=0,b=()=>{if(this.sessionFileSignalTimer=null,this._alive&&this._sessionFile){if(!(0,d.existsSync)(this._sessionFile)){(a+=1)<40&&(this.sessionFileSignalTimer=setTimeout(b,250));return}(0,j.mD)(),E({refreshSessionList:!0})}};this.sessionFileSignalTimer=setTimeout(b,250)}resetIdleTimer(){this.idleTimer&&clearTimeout(this.idleTimer),this.idleTimer=setTimeout(()=>{this.isRunning()?this.resetIdleTimer():this.destroy()},6e5)}onEvent(a){this.listeners.push(a);let b=Date.now();for(let[c,d]of this.pendingUiRequests){let e=d.expiresAt;if(void 0!==e&&e<=b){this.forgetPendingUiRequest(c);continue}a(d)}return()=>{let b=this.listeners.indexOf(a);-1!==b&&this.listeners.splice(b,1),0===this.listeners.length&&(this.rejectPendingHostTools("The web UI disconnected while the agent was waiting for this host tool"),this.rejectPendingHostUris("The web UI disconnected while the agent was waiting for this URI request"))}}onDestroy(a){return this._alive?(this.destroyListeners.push(a),()=>{let b=this.destroyListeners.indexOf(a);-1!==b&&this.destroyListeners.splice(b,1)}):(a(),()=>{})}onIdentityChange(a){this.onIdentityChangeCallback=a}async withFinalRunningNotification(a){try{return await a()}finally{E()}}async getMcpList(){let a,b;if(this.restarting)throw new l(k,"session_restarting");if(!this.isAlive())throw Error("Session is no longer running");if(this.isRunning())throw new l("Wait for the current run to finish","session_busy");if(this.mcpListWaiter)throw new l("MCP list is already loading","mcp_list_loading");this.promptRunning=!0,E();let c=new Promise((c,d)=>{a=c,b=d});c.catch(()=>{});let d={resolve:a,reject:b,timer:void 0};d.timer=setTimeout(()=>{this.mcpListWaiter===d&&(this.mcpListWaiter=null,b(new l("Timed out while loading MCP servers","mcp_list_timeout")))},15e3),d.timer.unref?.(),this.mcpListWaiter=d;try{return await this.proc.sendCommand({type:"prompt",message:"/mcp list"}),await c}catch(a){throw this.mcpListWaiter===d&&(clearTimeout(d.timer),this.mcpListWaiter=null,d.reject(a instanceof Error?a:Error(String(a)))),a}finally{this.mcpListWaiter===d&&(clearTimeout(d.timer),this.mcpListWaiter=null),this.promptRunning=!1,E()}}buildWebState(a){return this.streaming=a.isStreaming,this.compacting=a.isCompacting,this._sessionName=a.sessionName,a.sessionId&&(this._sessionId=a.sessionId,this._sessionFile=a.sessionFile??this._sessionFile),{sessionId:a.sessionId,sessionFile:a.sessionFile??"",sessionName:a.sessionName,isStreaming:a.isStreaming,isPromptRunning:this.promptRunning,isBashRunning:this.bashRunning,isCompacting:a.isCompacting,autoCompactionEnabled:a.autoCompactionEnabled,autoRetryEnabled:a.autoRetryEnabled,interruptMode:a.interruptMode,steeringMode:a.steeringMode,followUpMode:a.followUpMode,model:a.model?{id:a.model.id,provider:a.model.provider,name:a.model.name,reasoning:a.model.reasoning,thinking:a.model.thinking?{efforts:a.model.thinking.efforts}:void 0}:void 0,messageCount:a.messageCount,queuedMessageCount:a.queuedMessageCount,contextUsage:a.contextUsage??null,systemPrompt:a.systemPrompt?.join("\n\n")??"",thinkingLevel:a.thinkingLevel??"off",fastModeEnabled:a.fastModeEnabled??a.fastMode??this.fastModeEnabled,fastModeActive:a.fastModeActive,todoPhases:a.todoPhases??[],extensionStatuses:Array.from(this.extensionStatuses,([a,b])=>({key:a,text:b})),extensionWidgets:Array.from(this.extensionWidgets.values())}}async refreshIdentityAfterSessionChange(){let a=this._sessionId,b=await this.proc.sendCommand({type:"get_state"});return this.applyIdentity(b),a&&a!==this._sessionId&&this.onIdentityChangeCallback?.(a,this._sessionId),(0,j.mD)(),this._sessionId}async restart(){if(this.restarting)throw new l(k,"session_restarting");let a=this._sessionFile,b=!!a&&(0,d.existsSync)(a),c=this.proc;this.restarting=!0,this.unsubscribeFrames?.();try{if(await c.dispose(),!this._alive)return;this.extensionStatuses.clear(),this.extensionWidgets.clear(),this.clearPendingUiRequests(),this.promptRunning=!1,this.bashRunning=!1,this.streaming=!1,this.compacting=!1;let d=new h.X({cwd:this.cwd,extraArgs:s(b?a:""),onExit:({stderrTail:a})=>{this.proc===d&&this.handleProcessExit(a)}});this.proc=d,this.unsubscribeFrames=d.onFrame(a=>this.handleFrame(a));try{let a=await d.waitReady(12e4);await d.negotiateProtocol(a),await d.sendCommand({type:"set_subagent_subscription",level:"events"}).catch(()=>{});let b=await d.sendCommand({type:"get_state"});this.applyIdentity(b)}catch(a){throw this.unsubscribeFrames?.(),this.unsubscribeFrames=null,d.dispose(),this.destroy(),a}}finally{this.restarting=!1}E()}async send(a){if(this.restarting)throw new l(k,"session_restarting");if(!this.isAlive())throw Error("Session is no longer running");this.resetIdleTimer();let b=a.type;if("prompt"===b||"steer"===b||"follow_up"===b){let b=(0,f.kc)(a.images);if(b)throw Error(b)}let c=o[b];if(c)throw new h.x(b,c,"unsupported");switch(b){case"prompt":{if(this.bashRunning)throw Error("Cannot send a prompt while a shell command is running");let b=a.streamingBehavior;b||(this.promptRunning=!0,E());try{let c=await this.proc.sendCommand({type:"prompt",message:a.message,...t(a.images)?{images:t(a.images)}:{},...b?{streamingBehavior:b}:{}});c?.agentInvoked!==!1||b||(this.promptRunning=!1,this.emit({type:"prompt_result",agentInvoked:!1}),E())}catch(a){throw this.promptRunning=!1,E(),a}return null}case"steer":case"follow_up":return await this.proc.sendCommand({type:b,message:a.message,...t(a.images)?{images:t(a.images)}:{}}),null;case"abort":return await this.withFinalRunningNotification(async()=>{await this.proc.sendCommand({type:"abort"}),this.promptRunning=!1}),null;case"get_state":{let a=await this.proc.sendCommand({type:"get_state"});return this.buildWebState(a)}case"set_model":{let{provider:b,modelId:c}=a,d=await this.proc.sendCommand({type:"set_model",provider:b,modelId:c});return(0,g.kn)(),(0,j.mD)(),{id:d.id,provider:d.provider}}case"set_fast_mode":{let b=!0===a.enabled,c=await this.proc.sendCommand({type:"set_fast_mode",enabled:b});return this.fastModeEnabled=c?.enabled??b,{enabled:this.fastModeEnabled,active:c?.active??!1}}case"fork":if(this.bashRunning)throw Error("Cannot fork while a shell command is running");if((await this.proc.sendCommand({type:"branch",entryId:a.entryId})).cancelled)return{cancelled:!0};return{cancelled:!1,newSessionId:await this.refreshIdentityAfterSessionChange()};case"new_session":case"switch_session":{let b=await this.proc.sendCommand(a);if(!b.cancelled)return{cancelled:!1,newSessionId:await this.refreshIdentityAfterSessionChange()};return b}case"compact":try{return await this.withFinalRunningNotification(async()=>{this.compacting=!0,E();try{let b=await this.proc.sendCommand({type:"compact",...a.customInstructions?{customInstructions:a.customInstructions}:{}});return v(b),b}finally{this.compacting=!1}})}finally{(0,j.mD)()}case"abort_compaction":return await this.withFinalRunningNotification(()=>this.proc.sendCommand({type:"abort"})),null;case"set_session_name":{let b=a.name?.trim();if(!b)throw Error("Session name cannot be empty");return await this.proc.sendCommand({type:"set_session_name",name:b}),this._sessionName=b,(0,j.mD)(),null}case"get_session_stats":return{...await this.proc.sendCommand({type:"get_session_stats"}),sessionName:this._sessionName};case"get_last_assistant_text":return{text:(await this.proc.sendCommand({type:"get_last_assistant_text"})).text??""};case"get_commands":return await this.proc.sendCommand({type:"get_available_commands"});case"reload":return await this.restart(),{success:!0};case"extension_ui_response":{let{id:b,...c}=a;return this.forgetPendingUiRequest(b),this.proc.sendFrame({type:"extension_ui_response",id:b,...c}),null}case"bash":if(!0===a.excludeFromContext)throw new l("omp cannot run a shell command with its output excluded from the model context (`!!`): the RPC bash command has no exclusion option, so the output would silently enter the context anyway. Run it with a single `!` to share the output with the model, or use a terminal outside ompgui.","bash_exclude_unsupported");if(this.isRunning())throw Error("Cannot run a shell command while the session is busy");this.bashRunning=!0,E();try{return await this.proc.sendCommand({type:"bash",command:a.command})}finally{this.bashRunning=!1,(0,j.mD)(),E()}case"set_host_tools":{let b=(Array.isArray(a.tools)?a.tools:[]).filter(a=>"string"==typeof a.name&&a.name);return this.hostToolNames=new Set(b.map(a=>a.name)),await this.proc.sendCommand({type:"set_host_tools",tools:b}),null}case"host_tool_result":return"string"==typeof a.id&&this.pendingHostTools.delete(a.id),await this.proc.sendCommand(a),null;case"set_host_uri_schemes":{let b=Array.isArray(a.schemes)?a.schemes:[];for(let a of(this.hostUriSchemes=new Map,b))"string"==typeof a.scheme&&a.scheme&&this.hostUriSchemes.set(a.scheme,{writable:!0===a.writable});return await this.proc.sendCommand({type:"set_host_uri_schemes",schemes:b}),null}case"host_uri_result":return"string"==typeof a.id&&this.pendingHostUris.delete(a.id),await this.proc.sendCommand(a),null;default:if(n.has(b)){let c=await this.proc.sendCommand(a);return"set_thinking_level"===b&&(0,j.mD)(),c??null}throw Error(`Unsupported command: ${b}`)}}destroy(){this.destroyAndWait()}async destroyAndWait(){if(this.destroyPromise)return this.destroyPromise;if(!this._alive)return;this._alive=!1,this.idleTimer&&clearTimeout(this.idleTimer),this.sessionFileSignalTimer&&(clearTimeout(this.sessionFileSignalTimer),this.sessionFileSignalTimer=null),this.unsubscribeFrames?.(),this.clearPendingUiRequests(),this.mcpListWaiter&&(clearTimeout(this.mcpListWaiter.timer),this.mcpListWaiter.reject(Error("Session was closed while loading MCP servers")),this.mcpListWaiter=null);let a=this.proc.dispose().catch(()=>{});for(let b of(this.destroyPromise=a,this.pendingHostTools.clear(),this.hostToolNames.clear(),this.pendingHostUris.clear(),this.hostUriSchemes.clear(),this.destroyListeners.splice(0)))try{b()}catch{}E(),await a}}function x(){if(!globalThis.__ompSessions){globalThis.__ompSessions=new Map;let a=()=>globalThis.__ompSessions?.forEach(a=>a.destroy());process.once("exit",a),process.once("SIGINT",a),process.once("SIGTERM",a)}return globalThis.__ompSessions}function y(a){return x().get(a)}function z(){let a=new Set;for(let[b,c]of x())c.isRunning()&&a.add(c.sessionId||b);return[...a]}async function A(){let a=[...new Set(x().values())];return await Promise.all(a.map(a=>a.destroyAndWait())),a.length}function B(){return globalThis.__ompRunningListeners||(globalThis.__ompRunningListeners=new Set),globalThis.__ompRunningListeners}function C(a){let b=B();return b.add(a),()=>{b.delete(a)}}let D="";function E({refreshSessionList:a=!1}={}){let b=z(),c=JSON.stringify([...b].sort());if(c===D&&!a)return;D=c;let d={ids:b,refreshSessionList:a};for(let a of B())try{a(d)}catch{}}async function F(a,b,c,d,e=!1,f){let g=x(),i=(globalThis.__ompStartLocks||(globalThis.__ompStartLocks=new Map),globalThis.__ompStartLocks),j=g.get(a);if(j?.isAlive())return{session:j,realSessionId:a};j?.destroyPromise&&await j.destroyPromise;let k=i.get(a);if(k)return k;let l=(async()=>{let a={},i=new w(new h.X({cwd:c,extraArgs:s(b,d,e),onExit:({stderrTail:b})=>a.wrapper?.handleProcessExit(b)}),c,f);a.wrapper=i,i.start();try{await i.waitUntilReady()}catch(a){throw await i.destroyAndWait(),a}let j=i.sessionId;return i.onDestroy(()=>{g.get(i.sessionId)===i&&g.delete(i.sessionId),g.get(j)===i&&g.delete(j)}),i.onIdentityChange((a,b)=>{g.get(a)===i&&g.delete(a),g.set(b,i)}),g.set(j,i),{session:i,realSessionId:j}})().finally(()=>i.delete(a));return i.set(a,l),l}}};