elanous 0.2.0 → 0.2.4

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 (1174) hide show
  1. package/.env.example +6 -0
  2. package/README.md +16 -14
  3. package/apps/pwa/out/404/index.html +1 -1
  4. package/apps/pwa/out/404.html +1 -1
  5. package/apps/pwa/out/_next/static/chunks/1105-c473ed46272fba79.js +1 -0
  6. package/apps/pwa/out/_next/static/chunks/1191-7b13a24117a689fa.js +1 -0
  7. package/apps/pwa/out/_next/static/chunks/1201-09613bce624467c0.js +1 -0
  8. package/apps/pwa/out/_next/static/chunks/1377-1efeffbbac0963ff.js +1 -0
  9. package/apps/pwa/out/_next/static/chunks/1470.98a6ab61ccb4131c.js +1 -0
  10. package/apps/pwa/out/_next/static/chunks/216-5acd01cbde4acda7.js +1 -0
  11. package/apps/pwa/out/_next/static/chunks/2330-c2f07246c8788af1.js +1 -0
  12. package/apps/pwa/out/_next/static/chunks/2375-3fcae5186c64fe6b.js +1 -0
  13. package/apps/pwa/out/_next/static/chunks/2415.ed6428ff334c7ce2.js +1 -0
  14. package/apps/pwa/out/_next/static/chunks/2929-617f1e66a55be184.js +1 -0
  15. package/apps/pwa/out/_next/static/chunks/2977-e38442e86289f1d3.js +1 -0
  16. package/apps/pwa/out/_next/static/chunks/2982-2a2df543be3d2e5a.js +25 -0
  17. package/apps/pwa/out/_next/static/chunks/{2a79f15a-2013e4d421d6df88.js → 2ea96958-e8c7e112de50b067.js} +1 -1
  18. package/apps/pwa/out/_next/static/chunks/319-d37df1b6e0cbeff4.js +1 -0
  19. package/apps/pwa/out/_next/static/chunks/3403.4bc97b4066945a94.js +5 -0
  20. package/apps/pwa/out/_next/static/chunks/3441-a1dd4acfeda14488.js +1 -0
  21. package/apps/pwa/out/_next/static/chunks/371-4ad6af55dad02ced.js +1 -0
  22. package/apps/pwa/out/_next/static/chunks/4114-3e63117452378807.js +1 -0
  23. package/apps/pwa/out/_next/static/chunks/{6804.8ed6ab492bc5fc0a.js → 4323.c5dfb6f503304775.js} +1 -1
  24. package/apps/pwa/out/_next/static/chunks/4836-3c93795ab834381e.js +1 -0
  25. package/apps/pwa/out/_next/static/chunks/{320-d7013ec072863e5e.js → 5080-1613752891fcadb4.js} +4 -4
  26. package/apps/pwa/out/_next/static/chunks/5609-012bb3557211f07e.js +1 -0
  27. package/apps/pwa/out/_next/static/chunks/5791-bb82743fa6299562.js +1 -0
  28. package/apps/pwa/out/_next/static/chunks/6062-73e68343a9814f6a.js +1 -0
  29. package/apps/pwa/out/_next/static/chunks/6090-1bd6077591603947.js +1 -0
  30. package/apps/pwa/out/_next/static/chunks/6320-baac91d68843a9a6.js +1 -0
  31. package/apps/pwa/out/_next/static/chunks/6416-505ba707cacafbba.js +1 -0
  32. package/apps/pwa/out/_next/static/chunks/6725-68ab7cc0b1faf00d.js +1 -0
  33. package/apps/pwa/out/_next/static/chunks/6998-a654fe5c58271600.js +1 -0
  34. package/apps/pwa/out/_next/static/chunks/7457-f5cb1cc8db9f7453.js +1 -0
  35. package/apps/pwa/out/_next/static/chunks/7647.2fcd30d894d5ee30.js +1 -0
  36. package/apps/pwa/out/_next/static/chunks/7673-2eda1507d38dadb8.js +1 -0
  37. package/apps/pwa/out/_next/static/chunks/7990-e12efba616f46e03.js +1 -0
  38. package/apps/pwa/out/_next/static/chunks/8046cadf-211ca3c0e00f2b72.js +1 -0
  39. package/apps/pwa/out/_next/static/chunks/8067-f74bf14d67ad98f1.js +1 -0
  40. package/apps/pwa/out/_next/static/chunks/8142-011e1f474efb8b33.js +1 -0
  41. package/apps/pwa/out/_next/static/chunks/8519-0059d82bdb4812bf.js +1 -0
  42. package/apps/pwa/out/_next/static/chunks/8619-4365e03a2862830f.js +1 -0
  43. package/apps/pwa/out/_next/static/chunks/920-f7dceb78f1c585ef.js +1 -0
  44. package/apps/pwa/out/_next/static/chunks/9651-3cd291a6fa1370d2.js +1 -0
  45. package/apps/pwa/out/_next/static/chunks/9740-52467f244755917f.js +1 -0
  46. package/apps/pwa/out/_next/static/chunks/9804-64c02c3c127d5014.js +1 -0
  47. package/apps/pwa/out/_next/static/chunks/ae787e4c-f2998de7f1ba72a4.js +1 -0
  48. package/apps/pwa/out/_next/static/chunks/app/_not-found/page-859cea1570b6227a.js +1 -0
  49. package/apps/pwa/out/_next/static/chunks/app/approvals/page-21c3261af6ab377c.js +1 -0
  50. package/apps/pwa/out/_next/static/chunks/app/autopilot/page-1991445b8ea86274.js +1 -0
  51. package/apps/pwa/out/_next/static/chunks/app/board/page-4ebfaee2369fe248.js +1 -0
  52. package/apps/pwa/out/_next/static/chunks/app/botlab/page-9fa879ebf5959096.js +1 -0
  53. package/apps/pwa/out/_next/static/chunks/app/bots/page-ca7c3cc305c3285a.js +1 -0
  54. package/apps/pwa/out/_next/static/chunks/app/chat/page-9951930add3d2051.js +1 -0
  55. package/apps/pwa/out/_next/static/chunks/app/control/page-4472ddf1e2458e69.js +1 -0
  56. package/apps/pwa/out/_next/static/chunks/app/design-check/page-4de08d4b766f134b.js +1 -0
  57. package/apps/pwa/out/_next/static/chunks/app/editor/page-7a975e2b9db1dfb7.js +1 -0
  58. package/apps/pwa/out/_next/static/chunks/app/healthz/route-859cea1570b6227a.js +1 -0
  59. package/apps/pwa/out/_next/static/chunks/app/intake/page-49270714ef35bb96.js +1 -0
  60. package/apps/pwa/out/_next/static/chunks/app/layout-33fbdf353e2a5982.js +1 -0
  61. package/apps/pwa/out/_next/static/chunks/app/live/page-259f122e2dd64317.js +1 -0
  62. package/apps/pwa/out/_next/static/chunks/app/market/page-65b82726753658e1.js +1 -0
  63. package/apps/pwa/out/_next/static/chunks/app/missions/[id]/page-4b8df3748dc06285.js +1 -0
  64. package/apps/pwa/out/_next/static/chunks/app/morning/page-112f7e477bda77fd.js +1 -0
  65. package/apps/pwa/out/_next/static/chunks/app/not-found-542a5c0006da637c.js +1 -0
  66. package/apps/pwa/out/_next/static/chunks/app/observatory/page-63ffb347831262ea.js +1 -0
  67. package/apps/pwa/out/_next/static/chunks/app/page-98e4e359d97263b4.js +1 -0
  68. package/apps/pwa/out/_next/static/chunks/app/reflection/page-97e24ac675ce576e.js +1 -0
  69. package/apps/pwa/out/_next/static/chunks/app/scheduler/page-ac6391f26391d89d.js +1 -0
  70. package/apps/pwa/out/_next/static/chunks/app/sessions/page-9f45c9d45ffc43bd.js +1 -0
  71. package/apps/pwa/out/_next/static/chunks/app/settings/devices/page-36995b9cb5d98218.js +1 -0
  72. package/apps/pwa/out/_next/static/chunks/app/settings/page-0c795b577988d63f.js +1 -0
  73. package/apps/pwa/out/_next/static/chunks/app/setup/done/page-b4311e2f71c6735a.js +1 -0
  74. package/apps/pwa/out/_next/static/chunks/app/setup/layout-859cea1570b6227a.js +1 -0
  75. package/apps/pwa/out/_next/static/chunks/app/setup/page-eb2381074df20dba.js +1 -0
  76. package/apps/pwa/out/_next/static/chunks/app/share/page-b01336e64eba01ae.js +1 -0
  77. package/apps/pwa/out/_next/static/chunks/app/showroom/page-7af7f21c1f2858ef.js +1 -0
  78. package/apps/pwa/out/_next/static/chunks/app/tasks/page-a98ecd364586c89b.js +1 -0
  79. package/apps/pwa/out/_next/static/chunks/app/term/page-57f0502dfbfa089b.js +1 -0
  80. package/apps/pwa/out/_next/static/chunks/app/trace/page-3467d2e1abd8a14a.js +1 -0
  81. package/apps/pwa/out/_next/static/chunks/app/vault/page-7842ca23d53ba682.js +1 -0
  82. package/apps/pwa/out/_next/static/chunks/app/workflows/chat-ui/page-ae9ac882912b0198.js +1 -0
  83. package/apps/pwa/out/_next/static/chunks/app/workflows/page-3a0d72e3f783bcef.js +1 -0
  84. package/apps/pwa/out/_next/static/chunks/app/workspace/page-f3b39fe8358c2a97.js +1 -0
  85. package/apps/pwa/out/_next/static/chunks/app/worktrees/page-5a22af3181ac2afb.js +1 -0
  86. package/apps/pwa/out/_next/static/chunks/framework-ea806bb57f2b8923.js +1 -0
  87. package/apps/pwa/out/_next/static/chunks/main-8d2302399c2c8f87.js +1 -0
  88. package/apps/pwa/out/_next/static/chunks/main-app-1457627bb302a22c.js +1 -0
  89. package/apps/pwa/out/_next/static/chunks/pages/_app-b10928c60f0b8488.js +1 -0
  90. package/apps/pwa/out/_next/static/chunks/pages/_error-689039227d443fab.js +1 -0
  91. package/apps/pwa/out/_next/static/chunks/webpack-e5bea36f183b25e6.js +1 -0
  92. package/apps/pwa/out/_next/static/css/e66b7f5efc8df3f3.css +1 -0
  93. package/apps/pwa/out/_next/static/zoQX5iTvXOsIvCjxCe1Ji/_buildManifest.js +1 -0
  94. package/apps/pwa/out/approvals/index.html +1 -0
  95. package/apps/pwa/out/approvals/index.txt +30 -0
  96. package/apps/pwa/out/autopilot/index.html +1 -1
  97. package/apps/pwa/out/autopilot/index.txt +27 -26
  98. package/apps/pwa/out/board/index.html +1 -0
  99. package/apps/pwa/out/board/index.txt +30 -0
  100. package/apps/pwa/out/botlab/index.html +1 -1
  101. package/apps/pwa/out/botlab/index.txt +24 -23
  102. package/apps/pwa/out/bots/index.html +1 -1
  103. package/apps/pwa/out/bots/index.txt +24 -23
  104. package/apps/pwa/out/chat/index.html +1 -2
  105. package/apps/pwa/out/chat/index.txt +24 -23
  106. package/apps/pwa/out/control/index.html +1 -1
  107. package/apps/pwa/out/control/index.txt +27 -26
  108. package/apps/pwa/out/design-check/index.html +1 -1
  109. package/apps/pwa/out/design-check/index.txt +27 -26
  110. package/apps/pwa/out/editor/index.html +1 -0
  111. package/apps/pwa/out/editor/index.txt +31 -0
  112. package/apps/pwa/out/healthz +1 -1
  113. package/apps/pwa/out/index.html +1 -1
  114. package/apps/pwa/out/index.txt +24 -23
  115. package/apps/pwa/out/intake/index.html +1 -1
  116. package/apps/pwa/out/intake/index.txt +27 -26
  117. package/apps/pwa/out/live/index.html +1 -0
  118. package/apps/pwa/out/live/index.txt +30 -0
  119. package/apps/pwa/out/market/index.html +1 -0
  120. package/apps/pwa/out/market/index.txt +27 -0
  121. package/apps/pwa/out/missions/placeholder/index.html +1 -1
  122. package/apps/pwa/out/missions/placeholder/index.txt +24 -23
  123. package/apps/pwa/out/morning/index.html +1 -1
  124. package/apps/pwa/out/morning/index.txt +27 -26
  125. package/apps/pwa/out/observatory/index.html +1 -1
  126. package/apps/pwa/out/observatory/index.txt +27 -26
  127. package/apps/pwa/out/reflection/index.html +1 -1
  128. package/apps/pwa/out/reflection/index.txt +25 -24
  129. package/apps/pwa/out/scheduler/index.html +1 -1
  130. package/apps/pwa/out/scheduler/index.txt +27 -26
  131. package/apps/pwa/out/sessions/index.html +1 -1
  132. package/apps/pwa/out/sessions/index.txt +24 -23
  133. package/apps/pwa/out/settings/devices/index.html +1 -1
  134. package/apps/pwa/out/settings/devices/index.txt +27 -26
  135. package/apps/pwa/out/settings/index.html +1 -1
  136. package/apps/pwa/out/settings/index.txt +27 -26
  137. package/apps/pwa/out/setup/done/index.html +1 -1
  138. package/apps/pwa/out/setup/done/index.txt +27 -26
  139. package/apps/pwa/out/setup/index.html +1 -1
  140. package/apps/pwa/out/setup/index.txt +27 -26
  141. package/apps/pwa/out/share/index.html +1 -1
  142. package/apps/pwa/out/share/index.txt +27 -26
  143. package/apps/pwa/out/showroom/index.html +1 -1
  144. package/apps/pwa/out/showroom/index.txt +24 -23
  145. package/apps/pwa/out/tasks/index.html +1 -1
  146. package/apps/pwa/out/tasks/index.txt +27 -26
  147. package/apps/pwa/out/term/index.html +1 -1
  148. package/apps/pwa/out/term/index.txt +27 -26
  149. package/apps/pwa/out/trace/index.html +1 -0
  150. package/apps/pwa/out/trace/index.txt +30 -0
  151. package/apps/pwa/out/vault/index.html +1 -1
  152. package/apps/pwa/out/vault/index.txt +27 -26
  153. package/apps/pwa/out/workflows/chat-ui/index.html +1 -1
  154. package/apps/pwa/out/workflows/chat-ui/index.txt +27 -26
  155. package/apps/pwa/out/workflows/index.html +1 -1
  156. package/apps/pwa/out/workflows/index.txt +27 -27
  157. package/apps/pwa/out/workspace/index.html +1 -1
  158. package/apps/pwa/out/workspace/index.txt +27 -26
  159. package/apps/pwa/out/worktrees/index.html +1 -1
  160. package/apps/pwa/out/worktrees/index.txt +27 -26
  161. package/catalog/resources.yaml +8 -11
  162. package/docs/design/systems/LICENSE +201 -0
  163. package/docs/design/systems/NOTICE.md +29 -0
  164. package/docs/design/systems/SOURCE.json +291 -0
  165. package/docs/design/systems/application/DESIGN.md +71 -0
  166. package/docs/design/systems/application/manifest.json +54 -0
  167. package/docs/design/systems/application/tokens.css +63 -0
  168. package/docs/design/systems/artistic/DESIGN.md +71 -0
  169. package/docs/design/systems/artistic/manifest.json +54 -0
  170. package/docs/design/systems/artistic/tokens.css +63 -0
  171. package/docs/design/systems/bento/DESIGN.md +71 -0
  172. package/docs/design/systems/bento/manifest.json +54 -0
  173. package/docs/design/systems/bento/tokens.css +63 -0
  174. package/docs/design/systems/bold/DESIGN.md +71 -0
  175. package/docs/design/systems/bold/manifest.json +54 -0
  176. package/docs/design/systems/bold/tokens.css +63 -0
  177. package/docs/design/systems/brutalism/DESIGN.md +71 -0
  178. package/docs/design/systems/brutalism/manifest.json +54 -0
  179. package/docs/design/systems/brutalism/tokens.css +63 -0
  180. package/docs/design/systems/cafe/DESIGN.md +71 -0
  181. package/docs/design/systems/cafe/manifest.json +54 -0
  182. package/docs/design/systems/cafe/tokens.css +63 -0
  183. package/docs/design/systems/claymorphism/DESIGN.md +71 -0
  184. package/docs/design/systems/claymorphism/manifest.json +54 -0
  185. package/docs/design/systems/claymorphism/tokens.css +63 -0
  186. package/docs/design/systems/clean/DESIGN.md +71 -0
  187. package/docs/design/systems/clean/manifest.json +54 -0
  188. package/docs/design/systems/clean/tokens.css +63 -0
  189. package/docs/design/systems/colorful/DESIGN.md +71 -0
  190. package/docs/design/systems/colorful/manifest.json +54 -0
  191. package/docs/design/systems/colorful/tokens.css +63 -0
  192. package/docs/design/systems/contemporary/DESIGN.md +71 -0
  193. package/docs/design/systems/contemporary/manifest.json +54 -0
  194. package/docs/design/systems/contemporary/tokens.css +63 -0
  195. package/docs/design/systems/corporate/DESIGN.md +71 -0
  196. package/docs/design/systems/corporate/manifest.json +54 -0
  197. package/docs/design/systems/corporate/tokens.css +63 -0
  198. package/docs/design/systems/cosmic/DESIGN.md +71 -0
  199. package/docs/design/systems/cosmic/manifest.json +54 -0
  200. package/docs/design/systems/cosmic/tokens.css +63 -0
  201. package/docs/design/systems/creative/DESIGN.md +71 -0
  202. package/docs/design/systems/creative/manifest.json +54 -0
  203. package/docs/design/systems/creative/tokens.css +63 -0
  204. package/docs/design/systems/dashboard/DESIGN.md +71 -0
  205. package/docs/design/systems/dashboard/manifest.json +54 -0
  206. package/docs/design/systems/dashboard/tokens.css +63 -0
  207. package/docs/design/systems/default/DESIGN.md +62 -0
  208. package/docs/design/systems/default/manifest.json +69 -0
  209. package/docs/design/systems/default/tokens.css +200 -0
  210. package/docs/design/systems/dithered/DESIGN.md +71 -0
  211. package/docs/design/systems/dithered/manifest.json +54 -0
  212. package/docs/design/systems/dithered/tokens.css +63 -0
  213. package/docs/design/systems/doodle/DESIGN.md +71 -0
  214. package/docs/design/systems/doodle/manifest.json +54 -0
  215. package/docs/design/systems/doodle/tokens.css +63 -0
  216. package/docs/design/systems/dramatic/DESIGN.md +71 -0
  217. package/docs/design/systems/dramatic/manifest.json +54 -0
  218. package/docs/design/systems/dramatic/tokens.css +63 -0
  219. package/docs/design/systems/editorial/DESIGN.md +71 -0
  220. package/docs/design/systems/editorial/manifest.json +54 -0
  221. package/docs/design/systems/editorial/tokens.css +63 -0
  222. package/docs/design/systems/elegant/DESIGN.md +71 -0
  223. package/docs/design/systems/elegant/manifest.json +54 -0
  224. package/docs/design/systems/elegant/tokens.css +63 -0
  225. package/docs/design/systems/energetic/DESIGN.md +72 -0
  226. package/docs/design/systems/energetic/manifest.json +54 -0
  227. package/docs/design/systems/energetic/tokens.css +63 -0
  228. package/docs/design/systems/enterprise/DESIGN.md +71 -0
  229. package/docs/design/systems/enterprise/manifest.json +54 -0
  230. package/docs/design/systems/enterprise/tokens.css +63 -0
  231. package/docs/design/systems/expressive/DESIGN.md +71 -0
  232. package/docs/design/systems/expressive/manifest.json +54 -0
  233. package/docs/design/systems/expressive/tokens.css +63 -0
  234. package/docs/design/systems/fantasy/DESIGN.md +71 -0
  235. package/docs/design/systems/fantasy/manifest.json +54 -0
  236. package/docs/design/systems/fantasy/tokens.css +63 -0
  237. package/docs/design/systems/flat/DESIGN.md +71 -0
  238. package/docs/design/systems/flat/manifest.json +54 -0
  239. package/docs/design/systems/flat/tokens.css +63 -0
  240. package/docs/design/systems/friendly/DESIGN.md +71 -0
  241. package/docs/design/systems/friendly/manifest.json +54 -0
  242. package/docs/design/systems/friendly/tokens.css +63 -0
  243. package/docs/design/systems/glassmorphism/DESIGN.md +71 -0
  244. package/docs/design/systems/glassmorphism/manifest.json +54 -0
  245. package/docs/design/systems/glassmorphism/tokens.css +63 -0
  246. package/docs/design/systems/gradient/DESIGN.md +71 -0
  247. package/docs/design/systems/gradient/manifest.json +54 -0
  248. package/docs/design/systems/gradient/tokens.css +63 -0
  249. package/docs/design/systems/luxury/DESIGN.md +71 -0
  250. package/docs/design/systems/luxury/manifest.json +54 -0
  251. package/docs/design/systems/luxury/tokens.css +63 -0
  252. package/docs/design/systems/minimal/DESIGN.md +71 -0
  253. package/docs/design/systems/minimal/manifest.json +54 -0
  254. package/docs/design/systems/minimal/tokens.css +63 -0
  255. package/docs/design/systems/modern/DESIGN.md +71 -0
  256. package/docs/design/systems/modern/manifest.json +54 -0
  257. package/docs/design/systems/modern/tokens.css +63 -0
  258. package/docs/design/systems/mono/DESIGN.md +71 -0
  259. package/docs/design/systems/mono/manifest.json +54 -0
  260. package/docs/design/systems/mono/tokens.css +63 -0
  261. package/docs/design/systems/neobrutalism/DESIGN.md +71 -0
  262. package/docs/design/systems/neobrutalism/manifest.json +54 -0
  263. package/docs/design/systems/neobrutalism/tokens.css +63 -0
  264. package/docs/design/systems/neon/DESIGN.md +71 -0
  265. package/docs/design/systems/neon/manifest.json +54 -0
  266. package/docs/design/systems/neon/tokens.css +63 -0
  267. package/docs/design/systems/neumorphism/DESIGN.md +71 -0
  268. package/docs/design/systems/neumorphism/manifest.json +54 -0
  269. package/docs/design/systems/neumorphism/tokens.css +63 -0
  270. package/docs/design/systems/paper/DESIGN.md +71 -0
  271. package/docs/design/systems/paper/manifest.json +54 -0
  272. package/docs/design/systems/paper/tokens.css +63 -0
  273. package/docs/design/systems/perspective/DESIGN.md +71 -0
  274. package/docs/design/systems/perspective/manifest.json +54 -0
  275. package/docs/design/systems/perspective/tokens.css +63 -0
  276. package/docs/design/systems/premium/DESIGN.md +71 -0
  277. package/docs/design/systems/premium/manifest.json +54 -0
  278. package/docs/design/systems/premium/tokens.css +63 -0
  279. package/docs/design/systems/professional/DESIGN.md +71 -0
  280. package/docs/design/systems/professional/manifest.json +54 -0
  281. package/docs/design/systems/professional/tokens.css +63 -0
  282. package/docs/design/systems/publication/DESIGN.md +71 -0
  283. package/docs/design/systems/publication/manifest.json +54 -0
  284. package/docs/design/systems/publication/tokens.css +63 -0
  285. package/docs/design/systems/refined/DESIGN.md +71 -0
  286. package/docs/design/systems/refined/manifest.json +54 -0
  287. package/docs/design/systems/refined/tokens.css +63 -0
  288. package/docs/design/systems/retro/DESIGN.md +71 -0
  289. package/docs/design/systems/retro/manifest.json +54 -0
  290. package/docs/design/systems/retro/tokens.css +63 -0
  291. package/docs/design/systems/shadcn/DESIGN.md +71 -0
  292. package/docs/design/systems/shadcn/manifest.json +54 -0
  293. package/docs/design/systems/shadcn/tokens.css +255 -0
  294. package/docs/design/systems/simple/DESIGN.md +71 -0
  295. package/docs/design/systems/simple/manifest.json +54 -0
  296. package/docs/design/systems/simple/tokens.css +63 -0
  297. package/docs/design/systems/skeumorphism/DESIGN.md +71 -0
  298. package/docs/design/systems/skeumorphism/manifest.json +54 -0
  299. package/docs/design/systems/skeumorphism/tokens.css +63 -0
  300. package/docs/design/systems/sleek/DESIGN.md +71 -0
  301. package/docs/design/systems/sleek/manifest.json +54 -0
  302. package/docs/design/systems/sleek/tokens.css +63 -0
  303. package/docs/design/systems/spacious/DESIGN.md +71 -0
  304. package/docs/design/systems/spacious/manifest.json +54 -0
  305. package/docs/design/systems/spacious/tokens.css +63 -0
  306. package/docs/design/systems/storytelling/DESIGN.md +71 -0
  307. package/docs/design/systems/storytelling/manifest.json +54 -0
  308. package/docs/design/systems/storytelling/tokens.css +63 -0
  309. package/docs/design/systems/tom-modern/DESIGN.md +361 -0
  310. package/docs/design/systems/tom-modern/manifest.json +16 -0
  311. package/docs/design/systems/tom-modern/tokens.css +99 -0
  312. package/docs/design/systems/vibrant/DESIGN.md +71 -0
  313. package/docs/design/systems/vibrant/manifest.json +54 -0
  314. package/docs/design/systems/vibrant/tokens.css +63 -0
  315. package/docs/design/systems/vintage/DESIGN.md +71 -0
  316. package/docs/design/systems/vintage/manifest.json +54 -0
  317. package/docs/design/systems/vintage/tokens.css +63 -0
  318. package/docs/design/systems/warm-editorial/DESIGN.md +65 -0
  319. package/docs/design/systems/warm-editorial/manifest.json +54 -0
  320. package/docs/design/systems/warm-editorial/tokens.css +63 -0
  321. package/docs/goal-context/01-goal-authoring-checks.md +18 -0
  322. package/docs/goal-context/steward-directives-2026-09-28.md +44 -0
  323. package/graphs/catalog/catalog.yaml +615 -0
  324. package/graphs/default-loop.yaml +1 -1
  325. package/graphs/document-loop.yaml +1 -1
  326. package/graphs/examples/stale-draft-digest/digest.ts +26 -0
  327. package/graphs/examples/stale-draft-digest/recipes.yaml +8 -0
  328. package/graphs/examples/stale-draft-digest/stale-draft-digest.yaml +22 -0
  329. package/graphs/heal/heal-loop.yaml +155 -0
  330. package/graphs/heal/recipes.yaml +19 -0
  331. package/graphs/implement-loop.yaml +2 -2
  332. package/graphs/intake/intake-daily.yaml +55 -0
  333. package/graphs/intake/recipes.yaml +16 -0
  334. package/graphs/landing/landing-heal.yaml +22 -0
  335. package/graphs/landing/recipes.yaml +8 -0
  336. package/graphs/launch/launch-head.yaml +66 -0
  337. package/graphs/launch/recipes.yaml +8 -0
  338. package/graphs/operate-loop.yaml +1 -1
  339. package/graphs/ops/docs-publish.yaml +31 -0
  340. package/graphs/ops/recipes.yaml +8 -0
  341. package/graphs/release/recipes.yaml +38 -0
  342. package/graphs/release/release-loop.yaml +40 -0
  343. package/graphs/research-loop.yaml +1 -1
  344. package/graphs/steward/recipes.yaml +12 -0
  345. package/graphs/steward/steward.yaml +45 -0
  346. package/graphs/video/broll-line.yaml +54 -0
  347. package/package.json +7 -5
  348. package/plugins/job-coach/.agents/plugins/marketplace.json +12 -0
  349. package/plugins/job-coach/.codex-plugin/plugin.json +6 -0
  350. package/plugins/job-coach/.mcp.json +9 -0
  351. package/plugins/job-coach/README.md +20 -0
  352. package/plugins/job-coach/connectors/ncs/server.ts +89 -0
  353. package/plugins/job-coach/examples/interview-sample.md +11 -0
  354. package/plugins/job-coach/graphs/course-links.ts +46 -0
  355. package/plugins/job-coach/graphs/recipes.yaml +18 -0
  356. package/plugins/job-coach/graphs/report.yaml +20 -0
  357. package/plugins/job-coach/graphs/run-step.ts +108 -0
  358. package/plugins/job-coach/plugin.json +13 -0
  359. package/plugins/job-coach/plugin.ts +6 -0
  360. package/plugins/job-coach/skills/career-report/SKILL.md +6 -0
  361. package/plugins/job-coach/skills/interview-to-profile/SKILL.md +6 -0
  362. package/plugins/job-coach/skills/run-report/SKILL.md +15 -0
  363. package/scripts/backup/elanous-backup.sh +139 -13
  364. package/scripts/backup/elanous-restore.sh +122 -0
  365. package/scripts/ci-daemon-port-gate.ts +164 -0
  366. package/scripts/ci-typecheck-changed.ts +15 -1
  367. package/scripts/cli-json-exit-scan.ts +126 -0
  368. package/scripts/codex-quota-alert-format.ts +52 -0
  369. package/scripts/codex-quota-alert.ts +63 -13
  370. package/scripts/continuation-dogfood.ts +2 -1
  371. package/scripts/coord-channel-watch.sh +5 -5
  372. package/scripts/coord-tracks.json +5 -4
  373. package/scripts/cron-run.ts +37 -16
  374. package/scripts/daemon-port-baseline.txt +9 -0
  375. package/scripts/design/extract-corpus-bench.ts +469 -0
  376. package/scripts/design/extract-corpus-score.ts +510 -0
  377. package/scripts/design/vendor-open-design-systems.ts +100 -0
  378. package/scripts/docs-lint.ts +1 -1
  379. package/scripts/fleet/node-setup.sh +38 -4
  380. package/scripts/heal/run-role.ts +328 -0
  381. package/scripts/install-role-watch.sh +95 -0
  382. package/scripts/install.ps1 +11 -1
  383. package/scripts/install.sh +81 -9
  384. package/scripts/isolation-hardcode-baseline.txt +1 -1
  385. package/scripts/landing-heal/must-fix-match.ts +37 -0
  386. package/scripts/landing-heal/run-mission.ts +101 -0
  387. package/scripts/lib/pwa-scenarios/acp-replay.ts +79 -0
  388. package/scripts/lib/pwa-scenarios/cdp-driver.ts +67 -0
  389. package/scripts/lib/pwa-scenarios/runner.ts +200 -0
  390. package/scripts/lib/pwa-scenarios/scenarios.ts +202 -0
  391. package/scripts/market/db-check.ts +212 -0
  392. package/scripts/market-posture-cycle.ts +63 -4
  393. package/scripts/nightly-docops.ts +1 -1
  394. package/scripts/ops/channel-bot-token-migrate.ts +146 -0
  395. package/scripts/ops-health-check.ts +15 -3
  396. package/scripts/pty-scenarios/run.ts +272 -0
  397. package/scripts/public-leak-baseline.txt +0 -7
  398. package/scripts/publish-internal-dist.ts +119 -0
  399. package/scripts/pwa-scenarios.ts +106 -0
  400. package/scripts/rebrand-elanous.ts +1 -1
  401. package/scripts/release-loop/cutoff.ts +139 -0
  402. package/scripts/release-loop/docs-land-node.ts +65 -0
  403. package/scripts/release-loop/docs-node.ts +172 -0
  404. package/scripts/release-loop/gate-diff.ts +29 -0
  405. package/scripts/release-loop/gate-node.ts +353 -0
  406. package/scripts/release-loop/node-verdict.ts +85 -0
  407. package/scripts/release-loop/prepare-node.ts +31 -0
  408. package/scripts/release-loop/publish-node.ts +57 -0
  409. package/scripts/release-loop/pwa-node-verdict.ts +45 -0
  410. package/scripts/release-loop/pwa-scenarios-node.ts +140 -0
  411. package/scripts/release-loop/release-docs.ts +102 -0
  412. package/scripts/release-loop/tui-node-checks.ts +29 -0
  413. package/scripts/release-loop/tui-sim-node.ts +113 -0
  414. package/scripts/release-loop/upgrade-node.ts +25 -0
  415. package/scripts/release-loop/verify-node.ts +21 -0
  416. package/scripts/release-loop/version-node.ts +147 -0
  417. package/scripts/release-upgrade-check.sh +53 -0
  418. package/scripts/se-mission-prepare.ts +9 -15
  419. package/scripts/test-deterministic.ts +2 -1
  420. package/scripts/uninstall.sh +10 -3
  421. package/scripts/video-broll-line.ts +89 -0
  422. package/scripts/waitlist-daily-digest.ts +108 -0
  423. package/scripts/window-landings.sh +1 -1
  424. package/skills/motion-broll/LICENSE +25 -0
  425. package/skills/motion-broll/SKILL.md +150 -0
  426. package/skills/motion-broll/SOURCE.md +6 -0
  427. package/skills/motion-broll/engine/base.css +19 -0
  428. package/skills/motion-broll/engine/beats.js +11 -0
  429. package/skills/motion-broll/engine/build.py +21 -0
  430. package/skills/motion-broll/engine/fonts/Geist-Variable.woff2 +0 -0
  431. package/skills/motion-broll/engine/fonts/GeistMono-Medium.woff2 +0 -0
  432. package/skills/motion-broll/engine/fonts/OFL-Geist.txt +92 -0
  433. package/skills/motion-broll/engine/motion.js +146 -0
  434. package/skills/motion-broll/engine/render.js +22 -0
  435. package/skills/motion-broll/examples/opus-aoe2/01-opus-drop.html +41 -0
  436. package/skills/motion-broll/examples/opus-aoe2/02-pip-builds.html +110 -0
  437. package/skills/motion-broll/examples/opus-aoe2/03-effort-slider.html +38 -0
  438. package/skills/motion-broll/examples/opus-aoe2/04-master-prompt.html +56 -0
  439. package/skills/motion-broll/examples/opus-aoe2/05-low-vs-max.html +49 -0
  440. package/skills/motion-broll/examples/opus-aoe2/06-chapter.html +18 -0
  441. package/skills/motion-broll/examples/opus-aoe2/plan.json +14 -0
  442. package/skills/motion-broll/reference/engine-api.md +106 -0
  443. package/skills/motion-broll/scripts/composite.py +14 -0
  444. package/skills/motion-broll/scripts/inspect_video.py +34 -0
  445. package/skills/motion-broll/scripts/make_pages.py +34 -0
  446. package/skills/motion-broll/scripts/setup.sh +16 -0
  447. package/skills/motion-broll/scripts/words.py +13 -0
  448. package/skills/motion-broll/templates/compare.html +135 -0
  449. package/skills/motion-broll/templates/viewer.html +97 -0
  450. package/skills/omni-digest/SKILL.md +260 -0
  451. package/skills/omni-digest/digest.md +197 -0
  452. package/skills/omni-digest/docs/diagrams/noncode-terminal-promotion-path-2026-08-13.mmd +32 -0
  453. package/skills/omni-digest/package-lock.json +558 -0
  454. package/skills/omni-digest/package.json +13 -0
  455. package/skills/omni-digest/scripts/main.ts +404 -0
  456. package/skills/omni-digest/src/delegate.ts +34 -0
  457. package/skills/omni-digest/src/detect.ts +46 -0
  458. package/skills/omni-digest/src/diagram.ts +72 -0
  459. package/skills/omni-digest/src/domain-staging.ts +50 -0
  460. package/skills/omni-digest/src/env.ts +38 -0
  461. package/skills/omni-digest/src/fetch.ts +237 -0
  462. package/skills/omni-digest/src/media.ts +180 -0
  463. package/skills/omni-digest/src/obsidian.ts +69 -0
  464. package/skills/omni-digest/src/ocr.ts +149 -0
  465. package/skills/omni-digest/src/router.ts +60 -0
  466. package/skills/omni-digest/src/summarize.ts +87 -0
  467. package/skills/omni-digest/src/types.ts +124 -0
  468. package/skills/omni-digest/src/util.ts +34 -0
  469. package/skills/omni-digest/src/visual.ts +129 -0
  470. package/skills/omni-digest/src/x-api.ts +151 -0
  471. package/skills/omni-digest/tsconfig.json +13 -0
  472. package/src/a2a/agent-card.ts +29 -0
  473. package/src/a2a/server.ts +173 -0
  474. package/src/acp/auto-persist.ts +3 -6
  475. package/src/acp/backend-registry.ts +6 -10
  476. package/src/acp/channel-browser-shell.ts +1 -535
  477. package/src/acp/client.ts +106 -36
  478. package/src/acp/fs-roots.ts +20 -4
  479. package/src/acp/obsidian-tags.ts +6 -3
  480. package/src/acp/server.ts +189 -32
  481. package/src/agent/pty-binding.ts +1 -1
  482. package/src/agent/spawn-embodied-agent-in-vw.ts +5 -336
  483. package/src/agent/subagent-callable.ts +39 -1
  484. package/src/agent-mission/browser-login.ts +241 -0
  485. package/src/agent-mission/capabilities-cli.ts +33 -0
  486. package/src/agent-mission/capability-matrix.ts +31 -0
  487. package/src/agent-mission/capability-readers.ts +79 -0
  488. package/src/agent-mission/capability-types.ts +15 -0
  489. package/src/agent-mission/claude-headless.ts +131 -0
  490. package/src/agent-mission/claude-subscription.ts +57 -0
  491. package/src/agent-mission/doc-guided-install.ts +185 -0
  492. package/src/agent-mission/driver.ts +821 -69
  493. package/src/agent-mission/env-profile.ts +68 -0
  494. package/src/agent-mission/handoff.ts +128 -0
  495. package/src/agent-mission/in-agent-plugin.ts +311 -0
  496. package/src/agent-mission/mission-cli.ts +19 -1
  497. package/src/agent-mission/parse.ts +9 -4
  498. package/src/agent-mission/pr-review-watch.ts +62 -13
  499. package/src/agent-mission/resource-ladder.ts +187 -0
  500. package/src/agent-mission/tool-install.ts +249 -0
  501. package/src/agent-mission/tool-ladder.ts +37 -0
  502. package/src/agent-room/room-builder.ts +6 -600
  503. package/src/agent-substrate/review-intent.ts +43 -1
  504. package/src/auth/scope.ts +8 -4
  505. package/src/auth/temp-tokens.ts +131 -0
  506. package/src/auto-research/obsidian-bridge.ts +2 -0
  507. package/src/autopilot/build/integrity-gate.ts +27 -4
  508. package/src/autopilot/build/isolated-instance.ts +2 -1
  509. package/src/autopilot/build/llm-conflict-merge.ts +27 -0
  510. package/src/autopilot/llm-control-brain.ts +54 -12
  511. package/src/autopilot/mission-engine.ts +15 -1
  512. package/src/autopilot/mission-notify.ts +4 -2
  513. package/src/autopilot/mission-origin.ts +5 -5
  514. package/src/autopilot/mission-phase-track.ts +52 -0
  515. package/src/autopilot/mission-tool.ts +1 -1
  516. package/src/autopilot/pty-control-loop.ts +94 -2
  517. package/src/autopilot/track-agent.ts +138 -0
  518. package/src/autopilot/track-courier.ts +153 -0
  519. package/src/boot/acp-server.ts +16 -2
  520. package/src/boot/check-same-origin.ts +19 -5
  521. package/src/boot/daemon-multi-llm-runtime.ts +14 -8
  522. package/src/boot/daemon-prompt-turn.ts +2 -0
  523. package/src/boot/daemon-runtime.ts +36 -14
  524. package/src/boot/daemon-tools/index.ts +16 -0
  525. package/src/boot/daemon-tools/self-implement.ts +4 -0
  526. package/src/boot/daemon-tools/types.ts +3 -0
  527. package/src/browser-cdp/chrome-flags.ts +7 -0
  528. package/src/browser-cdp/client.ts +2 -0
  529. package/src/browser-pane/mount.ts +1 -246
  530. package/src/budget/codex-reset-credit-state.ts +15 -0
  531. package/src/budget/fetchers/codex.ts +2 -1
  532. package/src/budget/run-usage-rollup.ts +11 -4
  533. package/src/budget/unified-usage.ts +2 -1
  534. package/src/capture/tui-self-report.ts +10 -0
  535. package/src/channel-bot-token.ts +126 -0
  536. package/src/chat/index.ts +21 -45
  537. package/src/chat/input-text-key.ts +2 -2
  538. package/src/chat/mode/manual.ts +2 -4
  539. package/src/chat/pickers/state.ts +10 -27
  540. package/src/chat/search/modal.ts +14 -2
  541. package/src/chat/tool-render/types.ts +1 -1
  542. package/src/chat/turn-typeahead.ts +2 -1
  543. package/src/chat/wrap.ts +6 -8
  544. package/src/cli/__fixtures__/agent-help-before/agent.txt +18 -0
  545. package/src/cli/__fixtures__/agent-help-before/registry.txt +13 -0
  546. package/src/cli/__fixtures__/agent-help-before/root.txt +100 -0
  547. package/src/cli/__fixtures__/agent-help-before/tier.txt +15 -0
  548. package/src/cli/a2a-cli.ts +52 -0
  549. package/src/cli/agent-cli.ts +721 -0
  550. package/src/cli/autopilot-cli.ts +739 -0
  551. package/src/cli/bg-launch.ts +20 -4
  552. package/src/cli/claude-plugin-setup.ts +199 -0
  553. package/src/cli/config-test-sync.ts +94 -10
  554. package/src/cli/connector-cli.ts +204 -0
  555. package/src/cli/control-cli.ts +220 -0
  556. package/src/cli/control-join-cli.ts +142 -0
  557. package/src/cli/docs-cli.ts +38 -0
  558. package/src/cli/doctor-cli.ts +225 -26
  559. package/src/cli/doctor-distro.ts +17 -1
  560. package/src/cli/doctor-fix.ts +145 -17
  561. package/src/cli/doctor-llm-assist.ts +71 -0
  562. package/src/cli/doctor-private-files.ts +66 -0
  563. package/src/cli/doctor-readiness.ts +8 -5
  564. package/src/cli/fleet-cli.ts +63 -0
  565. package/src/cli/g6a-registration-probe.ts +16 -0
  566. package/src/cli/git-install-plan.ts +51 -0
  567. package/src/cli/hooks-cli.ts +44 -0
  568. package/src/cli/ingest-token-cli.ts +21 -0
  569. package/src/cli/intake-cli.ts +416 -0
  570. package/src/cli/labels-cli.ts +74 -0
  571. package/src/cli/leader-cli.ts +10 -159
  572. package/src/cli/live-cli.ts +48 -0
  573. package/src/cli/llm-detect-cli.ts +130 -0
  574. package/src/cli/logs-cli.ts +231 -7
  575. package/src/cli/machine-cli.ts +38 -0
  576. package/src/cli/mcp-call.ts +43 -13
  577. package/src/cli/mcp-gateway-cli.ts +90 -0
  578. package/src/cli/mcp-login.ts +116 -8
  579. package/src/cli/mcp-reload.ts +20 -3
  580. package/src/cli/nexus-dist.ts +18 -13
  581. package/src/cli/nexus-ios-bind.ts +20 -7
  582. package/src/cli/ops-cli.ts +225 -0
  583. package/src/cli/plugin-cli.ts +103 -0
  584. package/src/cli/pod-cli.ts +83 -0
  585. package/src/cli/port-lease-local.ts +124 -0
  586. package/src/cli/pr-cli.ts +12 -1
  587. package/src/cli/provider-cli.ts +720 -0
  588. package/src/cli/pty-record-cli.ts +63 -0
  589. package/src/cli/pty-takeover-cli.ts +57 -40
  590. package/src/cli/pty-web-address.ts +52 -0
  591. package/src/cli/publish-cli.ts +44 -0
  592. package/src/cli/pwa-build.ts +18 -12
  593. package/src/cli/pwa-dev.ts +13 -8
  594. package/src/cli/pwa-registry.ts +6 -0
  595. package/src/cli/pwa-share.ts +65 -22
  596. package/src/cli/pwa-show.ts +20 -4
  597. package/src/cli/pwa-start.ts +99 -27
  598. package/src/cli/pwa-test.ts +201 -96
  599. package/src/cli/release-cli.ts +90 -7
  600. package/src/cli/remotes-cli.ts +20 -1
  601. package/src/cli/remotes.ts +2 -1
  602. package/src/cli/repo-cli.ts +315 -36
  603. package/src/cli/research-cli.ts +66 -0
  604. package/src/cli/role-cli.ts +320 -0
  605. package/src/cli/schedule-cli.ts +246 -0
  606. package/src/cli/self-update.ts +98 -10
  607. package/src/cli/setup-cli.ts +64 -2
  608. package/src/cli/shadow-cli.ts +188 -0
  609. package/src/cli/share-auto-mount.ts +12 -8
  610. package/src/cli/start-cli.ts +221 -0
  611. package/src/cli/stdout-flush.ts +8 -0
  612. package/src/cli/storage-cli.ts +334 -0
  613. package/src/cli/tailscale-serve.ts +34 -19
  614. package/src/cli/tasks-cli.ts +176 -0
  615. package/src/cli/test-state-dir-flag.ts +1 -1
  616. package/src/cli/usage-cli.ts +15 -4
  617. package/src/cli/where-cli.ts +22 -55
  618. package/src/code-edit/diff-render.ts +6 -32
  619. package/src/code-edit/source-delta-browser.ts +0 -1
  620. package/src/codex/models.ts +1 -1
  621. package/src/config.ts +8 -13
  622. package/src/connectors/event-ledger.ts +41 -0
  623. package/src/connectors/linear-projector.ts +88 -0
  624. package/src/connectors/linear.ts +143 -0
  625. package/src/connectors/types.ts +19 -0
  626. package/src/control-plane/lease-holder.ts +41 -0
  627. package/src/control-plane/ledger.ts +146 -0
  628. package/src/control-plane/light-member.ts +164 -0
  629. package/src/control-plane/member-tokens.ts +88 -0
  630. package/src/control-plane/member.ts +159 -0
  631. package/src/control-plane/port-lease-heartbeat.ts +101 -0
  632. package/src/control-plane/ports.ts +40 -0
  633. package/src/control-plane/primary.ts +169 -0
  634. package/src/control-plane/server.ts +216 -0
  635. package/src/dashboard/acp-boot.ts +11 -38
  636. package/src/dashboard/assistant-render-state-runtime.ts +2 -2
  637. package/src/dashboard/assistant-sample-runtime.ts +2 -2
  638. package/src/dashboard/auto-compact-runtime.ts +11 -16
  639. package/src/dashboard/browser-help-runtime.ts +2 -3
  640. package/src/dashboard/chat/acp-chat.ts +2 -5
  641. package/src/dashboard/code-edit-post-turn-runtime.ts +1 -2
  642. package/src/dashboard/compact-surface-assembly.ts +0 -14
  643. package/src/dashboard/compact-surface-dispatch.ts +1 -38
  644. package/src/dashboard/compact-surface-inventory.ts +0 -8
  645. package/src/dashboard/compact-surface-runtime.ts +0 -14
  646. package/src/dashboard/context-menu-provider-boot.ts +0 -9
  647. package/src/dashboard/context-window-runtime-boot.ts +0 -37
  648. package/src/dashboard/index.ts +278 -2558
  649. package/src/dashboard/input/chat-main-plain-turn-runtime.ts +0 -6
  650. package/src/dashboard/input/chat-main-slash-command.ts +2 -2
  651. package/src/dashboard/input/dashboard-priority-key-route.ts +1 -43
  652. package/src/dashboard/input/mouse-modal-surface-runtime.ts +1 -5
  653. package/src/dashboard/input/mouse-wiring.ts +2 -3
  654. package/src/dashboard/layout-display-runtime-registration.ts +0 -10
  655. package/src/dashboard/modals/pane-multi.ts +1 -1
  656. package/src/dashboard/replay-preview.ts +1 -1
  657. package/src/dashboard/runtime/approvers.ts +0 -1
  658. package/src/dashboard/runtime/state-snapshot.ts +0 -90
  659. package/src/dashboard/scenario-runtime-boot.ts +16 -16
  660. package/src/dashboard/slash-runtime/dashboard-handlers.ts +134 -1456
  661. package/src/dashboard/slash-runtime/design-pick.ts +96 -0
  662. package/src/dashboard/slash-runtime/help-from-registry.ts +77 -0
  663. package/src/dashboard/surface-registry-wiring.ts +2 -15
  664. package/src/dashboard/turn-message-runtime.ts +0 -4
  665. package/src/dashboard/turn-preamble.ts +1 -1
  666. package/src/dashboard/turn-stream-formatter.ts +2 -2
  667. package/src/dashboard/turn-stream-runtime.ts +2 -2
  668. package/src/dashboard-pane-context-menu.ts +0 -14
  669. package/src/debug/log.ts +7 -0
  670. package/src/decide/boundary-shadow.ts +131 -0
  671. package/src/design/apply-direction.ts +209 -0
  672. package/src/design/css-root-tokens.ts +89 -0
  673. package/src/design/custom-system-create.ts +230 -0
  674. package/src/design/design-directions.ts +61 -41
  675. package/src/design/design-gate.ts +241 -0
  676. package/src/design/design-library.ts +57 -0
  677. package/src/design/design-previews.ts +138 -0
  678. package/src/design/design-systems.ts +61 -0
  679. package/src/design/lint-artifact-run.ts +46 -6
  680. package/src/design/lint-artifact.ts +5 -1
  681. package/src/design/open-design-client.ts +247 -0
  682. package/src/design/system-from-extract.ts +767 -0
  683. package/src/design/system-schema.ts +123 -0
  684. package/src/discord-slash-wire.ts +2 -1
  685. package/src/discord-test-runner.ts +2 -1
  686. package/src/discord-voice-wire.ts +2 -1
  687. package/src/discord.ts +1 -1
  688. package/src/dispatch/opportunistic-launcher.ts +24 -1
  689. package/src/domains/ops-status.ts +35 -2
  690. package/src/domains/outbound-alert.ts +16 -4
  691. package/src/domains/repeated-failure.ts +89 -0
  692. package/src/domains/schedule-manage-tool.ts +28 -8
  693. package/src/domains/schedule-migrate.ts +22 -4
  694. package/src/domains/schedule-registry.ts +88 -33
  695. package/src/domains/schedule-runs.ts +132 -0
  696. package/src/domains/schedule-state.ts +152 -0
  697. package/src/element-registry/address.ts +1 -3
  698. package/src/git-fs/gh-cli.ts +47 -17
  699. package/src/git-fs/retry.ts +1 -0
  700. package/src/git-fs/runner.ts +1 -0
  701. package/src/git-fs/worktree.ts +6 -5
  702. package/src/github/pr-labels.ts +68 -0
  703. package/src/graph-kinds/plugin-nodes.ts +60 -0
  704. package/src/graph-kinds/registry.ts +118 -0
  705. package/src/graph-runner/graph-cli.ts +103 -0
  706. package/src/graph-runner/graph-notify.ts +220 -0
  707. package/src/graph-runner/graph-tick.ts +119 -0
  708. package/src/graph-runner/release-manifest.ts +93 -0
  709. package/src/graph-runner/runner.ts +457 -0
  710. package/src/grok/credential.ts +158 -5
  711. package/src/grounding/ensure-grounding.ts +131 -0
  712. package/src/grounding/mirror-export.ts +89 -0
  713. package/src/grounding/mirror-manifest.ts +252 -0
  714. package/src/grounding/sources-cli.ts +209 -0
  715. package/src/grounding/sources.ts +333 -0
  716. package/src/grounding/token.ts +115 -0
  717. package/src/harness/harness-cli-command.ts +352 -19
  718. package/src/harness/harness-pod-dispatch.ts +110 -0
  719. package/src/harness/harness-stop.ts +131 -0
  720. package/src/harness/harness-substrate-default.ts +40 -0
  721. package/src/harness/harness-worktrees.ts +1 -1
  722. package/src/harness/harness-write-boundary.ts +2 -0
  723. package/src/harness/llm-decompose.ts +2 -1
  724. package/src/harness/self-send-decide.ts +224 -0
  725. package/src/harness/shell-relay.ts +5 -0
  726. package/src/hooks/providers.ts +77 -0
  727. package/src/hooks/queue.ts +73 -0
  728. package/src/hooks/receiver.ts +133 -0
  729. package/src/index.ts +666 -3406
  730. package/src/input-core/dispatcher.ts +1 -1
  731. package/src/input-core/drag-esc-interceptor.ts +1 -1
  732. package/src/instance/current.ts +5 -5
  733. package/src/instance/leader.ts +10 -326
  734. package/src/instance/nexus-run-refusal.ts +27 -92
  735. package/src/instance/project-local-exclude.ts +27 -0
  736. package/src/instance/resolve.ts +40 -175
  737. package/src/intake-plane/capture.ts +14 -1
  738. package/src/intake-plane/check.ts +34 -14
  739. package/src/intake-plane/collect-github.ts +258 -0
  740. package/src/intake-plane/collect-pod.ts +100 -0
  741. package/src/intake-plane/collect-telegram-saved.ts +86 -0
  742. package/src/intake-plane/digest.ts +102 -0
  743. package/src/intake-plane/enrich-plugins.ts +1 -1
  744. package/src/intake-plane/front-classifier.ts +56 -0
  745. package/src/intake-plane/front-route-classifier.ts +80 -0
  746. package/src/intake-plane/front-route-rules.ts +152 -0
  747. package/src/intake-plane/grounding-docs.ts +185 -0
  748. package/src/intake-plane/harness-target.ts +20 -0
  749. package/src/intake-plane/intake-to-tasks.ts +303 -0
  750. package/src/intake-plane/items.ts +247 -0
  751. package/src/intake-plane/link-ledger.ts +27 -0
  752. package/src/intake-plane/route.ts +104 -0
  753. package/src/intake-plane/runtime-callables.ts +3 -1
  754. package/src/intake-plane/sketch-ledger.ts +34 -0
  755. package/src/intake-plane/slash.ts +30 -2
  756. package/src/intake-plane/submit-intake-work.ts +160 -0
  757. package/src/intake-plane/telegram-work.ts +56 -0
  758. package/src/iul/sidebar-shell.ts +0 -165
  759. package/src/launch-head/capability-check.ts +162 -0
  760. package/src/launch-head/launch-head-cli.ts +242 -0
  761. package/src/launch-head/load-balance.ts +81 -0
  762. package/src/live/detail-switch.ts +175 -0
  763. package/src/llm/provider-detect.ts +247 -0
  764. package/src/llm/provider-probe.ts +57 -0
  765. package/src/llm.ts +55 -23
  766. package/src/log-entry.ts +1 -1
  767. package/src/log-pane/attachment-popup.ts +1 -2
  768. package/src/loops/loop-cli.ts +37 -0
  769. package/src/loops/registry.ts +174 -0
  770. package/src/market/official-keys.ts +5 -0
  771. package/src/market/publish.ts +273 -0
  772. package/src/market/signed-index.ts +156 -0
  773. package/src/market/tgz.ts +121 -0
  774. package/src/mcp/client.ts +1 -1
  775. package/src/mcp/mcp-oauth.ts +40 -5
  776. package/src/mcp/server.ts +75 -7
  777. package/src/mcp-gateway/gateway.ts +128 -0
  778. package/src/mcp-gateway/pat-store.ts +124 -0
  779. package/src/mss/logging/log-store.ts +91 -2
  780. package/src/mss/logging/scoped-level.ts +5 -9
  781. package/src/native-tool-catalog.ts +64 -343
  782. package/src/nexus/api/connect-info.ts +23 -25
  783. package/src/nexus/api/context-url.ts +1 -1
  784. package/src/nexus/api/design-check.ts +90 -59
  785. package/src/nexus/api/design-previews-route.ts +182 -0
  786. package/src/nexus/api/design-system-create-route.ts +123 -0
  787. package/src/nexus/api/graph-kinds.ts +69 -0
  788. package/src/nexus/api/graphs-api.ts +221 -0
  789. package/src/nexus/api/harness-api.ts +31 -2
  790. package/src/nexus/api/health.ts +15 -0
  791. package/src/nexus/api/http-server.ts +274 -43
  792. package/src/nexus/api/image-generate.ts +3 -0
  793. package/src/nexus/api/ingest-token.ts +175 -0
  794. package/src/nexus/api/intake-ledger-api.ts +54 -0
  795. package/src/nexus/api/intake-route.ts +111 -0
  796. package/src/nexus/api/json-response.ts +33 -0
  797. package/src/nexus/api/live-detail.ts +47 -0
  798. package/src/nexus/api/live-shipped.ts +78 -0
  799. package/src/nexus/api/log-fabric.ts +33 -2
  800. package/src/nexus/api/markdown-publish.ts +3 -2
  801. package/src/nexus/api/mcp-http.ts +14 -9
  802. package/src/nexus/api/mcp-oauth-hint.ts +30 -0
  803. package/src/nexus/api/mcp-public-allowlist.ts +33 -0
  804. package/src/nexus/api/merge-approvals-gate.ts +79 -0
  805. package/src/nexus/api/merge-approvals.ts +306 -0
  806. package/src/nexus/api/meta-api.ts +4 -0
  807. package/src/nexus/api/next-fluent-wiring.ts +7 -9
  808. package/src/nexus/api/plugins-market.ts +125 -0
  809. package/src/nexus/api/pod-credential-api.ts +133 -0
  810. package/src/nexus/api/public-routes.ts +80 -0
  811. package/src/nexus/api/rest-route-paths.ts +15 -0
  812. package/src/nexus/api/schedules-action.ts +12 -3
  813. package/src/nexus/api/schedules-read.ts +228 -0
  814. package/src/nexus/api/sessions-store.ts +8 -2
  815. package/src/nexus/api/setup-answer-priority.ts +130 -0
  816. package/src/nexus/api/setup-channel-bot.ts +56 -0
  817. package/src/nexus/api/setup-child-llm.ts +228 -0
  818. package/src/nexus/api/setup-obsidian-skills.ts +93 -0
  819. package/src/nexus/api/task-cards-api.ts +34 -0
  820. package/src/nexus/api/tasks-create.ts +136 -0
  821. package/src/nexus/api/telegram-trigger-bot.ts +3 -3
  822. package/src/nexus/api/terminals.ts +204 -18
  823. package/src/nexus/api/trace.ts +354 -0
  824. package/src/nexus/api/vault-api.ts +140 -7
  825. package/src/nexus/api/worktrees.ts +18 -2
  826. package/src/nexus/boot/register-mcp-clients.ts +38 -4
  827. package/src/nexus/daemon-endpoint.ts +85 -0
  828. package/src/nexus/default-port.ts +1 -0
  829. package/src/nexus/index.ts +329 -111
  830. package/src/nexus/onboarding/pwa-share-prompt.ts +31 -8
  831. package/src/nexus/onboarding/tailscale-probe.ts +9 -1
  832. package/src/nexus/setup-status.ts +58 -0
  833. package/src/nexus/supervisor/lock.ts +8 -0
  834. package/src/nexus/webterm/pty.ts +15 -0
  835. package/src/oauth/codex-account-rotation.ts +122 -16
  836. package/src/oauth/codex-account-store.ts +88 -19
  837. package/src/oauth/codex-quota-policy.ts +55 -0
  838. package/src/oauth/store.ts +28 -25
  839. package/src/obsidian/default-vault.ts +17 -0
  840. package/src/obsidian/vault-write-guard.ts +46 -0
  841. package/src/onboarding/help/llm.md +2 -2
  842. package/src/onboarding.ts +2 -2
  843. package/src/panes/alt-skip-predicate.ts +4 -3
  844. package/src/panes/external-terminal-pane.ts +3 -4
  845. package/src/panes/factory.ts +1 -18
  846. package/src/panes/index.ts +1 -5
  847. package/src/panes/pane-cycle.ts +1 -1
  848. package/src/panes/types.ts +1 -1
  849. package/src/platform/env-literal.ts +4 -0
  850. package/src/plugin-hooks/dispatcher.ts +10 -4
  851. package/src/plugins/core/host.ts +94 -4
  852. package/src/plugins/core/manifest.ts +104 -7
  853. package/src/plugins/install/market-fetch.ts +249 -0
  854. package/src/plugins/install/plugin-install.ts +387 -0
  855. package/src/policy/claude-subscription-guard.ts +25 -0
  856. package/src/preview/terminal.ts +24 -1
  857. package/src/preview-pane/mount.ts +1 -142
  858. package/src/prompt/references.ts +4 -51
  859. package/src/pty-shell/pty-control-ipc.ts +57 -3
  860. package/src/pty-shell/pty-mouse.ts +75 -0
  861. package/src/pty-shell/pty-recording.ts +108 -0
  862. package/src/pty-shell/registry.ts +53 -3
  863. package/src/python/resolve-python.ts +1 -1
  864. package/src/release-loop/manifest.ts +65 -0
  865. package/src/release-loop/release-note.ts +174 -0
  866. package/src/roles/lease-cas.ts +52 -0
  867. package/src/roles/machine-name.ts +48 -0
  868. package/src/roles/machine-profile.ts +65 -0
  869. package/src/roles/role-lease-read.ts +81 -0
  870. package/src/roles/role-lease.ts +63 -0
  871. package/src/roles/role-watch.ts +69 -0
  872. package/src/self-dev/ask-launch-flow.ts +39 -22
  873. package/src/self-dev/ask-launch-io.ts +1 -1
  874. package/src/self-dev/dev-cli.ts +250 -139
  875. package/src/self-dev/dev-pipeline.ts +80 -8
  876. package/src/self-dev/draft-sweep.ts +231 -0
  877. package/src/self-dev/draft-triage-rules.ts +42 -0
  878. package/src/self-dev/entrance-baseline.ts +156 -4
  879. package/src/self-dev/fabric-decompose-adapter.ts +10 -0
  880. package/src/self-dev/launch-preflight.ts +1 -1
  881. package/src/self-dev/orchestrate.ts +297 -20
  882. package/src/self-dev/repair-signals.ts +6 -0
  883. package/src/self-dev/run-store.ts +20 -5
  884. package/src/self-dev/run-supervisor.ts +43 -3
  885. package/src/self-implement/abandoned-classification.ts +15 -1
  886. package/src/self-implement/blocked-draft-policy.ts +6 -0
  887. package/src/self-implement/budget-gate.ts +236 -0
  888. package/src/self-implement/child-llm-preference.ts +84 -0
  889. package/src/self-implement/decision-events.ts +57 -0
  890. package/src/self-implement/decision-signal-press.ts +5 -2
  891. package/src/self-implement/dependency-change-gate.ts +90 -0
  892. package/src/self-implement/gate-baseline.ts +32 -1
  893. package/src/self-implement/gate-cli.ts +29 -7
  894. package/src/self-implement/gate-scope.ts +7 -1
  895. package/src/self-implement/goal-author-decompose.ts +22 -4
  896. package/src/self-implement/goal-author.ts +23 -2
  897. package/src/self-implement/goal-boundary.ts +65 -0
  898. package/src/self-implement/goal-clarification-escalation.ts +1 -0
  899. package/src/self-implement/goal-documents-dir.ts +6 -1
  900. package/src/self-implement/goal-execution-records.ts +58 -0
  901. package/src/self-implement/goal-run-store.ts +42 -24
  902. package/src/self-implement/graph-authority.ts +13 -28
  903. package/src/self-implement/graph-catalog.ts +48 -0
  904. package/src/self-implement/graph-run-contract.ts +127 -0
  905. package/src/self-implement/graph-templates.ts +14 -7
  906. package/src/self-implement/graph-yaml.ts +35 -6
  907. package/src/self-implement/harness-policy-gates.ts +42 -0
  908. package/src/self-implement/headless-elanous-driver.ts +30 -6
  909. package/src/self-implement/heal-triage.ts +229 -0
  910. package/src/self-implement/host-regate.ts +240 -0
  911. package/src/self-implement/non-git-consent.ts +23 -0
  912. package/src/self-implement/orchestrator.ts +481 -132
  913. package/src/self-implement/pipeline-shape.ts +1 -1
  914. package/src/self-implement/pr-evidence-artifact.ts +6 -19
  915. package/src/self-implement/prior-draft-findings.ts +128 -0
  916. package/src/self-implement/pwa-import-graph.ts +65 -0
  917. package/src/self-implement/repo-provision.ts +18 -21
  918. package/src/self-implement/report-origin.ts +39 -0
  919. package/src/self-implement/rework-policy.ts +21 -0
  920. package/src/self-implement/run-ledger-compact.ts +438 -0
  921. package/src/self-implement/run-ledger.ts +212 -29
  922. package/src/self-implement/run-report.ts +24 -0
  923. package/src/self-implement/run-status-mapping.ts +2 -0
  924. package/src/self-implement/running-runs.ts +112 -14
  925. package/src/self-implement/scoped-typecheck-config.ts +49 -0
  926. package/src/self-implement/seams.ts +203 -38
  927. package/src/self-implement/self-implement-cli.ts +17 -2
  928. package/src/self-implement/shadow-repo.ts +350 -0
  929. package/src/self-implement/supervision-vocabulary.ts +7 -0
  930. package/src/shell-runner/dispatch.ts +3 -0
  931. package/src/shell-runner/index.ts +0 -7
  932. package/src/skills/runner.ts +0 -69
  933. package/src/skills/tools/agent-room-slash.ts +2 -1
  934. package/src/skills/tools/agent-room.ts +8 -140
  935. package/src/skills/tools/agent.ts +5 -3
  936. package/src/skills/tools/context.ts +5 -140
  937. package/src/skills/tools/control.ts +4 -188
  938. package/src/skills/tools/dashboard-slash.ts +3 -11
  939. package/src/skills/tools/dashboard-state.ts +3 -5
  940. package/src/skills/tools/dev-harness.ts +3 -2
  941. package/src/skills/tools/omni-search.ts +29 -1
  942. package/src/skills/tools/shell.ts +11 -29
  943. package/src/skills/tools/spawn-coding-agent-headless.ts +6 -9
  944. package/src/ssh/ssh-picker-modal.ts +1 -1
  945. package/src/steward/directive.ts +99 -0
  946. package/src/steward/triage.ts +203 -0
  947. package/src/storage/cli-bin.ts +67 -0
  948. package/src/storage/object-store-visibility.ts +169 -0
  949. package/src/storage/object-store.ts +452 -0
  950. package/src/storage/s3.ts +53 -10
  951. package/src/storage/storage-detect.ts +337 -0
  952. package/src/surface/address.ts +3 -5
  953. package/src/surface/index.ts +0 -6
  954. package/src/surface/llm-tools.ts +1 -2
  955. package/src/surface/shell-runner-boot.ts +4 -89
  956. package/src/task-cards/card-cli.ts +64 -0
  957. package/src/task-cards/card-store.ts +241 -0
  958. package/src/task-orchestrator/boot.ts +27 -1
  959. package/src/task-orchestrator/dispatcher.ts +49 -7
  960. package/src/task-orchestrator/external-fingerprint.ts +10 -0
  961. package/src/task-orchestrator/external-policy.ts +86 -0
  962. package/src/task-orchestrator/feedback-loop.ts +4 -2
  963. package/src/task-orchestrator/graph.ts +18 -1
  964. package/src/task-orchestrator/runtimes/create.ts +128 -0
  965. package/src/task-orchestrator/store.ts +78 -18
  966. package/src/task-orchestrator/surface-registry.ts +5 -2
  967. package/src/task-orchestrator/surfaces/external-exec.ts +180 -0
  968. package/src/task-orchestrator/surfaces/idea-approval-pr.ts +118 -0
  969. package/src/task-orchestrator/surfaces/index.ts +4 -3
  970. package/src/task-orchestrator/surfaces/pod-account-broker.ts +60 -5
  971. package/src/task-orchestrator/surfaces/pod-artifact-return.ts +136 -0
  972. package/src/task-orchestrator/surfaces/pod-command-job.ts +348 -0
  973. package/src/task-orchestrator/surfaces/pod-ledger-collect.ts +177 -0
  974. package/src/task-orchestrator/surfaces/pod-pool.ts +128 -12
  975. package/src/task-orchestrator/surfaces/pod-skills.ts +11 -3
  976. package/src/task-orchestrator/surfaces/pod-source-bundle.ts +132 -0
  977. package/src/task-orchestrator/surfaces/pod-source-receive.ts +91 -0
  978. package/src/task-orchestrator/surfaces/pod-source-spec.ts +77 -0
  979. package/src/task-orchestrator/surfaces/self-implement-pod.ts +782 -41
  980. package/src/task-orchestrator/surfaces/self-implement.ts +8 -1
  981. package/src/task-orchestrator/tox-loop.ts +204 -0
  982. package/src/task-orchestrator/types.ts +21 -1
  983. package/src/telegram-commands.ts +8 -0
  984. package/src/telegram-report.ts +2 -1
  985. package/src/telegram-run.ts +18 -5
  986. package/src/telegram.ts +92 -22
  987. package/src/tool-runtime/acp-session-runtime.ts +28 -7
  988. package/src/tool-runtime/agent-runtime.ts +1 -0
  989. package/src/tool-runtime/context-runtime.ts +18 -35
  990. package/src/tool-runtime/control-runtime.ts +8 -21
  991. package/src/tool-runtime/dashboard-state-runtime.ts +1 -5
  992. package/src/tool-runtime/elanous-asana-runtimes.ts +205 -0
  993. package/src/tool-runtime/elanous-control-runtimes.ts +16 -2
  994. package/src/tool-runtime/elanous-task-submit-runtime.ts +124 -0
  995. package/src/tool-runtime/index.ts +4 -1
  996. package/src/tool-runtime/scenario-runtimes.ts +22 -21
  997. package/src/tool-runtime/scenario-target-mount.ts +6 -32
  998. package/src/tool-runtime/types.ts +8 -0
  999. package/src/tui/chat/attachment-summary.ts +4 -4
  1000. package/src/tui-client/headless-core-guard.ts +0 -1
  1001. package/src/tui.ts +8 -5
  1002. package/src/typecheck-ratchet.ts +15 -0
  1003. package/src/ui/hover-presenter.ts +3 -7
  1004. package/src/user-config.ts +427 -190
  1005. package/src/version/code-revision.ts +33 -8
  1006. package/src/version/packed-revision.json +1 -1
  1007. package/src/video-pipeline/broll-agent.ts +102 -0
  1008. package/src/video-pipeline/recipes/broll.ts +263 -0
  1009. package/src/video-pipeline/walk-line.ts +2 -1
  1010. package/src/views/scratch-image-size.ts +10 -0
  1011. package/src/voice/channel-adapters/pwa-voice-adapter.ts +2 -18
  1012. package/src/voice/channel-adapters/telegram-voice-adapter.ts +1 -6
  1013. package/src/voice/voice-tts-singleton.ts +46 -8
  1014. package/src/web-push/vapid-keys.ts +1 -1
  1015. package/src/web-search/index.ts +5 -5
  1016. package/src/web-terminal/preview-tap-registry.ts +152 -43
  1017. package/src/workflow-runtime/executor.ts +18 -22
  1018. package/src/workflow-runtime/node-catalog.ts +20 -1
  1019. package/src/workflow-runtime/nodes/bash.ts +1 -0
  1020. package/src/workflow-runtime/nodes/task.ts +74 -0
  1021. package/src/workflow-runtime/nodes/triggers.ts +24 -1
  1022. package/src/workflow-runtime/plugin-kind-node.ts +138 -0
  1023. package/src/workflow-runtime/schema.ts +98 -2
  1024. package/src/workflow-runtime/triggers/webhook-router.ts +43 -3
  1025. package/src/workflow-runtime/triggers/webhook-source.ts +19 -1
  1026. package/src/workflow-runtime/types.ts +74 -4
  1027. package/apps/pwa/out/_next/static/Ksn99fVf2HUWhSyV1-FC8/_buildManifest.js +0 -1
  1028. package/apps/pwa/out/_next/static/chunks/1176-4943bd83b00e53a2.js +0 -25
  1029. package/apps/pwa/out/_next/static/chunks/1380-9c652e1002032c86.js +0 -1
  1030. package/apps/pwa/out/_next/static/chunks/1863-2ea170dfec26b88b.js +0 -1
  1031. package/apps/pwa/out/_next/static/chunks/2091-2d6b7f4f16300f83.js +0 -1
  1032. package/apps/pwa/out/_next/static/chunks/2347-366617ec73babe3b.js +0 -1
  1033. package/apps/pwa/out/_next/static/chunks/2598.814f64e3268634e7.js +0 -1
  1034. package/apps/pwa/out/_next/static/chunks/3089-e60cc8f5d35ee239.js +0 -1
  1035. package/apps/pwa/out/_next/static/chunks/3158-c77ed9ea34f9cc9f.js +0 -1
  1036. package/apps/pwa/out/_next/static/chunks/3607-f0b5c5ee18fcf56a.js +0 -1
  1037. package/apps/pwa/out/_next/static/chunks/3659-05b2d5d971b42dbc.js +0 -1
  1038. package/apps/pwa/out/_next/static/chunks/3736-b6a7bfdcb8f56ec6.js +0 -1
  1039. package/apps/pwa/out/_next/static/chunks/3839-eebf298e89a7bb77.js +0 -1
  1040. package/apps/pwa/out/_next/static/chunks/4012.832a2824b978e7ee.js +0 -5
  1041. package/apps/pwa/out/_next/static/chunks/4706-d85d7f3345f3ff91.js +0 -1
  1042. package/apps/pwa/out/_next/static/chunks/526-17a6a2e0e6dc4498.js +0 -1
  1043. package/apps/pwa/out/_next/static/chunks/5508-676ac75f2757ad40.js +0 -1
  1044. package/apps/pwa/out/_next/static/chunks/5583-8a0317f4b8e68db9.js +0 -1
  1045. package/apps/pwa/out/_next/static/chunks/5927.8378481a12cc8044.js +0 -1
  1046. package/apps/pwa/out/_next/static/chunks/6258-b58f722b10e8d31d.js +0 -1
  1047. package/apps/pwa/out/_next/static/chunks/6820-32fd097e6186fdc9.js +0 -1
  1048. package/apps/pwa/out/_next/static/chunks/6852-983db7ca958634b7.js +0 -1
  1049. package/apps/pwa/out/_next/static/chunks/7235-e583e4a015e159b9.js +0 -1
  1050. package/apps/pwa/out/_next/static/chunks/7482-7b417330b24a996a.js +0 -1
  1051. package/apps/pwa/out/_next/static/chunks/7701-99b7d4dedb955bf8.js +0 -1
  1052. package/apps/pwa/out/_next/static/chunks/77f1928d-bd3777589042d3ea.js +0 -1
  1053. package/apps/pwa/out/_next/static/chunks/8366-36956cafc5e33614.js +0 -1
  1054. package/apps/pwa/out/_next/static/chunks/8370-23d0de995be666f8.js +0 -1
  1055. package/apps/pwa/out/_next/static/chunks/8617-307421f3b0e8b2a2.js +0 -1
  1056. package/apps/pwa/out/_next/static/chunks/8837-e45de46a9fedf1f5.js +0 -1
  1057. package/apps/pwa/out/_next/static/chunks/9058-0e8055a5ea3ebdd6.js +0 -1
  1058. package/apps/pwa/out/_next/static/chunks/app/_not-found/page-84b84eca12acada4.js +0 -1
  1059. package/apps/pwa/out/_next/static/chunks/app/autopilot/page-1f23568c29e88f7a.js +0 -1
  1060. package/apps/pwa/out/_next/static/chunks/app/botlab/page-bf6fc9aafd6135a7.js +0 -1
  1061. package/apps/pwa/out/_next/static/chunks/app/bots/page-3f8539ae4b719d2e.js +0 -1
  1062. package/apps/pwa/out/_next/static/chunks/app/chat/page-d2900febb74ecf32.js +0 -1
  1063. package/apps/pwa/out/_next/static/chunks/app/control/page-e82dec647dd79c36.js +0 -1
  1064. package/apps/pwa/out/_next/static/chunks/app/dashboard/page-096ec743a8ee955a.js +0 -1
  1065. package/apps/pwa/out/_next/static/chunks/app/design-check/page-255c2ceded4b3493.js +0 -1
  1066. package/apps/pwa/out/_next/static/chunks/app/healthz/route-84b84eca12acada4.js +0 -1
  1067. package/apps/pwa/out/_next/static/chunks/app/intake/page-2db61b2f9efba61f.js +0 -1
  1068. package/apps/pwa/out/_next/static/chunks/app/layout-e11ee17f221aaa9b.js +0 -1
  1069. package/apps/pwa/out/_next/static/chunks/app/missions/[id]/page-e075974e029ce4c4.js +0 -1
  1070. package/apps/pwa/out/_next/static/chunks/app/morning/page-ec5b68a9af3366a0.js +0 -1
  1071. package/apps/pwa/out/_next/static/chunks/app/not-found-986c177afb4adae6.js +0 -1
  1072. package/apps/pwa/out/_next/static/chunks/app/observatory/page-a72781461af2f2a3.js +0 -1
  1073. package/apps/pwa/out/_next/static/chunks/app/page-92781cbaafc487ad.js +0 -1
  1074. package/apps/pwa/out/_next/static/chunks/app/reflection/page-2c14d2a1f2930f33.js +0 -1
  1075. package/apps/pwa/out/_next/static/chunks/app/scheduler/page-22ee4bf8070b2b4d.js +0 -1
  1076. package/apps/pwa/out/_next/static/chunks/app/sessions/page-9c06e4a8297942a8.js +0 -1
  1077. package/apps/pwa/out/_next/static/chunks/app/settings/devices/page-d0cd32f6d373798f.js +0 -1
  1078. package/apps/pwa/out/_next/static/chunks/app/settings/page-0c1642018d87ebb8.js +0 -1
  1079. package/apps/pwa/out/_next/static/chunks/app/setup/done/page-93e5e97d614df487.js +0 -1
  1080. package/apps/pwa/out/_next/static/chunks/app/setup/layout-84b84eca12acada4.js +0 -1
  1081. package/apps/pwa/out/_next/static/chunks/app/setup/page-b1ce871940d7393e.js +0 -1
  1082. package/apps/pwa/out/_next/static/chunks/app/share/page-ae154addf345febe.js +0 -1
  1083. package/apps/pwa/out/_next/static/chunks/app/showroom/page-90af3aa813d2053c.js +0 -1
  1084. package/apps/pwa/out/_next/static/chunks/app/tasks/page-f3f962fda428a738.js +0 -1
  1085. package/apps/pwa/out/_next/static/chunks/app/term/page-1c1f7cc1d5def06d.js +0 -1
  1086. package/apps/pwa/out/_next/static/chunks/app/vault/page-09d4cbdaaacf06c1.js +0 -1
  1087. package/apps/pwa/out/_next/static/chunks/app/workflows/chat-ui/page-e877b8e8ca90b27f.js +0 -1
  1088. package/apps/pwa/out/_next/static/chunks/app/workflows/page-71d902f463dea526.js +0 -1
  1089. package/apps/pwa/out/_next/static/chunks/app/workspace/page-40ea576cefa25fe6.js +0 -1
  1090. package/apps/pwa/out/_next/static/chunks/app/worktrees/page-a56a3f178c3831f6.js +0 -1
  1091. package/apps/pwa/out/_next/static/chunks/bcc499d1-804a270d878e0842.js +0 -1
  1092. package/apps/pwa/out/_next/static/chunks/framework-b25b7c5501c59b6d.js +0 -1
  1093. package/apps/pwa/out/_next/static/chunks/main-a9ec9da43387afff.js +0 -1
  1094. package/apps/pwa/out/_next/static/chunks/main-app-aa2c05954aaa6754.js +0 -1
  1095. package/apps/pwa/out/_next/static/chunks/pages/_app-bb3768fb4b84aebb.js +0 -1
  1096. package/apps/pwa/out/_next/static/chunks/pages/_error-2820ba75b87b2f5e.js +0 -1
  1097. package/apps/pwa/out/_next/static/chunks/webpack-58c73b145f189b1c.js +0 -1
  1098. package/apps/pwa/out/_next/static/css/effec8adf767aa75.css +0 -1
  1099. package/apps/pwa/out/dashboard/index.html +0 -1
  1100. package/apps/pwa/out/dashboard/index.txt +0 -26
  1101. package/src/acp/resident-shell.ts +0 -244
  1102. package/src/agent/spawn-local-llm-in-vw.ts +0 -240
  1103. package/src/dashboard/agent-spawn-tools-boot.ts +0 -14
  1104. package/src/dashboard/dock-picker-inventory.ts +0 -41
  1105. package/src/dashboard/goal-plan-hud-bridge.ts +0 -112
  1106. package/src/dashboard/hud-mirror.ts +0 -207
  1107. package/src/dashboard/input/mouse-dock-runtime.ts +0 -156
  1108. package/src/dashboard/input/mouse-hover-runtime.ts +0 -46
  1109. package/src/dashboard/input/mouse-pill-context-runtime.ts +0 -74
  1110. package/src/dashboard/input/mouse-workspace-restore-runtime.ts +0 -64
  1111. package/src/dashboard/input/scratch-actions.ts +0 -36
  1112. package/src/dashboard/input/virtual-window-key-router.ts +0 -24
  1113. package/src/dashboard/rich-scratch-viewers.ts +0 -77
  1114. package/src/dashboard/scratch-slash-runtime.ts +0 -36
  1115. package/src/dashboard/scratch-state-runtime.ts +0 -42
  1116. package/src/dashboard/scratch-widget-runtime.ts +0 -37
  1117. package/src/dashboard/sim-shell.ts +0 -313
  1118. package/src/dashboard/virtual-window-control-runtime.ts +0 -57
  1119. package/src/dashboard/virtual-window-help-runtime.ts +0 -113
  1120. package/src/dashboard/virtual-window-input-runtime.ts +0 -99
  1121. package/src/dashboard/virtual-window-mutation-runtime.ts +0 -102
  1122. package/src/dashboard/virtual-window-split-runtime.ts +0 -70
  1123. package/src/dashboard/vw-popup-openers.ts +0 -126
  1124. package/src/dashboard/window-picker-popup.ts +0 -74
  1125. package/src/dashboard/window-slash-runtime.ts +0 -108
  1126. package/src/dashboard/windowing/companion-slash.ts +0 -78
  1127. package/src/dashboard/windowing/fast-switch.ts +0 -138
  1128. package/src/dashboard/windowing/lifecycle.ts +0 -185
  1129. package/src/dashboard/windowing/virtual-windows.ts +0 -259
  1130. package/src/dashboard/windowing/visibility-chord.ts +0 -77
  1131. package/src/iul/resident-vw.ts +0 -55
  1132. package/src/panes/content-adapter.ts +0 -162
  1133. package/src/prompt/vw-reference.ts +0 -153
  1134. package/src/shell-runner/external-terminal-pane.ts +0 -157
  1135. package/src/sim/resident-vw.ts +0 -48
  1136. package/src/skills/tools/spawn-coding-agent-vw.ts +0 -181
  1137. package/src/skills/tools/virtual-windows.ts +0 -632
  1138. package/src/surface/adapters/window-surface-adapter.ts +0 -141
  1139. package/src/tool-runtime/layout-runtimes.ts +0 -81
  1140. package/src/tool-runtime/scenario-window-mount.ts +0 -207
  1141. package/src/views/ui-mode.ts +0 -100
  1142. package/src/virtual-window-context-menu.ts +0 -97
  1143. package/src/virtual-windows/addressing.ts +0 -195
  1144. package/src/virtual-windows/benchmark-preset.ts +0 -119
  1145. package/src/virtual-windows/event-bus.ts +0 -202
  1146. package/src/virtual-windows/layout/apply-planner.ts +0 -189
  1147. package/src/virtual-windows/layout/index.ts +0 -68
  1148. package/src/virtual-windows/layout/layout-commands.ts +0 -186
  1149. package/src/virtual-windows/layout/layout-tools.ts +0 -262
  1150. package/src/virtual-windows/layout/persistence.ts +0 -219
  1151. package/src/virtual-windows/layout/presets.ts +0 -114
  1152. package/src/virtual-windows/layout/restore-planner.ts +0 -223
  1153. package/src/virtual-windows/layout/serializer.ts +0 -197
  1154. package/src/virtual-windows/layout/tree.ts +0 -147
  1155. package/src/virtual-windows/layout/types.ts +0 -63
  1156. package/src/virtual-windows/layout-tree.ts +0 -389
  1157. package/src/virtual-windows/navigation.ts +0 -251
  1158. package/src/virtual-windows/pane-capture.ts +0 -142
  1159. package/src/virtual-windows/pane-content.ts +0 -611
  1160. package/src/virtual-windows/pane-spawner.ts +0 -278
  1161. package/src/virtual-windows/pty-tail-content.ts +0 -291
  1162. package/src/virtual-windows/resident-window.ts +0 -59
  1163. package/src/virtual-windows/secondary-action.ts +0 -25
  1164. package/src/virtual-windows/terminal-slot-content.ts +0 -165
  1165. package/src/virtual-windows/virtual-window.ts +0 -1301
  1166. package/src/virtual-windows/vw-local-input-target-popup.ts +0 -110
  1167. package/src/virtual-windows/vw-rename-modal.ts +0 -77
  1168. package/src/virtual-windows/vw-selector-popup.ts +0 -177
  1169. package/src/virtual-windows/window-registry.ts +0 -519
  1170. package/src/voice/channel-adapters/discord-voice-adapter.ts +0 -202
  1171. package/src/voice/voice-pwa-dispatch.ts +0 -245
  1172. package/src/window-picker-modal.ts +0 -135
  1173. /package/apps/pwa/out/_next/static/{Ksn99fVf2HUWhSyV1-FC8 → zoQX5iTvXOsIvCjxCe1Ji}/_ssgManifest.js +0 -0
  1174. /package/src/dashboard/{companion-slash-runtime.ts → companion-messages-runtime.ts} +0 -0
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8519],{27813:(e,t,s)=>{s.d(t,{Zr:()=>o,f6:()=>r,oD:()=>a});let n="elanous.daemon.sessionId";function r(){return"undefined"!=typeof crypto&&"function"==typeof crypto.randomUUID?crypto.randomUUID():"s-".concat(Date.now().toString(36),"-").concat(Math.random().toString(36).slice(2,10))}function a(){let e=function(){let e=new URLSearchParams(window.location.search).get("session");return e?(localStorage.setItem(n,e),e):localStorage.getItem(n)}();if(e)return e;let t=r();return localStorage.setItem(n,t),t}function o(){let e=r();return localStorage.setItem(n,e),e}},38519:(e,t,s)=>{s.d(t,{C:()=>c,DaemonProvider:()=>d,Q:()=>u});var n=s(41121),r=s(91269),a=s(49536),o=s(27813),i=s(45012),l=s(51215);let c=(0,r.createContext)(null);function d(e){let{children:t}=e,s={baseUrl:"",token:"",provider:""},[d,u]=(0,r.useState)(s),[h,f]=(0,r.useState)(""),[p]=(0,r.useState)(()=>new i.ki(s));(0,r.useEffect)(()=>{let e=(0,a.Fp)();u(e),p.updateConfig(e),f((0,o.oD)()),(0,l.cY)("webterm.provider.daemon.init",{baseUrl:e.baseUrl,hasToken:!!e.token})},[p]),(0,r.useEffect)(()=>{let e=e=>{if("elanous.daemon.token"===e.key||"elanous.nexus.baseUrl"===e.key){let t=(0,a.Fp)();p.updateConfig(t),u(t),(0,l.cY)("webterm.provider.daemon.config-cross-tab",{key:e.key,hasToken:!!t.token});return}"elanous.daemon.sessionId"===e.key&&e.newValue&&f(t=>t===e.newValue?t:((0,l.cY)("webterm.provider.daemon.session-cross-tab",{previous:t||"(empty)",next:e.newValue}),e.newValue))};return window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)},[p]);let m=e=>{u(t=>{let s={...t,...e};return(0,a.Qc)(e),p.updateConfig(s),(0,l.cY)("webterm.provider.daemon.config-update",{keys:Object.keys(e)}),s})},g=e=>{f(e),localStorage.setItem("elanous.daemon.sessionId",e),(0,l.cY)("webterm.provider.daemon.session-set",{sessionId:e})},y=(0,r.useMemo)(()=>({config:d,setConfig:m,client:p,sessionId:h,setSessionId:g}),[d,p,h]);return(0,n.jsx)(c.Provider,{value:y,children:t})}function u(){let e=(0,r.useContext)(c);if(!e)throw Error("useDaemon must be used inside <DaemonProvider>");return e}},45012:(e,t,s)=>{s.d(t,{ki:()=>i});var n=s(91644),r=s(49536),a=s(51215),o=s(84606);class i{updateConfig(e){let t="".concat((0,r.yS)(this.cfg),"\0").concat(this.cfg.token),s="".concat((0,r.yS)(e),"\0").concat(e.token);this.cfg=e,t!==s&&(this.acpConnections.forEach(e=>e.dispose()),this.acpConnections.clear())}async fetchResponse(e,t){var s;let r=await fetch(this.url(e),{...t,headers:{...this.authHeaders(),...null!=(s=null==t?void 0:t.headers)?s:{}}});return 401===r.status&&(0,n.Qb)(e),r}async fetchJson(e,t){var s,n,r;let a=await this.fetchResponse(e,t),o=(null!=(s=a.headers.get("content-type"))?s:"").includes("application/json")?await a.json():await a.text();if(!a.ok)throw Error(String("string"==typeof o?o:null!=(r=null!=(n=null==o?void 0:o.reason)?n:null==o?void 0:o.error)?r:"".concat(a.status)));return o}async health(){return this.fetchJson("/v1/health")}subscribeChatEvents(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=new AbortController,r={method:"GET",headers:{accept:"text/event-stream",...this.authHeaders()},signal:s.signal},o="".concat(this.url("/v1/chat/events"),"?sessionId=").concat(encodeURIComponent(e));return(0,a.cY)("webterm.chat.observer.subscribe",{sessionId:e}),(async()=>{var i,l;try{let e=await fetch(o,r);if(401===e.status&&(0,n.Qb)("/v1/chat/events"),!e.ok||!e.body){null==(i=t.onError)||i.call(t,{error:"observer_failed",message:"".concat(e.status,": ").concat(await e.text())});return}await f(e.body,t)}catch(e){if(s.signal.aborted)return;null==(l=t.onError)||l.call(t,{error:"observer_disconnected",message:e instanceof Error?e.message:String(e)})}(0,a.cY)("webterm.chat.observer.end",{sessionId:e})})(),()=>{(0,a.cY)("webterm.chat.observer.dispose",{sessionId:e});try{s.abort()}catch(e){}}}subscribeAgentStatusEvents(e,t){let s=new AbortController,r="".concat(this.url("/v1/events"),"?topics=agent.status");return(0,a.cY)("webterm.agent-status.subscribe",{sessionId:e}),(async()=>{var o,i;try{let a=await fetch(r,{method:"GET",headers:{accept:"text/event-stream",...this.authHeaders()},signal:s.signal});if(401===a.status&&(0,n.Qb)("/v1/events"),!a.ok||!a.body){null==(o=t.onError)||o.call(t,{error:"agent_status_failed",message:"".concat(a.status,": ").concat(await a.text())});return}await m(a.body,e,t)}catch(e){if(s.signal.aborted)return;null==(i=t.onError)||i.call(t,{error:"agent_status_disconnected",message:e instanceof Error?e.message:String(e)})}(0,a.cY)("webterm.agent-status.end",{sessionId:e})})(),()=>{(0,a.cY)("webterm.agent-status.dispose",{sessionId:e});try{s.abort()}catch(e){}}}subscribeHudSegmentEvents(e,t){let s=new AbortController,r="".concat(this.url("/v1/events"),"?topics=hud.segment");return(0,a.cY)("webterm.hud-segment.subscribe",{sessionId:e}),(async()=>{var o,i;try{let a=await fetch(r,{method:"GET",headers:{accept:"text/event-stream",...this.authHeaders()},signal:s.signal});if(401===a.status&&(0,n.Qb)("/v1/events"),!a.ok||!a.body){null==(o=t.onError)||o.call(t,{error:"hud_segment_failed",message:"".concat(a.status,": ").concat(await a.text())});return}await g(a.body,e,t)}catch(e){if(s.signal.aborted)return;null==(i=t.onError)||i.call(t,{error:"hud_segment_disconnected",message:e instanceof Error?e.message:String(e)})}(0,a.cY)("webterm.hud-segment.end",{sessionId:e})})(),()=>{(0,a.cY)("webterm.hud-segment.dispose",{sessionId:e});try{s.abort()}catch(e){}}}subscribeChatFeedbackEvents(e,t){let s=new AbortController,r=["agent.status","hud.segment"],o="".concat(this.url("/v1/events"),"?topics=").concat(r.join(","));return(0,a.cY)("webterm.chat-feedback.subscribe",{sessionId:e,topics:r}),(async()=>{var r,i,l,c,d,u,h,f;try{let a=await fetch(o,{method:"GET",headers:{accept:"text/event-stream",...this.authHeaders()},signal:s.signal});if(401===a.status&&(0,n.Qb)("/v1/events"),!a.ok||!a.body){let e="".concat(a.status,": ").concat(await a.text());null==(r=(i=t.agentStatus).onError)||r.call(i,{error:"agent_status_failed",message:e}),null==(l=(c=t.hudSegment).onError)||l.call(c,{error:"hud_segment_failed",message:e});return}let[d,u]=a.body.tee();await Promise.all([m(d,e,t.agentStatus),g(u,e,t.hudSegment)])}catch(n){if(s.signal.aborted)return;let e=n instanceof Error?n.message:String(n);null==(d=(u=t.agentStatus).onError)||d.call(u,{error:"agent_status_disconnected",message:e}),null==(h=(f=t.hudSegment).onError)||h.call(f,{error:"hud_segment_disconnected",message:e})}(0,a.cY)("webterm.chat-feedback.end",{sessionId:e})})(),()=>{(0,a.cY)("webterm.chat-feedback.dispose",{sessionId:e});try{s.abort()}catch(e){}}}async promptStream(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,a.cY)("webterm.rest.prompt.stream",{sessionId:e.sessionId,len:e.userText.length});let s={method:"POST",headers:{"content-type":"application/json",accept:"text/event-stream",...this.authHeaders()},body:JSON.stringify({...void 0!==e.sessionId?{sessionId:e.sessionId}:{},userText:e.userText,...void 0!==e.userContent?{userContent:e.userContent}:{},...void 0!==e.provider?{provider:e.provider}:{}})};t.signal&&(s.signal=t.signal);let r=!0===t.debugTap?"/v1/prompt/stream?debug-tap=on":"/v1/prompt/stream",o=await fetch(this.url(r),s);if(401===o.status&&(0,n.Qb)(r),!o.ok||!o.body)throw Error("prompt/stream ".concat(o.status,": ").concat(await o.text()));return h(o.body,t)}connectAcp(){let e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},s=(0,r.yS)(this.cfg);if(!s)throw Error("daemon baseUrl not configured");if(!t.sessionId)return new l(s,this.cfg.token).acquire(t.onSession);let n=t.sessionId,a=this.acpConnections.get(n);return a&&!a.isTerminal?a.acquire(t.onSession):(e=new l(s,this.cfg.token,t.sessionId,()=>{this.acpConnections.get(n)===e&&this.acpConnections.delete(n)}),this.acpConnections.set(n,e),e.acquire(t.onSession))}voiceWsUrl(){return(0,r.uh)(this.cfg)}async voiceCost(){return this.fetchJson("/v1/voice/cost")}async listTerminals(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=!0===e.all&&!0===e.includeTest?"?all=true&includeTest=true":"";return this.fetchJson("/v1/terminals".concat(t))}async fetchTerminalLineage(e){return this.fetchJson("/v1/terminals/lineage?key=".concat(encodeURIComponent(e)))}async fetchTerminalScrollback(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:50,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=encodeURIComponent(e),r=new URLSearchParams({lines:String(t)});return s.sourceRoot&&r.set("sourceRoot",s.sourceRoot),this.fetchJson("/v1/terminals/".concat(n,"/scrollback?").concat(r))}streamTerminal(e,t,r,a){let o=new AbortController,i=t.sourceRoot?"?sourceRoot=".concat(encodeURIComponent(t.sourceRoot)):"",l=this.url("/v1/terminals/".concat(encodeURIComponent(e),"/stream").concat(i));return(async()=>{try{let e=await fetch(l,{method:"GET",headers:{accept:"text/event-stream",...this.authHeaders()},signal:o.signal});if(401===e.status&&(0,n.Qb)("/v1/terminals/stream"),!e.ok||!e.body)return void a("stream ".concat(e.status));let{parseTerminalSse:t}=await s.e(2415).then(s.bind(s,22415)),i=e.body.getReader(),c=new TextDecoder,d="";for(;;){let e=await i.read();if(e.done)break;d+=c.decode(e.value,{stream:!0});let s=t(d);for(let e of(d=s.rest,s.events))r(e)}}catch(e){if(o.signal.aborted)return;a(e instanceof Error?e.message:String(e))}})(),()=>{try{o.abort()}catch(e){}}}async snapshotTerminal(e,t){return this.requestTerminalControl(e,{action:"snapshot",ansi:t.ansi},t)}async sendTerminalText(e,t){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.requestTerminalControl(e,{action:"input-text",chars:t},s)}async sendTerminalKey(e,t){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.requestTerminalControl(e,{action:"input-key",chars:t},s)}async sendTerminalMouse(e,t){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.requestTerminalControl(e,{action:"input-mouse",...t},s)}async controlTerminal(e,t){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.requestTerminalControl(e,{action:t},s)}async requestTerminalControl(e,t){let s,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=encodeURIComponent(e),o=r.sourceRoot?"?sourceRoot=".concat(encodeURIComponent(r.sourceRoot)):"",i=await fetch(this.url("/v1/terminals/".concat(a,"/control").concat(o)),{method:"POST",headers:{"content-type":"application/json",...this.authHeaders()},body:JSON.stringify(t)});401===i.status&&(0,n.Qb)("/v1/terminals/".concat(a,"/control"));try{s=await i.json()}catch(e){throw Error("terminal control ".concat(i.status,": invalid JSON response"))}let l=s&&"object"==typeof s?s.status:void 0,c="write-failed"===l?"failed":l;if("success"!==c&&"unknown-pty"!==c&&"denied"!==c&&"failed"!==c&&"owner-unreachable"!==c||i.status!==({success:200,"unknown-pty":404,denied:409,failed:502,"owner-unreachable":504})[c]){var d;let e=s&&"object"==typeof s?null!=(d=s.reason)?d:s.error:void 0;throw Error("terminal control ".concat(i.status,": ").concat(String(null!=e?e:"unexpected response")))}let u=s;if("snapshot"===t.action&&"success"===c&&"string"!=typeof u.screen)throw Error("terminal control ".concat(i.status,": missing screen"));return{status:c,..."string"==typeof u.reason?{reason:u.reason}:{},..."snapshot"===t.action&&"string"==typeof u.screen?{screen:u.screen}:{}}}async renameTerminal(e,t){let s,r=encodeURIComponent(e),a=await fetch(this.url("/v1/terminals/".concat(r,"/rename")),{method:"POST",headers:{"content-type":"application/json",...this.authHeaders()},body:JSON.stringify({name:t})});401===a.status&&(0,n.Qb)("/v1/terminals/".concat(r,"/rename"));try{s=await a.json()}catch(e){throw Error("terminal rename ".concat(a.status,": invalid JSON response"))}let o=s&&"object"==typeof s?s:{},i="write-failed"===o.status?"failed":"unknown-pty"===o.status||"denied"===o.status||"failed"===o.status||"owner-unreachable"===o.status?o.status:"success"===o.status?"success":"invalid-name"===o.error?"invalid-name":void 0;if(void 0===i||a.status!==({success:200,"invalid-name":400,"unknown-pty":404,denied:409,failed:502,"owner-unreachable":504})[i]||"success"===i&&("string"!=typeof o.id||"string"!=typeof o.name)){var l,c;throw Error("terminal rename ".concat(a.status,": ").concat(String(null!=(c=null!=(l=o.reason)?l:o.error)?c:"unexpected response")))}return"success"===i?{status:i,id:o.id,name:o.name}:{status:i}}async fetchTerminalFrame(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=encodeURIComponent(e),n=t.sourceRoot?"?sourceRoot=".concat(encodeURIComponent(t.sourceRoot)):"",r=await this.fetchJson("/v1/terminals/".concat(s,"/frame").concat(n));return{id:r.id,frame:r.frame,frameAt:r.frameAt,frameSource:r.frameSource}}async createAgentCliSession(e,t,s){let n=(null==s?void 0:s.hitl)==="off"?"/v1/agent-cli/sessions?hitl=off":"/v1/agent-cli/sessions";return this.fetchJson(n,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({backend:e,...t?{cwd:t}:{}})})}async agentCliPromptStream(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s={method:"POST",headers:{"content-type":"application/json",...this.authHeaders()},body:JSON.stringify(e)};t.signal&&(s.signal=t.signal);let r=await fetch(this.url("/v1/agent-cli/prompt"),s);if(401===r.status&&(0,n.Qb)("/v1/agent-cli/prompt"),!r.ok){let e=await r.text().catch(()=>"");throw Error("agent-cli/prompt ".concat(r.status,": ").concat(e))}if(!r.body)throw Error("agent-cli/prompt: no body");let a=r.body.getReader(),o=new TextDecoder,i="",l="",c="end_turn",d=e.sessionId,u=null;for(;;){let{value:e,done:s}=await a.read();if(s)break;let n=(i+=o.decode(e,{stream:!0})).indexOf("\n\n");for(;-1!==n;){var h,f,p,m,g,y;let e=i.slice(0,n);i=i.slice(n+2);let s=e.split("\n"),r="message",a=[];for(let e of s)e.startsWith("event: ")?r=e.slice(7).trim():e.startsWith("data: ")&&a.push(e.slice(6));let o=a.join("\n");if("chunk"===r)try{let e=JSON.parse(o);"string"==typeof e.text&&(l+=e.text,null==(h=t.onTextDelta)||h.call(t,{delta:e.text,full:l}))}catch(e){}else if("stop"===r)try{let e=JSON.parse(o);e.stopReason&&(c=e.stopReason),e.sessionId&&(d=e.sessionId),null==(f=t.onStop)||f.call(t,{stopReason:c,sessionId:d})}catch(e){}else if("tool_call"===r||"tool_call_update"===r)try{let e=JSON.parse(o),s=e.rawOutput,n=null===s||"object"!=typeof s||Array.isArray(s)?void 0:s,a=null==n?void 0:n._meta,i=null===a||"object"!=typeof a||Array.isArray(a)?void 0:a.ui,l=null===i||"object"!=typeof i||Array.isArray(i)?void 0:i.resourceUri,c=null==n?void 0:n["ui/resourceUri"],d="string"==typeof l?l:"string"==typeof c?c:void 0;null==(p=t.onToolCall)||p.call(t,{kind:r,...e.toolCallId?{toolCallId:e.toolCallId}:{},...e.title?{title:e.title}:{},...e.kind?{toolKind:e.kind}:{},...e.status?{status:e.status}:{},...e.contentText?{contentText:e.contentText}:{},...void 0!==s?{rawOutput:s}:{},...void 0!==d?{resourceUri:d}:{}})}catch(e){}else if("usage"===r)try{let e=JSON.parse(o);"number"==typeof e.turnDurationMs&&"number"==typeof e.toolCallCount&&"number"==typeof e.textBytes&&(null==(m=t.onUsage)||m.call(t,{turnDurationMs:e.turnDurationMs,toolCallCount:e.toolCallCount,textBytes:e.textBytes}))}catch(e){}else if("error"===r)try{u=null!=(y=JSON.parse(o).error)?y:"unknown",null==(g=t.onError)||g.call(t,{error:u})}catch(e){u="parse-error"}n=i.indexOf("\n\n")}}if(u)throw Error(u);return{sessionId:d,text:l,stopReason:c}}async cancelAgentCliSession(e){return this.fetchJson("/v1/agent-cli/cancel",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({sessionId:e})})}async closeAgentCliSession(e){let t=encodeURIComponent(e);return this.fetchJson("/v1/agent-cli/sessions/".concat(t),{method:"DELETE"})}async listShowroomLayouts(){return this.fetchJson("/v1/showroom/layouts")}async getShowroomLayout(e){let t=encodeURIComponent(e);return this.fetchJson("/v1/showroom/layouts/".concat(t))}async saveShowroomLayout(e,t){let s=encodeURIComponent(e);return this.fetchJson("/v1/showroom/layouts/".concat(s),{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify(t)})}async deleteShowroomLayout(e){let t=encodeURIComponent(e);return this.fetchJson("/v1/showroom/layouts/".concat(t),{method:"DELETE"})}async fetchUrlContext(e){return this.fetchJson("/v1/context/fetch-url",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({url:e})})}async listLlmModels(){let e=await fetch(this.url("/v1/llm/models"),{method:"GET",headers:{...this.authHeaders()}});return(401===e.status&&(0,n.Qb)("/v1/llm/models"),e.ok)?await e.json():{models:[],error:"http-".concat(e.status)}}async getLlmHosts(){return this.fetchJson("/v1/llm/hosts")}async setLlmHosts(e){return this.fetchJson("/v1/llm/hosts",{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify(e)})}async clearLlmHosts(){return this.fetchJson("/v1/llm/hosts",{method:"DELETE"})}async transcribeAudio(e,t){let s=new FormData;s.append("file",e,e.name),t&&s.append("language",t);let r=await fetch(this.url("/v1/audio/stt"),{method:"POST",headers:{...this.authHeaders()},body:s});if(401===r.status&&(0,n.Qb)("/v1/audio/stt"),!r.ok){let e="";try{e=await r.text()}catch(e){}throw Error("audio-stt http ".concat(r.status,": ").concat(e.slice(0,200)))}return await r.json()}async judgeRole(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s={prompt:e};t.backend&&(s.backend=t.backend),t.model&&(s.model=t.model);let r=await fetch(this.url("/v1/showroom/role-judge"),{method:"POST",headers:{"content-type":"application/json",...this.authHeaders()},body:JSON.stringify(s)});if(401===r.status&&(0,n.Qb)("/v1/showroom/role-judge"),!r.ok)throw Error("role-judge http ".concat(r.status));return await r.json()}showroomLayoutsEventsUrl(){return this.cfg.baseUrl?this.url("/v1/showroom/layouts/events"):null}personasEventsUrl(){return this.cfg.baseUrl?this.url("/v1/personas/events"):null}sessionStoreEventsUrl(){return this.cfg.baseUrl?"".concat(this.url("/v1/events"),"?topics=session."):null}async listLogs(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=new URLSearchParams(e).toString();return this.fetchJson("/v1/logs".concat(t?"?".concat(t):""))}async listProgressFrames(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:200;return this.listLogs({event:"headless.progress-frame",limit:String(e)})}logsStreamUrl(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!this.cfg.baseUrl)return null;let t=new URLSearchParams(e).toString();return"".concat(this.url("/v1/logs/stream")).concat(t?"?".concat(t):"")}async listPersonas(){return this.fetchJson("/v1/personas")}async getRegistryCatalog(){return this.fetchJson("/v1/registry/catalog")}url(e){let t=this.cfg.baseUrl.replace(/\/$/,"");return"".concat(t).concat(e)}authHeaders(){return this.cfg.token?{authorization:"Bearer ".concat(this.cfg.token)}:{}}constructor(e){this.cfg=e,this.acpConnections=new Map}}class l{get ready(){return this.readyPromise}sendRaw(e,t){if("FAILED"===this.stateValue||"CLOSED"===this.stateValue||this.ws.readyState!==WebSocket.OPEN){var s;return Promise.reject(null!=(s=this.stateError)?s:Error("socket is ".concat(this.stateValue)))}let n=this.nextId++,r={jsonrpc:"2.0",id:n,method:e,params:t};return(0,a.cY)("webterm.acp.send",{method:e,id:n}),new Promise((e,t)=>{this.pending.set(n,{resolve:e,reject:t});try{this.ws.send(JSON.stringify(r)+"\n")}catch(e){this.pending.delete(n),t(e),this.closeIfUnused()}})}get readyState(){return this.ws.readyState}get state(){return this.stateValue}get isTerminal(){return"FAILED"===this.stateValue||"CLOSED"===this.stateValue}acquire(e){return this.leases+=1,new c(this,e)}subscribeSession(e){return this.sessionHandlers.add(e),()=>this.sessionHandlers.delete(e)}release(){if(this.leases=Math.max(0,this.leases-1),0===this.leases){if(this.pending.size>0)return void(0,a.cY)("webterm.acp.release-deferred",{pending:this.pending.size});this.closeIfUnused()}}closeIfUnused(){0!==this.leases||0!==this.pending.size||this.isTerminal||this.dispose(Error("ACP transport released"))}dispose(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Error("ACP transport disposed");"CLOSED"!==this.stateValue&&this.transition("CLOSED",e),this.rejectPending(e),this.notifyTerminal(),this.ws.readyState!==WebSocket.CLOSED&&this.ws.readyState!==WebSocket.CLOSING&&this.ws.close()}onState(e){return this.stateHandlers.add(e),this.notifyStateHandler(e,this.stateValue,this.stateError),()=>this.stateHandlers.delete(e)}transition(e,t){(this.stateValue!==e||this.stateError!==t)&&(this.stateValue=e,t&&(this.stateError=t),this.stateHandlers.forEach(s=>this.notifyStateHandler(s,e,t)),(0,a.cY)("webterm.acp.state",{state:e,reason:null==t?void 0:t.message}))}notifyStateHandler(e,t,s){try{e(t,s)}catch(e){(0,a.cY)("webterm.acp.state-handler.error",{state:t,reason:String(e)})}}rejectPending(e){this.pending.forEach(t=>t.reject(e)),this.pending.clear()}notifyTerminal(){var e;this.terminalNotified||(this.terminalNotified=!0,null==(e=this.onTerminal)||e.call(this))}terminate(e,t){this.isTerminal||this.transition(t,e),this.rejectPending(e),this.notifyTerminal()}fail(e){this.terminate(e,"FAILED"),(this.ws.readyState===WebSocket.CONNECTING||this.ws.readyState===WebSocket.OPEN)&&this.ws.close()}async send(e,t){return await this.readyPromise.catch(()=>void 0),this.sendRaw(e,t)}on(e,t){let s=this.kindHandlers.get(e);return s||(s=new Set,this.kindHandlers.set(e,s)),s.add(t),()=>s.delete(t)}onAny(e){return this.anyHandlers.add(e),()=>this.anyHandlers.delete(e)}onRequest(e,t){let s=Symbol(e),n=this.requestHandlers.get(e);return n||(n=new Map,this.requestHandlers.set(e,n)),n.set(s,t),()=>{let t=this.requestHandlers.get(e);t&&(t.delete(s),0===t.size&&this.requestHandlers.delete(e))}}close(){this.release()}async handleInboundRequest(e,t,s,n){(0,a.cY)("webterm.acp.request.in",{method:t,id:e});try{let r=await n(s);this.sendResponse({jsonrpc:"2.0",id:e,result:r},t)}catch(n){let s=n instanceof Error?n.message:String(n);this.sendResponse({jsonrpc:"2.0",id:e,error:{code:-32603,message:"internal error: ".concat(s)}},t)}}sendErrorResponse(e,t,s){this.sendResponse({jsonrpc:"2.0",id:e,error:{code:t,message:s}},"error-response")}sendResponse(e,t){if("OPEN"!==this.stateValue||this.ws.readyState!==WebSocket.OPEN)return void(0,a.cY)("webterm.acp.request.response.drop",{method:t,id:e.id,state:this.stateValue});try{this.ws.send(JSON.stringify(e)+"\n")}catch(s){(0,a.cY)("webterm.acp.request.response.fail",{method:t,id:e.id,reason:String(s)})}}async waitOpen(){if(this.ws.readyState!==WebSocket.OPEN){if(this.ws.readyState===WebSocket.CLOSED||this.ws.readyState===WebSocket.CLOSING)throw Error("socket already closed");await new Promise((e,t)=>{let s=()=>{a(),this.transition("OPEN"),e()},n=()=>{a(),t(Error("socket open failed"))},r=()=>{a(),t(Error("socket closed before open"))},a=()=>{this.ws.removeEventListener("open",s),this.ws.removeEventListener("error",n),this.ws.removeEventListener("close",r)};this.ws.addEventListener("open",s),this.ws.addEventListener("error",n),this.ws.addEventListener("close",r)})}}onMessage(e){var t;let s,n,r=e.data;if("string"==typeof r)s=r;else if(r instanceof ArrayBuffer)s=new TextDecoder().decode(new Uint8Array(r));else{if("undefined"!=typeof Blob&&r instanceof Blob)return void r.text().then(t=>this.onMessage({...e,data:t}));s=""}try{n=JSON.parse(s)}catch(e){(0,a.cY)("webterm.acp.parse-error",{err:String(e),len:s.length});return}if(!n.kind&&n.method&&"session/update"===n.method&&(n.kind="sessionUpdate"),(0,a.cY)("webterm.acp.frame.in",{method:null!=(t=n.method)?t:"(notif)",kind:n.kind,id:n.id}),void 0!==n.id&&this.pending.has(n.id)){let e=this.pending.get(n.id);this.pending.delete(n.id),n.error?e.reject(Error(n.error.message)):e.resolve(n.result),queueMicrotask(()=>this.closeIfUnused())}else if(void 0!==n.id&&n.method&&this.requestHandlers.has(n.method)){let e=[...this.requestHandlers.get(n.method).values()].at(-1);e&&this.handleInboundRequest(n.id,n.method,n.params,e)}else void 0!==n.id&&n.method&&this.sendErrorResponse(n.id,-32601,"method not found: ".concat(n.method));if(n.kind){let e=this.kindHandlers.get(n.kind);null==e||e.forEach(e=>e(n))}this.anyHandlers.forEach(e=>e(n))}constructor(e,t,s,n){this.nextId=1,this.pending=new Map,this.kindHandlers=new Map,this.anyHandlers=new Set,this.requestHandlers=new Map,this.sessionHandlers=new Set,this.stateHandlers=new Set,this.leases=0,this.stateValue="CONNECTING",this.handshakeComplete=!1,this.terminalNotified=!1;let r=s?"".concat(e,"?session=").concat(encodeURIComponent(s)):e;(0,a.cY)("webterm.acp.connect",{url:r,hasToken:!!t,sessionId:s}),this.ws=t?new WebSocket(r,["bearer.".concat(t)]):new WebSocket(r),this.onTerminal=n,this.ws.binaryType="arraybuffer",this.ws.addEventListener("message",e=>this.onMessage(e)),this.ws.addEventListener("error",()=>{let e=Error(function(e,t){let s="unknown-host";try{s=new URL(t).host}catch(e){}return 0===e?"socket error before open — daemon unreachable or refused (".concat(s,")"):"socket error while open — connection dropped (".concat(s,")")}(this.ws.readyState,r));this.fail(e),(this.ws.readyState===WebSocket.CONNECTING||this.ws.readyState===WebSocket.OPEN)&&this.ws.close(),(0,a.cY)("webterm.acp.error",{reason:e.message})}),this.ws.addEventListener("close",e=>{var t;let s=e.reason?": ".concat(e.reason):"",n=null!=(t=this.stateError)?t:Error("socket closed: ".concat(e.code).concat(s));this.terminate(n,this.handshakeComplete?"CLOSED":"FAILED"),(0,a.cY)("webterm.acp.close",{code:e.code,reason:e.reason,handshakeComplete:this.handshakeComplete})}),this.readyPromise=(async()=>{await this.waitOpen();let e=await this.sendRaw("initialize",{protocolVersion:1,clientCapabilities:{fs:{readTextFile:!1,writeTextFile:!1},terminal:!1,_meta:{elanous:{ui:{showModal:!0,showToast:!0,updateStatusPill:!0,usage:!1},term:{terminalOutput:!0,terminalExit:!0,terminalFrame:!0},ask:{askUserQuestion:!0}}}}});(0,a.cY)("webterm.acp.initialize.done",{res:e});let t="";if(s)try{await this.sendRaw("session/load",{sessionId:s,cwd:"/",mcpServers:[]}),t=s,(0,a.cY)("webterm.acp.session-load.done",{sessionId:t})}catch(e){(0,a.cY)("webterm.acp.session-load.miss",{sessionId:s,reason:String(e)})}if(!t){var n;let e=await this.sendRaw("session/new",{cwd:"/",mcpServers:[]});t=null!=(n=null==e?void 0:e.sessionId)?n:"",(0,a.cY)("webterm.acp.session-new.done",{sessionId:t})}return t&&this.sessionHandlers.forEach(e=>{try{e(t)}catch(e){}}),this.handshakeComplete=!0,t})().catch(e=>{let t=e instanceof Error?e:Error(String(e));return this.fail(t),(0,a.cY)("webterm.acp.handshake-failed",{reason:t.message}),""})}}class c{track(e){return this.closed?(e(),()=>{}):(this.disposers.add(e),()=>{this.disposers.delete(e),e()})}get ready(){return this.core.ready}get readyState(){return this.core.readyState}get state(){return this.core.state}send(e,t){return this.closed?Promise.reject(Error("ACP lease released")):this.core.send(e,t)}on(e,t){return this.closed?()=>{}:this.track(this.core.on(e,t))}onAny(e){return this.closed?()=>{}:this.track(this.core.onAny(e))}onRequest(e,t){return this.closed?()=>{}:this.track(this.core.onRequest(e,t))}onState(e){return this.closed?()=>{}:this.track(this.core.onState(e))}close(){this.closed||(this.closed=!0,this.disposers.forEach(e=>e()),this.disposers.clear(),this.core.release())}constructor(e,t){this.core=e,this.closed=!1,this.disposers=new Set,t&&this.disposers.add(e.subscribeSession(t))}}function d(e){if(!e||"object"!=typeof e||Array.isArray(e))return null;let t=e.result,s=null===t||"object"!=typeof t||Array.isArray(t)?void 0:t,n=null==s?void 0:s._meta,r=null===n||"object"!=typeof n||Array.isArray(n)?void 0:n.ui,a=null===r||"object"!=typeof r||Array.isArray(r)?void 0:r.resourceUri,o=null==s?void 0:s["ui/resourceUri"],i="string"==typeof a?a:"string"==typeof o?o:void 0;return{id:e.id,name:e.name,ok:e.ok,...void 0!==e.summary?{summary:e.summary}:{},...void 0!==t?{rawOutput:t}:{},...void 0!==i?{resourceUri:i}:{},...void 0!==e.resultOmittedReason?{resultOmittedReason:e.resultOmittedReason}:{}}}function u(e){let t="message",s="";for(let n of e.split("\n"))if(n.startsWith("event:"))t=n.slice(6).trim();else if(n.startsWith("data:")){let e=n.slice(5);s+=e.startsWith(" ")?e.slice(1):e}if(!s)return null;try{return{event:t,data:JSON.parse(s)}}catch(e){return null}}async function h(e,t){let s=e.getReader(),n=new TextDecoder,r="",i=null,l=null;for(;;){let e,{value:w,done:b}=await s.read();if(b)break;for(r+=n.decode(w,{stream:!0});(e=r.indexOf("\n\n"))>=0;){var c,h,f,p,m,g,y,v;let s=r.slice(0,e);r=r.slice(e+2);let n=u(s);if(n)if("turn-begin"===n.event)null==(c=t.onTurnBegin)||c.call(t,n.data);else if("text-delta"===n.event)null==(h=t.onTextDelta)||h.call(t,n.data);else if("image-block"===n.event)null==(f=t.onImageBlock)||f.call(t,n.data);else if("tool-call"===n.event)null==(p=t.onToolCall)||p.call(t,n.data);else if("tool-result"===n.event){let e=d(n.data);e&&(null==(m=t.onToolResult)||m.call(t,e))}else"feedback"===n.event?(0,o.L)(n.data)?null==(g=t.onFeedback)||g.call(t,n.data):(0,a.cY)("webterm.sse.feedback.drop",{reason:"schema-mismatch"}):"turn-end"===n.event?(i=n.data,null==(y=t.onTurnEnd)||y.call(t,i)):"error"===n.event&&(l=n.data,null==(v=t.onError)||v.call(t,l))}}if(l){let e=l.message?": ".concat(l.message):"";throw Error("".concat(l.error).concat(e))}if(!i)throw Error("prompt/stream closed without turn-end");return i}async function f(e,t){let s=e.getReader(),n=new TextDecoder,r="";for(;;){let{value:e,done:y}=await s.read();if(y)break;let v=(r+=n.decode(e,{stream:!0})).indexOf("\n\n");for(;v>=0;){var i,l,c,h,f,p,m,g;let e=r.slice(0,v);r=r.slice(v+2);let s=u(e);if(v=r.indexOf("\n\n"),s&&"subscribed"!==s.event)if("turn-begin"===s.event)null==(i=t.onTurnBegin)||i.call(t,s.data);else if("text-delta"===s.event)null==(l=t.onTextDelta)||l.call(t,s.data);else if("image-block"===s.event)null==(c=t.onImageBlock)||c.call(t,s.data);else if("tool-call"===s.event)null==(h=t.onToolCall)||h.call(t,s.data);else if("tool-result"===s.event){let e=d(s.data);e&&(null==(f=t.onToolResult)||f.call(t,e))}else"feedback"===s.event?(0,o.L)(s.data)?null==(p=t.onFeedback)||p.call(t,s.data):(0,a.cY)("webterm.sse.feedback.observer-drop",{reason:"schema-mismatch"}):"turn-end"===s.event?null==(m=t.onTurnEnd)||m.call(t,s.data):"error"===s.event&&(null==(g=t.onError)||g.call(t,s.data))}}}let p={idle:null,working:"running",awaiting:"queued",done:"done",err:"error"};async function m(e,t,s){let n=e.getReader(),r=new TextDecoder,i="",l=new Map,c=e=>{var t;let s=(null!=(t=l.get(e))?t:0)+1;return l.set(e,s),s};for(;;){let{value:e,done:l}=await n.read();if(l)break;let d=(i+=r.decode(e,{stream:!0})).indexOf("\n\n");for(;d>=0;){let e=i.slice(0,d);d=(i=i.slice(d+2)).indexOf("\n\n");let n=u(e);if(!n||"agent.status"!==n.event)continue;let r=n.data;if(!r||"object"!=typeof r)continue;let l=r.detail;if(!l||"string"!=typeof l.agentId||"string"!=typeof l.status)continue;let h=p[l.status];if(null==h)continue;let f="".concat(t,":agent-status:").concat(l.agentId),m={envelopeVersion:1,sessionId:t,blockId:f,kind:"agent.status",phase:"update",emittedAt:"number"==typeof l.updatedAt?l.updatedAt:r.ts,seq:c(f),payload:{agentId:l.agentId,status:h,..."string"==typeof l.lastEvent?{lastEvent:l.lastEvent}:{}},asciiFallback:["".concat(l.agentId," ").concat(h).concat(l.lastEvent?" \xb7 "+l.lastEvent:"")]};if(!(0,o.L)(m)){(0,a.cY)("webterm.agent-status.synthesize.drop",{agentId:l.agentId,status:l.status});continue}s.onFeedback(m)}}}async function g(e,t,s){let n=e.getReader(),r=new TextDecoder,i="",l=new Map,c=e=>{var t;let s=(null!=(t=l.get(e))?t:0)+1;return l.set(e,s),s};for(;;){let{value:e,done:l}=await n.read();if(l)break;let h=(i+=r.decode(e,{stream:!0})).indexOf("\n\n");for(;h>=0;){var d;let e=i.slice(0,h);h=(i=i.slice(h+2)).indexOf("\n\n");let n=u(e);if(!n||"hud.segment"!==n.event)continue;let r=n.data;if(!r||"object"!=typeof r)continue;let l=r.detail;if(!l||"string"!=typeof l.key||!l.key)continue;let f="end"===l.phase?"end":"update",p="".concat(t,":hud:").concat(l.key),m={key:l.key};if("update"===f){if("string"!=typeof l.value){(0,a.cY)("webterm.hud-segment.synthesize.drop",{key:l.key,reason:"missing-value"});continue}m.value=l.value,"number"==typeof l.priority&&(m.priority=l.priority),"string"==typeof l.tone&&(m.tone=l.tone),"string"==typeof l.glyph&&(m.glyph=l.glyph)}else m.value="";let g={envelopeVersion:1,sessionId:t,blockId:p,kind:"hud.segment",phase:f,emittedAt:r.ts,seq:c(p),payload:m,asciiFallback:"update"===f&&"string"==typeof l.value?["".concat(null!=(d=l.glyph)?d:"").concat(l.glyph?" ":"").concat(l.value)]:[]};if(!(0,o.L)(g)){(0,a.cY)("webterm.hud-segment.synthesize.drop",{key:l.key,reason:"wire-guard"});continue}s.onFeedback(g)}}}},49536:(e,t,s)=>{function n(e){if("undefined"==typeof localStorage)return{migrated:!1,currentValue:null};let t=localStorage.getItem(e.currentKey);if(t&&t.length>0)return{migrated:!1,currentValue:t};let s=localStorage.getItem(e.legacyKey);if(!s||0===s.length)return{migrated:!1,currentValue:t};let n=s;if(e.transformValue)try{n=e.transformValue(s)}catch(e){n=null}if(!n||0===n.length)return{migrated:!1,currentValue:t};try{localStorage.setItem(e.currentKey,n),localStorage.removeItem(e.legacyKey)}catch(e){return{migrated:!1,currentValue:t}}return{migrated:!0,currentValue:n}}s.d(t,{yS:()=>c,uh:()=>d,Fp:()=>i,Qc:()=>l});let r={baseUrl:"elanous.nexus.baseUrl",token:"elanous.daemon.token",provider:"elanous.daemon.provider"},a={daemonBaseUrl:"elanous.daemon.baseUrl",voiceWsUrl:"elanous.voice.wsUrl",voiceToken:"elanous.voice.token"};function o(e,t){if(!e)return"";let s=new URL(t,e);return s.protocol="https:"===s.protocol?"wss:":"ws:",s.toString()}function i(){var e,t;n({legacyKey:a.daemonBaseUrl,currentKey:r.baseUrl}),n({legacyKey:a.voiceWsUrl,currentKey:r.baseUrl,transformValue:e=>{try{let t=new URL(e);return t.protocol="wss:"===t.protocol?"https:":"http:",t.pathname="/",t.toString().replace(/\/$/,"")}catch(e){return null}}});let s=localStorage.getItem(a.voiceToken);s&&!localStorage.getItem(r.token)&&localStorage.setItem(r.token,s);let o=localStorage.getItem(r.baseUrl);return{baseUrl:o&&o.length>0?o:function(){let e="https:"===window.location.protocol?"https:":"http:";return"".concat(e,"//").concat(window.location.host)}(),token:null!=(e=localStorage.getItem(r.token))?e:"",provider:null!=(t=localStorage.getItem(r.provider))?t:""}}function l(e){void 0!==e.baseUrl&&localStorage.setItem(r.baseUrl,e.baseUrl),void 0!==e.token&&localStorage.setItem(r.token,e.token),void 0!==e.provider&&localStorage.setItem(r.provider,e.provider)}function c(e){return o(e.baseUrl,"/v1/acp")}function d(e){return o(e.baseUrl,"/v1/voice/ws")}},51215:(e,t,s)=>{let n;s.d(t,{cY:()=>d,x8:()=>i});let r={debug:0,info:1,warn:2,error:3},a="/v1/debug-logs/batch",o=null;function i(e){o=e}class l{health(){return{pending:this.queue.length,consecutiveFailures:this.consecutiveFailures,lastOkAt:this.lastOkAt,droppedByCap:this.droppedByCap,fallbackBatches:this.fallbackBatches}}push(e){if(!(r[function(e){let t=e.slice(e.lastIndexOf(".")+1).toLowerCase();return/^(error|exception|crash|fail|failed)$/.test(t)?"error":/^(warn|degraded|timeout)$/.test(t)?"warn":/^(boot|ready|start|begin|open|ok|done|resolve|end|stop|close)$/.test(t)?"info":"debug"}(e.category)]<r[this.minLevel])){if(this.queue.push(e),this.queue.length>500){let e=this.queue.length-500;this.droppedByCap+=e,this.queue.splice(0,e)}null===this.timer&&(this.timer=setTimeout(()=>{this.flush()},100))}}async flush(){if(this.timer&&(clearTimeout(this.timer),this.timer=null),this.inFlight||0===this.queue.length)return;let e=this.queue.slice(0,100);this.inFlight=!0;let t=!1,s=JSON.stringify({records:e});try{var n,r;t=await (n=this.fetchFn(s),r=this.postTimeoutMs,new Promise((e,t)=>{let s=setTimeout(()=>t(Error("debug-forward timeout after ".concat(r,"ms"))),r);n.then(t=>{clearTimeout(s),e(t)},e=>{clearTimeout(s),t(e)})}))}catch(e){t=!1}finally{this.inFlight=!1}if(!t){if(this.consecutiveFailures+=1,this.consecutiveFailures>=2&&o)try{await o(JSON.stringify({records:[...e,this.blockedNotice()]}))&&(this.fallbackBatches+=1)}catch(e){}this.wasFailing=!0,this.scheduleRetry();return}let a=this.lastOkAt;this.lastOkAt=Date.now();let i=this.consecutiveFailures;this.consecutiveFailures=0,this.queue.splice(0,e.length),this.wasFailing&&(this.wasFailing=!1,this.queue.push({ts:new Date().toISOString(),category:"pwa.debug-forwarder.recovered",event:"recovered",data:{consecutiveFailures:i,droppedByCap:this.droppedByCap,fallbackBatches:this.fallbackBatches,pending:this.queue.length,previousOkAt:a},source:{platform:"pwa"}})),this.queue.length>0&&null===this.timer&&(this.timer=setTimeout(()=>{this.flush()},100))}scheduleRetry(){if(null!==this.timer||0===this.queue.length)return;let e=Math.min(100*2**this.consecutiveFailures,3e4);this.timer=setTimeout(()=>{this.flush()},e)}blockedNotice(){return{ts:new Date().toISOString(),category:"pwa.debug-forwarder.http-blocked",event:"http-blocked",data:{consecutiveFailures:this.consecutiveFailures,pending:this.queue.length,droppedByCap:this.droppedByCap,lastOkAt:this.lastOkAt,via:"acp-fallback"},source:{platform:"pwa"}}}beaconFlush(){if(0!==this.queue.length)try{if("undefined"!=typeof navigator&&"function"==typeof navigator.sendBeacon){let e=this.queue.slice(0,100),t=new Blob([JSON.stringify({records:e})],{type:"application/json"});navigator.sendBeacon(a,t)&&this.queue.splice(0,e.length)}}catch(e){}}get pending(){return this.queue.length}constructor(e=c,t="debug",s=1e4){this.fetchFn=e,this.minLevel=t,this.postTimeoutMs=s,this.queue=[],this.timer=null,this.inFlight=!1,this.consecutiveFailures=0,this.lastOkAt=null,this.droppedByCap=0,this.fallbackBatches=0,this.wasFailing=!1}}async function c(e){return(await fetch(a,{method:"POST",headers:{"content-type":"application/json"},body:e,keepalive:!0,..."undefined"!=typeof AbortSignal&&"function"==typeof AbortSignal.timeout?{signal:AbortSignal.timeout(1e4)}:{}})).ok}function d(e,t){if("undefined"==typeof console)return;let s=new Date().toISOString();if(void 0!==t){let n="";try{let e=new WeakSet;n=JSON.stringify(t,(t,s)=>{if("bigint"==typeof s)return"".concat(s.toString(),"n");if("function"==typeof s)return"[fn ".concat(s.name||"anon","]");if(s&&"object"==typeof s){if(e.has(s))return"[circular]";e.add(s)}return s})}catch(e){n="[unserializable: ".concat(String(e),"]")}n&&n.length>800&&(n=n.slice(0,797)+"..."),console.debug("[".concat(s,"] ").concat(e," ").concat(n),t),u(s,e,n)}else console.debug("[".concat(s,"] ").concat(e)),u(s,e,void 0)}function u(e,t,s){let r,a=function(){if(void 0!==n)return n;let e=function(){try{let e="off"!==window.localStorage.getItem("elanous.pwa.debug.forward"),t=window.localStorage.getItem("elanous.pwa.debug.forwardLevel");return{forward:e,level:"info"===t||"warn"===t||"error"===t?t:"debug"}}catch(e){return{forward:!0,level:"debug"}}}();if(!e.forward)return n=null,null;let t=new l(c,e.level);try{window.addEventListener("visibilitychange",()=>{"hidden"===document.visibilityState&&t.beaconFlush()})}catch(e){}return n=t,t}();if(!a)return;let o=t.slice(t.lastIndexOf(".")+1)||t;if(void 0!==s&&""!==s)try{r=JSON.parse(s)}catch(e){r=s}a.push({ts:e,category:t,event:o,...void 0!==r?{data:r}:{},source:{platform:"pwa"}})}},84606:(e,t,s)=>{s.d(t,{L:()=>a});let n=new Set(["tool.progress","tool.diff","tool.search-hit","agent.status","agent.thinking","agent.plan","debug.line","perf.tick","hud.segment","mission.update","agent.chat-stream","media.image","media.video","media.job"]),r=new Set(["start","delta","update","end"]);function a(e){return null!==e&&"object"==typeof e&&1===e.envelopeVersion&&"string"==typeof e.sessionId&&!!e.sessionId&&"string"==typeof e.blockId&&!!e.blockId&&"string"==typeof e.kind&&!!n.has(e.kind)&&"string"==typeof e.phase&&!!r.has(e.phase)&&"number"==typeof e.emittedAt&&"number"==typeof e.seq&&!(e.seq<0)&&!!Array.isArray(e.asciiFallback)&&void 0!==e.payload&&null!==e.payload&&(void 0===e.parentToolCallId||"string"==typeof e.parentToolCallId)&&!0}},91644:(e,t,s)=>{s.d(t,{Qb:()=>o,SI:()=>l,dJ:()=>i});let n="elanous:auth-required",r=null,a=!1;function o(e){null===r&&(r=e,window.dispatchEvent(new CustomEvent(n,{detail:{path:e}})))}function i(e){let t=window,s=t=>e(t.detail);return t.addEventListener(n,s),null===r||a||e({path:r}),()=>t.removeEventListener(n,s)}function l(){a=!0}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8619],{41431:(e,t,r)=>{r.d(t,{MJ:()=>d,Tx:()=>i,an:()=>a,ax:()=>s,ub:()=>l});var n=r(43879);let i={tabs:[],activeId:null,order:[],frozenIds:[]};function a(e,t){switch(t.type){case"addTab":{var r;let i=t.tab,a=null==(r=t.activate)||r;if((0,n.k)(i.kind)){let t=e.tabs.find(e=>e.kind===i.kind);if(t)return a?{...e,activeId:t.id}:e}if(e.tabs.some(e=>e.id===i.id))return a?{...e,activeId:i.id}:e;let d=[...e.tabs,i],s=[...e.order,i.id];return{...e,tabs:d,order:s,activeId:a?i.id:e.activeId}}case"closeTab":{if(0>e.tabs.findIndex(e=>e.id===t.id))return e;let r=e.tabs.filter(e=>e.id!==t.id),n=e.order.filter(e=>e!==t.id),i=e.frozenIds.filter(e=>e!==t.id),a=e.activeId;if(e.activeId===t.id)if(0===n.length)a=null;else{let r=Math.min(Math.max(e.order.indexOf(t.id)-1,0),n.length-1);a=n[r]}return{...e,tabs:r,order:n,frozenIds:i,activeId:a}}case"activateTab":{if(!e.tabs.some(e=>e.id===t.id)||e.activeId===t.id)return e;let r=e.frozenIds.filter(e=>e!==t.id);return{...e,activeId:t.id,frozenIds:r}}case"reorderTab":{if(!e.tabs.some(e=>e.id===t.id))return e;let r=e.order.indexOf(t.id);if(r<0)return e;let n=Math.max(0,Math.min(t.toIndex,e.order.length-1));if(n===r)return e;let i=[...e.order];return i.splice(r,1),i.splice(n,0,t.id),{...e,order:i}}case"updateTab":{let r=e.tabs.findIndex(e=>e.id===t.id);if(r<0)return e;let n=e.tabs[r],i={};if("chat"===n.kind&&("sessionId"in t.patch&&"string"==typeof t.patch.sessionId&&(i.sessionId=t.patch.sessionId),"title"in t.patch&&(i.title=t.patch.title)),0===Object.keys(i).length)return e;let a={...n,...i},d=[...e.tabs];return d[r]=a,{...e,tabs:d}}case"freezeTab":if(!e.tabs.some(e=>e.id===t.id)||e.activeId===t.id||e.frozenIds.includes(t.id))return e;return{...e,frozenIds:[...e.frozenIds,t.id]};case"unfreezeTab":if(!e.frozenIds.includes(t.id))return e;return{...e,frozenIds:e.frozenIds.filter(e=>e!==t.id)};case"replace":return t.state}}function d(e){var t;return{id:e.id,kind:"chat",sessionId:e.sessionId,...void 0!==e.title?{title:e.title}:{},createdAt:null!=(t=e.createdAt)?t:Date.now()}}function s(e){var t;return{id:e.id,kind:e.kind,createdAt:null!=(t=e.createdAt)?t:Date.now()}}function l(e){let t=new Map(e.tabs.map(e=>[e.id,e])),r=[];for(let n of e.order){let e=t.get(n);e&&r.push(e)}return r}},43879:(e,t,r)=>{r.d(t,{k:()=>n});function n(e){return"chat"!==e}},48619:(e,t,r)=>{r.d(t,{$M:()=>p,hA:()=>h,tg:()=>v});var n=r(41121),i=r(91269),a=r(41431);let d="elanous.pwa.workspace",s=new Set(["chat","term","intake","tasks","workflows","control","settings"]);function l(e){return!!e&&"object"==typeof e&&"string"==typeof e.id&&0!==e.id.length&&"string"==typeof e.kind&&!!s.has(e.kind)&&"number"==typeof e.createdAt&&("chat"!==e.kind||"string"==typeof e.sessionId&&0!==e.sessionId.length&&(void 0===e.title||"string"==typeof e.title))&&!0}var u=r(43879),c=r(27813);let o={maxAlive:8},f={maxAlive:5},b=(0,i.createContext)(null);function p(e){let{children:t}=e,[r,s]=(0,i.useReducer)(a.an,a.Tx,e=>e),[p,h]=(0,i.useState)(null),v=(0,i.useRef)(!1);(0,i.useEffect)(()=>{if(v.current)return;v.current=!0;let e=function(){var e;let t,r=null;try{r=window.localStorage.getItem(d)}catch(e){return a.Tx}if(!r)return a.Tx;try{t=JSON.parse(r)}catch(e){return a.Tx}if(!t||"object"!=typeof t)return a.Tx;let n=t;return 1!==n.version?a.Tx:(e=n.state)&&"object"==typeof e&&Array.isArray(e.tabs)&&e.tabs.every(l)&&Array.isArray(e.order)&&e.order.every(e=>"string"==typeof e)&&Array.isArray(e.frozenIds)&&e.frozenIds.every(e=>"string"==typeof e)&&(null===e.activeId||"string"==typeof e.activeId)&&1?function(e){let t=new Set(e.tabs.map(e=>e.id)),r=e.order.filter(e=>t.has(e));for(let t of e.tabs)r.includes(t.id)||r.push(t.id);let n=e.frozenIds.filter(e=>t.has(e)),i=e.activeId;if(null!==i&&!t.has(i)){var a;i=null!=(a=r[0])?a:null}return null===i&&r.length>0&&(i=r[0]),{tabs:e.tabs,order:r,frozenIds:n,activeId:i}}(n.state):a.Tx}();(e.tabs.length>0||null!==e.activeId)&&s({type:"replace",state:e})},[]),(0,i.useEffect)(()=>{if(v.current)try{window.localStorage.setItem(d,JSON.stringify({version:1,state:r}))}catch(e){}},[r]);let I=(0,i.useRef)(new Map);(0,i.useEffect)(()=>{r.activeId&&I.current.set(r.activeId,Date.now())},[r.activeId]);let[y,k]=(0,i.useState)(o);(0,i.useEffect)(()=>{let e=window.matchMedia("(min-width: 768px)"),t=()=>k(e.matches?o:f);return t(),e.addEventListener("change",t),()=>e.removeEventListener("change",t)},[]),(0,i.useEffect)(()=>{if(!v.current)return;let e=function(e,t,r){let n=new Set(e.frozenIds),i=e.tabs.map(e=>e.id).filter(e=>!n.has(e));if(i.length<=t.maxAlive)return{freezeCandidates:[]};let a=new Map(e.tabs.map(e=>[e.id,e])),d=i.map(e=>{var t,n;let i=a.get(e),d=null!=(n=null!=(t=r.get(e))?t:null==i?void 0:i.createdAt)?n:0;return{id:e,ts:d}});d.sort((e,t)=>e.ts-t.ts);let s=i.length-t.maxAlive,l=[];for(let{id:t}of d){if(l.length>=s)break;t!==e.activeId&&l.push(t)}return{freezeCandidates:l}}(r,y,I.current);if(0!==e.freezeCandidates.length)for(let t of e.freezeCandidates)s({type:"freezeTab",id:t})},[r,y]);let g=(0,i.useCallback)(e=>{let t,r="undefined"!=typeof crypto&&"function"==typeof crypto.randomUUID?crypto.randomUUID():"t-".concat(Date.now().toString(36),"-").concat(Math.random().toString(36).slice(2,10));if("chat"===e.kind){var n;let i=null!=(n=e.sessionId)?n:(0,c.f6)();t=(0,a.MJ)({id:r,sessionId:i,...void 0!==e.title?{title:e.title}:{}})}else t=(0,a.ax)({id:r,kind:e.kind});return s({type:"addTab",tab:t}),r},[]),m=(0,i.useCallback)(e=>{s({type:"closeTab",id:e}),I.current.delete(e)},[]),x=(0,i.useCallback)(e=>{s({type:"activateTab",id:e})},[]),w=(0,i.useCallback)((e,t)=>{s({type:"reorderTab",id:e,toIndex:t})},[]),T=(0,i.useCallback)((e,t)=>{s({type:"updateTab",id:e,patch:t})},[]),z=(0,i.useCallback)(e=>{if("chat"===e)return null;if((0,u.k)(e)){let t=r.tabs.find(t=>t.kind===e);if(t)return s({type:"activateTab",id:t.id}),t.id}return g({kind:e})},[r.tabs,g]),A=(0,i.useCallback)(e=>{h(e)},[]),C=(0,i.useCallback)(()=>{h(null)},[]),M=(0,i.useMemo)(()=>({state:r,addTab:g,closeTab:m,activateTab:x,reorderTab:w,updateChatTab:T,activateOrAdd:z,pickerMode:p,openPicker:A,closePicker:C}),[r,g,m,x,w,T,z,p,A,C]);return(0,n.jsx)(b.Provider,{value:M,children:t})}function h(){let e=(0,i.useContext)(b);if(!e)throw Error("useWorkspace must be used inside <WorkspaceProvider>");return e}function v(){return(0,i.useContext)(b)}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[920],{10283:(t,e,s)=>{s.d(e,{II:()=>l,cc:()=>c,v_:()=>h});var i=s(71761),r=s(98936),n=s(52845),a=s(68202),o=s(98883);function u(t){return Math.min(1e3*2**t,3e4)}function h(t){return(t??"online")!=="online"||r.t.isOnline()}var c=class extends Error{constructor(t){super("CancelledError"),this.revert=t?.revert,this.silent=t?.silent}};function l(t){let e,s=!1,l=0,d=(0,n.T)(),f=()=>i.m.isFocused()&&("always"===t.networkMode||r.t.isOnline())&&t.canRun(),p=()=>h(t.networkMode)&&t.canRun(),y=t=>{"pending"===d.status&&(e?.(),d.resolve(t))},m=t=>{"pending"===d.status&&(e?.(),d.reject(t))},v=()=>new Promise(s=>{e=t=>{("pending"!==d.status||f())&&s(t)},t.onPause?.()}).then(()=>{e=void 0,"pending"===d.status&&t.onContinue?.()}),b=()=>{let e;if("pending"!==d.status)return;let i=0===l?t.initialPromise:void 0;try{e=i??t.fn()}catch(t){e=Promise.reject(t)}Promise.resolve(e).then(y).catch(e=>{if("pending"!==d.status)return;let i=t.retry??3*!a.H.isServer(),r=t.retryDelay??u,n="function"==typeof r?r(l,e):r,h=!0===i||"number"==typeof i&&l<i||"function"==typeof i&&i(l,e);if(s||!h)return void m(e);l++,t.onFail?.(l,e),(0,o.yy)(n).then(()=>f()?void 0:v()).then(()=>{s?m(e):b()})})};return{promise:d,status:()=>d.status,cancel:e=>{if("pending"===d.status){let s=new c(e);m(s),t.onCancel?.(s)}},continue:()=>(e?.(),d),cancelRetry:()=>{s=!0},continueRetry:()=>{s=!1},canStart:p,start:()=>(p()?b():v().then(b),d)}}},19855:(t,e,s)=>{s.d(e,{E:()=>f});var i=s(98883),r=s(96917),n=s(83026),a=s(37963),o=class extends a.Q{constructor(t={}){super(),this.config=t,this.#t=new Map}#t;build(t,e,s){let n=e.queryKey,a=e.queryHash??(0,i.F$)(n,e),o=this.get(a);return o||(o=new r.X({client:t,queryKey:n,queryHash:a,options:t.defaultQueryOptions(e),state:s,defaultOptions:t.getQueryDefaults(n)}),this.add(o)),o}add(t){this.#t.has(t.queryHash)||(this.#t.set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){let e=this.#t.get(t.queryHash);e&&(t.destroy(),e===t&&this.#t.delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){n.jG.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return this.#t.get(t)}getAll(){return[...this.#t.values()]}find(t){let e={exact:!0,...t};return this.getAll().find(t=>(0,i.MK)(e,t))}findAll(t={}){let e=this.getAll();return Object.keys(t).length>0?e.filter(e=>(0,i.MK)(t,e)):e}notify(t){n.jG.batch(()=>{this.listeners.forEach(e=>{e(t)})})}onFocus(){n.jG.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){n.jG.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},u=s(95817),h=class extends a.Q{constructor(t={}){super(),this.config=t,this.#e=new Set,this.#s=new Map,this.#i=0}#e;#s;#i;build(t,e,s){let i=new u.s({client:t,mutationCache:this,mutationId:++this.#i,options:t.defaultMutationOptions(e),state:s});return this.add(i),i}add(t){this.#e.add(t);let e=c(t);if("string"==typeof e){let s=this.#s.get(e);s?s.push(t):this.#s.set(e,[t])}this.notify({type:"added",mutation:t})}remove(t){if(this.#e.delete(t)){let e=c(t);if("string"==typeof e){let s=this.#s.get(e);if(s)if(s.length>1){let e=s.indexOf(t);-1!==e&&s.splice(e,1)}else s[0]===t&&this.#s.delete(e)}}this.notify({type:"removed",mutation:t})}canRun(t){let e=c(t);if("string"!=typeof e)return!0;{let s=this.#s.get(e),i=s?.find(t=>"pending"===t.state.status);return!i||i===t}}runNext(t){let e=c(t);if("string"!=typeof e)return Promise.resolve();{let s=this.#s.get(e)?.find(e=>e!==t&&e.state.isPaused);return s?.continue()??Promise.resolve()}}clear(){n.jG.batch(()=>{this.#e.forEach(t=>{this.notify({type:"removed",mutation:t})}),this.#e.clear(),this.#s.clear()})}getAll(){return Array.from(this.#e)}find(t){let e={exact:!0,...t};return this.getAll().find(t=>(0,i.nJ)(e,t))}findAll(t={}){return this.getAll().filter(e=>(0,i.nJ)(t,e))}notify(t){n.jG.batch(()=>{this.listeners.forEach(e=>{e(t)})})}resumePausedMutations(){let t=this.getAll().filter(t=>t.state.isPaused);return n.jG.batch(()=>Promise.all(t.map(t=>t.continue().catch(i.lQ))))}};function c(t){return t.options.scope?.id}var l=s(71761),d=s(98936),f=class{#r;#n;#a;#o;#u;#h;#c;#l;constructor(t={}){this.#r=t.queryCache||new o,this.#n=t.mutationCache||new h,this.#a=t.defaultOptions||{},this.#o=new Map,this.#u=new Map,this.#h=0}mount(){this.#h++,1===this.#h&&(this.#c=l.m.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#r.onFocus())}),this.#l=d.t.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#r.onOnline())}))}unmount(){this.#h--,0===this.#h&&(this.#c?.(),this.#c=void 0,this.#l?.(),this.#l=void 0)}isFetching(t){return this.#r.findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return this.#n.findAll({...t,status:"pending"}).length}getQueryData(t){let e=this.defaultQueryOptions({queryKey:t});return this.#r.get(e.queryHash)?.state.data}ensureQueryData(t){let e=this.defaultQueryOptions(t),s=this.#r.build(this,e),r=s.state.data;return void 0===r?this.fetchQuery(t):(t.revalidateIfStale&&s.isStaleByTime((0,i.d2)(e.staleTime,s))&&this.prefetchQuery(e),Promise.resolve(r))}getQueriesData(t){return this.#r.findAll(t).map(({queryKey:t,state:e})=>[t,e.data])}setQueryData(t,e,s){let r=this.defaultQueryOptions({queryKey:t}),n=this.#r.get(r.queryHash),a=n?.state.data,o=(0,i.Zw)(e,a);if(void 0!==o)return this.#r.build(this,r).setData(o,{...s,manual:!0})}setQueriesData(t,e,s){return n.jG.batch(()=>this.#r.findAll(t).map(({queryKey:t})=>[t,this.setQueryData(t,e,s)]))}getQueryState(t){let e=this.defaultQueryOptions({queryKey:t});return this.#r.get(e.queryHash)?.state}removeQueries(t){let e=this.#r;n.jG.batch(()=>{e.findAll(t).forEach(t=>{e.remove(t)})})}resetQueries(t,e){let s=this.#r;return n.jG.batch(()=>(s.findAll(t).forEach(t=>{t.reset()}),this.refetchQueries({type:"active",...t},e)))}cancelQueries(t,e={}){let s={revert:!0,...e};return Promise.all(n.jG.batch(()=>this.#r.findAll(t).map(t=>t.cancel(s)))).then(i.lQ).catch(i.lQ)}invalidateQueries(t,e={}){return n.jG.batch(()=>(this.#r.findAll(t).forEach(t=>{t.invalidate()}),t?.refetchType==="none")?Promise.resolve():this.refetchQueries({...t,type:t?.refetchType??t?.type??"active"},e))}refetchQueries(t,e={}){let s={...e,cancelRefetch:e.cancelRefetch??!0};return Promise.all(n.jG.batch(()=>this.#r.findAll(t).filter(t=>!t.isDisabled()&&!t.isStatic()).map(t=>{let e=t.fetch(void 0,s);return s.throwOnError||(e=e.catch(i.lQ)),"paused"===t.state.fetchStatus?Promise.resolve():e}))).then(i.lQ)}fetchQuery(t){let e=this.defaultQueryOptions(t);void 0===e.retry&&(e.retry=!1);let s=this.#r.build(this,e);return s.isStaleByTime((0,i.d2)(e.staleTime,s))?s.fetch(e):Promise.resolve(s.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(i.lQ).catch(i.lQ)}fetchInfiniteQuery(t){return t._type="infinite",this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(i.lQ).catch(i.lQ)}ensureInfiniteQueryData(t){return t._type="infinite",this.ensureQueryData(t)}resumePausedMutations(){return d.t.isOnline()?this.#n.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#r}getMutationCache(){return this.#n}getDefaultOptions(){return this.#a}setDefaultOptions(t){this.#a=t}setQueryDefaults(t,e){this.#o.set((0,i.EN)(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){let e=[...this.#o.values()],s={};return e.forEach(e=>{(0,i.Cp)(t,e.queryKey)&&Object.assign(s,e.defaultOptions)}),s}setMutationDefaults(t,e){this.#u.set((0,i.EN)(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){let e=[...this.#u.values()],s={};return e.forEach(e=>{(0,i.Cp)(t,e.mutationKey)&&Object.assign(s,e.defaultOptions)}),s}defaultQueryOptions(t){if(t._defaulted)return t;let e={...this.#a.queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=(0,i.F$)(e.queryKey,e)),void 0===e.refetchOnReconnect&&(e.refetchOnReconnect="always"!==e.networkMode),void 0===e.throwOnError&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.queryFn===i.hT&&(e.enabled=!1),e}defaultMutationOptions(t){return t?._defaulted?t:{...this.#a.mutations,...t?.mutationKey&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){this.#r.clear(),this.#n.clear()}}},24818:(t,e,s)=>{s.d(e,{Ht:()=>o,jE:()=>a});var i=s(91269),r=s(41121),n=i.createContext(void 0),a=t=>{let e=i.useContext(n);if(t)return t;if(!e)throw Error("No QueryClient set, use QueryClientProvider to set one");return e},o=t=>{let{client:e,children:s}=t;return i.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,r.jsx)(n.Provider,{value:e,children:s})}},33800:(t,e,s)=>{s.d(e,{Zq:()=>n,zs:()=>r});var i={setTimeout:(t,e)=>setTimeout(t,e),clearTimeout:t=>clearTimeout(t),setInterval:(t,e)=>setInterval(t,e),clearInterval:t=>clearInterval(t)},r=new class{#d=i;#f=!1;setTimeoutProvider(t){this.#d=t}setTimeout(t,e){return this.#d.setTimeout(t,e)}clearTimeout(t){this.#d.clearTimeout(t)}setInterval(t,e){return this.#d.setInterval(t,e)}clearInterval(t){this.#d.clearInterval(t)}};function n(t){setTimeout(t,0)}},37963:(t,e,s)=>{s.d(e,{Q:()=>i});var i=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}}},52845:(t,e,s)=>{s.d(e,{T:()=>i});function i(){let t,e,s=new Promise((s,i)=>{t=s,e=i});function i(t){Object.assign(s,t),delete s.resolve,delete s.reject}return s.status="pending",s.catch(()=>{}),s.resolve=e=>{i({status:"fulfilled",value:e}),t(e)},s.reject=t=>{i({status:"rejected",reason:t}),e(t)},s}},68202:(t,e,s)=>{s.d(e,{H:()=>r});var i=s(98883),r=(()=>{let t=()=>i.S$;return{isServer:()=>t(),setIsServer(e){t=e}}})()},71761:(t,e,s)=>{s.d(e,{m:()=>r});var i=s(37963),r=new class extends i.Q{#p;#y;#m;constructor(){super(),this.#m=t=>{if("undefined"!=typeof window&&window.addEventListener){let e=()=>t();return window.addEventListener("visibilitychange",e,!1),()=>{window.removeEventListener("visibilitychange",e)}}}}onSubscribe(){this.#y||this.setEventListener(this.#m)}onUnsubscribe(){this.hasListeners()||(this.#y?.(),this.#y=void 0)}setEventListener(t){this.#m=t,this.#y?.(),this.#y=t(t=>{"boolean"==typeof t?this.setFocused(t):this.onFocus()})}setFocused(t){this.#p!==t&&(this.#p=t,this.onFocus())}onFocus(){let t=this.isFocused();this.listeners.forEach(e=>{e(t)})}isFocused(){return"boolean"==typeof this.#p?this.#p:globalThis.document?.visibilityState!=="hidden"}}},83026:(t,e,s)=>{s.d(e,{jG:()=>r});var i=s(33800).Zq,r=function(){let t=[],e=0,s=t=>{t()},r=t=>{t()},n=i,a=i=>{e?t.push(i):n(()=>{s(i)})};return{batch:i=>{let a;e++;try{a=i()}finally{--e||(()=>{let e=t;t=[],e.length&&n(()=>{r(()=>{e.forEach(t=>{s(t)})})})})()}return a},batchCalls:t=>(...e)=>{a(()=>{t(...e)})},schedule:a,setNotifyFunction:t=>{s=t},setBatchNotifyFunction:t=>{r=t},setScheduler:t=>{n=t}}}()},95817:(t,e,s)=>{s.d(e,{$:()=>o,s:()=>a});var i=s(83026),r=s(98651),n=s(10283),a=class extends r.k{#v;#b;#n;#g;constructor(t){super(),this.#v=t.client,this.mutationId=t.mutationId,this.#n=t.mutationCache,this.#b=[],this.state=t.state||o(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){this.#b.includes(t)||(this.#b.push(t),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.#b=this.#b.filter(e=>e!==t),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.#b.length||("pending"===this.state.status?this.scheduleGc():this.#n.remove(this))}continue(){return this.#g?.continue()??this.execute(this.state.variables)}async execute(t){let e=()=>{this.#C({type:"continue"})},s={client:this.#v,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#g=(0,n.II)({fn:()=>this.options.mutationFn?this.options.mutationFn(t,s):Promise.reject(Error("No mutationFn found")),onFail:(t,e)=>{this.#C({type:"failed",failureCount:t,error:e})},onPause:()=>{this.#C({type:"pause"})},onContinue:e,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});let i="pending"===this.state.status,r=!this.#g.canStart();try{if(i)e();else{this.#C({type:"pending",variables:t,isPaused:r}),this.#n.config.onMutate&&await this.#n.config.onMutate(t,this,s);let e=await this.options.onMutate?.(t,s);e!==this.state.context&&this.#C({type:"pending",context:e,variables:t,isPaused:r})}let n=await this.#g.start();return await this.#n.config.onSuccess?.(n,t,this.state.context,this,s),await this.options.onSuccess?.(n,t,this.state.context,s),await this.#n.config.onSettled?.(n,null,this.state.variables,this.state.context,this,s),await this.options.onSettled?.(n,null,t,this.state.context,s),this.#C({type:"success",data:n}),n}catch(e){try{await this.#n.config.onError?.(e,t,this.state.context,this,s)}catch(t){Promise.reject(t)}try{await this.options.onError?.(e,t,this.state.context,s)}catch(t){Promise.reject(t)}try{await this.#n.config.onSettled?.(void 0,e,this.state.variables,this.state.context,this,s)}catch(t){Promise.reject(t)}try{await this.options.onSettled?.(void 0,e,t,this.state.context,s)}catch(t){Promise.reject(t)}throw this.#C({type:"error",error:e}),e}finally{this.#n.runNext(this)}}#C(t){this.state=(e=>{switch(t.type){case"failed":return{...e,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...e,isPaused:!0};case"continue":return{...e,isPaused:!1};case"pending":return{...e,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...e,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...e,data:void 0,error:t.error,failureCount:e.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}})(this.state),i.jG.batch(()=>{this.#b.forEach(e=>{e.onMutationUpdate(t)}),this.#n.notify({mutation:this,type:"updated",action:t})})}};function o(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}},96917:(t,e,s)=>{s.d(e,{X:()=>u,k:()=>h});var i=s(98883),r=s(83026),n=s(10283),a=s(98651);function o(t,{pages:e,pageParams:s}){let i=e.length-1;return e.length>0?t.getNextPageParam(e[i],e,s[i],s):void 0}var u=class extends a.k{#w;#O;#q;#S;#v;#g;#a;#P;constructor(t){super(),this.#P=!1,this.#a=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.#v=t.client,this.#S=this.#v.getQueryCache(),this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.#O=l(this.options),this.state=t.state??this.#O,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#w}get promise(){return this.#g?.promise}setOptions(t){if(this.options={...this.#a,...t},t?._type&&(this.#w=t._type),this.updateGcTime(this.options.gcTime),this.state&&void 0===this.state.data){let t=l(this.options);void 0!==t.data&&(this.setState(c(t.data,t.dataUpdatedAt)),this.#O=t)}}optionalRemove(){this.observers.length||"idle"!==this.state.fetchStatus||this.#S.remove(this)}setData(t,e){let s=(0,i.pl)(this.state.data,t,this.options);return this.#C({data:s,type:"success",dataUpdatedAt:e?.updatedAt,manual:e?.manual}),s}setState(t){this.#C({type:"setState",state:t})}cancel(t){let e=this.#g?.promise;return this.#g?.cancel(t),e?e.then(i.lQ).catch(i.lQ):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#O}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>!1!==(0,i.nU)(t.options.enabled,this))}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===i.hT||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0&&this.observers.some(t=>"static"===(0,i.d2)(t.options.staleTime,this))}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):void 0===this.state.data||this.state.isInvalidated}isStaleByTime(t=0){return void 0===this.state.data||"static"!==t&&(!!this.state.isInvalidated||!(0,i.j3)(this.state.dataUpdatedAt,t))}onFocus(){let t=this.observers.find(t=>t.shouldFetchOnWindowFocus());t?.refetch({cancelRefetch:!1}),this.#g?.continue()}onOnline(){let t=this.observers.find(t=>t.shouldFetchOnReconnect());t?.refetch({cancelRefetch:!1}),this.#g?.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.#S.notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(e=>e!==t),this.observers.length||(this.#g&&(this.#P||this.#F()?this.#g.cancel({revert:!0}):this.#g.cancelRetry()),this.scheduleGc()),this.#S.notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}#F(){return"paused"===this.state.fetchStatus&&"pending"===this.state.status}invalidate(){this.state.isInvalidated||this.#C({type:"invalidate"})}async fetch(t,e){var s;if("idle"!==this.state.fetchStatus&&this.#g?.status()!=="rejected"){if(void 0!==this.state.data&&e?.cancelRefetch)this.cancel({silent:!0});else if(this.#g)return this.#g.continueRetry(),this.#g.promise}if(t&&this.setOptions(t),!this.options.queryFn){let t=this.observers.find(t=>t.options.queryFn);t&&this.setOptions(t.options)}let r=new AbortController,a=t=>{Object.defineProperty(t,"signal",{enumerable:!0,get:()=>(this.#P=!0,r.signal)})},u=()=>{let t=(0,i.ZM)(this.options,e),s=(()=>{let t={client:this.#v,queryKey:this.queryKey,meta:this.meta};return a(t),t})();return(this.#P=!1,this.options.persister)?this.options.persister(t,s,this):t(s)},h=(()=>{let t={fetchOptions:e,options:this.options,queryKey:this.queryKey,client:this.#v,state:this.state,fetchFn:u};return a(t),t})(),c="infinite"===this.#w?(s=this.options.pages,{onFetch:(t,e)=>{let r=t.options,n=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],u=t.state.data?.pageParams||[],h={pages:[],pageParams:[]},c=0,l=async()=>{let e=!1,l=(0,i.ZM)(t.options,t.fetchOptions),d=async(s,r,n)=>{if(e)return Promise.reject(t.signal.reason);if(null==r&&s.pages.length)return Promise.resolve(s);let a=(()=>{let s={client:t.client,queryKey:t.queryKey,pageParam:r,direction:n?"backward":"forward",meta:t.options.meta};return(0,i.ox)(s,()=>t.signal,()=>e=!0),s})(),o=await l(a),{maxPages:u}=t.options,h=n?i.ZZ:i.y9;return{pages:h(s.pages,o,u),pageParams:h(s.pageParams,r,u)}};if(n&&a.length){let t="backward"===n,e={pages:a,pageParams:u},s=(t?function(t,{pages:e,pageParams:s}){return e.length>0?t.getPreviousPageParam?.(e[0],e,s[0],s):void 0}:o)(r,e);h=await d(e,s,t)}else{let t=s??a.length;do{let t=0===c?u[0]??r.initialPageParam:o(r,h);if(c>0&&null==t)break;h=await d(h,t),c++}while(c<t)}return h};t.options.persister?t.fetchFn=()=>t.options.persister?.(l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},e):t.fetchFn=l}}):this.options.behavior;c?.onFetch(h,this),this.#q=this.state,("idle"===this.state.fetchStatus||this.state.fetchMeta!==h.fetchOptions?.meta)&&this.#C({type:"fetch",meta:h.fetchOptions?.meta}),this.#g=(0,n.II)({initialPromise:e?.initialPromise,fn:h.fetchFn,onCancel:t=>{t instanceof n.cc&&t.revert&&this.setState({...this.#q,fetchStatus:"idle"}),r.abort()},onFail:(t,e)=>{this.#C({type:"failed",failureCount:t,error:e})},onPause:()=>{this.#C({type:"pause"})},onContinue:()=>{this.#C({type:"continue"})},retry:h.options.retry,retryDelay:h.options.retryDelay,networkMode:h.options.networkMode,canRun:()=>!0});try{let t=await this.#g.start();if(void 0===t)throw Error(`${this.queryHash} data is undefined`);return this.setData(t),this.#S.config.onSuccess?.(t,this),this.#S.config.onSettled?.(t,this.state.error,this),t}catch(t){if(t instanceof n.cc){if(t.silent)return this.#g.promise;else if(t.revert){if(void 0===this.state.data)throw t;return this.state.data}}throw this.#C({type:"error",error:t}),this.#S.config.onError?.(t,this),this.#S.config.onSettled?.(this.state.data,t,this),t}finally{this.scheduleGc()}}#C(t){let e=e=>{switch(t.type){case"failed":return{...e,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...e,fetchStatus:"paused"};case"continue":return{...e,fetchStatus:"fetching"};case"fetch":return{...e,...h(e.data,this.options),fetchMeta:t.meta??null};case"success":let s={...e,...c(t.data,t.dataUpdatedAt),dataUpdateCount:e.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#q=t.manual?s:void 0,s;case"error":let i=t.error;return{...e,error:i,errorUpdateCount:e.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:e.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...e,isInvalidated:!0};case"setState":return{...e,...t.state}}};this.state=e(this.state),r.jG.batch(()=>{this.observers.forEach(t=>{t.onQueryUpdate()}),this.#S.notify({query:this,type:"updated",action:t})})}};function h(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:(0,n.v_)(e.networkMode)?"fetching":"paused",...void 0===t&&{error:null,status:"pending"}}}function c(t,e){return{data:t,dataUpdatedAt:e??Date.now(),error:null,isInvalidated:!1,status:"success"}}function l(t){let e="function"==typeof t.initialData?t.initialData():t.initialData,s=void 0!==e,i=s?"function"==typeof t.initialDataUpdatedAt?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:s?i??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:s?"success":"pending",fetchStatus:"idle"}}},98651:(t,e,s)=>{s.d(e,{k:()=>a});var i=s(33800),r=s(68202),n=s(98883),a=class{#Q;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),(0,n.gn)(this.gcTime)&&(this.#Q=i.zs.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(r.H.isServer()?1/0:3e5))}clearGcTimeout(){void 0!==this.#Q&&(i.zs.clearTimeout(this.#Q),this.#Q=void 0)}}},98883:(t,e,s)=>{s.d(e,{Cp:()=>y,EN:()=>p,F$:()=>f,GU:()=>Q,MK:()=>l,S$:()=>r,ZM:()=>F,ZZ:()=>S,Zw:()=>a,d2:()=>h,f8:()=>v,gn:()=>o,hT:()=>P,j3:()=>u,lQ:()=>n,nJ:()=>d,nU:()=>c,ox:()=>j,pl:()=>O,y9:()=>q,yy:()=>w});var i=s(33800),r="undefined"==typeof window||"Deno"in globalThis;function n(){}function a(t,e){return"function"==typeof t?t(e):t}function o(t){return"number"==typeof t&&t>=0&&t!==1/0}function u(t,e){return Math.max(t+(e||0)-Date.now(),0)}function h(t,e){return"function"==typeof t?t(e):t}function c(t,e){return"function"==typeof t?t(e):t}function l(t,e){let{type:s="all",exact:i,fetchStatus:r,predicate:n,queryKey:a,stale:o}=t;if(a){if(i){if(e.queryHash!==f(a,e.options))return!1}else if(!y(e.queryKey,a))return!1}if("all"!==s){let t=e.isActive();if("active"===s&&!t||"inactive"===s&&t)return!1}return("boolean"!=typeof o||e.isStale()===o)&&(!r||r===e.state.fetchStatus)&&(!n||!!n(e))}function d(t,e){let{exact:s,status:i,predicate:r,mutationKey:n}=t;if(n){if(!e.options.mutationKey)return!1;if(s){if(p(e.options.mutationKey)!==p(n))return!1}else if(!y(e.options.mutationKey,n))return!1}return(!i||e.state.status===i)&&(!r||!!r(e))}function f(t,e){return(e?.queryKeyHashFn||p)(t)}function p(t){return JSON.stringify(t,(t,e)=>g(e)?Object.keys(e).sort().reduce((t,s)=>(t[s]=e[s],t),{}):e)}function y(t,e){return t===e||typeof t==typeof e&&!!t&&!!e&&"object"==typeof t&&"object"==typeof e&&Object.keys(e).every(s=>y(t[s],e[s]))}var m=Object.prototype.hasOwnProperty;function v(t,e){if(!e||Object.keys(t).length!==Object.keys(e).length)return!1;for(let s in t)if(t[s]!==e[s])return!1;return!0}function b(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function g(t){if(!C(t))return!1;let e=t.constructor;if(void 0===e)return!0;let s=e.prototype;return!!C(s)&&!!s.hasOwnProperty("isPrototypeOf")&&Object.getPrototypeOf(t)===Object.prototype}function C(t){return"[object Object]"===Object.prototype.toString.call(t)}function w(t){return new Promise(e=>{i.zs.setTimeout(e,t)})}function O(t,e,s){return"function"==typeof s.structuralSharing?s.structuralSharing(t,e):!1!==s.structuralSharing?function t(e,s,i=0){if(e===s)return e;if(i>500)return s;let r=b(e)&&b(s);if(!r&&!(g(e)&&g(s)))return s;let n=(r?e:Object.keys(e)).length,a=r?s:Object.keys(s),o=a.length,u=r?Array(o):{},h=0;for(let c=0;c<o;c++){let o=r?c:a[c],l=e[o],d=s[o];if(l===d){u[o]=l,(r?c<n:m.call(e,o))&&h++;continue}if(null===l||null===d||"object"!=typeof l||"object"!=typeof d){u[o]=d;continue}let f=t(l,d,i+1);u[o]=f,f===l&&h++}return n===o&&h===n?e:u}(t,e):e}function q(t,e,s=0){let i=[...t,e];return s&&i.length>s?i.slice(1):i}function S(t,e,s=0){let i=[e,...t];return s&&i.length>s?i.slice(0,-1):i}var P=Symbol();function F(t,e){return!t.queryFn&&e?.initialPromise?()=>e.initialPromise:t.queryFn&&t.queryFn!==P?t.queryFn:()=>Promise.reject(Error(`Missing queryFn: '${t.queryHash}'`))}function Q(t,e){return"function"==typeof t?t(...e):!!t}function j(t,e,s){let i,r=!1;return Object.defineProperty(t,"signal",{enumerable:!0,get:()=>(i??=e(),r||(r=!0,i.aborted?s():i.addEventListener("abort",s,{once:!0})),i)}),t}},98936:(t,e,s)=>{s.d(e,{t:()=>r});var i=s(37963),r=new class extends i.Q{#j=!0;#y;#m;constructor(){super(),this.#m=t=>{if("undefined"!=typeof window&&window.addEventListener){let e=()=>t(!0),s=()=>t(!1);return window.addEventListener("online",e,!1),window.addEventListener("offline",s,!1),()=>{window.removeEventListener("online",e),window.removeEventListener("offline",s)}}}}onSubscribe(){this.#y||this.setEventListener(this.#m)}onUnsubscribe(){this.hasListeners()||(this.#y?.(),this.#y=void 0)}setEventListener(t){this.#m=t,this.#y?.(),this.#y=t(this.setOnline.bind(this))}setOnline(t){this.#j!==t&&(this.#j=t,this.listeners.forEach(e=>{e(t)}))}isOnline(){return this.#j}}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9651],{1428:(e,t,n)=>{function r(e,t){var n,r;let a=null!=(n=t.minDistance)?n:100,s=null!=(r=t.minVelocity)?r:.3,i=0,l=0,d=0,o=!1,c=null,u=e=>{var n;null!=(n=t.shouldIgnore)&&n.call(t,e.target)||(i=e.clientX,l=e.clientY,d=e.timeStamp,o=!0,c=e.pointerId)},m=e=>{if(!o||e.pointerId!==c)return;o=!1,c=null;let n=e.clientX-i,r=e.clientY-l,u=Math.max(1,e.timeStamp-d),m=Math.abs(n),p=Math.abs(r);m<a||p>=m||m/u<s||t.onSwipe(n<0?"left":"right")},p=()=>{o=!1,c=null};return e.addEventListener("pointerdown",u),e.addEventListener("pointerup",m),e.addEventListener("pointercancel",p),()=>{e.removeEventListener("pointerdown",u),e.removeEventListener("pointerup",m),e.removeEventListener("pointercancel",p)}}function a(e,t){let n=0,r=0,a=0,s=!1,i=null,l=e=>{var l;null!=(l=t.shouldIgnore)&&l.call(t,e.target)||(n=e.clientX,r=e.clientY,a=e.timeStamp,s=!0,i=e.pointerId)},d=e=>{if(!s||e.pointerId!==i)return;s=!1,i=null;let l=function(e){var t,n;let r=null!=(t=e.minDistance)?t:100,a=null!=(n=e.minVelocity)?n:.3,s=Math.abs(e.dx),i=Math.abs(e.dy),l=Math.max(1,e.dt),d=Math.max(s,i);return d<r||d/l<a?null:s>=i?e.dx<0?"left":"right":e.dy<0?"up":"down"}({dx:e.clientX-n,dy:e.clientY-r,dt:e.timeStamp-a,...void 0!==t.minDistance?{minDistance:t.minDistance}:{},...void 0!==t.minVelocity?{minVelocity:t.minVelocity}:{}});l&&t.onSwipe(l)},o=()=>{s=!1,i=null};return e.addEventListener("pointerdown",l),e.addEventListener("pointerup",d),e.addEventListener("pointercancel",o),()=>{e.removeEventListener("pointerdown",l),e.removeEventListener("pointerup",d),e.removeEventListener("pointercancel",o)}}n.d(t,{gI:()=>r,ix:()=>a})},60737:(e,t,n)=>{n.d(t,{SY:()=>_});var r=n(41121),a=n(91269),s=n(38519),i=n(72030);let l=/https?:\/\/[^\s<>"']+/g;function d(e){return e.slice(0,40)}async function o(e,t){let n=function(e){var t;let n=null!=(t=e.match(l))?t:[];return 0===n.length?[{text:e}]:n.map(e=>({url:e}))}(t),r=await e.fetchJson("/v1/intake-ledger/items",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({items:n,source:"pwa"})});return{ids:r.ids,added:r.added,merged:r.merged}}async function c(e,t){return{acceptanceId:(await e.fetchJson("/v1/harness/ask",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({text:t})})).acceptanceId}}function u(e,t,n){return e.fetchJson("/v1/intake/route",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({text:t,consent:"route",source:"pwa",...(null==n?void 0:n.classify)!==void 0?{classify:n.classify}:{}})})}let m=["absorbed","discarded","routed","checked"],p={new:"대기 중",queued:"대기 중",absorbed:"흡수됨",routed:"다른 갈래로 넘김",checked:"확인됨",discarded:"버림",deferred:"미룸"};function g(e){var t,n,r;return null===e?{label:"찾을 수 없음",settled:!1,noteRef:null}:{label:Object.hasOwn(p,e.status)?p[e.status]:e.status,settled:m.includes(e.status),noteRef:null!=(r=null==(n=e.outputs)||null==(t=n.find(e=>"note"===e.kind))?void 0:t.ref)?r:null}}let f={"headless.spawn":"실행 시작","gate.baseline":"게이트 검사","review.diff-scope":"리뷰 중","headless.done":"실행 종료","run-terminal":"종료"};function h(e){var t,n,r,a,s;let i=e.at(-1),l=e.find(e=>"run-terminal"===e.event),d=null==l||null==(t=l.payload)?void 0:t.runStatus;return{stage:i?null!=(r=f[i.event])?r:i.event:null,lastEventAt:null!=(a=null==i?void 0:i.ts)?a:null,done:void 0!==l,outcome:l?"completed"===d||"failed"===d?d:"unknown":null,error:null!=(s=null==l||null==(n=l.payload)?void 0:n.error)?s:null}}var x=n(66062),v=n(51215),k=n(1428);class b{preview(e){return this.client.fetchJson("/v1/intake/pipeline-preview",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(e)})}commit(e){return this.client.fetchJson("/v1/intake/pipeline-commit",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(e)})}async submitPhotoOcr(e,t){let n=new FormData;return n.append("image",e,t),n.append("polishMode","minimal"),await this.client.fetchJson("/v1/notes/from-image",{method:"POST",body:n})}constructor(e){this.client=e}}var y=n(12775);let w={pending:"대기",approved:"승인",rejected:"거절",deferred:"잠시 멈춤"},j={pending:"bg-muted text-muted-foreground ring-border",approved:"bg-emerald-500/15 text-emerald-700 ring-emerald-500/30",rejected:"bg-rose-500/15 text-rose-700 ring-rose-500/30",deferred:"bg-amber-500/15 text-amber-700 ring-amber-500/30"},N={high:"bg-orange-500/15 text-orange-700 ring-orange-500/30",medium:"bg-sky-500/15 text-sky-700 ring-sky-500/30",low:"bg-muted text-muted-foreground ring-border"},I={research:"\uD83D\uDD0D","research-and-plan":"\uD83D\uDCCB","dev-feature":"⚙","dev-spec":"\uD83D\uDCD0",cognitive:"\uD83E\uDDE0",debug:"\uD83D\uDEE0","workflow-update":"↻"};function S(e){var t,n;let{card:a,verdict:s,active:i,stackIndex:l=0}=e,d=i?0:6*l,o=i?1:Math.max(.92,1-.04*l),c=i?1:Math.max(.6,1-.18*l),{task:u}=a,m=u.urls.length+u.keywords.length+u.refs.length;return(0,r.jsxs)("article",{"data-testid":"memo-intake-card","data-task-key":u.taskKey,"data-active":i?"true":"false","data-stack-index":l,"data-verdict":s,className:"absolute inset-0 flex flex-col gap-2 rounded-2xl border border-border bg-card p-5 shadow-lg ring-1 ring-foreground/5",style:{zIndex:i?30:30-l,transform:"translateY(".concat(d,"px) scale(").concat(o,")"),opacity:c},children:[(0,r.jsxs)("header",{className:"flex items-start justify-between gap-3",children:[(0,r.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,r.jsx)("p",{className:"truncate text-[10px] uppercase tracking-wider text-muted-foreground","data-testid":"memo-card-mission",children:a.missionTitle}),(0,r.jsx)("h3",{className:"font-heading text-base font-medium leading-snug","data-testid":"memo-card-title",children:u.title})]}),(0,r.jsx)("span",{"data-testid":"memo-card-verdict",className:"shrink-0 rounded-full px-2 py-0.5 text-[10px] font-medium ring-1 ".concat(j[s]),children:w[s]})]}),(0,r.jsx)("p",{className:"line-clamp-3 text-sm text-foreground","data-testid":"memo-card-intent",children:u.intent}),(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5 text-[10px]",children:[(0,r.jsxs)("span",{"data-testid":"memo-card-category",className:"inline-flex items-center gap-1 rounded-full bg-muted px-2 py-0.5 text-muted-foreground ring-1 ring-border",children:[(0,r.jsx)("span",{"aria-hidden":!0,children:null!=(t=I[u.category])?t:"•"}),u.category]}),(0,r.jsx)("span",{"data-testid":"memo-card-priority",className:"rounded-full px-2 py-0.5 font-medium ring-1 ".concat(null!=(n=N[u.priority])?n:N.low),children:u.priority}),u.workflowEligible?(0,r.jsx)("span",{"data-testid":"memo-card-workflow",className:"rounded-full bg-violet-500/15 px-2 py-0.5 text-violet-700 ring-1 ring-violet-500/30",children:"workflow"}):(0,r.jsx)("span",{"data-testid":"memo-card-workflow",className:"rounded-full bg-muted px-2 py-0.5 text-muted-foreground ring-1 ring-border",children:"no-workflow"}),m>0&&(0,r.jsxs)("span",{"data-testid":"memo-card-refs",className:"rounded-full bg-muted px-2 py-0.5 text-muted-foreground ring-1 ring-border",children:[m," ref",1===m?"":"s"]})]}),i&&(0,r.jsxs)("footer",{"data-testid":"memo-card-hint",className:"mt-auto grid grid-cols-2 gap-1 pt-2 text-[10px] text-muted-foreground",children:[(0,r.jsx)("span",{children:"← 거절"}),(0,r.jsx)("span",{className:"text-right",children:"승인 →"}),(0,r.jsx)("span",{children:"↑ 잠시 멈춤"}),(0,r.jsx)("span",{className:"text-right",children:"펼치기 ↓"})]})]})}function R(e,t,n,r){y.K.emit({surface:"pwa",intent:{layer:"selection",kind:"pwa.selection.toggle_change",target:{kind:"toggle",id:e},value:{from:t,to:n}},...r?{context:{active_workflow_run_id:r}}:{}})}let C={left:"reject",right:"approve",up:"defer",down:"expand"},E={ArrowLeft:"reject",ArrowRight:"approve",ArrowUp:"defer",ArrowDown:"expand"," ":"approve"},O={reject:"rejected",approve:"approved",defer:"deferred"};function L(){let{initialMemo:e,onClose:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{client:n}=(0,s.Q)(),l=(0,a.useMemo)(()=>new b(n),[n]),[d,o]=(0,a.useState)(null!=e?e:""),[c,u]=(0,a.useState)(!1),[m,p]=(0,a.useState)(null),[g,f]=(0,a.useState)({}),[h,k]=(0,a.useState)(0),[y,w]=(0,a.useState)(null),[j,N]=(0,a.useState)(null),[I,S]=(0,a.useState)(!1),[C,E]=(0,a.useState)(""),L=(0,a.useRef)(null),[P,D]=(0,a.useState)(!1),[K,A]=(0,a.useState)(!1),[$,_]=(0,a.useState)(!1),[U,X]=(0,a.useState)(!1),V=(0,a.useMemo)(()=>m?function(e){let t=[];for(let n of e)for(let e of n.tasks)t.push({missionId:n.id,missionTitle:n.title,task:e});return t}(m.decomposition.missions):[],[m]),H=(0,a.useMemo)(()=>{let e={approved:0,rejected:0,deferred:0,pending:0};for(let n of V){var t;let r=null!=(t=g[n.task.taskKey])?t:"pending";e[r]+=1}return e},[V,g]),B=H.approved+H.rejected+H.deferred>0,F=(0,a.useMemo)(()=>V.filter(e=>"approved"===g[e.task.taskKey]).map(e=>e.task.taskKey),[V,g]),W=(0,a.useCallback)(()=>{p(null),f({}),k(0),w(null),N(null),S(!1),E(""),null==t||t()},[t]),q=(0,a.useCallback)(()=>{var e;null==(e=L.current)||e.click()},[]),Q=(0,a.useCallback)(async e=>{var t,n;let r=null==(t=e.target.files)?void 0:t[0];if(e.target.value="",r){(0,v.cY)("intake.memo-preview.photo.pick",{name:r.name,size:r.size,type:r.type}),D(!0);try{let e=await l.submitPhotoOcr(r,r.name||"memo-photo.jpg"),t=(null!=(n=e.markdown)?n:"").trim();if(!t)return void x.oR.error("OCR 결과가 비어 있습니다 — 사진을 다시 찍거나 다른 이미지를 선택하세요.");o(e=>e.trim()?"".concat(t,"\n\n---\n\n").concat(e):t),x.oR.success("OCR 추가됨 (provider=".concat(e.provider," \xb7 ").concat(t.length,"자) — 수정 후 Run preview 누르세요."))}catch(e){x.oR.error("OCR 실패: ".concat(e instanceof Error?e.message:e)),(0,v.cY)("intake.memo-preview.photo.error",{err:String(e)})}finally{D(!1)}}},[l]),G=(0,a.useCallback)(async()=>{let e=d.trim(),t=C.trim();if(e&&t&&m){(0,v.cY)("intake.memo-preview.refine",{hintLen:t.length,useRealLlm:K}),u(!0),w(null),N(null);try{let n=await l.preview({rawText:e,refinementHint:t,priorDecomposition:{missions:m.decomposition.missions},...K?{useRealLlm:!0}:{},...U?{useRealEnrich:!0}:{}});p(n),f({}),k(0),E(""),S(!1)}catch(e){x.oR.error("refine failed: ".concat(e instanceof Error?e.message:e)),(0,v.cY)("intake.memo-preview.refine.error",{err:String(e)})}finally{u(!1)}}},[l,d,C,m,K,U]),Z=(0,a.useCallback)(async()=>{let e=d.trim();if(e){(0,v.cY)("intake.memo-preview.submit",{length:e.length,useRealLlm:K,useRealEnrich:U}),u(!0),w(null),N(null);try{let t=await l.preview({rawText:e,...K?{useRealLlm:!0}:{},...U?{useRealEnrich:!0}:{}});p(t),f({}),k(0)}catch(e){x.oR.error("pipeline preview failed: ".concat(e instanceof Error?e.message:e)),(0,v.cY)("intake.memo-preview.error",{err:String(e)})}finally{u(!1)}}},[l,d,K,U]),ee=(0,a.useCallback)(e=>{if(!V.length||h>=V.length)return;let t=V[h];if((0,v.cY)("intake.memo-preview.decision",{taskKey:t.task.taskKey,decision:e}),"expand"===e)return void w(t);f(n=>({...n,[t.task.taskKey]:O[e]})),k(e=>Math.min(e+1,V.length))},[V,h]),et=(0,a.useCallback)(()=>{V.length&&((0,v.cY)("intake.memo-preview.approve-all-pending",{count:H.pending}),f(e=>{let t={...e};for(let e of V){var n;(null!=(n=t[e.task.taskKey])?n:"pending")==="pending"&&(t[e.task.taskKey]="approved")}return t}))},[V,H.pending]),en=(0,a.useCallback)(async()=>{var e,t,n;let r=d.trim();if(!r)return;let a=B?F:void 0;if(B&&0===F.length)return void x.oR.error("승인된 카드가 없습니다 — 카드를 → 스와이프해서 승인하세요.");(0,v.cY)("intake.memo-preview.register.submit",{length:r.length,mode:B?"selective":"express",includeCount:null!=(e=null==a?void 0:a.length)?e:null,useRealLlm:K,commitToTox:$}),u(!0);try{let e={rawText:r,...a?{includeTaskKeys:a}:{},...K?{useRealLlm:!0}:{},...U?{useRealEnrich:!0}:{}},s=$?await l.commit(e):await l.preview({...e,register:!0});p(s);let i=s.register;if(i){let e=null!=(n=null==(t=i.skippedTaskKeys)?void 0:t.length)?n:0;N({missions:i.missionIds.length,tasks:i.taskIds.length,skipped:e});let r=e>0?" \xb7 ".concat(e," skipped"):"",a=$?"~/.elanous/tasks/tasks.db":"in-memory";x.oR.success("registered ".concat(i.missionIds.length," mission").concat(1===i.missionIds.length?"":"s"," \xb7 ").concat(i.taskIds.length," task").concat(1===i.taskIds.length?"":"s"," (").concat(a,")").concat(r))}else x.oR.error("register skipped — endpoint returned no register payload")}catch(e){x.oR.error("register failed: ".concat(e instanceof Error?e.message:e)),(0,v.cY)("intake.memo-preview.register.error",{err:String(e)})}finally{u(!1)}},[l,d,B,F,K,$,U]);return(0,r.jsxs)("section",{className:"mx-auto flex max-w-md flex-col gap-4 p-4","data-testid":"memo-intake-preview",children:[(0,r.jsxs)("header",{className:"space-y-1",children:[(0,r.jsx)("h2",{className:"font-heading text-lg font-medium",children:"New from memo"}),(0,r.jsx)("p",{className:"text-xs text-muted-foreground",children:"Raw memo dump → 자동 task graph. ←/→/↑/↓ swipe = 거절/승인/잠시 멈춤/펼치기."}),(0,r.jsxs)("label",{"data-testid":"memo-intake-llm-toggle",className:"flex items-center gap-2 text-[10px] text-muted-foreground",children:[(0,r.jsx)("input",{type:"checkbox",checked:K,onChange:e=>{let t=e.target.checked;R("use-real-llm",K,t,null==m?void 0:m.intakeId),A(t)},disabled:c||P,"data-testid":"memo-intake-llm-toggle-input"}),(0,r.jsxs)("span",{children:[(0,r.jsx)("strong",{className:K?"text-foreground":"",children:"Enable Real LLM"})," ","— ",K?"실 streamLLM 호출 (provider 는 ~/.elanous/config.json \xb7 user-config 우선)":"LLM 미호출 \xb7 skeleton fallback \xb7 pipeline 흐름 + cards 렌더만 검증"]})]}),(0,r.jsxs)("label",{"data-testid":"memo-intake-enrich-toggle",className:"flex items-center gap-2 text-[10px] text-muted-foreground",children:[(0,r.jsx)("input",{type:"checkbox",checked:U,onChange:e=>{let t=e.target.checked;R("use-real-enrich",U,t,null==m?void 0:m.intakeId),X(t)},disabled:c||P,"data-testid":"memo-intake-enrich-toggle-input"}),(0,r.jsxs)("span",{children:[(0,r.jsx)("strong",{className:U?"text-foreground":"",children:"Enable Real enrich"})," ","— ",U?"URL fetch + gh repo view 호출 (keyword crawl 은 stub \xb7 FU-I7b.2)":'모든 enrichment 가 per-row "no plugin" diag \xb7 외부 HTTP 호출 0']})]}),(0,r.jsxs)("label",{"data-testid":"memo-intake-commit-toggle",className:"flex items-center gap-2 text-[10px] text-muted-foreground",children:[(0,r.jsx)("input",{type:"checkbox",checked:$,onChange:e=>{let t=e.target.checked;R("commit-to-tox",$,t,null==m?void 0:m.intakeId),_(t)},disabled:c||P,"data-testid":"memo-intake-commit-toggle-input"}),(0,r.jsxs)("span",{children:[(0,r.jsx)("strong",{className:$?"text-rose-700 dark:text-rose-400":"",children:"Commit to real TOX"})," ","— ",$?"Register 가 ~/.elanous/tasks/tasks.db 에 실 mission/task 쓰기 + workflow YAML 디스크 저장 (되돌릴 수 없음)":"Register 가 in-memory store 만 사용 \xb7 사용자 TOX 미터치"]})]})]}),(0,r.jsx)("textarea",{value:d,onChange:e=>o(e.target.value),placeholder:"- 스크린 레코딩 능력 흡수\n https://github.com/siddharthvaddem/openscreen\n- 이미지 바로 보기 안 되는 이유 분석\n\n==== 다이어그램 강화 ====\n위젯 surface \xb7 Mermaid \xb7 DrawIO repo 확인",rows:6,disabled:c,"data-testid":"memo-intake-textarea",className:"w-full resize-y rounded-md border border-input bg-background px-3 py-2 font-mono text-sm shadow-xs focus:outline-none focus:ring-2 focus:ring-ring"}),(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,r.jsx)(i.$,{type:"button",size:"sm",onClick:()=>void Z(),disabled:c||P||!d.trim(),"data-testid":"memo-intake-submit",children:c&&!m?"Running…":"Run preview"}),(0,r.jsx)(i.$,{type:"button",size:"sm",variant:"ghost",onClick:q,disabled:c||P,"data-testid":"memo-intake-photo","aria-label":"upload photo for OCR",title:"사진 / 화이트보드 / post-it → OCR → memo",children:P?"⏳ OCR…":"\uD83D\uDCF7 Photo"}),(0,r.jsx)("input",{ref:L,type:"file",accept:"image/*",capture:"environment",className:"hidden","data-testid":"memo-intake-photo-input",onChange:e=>void Q(e)}),m&&(0,r.jsx)(i.$,{type:"button",size:"sm",variant:"ghost",onClick:W,disabled:c,"data-testid":"memo-intake-reset",children:"Reset"})]}),m&&(0,r.jsx)(z,{res:m,registered:j}),m&&null===j&&(0,r.jsx)(T,{open:I,hint:C,busy:c,onToggle:()=>S(e=>!e),onHintChange:E,onSubmit:()=>void G()}),m&&V.length>0&&(0,r.jsx)(J,{cards:V,verdicts:g,topIndex:h,onSwipe:ee}),m&&V.length>0&&(0,r.jsx)(M,{tallies:H,total:V.length}),m&&V.length>0&&(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,r.jsx)(i.$,{type:"button",size:"sm",variant:"ghost",onClick:et,disabled:c||0===H.pending||null!==j,"data-testid":"memo-intake-approve-pending",children:"Approve all pending (".concat(H.pending,")")}),(0,r.jsx)(i.$,{type:"button",size:"sm",onClick:()=>void en(),disabled:c||null!==j||B&&0===F.length,"data-testid":"memo-intake-register",children:j?"Registered ✓ (".concat(j.tasks," tasks)"):c?"Registering…":B?"Register approved (".concat(F.length,")"):"Register all (".concat(V.length,")")}),(0,r.jsx)("span",{className:"text-[10px] text-muted-foreground",children:"".concat(h," / ").concat(V.length," reviewed")})]}),y&&(0,r.jsx)(Y,{card:y,onClose:()=>w(null)})]})}function M(e){let{tallies:t,total:n}=e;return(0,r.jsxs)("div",{"data-testid":"memo-intake-tally",className:"flex flex-wrap items-center gap-2 text-[10px] text-muted-foreground",children:[(0,r.jsxs)("span",{className:"font-medium",children:[n," 카드"]}),(0,r.jsxs)("span",{"data-testid":"memo-tally-approved",className:"rounded-full bg-emerald-500/15 px-2 py-0.5 text-emerald-700 ring-1 ring-emerald-500/30",children:["✓ ",t.approved]}),(0,r.jsxs)("span",{"data-testid":"memo-tally-rejected",className:"rounded-full bg-rose-500/15 px-2 py-0.5 text-rose-700 ring-1 ring-rose-500/30",children:["✗ ",t.rejected]}),(0,r.jsxs)("span",{"data-testid":"memo-tally-deferred",className:"rounded-full bg-amber-500/15 px-2 py-0.5 text-amber-700 ring-1 ring-amber-500/30",children:["⏸ ",t.deferred]}),(0,r.jsxs)("span",{"data-testid":"memo-tally-pending",className:"rounded-full bg-muted px-2 py-0.5 ring-1 ring-border",children:["… ",t.pending]})]})}function T(e){let{open:t,hint:n,busy:a,onToggle:s,onHintChange:l,onSubmit:d}=e;return(0,r.jsxs)("div",{"data-testid":"memo-intake-refine",className:"space-y-2",children:[(0,r.jsx)(i.$,{type:"button",size:"sm",variant:"ghost",onClick:s,disabled:a,"data-testid":"memo-intake-refine-toggle",className:"text-xs",children:t?"↓ Hide refine":"↻ Refine decomposition"}),t&&(0,r.jsxs)("div",{className:"space-y-2 rounded-lg border border-dashed border-border bg-card/30 p-3",children:[(0,r.jsx)("p",{className:"text-[10px] text-muted-foreground",children:"LLM 에 다시 prompt — 원본 memo + 이전 분해 + hint 를 함께 보냅니다. 결과 카드의 verdict 는 초기화됩니다."}),(0,r.jsx)("textarea",{value:n,onChange:e=>l(e.target.value),placeholder:'예: "missions 더 작게" \xb7 "P0 만 남겨" \xb7 "t-9 ~ t-11 을 하나로 합쳐"',rows:2,disabled:a,"data-testid":"memo-intake-refine-textarea",className:"w-full resize-y rounded-md border border-input bg-background px-2 py-1.5 text-xs shadow-xs focus:outline-none focus:ring-2 focus:ring-ring"}),(0,r.jsx)(i.$,{type:"button",size:"sm",onClick:d,disabled:a||!n.trim(),"data-testid":"memo-intake-refine-submit",children:a?"Refining…":"Re-run with hint"})]})]})}function z(e){let{res:t,registered:n}=e;return(0,r.jsxs)("div",{"data-testid":"memo-intake-summary",className:"space-y-1 rounded-lg border border-dashed border-border bg-card/50 p-3 text-xs text-muted-foreground",children:[(0,r.jsxs)("p",{children:["intake ",(0,r.jsx)("code",{"data-testid":"memo-intake-id",className:"rounded bg-muted px-1 text-foreground",children:t.intakeId})," \xb7 ",t.decomposition.fallback?"skeleton fallback":"live"]}),(0,r.jsxs)("p",{children:[t.decomposition.missionCount," mission",1===t.decomposition.missionCount?"":"s"," \xb7"," ",t.decomposition.taskCount," task",1===t.decomposition.taskCount?"":"s"," \xb7"," ","workflow-eligible ",t.categorize.counts.workflowEligible,"/",t.categorize.counts.total," \xb7"," ","deps ",t.align.dependencyCount]}),n&&(0,r.jsxs)("p",{"data-testid":"memo-intake-registered",className:"text-emerald-600 dark:text-emerald-400",children:["✓ registered ",n.missions," mission",1===n.missions?"":"s"," \xb7 ",n.tasks," task",1===n.tasks?"":"s"," (in-memory)",n.skipped>0?" \xb7 ".concat(n.skipped," skipped"):""]})]})}function J(e){let{cards:t,verdicts:n,topIndex:s,onSwipe:i}=e,l=(0,a.useRef)(null),d=(0,a.useRef)(i);if((0,a.useEffect)(()=>{d.current=i},[i]),(0,a.useEffect)(()=>{let e=l.current;if(e)return(0,k.ix)(e,{onSwipe:e=>d.current(C[e])})},[]),(0,a.useEffect)(()=>{if(s>=t.length)return;let e=e=>{let t=E[e.key];t&&(e.preventDefault(),d.current(t))};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[s,t.length]),s>=t.length)return(0,r.jsx)("div",{"data-testid":"memo-deck-empty",className:"flex h-72 items-center justify-center rounded-2xl border border-dashed border-border text-sm text-muted-foreground",children:'모든 카드 검토 완료 — 아래 "Approve all & Register" 를 눌러 등록.'});let o=t.slice(s,s+3);return(0,r.jsxs)("div",{ref:l,"data-testid":"memo-deck","data-top-index":s,role:"region","aria-label":"memo intake card deck \xb7 좌우 = 거절/승인 \xb7 위 = 잠시 멈춤 \xb7 아래 = 펼치기",tabIndex:0,className:"relative h-80 select-none touch-none",children:[o.map((e,t)=>{var a;return(0,r.jsx)(S,{card:e,verdict:null!=(a=n[e.task.taskKey])?a:"pending",active:0===t,stackIndex:t},e.task.taskKey)}),(0,r.jsxs)("div",{"data-testid":"memo-deck-progress",className:"absolute -bottom-6 left-0 right-0 text-center text-[10px] text-muted-foreground",children:[s+1," / ",t.length]})]})}function Y(e){let{card:t,onClose:n}=e,{task:a}=t;return(0,r.jsx)("div",{"data-testid":"memo-card-expand",role:"dialog","aria-modal":"true",className:"fixed inset-0 z-50 flex items-end justify-center bg-foreground/40 p-4 sm:items-center",onClick:n,children:(0,r.jsxs)("div",{onClick:e=>e.stopPropagation(),className:"w-full max-w-md space-y-3 rounded-2xl border border-border bg-card p-5 shadow-xl",children:[(0,r.jsxs)("header",{className:"space-y-1",children:[(0,r.jsx)("p",{className:"text-[10px] uppercase tracking-wider text-muted-foreground",children:t.missionTitle}),(0,r.jsx)("h3",{className:"font-heading text-base font-medium",children:a.title})]}),(0,r.jsx)("p",{className:"text-sm text-foreground",children:a.intent}),(a.urls.length>0||a.keywords.length>0||a.refs.length>0)&&(0,r.jsxs)("div",{className:"space-y-1 text-xs text-muted-foreground",children:[a.urls.length>0&&(0,r.jsxs)("p",{"data-testid":"memo-card-expand-urls",children:["URLs: ",a.urls.join(" \xb7 ")]}),a.keywords.length>0&&(0,r.jsxs)("p",{"data-testid":"memo-card-expand-keywords",children:["Keywords: ",a.keywords.join(" \xb7 ")]}),a.refs.length>0&&(0,r.jsxs)("p",{"data-testid":"memo-card-expand-refs",children:["Refs: ",a.refs.join(" \xb7 ")]})]}),(0,r.jsxs)("p",{className:"text-[10px] text-muted-foreground",children:[a.category," \xb7 ",a.priority," priority \xb7 ",a.workflowEligible?"workflow":"no-workflow"," \xb7 confidence ",a.confidence]}),(0,r.jsx)("div",{className:"flex justify-end pt-1",children:(0,r.jsx)(i.$,{type:"button",size:"sm",variant:"ghost",onClick:n,"data-testid":"memo-card-expand-close",children:"Close"})})]})})}let P="elanous.intake.recent",D={absorb:"→ 흡수",tasks:"→ 작업",graph:"→ 그래프","ask-human":"→ 직접 고르세요"};function K(e){if(null==e?void 0:e.storage)return e.storage;try{return globalThis.localStorage}catch(e){return null}}function A(e){try{var t;let n=null==(t=K(e))?void 0:t.getItem(P);if(!n)return[];let r=JSON.parse(n);return Array.isArray(r)?r:[]}catch(e){return[]}}async function $(e,t,n){let r=d(n);return"absorb"===t?{absorbIds:(await o(e,n)).ids,recentPreview:r}:{acceptanceId:(await c(e,n)).acceptanceId,recentPreview:r}}function _(){var e,t;let{state:n,deps:l}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{client:o}=(0,s.Q)(),[c,m]=(0,a.useState)(""),[p,f]=(0,a.useState)(!1),[x,v]=(0,a.useState)(null),[k,b]=(0,a.useState)(null),[y,w]=(0,a.useState)(null),[j,N]=(0,a.useState)(null),[I,S]=(0,a.useState)({}),[R,C]=(0,a.useState)(!1),[E,O]=(0,a.useState)(""),[M,T]=(0,a.useState)([]),[z,J]=(0,a.useState)({}),Y=(0,a.useRef)(z),_=(0,a.useMemo)(()=>[...new Set(M.filter(e=>"absorb"===e.track).flatMap(e=>{var t;return null!=(t=e.ids)?t:[]}))],[M]),U=(0,a.useRef)(_);U.current=_;let X=(0,a.useRef)(()=>{}),[V,H]=(0,a.useState)(null),[B,F]=(0,a.useState)(!1),W=(0,a.useRef)(!1),q=(0,a.useRef)(0),Q=(0,a.useRef)(c);Q.current=c;let G=(0,a.useRef)(null),Z=(0,a.useRef)(I),ee=(0,a.useRef)(M),et=(0,a.useMemo)(()=>[...new Set([...M.filter(e=>"graph"===e.track).map(e=>e.runId),null==j?void 0:j.runId].filter(e=>!!e))],[M,null==j?void 0:j.runId]);(0,a.useEffect)(()=>{T(A(l))},[l]),(0,a.useEffect)(()=>{ee.current=M},[M]),(0,a.useEffect)(()=>{let e=!1,t=new Map,n=async r=>{var a;if(e||!U.current.includes(r)||g(null!=(a=Y.current[r])?a:null).settled)return;let s=null;try{s=await o.fetchJson("/v1/intake-ledger/items/".concat(encodeURIComponent(r)))}catch(e){}e||(Y.current={...Y.current,[r]:s},J(Y.current),U.current.includes(r)&&!g(s).settled?t.set(r,setTimeout(()=>{n(r)},6e4)):t.delete(r))};return X.current=e=>{var r;t.has(e)||g(null!=(r=Y.current[e])?r:null).settled||(t.set(e,null),n(e))},U.current.forEach(X.current),()=>{for(let n of(e=!0,t.values()))null!==n&&clearTimeout(n);t.clear(),X.current=()=>{}}},[o]),(0,a.useEffect)(()=>{_.forEach(X.current)},[_]);let en=(0,a.useCallback)(e=>{var t,n;T(function(e,t){let n=[e,...A(t)].slice(0,20);try{var r;null==(r=K(t))||r.setItem(P,JSON.stringify(n))}catch(e){}return n}({...e,at:null!=(n=null==l||null==(t=l.now)?void 0:t.call(l))?n:new Date().toISOString()},l))},[l]),er=(0,a.useCallback)(async()=>{let e=c.trim();if(e&&!p){f(!0),v(null),b(null);try{var t;let n=await $(o,"absorb",e);b(null!=(t=n.absorbIds)?t:[]),en({track:"absorb",preview:n.recentPreview,ids:n.absorbIds})}catch(e){v(e instanceof Error?e.message:String(e))}finally{f(!1)}}},[p,o,en,c]),ea=(0,a.useCallback)(()=>{let e=c.trim();e&&!p&&(O(e),C(!0),en({track:"split",preview:d(e)}))},[p,en,c]),es=(0,a.useCallback)(async()=>{let e=c.trim();if(e&&!p){f(!0),v(null),w(null),N(null);try{var t;let n=await $(o,"graph",e);w(null!=(t=n.acceptanceId)?t:null),G.current=Date.now(),en({track:"graph",preview:n.recentPreview,acceptanceId:n.acceptanceId})}catch(e){v(e instanceof Error?e.message:String(e))}finally{f(!1)}}},[p,o,en,c]);(0,a.useEffect)(()=>{let e=++q.current;if(H(null),!c.trim())return;let t=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e)},r=e.trim();if(!r)return()=>{};let a=n.setTimeout(()=>t(r),500);return()=>n.clearTimeout(a)}(c,t=>{u(o,t).then(t=>{q.current===e&&H(t)},()=>{q.current===e&&H(null)})});return()=>{++q.current,t()}},[o,c]);let ei=(0,a.useCallback)(async()=>{let e=c.trim();if(!e||W.current||p||(null==V?void 0:V.reason)!=="rule-unknown")return;let t=++q.current;W.current=!0,F(!0);try{let n=await u(o,e,{classify:!0});q.current===t&&Q.current.trim()===e&&H(n)}catch(n){q.current===t&&Q.current.trim()===e&&H({track:"ask-human",confidence:0,reason:"classifier-failed:request-error",decidedBy:"classifier"})}finally{W.current=!1,F(!1)}},[p,o,null==V?void 0:V.reason,c]);(0,a.useEffect)(()=>{if(!y)return;let e=!1,t=async()=>{var t,n;if(e)return;let r=null!=(t=G.current)?t:Date.now();if(!(Date.now()-r>3e5))try{let t=await o.fetchJson("/v1/harness/ask-status?acceptanceId=".concat(encodeURIComponent(y)));if(!e&&(N(t),t.runId&&ee.current.some(e=>"graph"===e.track&&e.acceptanceId===y&&e.runId!==t.runId))){let e=ee.current.map(e=>"graph"===e.track&&e.acceptanceId===y?{...e,runId:t.runId}:e);ee.current=e;try{null==(n=K(l))||n.setItem(P,JSON.stringify(e))}catch(e){}T(e)}}catch(e){}};t();let n=setInterval(()=>{t()},5e3);return()=>{e=!0,clearInterval(n)}},[y,o,l]),(0,a.useEffect)(()=>{Z.current=I},[I]),(0,a.useEffect)(()=>{let e;if(0===et.length)return;let t=!1,n=!1,r=async()=>{if(t||n)return;let a=et.filter(e=>{var t;return!h(null!=(t=Z.current[e])?t:[]).done});if(0!==a.length){n=!0;try{let e=await Promise.allSettled(a.map(e=>o.fetchJson("/v1/harness/run-events?runId=".concat(encodeURIComponent(e)))));if(t)return;let n={};e.forEach((e,t)=>{"fulfilled"===e.status&&(n[a[t]]=e.value)}),Object.keys(n).length>0&&(Z.current={...Z.current,...n},S(Z.current))}finally{n=!1,!t&&et.some(e=>{var t;return!h(null!=(t=Z.current[e])?t:[]).done})&&(e=setTimeout(()=>{r()},3e4))}}};return r(),()=>{t=!0,e&&clearTimeout(e)}},[o,et]);let el=null!=n?n:{text:c,busy:p,error:x,absorbIds:k,acceptanceId:y,graph:j,runEvents:I,splitOpen:R,splitMemo:E,recent:M,route:V},ed=(0,a.useMemo)(()=>{var e,t;return el.acceptanceId?{acceptanceId:el.acceptanceId,phase:null==(e=el.graph)?void 0:e.phase,runId:null==(t=el.graph)?void 0:t.runId}:null},[el.acceptanceId,el.graph]),eo=0===el.text.trim().length,ec=null!=(e=el.route)?e:null,eu=ec?"absorb"===(t=ec.track)?"absorb":"tasks"===t?"split":"graph"===t?"graph":null:null,em=e=>eu===e?"ring-2 ring-ring":void 0;return(0,r.jsxs)("section",{className:"mx-auto flex max-w-lg flex-col gap-4 p-4","data-testid":"intake-front-door",children:[(0,r.jsx)("header",{className:"space-y-1",children:(0,r.jsx)("h1",{className:"font-heading text-lg font-medium",children:"Intake"})}),(0,r.jsx)("textarea",{value:el.text,onChange:e=>m(e.target.value),rows:6,disabled:el.busy,"data-testid":"intake-front-door-field","aria-label":"intake",className:"w-full resize-y rounded-md border border-input bg-background px-3 py-2 text-sm shadow-xs focus:outline-none focus:ring-2 focus:ring-ring"}),(0,r.jsx)("p",{className:"text-xs text-muted-foreground","data-testid":"intake-front-door-explainer",children:"보내면 elanous 가 이 글을 처리합니다(흡수 \xb7 작업 분할 \xb7 그래프 실행)."}),ec&&(0,r.jsxs)("div",{"data-testid":"intake-route-chip","data-auto-submit":"0",className:"space-y-0.5 text-sm",children:[(0,r.jsx)("p",{"data-testid":"intake-route-chip-label",children:D[ec.track]}),"classifier"===ec.decidedBy&&(0,r.jsxs)("p",{"data-testid":"intake-route-chip-classifier",children:["분류기 판정 \xb7 확신 ",Math.round(100*ec.confidence),"%"]}),(0,r.jsx)("p",{"data-testid":"intake-route-chip-reason",className:"text-xs text-muted-foreground",children:function(e){if("classifier"!==e.decidedBy)return e.reason;if(e.reason.startsWith("classifier-failed:"))return"분류기가 못 갈랐습니다 — 직접 골라 주세요";if(e.reason.startsWith("classifier-low-confidence:")){var t,n;let r=e.reason.slice(26);return"분류기 추정: ".concat(null!=(n=null==(t=D[r])?void 0:t.slice(2))?n:r," (확신 낮음)")}return e.reason}(ec)}),"rule-unknown"===ec.reason&&(0,r.jsx)(i.$,{type:"button",size:"sm",variant:"outline",disabled:B||el.busy||eo,onClick:()=>void ei(),"data-testid":"intake-route-classify",children:"분류기로 가르기"})]}),(0,r.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,r.jsx)(i.$,{type:"button",size:"sm",className:em("absorb"),"aria-pressed":"absorb"===eu,disabled:eo||el.busy,onClick:()=>void er(),"data-testid":"intake-absorb","data-emphasized":"absorb"===eu?"true":"false",children:"흡수"}),(0,r.jsx)(i.$,{type:"button",size:"sm",variant:"outline",className:em("split"),"aria-pressed":"split"===eu,disabled:eo||el.busy,onClick:ea,"data-testid":"intake-split","data-emphasized":"split"===eu?"true":"false",children:"작업으로 나누기"}),(0,r.jsx)(i.$,{type:"button",size:"sm",variant:"secondary",className:em("graph"),"aria-pressed":"graph"===eu,disabled:eo||el.busy,onClick:()=>void es(),"data-testid":"intake-graph","data-emphasized":"graph"===eu?"true":"false",children:"그래프로 실행"})]}),el.absorbIds&&(0,r.jsxs)("div",{"data-testid":"intake-absorb-result",className:"space-y-1 text-sm",children:[(0,r.jsx)("p",{children:"대기열에 넣었습니다(아침 정기 흡수에서 처리)"}),(0,r.jsx)("ul",{children:el.absorbIds.map(e=>(0,r.jsx)("li",{"data-testid":"intake-absorb-id",children:e},e))})]}),ed&&(0,r.jsxs)("div",{"data-testid":"intake-graph-result",className:"space-y-1 text-sm",children:[(0,r.jsx)("p",{"data-testid":"intake-acceptance-id",children:ed.acceptanceId}),ed.phase&&(0,r.jsx)("p",{"data-testid":"intake-graph-phase",children:ed.phase}),ed.runId&&(0,r.jsx)("p",{"data-testid":"intake-graph-run",children:ed.runId})]}),el.error&&(0,r.jsx)("p",{className:"text-sm text-destructive","data-testid":"intake-front-door-error",children:el.error}),el.splitOpen&&(0,r.jsx)("div",{"data-testid":"intake-split-host",children:(0,r.jsx)(L,{initialMemo:el.splitMemo,onClose:()=>C(!1)})}),el.recent.length>0&&(0,r.jsx)("ul",{"data-testid":"intake-recent",className:"space-y-1 text-xs text-muted-foreground",children:el.recent.map((e,t)=>{var n;let a=(e=>{var t,n,r;let a=null!=(n=e.runId)?n:e.acceptanceId===el.acceptanceId?null==ed?void 0:ed.runId:void 0;return a?h(null!=(r=null==(t=el.runEvents)?void 0:t[a])?r:[]):null})(e);return(0,r.jsxs)("li",{"data-testid":"intake-recent-row",children:[e.track," \xb7 ",e.preview,e.ids?" \xb7 ".concat(e.ids.join(", ")):"","absorb"===e.track&&(null==(n=e.ids)?void 0:n.map(e=>{var t,n;let a=Object.hasOwn(z,e)?g(null!=(t=z[e])?t:null):null;return(0,r.jsxs)("span",{"data-testid":"intake-absorb-status",children:[" \xb7 흡수: ",null!=(n=null==a?void 0:a.label)?n:"조회 중",(null==a?void 0:a.noteRef)?" \xb7 ".concat(a.noteRef):""]},e)})),e.acceptanceId?" \xb7 ".concat(e.acceptanceId):"",(null==a?void 0:a.stage)&&(0,r.jsxs)("span",{"data-testid":"intake-run-stage",children:[" \xb7 단계: ",a.stage]}),(null==a?void 0:a.lastEventAt)&&(0,r.jsxs)("time",{"data-testid":"intake-run-last-event",dateTime:a.lastEventAt,children:[" \xb7 마지막 사건: ",a.lastEventAt]}),(null==a?void 0:a.done)&&(0,r.jsxs)("span",{"data-testid":"intake-run-outcome",children:[" \xb7 ","completed"===a.outcome?"완료":"failed"===a.outcome?"실패":"결과 미상",a.error?" \xb7 ".concat(a.error.split("\n")[0]):""]})]},"".concat(e.at,"-").concat(t))})})]})}},94387:(e,t,n)=>{n.d(t,{GM:()=>l,J3:()=>i,WF:()=>r,bR:()=>s,m:()=>d,r5:()=>a});let r="/v1/devices",a="/v1/approvals/merges",s="/v1/templates/capability-preview",i="/v1/idle-nudge/preview",l="/v1/morning-digest/showroom",d="/v1/next-fluent/dispatch"}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9740],{19528:(e,t,n)=>{n.d(t,{Er:()=>s,cj:()=>c,yR:()=>i});let a=/^(oauth\.|harness\.decision|llm\.router)/;function s(e){let t=[],n=e=>{"string"==typeof e&&e.trim()&&!t.includes(e.trim())&&t.push(e.trim())};for(let t of e){var s;let e=null!=(s=t.data)?s:{};if(t.category.startsWith("oauth.")){for(let t of["from","to","name","account"])n(e[t]);if(Array.isArray(e.usage))for(let t of e.usage)n(null==t?void 0:t.name);continue}if(a.test(t.category))for(let t of(n(e.account),["what","why","reason"])){let a=e[t];if("string"==typeof a)for(let e of a.matchAll(/계정\s+([A-Za-z0-9][\w.-]*)/g))n(e[1])}}return t}function l(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function r(e){let t=new Map(e.map((e,t)=>[e,"account-".concat(t+1)])),n=e.length?RegExp("(^|[^\\w-])(".concat(e.map(l).sort((e,t)=>t.length-e.length).join("|"),")(?![\\w-])"),"g"):null;return(e,a)=>{let s=e.replace(/\/Users\/[^/\s"']+/g,"~").replace(/(크레딧|credits?|💳)(\s*[:=]?\s*)[\d][\d,.]*/gi,"$1$2•••").replace(/[\d][\d,.]*(\s*)(크레딧|credits?)/gi,"•••$1$2").replace(/\$\s?[\d][\d,.]*/g,"$•••").replace(/(잔량?|remaining|left)(\s*[:=]?\s*)(?:[A-Za-z0-9][\w.-]*\s+)?\d+(?:\.\d+)?\s?%/gi,"$1$2•••");return a&&n&&(s=s.replace(n,(e,n,a)=>{var s;return"".concat(n).concat(null!=(s=t.get(a))?s:"account")})),s}}function o(e,t){if("string"==typeof e)return t(e);if(Array.isArray(e))return e.map(e=>o(e,t));if(e&&"object"==typeof e){let n={};for(let[a,s]of Object.entries(e))"apiEquivalentUsd"===a||"usd"===a||/credit(s|Balance)?$/i.test(a)||(n[a]=o(s,t));return n}return e}function i(e){let t=r(s(e));return e.map(e=>{let n=a.test(e.category);return{...e,event:t(e.event,!1),data:e.data?o(e.data,e=>t(e,n)):e.data}})}function c(e,t){let n=r(t);return o(e,e=>n(e,!0))}},20796:(e,t,n)=>{n.d(t,{D3:()=>x,GJ:()=>g,Gp:()=>r,HR:()=>p,IE:()=>f,JW:()=>u,Jo:()=>v,NZ:()=>m,OL:()=>o,cD:()=>h,f:()=>c,fT:()=>b,kJ:()=>i,lb:()=>d});var a=n(90686);let s=e=>"string"==typeof e&&e.trim()?e:null,l=e=>"number"==typeof e&&Number.isFinite(e)?e:0;function r(e){let t=[];for(let i of e){var n,a,r,o;if(!i.category.startsWith("llm.usage"))continue;let e=null!=(n=i.data)?n:{},c=Date.parse(i.ts);if(!Number.isFinite(c))continue;let d=null!=(a=e.cost)?a:{};t.push({ts:i.ts,t:c,model:null!=(r=s(e.model))?r:"unknown",site:null!=(o=s(e.site))?o:"unknown",billing:s(e.billing),provider:s(e.billingProvider),input:l(e.inputTokens),output:l(e.outputTokens),cache:l(e.cacheReadInputTokens),apiUsd:l(d.apiEquivalentUsd)})}return t.sort((e,t)=>t.t-e.t)}function o(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:30,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:6e4,s=Math.floor(t/a)*a-(n-1)*a,l=Array.from({length:n},(e,t)=>({t:s+t*a,count:0,tokens:0,byModel:{}}));for(let t of e){var r;let e=Math.floor((t.t-s)/a);if(e<0||e>=n)continue;let o=l[e];o.count+=1,o.tokens+=t.input+t.output,o.byModel[t.model]=(null!=(r=o.byModel[t.model])?r:0)+1}return l}function i(e,t,n){let a=t-n/2,s=new Map;for(let r of e){var l;if(r.t<t-n)continue;let e=null!=(l=s.get(r.model))?l:{count:0,tokens:0,late:0,early:0};e.count+=1,e.tokens+=r.input+r.output,r.t>=a?e.late+=1:e.early+=1,s.set(r.model,e)}return[...s.entries()].map(e=>{let[t,n]=e;return{model:t,count:n.count,tokens:n.tokens,delta:n.late>n.early?1:n.late<n.early?-1:0}}).sort((e,t)=>t.count-e.count)}function c(e){var t,n,a;let s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:7,l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:4,r=new Map,o=new Map;for(let a of e)r.set(a.model,(null!=(t=r.get(a.model))?t:0)+1),o.set(a.site,(null!=(n=o.get(a.site))?n:0)+1);let i=[...r.entries()].sort((e,t)=>t[1]-e[1]).slice(0,s).map(e=>{let[t]=e;return t}),c=[...o.entries()].sort((e,t)=>t[1]-e[1]).slice(0,l).map(e=>{let[t]=e;return t}),d={},u=0;for(let t of e){if(!i.includes(t.model)||!c.includes(t.site))continue;let e="".concat(t.model,"|").concat(t.site);d[e]=(null!=(a=d[e])?a:0)+1,u=Math.max(u,d[e])}return{models:i,sites:c,cells:d,max:u}}function d(e){let t=new Map;for(let a of e){var n;let e=s(null==(n=a.data)?void 0:n.runId),l=Date.parse(a.ts);if(!e||!Number.isFinite(l))continue;let r=t.get(e);r?(r.lo=Math.min(r.lo,l),r.hi=Math.max(r.hi,l)):t.set(e,{lo:l,hi:l})}return[...t.entries()].map(e=>{let[t,n]=e;return{runId:t,ms:n.hi-n.lo}})}function u(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:40,n=Array(t).fill(0);if(0===e.length)return{bins:n,lo:0,hi:0,max:0};let a=Math.min(...e),s=Math.max(...e),l=(s-a)/t||1;for(let s of e)n[Math.min(t-1,Math.floor((s-a)/l))]+=1;return{bins:n,lo:a,hi:s,max:Math.max(...n)}}function p(e){let t=Object.fromEntries(a.lV.map(e=>[e,0]));for(let n of e.snapshot.runs)n.current&&(t[n.current]+=1);let n=null;for(let e of a.lV)t[e]>0&&(!n||t[e]>t[n])&&(n=e);return{counts:t,busiest:n}}function h(e){let t=0,n=0;for(let s of e){let e=(0,a.dl)(s);"gate"===e.stage&&("ok"===e.tone?t+=1:"bad"===e.tone&&(n+=1))}return{pass:t,fail:n}}function m(e){let t=new Set,n=new Set;for(let o of e){var a,r;if(!o.category.startsWith("review-loop"))continue;let e=null!=(a=o.data)?a:{},i=null!=(r=s(e.pr))?r:l(e.prNumber)?String(l(e.prNumber)):null;i&&(("rework-start"===o.event||"judge-verdict"===o.event&&l(e.asks)>0)&&t.add(i),/merged/.test(o.event)&&n.add(i))}return[...t].filter(e=>n.has(e))}function f(e){let t=new Map;for(let a of e){var n;let e=s(null==(n=a.data)?void 0:n.runId);e&&a.instance&&!t.has(e)&&t.set(e,a.instance)}return[...t.entries()].map(e=>{let[t,n]=e;return{runId:t,instance:n}})}function x(e){let t=new Map;for(let i of e){var n,a,r,o;let e=s(null==(n=i.data)?void 0:n.runId);if(!e)continue;let c=Date.parse(i.ts),d=null;if("decompose-and-retry.applied"===i.event&&Array.isArray(null==(a=i.data)?void 0:a.pieceFeatures))d=i.data.pieceFeatures.map(e=>"string"==typeof e?e:"").filter(Boolean);else if("goal-steps-decomposed"===i.event&&l(null==(r=i.data)?void 0:r.stepCount)>1){let e=Math.min(12,l(null==(o=i.data)?void 0:o.stepCount));d=Array.from({length:e},(t,n)=>"단계 ".concat(n+1,"/").concat(e))}if(!d||0===d.length)continue;let u=t.get(e);(!u||c>=u.t)&&t.set(e,{t:c,pieces:d.slice(0,12)})}return[...t.entries()].map(e=>{let[t,n]=e;return{runId:t,pieces:n.pieces}})}function g(e){let t=[];for(let a of e){var n;if("harness.substrate"!==a.category||"dispatch-pod"!==a.event)continue;let e=s(null==(n=a.data)?void 0:n.podPool);e&&t.push({pool:e,ts:a.ts})}return t}function v(e){let t=new Map,n=new Map;for(let u of e){var r,o,i,c,d;let e=s(null==(r=u.data)?void 0:r.runId);if(!e)continue;u.category.startsWith("review-loop")&&"rework-start"===u.event&&t.set(e,Math.max(null!=(i=t.get(e))?i:0,l(null==(o=u.data)?void 0:o.round)||(null!=(c=t.get(e))?c:0)+1));let p=(0,a.dl)(u);"gate"===p.stage&&"bad"===p.tone&&n.set(e,(null!=(d=n.get(e))?d:0)+1)}return[...[...t.entries()].map(e=>{let[t,n]=e;return{runId:t,stage:"review",retries:n}}),...[...n.entries()].map(e=>{let[t,n]=e;return{runId:t,stage:"gate",retries:n}})]}function b(e){let t=new Map;for(let l of e){var n;let e=s(null==(n=l.data)?void 0:n.runId);if(!e)continue;let{stage:r,tone:o}=(0,a.dl)(l),i="".concat(e,"|").concat(l.category,".").concat(l.event),c=t.get(i);if(c){c.count+=1,c.bad||(c.bad="bad"===o);continue}t.set(i,{runId:e,key:i,label:l.event,stage:r,count:1,bad:"bad"===o})}return[...t.values()]}},51215:(e,t,n)=>{let a;n.d(t,{cY:()=>d,x8:()=>o});let s={debug:0,info:1,warn:2,error:3},l="/v1/debug-logs/batch",r=null;function o(e){r=e}class i{health(){return{pending:this.queue.length,consecutiveFailures:this.consecutiveFailures,lastOkAt:this.lastOkAt,droppedByCap:this.droppedByCap,fallbackBatches:this.fallbackBatches}}push(e){if(!(s[function(e){let t=e.slice(e.lastIndexOf(".")+1).toLowerCase();return/^(error|exception|crash|fail|failed)$/.test(t)?"error":/^(warn|degraded|timeout)$/.test(t)?"warn":/^(boot|ready|start|begin|open|ok|done|resolve|end|stop|close)$/.test(t)?"info":"debug"}(e.category)]<s[this.minLevel])){if(this.queue.push(e),this.queue.length>500){let e=this.queue.length-500;this.droppedByCap+=e,this.queue.splice(0,e)}null===this.timer&&(this.timer=setTimeout(()=>{this.flush()},100))}}async flush(){if(this.timer&&(clearTimeout(this.timer),this.timer=null),this.inFlight||0===this.queue.length)return;let e=this.queue.slice(0,100);this.inFlight=!0;let t=!1,n=JSON.stringify({records:e});try{var a,s;t=await (a=this.fetchFn(n),s=this.postTimeoutMs,new Promise((e,t)=>{let n=setTimeout(()=>t(Error("debug-forward timeout after ".concat(s,"ms"))),s);a.then(t=>{clearTimeout(n),e(t)},e=>{clearTimeout(n),t(e)})}))}catch(e){t=!1}finally{this.inFlight=!1}if(!t){if(this.consecutiveFailures+=1,this.consecutiveFailures>=2&&r)try{await r(JSON.stringify({records:[...e,this.blockedNotice()]}))&&(this.fallbackBatches+=1)}catch(e){}this.wasFailing=!0,this.scheduleRetry();return}let l=this.lastOkAt;this.lastOkAt=Date.now();let o=this.consecutiveFailures;this.consecutiveFailures=0,this.queue.splice(0,e.length),this.wasFailing&&(this.wasFailing=!1,this.queue.push({ts:new Date().toISOString(),category:"pwa.debug-forwarder.recovered",event:"recovered",data:{consecutiveFailures:o,droppedByCap:this.droppedByCap,fallbackBatches:this.fallbackBatches,pending:this.queue.length,previousOkAt:l},source:{platform:"pwa"}})),this.queue.length>0&&null===this.timer&&(this.timer=setTimeout(()=>{this.flush()},100))}scheduleRetry(){if(null!==this.timer||0===this.queue.length)return;let e=Math.min(100*2**this.consecutiveFailures,3e4);this.timer=setTimeout(()=>{this.flush()},e)}blockedNotice(){return{ts:new Date().toISOString(),category:"pwa.debug-forwarder.http-blocked",event:"http-blocked",data:{consecutiveFailures:this.consecutiveFailures,pending:this.queue.length,droppedByCap:this.droppedByCap,lastOkAt:this.lastOkAt,via:"acp-fallback"},source:{platform:"pwa"}}}beaconFlush(){if(0!==this.queue.length)try{if("undefined"!=typeof navigator&&"function"==typeof navigator.sendBeacon){let e=this.queue.slice(0,100),t=new Blob([JSON.stringify({records:e})],{type:"application/json"});navigator.sendBeacon(l,t)&&this.queue.splice(0,e.length)}}catch(e){}}get pending(){return this.queue.length}constructor(e=c,t="debug",n=1e4){this.fetchFn=e,this.minLevel=t,this.postTimeoutMs=n,this.queue=[],this.timer=null,this.inFlight=!1,this.consecutiveFailures=0,this.lastOkAt=null,this.droppedByCap=0,this.fallbackBatches=0,this.wasFailing=!1}}async function c(e){return(await fetch(l,{method:"POST",headers:{"content-type":"application/json"},body:e,keepalive:!0,..."undefined"!=typeof AbortSignal&&"function"==typeof AbortSignal.timeout?{signal:AbortSignal.timeout(1e4)}:{}})).ok}function d(e,t){if("undefined"==typeof console)return;let n=new Date().toISOString();if(void 0!==t){let a="";try{let e=new WeakSet;a=JSON.stringify(t,(t,n)=>{if("bigint"==typeof n)return"".concat(n.toString(),"n");if("function"==typeof n)return"[fn ".concat(n.name||"anon","]");if(n&&"object"==typeof n){if(e.has(n))return"[circular]";e.add(n)}return n})}catch(e){a="[unserializable: ".concat(String(e),"]")}a&&a.length>800&&(a=a.slice(0,797)+"..."),console.debug("[".concat(n,"] ").concat(e," ").concat(a),t),u(n,e,a)}else console.debug("[".concat(n,"] ").concat(e)),u(n,e,void 0)}function u(e,t,n){let s,l=function(){if(void 0!==a)return a;let e=function(){try{let e="off"!==window.localStorage.getItem("elanous.pwa.debug.forward"),t=window.localStorage.getItem("elanous.pwa.debug.forwardLevel");return{forward:e,level:"info"===t||"warn"===t||"error"===t?t:"debug"}}catch(e){return{forward:!0,level:"debug"}}}();if(!e.forward)return a=null,null;let t=new i(c,e.level);try{window.addEventListener("visibilitychange",()=>{"hidden"===document.visibilityState&&t.beaconFlush()})}catch(e){}return a=t,t}();if(!l)return;let r=t.slice(t.lastIndexOf(".")+1)||t;if(void 0!==n&&""!==n)try{s=JSON.parse(n)}catch(e){s=n}l.push({ts:e,category:t,event:r,...void 0!==s?{data:s}:{},source:{platform:"pwa"}})}},54061:(e,t,n)=>{n.d(t,{HI:()=>r});var a=n(91269),s=n(42012),l=n(91514);function r(e){var t,n,r;let o=(0,l.M1)(),i=(t,n)=>{var a;return{queryKey:["live","logs",t,null!=(a=e.store)?a:"",e.windowMinutes],queryFn:()=>o.getLogs({category:t,since:"".concat(e.windowMinutes,"m"),limit:n,store:e.store}),refetchInterval:5e3}},c=(0,s.I)(i("goal-author,harness.frontdoor,harness.substrate,harness.boundary,harness.role-llm,dev-pipeline,self-dev,self-gate,review-loop",1500)),d=(0,s.I)(i("llm.usage",2e3)),u=(0,s.I)(i("harness.decision,oauth.codex-account,harness.boundary",300)),p=(0,s.I)(i("research",300)),h=(0,a.useMemo)(()=>{var e,t,n,a,s,l,r,o;return[...null!=(s=null==(e=c.data)?void 0:e.logs)?s:[],...null!=(l=null==(t=d.data)?void 0:t.logs)?l:[],...null!=(r=null==(n=u.data)?void 0:n.logs)?r:[],...null!=(o=null==(a=p.data)?void 0:a.logs)?o:[]]},[c.data,d.data,u.data,p.data]),m={data:(0,a.useMemo)(()=>({ok:!0,logs:h,count:h.length}),[h]),error:null!=(r=null!=(n=null!=(t=c.error)?t:d.error)?n:u.error)?r:null,dataUpdatedAt:Math.max(c.dataUpdatedAt,d.dataUpdatedAt,u.dataUpdatedAt,p.dataUpdatedAt),truncated:[c,d,u].some(e=>e.data&&e.data.count>=(e===d?2e3:e===c?1500:300))};return{logs:m,runs:(0,s.I)({queryKey:["live","runs"],queryFn:()=>o.getHarnessRuns(),refetchInterval:6e4}),instances:(0,s.I)({queryKey:["live","instances"],queryFn:()=>o.getLogInstances(),staleTime:6e4})}}},68550:(e,t,n)=>{n.d(t,{RT:()=>h});var a=n(41121),s=n(91269),l=n(45609),r=n.n(l),o=n(42012),i=n(91514),c=n(90686),d=n(51215);let u={"no-screen-key":"이 인스턴스 로그에 이 런의 화면 키가 없다 — 다른 우주(시험\xb7Pod)에서 돈 런이면 그 우주에서 본다.","screen-missing":"화면 키는 있는데 화면 파일이 없다 — 런이 끝나 화면이 정리됐을 수 있다.","log-store-missing":"이 인스턴스에 로그 저장소가 없다.","log-store-unreadable":"로그 저장소를 읽지 못했다."};function p(e){var t,n;let{runId:s,run:l,screen:o,screenError:i,lines:d,stopState:p,stopMessage:h,onStop:m,onConfirmStop:f,onCancelStop:x,onClose:g,max:v}=e,b=!!(null==o?void 0:o.stoppable);return(0,a.jsxs)("section",{className:"space-y-2 rounded-lg border border-primary/40 bg-card/60 p-3","aria-label":"런 서랍","data-live-run-drawer":s,children:[(0,a.jsxs)("header",{className:"flex flex-wrap items-center gap-2 text-sm",children:[(0,a.jsx)("span",{className:"font-mono text-xs text-muted-foreground",children:s}),(null==l?void 0:l.current)&&(0,a.jsx)("span",{className:"rounded bg-primary/15 px-1.5 py-0.5 text-[11px]",children:c.fQ[l.current]}),(null==l?void 0:l.blocked)&&(0,a.jsx)("span",{className:"rounded bg-error/15 px-1.5 py-0.5 text-[11px] text-error",children:"막힘"}),(null==l?void 0:l.pr)&&(0,a.jsxs)("span",{className:"font-mono text-[11px]",children:["PR #",l.pr]}),(0,a.jsxs)("span",{className:"ml-auto flex items-center gap-2",children:[v&&("confirm"===v.state?(0,a.jsxs)("span",{className:"flex items-center gap-1 text-xs",role:"alertdialog","aria-label":"MAX 이 런만 확인",children:[(0,a.jsx)("span",{className:"text-amber-500",children:"이 런만 30분 상세 계측(부하가 든다)?"}),(0,a.jsx)("button",{type:"button",onClick:v.confirm,className:"rounded-md border border-amber-500 px-2 py-1 text-amber-600 hover:bg-amber-500/10","data-elanous-action":"live-run-max-confirm",children:"켜기"}),(0,a.jsx)("button",{type:"button",onClick:v.cancel,className:"rounded-md px-2 py-1 text-muted-foreground hover:bg-muted",children:"취소"})]}):(0,a.jsx)("button",{type:"button",onClick:v.ask,disabled:"on"===v.state,className:"rounded-md border px-2 py-1 text-xs hover:bg-muted disabled:opacity-50","data-elanous-action":"live-run-max",title:"이 런의 판단 \xab왜\xb7목적\xb7어디로\xbb를 30분 자세히 남긴다",children:"on"===v.state?"● MAX 이 런 켜짐":"failed"===v.state?"MAX 못 켬 \xb7 다시":"MAX 이 런만"})),(0,a.jsx)(r(),{href:"/trace?level=L2&run=".concat(encodeURIComponent(s)),className:"rounded-md border px-2 py-1 text-xs hover:bg-muted","data-elanous-action":"live-run-trace",children:"Trace 로 →"}),!!(null==l?void 0:l.pr)&&"ok"!==l.stages.land&&(0,a.jsx)(r(),{href:"/approvals?pr=".concat(encodeURIComponent(l.pr)),className:"rounded-md border px-2 py-1 text-xs hover:bg-muted","data-elanous-action":"live-run-approvals",children:"승인 카드로 →"}),"confirm"===p?(0,a.jsxs)("span",{className:"flex items-center gap-1 text-xs",role:"alertdialog","aria-label":"멈춤 확인",children:[(0,a.jsx)("span",{className:"text-error",children:"이 런을 멈출까요? 되돌릴 수 없습니다."}),(0,a.jsx)("button",{type:"button",onClick:f,className:"rounded-md border border-error px-2 py-1 text-error hover:bg-error/10","data-elanous-action":"live-run-stop-confirm",children:"멈춤"}),(0,a.jsx)("button",{type:"button",onClick:x,className:"rounded-md px-2 py-1 text-muted-foreground hover:bg-muted",children:"취소"})]}):(0,a.jsx)("button",{type:"button",onClick:m,disabled:!b||"stopping"===p||"stopped"===p,title:b?"부드러운 멈춤을 보낸다(확인 한 번)":"살아 있는 화면이 없어 멈출 수 없다",className:"rounded-md border px-2 py-1 text-xs hover:bg-muted disabled:opacity-40","data-elanous-action":"live-run-stop",children:"⏹ 멈춤"}),(0,a.jsx)("button",{type:"button",onClick:g,className:"rounded-md px-2 py-1 text-xs text-muted-foreground hover:bg-muted","aria-label":"서랍 닫기",children:"✕"})]})]}),h&&(0,a.jsx)("p",{className:"text-xs ".concat("failed"===p?"text-error":"text-muted-foreground"),"data-live-run-stop-result":!0,children:h}),(0,a.jsxs)("div",{className:"grid gap-2 lg:grid-cols-2",children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)("h3",{className:"mb-1 text-xs font-medium text-muted-foreground",children:["화면",(null==o?void 0:o.screenKey)?(0,a.jsxs)("span",{className:"ml-1 font-mono",children:["\xb7 ",o.screenKey]}):null]}),(0,a.jsx)("pre",{className:"max-h-64 overflow-auto rounded-md border bg-muted/30 p-2 text-[11px] leading-relaxed","data-live-run-screen":!0,children:i?"화면을 못 읽었다: ".concat(i):null!=(n=null==o?void 0:o.text)?n:(null==o?void 0:o.reason)?null!=(t=u[o.reason])?t:o.reason:"불러오는 중…"})]}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("h3",{className:"mb-1 text-xs font-medium text-muted-foreground",children:["로그 ",(0,a.jsxs)("span",{className:"font-mono",children:["\xb7 ",d.length]})]}),(0,a.jsx)("pre",{className:"max-h-64 overflow-auto rounded-md border bg-muted/30 p-2 text-[11px] leading-relaxed","data-live-run-log":!0,children:d.slice(0,40).join("\n")||"—"})]})]})]})}function h(e){var t;let{runId:n,run:l,lines:r,onClose:c}=e,u=(0,i.M1)(),h=(0,o.I)({queryKey:["live","run-screen",n],queryFn:()=>u.getRunScreen(n,60),refetchInterval:3e3}),[m,f]=(0,s.useState)("idle"),[x,g]=(0,s.useState)(null),[v,b]=(0,s.useState)("idle");return(0,a.jsx)(p,{runId:n,run:l,screen:null!=(t=h.data)?t:null,screenError:h.error?h.error instanceof Error?h.error.message:String(h.error):null,lines:r,stopState:m,stopMessage:x,onStop:()=>f("confirm"),onConfirmStop:()=>{var e;let t=null==(e=h.data)?void 0:e.screenKey;t&&(f("stopping"),u.stopHarness(t).then(e=>{var t;let a=!!e.stopped;(0,d.cY)("pwa.live.run-stop",{runId:n,ok:a}),f(a?"stopped":"failed"),g(a?"멈춤을 보냈다 — 런이 다음 확인 지점에서 멈춘다(".concat(e.stopped,")."):"멈추지 못했다: ".concat(null!=(t=e.error)?t:"알 수 없음"))}).catch(e=>{(0,d.cY)("pwa.live.run-stop",{runId:n,ok:!1}),f("failed"),g("멈추지 못했다: ".concat(e instanceof Error?e.message:String(e)))}))},onCancelStop:()=>f("idle"),onClose:c,max:{state:v,ask:()=>b("confirm"),confirm:()=>{u.setLiveDetail({scope:n,ttlMin:30,by:"pwa-run-drawer"}).then(e=>{b(e.on?"on":"failed"),(0,d.cY)("pwa.live.run-max",{runId:n,on:e.on})}).catch(()=>b("failed"))},cancel:()=>b("idle")}})}},82157:(e,t,n)=>{n.d(t,{cn:()=>l});var a=n(3511),s=n(97043);function l(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,s.QP)((0,a.$)(t))}},90686:(e,t,n)=>{n.d(t,{BP:()=>d,Hc:()=>h,dl:()=>l,fQ:()=>s,jg:()=>u,lV:()=>a,qo:()=>c});let a=["author","decompose","build","gate","review","land"],s={author:"저작",decompose:"분해",build:"구현",gate:"게이트",review:"리뷰",land:"착지"};function l(e){let t=e.category,n=e.event,a="error"===e.level||/(fail|reject|block|abandon|conflict|error|unconvergeable|timeout)/i.test(n)?"bad":/(merged|pass|done|ok|opened|completed|approved)/i.test(n)?"ok":"info";return t.startsWith("goal-author")||t.startsWith("harness.frontdoor")||"dev-pipeline"===t&&/^(plan|selection|base-selection)$/.test(n)?{stage:"author",tone:a}:t.startsWith("self-dev")&&/decompos/i.test(n)||"self-dev.orchestrate"===t&&"start"===n?{stage:"decompose",tone:a}:t.startsWith("self-dev.spawn")||t.startsWith("harness.substrate")||"self-implement"===t||"dev-pipeline"===t&&"harness.launch"===n?{stage:"build",tone:a}:t.startsWith("self-gate")||t.startsWith("self-dev.reduce")&&/gate/i.test(n)?{stage:"gate",tone:a}:t.startsWith("review-loop")&&/(merged|auto-merge)/i.test(n)?{stage:"land",tone:"ok"}:t.startsWith("review-loop")?{stage:"review",tone:a}:t.startsWith("self-dev.reduce")&&/(pr-opened|merged)/i.test(n)||"dev-pipeline"===t&&"done"===n?{stage:"land",tone:a}:{stage:null,tone:a}}let r=e=>"string"==typeof e&&e.trim()?e:null,o=e=>"number"==typeof e&&Number.isFinite(e)?e:0;function i(e){var t,n,a,s,l;let i=null!=(t=e.data)?t:{},c=null!=(n=r(i.pr))?n:o(i.prNumber)?String(i.prNumber):null;return e.category.startsWith("review-loop")&&"judge-verdict"===e.event?"리뷰 판정: ".concat(null!=(a=r(i.verdict))?a:"?").concat(c?" \xb7 #".concat(c):"").concat(o(i.asks)?" \xb7 요구 ".concat(o(i.asks)):""):e.category.startsWith("review-loop")&&/merged/.test(e.event)?"자동 병합".concat(c?" #".concat(c):""):e.category.startsWith("review-loop")&&"rework-start"===e.event?"리뷰 반영 라운드 ".concat(o(i.round)||"?"," 시작").concat(c?" \xb7 #".concat(c):""):e.category.startsWith("llm.router")&&/fallback/i.test(e.event)?"모델 폴백: ".concat(null!=(s=r(i.from))?s:"?"," → ").concat(null!=(l=r(i.to))?l:"?"):e.category.startsWith("oauth")&&/rotat/i.test(e.event)?"계정 회전".concat(r(i.account)?": ".concat(r(i.account)):""):e.category.startsWith("harness.boundary")?"경계 밖 쓰기 거절".concat(r(i.path)?": ".concat(r(i.path)):""):e.category.startsWith("self-dev.reduce")&&/gate-failed/.test(e.event)?"게이트 실패 → 수리 라운드":"dev-pipeline"===e.category&&"rejected"===e.event?"발사 전 검사가 막았다".concat(r(i.reason)?": ".concat(r(i.reason)):""):null}function c(e,t){let n=new Date(e);return Number.isNaN(n.getTime())?e.slice(11,19):n.toLocaleTimeString("en-GB",{hour12:!1,...t?{timeZone:t}:{}})}function d(e,t){var n;let a=null!=(n=e.data)?n:{},s=["runId","pr","verdict","model","provider","round","reason"].map(e=>void 0!==a[e]&&null!==a[e]&&""!==a[e]?"".concat(e,"=").concat(String(a[e]).slice(0,40)):null).filter(Boolean).join(" ");return"".concat(c(e.ts,t)," ").concat(e.category," ").concat(e.event).concat(s?" \xb7 ".concat(s):"").replace(/\b(sk-[A-Za-z0-9_-]{8,}|ghp_[A-Za-z0-9]{8,}|gho_[A-Za-z0-9]{8,}|xox[abpr]-[A-Za-z0-9-]{8,}|AKIA[0-9A-Z]{12,})\b/g,"[redacted]").replace(/(Bearer\s+)[A-Za-z0-9._~+/=-]{8,}/gi,"$1[redacted]").replace(/("?(?:token|secret|password|apiKey|api_key|authorization)"?\s*[:=]\s*")[^"]{4,}"/gi,'$1[redacted]"')}let u=["PLAN","ROUTE","VERIFY","HEAL","ESCALATE","SHIP"];function p(e){let t=e.category,n=e.event;if("harness.decision"===t){var a;let t="string"==typeof(null==(a=e.data)?void 0:a.kind)?e.data.kind.toUpperCase():"";return u.includes(t)?t:null}return t.startsWith("review-loop")&&/merged/.test(n)||t.startsWith("self-dev.reduce")&&/(pr-opened|merged)/.test(n)?"SHIP":/(needs-human|hitl|escalat|parked)/i.test(n)||"dev-pipeline"===t&&"rejected"===n?"ESCALATE":t.startsWith("review-loop")&&/^rework-start$/.test(n)||/repair|rework-round/i.test(n)||t.startsWith("self-dev.supervisor")&&/(resume|retry)/i.test(n)?"HEAL":t.startsWith("review-loop")&&/verdict/.test(n)||t.startsWith("self-gate")||t.startsWith("self-dev.reduce")&&/gate/.test(n)?"VERIFY":t.startsWith("oauth.codex-account")&&/rotation$/.test(n)||t.startsWith("llm.router")&&/fallback/i.test(n)||t.startsWith("harness.role-llm")||t.startsWith("harness.substrate")&&/dispatch/.test(n)||t.startsWith("harness.boundary")?"ROUTE":t.startsWith("goal-author")&&/(done|assembled|phase-end)/.test(n)||t.startsWith("self-dev")&&/decompos/i.test(n)||"dev-pipeline"===t&&"plan"===n?"PLAN":null}function h(e,t,n){let a=function(e,t,n){var a,s,c,d,u,p,h,m,f,x;let g=n.now-6e4*n.windowMinutes,v=e.filter(e=>Date.parse(e.ts)>=g).sort((e,t)=>Date.parse(e.ts)-Date.parse(t.ts)),b=new Map,y=[],w=new Map,k=new Map,j=0,N=0;for(let e of v){let t=null!=(s=e.data)?s:{},n=r(t.runId);if(e.category.startsWith("llm.usage")){j+=1,N+=o(t.inputTokens)+o(t.outputTokens)+o(t.totalTokens&&!t.inputTokens?t.totalTokens:0);let e=null!=(d=null!=(c=r(t.model))?c:r(t.provider))?d:"unknown";w.set(e,(null!=(u=w.get(e))?u:0)+1)}if(e.category.startsWith("review-loop")&&"judge-verdict"===e.event){let e=null!=(p=r(t.verdict))?p:"unknown";k.set(e,(null!=(h=k.get(e))?h:0)+1)}let a=i(e),{stage:x,tone:g}=l(e);if(a&&y.push({ts:e.ts,runId:n,tone:/merged/.test(e.event)?"ok":g,text:a}),!n||!x)continue;let v=null!=(m=b.get(n))?m:{runId:n,stages:{},current:null,lastTs:e.ts,events:0,blocked:!1,pr:null,ledgerStatus:null};v.stages[x]=g,v.current=x,v.lastTs=e.ts,v.events+=1,v.blocked="bad"===g,v.pr=null!=(f=r(t.pr))?f:o(t.prNumber)?String(o(t.prNumber)):v.pr,b.set(n,v)}let M=new Map(t.map(e=>[e.runId,e]));for(let e of b.values())e.ledgerStatus=null!=(x=null==(a=M.get(e.runId))?void 0:a.status)?x:null;let S=[...b.values()].sort((e,t)=>Date.parse(t.lastTs)-Date.parse(e.lastTs)),I=S.filter(e=>"land"!==e.current&&n.now-Date.parse(e.lastTs)<9e5).length,E=e=>[...e.entries()].map(e=>{let[t,n]=e;return{name:t,count:n}}).sort((e,t)=>t.count-e.count);return{runs:S,cards:y.slice(-40).reverse(),counters:{activeRuns:I,llmRequests:j,llmRequestsPerMin:n.windowMinutes>0?Math.round(j/n.windowMinutes*10)/10:0,tokens:N,landed:S.filter(e=>"ok"===e.stages.land).length,blocked:S.filter(e=>e.blocked).length},providers:E(w),reviewVerdicts:E(k),windowMinutes:n.windowMinutes}}(e,t,n),s=n.now-6e4*n.windowMinutes,c=e.filter(e=>Date.parse(e.ts)>=s).sort((e,t)=>Date.parse(e.ts)-Date.parse(t.ts)),d=[],u={},h=new Set,m=new Map,f=new Map,x=new Map,g=0,v=new Set(c.filter(e=>"harness.decision"===e.category).map(e=>p(e)).filter(Boolean));for(let e of c){var b,y,w,k,j,N,M,S,I,E,A,T;let t=null!=(b=e.data)?b:{},n=r(t.runId);if(e.category.startsWith("review-loop")&&o(t.round)&&n&&(u[n]=Math.max(null!=(y=u[n])?y:0,o(t.round))),e.category.startsWith("review-loop")&&"judge-verdict"===e.event&&r(t.pr)&&o(t.round)){let e=null!=(w=x.get(r(t.pr)))?w:new Map;e.set(o(t.round),o(t.asks)),x.set(r(t.pr),e)}if(e.category.startsWith("llm.usage")){let e=o(t.inputTokens)+o(t.outputTokens);g+=e;let n=null!=(k=r(t.model))?k:"unknown",a=null!=(j=f.get(n))?j:{requests:0,tokens:0,billing:r(t.billing)};a.requests+=1,a.tokens+=e,f.set(n,a)}let a=p(e);if(!a||"harness.decision"!==e.category&&v.has(a))continue;let s=null!=(N=r(t.reason))?N:r(t.why),l=r(t.purpose),c=null!=(A=null!=(S=null!=(M=r(t.target))?M:r(t.to))?S:r(t.account))?A:"SHIP"===a&&(null!=(I=r(t.pr))?I:o(t.prNumber)?String(o(t.prNumber)):null)?"#".concat(null!=(E=r(t.pr))?E:o(t.prNumber)):null;"HEAL"===a&&n&&h.add(n);let R=o(t.paths)||void 0;d.push({ts:e.ts,kind:a,runId:n,what:function(e,t){var n,a;return"harness.decision"===e.category&&"string"==typeof(null==(n=e.data)?void 0:n.what)?e.data.what:null!=(a=i(e))?a:"".concat(e.category," ").concat(e.event).slice(0,80)}(e,0),why:s,purpose:l,target:c,...R?{paths:R}:{}});let P=[s?null:"why",l?null:"purpose",c?null:"target"].filter(Boolean);if(P.length){let t="".concat(e.category," ").concat(e.event),n=null!=(T=m.get(t))?T:{count:0,lacks:new Set};n.count+=1,P.forEach(e=>n.lacks.add(e)),m.set(t,n)}}let R=[...h],P=R.filter(e=>{var t;return(null==(t=a.runs.find(t=>t.runId===e))?void 0:t.stages.land)==="ok"}).length;return{snapshot:a,gauges:{live:a.counters.activeRuns,decisions:d.length,decisionsPerMin:n.windowMinutes>0?Math.round(d.length/n.windowMinutes*10)/10:0,shipped:d.filter(e=>"SHIP"===e.kind).length,selfHealRate:R.length?Math.round(P/R.length*100):null,selfHealRuns:R.length,burnTokensPerMin:n.windowMinutes>0?Math.round(g/n.windowMinutes):0},stream:d.slice(-80).reverse(),emitted:c.filter(e=>"harness.decision"===e.category).length,rounds:u,convergence:[...x.entries()].map(e=>{let[t,n]=e;return{pr:t,points:[...n.entries()].sort((e,t)=>e[0]-t[0]).map(e=>{let[t,n]=e;return{round:t,asks:n}})}}),scorecard:[...f.entries()].map(e=>{let[t,n]=e;return{model:t,...n}}).sort((e,t)=>t.requests-e.requests),missing:[...m.entries()].map(e=>{let[t,n]=e;return{key:t,count:n.count,lacks:[...n.lacks]}}).sort((e,t)=>t.count-e.count)}}},91514:(e,t,n)=>{n.d(t,{M1:()=>c,Qj:()=>d,tI:()=>i});var a=n(41121),s=n(91269),l=n(19855),r=n(24818);let o=(0,s.createContext)(null);function i(e){let{client:t,queryClient:n,defaultStaleTimeMs:i,children:c}=e,d=(0,s.useMemo)(()=>null!=n?n:new l.E({defaultOptions:{queries:{staleTime:null!=i?i:2e3,refetchOnWindowFocus:!1}}}),[n,i]);return(0,a.jsx)(o.Provider,{value:t,children:(0,a.jsx)(r.Ht,{client:d,children:c})})}function c(){let e=(0,s.useContext)(o);if(!e)throw Error("useNexusClient must be used within <NexusProvider>");return e}function d(){return(0,s.useContext)(o)}},99482:(e,t,n)=>{n.d(t,{xl:()=>v});var a=n(41121),s=n(91269),l=n(90686);let r={author:"PLAN",decompose:"PLAN",build:"ROUTE",gate:"VERIFY",review:"VERIFY",land:"SHIP"},o=(e,t)=>"phase:".concat(e,":").concat(t),i=new Set(["model","target","account","universe","pod"]);var c=n(20796);let d={PLAN:"#38bdf8",ROUTE:"#a78bfa",VERIFY:"#fbbf24",HEAL:"#34d399",ESCALATE:"#fb7185",SHIP:"#4ade80"},u={harness:"#e0e7ff",run:"#818cf8",phase:"#c7d2fe",pr:"#4ade80",model:"#f0abfc",target:"#93c5fd",event:"#a5b4fc",site:"#f5d0fe",account:"#fbcfe8",request:"#f0abfc",universe:"#67e8f9",piece:"#7dd3fc",pod:"#fcd34d"},p={ok:"#4ade80",bad:"#fb7185",info:"#c7d2fe"},h=["#f0abfc","#c4b5fd","#93c5fd","#67e8f9","#a7f3d0","#fde68a","#fca5a5"],m={harness:16,run:8,phase:5.5,pr:5,model:7,target:4,event:2.6,site:3,account:6,request:1.2,universe:7,piece:3.4,pod:7},f=new Set(["harness","run","phase","pr","model","account","target","universe","pod"]),x=[];function g(e){return!!(e.why||e.purpose||e.target)}function v(e){var t,n,v,R;let{board:L,rows:C=x,windowMinutes:F=60,sourceLabel:O="this instance",shippedSource:H="log",autoReplay:W=!0,publicCapture:q=!1,onSelectRun:D}=e,U=(0,s.useRef)(null),B=(0,s.useRef)({nodes:[],edges:[]}),G=(0,s.useRef)([]),V=(0,s.useRef)([]),$=(0,s.useRef)(null),Y=(0,s.useRef)([]),[z,J]=(0,s.useState)(null),[K,_]=(0,s.useState)(!1),[Q,X]=(0,s.useState)(0),[Z,ee]=(0,s.useState)(""),[et,en]=(0,s.useState)(5),[ea,es]=(0,s.useState)({nodes:0,edges:0}),el=(0,s.useRef)(1500),er=()=>"function"==typeof window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches,eo=e=>{G.current.push({from:e.from,to:e.to,kind:e.kind,t:0,speed:.022,alpha:1,size:3.6}),"SHIP"===e.kind&&V.current.push({id:e.to,t:0})},ei=(0,s.useMemo)(()=>(0,c.Gp)(C),[C]),ec=(0,s.useMemo)(()=>{let e=Date.now(),t=6e4*F,n=(0,c.lb)(C).map(e=>e.ms/6e4).filter(e=>e>0),a=ei.map(e=>e.input+e.output).filter(e=>e>0);return{now:e,candles:(0,c.OL)(ei,e,40,Math.max(6e4,6e4*Math.ceil(t/40/6e4))),bucketMin:Math.max(1,Math.ceil(t/40/6e4)),ticker:(0,c.kJ)(ei,e,t),heat:(0,c.f)(ei),hist:(0,c.JW)(n,40),tokHist:(0,c.JW)(a.map(e=>Math.log10(e)),40),spans:n.length,gate:(0,c.cD)(C),load:(0,c.HR)(L),events:(0,c.fT)(C),universes:(0,c.IE)(C),plans:(0,c.D3)(C),pods:(0,c.GJ)(C),retries:(0,c.Jo)(C)}},[ei,C,L,F]),ed=(0,s.useMemo)(()=>{let e=new Map;return ec.ticker.forEach((t,n)=>e.set(t.model,h[n%h.length])),t=>{var n;return null!=(n=e.get(t))?n:"#a5b4fc"}},[ec.ticker]);(0,s.useEffect)(()=>{let e=()=>{ee(new Date().toLocaleTimeString(void 0,{hour12:!1})),en(e=>e<=1?5:e-1)};e();let t=window.setInterval(e,1e3);return()=>window.clearInterval(t)},[]),(0,s.useEffect)(()=>{en(5)},[C]),(0,s.useEffect)(()=>{var e,t;let n=function(e){var t,n,a,s,i,c,d,u;let p=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},h=new Map,m=[],f=function(e,t,n){let a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,s=h.get(e);if(s)return s.weight+=a,s;let l="harness"===t?{x:.5,y:.5}:function(e){let t=0x811c9dc5;for(let n=0;n<e.length;n++)t=Math.imul(t^e.charCodeAt(n),0x1000193);let n=(t>>>0)%3600/3600*Math.PI*2,a=.25+(t>>>12)%1e3/1e3*.2;return{x:.5+Math.cos(n)*a,y:.5+Math.sin(n)*a}}(e),r={id:e,kind:t,label:n,weight:a,x:l.x,y:l.y,vx:0,vy:0};return h.set(e,r),r},x=(e,t,n)=>{m.some(a=>a.from===e&&a.to===t&&a.kind===n)||m.push({from:e,to:t,kind:n})};for(let t of(f("harness","harness","harness",3),e.snapshot.runs.slice(0,12).forEach((e,t)=>{let n="run:".concat(e.runId);f(n,"run",e.runId.replace(/^run-/,"").slice(0,6),2),x("harness",n,"PLAN");let a=null;if(t<8){let t=n;for(let n of l.lV){let s=e.stages[n];if(!s&&e.current!==n)continue;let i=o(e.runId,n),c=f(i,"phase",l.fQ[n]);c.current=e.current===n,c.tone=null!=s?s:"info",x(t,i,"bad"===s?"ESCALATE":r[n]),t=i,a=i}}e.pr&&(f("pr:".concat(e.pr),"pr","#".concat(e.pr)),x(null!=a?a:n,"pr:".concat(e.pr),"ok"===e.stages.land?"SHIP":"VERIFY")),e.blocked&&x(n,"harness","ESCALATE")}),e.scorecard.slice(0,6)))f("model:".concat(t.model),"model",t.model.length>18?"".concat(t.model.slice(0,17),"…"):t.model,Math.max(1,Math.round(Math.log2(1+t.requests)))),x("harness","model:".concat(t.model),"ROUTE");let g=0;for(let e of null!=(t=p.events)?t:[]){if(g>=180)break;let t="run:".concat(e.runId);if(!h.has(t))continue;let n=e.stage?o(e.runId,e.stage):null,a=n&&h.has(n)?n:t,s=f("ev:".concat(e.key),"event",e.label,Math.max(1,Math.round(Math.log2(1+e.count))));e.bad&&(s.tone="bad"),x(a,s.id,e.bad?"ESCALATE":e.stage?r[e.stage]:"PLAN"),g+=1}let v=new Set,b=0;for(let e of null!=(n=p.reqs)?n:[]){let t="model:".concat(e.model);if(!h.has(t))continue;let n="site:".concat(e.model,"|").concat(e.site);if(v.has(n)?h.get(n).weight+=.05:(v.add(n),f(n,"site",e.site),x(t,n,"ROUTE")),e.provider){let n="acct:".concat(e.provider);h.has(n)||f(n,"account",e.provider,2),x(n,t,"ROUTE")}b<220&&(x(n,f("req:".concat(e.model,"|").concat(e.site,"|").concat(e.ts,"|").concat(b),"request","",Math.max(1,Math.log10(1+e.input+e.output))).id,"ROUTE"),b+=1)}for(let e of null!=(a=p.universes)?a:[]){let t="run:".concat(e.runId);if(!h.has(t))continue;let n="uni:".concat(e.instance);h.has(n)?h.get(n).weight+=1:f(n,"universe",e.instance,2),x(n,t,"PLAN")}for(let e of null!=(s=p.plans)?s:[]){let t="run:".concat(e.runId);if(!h.has(t))continue;let n=o(e.runId,"decompose"),a=h.has(n)?n:t;e.pieces.forEach((t,n)=>{let s="piece:".concat(e.runId,":").concat(n);f(s,"piece",t.length>22?"".concat(t.slice(0,21),"…"):t,1.5),x(a,s,"PLAN")})}for(let e of null!=(i=p.pods)?i:[]){let t="pod:".concat(e.pool);h.has(t)?h.get(t).weight+=.2:f(t,"pod",null!=(c=e.pool.replace(/^pool-/,"").split("@")[0])?c:e.pool,2),x("harness",t,"ROUTE")}for(let e of null!=(d=p.retries)?d:[]){let t=h.get(o(e.runId,e.stage));t&&(t.retries=Math.max(null!=(u=t.retries)?u:0,e.retries))}let y=0;for(let t of e.stream){let e=t.runId&&h.has("run:".concat(t.runId))?"run:".concat(t.runId):"harness";if("SHIP"===t.kind&&t.target)f("pr:".concat(t.target.replace(/^#/,"")),"pr",t.target),x(e,"pr:".concat(t.target.replace(/^#/,"")),"SHIP");else if(t.target&&y<10&&!t.target.startsWith("#")){let n="target:".concat(t.target);h.has(n)||(y+=1),f(n,"target",t.target.length>18?"".concat(t.target.slice(0,17),"…"):t.target),x(e,n,t.kind)}else("HEAL"===t.kind||"VERIFY"===t.kind)&&x(e,e,t.kind)}return{nodes:[...h.values()],edges:m}}(L,{events:ec.events,reqs:ei,universes:ec.universes,plans:ec.plans,pods:ec.pods,retries:ec.retries}),a=new Map(B.current.nodes.map(e=>[e.id,e]));for(let e of n.nodes){let t=a.get(e.id);t&&(e.x=t.x,e.y=t.y,e.vx=t.vx,e.vy=t.vy)}B.current=n,es(e=>e.nodes===n.nodes.length&&e.edges===n.edges.length?e:{nodes:n.nodes.length,edges:n.edges.length});let s=ec.pods.map(e=>"pod|".concat(e.ts,"|").concat(e.pool));if($.current)for(let e of ec.pods){let t="pod|".concat(e.ts,"|").concat(e.pool);$.current.has(t)||eo({from:"harness",to:"pod:".concat(e.pool),kind:"ROUTE"})}let i=function(e,t){let n=[];for(let s of t.stream){var a;let t="".concat(s.ts,"|").concat(s.kind,"|").concat(null!=(a=s.runId)?a:"","|").concat(s.what);if(e.has(t))continue;let l=s.runId?"run:".concat(s.runId):"harness",r="SHIP"===s.kind&&s.target?"pr:".concat(s.target.replace(/^#/,"")):s.target?"target:".concat(s.target):l;n.push({key:t,kind:s.kind,from:l,to:r})}return n}(null!=(e=$.current)?e:new Set,L);if($.current){let e=new Map(L.stream.map(e=>{var t;return["".concat(e.ts,"|").concat(e.kind,"|").concat(null!=(t=e.runId)?t:"","|").concat(e.what),e]})),t=[...i].reverse();t.forEach((n,a)=>{let s=e.get(n.key);!s||!g(s)||er()||a<t.length-6?eo(n):Y.current.push({key:n.key,line:s,from:n.from,to:n.to})}),X(e=>e+1)}$.current=new Set([...null!=(t=$.current)?t:[],...i.map(e=>e.key),...s])},[L,ec.events,ec.universes,ec.plans,ec.pods,ec.retries,ei]),(0,s.useEffect)(()=>{if(z)return;let e=Y.current.shift();if(!e){K&&_(!1);return}J({item:e,folding:!1})},[z,Q,K]),(0,s.useEffect)(()=>{if(!z)return;if(!z.folding){let e=setTimeout(()=>J({item:z.item,folding:!0}),el.current);return()=>clearTimeout(e)}eo({from:z.item.from,to:z.item.to,kind:z.item.line.kind});let e=setTimeout(()=>J(null),250);return()=>clearTimeout(e)},[z]),(0,s.useEffect)(()=>{el.current=K?550:1500},[K]);let eu=(0,s.useRef)(!1);(0,s.useEffect)(()=>{if(!W||eu.current||0===L.stream.length||er())return;eu.current=!0;let e=setTimeout(()=>ep(),1200);return()=>clearTimeout(e)},[L.stream.length]);let ep=()=>{Y.current=L.stream.filter(g).slice(0,40).reverse().map(e=>{let t=e.runId?"run:".concat(e.runId):"harness",n="SHIP"===e.kind&&e.target?"pr:".concat(e.target.replace(/^#/,"")):e.target?"target:".concat(e.target):t;return{key:"replay|".concat(e.ts,"|").concat(e.what),line:e,from:t,to:n}}),_(!0),X(e=>e+1)};(0,s.useEffect)(()=>{let e=U.current;if(!e)return;let t=e.getContext("2d");if(!t)return;let n=er(),a=new Map,s=e=>{let t=a.get(e);if(t)return t;let n=document.createElement("canvas");n.width=64,n.height=64;let s=n.getContext("2d");if(s){let t=s.createRadialGradient(32,32,0,32,32,32);t.addColorStop(0,"".concat(e,"ff")),t.addColorStop(.25,"".concat(e,"88")),t.addColorStop(1,"".concat(e,"00")),s.fillStyle=t,s.fillRect(0,0,64,64)}return a.set(e,n),n},l=0,r=0,o=()=>{let a=window.devicePixelRatio||1,c=e.clientWidth,h=e.clientHeight;(e.width!==Math.round(c*a)||e.height!==Math.round(h*a))&&(e.width=Math.round(c*a),e.height=Math.round(h*a)),t.setTransform(a,0,0,a,0,0);let x=B.current;n||function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,{nodes:n,edges:a}=e,s=new Map(n.map(e=>[e.id,e])),l=Math.min(1,60/Math.max(1,n.length));for(let e=0;e<n.length;e++)for(let t=e+1;t<n.length;t++){let a=n[e],s=n[t],r=a.x-s.x,o=a.y-s.y,i=r*r+o*o;i<1e-6&&(r=.01,o=.01,i=2e-4);let c=e=>"phase"===e||"request"===e||"event"===e||"piece"===e,d=l*(c(a.kind)||c(s.kind)?"request"===a.kind||"request"===s.kind?12e-6:5e-5:18e-5)/i;a.vx+=r*d,a.vy+=o*d,s.vx-=r*d,s.vy-=o*d}for(let e of a){if(e.from===e.to)continue;let t=s.get(e.from),n=s.get(e.to);if(!t||!n)continue;let a=n.x-t.x,l=n.y-t.y,r=Math.sqrt(a*a+l*l)||.001,o=(r-("request"===n.kind?.035:"site"===n.kind?.06:i.has(t.kind)||i.has(n.kind)?.34:"harness"===t.kind||"harness"===n.kind?.2:"phase"===t.kind||"phase"===n.kind?.07:.12))*("phase"===t.kind||"phase"===n.kind?.05:.02);t.vx+=a/r*o,t.vy+=l/r*o,n.vx-=a/r*o,n.vy-=l/r*o}for(let e of n){if("harness"===e.kind){e.x=.5,e.y=.5,e.vx=0,e.vy=0;continue}if(i.has(e.kind)){let t=e.x-.5,n=e.y-.5,a=Math.sqrt(t*t+n*n)||.001,s=(("universe"===e.kind?.44:.3)-a)*.01;e.vx+=t/a*s,e.vy+=n/a*s}else e.vx+=(.5-e.x)*.003,e.vy+=(.5-e.y)*.003;e.x<.08&&(e.vx+=(.08-e.x)*.06),e.x>.92&&(e.vx-=(e.x-.92)*.06),e.y<.18&&(e.vy+=(.18-e.y)*.06),e.y>.87&&(e.vy-=(e.y-.87)*.06),e.vx*=.86,e.vy*=.86,e.x=Math.min(.97,Math.max(.03,e.x+e.vx*t)),e.y=Math.min(.95,Math.max(.1,e.y+e.vy*t))}}(x),r+=1;let g=new Map(x.nodes.map(e=>[e.id,e])),v=e=>n?0:1.4*Math.sin(r/40+e.id.length%7),b=e=>{let t=g.get(e);return t?{x:t.x*c+v(t),y:t.y*h+.7*v(t)}:null};for(let e of(t.clearRect(0,0,c,h),t.globalCompositeOperation="lighter",x.edges)){let n=b(e.from),a=b(e.to);n&&a&&(t.strokeStyle=d[e.kind],t.globalAlpha=e.to.startsWith("ev:")||e.to.startsWith("site:")?.15:.25,t.lineWidth="SHIP"===e.kind?1.4:.7,t.beginPath(),e.from===e.to?t.arc(n.x+8,n.y-8,8,0,2*Math.PI):(t.moveTo(n.x,n.y),t.lineTo(a.x,a.y)),t.stroke())}if(!n&&x.edges.length&&r%4==0&&G.current.length<110){let e=x.edges[7919*r%x.edges.length];e.from!==e.to&&G.current.push({from:e.from,to:e.to,kind:e.kind,t:0,speed:.008,alpha:.45,size:1.6})}for(let e of(G.current=G.current.filter(e=>e.t<=1),G.current)){let a=b(e.from),l=b(e.to);if(!a||!l){e.t=2;continue}e.t+=n?1:e.speed;let r=a.x+(l.x-a.x)*e.t,o=a.y+(l.y-a.y)*e.t-(e.from===e.to?24*Math.sin(e.t*Math.PI):0),i=5*e.size;t.globalAlpha=e.alpha,t.drawImage(s(d[e.kind]),r-i,o-i,2*i,2*i)}for(let e of(V.current=V.current.filter(e=>e.t<=1),V.current)){let a=b(e.id);if(!a){e.t=2;continue}e.t+=n?1:.014;let l=10+70*Math.min(1,e.t/.3);t.globalAlpha=1-e.t,t.strokeStyle=d.SHIP,t.lineWidth=2.5,t.beginPath(),t.arc(a.x,a.y,l,0,2*Math.PI),t.stroke(),t.drawImage(s(d.SHIP),a.x-l,a.y-l,2*l,2*l)}for(let e of x.nodes){let a=b(e.id),l="phase"===e.kind,o="harness"===e.kind||l&&e.current,i=m[e.kind]+("model"===e.kind||"run"===e.kind?Math.min(4,.4*e.weight):"event"===e.kind?Math.min(3,.5*e.weight):0),c=o&&!n?i*(1+Math.sin(r/(l?9:20))*(l?.35:.12)):i,h=(l||"event"===e.kind)&&e.tone?p[e.tone]:u[e.kind],f=o||"run"===e.kind||"model"===e.kind||"account"===e.kind||"universe"===e.kind,x=c*(f?8:3);if(t.globalAlpha=f?.6:.35,t.drawImage(s(h),a.x-x,a.y-x,2*x,2*x),t.globalAlpha="event"===e.kind?.85:1,t.fillStyle=h,t.beginPath(),t.arc(a.x,a.y,c,0,2*Math.PI),t.fill(),l&&e.retries){t.globalAlpha=.75,t.strokeStyle=d.HEAL,t.lineWidth=1,t.setLineDash([3,3]);for(let s=1;s<=Math.min(4,e.retries);s+=1)t.lineDashOffset=n?0:-(r*(.4+.1*s)),t.beginPath(),t.arc(a.x,a.y,c+4+4*s,0,2*Math.PI),t.stroke();t.setLineDash([])}if(l&&e.current&&!n){let e=r%60/60;t.strokeStyle=h,t.globalAlpha=1-e,t.lineWidth=1.2,t.beginPath(),t.arc(a.x,a.y,c+18*e,0,2*Math.PI),t.stroke()}}for(let e of(t.globalCompositeOperation="source-over",t.globalAlpha=1,x.nodes)){if(!f.has(e.kind))continue;let n=b(e.id);t.fillStyle="harness"===e.kind?"#eef2ff":"phase"===e.kind?"rgba(199,210,254,.65)":"rgba(226,232,240,.82)",t.font="harness"===e.kind?"600 12px ui-monospace, SFMono-Regular, monospace":"10px ui-monospace, SFMono-Regular, monospace";let a="harness"===e.kind?"ELANOUS HARNESS":"phase"===e.kind?e.label:e.label.toUpperCase();t.fillText(a,n.x+m[e.kind]+4,n.y+3)}n||(l=requestAnimationFrame(o))};l=requestAnimationFrame(o);let c=t=>{let n=e.getBoundingClientRect(),a=(t.clientX-n.left)/n.width,s=(t.clientY-n.top)/n.height,l=B.current.nodes.find(e=>"run"===e.kind&&.02>Math.hypot(e.x-a,e.y-s));l&&(null==D||D(l.id.replace(/^run:/,"")))};return e.addEventListener("click",c),()=>{cancelAnimationFrame(l),e.removeEventListener("click",c)}},[D]);let eh=L.gauges,em=function(e){var t;let n=e.snapshot.runs.filter(e=>"ok"===e.stages.land);if(n.length)return{run:[...n].sort((t,n)=>{var a,s;return(null!=(a=e.rounds[n.runId])?a:0)-(null!=(s=e.rounds[t.runId])?s:0)||n.events-t.events})[0],why:"merged"};let a=null!=(t=e.snapshot.runs.find(e=>e.current&&!e.blocked))?t:e.snapshot.runs[0];return a?{run:a,why:"in-flight"}:null}(L),ef=null!=(t=null==em?void 0:em.run)?t:null,ex=Object.values(L.rounds),eg=l.jg.map(e=>({k:e,n:L.stream.filter(t=>t.kind===e).length})),ev=ei.reduce((e,t)=>e+t.input+t.output,0),eb=ei.reduce((e,t)=>e+t.apiUsd,0),ey=Math.max(1,...ei.slice(0,10).map(e=>e.input+e.output)),ew=ef?l.lV.filter(e=>ef.stages[e]):[];return(0,a.jsxs)("div",{className:"live-stage live-v5 space-y-1.5 rounded-xl p-1.5 text-slate-100","data-live-max-stage":!0,"data-live-v5":!0,children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 rounded-md border border-indigo-400/10 bg-slate-950/60 px-2 py-1",children:[(0,a.jsx)("span",{className:"shrink-0 text-xl tracking-tight text-slate-50",style:{fontFamily:'Georgia, "Times New Roman", serif'},children:"Elanous"}),(0,a.jsx)("span",{className:"hidden shrink-0 font-mono text-[11px] sm:inline lg:text-[10.5px] tracking-[.18em] text-indigo-200/80",children:"\xd7 HARNESS \xb7 판단"}),(0,a.jsx)(w,{tone:"live",children:"● LIVE"}),(0,a.jsx)("div",{className:"min-w-0 flex-1",children:(0,a.jsx)(N,{ariaLabel:"판단 띠",bare:!0,items:L.stream.slice(0,16).map((e,t)=>(0,a.jsxs)("span",{className:"mx-4 whitespace-nowrap",children:[(0,a.jsxs)("span",{style:{color:d[e.kind]},children:["▸ ",e.kind]})," ",(0,a.jsx)("span",{className:"text-slate-300",children:e.what}),e.target&&(0,a.jsxs)("span",{className:"text-slate-500",children:[" → ",e.target]})]},"".concat(e.ts,"-").concat(t)))})}),(0,a.jsx)("span",{className:"shrink-0 font-mono text-lg tabular-nums text-slate-200",suppressHydrationWarning:!0,children:Z})]}),(0,a.jsx)(N,{ariaLabel:"모델 띠",slow:!0,items:[(0,a.jsxs)("span",{className:"mx-4 whitespace-nowrap",children:[(0,a.jsx)("span",{className:"text-rose-300",children:"● LIVE RUNS"})," ",eh.live]},"live"),(0,a.jsxs)("span",{className:"mx-4 whitespace-nowrap",children:[(0,a.jsx)("span",{className:"text-emerald-300",children:"SHIPPED"})," ",eh.shipped]},"ship"),(0,a.jsxs)("span",{className:"mx-4 whitespace-nowrap",children:[(0,a.jsx)("span",{className:"text-indigo-300",children:"DECISIONS/MIN"})," ",eh.decisionsPerMin]},"dpm"),(0,a.jsxs)("span",{className:"mx-4 whitespace-nowrap",children:[(0,a.jsx)("span",{className:"text-indigo-300",children:"BURN/MIN"})," ",b(eh.burnTokensPerMin)]},"burn"),...ec.ticker.map(e=>(0,a.jsxs)("span",{className:"mx-4 whitespace-nowrap",children:[(0,a.jsx)("span",{style:{color:ed(e.model)},children:e.model.toUpperCase()})," ",(0,a.jsx)("span",{className:e.delta>0?"text-emerald-300":e.delta<0?"text-rose-300":"text-slate-400",children:e.delta>0?"▲":e.delta<0?"▼":"■"})," ",e.count," req \xb7 ",b(e.tokens)," tok"]},e.model))]}),(0,a.jsxs)("div",{className:"grid grid-cols-12 gap-1.5",children:[(0,a.jsxs)(y,{className:"col-span-12 lg:col-span-4",title:"SHIPPED \xb7 병합된 PR",stat:"".concat("github"===H?"GITHUB":"LOG"," \xb7 ").concat(F>=60?"".concat(F/60,"H"):"".concat(F,"M")),children:[(0,a.jsxs)("div",{className:"flex items-end gap-3",children:[(0,a.jsx)(M,{value:eh.shipped,accent:d.SHIP}),(0,a.jsxs)("div",{className:"mb-3 flex flex-col gap-1",children:[(0,a.jsx)(w,{tone:"ok",children:"MERGED"}),eh.selfHealRuns>0&&(0,a.jsx)(w,{tone:"heal",children:"SELF-HEALED"}),L.snapshot.counters.blocked>0&&(0,a.jsxs)(w,{tone:"bad",children:["BLOCKED ",L.snapshot.counters.blocked]})]})]}),(0,a.jsxs)("div",{className:"mt-1 grid grid-cols-3 gap-2 border-t border-indigo-400/10 pt-2",children:[(0,a.jsx)(k,{label:"SELF-HEAL",value:null===eh.selfHealRate?"—":"".concat(eh.selfHealRate,"%"),color:d.HEAL}),(0,a.jsx)(k,{label:"RUNS",value:String(L.snapshot.runs.length),color:"#c7d2fe"}),(0,a.jsx)(k,{label:"DECISIONS",value:String(eh.decisions),color:d.PLAN})]})]}),(0,a.jsx)(y,{className:"col-span-12 lg:col-span-4",title:(null==em?void 0:em.why)==="merged"?"BEST RUN \xb7 오늘 최고의 런":"NOW \xb7 지금 런",stat:ef?"R ".concat(null!=(n=L.rounds[ef.runId])?n:0,"/3"):"—",children:ef?(0,a.jsxs)("button",{type:"button",className:"block w-full text-left",onClick:()=>null==D?void 0:D(ef.runId),"data-live-v5-best":!0,children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"font-mono text-[11px] text-slate-400",children:ef.runId}),(null==em?void 0:em.why)==="merged"?(0,a.jsxs)(w,{tone:"ok",children:["VERIFIED \xb7 MERGED",ef.pr?" #".concat(ef.pr):""]}):(0,a.jsx)(w,{tone:"live",children:"IN FLIGHT"})]}),(0,a.jsxs)("div",{className:"mt-1 flex items-baseline gap-3",children:[(0,a.jsx)("span",{className:"font-mono text-6xl font-semibold tabular-nums text-indigo-100",style:{textShadow:"0 0 24px #818cf888"},children:ef.pr?"#".concat(ef.pr):ef.current?l.fQ[ef.current]:"—"}),(0,a.jsxs)("span",{className:"font-mono text-xs text-slate-400",children:[ef.events," signals \xb7 라운드 ",null!=(v=L.rounds[ef.runId])?v:0]})]}),(0,a.jsx)("div",{className:"mt-2 flex flex-wrap gap-1",children:ew.map(e=>{let t=ef.stages[e];return(0,a.jsxs)(w,{tone:"bad"===t?"bad":"ok"===t?"ok":"dim",children:[l.fQ[e],"ok"===t?" ✓":"bad"===t?" ✗":""]},e)})})]}):(0,a.jsx)("p",{className:"py-6 text-xs text-slate-500",children:"이 창에 런 신호가 없다 — ▶ REPLAY 로 최근 판단을 본다."})}),(0,a.jsx)(y,{className:"col-span-12 lg:col-span-4",title:"LLM \xb7 ".concat(ec.bucketMin,"분 봉 ⊕ 요청 창"),stat:"".concat(ei.length," REQ \xb7 ").concat(b(ev)," TOK"),children:(0,a.jsxs)("div",{className:"grid grid-cols-5 gap-2",children:[(0,a.jsx)(S,{candles:ec.candles,color:ed,unit:"/".concat(ec.bucketMin,"M"),className:"col-span-3"}),(0,a.jsxs)("ul",{className:"col-span-2 h-28 space-y-0.5 overflow-hidden font-mono text-[11px] lg:text-[10px]","data-live-v5-book":!0,children:[ei.slice(0,10).map((e,t)=>(0,a.jsxs)("li",{className:"relative flex justify-between gap-1 overflow-hidden px-1 ".concat(0===t?"live-line-in":""),children:[(0,a.jsx)("span",{className:"absolute inset-y-0 right-0 opacity-20",style:{width:"".concat((e.input+e.output)/ey*100,"%"),background:ed(e.model)}}),(0,a.jsx)("span",{className:"relative truncate",style:{color:ed(e.model)},children:e.model}),(0,a.jsx)("span",{className:"relative tabular-nums text-slate-300",children:b(e.input+e.output)})]},"".concat(e.ts,"-").concat(t))),0===ei.length&&(0,a.jsx)("li",{className:"text-slate-500",children:"요청 없음"})]})]})})]}),(0,a.jsx)(y,{title:"EXECUTION CYCLE \xb7 하니스 한 바퀴",stat:"".concat(ef?"ROUND ".concat(null!=(R=L.rounds[ef.runId])?R:0,"/3 \xb7 "):"","NEXT ").concat(et,"S"),children:(0,a.jsx)("div",{className:"grid grid-cols-3 gap-1.5 sm:grid-cols-6",children:l.lV.map((e,t)=>{let n=ef?ef.current===e:ec.load.busiest===e,s=null==ef?void 0:ef.stages[e];return(0,a.jsxs)("div",{"data-live-v5-stage":e,"data-hot":n?"1":void 0,className:"rounded-md border px-3 py-2 ".concat(n?"live-v5-hot":""),style:n?{borderColor:"#a78bfa",boxShadow:"0 0 18px #a78bfa66, inset 0 0 18px #a78bfa33",background:"rgba(124,58,237,.28)"}:{borderColor:"rgba(99,102,241,.18)",background:"rgba(2,6,23,.55)"},children:[(0,a.jsxs)("div",{className:"flex justify-between font-mono text-[11px] lg:text-[10px] text-slate-400",children:[(0,a.jsx)("span",{children:String(t+1).padStart(2,"0")}),s&&(0,a.jsx)("span",{style:{color:p[s]},children:"ok"===s?"✓":"bad"===s?"✗":"●"})]}),(0,a.jsxs)("div",{className:"flex items-baseline justify-between",children:[(0,a.jsx)("span",{className:n?"text-sm font-semibold text-white":"text-sm text-slate-300",children:l.fQ[e]}),(0,a.jsx)("span",{className:"font-mono text-xs tabular-nums text-slate-400",title:"지금 이 단계에 있는 런",children:ec.load.counts[e]})]})]},e)})})}),(0,a.jsxs)("div",{className:"grid grid-cols-12 gap-1.5",children:[(0,a.jsxs)(y,{className:"relative col-span-12 xl:col-span-10",title:"JUDGMENT GRAPH \xb7 FORCE",stat:"NODES ".concat(ea.nodes," \xb7 EDGES ").concat(ea.edges),bodyClass:"p-0",hot:!0,children:[(0,a.jsx)("canvas",{ref:U,className:"h-[370px] w-full bg-[radial-gradient(ellipse_at_center,rgba(79,70,229,.26),rgba(2,6,23,.96)_70%)]","aria-label":"판단 그래프"}),(0,a.jsx)("div",{className:"pointer-events-none absolute left-3 top-9 flex flex-col gap-0.5 rounded-md bg-slate-950/60 p-2 font-mono text-[11px] lg:text-[10px]",children:eg.map(e=>{let{k:t,n}=e;return(0,a.jsxs)("span",{style:{color:d[t]},children:["● ",t," ",(0,a.jsx)("span",{className:"text-slate-400",children:n})]},t)})}),(0,a.jsx)("button",{type:"button",onClick:ep,disabled:K||0===L.stream.length,"data-elanous-action":"live-replay",className:"absolute bottom-3 right-3 rounded-full border border-indigo-400/40 bg-slate-950/70 px-3 py-1 font-mono text-[11px] lg:text-[10px] text-indigo-200 hover:bg-indigo-500/20 disabled:opacity-40",title:"이 창의 판단을 옛것부터 빨리 감기(최근 40)",children:K?"REPLAY \xb7 ".concat(Y.current.length):"▶ REPLAY"}),z&&(0,a.jsx)(T,{item:z.item,folding:z.folding})]}),(0,a.jsx)(y,{className:"col-span-12 xl:col-span-2",title:"STATS",stat:"".concat(et,"S"),children:(0,a.jsxs)("dl",{className:"grid grid-cols-2 gap-x-2 gap-y-1.5 font-mono","data-live-v5-stats":!0,children:[(0,a.jsx)(j,{label:"PATHS",value:L.stream.reduce((e,t)=>{var n;return e+(null!=(n=t.paths)?n:0)},0)||"—"}),(0,a.jsx)(j,{label:"CONV",value:L.convergence.length?"".concat(L.convergence.filter(e=>{var t;return(null==(t=e.points.at(-1))?void 0:t.asks)===0}).length,"/").concat(L.convergence.length):"—"}),(0,a.jsx)(j,{label:"ROUNDS AVG",value:ex.length?(ex.reduce((e,t)=>e+t,0)/ex.length).toFixed(1):"—"}),(0,a.jsx)(j,{label:"DECISIONS/MIN",value:eh.decisionsPerMin}),(0,a.jsx)(j,{label:"SIGNALS",value:C.length}),(0,a.jsx)(j,{label:"LLM REQ",value:ei.length}),q?(0,a.jsx)(j,{label:"MODELS",value:ec.ticker.length}):(0,a.jsx)(j,{label:"API ≈ USD",value:"$".concat(eb.toFixed(2))}),(0,a.jsx)(j,{label:"NEXT POLL",value:"".concat(et,"s")})]})})]}),(0,a.jsxs)("div",{className:"grid grid-cols-12 gap-1.5",children:[(0,a.jsx)(y,{className:"col-span-12 md:col-span-6 xl:col-span-3",title:"MODEL \xd7 SITE \xb7 요청 수",stat:"MAX ".concat(ec.heat.max),children:(0,a.jsx)(I,{heat:ec.heat,color:ed})}),(0,a.jsx)(y,{className:"col-span-12 md:col-span-6 xl:col-span-3",title:"DISTRIBUTION \xb7 런 소요 ⊕ 요청 토큰",stat:"".concat(ec.spans," RUNS \xb7 ").concat(ei.length," REQ"),children:(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,a.jsx)(E,{hist:ec.hist,label:e=>"".concat(e.toFixed(0),"분")}),(0,a.jsx)(E,{hist:ec.tokHist,label:e=>b(10**e)})]})}),(0,a.jsx)(y,{className:"col-span-12 md:col-span-6 xl:col-span-3",title:"CONVERGENCE \xb7 must-fix ⊕ GATE",stat:"".concat(L.convergence.length," PR"),children:(0,a.jsxs)("div",{className:"grid grid-cols-3 gap-2",children:[(0,a.jsx)("div",{className:"col-span-2",children:(0,a.jsx)(P,{series:L.convergence})}),(0,a.jsx)(A,{pass:ec.gate.pass,fail:ec.gate.fail,verdicts:L.snapshot.reviewVerdicts})]})}),(0,a.jsx)(y,{className:"col-span-12 md:col-span-6 xl:col-span-3",title:"EXECUTION LOG \xb7 LIVE",stat:"".concat(L.stream.length),bodyClass:"px-2 py-1",children:(0,a.jsxs)("ul",{className:"h-[124px] space-y-0.5 overflow-hidden font-mono text-[11px] lg:text-[10.5px]","data-live-max-stream":!0,children:[L.stream.slice(0,9).map((e,t)=>(0,a.jsxs)("li",{className:"flex gap-1.5 ".concat(0===t?"live-line-in":""),style:"SHIP"===e.kind?{textShadow:"0 0 10px ".concat(d.SHIP)}:void 0,children:[(0,a.jsx)("span",{className:"shrink-0 text-slate-500",title:e.ts,children:(0,l.qo)(e.ts)}),(0,a.jsx)("span",{className:"w-14 shrink-0 rounded px-1 text-center",style:{color:d[e.kind],background:"".concat(d[e.kind],"1f")},children:e.kind}),(0,a.jsxs)("span",{className:"truncate",children:[e.what,e.target&&(0,a.jsxs)("span",{className:"text-slate-500",children:[" → ",e.target]})]})]},"".concat(e.ts,"-").concat(t))),0===L.stream.length&&(0,a.jsx)("li",{className:"text-slate-500",children:"이 창에 판단 신호가 없다."})]})})]}),(0,a.jsxs)("div",{className:"flex flex-wrap gap-x-6 gap-y-1 rounded-md border border-indigo-400/10 bg-slate-950/60 px-3 py-1 font-mono text-[11px] lg:text-[10px] text-slate-400",children:[(0,a.jsxs)("span",{children:["STACK ",(0,a.jsx)("span",{className:"text-slate-200",children:"elanous-core"})]}),(0,a.jsxs)("span",{children:["SOURCE ",(0,a.jsx)("span",{className:"text-slate-200",children:O})]}),(0,a.jsxs)("span",{children:["SIGNALS ",(0,a.jsx)("span",{className:"text-slate-200",children:C.length})]}),(0,a.jsxs)("span",{children:["LLM ",(0,a.jsxs)("span",{className:"text-slate-200",children:[ei.length," req"]})]}),(0,a.jsxs)("span",{children:["EMITTED ",(0,a.jsx)("span",{className:"text-slate-200",children:L.emitted})]}),q&&(0,a.jsx)("span",{className:"text-emerald-300","data-live-public-capture":!0,children:"PUBLIC CAPTURE \xb7 계정\xb7과금 가림"}),(0,a.jsx)("span",{className:"ml-auto",children:"EVERY NUMBER IS REAL \xb7 보이는 수는 전부 진짜"})]})]})}function b(e){return e>=1e6?"".concat((e/1e6).toFixed(1),"M"):e>=1e3?"".concat((e/1e3).toFixed(e>=1e5?0:1),"k"):String(Math.round(e))}function y(e){let{title:t,stat:n,children:s,className:l="",bodyClass:r="p-2.5",hot:o=!1}=e;return(0,a.jsxs)("section",{className:"overflow-hidden rounded-lg border bg-slate-950/70 ".concat(l),style:o?{borderColor:"rgba(167,139,250,.7)",boxShadow:"0 0 22px #a78bfa33"}:{borderColor:"rgba(99,102,241,.16)"},"aria-label":t,"data-live-v5-panel":t,children:[(0,a.jsxs)("header",{className:"flex items-center justify-between border-b border-indigo-400/10 px-2.5 py-1 font-mono text-[11px] lg:text-[10.5px] tracking-[.08em] text-slate-400",children:[(0,a.jsxs)("span",{children:["▸ ",t]}),n&&(0,a.jsx)("span",{className:"tabular-nums text-slate-300",children:n})]}),(0,a.jsx)("div",{className:r,children:s})]})}function w(e){let{tone:t,children:n}=e,s="ok"===t?d.SHIP:"bad"===t?d.ESCALATE:"heal"===t?d.HEAL:"dim"===t?"#a5b4fc":"#f0abfc";return(0,a.jsx)("span",{className:"inline-block whitespace-nowrap rounded px-1.5 py-0.5 font-mono text-[11px] lg:text-[10px] font-semibold tracking-wider ".concat("live"===t?"live-v5-blink":""),style:{color:s,background:"".concat(s,"22"),boxShadow:"inset 0 0 0 1px ".concat(s,"66")},children:n})}function k(e){let{label:t,value:n,color:s}=e;return(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"font-mono text-[11px] lg:text-[9.5px] tracking-widest text-slate-500",children:t}),(0,a.jsx)("div",{className:"font-mono text-3xl font-semibold tabular-nums",style:{color:s,textShadow:"0 0 14px ".concat(s,"55")},children:n})]})}function j(e){let{label:t,value:n}=e;return(0,a.jsxs)("div",{className:"border-b border-indigo-400/10 pb-1",children:[(0,a.jsx)("dt",{className:"text-[11px] lg:text-[9.5px] tracking-widest text-slate-500",children:t}),(0,a.jsx)("dd",{className:"text-lg font-semibold tabular-nums text-indigo-100",children:n})]})}function N(e){let{items:t,ariaLabel:n,slow:s=!1,bare:l=!1}=e;return(0,a.jsx)("div",{className:"relative overflow-hidden font-mono text-[11px] ".concat(l?"":"rounded-md border border-indigo-400/10 bg-slate-950/60 py-1"),"aria-label":n,children:0===t.length?(0,a.jsx)("span",{className:"px-3 text-slate-500",children:"—"}):(0,a.jsxs)("div",{className:"live-v5-marquee flex w-max",style:{animationDuration:"".concat(Math.max(30,t.length*(s?9:6)),"s")},children:[(0,a.jsx)("div",{className:"flex",children:t}),(0,a.jsx)("div",{className:"flex","aria-hidden":!0,children:t})]})})}function M(e){let{value:t,accent:n}=e,[l,r]=(0,s.useState)(t),[o,i]=(0,s.useState)(!1),c=(0,s.useRef)(t);return(0,s.useEffect)(()=>{let e=c.current;t>e&&(i(!0),setTimeout(()=>i(!1),700)),c.current=t;let n=performance.now(),a=0,s=l=>{let o=Math.min(1,(l-n)/900);r(e+(t-e)*(1-Math.pow(1-o,3))),o<1&&(a=requestAnimationFrame(s))};return a=requestAnimationFrame(s),()=>cancelAnimationFrame(a)},[t]),(0,a.jsx)("div",{className:"font-mono text-[112px] font-semibold leading-none tabular-nums",style:{color:n,textShadow:"0 0 ".concat(o?40:26,"px ").concat(n).concat(o?"cc":"66")},"data-live-max-gauge":"SHIPPED",children:Math.round(l)})}function S(e){let{candles:t,color:n,unit:s,className:l=""}=e,r=Math.max(1,...t.map(e=>e.count)),o=240/t.length;return(0,a.jsxs)("svg",{viewBox:"0 0 ".concat(240," ").concat(120),className:"h-28 w-full ".concat(l),"data-live-v5-candles":!0,"aria-label":"분당 LLM 요청",children:[[.25,.5,.75].map(e=>(0,a.jsx)("line",{x1:0,x2:240,y1:120*e,y2:120*e,stroke:"#1e293b",strokeDasharray:"2 3"},e)),t.map((e,t)=>{let s=120;return Object.entries(e.byModel).map(e=>{let[l,i]=e,c=i/r*114;return s-=c,(0,a.jsx)("rect",{x:t*o+1,y:s,width:Math.max(1,o-2),height:c,fill:n(l),opacity:.85},"".concat(t,"-").concat(l))})}),(0,a.jsxs)("text",{x:238,y:10,fill:"#64748b",fontSize:8,fontFamily:"monospace",textAnchor:"end",children:[r,s]})]})}function I(e){let{heat:t,color:n}=e;return 0===t.models.length?(0,a.jsx)("p",{className:"py-6 text-xs text-slate-500",children:"이 창에 요청이 없다."}):(0,a.jsxs)("table",{className:"w-full border-separate border-spacing-0.5 font-mono text-[11px] lg:text-[10px]","data-live-v5-heat":!0,children:[(0,a.jsx)("thead",{children:(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{}),t.sites.map(e=>(0,a.jsx)("th",{className:"max-w-16 truncate font-normal text-slate-500",children:e},e))]})}),(0,a.jsx)("tbody",{children:t.models.map(e=>(0,a.jsxs)("tr",{children:[(0,a.jsx)("td",{className:"max-w-24 truncate pr-1",style:{color:n(e)},children:e}),t.sites.map(n=>{var s;let l=null!=(s=t.cells["".concat(e,"|").concat(n)])?s:0,r=0===l?0:Math.min(5,Math.ceil(l/Math.max(1,t.max)*5));return(0,a.jsx)("td",{className:"rounded-sm px-1 py-0.5 text-center tabular-nums",style:{background:r?"rgba(167,139,250,".concat(.12+.15*r,")"):"rgba(30,41,59,.5)",color:r>=4?"#fff":"#cbd5e1"},children:l||"\xb7"},n)})]},e))})]})}function E(e){let{hist:t,label:n}=e,s=200/t.bins.length;return(0,a.jsxs)("div",{children:[(0,a.jsxs)("svg",{viewBox:"0 0 ".concat(200," ").concat(90),className:"h-20 w-full","data-live-v5-hist":!0,"aria-label":"분포",children:[(0,a.jsx)("defs",{children:(0,a.jsxs)("linearGradient",{id:"v5hist",x1:"0",x2:"1",y1:"0",y2:"0",children:[(0,a.jsx)("stop",{offset:"0%",stopColor:d.HEAL}),(0,a.jsx)("stop",{offset:"60%",stopColor:d.PLAN}),(0,a.jsx)("stop",{offset:"100%",stopColor:d.ROUTE})]})}),t.bins.map((e,n)=>{let l=t.max?e/t.max*86:0;return(0,a.jsx)("rect",{x:n*s+.5,y:90-l,width:Math.max(1,s-1),height:l,fill:"url(#v5hist)",opacity:.9},n)}),(0,a.jsx)("line",{x1:0,x2:200,y1:89.5,y2:89.5,stroke:"#334155"})]}),(0,a.jsxs)("div",{className:"flex justify-between font-mono text-[11px] lg:text-[9.5px] text-slate-500",children:[(0,a.jsx)("span",{children:t.max?n(t.lo):"—"}),(0,a.jsx)("span",{children:t.max?n(t.hi):""})]})]})}function A(e){let{pass:t,fail:n,verdicts:s}=e,l=[{name:"GATE ✓",count:t,c:d.SHIP},{name:"GATE ✗",count:n,c:d.ESCALATE},...s.slice(0,3).map(e=>({name:e.name.toUpperCase(),count:e.count,c:d.VERIFY}))],r=Math.max(1,...l.map(e=>e.count));return(0,a.jsx)("ul",{className:"space-y-1 font-mono text-[11px] lg:text-[9.5px]","data-live-v5-gate":!0,children:l.map(e=>(0,a.jsxs)("li",{children:[(0,a.jsxs)("div",{className:"flex justify-between text-slate-400",children:[(0,a.jsx)("span",{className:"truncate",children:e.name}),(0,a.jsx)("span",{className:"tabular-nums text-slate-200",children:e.count})]}),(0,a.jsx)("div",{className:"h-1.5 rounded-full bg-slate-800",children:(0,a.jsx)("div",{className:"h-1.5 rounded-full",style:{width:"".concat(e.count/r*100,"%"),background:e.c,boxShadow:"0 0 8px ".concat(e.c,"88")}})})]},e.name))})}function T(e){var t;let{item:n,folding:s}=e,{line:r}=n,o=d[r.kind];return(0,a.jsxs)("div",{"data-live-decision-card":r.kind,className:"pointer-events-none absolute left-1/2 top-12 w-[min(92%,580px)] rounded-xl border bg-slate-950/85 p-3 backdrop-blur transition-all duration-200",style:{borderColor:"".concat(o,"88"),boxShadow:"0 0 32px ".concat(o,"55"),opacity:+!s,transform:"translateX(-50%) scale(".concat(s?.6:1,")")},children:[(0,a.jsxs)("div",{className:"mb-2 flex items-center gap-2 font-mono text-[11px] lg:text-[10px]",children:[(0,a.jsxs)("span",{style:{color:o},children:["● ",r.kind]}),(0,a.jsx)("span",{className:"text-slate-500",children:(0,l.qo)(r.ts)}),r.runId&&(0,a.jsx)("span",{className:"text-slate-500",children:r.runId.replace(/^run-/,"").slice(0,8)}),r.paths?(0,a.jsxs)("span",{className:"ml-auto text-slate-400",children:["PATHS ",r.paths]}):null]}),(0,a.jsxs)("div",{className:"grid grid-cols-3 gap-2 text-[11px] leading-snug",children:[(0,a.jsx)(R,{label:"무엇 \xb7 WHAT",value:r.what,strong:!0}),(0,a.jsx)(R,{label:"왜 \xb7 WHY",value:null!=(t=r.why)?t:r.purpose}),(0,a.jsx)(R,{label:"어디로 \xb7 TO",value:r.target,accent:o})]})]})}function R(e){let{label:t,value:n,strong:s=!1,accent:l}=e;return(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("div",{className:"font-mono text-[11px] lg:text-[9px] tracking-widest text-slate-500",children:t}),(0,a.jsx)("div",{className:s?"line-clamp-3 font-medium text-slate-100":"line-clamp-3 text-slate-300",style:l&&n?{color:l}:void 0,children:null!=n?n:"—"})]})}function P(e){let{series:t}=e,n=Math.max(1,...t.flatMap(e=>e.points.map(e=>e.asks))),s=Math.max(3,...t.flatMap(e=>e.points.map(e=>e.round))),l=e=>20+(e-1)/Math.max(1,s-1)*146,r=e=>84-e/n*72,o=Array.from({length:s},(e,t)=>t+1);return(0,a.jsx)("div",{"data-live-convergence":!0,children:0===t.length?(0,a.jsx)("div",{className:"py-8 text-center text-[11px] text-slate-500",children:"이 창에 리뷰 라운드가 없다."}):(0,a.jsxs)("svg",{viewBox:"0 0 ".concat(200," ").concat(100),className:"h-24 w-full",children:[(0,a.jsx)("line",{x1:20,y1:84,x2:166,y2:84,stroke:"#334155"}),(0,a.jsx)("line",{x1:20,y1:12,x2:20,y2:84,stroke:"#334155"}),o.map(e=>(0,a.jsxs)("g",{children:[(0,a.jsx)("line",{x1:l(e),y1:12,x2:l(e),y2:84,stroke:"#1e293b",strokeDasharray:"2 3"}),(0,a.jsxs)("text",{x:l(e),y:96,fill:"#64748b",fontSize:8,fontFamily:"monospace",textAnchor:"middle",children:["R",e]})]},e)),(0,a.jsx)("text",{x:17,y:r(n)+3,fill:"#64748b",fontSize:8,fontFamily:"monospace",textAnchor:"end",children:n}),(0,a.jsx)("text",{x:17,y:r(0)+3,fill:d.SHIP,fontSize:8,fontFamily:"monospace",textAnchor:"end",children:"0"}),t.slice(0,6).map((e,t)=>{let n=e.points.at(-1),s=0===n.asks?d.SHIP:["#818cf8","#fbbf24","#38bdf8","#f0abfc","#fb7185"][t%5];return(0,a.jsxs)("g",{children:[(0,a.jsx)("polyline",{fill:"none",stroke:s,strokeWidth:1.6,points:e.points.map(e=>"".concat(l(e.round),",").concat(r(e.asks))).join(" ")}),e.points.map(e=>(0,a.jsx)("circle",{cx:l(e.round),cy:r(e.asks),r:2.5,fill:s},e.round)),(0,a.jsxs)("text",{x:l(n.round)+4,y:r(n.asks)-3,fill:s,fontSize:8,fontFamily:"monospace",children:["#",e.pr," ",n.asks]})]},e.pr)})]})})}}}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9804],{330:(t,e,s)=>{"use strict";s.d(e,{A:()=>r});let r=(0,s(89117).A)("messages-square",[["path",{d:"M16 10a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 14.286V4a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z",key:"1n2ejm"}],["path",{d:"M20 9a2 2 0 0 1 2 2v10.286a.71.71 0 0 1-1.212.502l-2.202-2.202A2 2 0 0 0 17.172 19H10a2 2 0 0 1-2-2v-1",key:"1qfcsi"}]])},6015:(t,e,s)=>{"use strict";s.d(e,{n:()=>o});var r=s(91269),i=s(95817),a=s(83026),u=s(37963),n=s(98883),h=class extends u.Q{#t;#e=void 0;#s;#r;constructor(t,e){super(),this.#t=t,this.setOptions(e),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){let e=this.options;this.options=this.#t.defaultMutationOptions(t),(0,n.f8)(this.options,e)||this.#t.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#s,observer:this}),e?.mutationKey&&this.options.mutationKey&&(0,n.EN)(e.mutationKey)!==(0,n.EN)(this.options.mutationKey)?this.reset():this.#s?.state.status==="pending"&&this.#s.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#s?.removeObserver(this)}onMutationUpdate(t){this.#i(),this.#a(t)}getCurrentResult(){return this.#e}reset(){this.#s?.removeObserver(this),this.#s=void 0,this.#i(),this.#a()}mutate(t,e){return this.#r=e,this.#s?.removeObserver(this),this.#s=this.#t.getMutationCache().build(this.#t,this.options),this.#s.addObserver(this),this.#s.execute(t)}#i(){let t=this.#s?.state??(0,i.$)();this.#e={...t,isPending:"pending"===t.status,isSuccess:"success"===t.status,isError:"error"===t.status,isIdle:"idle"===t.status,mutate:this.mutate,reset:this.reset}}#a(t){a.jG.batch(()=>{if(this.#r&&this.hasListeners()){let e=this.#e.variables,s=this.#e.context,r={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};if(t?.type==="success"){try{this.#r.onSuccess?.(t.data,e,s,r)}catch(t){Promise.reject(t)}try{this.#r.onSettled?.(t.data,null,e,s,r)}catch(t){Promise.reject(t)}}else if(t?.type==="error"){try{this.#r.onError?.(t.error,e,s,r)}catch(t){Promise.reject(t)}try{this.#r.onSettled?.(void 0,t.error,e,s,r)}catch(t){Promise.reject(t)}}}this.listeners.forEach(t=>{t(this.#e)})})}},c=s(24818);function o(t,e){let s=(0,c.jE)(e),[i]=r.useState(()=>new h(s,t));r.useEffect(()=>{i.setOptions(t)},[i,t]);let u=r.useSyncExternalStore(r.useCallback(t=>i.subscribe(a.jG.batchCalls(t)),[i]),()=>i.getCurrentResult(),()=>i.getCurrentResult()),o=r.useCallback((t,e)=>{i.mutate(t,e).catch(n.lQ)},[i]);if(u.error&&(0,n.GU)(i.options.throwOnError,[u.error]))throw u.error;return{...u,mutate:o,mutateAsync:u.mutate}}},9050:(t,e,s)=>{"use strict";var r=s(65390);s.o(r,"useParams")&&s.d(e,{useParams:function(){return r.useParams}}),s.o(r,"usePathname")&&s.d(e,{usePathname:function(){return r.usePathname}}),s.o(r,"useRouter")&&s.d(e,{useRouter:function(){return r.useRouter}}),s.o(r,"useSearchParams")&&s.d(e,{useSearchParams:function(){return r.useSearchParams}})},19696:t=>{t.exports={style:{fontFamily:"'Geist', 'Geist Fallback'",fontStyle:"normal"},className:"__className_45c93f",variable:"__variable_45c93f"}},24721:(t,e,s)=>{"use strict";s.d(e,{A:()=>r});let r=(0,s(89117).A)("menu",[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]])},29565:(t,e,s)=>{"use strict";s.d(e,{A:()=>r});let r=(0,s(89117).A)("minimize-2",[["path",{d:"m14 10 7-7",key:"oa77jy"}],["path",{d:"M20 10h-6V4",key:"mjg0md"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M4 14h6v6",key:"rmj7iw"}]])},30422:(t,e,s)=>{"use strict";s.d(e,{A:()=>r});let r=(0,s(89117).A)("ellipsis-vertical",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]])},30448:(t,e,s)=>{"use strict";s.d(e,{A:()=>r});let r=(0,s(89117).A)("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]])},31014:(t,e,s)=>{"use strict";s.d(e,{A:()=>r});let r=(0,s(89117).A)("users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]])},34419:(t,e,s)=>{"use strict";s.d(e,{B:()=>c});var r=s(91269),i=s(76787),a=s(41121);let u=r.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new i.E,currentIdRef:{current:null},currentContextRef:{current:null}});function n(t){let{children:e,delay:s,timeoutMs:n=0}=t,h=r.useRef(s),c=r.useRef(s),o=r.useRef(null),d=r.useRef(null),l=(0,i.Z)();return(0,a.jsx)(u.Provider,{value:r.useMemo(()=>({hasProvider:!0,delayRef:h,initialDelayRef:c,currentIdRef:o,timeoutMs:n,currentContextRef:d,timeout:l}),[n,l]),children:e})}let h=r.createContext(void 0),c=function(t){let{delay:e,closeDelay:s,timeout:i=400}=t,u=r.useMemo(()=>({delay:e,closeDelay:s}),[e,s]),c=r.useMemo(()=>({open:e,close:s}),[e,s]);return(0,a.jsx)(h.Provider,{value:u,children:(0,a.jsx)(n,{delay:c,timeoutMs:i,children:t.children})})}},40148:(t,e,s)=>{"use strict";s.d(e,{A:()=>r});let r=(0,s(89117).A)("sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]])},44011:(t,e,s)=>{"use strict";s.d(e,{j:()=>a});var r=s(91269);let i={};function a(t,e){let s=r.useRef(i);return s.current===i&&(s.current=t(e)),s}},50635:(t,e,s)=>{"use strict";s.d(e,{A:()=>r});let r=(0,s(89117).A)("clipboard-list",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"M12 11h4",key:"1jrz19"}],["path",{d:"M12 16h4",key:"n85exb"}],["path",{d:"M8 11h.01",key:"1dfujw"}],["path",{d:"M8 16h.01",key:"18s6g9"}]])},50940:(t,e,s)=>{"use strict";s.d(e,{A:()=>r});let r=(0,s(89117).A)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]])},68958:(t,e,s)=>{"use strict";s.d(e,{y:()=>a});var r=s(91269);let i=[];function a(t){r.useEffect(t,i)}},69935:(t,e,s)=>{"use strict";s.d(e,{A:()=>r});let r=(0,s(89117).A)("share",[["path",{d:"M12 2v13",key:"1km8f5"}],["path",{d:"m16 6-4-4-4 4",key:"13yo43"}],["path",{d:"M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8",key:"1b2hhj"}]])},72754:(t,e,s)=>{"use strict";s.d(e,{A:()=>r});let r=(0,s(89117).A)("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]])},73334:(t,e,s)=>{"use strict";s.d(e,{A:()=>r});let r=(0,s(89117).A)("play",[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]])},76787:(t,e,s)=>{"use strict";s.d(e,{E:()=>a,Z:()=>u});var r=s(44011),i=s(68958);class a{static create(){return new a}start(t,e){this.clear(),this.currentId=setTimeout(()=>{this.currentId=0,e()},t)}isStarted(){return 0!==this.currentId}constructor(){this.currentId=0,this.clear=()=>{0!==this.currentId&&(clearTimeout(this.currentId),this.currentId=0)},this.disposeEffect=()=>this.clear}}function u(){let t=(0,r.j)(a.create).current;return(0,i.y)(t.disposeEffect),t}},78316:(t,e,s)=>{"use strict";s.d(e,{A:()=>r});let r=(0,s(89117).A)("download",[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]])},82823:(t,e,s)=>{"use strict";s.d(e,{A:()=>r});let r=(0,s(89117).A)("mic",[["path",{d:"M12 19v3",key:"npa21l"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["rect",{x:"9",y:"2",width:"6",height:"13",rx:"3",key:"s6n7sd"}]])},85576:(t,e,s)=>{"use strict";s.d(e,{A:()=>r});let r=(0,s(89117).A)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]])},86715:(t,e,s)=>{"use strict";s.d(e,{A:()=>r});let r=(0,s(89117).A)("maximize-2",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"m21 3-7 7",key:"1l2asr"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M9 21H3v-6",key:"wtvkvv"}]])},91968:(t,e,s)=>{"use strict";s.d(e,{A:()=>r});let r=(0,s(89117).A)("octagon-x",[["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z",key:"2d38gg"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]])},93981:(t,e,s)=>{"use strict";s.d(e,{A:()=>r});let r=(0,s(89117).A)("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]])},95515:(t,e,s)=>{"use strict";s.d(e,{A:()=>r});let r=(0,s(89117).A)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]])},99993:(t,e,s)=>{"use strict";s.d(e,{D:()=>u});var r=s(91269),i=r.createContext(void 0),a={setTheme:t=>{},themes:[]},u=()=>{var t;return null!=(t=r.useContext(i))?t:a}}}]);