konoha-mcp 2.1.3 → 2.1.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 (347) hide show
  1. package/README.md +3 -3
  2. package/apps/web/build/adapter-node.js +11 -0
  3. package/apps/web/build/client/_app/immutable/chunks/BH86Md_X.js +1 -0
  4. package/apps/web/build/client/_app/immutable/chunks/BH86Md_X.js.br +2 -0
  5. package/apps/web/build/client/_app/immutable/chunks/BH86Md_X.js.gz +0 -0
  6. package/apps/web/build/client/_app/immutable/chunks/BaNbYf_w.js +1 -0
  7. package/apps/web/build/client/_app/immutable/chunks/BaNbYf_w.js.br +0 -0
  8. package/apps/web/build/client/_app/immutable/chunks/BaNbYf_w.js.gz +0 -0
  9. package/apps/web/build/client/_app/immutable/chunks/C3-t9btS.js +1 -0
  10. package/apps/web/build/client/_app/immutable/chunks/C3-t9btS.js.br +1 -0
  11. package/apps/web/build/client/_app/immutable/chunks/C3-t9btS.js.gz +0 -0
  12. package/apps/web/build/client/_app/immutable/chunks/{Bv85lp2r.js → CBY268r4.js} +1 -1
  13. package/apps/web/build/client/_app/immutable/chunks/CBY268r4.js.br +3 -0
  14. package/apps/web/build/client/_app/immutable/chunks/CBY268r4.js.gz +0 -0
  15. package/apps/web/build/client/_app/immutable/chunks/Cg3pm-K7.js +1 -0
  16. package/apps/web/build/client/_app/immutable/chunks/Cg3pm-K7.js.br +4 -0
  17. package/apps/web/build/client/_app/immutable/chunks/Cg3pm-K7.js.gz +0 -0
  18. package/apps/web/build/client/_app/immutable/chunks/D-Kujhko.js +1 -0
  19. package/apps/web/build/client/_app/immutable/chunks/D-Kujhko.js.br +0 -0
  20. package/apps/web/build/client/_app/immutable/chunks/D-Kujhko.js.gz +0 -0
  21. package/apps/web/build/client/_app/immutable/chunks/Dek69VGa.js +1 -0
  22. package/apps/web/build/client/_app/immutable/chunks/Dek69VGa.js.br +0 -0
  23. package/apps/web/build/client/_app/immutable/chunks/Dek69VGa.js.gz +0 -0
  24. package/apps/web/build/client/_app/immutable/chunks/{CP4ze5kR.js → Dzm74gVd.js} +1 -1
  25. package/apps/web/build/client/_app/immutable/chunks/Dzm74gVd.js.br +0 -0
  26. package/apps/web/build/client/_app/immutable/chunks/Dzm74gVd.js.gz +0 -0
  27. package/apps/web/build/client/_app/immutable/chunks/Lb3VuXoN.js +2 -0
  28. package/apps/web/build/client/_app/immutable/chunks/Lb3VuXoN.js.br +0 -0
  29. package/apps/web/build/client/_app/immutable/chunks/Lb3VuXoN.js.gz +0 -0
  30. package/apps/web/build/client/_app/immutable/chunks/PrdhfbrQ.js +3 -0
  31. package/apps/web/build/client/_app/immutable/chunks/PrdhfbrQ.js.br +0 -0
  32. package/apps/web/build/client/_app/immutable/chunks/PrdhfbrQ.js.gz +0 -0
  33. package/apps/web/build/client/_app/immutable/chunks/{tFx9Vkzn.js → fbrtLByB.js} +1 -1
  34. package/apps/web/build/client/_app/immutable/chunks/fbrtLByB.js.br +0 -0
  35. package/apps/web/build/client/_app/immutable/chunks/fbrtLByB.js.gz +0 -0
  36. package/apps/web/build/client/_app/immutable/entry/app.DwlgEXmV.js +2 -0
  37. package/apps/web/build/client/_app/immutable/entry/app.DwlgEXmV.js.br +0 -0
  38. package/apps/web/build/client/_app/immutable/entry/app.DwlgEXmV.js.gz +0 -0
  39. package/apps/web/build/client/_app/immutable/entry/start.CNV5BTCO.js +2 -0
  40. package/apps/web/build/client/_app/immutable/entry/start.CNV5BTCO.js.br +0 -0
  41. package/apps/web/build/client/_app/immutable/entry/start.CNV5BTCO.js.gz +0 -0
  42. package/apps/web/build/client/_app/immutable/nodes/{0.BV_U6rd9.js → 0.5uSjyTy0.js} +1 -1
  43. package/apps/web/build/client/_app/immutable/nodes/0.5uSjyTy0.js.br +0 -0
  44. package/apps/web/build/client/_app/immutable/nodes/0.5uSjyTy0.js.gz +0 -0
  45. package/apps/web/build/client/_app/immutable/nodes/{1.317ei_PM.js → 1.BZu6jsAH.js} +1 -1
  46. package/apps/web/build/client/_app/immutable/nodes/1.BZu6jsAH.js.br +0 -0
  47. package/apps/web/build/client/_app/immutable/nodes/1.BZu6jsAH.js.gz +0 -0
  48. package/apps/web/build/client/_app/immutable/nodes/{10.C9BHUF6_.js → 10.CZKScTFN.js} +1 -1
  49. package/apps/web/build/client/_app/immutable/nodes/10.CZKScTFN.js.br +0 -0
  50. package/apps/web/build/client/_app/immutable/nodes/10.CZKScTFN.js.gz +0 -0
  51. package/apps/web/build/client/_app/immutable/nodes/{11._7rmywnA.js → 11.DFglFW_i.js} +1 -1
  52. package/apps/web/build/client/_app/immutable/nodes/11.DFglFW_i.js.br +0 -0
  53. package/apps/web/build/client/_app/immutable/nodes/11.DFglFW_i.js.gz +0 -0
  54. package/apps/web/build/client/_app/immutable/nodes/{12.B_UJh_Cw.js → 12.CSShcv5z.js} +1 -1
  55. package/apps/web/build/client/_app/immutable/nodes/12.CSShcv5z.js.br +0 -0
  56. package/apps/web/build/client/_app/immutable/nodes/12.CSShcv5z.js.gz +0 -0
  57. package/apps/web/build/client/_app/immutable/nodes/{13.FtUj7AO8.js → 13.jWUWoBcs.js} +1 -1
  58. package/apps/web/build/client/_app/immutable/nodes/13.jWUWoBcs.js.br +0 -0
  59. package/apps/web/build/client/_app/immutable/nodes/13.jWUWoBcs.js.gz +0 -0
  60. package/apps/web/build/client/_app/immutable/nodes/{14.CsMWcbH2.js → 14.H-jSqqen.js} +1 -1
  61. package/apps/web/build/client/_app/immutable/nodes/14.H-jSqqen.js.br +0 -0
  62. package/apps/web/build/client/_app/immutable/nodes/14.H-jSqqen.js.gz +0 -0
  63. package/apps/web/build/client/_app/immutable/nodes/{15.DbSoDlZF.js → 15.CpAoyhzV.js} +1 -1
  64. package/apps/web/build/client/_app/immutable/nodes/15.CpAoyhzV.js.br +0 -0
  65. package/apps/web/build/client/_app/immutable/nodes/15.CpAoyhzV.js.gz +0 -0
  66. package/apps/web/build/client/_app/immutable/nodes/{16.BcMZYQJR.js → 16.DT_-MxCT.js} +1 -1
  67. package/apps/web/build/client/_app/immutable/nodes/16.DT_-MxCT.js.br +0 -0
  68. package/apps/web/build/client/_app/immutable/nodes/16.DT_-MxCT.js.gz +0 -0
  69. package/apps/web/build/client/_app/immutable/nodes/2.Dr646Vs5.js +1 -0
  70. package/apps/web/build/client/_app/immutable/nodes/2.Dr646Vs5.js.br +0 -0
  71. package/apps/web/build/client/_app/immutable/nodes/2.Dr646Vs5.js.gz +0 -0
  72. package/apps/web/build/client/_app/immutable/nodes/{3.Co5hy99T.js → 3.Cgc-xN3x.js} +1 -1
  73. package/apps/web/build/client/_app/immutable/nodes/3.Cgc-xN3x.js.br +0 -0
  74. package/apps/web/build/client/_app/immutable/nodes/3.Cgc-xN3x.js.gz +0 -0
  75. package/apps/web/build/client/_app/immutable/nodes/{4.Ckjmv74-.js → 4.CYJQ4bWz.js} +1 -1
  76. package/apps/web/build/client/_app/immutable/nodes/4.CYJQ4bWz.js.br +0 -0
  77. package/apps/web/build/client/_app/immutable/nodes/4.CYJQ4bWz.js.gz +0 -0
  78. package/apps/web/build/client/_app/immutable/nodes/{5.jG4rh5-7.js → 5.DbHL-3Es.js} +1 -1
  79. package/apps/web/build/client/_app/immutable/nodes/5.DbHL-3Es.js.br +0 -0
  80. package/apps/web/build/client/_app/immutable/nodes/5.DbHL-3Es.js.gz +0 -0
  81. package/apps/web/build/client/_app/immutable/nodes/{6.am-4Bf0e.js → 6.BvWH2qas.js} +1 -1
  82. package/apps/web/build/client/_app/immutable/nodes/6.BvWH2qas.js.br +0 -0
  83. package/apps/web/build/client/_app/immutable/nodes/6.BvWH2qas.js.gz +0 -0
  84. package/apps/web/build/client/_app/immutable/nodes/{7.DpWtqqaL.js → 7.CmbiPMU3.js} +1 -1
  85. package/apps/web/build/client/_app/immutable/nodes/7.CmbiPMU3.js.br +0 -0
  86. package/apps/web/build/client/_app/immutable/nodes/7.CmbiPMU3.js.gz +0 -0
  87. package/apps/web/build/client/_app/immutable/nodes/{8.CbbKDJTU.js → 8.B9897Zm9.js} +1 -1
  88. package/apps/web/build/client/_app/immutable/nodes/8.B9897Zm9.js.br +0 -0
  89. package/apps/web/build/client/_app/immutable/nodes/8.B9897Zm9.js.gz +0 -0
  90. package/apps/web/build/client/_app/immutable/nodes/{9.CB21-Q9D.js → 9.CVBlvZqX.js} +1 -1
  91. package/apps/web/build/client/_app/immutable/nodes/9.CVBlvZqX.js.br +0 -0
  92. package/apps/web/build/client/_app/immutable/nodes/9.CVBlvZqX.js.gz +0 -0
  93. package/apps/web/build/client/_app/version.json +1 -1
  94. package/apps/web/build/client/_app/version.json.br +0 -0
  95. package/apps/web/build/client/_app/version.json.gz +0 -0
  96. package/apps/web/build/handler.js +1 -2
  97. package/apps/web/build/index.js +1 -74
  98. package/apps/web/build/server/.vite/manifest.json +419 -0
  99. package/apps/web/build/server/_app/immutable/assets/_layout.CsjxL1aa.css +2 -0
  100. package/apps/web/build/server/adapter-env.js +2 -0
  101. package/apps/web/build/server/adapter-index.js +74 -0
  102. package/apps/web/build/server/adapter-index.js.map +1 -0
  103. package/apps/web/build/server/{chunks/env-RhfAqpCd.js → adapter-node-env.js} +28 -7
  104. package/apps/web/build/server/adapter-node-env.js.map +1 -0
  105. package/apps/web/build/server/adapter-node-handler.js +584 -0
  106. package/apps/web/build/server/adapter-node-handler.js.map +1 -0
  107. package/apps/web/build/server/chunks/api.js +81 -0
  108. package/apps/web/build/server/chunks/api.js.map +1 -0
  109. package/apps/web/build/server/chunks/{env-DU2WieJy.js → config.js} +2 -2
  110. package/apps/web/build/server/chunks/config.js.map +1 -0
  111. package/apps/web/build/server/chunks/exports.js +625 -0
  112. package/apps/web/build/server/chunks/exports.js.map +1 -0
  113. package/apps/web/build/server/chunks/functions.js +30 -0
  114. package/apps/web/build/server/chunks/functions.js.map +1 -0
  115. package/apps/web/build/server/chunks/index-server.js +2 -0
  116. package/apps/web/build/server/chunks/instance.js +3600 -0
  117. package/apps/web/build/server/chunks/instance.js.map +1 -0
  118. package/apps/web/build/server/chunks/internal.js +2849 -0
  119. package/apps/web/build/server/chunks/internal.js.map +1 -0
  120. package/apps/web/build/server/chunks/scrollLock.svelte.js +7 -0
  121. package/apps/web/build/server/chunks/scrollLock.svelte.js.map +1 -0
  122. package/apps/web/build/server/chunks/server-errors.js +489 -0
  123. package/apps/web/build/server/chunks/server-errors.js.map +1 -0
  124. package/apps/web/build/server/chunks/server.js +9 -0
  125. package/apps/web/build/server/chunks/server.js.map +1 -0
  126. package/apps/web/build/server/chunks/{server2-xUKEUzWG.js → server2.js} +140 -718
  127. package/apps/web/build/server/chunks/server2.js.map +1 -0
  128. package/apps/web/build/server/chunks/shared.js +84 -0
  129. package/apps/web/build/server/chunks/shared.js.map +1 -0
  130. package/apps/web/build/server/chunks/{state-C6VH2NAw.js → state.js} +5 -4
  131. package/apps/web/build/server/chunks/state.js.map +1 -0
  132. package/apps/web/build/server/chunks/{sweetAlert.svelte-BKTpmvHp.js → sweetAlert.svelte.js} +3 -3
  133. package/apps/web/build/server/chunks/sweetAlert.svelte.js.map +1 -0
  134. package/apps/web/build/server/chunks/{uiState.svelte-NgyZk5Jz.js → uiState.svelte.js} +3 -3
  135. package/apps/web/build/server/chunks/uiState.svelte.js.map +1 -0
  136. package/apps/web/build/server/chunks/uneval.js +645 -0
  137. package/apps/web/build/server/chunks/uneval.js.map +1 -0
  138. package/apps/web/build/server/entries/fallbacks/error.svelte.js +12 -0
  139. package/apps/web/build/server/entries/fallbacks/error.svelte.js.map +1 -0
  140. package/apps/web/build/server/entries/hooks.server.js +8 -0
  141. package/apps/web/build/server/entries/hooks.server.js.map +1 -0
  142. package/apps/web/build/server/entries/pages/_layout.js +7 -0
  143. package/apps/web/build/server/entries/pages/_layout.js.map +1 -0
  144. package/apps/web/build/server/{chunks/_layout.svelte-FKDEmK4m.js → entries/pages/_layout.svelte.js} +15 -8
  145. package/apps/web/build/server/entries/pages/_layout.svelte.js.map +1 -0
  146. package/apps/web/build/server/entries/pages/_page.js +9 -0
  147. package/apps/web/build/server/entries/pages/_page.js.map +1 -0
  148. package/apps/web/build/server/entries/pages/_page.svelte.js +7 -0
  149. package/apps/web/build/server/entries/pages/_page.svelte.js.map +1 -0
  150. package/apps/web/build/server/{chunks/_page.svelte-K0WRgefN.js → entries/pages/agents/_page.svelte.js} +8 -5
  151. package/apps/web/build/server/entries/pages/agents/_page.svelte.js.map +1 -0
  152. package/apps/web/build/server/{chunks/_page.svelte-BKU-UjQ2.js → entries/pages/bridges/_page.svelte.js} +9 -6
  153. package/apps/web/build/server/entries/pages/bridges/_page.svelte.js.map +1 -0
  154. package/apps/web/build/server/{chunks/_page.svelte-DBQMj6O8.js → entries/pages/clients/_page.svelte.js} +8 -5
  155. package/apps/web/build/server/entries/pages/clients/_page.svelte.js.map +1 -0
  156. package/apps/web/build/server/{chunks/_page.svelte-BQP0Z2mg.js → entries/pages/context/_page.svelte.js} +9 -6
  157. package/apps/web/build/server/entries/pages/context/_page.svelte.js.map +1 -0
  158. package/apps/web/build/server/{chunks/_page.svelte-D_bQaPtJ.js → entries/pages/dashboard/_page.svelte.js} +7 -4
  159. package/apps/web/build/server/entries/pages/dashboard/_page.svelte.js.map +1 -0
  160. package/apps/web/build/server/{chunks/_page.svelte-CxxsZeRm.js → entries/pages/detector/_page.svelte.js} +5 -3
  161. package/apps/web/build/server/entries/pages/detector/_page.svelte.js.map +1 -0
  162. package/apps/web/build/server/{chunks/_page.svelte-DJp9fAk8.js → entries/pages/docs/_page.svelte.js} +7 -4
  163. package/apps/web/build/server/entries/pages/docs/_page.svelte.js.map +1 -0
  164. package/apps/web/build/server/{chunks/_page.svelte-DFBbcBLc.js → entries/pages/doctor/_page.svelte.js} +8 -5
  165. package/apps/web/build/server/entries/pages/doctor/_page.svelte.js.map +1 -0
  166. package/apps/web/build/server/{chunks/_page.svelte-yXv2Aj6-.js → entries/pages/persona/_page.svelte.js} +9 -6
  167. package/apps/web/build/server/entries/pages/persona/_page.svelte.js.map +1 -0
  168. package/apps/web/build/server/{chunks/_page.svelte-CvH3pIDb.js → entries/pages/savings/_page.svelte.js} +7 -4
  169. package/apps/web/build/server/entries/pages/savings/_page.svelte.js.map +1 -0
  170. package/apps/web/build/server/{chunks/_page.svelte-FUbd8bWv.js → entries/pages/search/_page.svelte.js} +9 -6
  171. package/apps/web/build/server/entries/pages/search/_page.svelte.js.map +1 -0
  172. package/apps/web/build/server/{chunks/_page.svelte-Bu5RfcD4.js → entries/pages/semble/_page.svelte.js} +8 -5
  173. package/apps/web/build/server/entries/pages/semble/_page.svelte.js.map +1 -0
  174. package/apps/web/build/server/{chunks/_page.svelte-B4DKG2sO.js → entries/pages/skills/_page.svelte.js} +10 -7
  175. package/apps/web/build/server/entries/pages/skills/_page.svelte.js.map +1 -0
  176. package/apps/web/build/server/{chunks/_page.svelte-D1yHfBBh.js → entries/pages/tasks/_page.svelte.js} +8 -83
  177. package/apps/web/build/server/entries/pages/tasks/_page.svelte.js.map +1 -0
  178. package/apps/web/build/{env.js → server/env.js} +1 -1
  179. package/apps/web/build/server/handler.js +2 -0
  180. package/apps/web/build/server/index.js +68 -0
  181. package/apps/web/build/server/index.js.map +1 -0
  182. package/apps/web/build/server/manifest-full.js +149 -0
  183. package/apps/web/build/server/manifest.js +149 -0
  184. package/apps/web/build/server/nodes/0.js +10 -0
  185. package/apps/web/build/server/nodes/1.js +8 -0
  186. package/apps/web/build/server/nodes/10.js +8 -0
  187. package/apps/web/build/server/nodes/11.js +8 -0
  188. package/apps/web/build/server/nodes/12.js +8 -0
  189. package/apps/web/build/server/nodes/13.js +8 -0
  190. package/apps/web/build/server/nodes/14.js +8 -0
  191. package/apps/web/build/server/nodes/15.js +8 -0
  192. package/apps/web/build/server/nodes/16.js +8 -0
  193. package/apps/web/build/server/nodes/2.js +10 -0
  194. package/apps/web/build/server/nodes/3.js +8 -0
  195. package/apps/web/build/server/nodes/4.js +8 -0
  196. package/apps/web/build/server/nodes/5.js +8 -0
  197. package/apps/web/build/server/nodes/6.js +8 -0
  198. package/apps/web/build/server/nodes/7.js +8 -0
  199. package/apps/web/build/server/nodes/8.js +8 -0
  200. package/apps/web/build/server/nodes/9.js +8 -0
  201. package/apps/web/build/server/remote-entry.js +1565 -0
  202. package/apps/web/build/server/remote-entry.js.map +1 -0
  203. package/apps/web/build/server/server.js +151 -0
  204. package/apps/web/package.json +10 -9
  205. package/bin/cli.js +3 -3
  206. package/docs/SecurityCompliance/security_compliance_report_google_policy_2.1.4_2026-10-06.md +77 -0
  207. package/package.json +9 -7
  208. package/apps/web/build/adapter-env.js +0 -2
  209. package/apps/web/build/client/_app/immutable/chunks/Ae0obco1.js +0 -3
  210. package/apps/web/build/client/_app/immutable/chunks/Ae0obco1.js.br +0 -0
  211. package/apps/web/build/client/_app/immutable/chunks/Ae0obco1.js.gz +0 -0
  212. package/apps/web/build/client/_app/immutable/chunks/BUgOhUo6.js +0 -1
  213. package/apps/web/build/client/_app/immutable/chunks/BUgOhUo6.js.br +0 -1
  214. package/apps/web/build/client/_app/immutable/chunks/BUgOhUo6.js.gz +0 -0
  215. package/apps/web/build/client/_app/immutable/chunks/Bv85lp2r.js.br +0 -3
  216. package/apps/web/build/client/_app/immutable/chunks/Bv85lp2r.js.gz +0 -0
  217. package/apps/web/build/client/_app/immutable/chunks/CP0LAeYI.js +0 -2
  218. package/apps/web/build/client/_app/immutable/chunks/CP0LAeYI.js.br +0 -0
  219. package/apps/web/build/client/_app/immutable/chunks/CP0LAeYI.js.gz +0 -0
  220. package/apps/web/build/client/_app/immutable/chunks/CP4ze5kR.js.br +0 -0
  221. package/apps/web/build/client/_app/immutable/chunks/CP4ze5kR.js.gz +0 -0
  222. package/apps/web/build/client/_app/immutable/chunks/CV8VO5Jt.js +0 -1
  223. package/apps/web/build/client/_app/immutable/chunks/CV8VO5Jt.js.br +0 -0
  224. package/apps/web/build/client/_app/immutable/chunks/CV8VO5Jt.js.gz +0 -0
  225. package/apps/web/build/client/_app/immutable/chunks/DNVgNyBC.js +0 -1
  226. package/apps/web/build/client/_app/immutable/chunks/DNVgNyBC.js.br +0 -2
  227. package/apps/web/build/client/_app/immutable/chunks/DNVgNyBC.js.gz +0 -0
  228. package/apps/web/build/client/_app/immutable/chunks/DVr7DrHY.js +0 -1
  229. package/apps/web/build/client/_app/immutable/chunks/DVr7DrHY.js.br +0 -0
  230. package/apps/web/build/client/_app/immutable/chunks/DVr7DrHY.js.gz +0 -0
  231. package/apps/web/build/client/_app/immutable/chunks/HclGiUj8.js +0 -1
  232. package/apps/web/build/client/_app/immutable/chunks/HclGiUj8.js.br +0 -0
  233. package/apps/web/build/client/_app/immutable/chunks/HclGiUj8.js.gz +0 -0
  234. package/apps/web/build/client/_app/immutable/chunks/tFx9Vkzn.js.br +0 -0
  235. package/apps/web/build/client/_app/immutable/chunks/tFx9Vkzn.js.gz +0 -0
  236. package/apps/web/build/client/_app/immutable/entry/app.qpZh6bSp.js +0 -2
  237. package/apps/web/build/client/_app/immutable/entry/app.qpZh6bSp.js.br +0 -0
  238. package/apps/web/build/client/_app/immutable/entry/app.qpZh6bSp.js.gz +0 -0
  239. package/apps/web/build/client/_app/immutable/entry/start.CUhKN6Eq.js +0 -2
  240. package/apps/web/build/client/_app/immutable/entry/start.CUhKN6Eq.js.br +0 -2
  241. package/apps/web/build/client/_app/immutable/entry/start.CUhKN6Eq.js.gz +0 -0
  242. package/apps/web/build/client/_app/immutable/nodes/0.BV_U6rd9.js.br +0 -0
  243. package/apps/web/build/client/_app/immutable/nodes/0.BV_U6rd9.js.gz +0 -0
  244. package/apps/web/build/client/_app/immutable/nodes/1.317ei_PM.js.br +0 -1
  245. package/apps/web/build/client/_app/immutable/nodes/1.317ei_PM.js.gz +0 -0
  246. package/apps/web/build/client/_app/immutable/nodes/10.C9BHUF6_.js.br +0 -0
  247. package/apps/web/build/client/_app/immutable/nodes/10.C9BHUF6_.js.gz +0 -0
  248. package/apps/web/build/client/_app/immutable/nodes/11._7rmywnA.js.br +0 -0
  249. package/apps/web/build/client/_app/immutable/nodes/11._7rmywnA.js.gz +0 -0
  250. package/apps/web/build/client/_app/immutable/nodes/12.B_UJh_Cw.js.br +0 -0
  251. package/apps/web/build/client/_app/immutable/nodes/12.B_UJh_Cw.js.gz +0 -0
  252. package/apps/web/build/client/_app/immutable/nodes/13.FtUj7AO8.js.br +0 -0
  253. package/apps/web/build/client/_app/immutable/nodes/13.FtUj7AO8.js.gz +0 -0
  254. package/apps/web/build/client/_app/immutable/nodes/14.CsMWcbH2.js.br +0 -0
  255. package/apps/web/build/client/_app/immutable/nodes/14.CsMWcbH2.js.gz +0 -0
  256. package/apps/web/build/client/_app/immutable/nodes/15.DbSoDlZF.js.br +0 -0
  257. package/apps/web/build/client/_app/immutable/nodes/15.DbSoDlZF.js.gz +0 -0
  258. package/apps/web/build/client/_app/immutable/nodes/16.BcMZYQJR.js.br +0 -0
  259. package/apps/web/build/client/_app/immutable/nodes/16.BcMZYQJR.js.gz +0 -0
  260. package/apps/web/build/client/_app/immutable/nodes/2.Bs0YCKXY.js +0 -1
  261. package/apps/web/build/client/_app/immutable/nodes/2.Bs0YCKXY.js.br +0 -0
  262. package/apps/web/build/client/_app/immutable/nodes/2.Bs0YCKXY.js.gz +0 -0
  263. package/apps/web/build/client/_app/immutable/nodes/3.Co5hy99T.js.br +0 -0
  264. package/apps/web/build/client/_app/immutable/nodes/3.Co5hy99T.js.gz +0 -0
  265. package/apps/web/build/client/_app/immutable/nodes/4.Ckjmv74-.js.br +0 -0
  266. package/apps/web/build/client/_app/immutable/nodes/4.Ckjmv74-.js.gz +0 -0
  267. package/apps/web/build/client/_app/immutable/nodes/5.jG4rh5-7.js.br +0 -0
  268. package/apps/web/build/client/_app/immutable/nodes/5.jG4rh5-7.js.gz +0 -0
  269. package/apps/web/build/client/_app/immutable/nodes/6.am-4Bf0e.js.br +0 -0
  270. package/apps/web/build/client/_app/immutable/nodes/6.am-4Bf0e.js.gz +0 -0
  271. package/apps/web/build/client/_app/immutable/nodes/7.DpWtqqaL.js.br +0 -0
  272. package/apps/web/build/client/_app/immutable/nodes/7.DpWtqqaL.js.gz +0 -0
  273. package/apps/web/build/client/_app/immutable/nodes/8.CbbKDJTU.js.br +0 -0
  274. package/apps/web/build/client/_app/immutable/nodes/8.CbbKDJTU.js.gz +0 -0
  275. package/apps/web/build/client/_app/immutable/nodes/9.CB21-Q9D.js.br +0 -0
  276. package/apps/web/build/client/_app/immutable/nodes/9.CB21-Q9D.js.gz +0 -0
  277. package/apps/web/build/dir.js +0 -8
  278. package/apps/web/build/dir.js.map +0 -1
  279. package/apps/web/build/index.js.map +0 -1
  280. package/apps/web/build/server/chunks/0-D09zEpvl.js +0 -31
  281. package/apps/web/build/server/chunks/0-D09zEpvl.js.map +0 -1
  282. package/apps/web/build/server/chunks/1-2My56RES.js +0 -17
  283. package/apps/web/build/server/chunks/1-2My56RES.js.map +0 -1
  284. package/apps/web/build/server/chunks/10-M1HtRrZp.js +0 -17
  285. package/apps/web/build/server/chunks/10-M1HtRrZp.js.map +0 -1
  286. package/apps/web/build/server/chunks/11-BDyQuE2U.js +0 -18
  287. package/apps/web/build/server/chunks/11-BDyQuE2U.js.map +0 -1
  288. package/apps/web/build/server/chunks/12-DR3YohxS.js +0 -16
  289. package/apps/web/build/server/chunks/12-DR3YohxS.js.map +0 -1
  290. package/apps/web/build/server/chunks/13-BJri0QNV.js +0 -18
  291. package/apps/web/build/server/chunks/13-BJri0QNV.js.map +0 -1
  292. package/apps/web/build/server/chunks/14-DJhiE2DY.js +0 -17
  293. package/apps/web/build/server/chunks/14-DJhiE2DY.js.map +0 -1
  294. package/apps/web/build/server/chunks/15-CJUlxcu3.js +0 -19
  295. package/apps/web/build/server/chunks/15-CJUlxcu3.js.map +0 -1
  296. package/apps/web/build/server/chunks/16-BCncPEHV.js +0 -17
  297. package/apps/web/build/server/chunks/16-BCncPEHV.js.map +0 -1
  298. package/apps/web/build/server/chunks/2-B_JPNlak.js +0 -26
  299. package/apps/web/build/server/chunks/2-B_JPNlak.js.map +0 -1
  300. package/apps/web/build/server/chunks/3-BSOfGnYr.js +0 -17
  301. package/apps/web/build/server/chunks/3-BSOfGnYr.js.map +0 -1
  302. package/apps/web/build/server/chunks/4-DUmAi2o6.js +0 -18
  303. package/apps/web/build/server/chunks/4-DUmAi2o6.js.map +0 -1
  304. package/apps/web/build/server/chunks/5-DSM_rY93.js +0 -17
  305. package/apps/web/build/server/chunks/5-DSM_rY93.js.map +0 -1
  306. package/apps/web/build/server/chunks/6-CquXfuY3.js +0 -18
  307. package/apps/web/build/server/chunks/6-CquXfuY3.js.map +0 -1
  308. package/apps/web/build/server/chunks/7-CBNvUHPu.js +0 -16
  309. package/apps/web/build/server/chunks/7-CBNvUHPu.js.map +0 -1
  310. package/apps/web/build/server/chunks/8-BlIFjRiQ.js +0 -16
  311. package/apps/web/build/server/chunks/8-BlIFjRiQ.js.map +0 -1
  312. package/apps/web/build/server/chunks/9-sa0-Zgfq.js +0 -16
  313. package/apps/web/build/server/chunks/9-sa0-Zgfq.js.map +0 -1
  314. package/apps/web/build/server/chunks/_layout.svelte-FKDEmK4m.js.map +0 -1
  315. package/apps/web/build/server/chunks/_page.svelte-B4DKG2sO.js.map +0 -1
  316. package/apps/web/build/server/chunks/_page.svelte-BKU-UjQ2.js.map +0 -1
  317. package/apps/web/build/server/chunks/_page.svelte-BQP0Z2mg.js.map +0 -1
  318. package/apps/web/build/server/chunks/_page.svelte-Bu5RfcD4.js.map +0 -1
  319. package/apps/web/build/server/chunks/_page.svelte-CvH3pIDb.js.map +0 -1
  320. package/apps/web/build/server/chunks/_page.svelte-CxxsZeRm.js.map +0 -1
  321. package/apps/web/build/server/chunks/_page.svelte-D1yHfBBh.js.map +0 -1
  322. package/apps/web/build/server/chunks/_page.svelte-DBQMj6O8.js.map +0 -1
  323. package/apps/web/build/server/chunks/_page.svelte-DFBbcBLc.js.map +0 -1
  324. package/apps/web/build/server/chunks/_page.svelte-DJp9fAk8.js.map +0 -1
  325. package/apps/web/build/server/chunks/_page.svelte-D_bQaPtJ.js.map +0 -1
  326. package/apps/web/build/server/chunks/_page.svelte-FUbd8bWv.js.map +0 -1
  327. package/apps/web/build/server/chunks/_page.svelte-K0WRgefN.js.map +0 -1
  328. package/apps/web/build/server/chunks/_page.svelte-LJxJVjMb.js +0 -7
  329. package/apps/web/build/server/chunks/_page.svelte-LJxJVjMb.js.map +0 -1
  330. package/apps/web/build/server/chunks/_page.svelte-yXv2Aj6-.js.map +0 -1
  331. package/apps/web/build/server/chunks/env-DU2WieJy.js.map +0 -1
  332. package/apps/web/build/server/chunks/env-RhfAqpCd.js.map +0 -1
  333. package/apps/web/build/server/chunks/error.svelte-CNqmrJIT.js +0 -12
  334. package/apps/web/build/server/chunks/error.svelte-CNqmrJIT.js.map +0 -1
  335. package/apps/web/build/server/chunks/exports-DzZ-4-Dy.js +0 -327
  336. package/apps/web/build/server/chunks/exports-DzZ-4-Dy.js.map +0 -1
  337. package/apps/web/build/server/chunks/handler-CNvIc1cp.js +0 -7301
  338. package/apps/web/build/server/chunks/handler-CNvIc1cp.js.map +0 -1
  339. package/apps/web/build/server/chunks/hooks.server-DqbY7q70.js +0 -8
  340. package/apps/web/build/server/chunks/hooks.server-DqbY7q70.js.map +0 -1
  341. package/apps/web/build/server/chunks/index-server-ULRIL6sb.js +0 -2
  342. package/apps/web/build/server/chunks/rolldown-runtime-D7D4PA-g.js +0 -13
  343. package/apps/web/build/server/chunks/scrollLock.svelte-ULRIL6sb.js +0 -2
  344. package/apps/web/build/server/chunks/server2-xUKEUzWG.js.map +0 -1
  345. package/apps/web/build/server/chunks/state-C6VH2NAw.js.map +0 -1
  346. package/apps/web/build/server/chunks/sweetAlert.svelte-BKTpmvHp.js.map +0 -1
  347. package/apps/web/build/server/chunks/uiState.svelte-NgyZk5Jz.js.map +0 -1
@@ -1,4 +1,4 @@
1
- import{$ as e,A as t,B as n,E as r,G as i,H as a,I as o,J as s,K as c,M as l,Q as u,S as d,T as f,U as p,V as m,W as h,X as g,Y as _,_ as v,a as y,c as b,d as x,f as S,g as C,h as w,i as T,j as E,k as D,l as O,o as k,q as A,v as j,w as M,z as N}from"../chunks/Ae0obco1.js";import{t as P}from"../chunks/7LmsTWIo.js";import{t as F}from"../chunks/Bv85lp2r.js";import{t as I}from"../chunks/tFx9Vkzn.js";import"../chunks/BUgOhUo6.js";import{t as L}from"../chunks/CP4ze5kR.js";var R=r(`<button type="button" class="absolute right-3 top-1/2 -translate-y-1/2 text-xs font-bold opacity-60 hover:opacity-100 cursor-pointer" style="color: var(--color-text-muted);">✕</button>`),z=r(`<span class="px-2.5 py-1 rounded-lg border text-[11px] font-bold text-blue-700 dark:text-blue-300 border-blue-500/30 bg-blue-500/10">🌐 skills.sh Public Registry</span> <span class="text-xs font-bold" style="color: var(--color-text-muted);"> </span>`,1),B=r(`<span class="px-2.5 py-1 rounded-lg border text-[11px] font-bold text-emerald-700 dark:text-emerald-300 border-emerald-500/30 bg-emerald-500/10"> </span> <span class="text-xs font-bold" style="color: var(--color-text-muted);"> </span>`,1),V=r(`<div class="p-5 rounded-2xl border animate-pulse space-y-3" style="background: var(--color-surface); border-color: var(--color-border);"><div class="w-3/4 h-4 rounded bg-slate-200 dark:bg-slate-700"></div> <div class="w-1/2 h-3 rounded bg-slate-200 dark:bg-slate-700"></div> <div class="w-full h-8 rounded-xl bg-slate-200 dark:bg-slate-700 pt-2"></div></div>`),ee=r(`<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4"></div>`),te=r(`<div class="p-6 rounded-2xl border text-xs text-red-500 bg-red-500/10 border-red-500/30"> </div>`),ne=r(`<div class="p-16 text-center rounded-3xl border" style="background: var(--color-surface); border-color: var(--color-border);"><div class="w-12 h-12 rounded-2xl mx-auto mb-3 flex items-center justify-center border text-xl" style="background-color: var(--color-primary-glow); border-color: var(--color-primary);">🔍</div> <h3 class="text-sm font-bold" style="color: var(--color-text);"> </h3> <p class="text-xs mt-1" style="color: var(--color-text-muted);">Try searching for "react", "docker", "kubernetes", "tailwind", or "nextjs".</p></div>`),re=r(`<span class="px-2 py-0.5 rounded-full text-[10px] font-bold border shrink-0 text-indigo-700 dark:text-indigo-300 border-indigo-500/30 bg-indigo-500/10"> </span>`),ie=r(`<div class="flex items-center gap-1.5 text-xs" style="color: var(--color-text-muted);"><svg class="w-3.5 h-3.5 shrink-0" fill="currentColor" viewBox="0 0 24 24"><path fill-rule="evenodd" clip-rule="evenodd" d="M12 2C6.477 2 2 6.484 2 12.017c0 4.425 2.865 8.18 6.839 9.504.5.092.682-.217.682-.483 0-.237-.008-.868-.013-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.53 1.032 1.53 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.029-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.202 2.398.1 2.651.64.7 1.028 1.595 1.028 2.688 0 3.848-2.339 4.695-4.566 4.943.359.309.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.019 10.019 0 0022 12.017C22 6.484 17.522 2 12 2z"></path></svg> <a target="_blank" rel="noopener noreferrer" class="hover:underline font-mono truncate text-[11px]" style="color: var(--color-primary);"> </a></div>`),ae=r(`<div class="w-full py-2 rounded-xl border text-xs font-bold flex items-center justify-center gap-1.5 opacity-80" style="background: var(--color-surface-hover); border-color: var(--color-border); color: var(--color-text-muted);"><svg class="w-4 h-4 text-emerald-500" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7"></path></svg> <span>Already Installed in Village</span></div>`),oe=r(`<span class="animate-spin w-3.5 h-3.5 border-2 border-white border-t-transparent rounded-full"></span> <span> </span>`,1),se=r(`<svg class="w-4 h-4" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"></path></svg> <span>Install Skill</span>`,1),ce=r(`<button type="button" class="w-full py-2 rounded-xl text-xs font-bold text-white flex items-center justify-center gap-2 transition-all hover:scale-[1.02] shadow-md cursor-pointer disabled:opacity-50" style="background: linear-gradient(135deg, var(--color-primary), var(--color-accent, #6366f1));"><!></button>`),le=r(`<div class="p-5 rounded-2xl border flex flex-col justify-between gap-4 transition-all hover:scale-[1.01] hover:border-[var(--color-primary)] shadow-sm" style="background: var(--color-surface); border-color: var(--color-border);"><div class="space-y-2"><div class="flex items-start justify-between gap-2"><div class="flex items-center gap-2"><span class="text-xs font-mono px-2 py-0.5 rounded-md border font-bold" style="background: var(--color-surface-hover); border-color: var(--color-border); color: var(--color-text-muted);"></span> <span class="text-xs font-black font-mono truncate max-w-[180px]" style="color: var(--color-text);"> </span></div> <!></div> <!></div> <div class="pt-2 border-t" style="border-color: var(--color-border);"><!></div></div>`),ue=r(`<div class="space-y-4"><div class="flex items-center justify-between flex-wrap gap-3 p-4 rounded-2xl border" style="background: var(--color-surface); border-color: var(--color-border);"><div class="flex items-center gap-3"><div class="w-9 h-9 rounded-xl flex items-center justify-center border font-bold" style="background-color: var(--color-primary-glow); border-color: var(--color-primary); color: var(--color-primary);">🌐</div> <div><h2 class="text-sm sm:text-base font-bold" style="color: var(--color-text);">skills.sh Global Registry Search</h2> <p class="text-xs" style="color: var(--color-text-muted);">Equivalent to <code class="px-1.5 py-0.5 rounded font-mono text-[11px] bg-slate-500/10"> </code> · 1-click install</p></div></div> <div class="flex items-center gap-2 text-xs font-semibold" style="color: var(--color-text-muted);"><span> </span></div></div> <!></div>`),de=r(`<div class="p-12 text-center rounded-3xl border" style="background: var(--color-surface); border-color: var(--color-border);"><div class="inline-block animate-spin w-8 h-8 rounded-full border-4 border-t-transparent mb-3" style="border-color: var(--color-primary); border-top-color: transparent;"></div> <p class="text-xs font-semibold" style="color: var(--color-text-muted);">Loading skills from SQLite FTS5 registry...</p></div>`),fe=r(`<div class="p-6 rounded-3xl border border-rose-500/30 bg-rose-500/10 text-rose-800 dark:text-rose-200 text-xs font-bold"> </div>`),pe=r(`<p class="text-[11px]" style="color: var(--color-text-muted);"> </p> <button type="button" class="px-3 py-1.5 rounded-xl text-xs font-bold text-white transition-all hover:scale-105 shadow-sm cursor-pointer" style="background: linear-gradient(135deg, var(--color-primary), var(--color-accent, #6366f1));"> </button>`,1),me=r(`<div class="p-6 rounded-2xl border text-center space-y-3" style="background: var(--color-surface); border-color: var(--color-border);"><p class="text-xs font-bold" style="color: var(--color-text);">No local skills found</p> <!></div>`),he=r(`<span class="text-[10px] px-2 py-0.5 rounded-md border font-medium truncate max-w-[120px]" style="background: var(--color-surface); border-color: var(--color-border); color: var(--color-text-muted);"> </span>`),ge=r(`<div class="flex flex-wrap gap-1 mt-2"></div>`),_e=r(`<div class="p-4 rounded-2xl border text-left transition-all duration-150 cursor-pointer shadow-sm hover:scale-[1.01]"><div class="flex items-center justify-between gap-2"><span class="text-xs font-black truncate" style="color: var(--color-text);"> </span> <span class="text-[10px] px-2 py-0.5 rounded-full border uppercase tracking-wider font-bold shrink-0 text-emerald-700 dark:text-emerald-300 border-emerald-500/30 bg-emerald-500/10"> </span></div> <!> <div class="flex items-center justify-between text-[10px] font-mono mt-3 pt-2 border-t" style="border-color: var(--color-border); color: var(--color-text-muted);"><span> </span> <span> </span></div></div>`),ve=r(`<div class="p-12 text-center rounded-3xl border" style="background: var(--color-surface); border-color: var(--color-border);"><div class="inline-block animate-spin w-8 h-8 rounded-full border-4 border-t-transparent mb-3" style="border-color: var(--color-primary); border-top-color: transparent;"></div> <p class="text-xs font-semibold" style="color: var(--color-text-muted);">Fetching skill content...</p></div>`),ye=r(`<option> </option>`),be=r(`<span class="px-2.5 py-1 rounded-lg border text-xs font-medium" style="background: var(--color-surface); border-color: var(--color-border); color: var(--color-text);"> </span>`),xe=r(`<div><span class="text-[11px] font-bold uppercase tracking-wider block mb-2" style="color: var(--color-text-muted);">Indexed Keywords & Tags:</span> <div class="flex flex-wrap gap-1.5"></div></div>`),Se=r(`<div><div class="flex items-center justify-between mb-2"><span class="text-[11px] font-bold uppercase tracking-wider" style="color: var(--color-text-muted);">Skill Instructions / Manual:</span> <span class="text-[11px] font-mono" style="color: var(--color-text-muted);"> </span></div> <pre class="p-5 rounded-2xl border text-xs font-mono overflow-x-auto whitespace-pre-wrap max-h-[50vh] overflow-y-auto leading-relaxed" style="background: var(--color-surface-hover); border-color: var(--color-border); color: var(--color-text);"> </pre></div>`),Ce=r(`<div class="p-2.5 rounded-xl border text-[11px] font-mono overflow-x-auto" style="background: var(--color-surface-hover); border-color: var(--color-border);"><span class="font-bold text-slate-500 mr-2">Vector Sample:</span> <span class="text-emerald-600 dark:text-emerald-400"> </span></div>`),we=r(`<div class="p-4 rounded-2xl border space-y-2.5 transition-all hover:border-emerald-500/40" style="background: var(--color-surface); border-color: var(--color-border);"><div class="flex items-center justify-between gap-2"><span class="text-xs font-bold px-2 py-0.5 rounded-lg border text-indigo-700 dark:text-indigo-300 border-indigo-500/30 bg-indigo-500/10 font-mono"> </span> <span class="text-[10px] font-mono px-2 py-0.5 rounded-lg border text-emerald-700 dark:text-emerald-300 border-emerald-500/30 bg-emerald-500/10">384-dim Float32 Vector</span></div> <!> <div class="text-xs font-mono p-3 rounded-xl border leading-relaxed whitespace-pre-wrap max-h-32 overflow-y-auto" style="background: var(--color-surface-hover); border-color: var(--color-border); color: var(--color-text);"> </div></div>`),Te=r(`<div class="space-y-3 max-h-[50vh] overflow-y-auto pr-1"></div>`),Ee=r(`<div class="p-8 text-center rounded-2xl border" style="background: var(--color-surface-hover); border-color: var(--color-border);"><p class="text-xs font-semibold" style="color: var(--color-text-muted);">No vector chunks generated for this skill yet.</p> <p class="text-[11px] mt-1" style="color: var(--color-text-muted);">Run <code class="px-1.5 py-0.5 rounded bg-slate-500/20 font-mono">konoha migrate</code> in terminal to automatically vectorize all skills.</p></div>`),De=r(`<div class="space-y-4"><div class="p-3.5 rounded-xl border flex flex-wrap items-center justify-between gap-3 text-xs" style="background: var(--color-surface-hover); border-color: var(--color-border);"><div class="flex items-center gap-2"><span class="w-2 h-2 rounded-full bg-emerald-500 animate-pulse"></span> <span class="font-bold" style="color: var(--color-text);">Models:</span> <span class="font-mono text-emerald-600 dark:text-emerald-400 font-bold">IBM Granite 97M (ONNX) + MS MARCO MiniLM</span></div> <div class="flex items-center gap-3 text-[11px] font-mono" style="color: var(--color-text-muted);"><span>Embedding: <b class="text-indigo-600 dark:text-indigo-400">384-dim (Cosine)</b></span> <span>RAG Reranker: <b class="text-indigo-600 dark:text-indigo-400">Cross-Encoder + RRF (k=60)</b></span> <span>Execution: <b class="text-emerald-600 dark:text-emerald-400">100% Offline INT8</b></span></div></div> <!></div>`),Oe=r(`<div class="p-6 rounded-3xl border shadow-sm space-y-6" style="background: var(--color-surface); border-color: var(--color-border);"><div class="flex flex-col sm:flex-row sm:items-center justify-between gap-4 border-b pb-4" style="border-color: var(--color-border);"><div><div class="flex items-center gap-2"><h2 class="text-xl font-bold" style="color: var(--color-text);"> </h2> <span class="text-xs px-2.5 py-0.5 rounded-full border font-bold uppercase" style="background: var(--color-primary-glow); border-color: var(--color-primary); color: var(--color-primary);"> </span></div> <p class="text-[11px] font-mono mt-1" style="color: var(--color-text-muted);"> </p></div> <div class="flex items-center gap-2"><button type="button" class="px-3 py-1.5 rounded-xl border text-xs font-semibold flex items-center gap-1.5 transition-all text-rose-700 dark:text-rose-300 border-rose-500/30 bg-rose-500/10 hover:bg-rose-500/20 cursor-pointer"><svg class="w-3.5 h-3.5" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"></path></svg> <span>Delete Skill</span></button></div></div> <div class="p-4 rounded-2xl border flex flex-col sm:flex-row items-center justify-between gap-4" style="background: var(--color-surface-hover); border-color: var(--color-border);"><div class="flex items-center gap-2"><span class="w-2 h-2 rounded-full bg-emerald-500 animate-pulse"></span> <span class="text-xs font-bold" style="color: var(--color-text);">Embed / Unembed for Ninja Subagent:</span></div> <div class="flex items-center gap-2 w-full sm:w-auto"><select class="px-3 py-1.5 rounded-xl border text-xs font-semibold focus:outline-none" style="background: var(--color-surface); border-color: var(--color-border); color: var(--color-text);"></select> <button type="button" class="px-3 py-1.5 rounded-xl border text-xs font-bold transition-all hover:scale-105 cursor-pointer text-emerald-800 dark:text-emerald-200 border-emerald-500/30 bg-emerald-500/15">Embed</button> <button type="button" class="px-3 py-1.5 rounded-xl border text-xs font-bold transition-all hover:scale-105 cursor-pointer text-slate-700 dark:text-slate-300 border-slate-500/30 bg-slate-500/10">Unembed</button></div></div> <!> <div class="space-y-4"><div class="flex items-center gap-2 border-b pb-2" style="border-color: var(--color-border);"><button type="button">📄 Instructions & Manual</button> <button type="button"><span>⚡ Vector Chunks & Embeddings</span> <span> </span></button></div> <!></div></div>`),ke=r(`<div class="p-12 text-center rounded-3xl border space-y-4" style="background: var(--color-surface); border-color: var(--color-border);"><div class="w-12 h-12 rounded-2xl mx-auto flex items-center justify-center border text-xl" style="background-color: var(--color-primary-glow); border-color: var(--color-primary);">🌐</div> <div><h3 class="text-base font-bold" style="color: var(--color-text);"> </h3> <p class="text-xs max-w-md mx-auto mt-1" style="color: var(--color-text-muted);">Search the public registry on <code class="font-mono text-xs">skills.sh</code> (exact CLI equivalent: <code class="font-mono text-xs"> </code>).</p></div> <button type="button" class="px-5 py-2.5 rounded-xl text-xs font-bold text-white inline-flex items-center gap-2 shadow-md cursor-pointer hover:scale-105 transition-all" style="background: linear-gradient(135deg, var(--color-primary), var(--color-accent, #6366f1));"><svg class="w-4 h-4" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"></path></svg> <span> </span></button></div>`),Ae=r(`<div class="p-16 text-center rounded-3xl border" style="background: var(--color-surface); border-color: var(--color-border);"><div class="w-12 h-12 rounded-2xl mx-auto mb-3 flex items-center justify-center border" style="background-color: var(--color-primary-glow); border-color: var(--color-primary); color: var(--color-primary);"><svg class="w-6 h-6" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 6.253v13m0-13C10.832 5.477 9.246 5 7.5 5S4.168 5.477 3 6.253v13C4.168 18.477 5.754 18 7.5 18s3.332.477 4.5 1.253m0-13C13.168 5.477 14.754 5 16.5 5c1.747 0 3.332.477 4.5 1.253v13C19.832 18.477 18.247 18 16.5 18c-1.746 0-3.332.477-4.5 1.253"></path></svg></div> <h3 class="text-sm font-bold" style="color: var(--color-text);">Select a skill to inspect</h3> <p class="text-xs mt-1" style="color: var(--color-text-muted);">Select any skill from the left list to view SOP instructions or embed it into agents.</p></div>`),je=r(`<div class="grid grid-cols-1 lg:grid-cols-3 gap-6"><div class="lg:col-span-1 space-y-2 max-h-[75vh] overflow-y-auto pr-1"><!> <!></div> <div class="lg:col-span-2"><!></div></div>`),Me=r(`<span class="animate-spin w-3.5 h-3.5 border-2 border-white border-t-transparent rounded-full"></span> <span>Creating...</span>`,1),Ne=r(`<span>Save & Index Skill</span>`),Pe=r(`<div class="fixed inset-0 z-50 flex items-center justify-center p-4 bg-slate-900/40 backdrop-blur-sm animate-in fade-in duration-150"><div class="w-full max-w-2xl p-6 rounded-3xl border shadow-2xl space-y-4 animate-in zoom-in-95 duration-150 max-h-[90vh] overflow-y-auto" style="background-color: var(--color-surface); border-color: var(--color-border); color: var(--color-text); box-shadow: var(--shadow-3d);"><div class="flex items-center justify-between pb-3 border-b" style="border-color: var(--color-border);"><div class="flex items-center gap-2.5"><div class="w-8 h-8 rounded-xl flex items-center justify-center border" style="background-color: var(--color-primary-glow); border-color: var(--color-primary); color: var(--color-primary);"><svg class="w-4 h-4" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 4v16m8-8H4"></path></svg></div> <div><h3 class="text-base font-bold" style="color: var(--color-text);">Create New Ninja Skill</h3> <p class="text-xs" style="color: var(--color-text-muted);">Define rules, instructions, and SOPs for subagents</p></div></div> <button type="button" class="w-8 h-8 rounded-full flex items-center justify-center text-xs font-bold border transition-colors hover:scale-105 cursor-pointer" style="background: var(--color-surface); border-color: var(--color-border); color: var(--color-text-muted);">✕</button></div> <div class="space-y-3.5"><div><label for="skill-name" class="block text-xs font-bold mb-1" style="color: var(--color-text);">Skill Name (slug)</label> <input id="skill-name" type="text" placeholder="e.g. docker-compose-scaffolding, redis-caching-skill" class="w-full px-3.5 py-2.5 rounded-xl border text-xs focus:outline-none focus:ring-2 font-mono" style="background: var(--color-surface); border-color: var(--color-border); color: var(--color-text);"/></div> <div><label for="skill-desc" class="block text-xs font-bold mb-1" style="color: var(--color-text);">Description (short summary)</label> <input id="skill-desc" type="text" placeholder="Standard Operating Procedures for scaffolding docker-compose clusters..." class="w-full px-3.5 py-2.5 rounded-xl border text-xs focus:outline-none focus:ring-2 font-medium" style="background: var(--color-surface); border-color: var(--color-border); color: var(--color-text);"/></div> <div class="grid grid-cols-1 sm:grid-cols-2 gap-3"><div><label for="skill-tags" class="block text-xs font-bold mb-1" style="color: var(--color-text);">Tags (comma-separated)</label> <input id="skill-tags" type="text" placeholder="docker, devops, compose, backend" class="w-full px-3.5 py-2.5 rounded-xl border text-xs focus:outline-none focus:ring-2" style="background: var(--color-surface); border-color: var(--color-border); color: var(--color-text);"/></div> <div><label for="skill-embed" class="block text-xs font-bold mb-1" style="color: var(--color-text);">Embed in Agent (optional)</label> <select id="skill-embed" class="w-full px-3.5 py-2.5 rounded-xl border text-xs font-semibold focus:outline-none" style="background: var(--color-surface); border-color: var(--color-border); color: var(--color-text);"><option>None (Global standalone skill)</option><!></select></div></div> <div><label for="skill-content" class="block text-xs font-bold mb-1" style="color: var(--color-text);">Instruction Manual / SOP Content (Markdown)</label> <textarea id="skill-content" rows="8" class="w-full p-3.5 rounded-xl border text-xs font-mono focus:outline-none focus:ring-2 leading-relaxed" style="background: var(--color-surface-hover); border-color: var(--color-border); color: var(--color-text);"></textarea></div></div> <div class="flex items-center justify-end gap-3 pt-3 border-t" style="border-color: var(--color-border);"><button type="button" class="px-4 py-2.5 rounded-xl border text-xs font-semibold cursor-pointer" style="background: var(--color-surface); border-color: var(--color-border); color: var(--color-text-muted);">Cancel</button> <button type="button" class="px-5 py-2.5 rounded-xl font-bold text-xs flex items-center gap-2 cursor-pointer text-white shadow-md disabled:opacity-50" style="background: linear-gradient(135deg, var(--color-primary), var(--color-accent, #6366f1));"><!></button></div></div></div>`),Fe=r(`<div class="p-4 rounded-2xl border animate-pulse flex items-center justify-between" style="background: var(--color-surface); border-color: var(--color-border);"><div class="space-y-2"><div class="w-32 h-4 rounded bg-slate-200 dark:bg-slate-700"></div> <div class="w-48 h-3 rounded bg-slate-200 dark:bg-slate-700"></div></div> <div class="w-20 h-8 rounded-xl bg-slate-200 dark:bg-slate-700"></div></div>`),Ie=r(`<div class="space-y-2"></div>`),Le=r(`<div class="p-4 rounded-2xl border text-xs text-red-500 bg-red-500/10" style="border-color: rgba(239, 68, 68, 0.3);"> </div>`),Re=r(`<div class="flex flex-col items-center justify-center py-12 text-center"><svg class="w-10 h-10 mb-2 opacity-40" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M20 13V6a2 2 0 00-2-2H6a2 2 0 00-2 2v7m16 0v5a2 2 0 01-2 2H6a2 2 0 01-2-2v-5m16 0h-2.586a1 1 0 00-.707.293l-2.414 2.414a1 1 0 01-.707.293h-3.172a1 1 0 01-.707-.293l-2.414-2.414A1 1 0 006.586 13H4"></path></svg> <p class="text-xs font-semibold" style="color: var(--color-text);">No skills found</p> <p class="text-xs mt-1" style="color: var(--color-text-muted);">Try searching for popular topics like "docker", "k8s", "helm", or "nextjs"</p></div>`),ze=r(`<span class="px-2 py-0.5 rounded-full text-[10px] font-semibold border" style="background: var(--color-surface-hover); border-color: var(--color-border); color: var(--color-text-muted);"> </span>`),Be=r(`<div class="flex items-center gap-1 text-[11px]" style="color: var(--color-text-muted);"><span>Source:</span> <a target="_blank" rel="noopener noreferrer" class="hover:underline font-mono inline-flex items-center gap-1" style="color: var(--color-primary);"> <svg class="w-2.5 h-2.5" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg></a></div>`),Ve=r(`<span class="px-3 py-1.5 rounded-xl border text-xs font-semibold inline-flex items-center gap-1.5 opacity-80" style="background: var(--color-surface-hover); border-color: var(--color-border); color: var(--color-text-muted);"><svg class="w-3.5 h-3.5 text-emerald-500" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7"></path></svg> <span>Installed</span></span>`),He=r(`<span class="animate-spin w-3 h-3 border-2 border-white border-t-transparent rounded-full"></span> <span>Installing...</span>`,1),Ue=r(`<svg class="w-3.5 h-3.5" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"></path></svg> <span>Install</span>`,1),We=r(`<button type="button" class="px-3.5 py-1.5 rounded-xl text-xs font-bold text-white flex items-center gap-1.5 transition-all hover:scale-105 shadow-sm cursor-pointer disabled:opacity-50" style="background: linear-gradient(135deg, var(--color-primary), var(--color-accent, #6366f1));"><!></button>`),Ge=r(`<div class="p-3.5 rounded-2xl border flex items-center justify-between gap-3 transition-all hover:border-[var(--color-primary)]" style="background: var(--color-surface); border-color: var(--color-border);"><div class="space-y-1 min-w-0"><div class="flex items-center gap-2 flex-wrap"><span class="text-xs font-bold font-mono truncate" style="color: var(--color-text);"> </span> <!></div> <!></div> <div class="shrink-0"><!></div></div>`),Ke=r(`<div class="fixed inset-0 z-50 flex items-center justify-center p-4 bg-slate-900/40 backdrop-blur-sm animate-in fade-in duration-150"><div class="w-full max-w-2xl p-6 rounded-3xl border shadow-2xl space-y-4 animate-in zoom-in-95 duration-150 max-h-[90vh] flex flex-col" style="background-color: var(--color-surface); border-color: var(--color-border); color: var(--color-text); box-shadow: var(--shadow-3d);"><div class="flex items-center justify-between pb-3 border-b" style="border-color: var(--color-border);"><div class="flex items-center gap-2.5"><div class="w-8 h-8 rounded-xl flex items-center justify-center border" style="background-color: var(--color-primary-glow); border-color: var(--color-primary); color: var(--color-primary);"><svg class="w-4 h-4" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9"></path></svg></div> <div><h3 class="text-base font-bold" style="color: var(--color-text);">skills.sh Public Registry</h3> <p class="text-xs" style="color: var(--color-text-muted);">Search and install open-source agent skills into your village with 1-click</p></div></div> <button type="button" class="w-8 h-8 rounded-full flex items-center justify-center text-xs font-bold border transition-colors hover:scale-105 cursor-pointer" style="background: var(--color-surface); border-color: var(--color-border); color: var(--color-text-muted);">✕</button></div> <div class="relative w-full"><svg class="w-4 h-4 absolute left-3.5 top-1/2 -translate-y-1/2" style="color: var(--color-text-muted);" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"></path></svg> <input type="text" placeholder="Search skills.sh (e.g. docker, kubernetes, security, react)..." class="w-full pl-10 pr-10 py-2.5 rounded-xl border text-xs focus:outline-none focus:ring-2 font-medium" style="background: var(--color-surface-hover); border-color: var(--color-border); color: var(--color-text);"/> <!></div> <div class="flex-1 overflow-y-auto space-y-2.5 min-h-[260px] max-h-[460px] pr-1"><!></div> <div class="flex items-center justify-between pt-3 border-t text-xs" style="border-color: var(--color-border); color: var(--color-text-muted);"><span>Powered by <a href="https://skills.sh" target="_blank" rel="noopener noreferrer" class="hover:underline font-semibold" style="color: var(--color-primary);">skills.sh</a></span> <button type="button" class="px-4 py-2 rounded-xl border font-semibold cursor-pointer" style="background: var(--color-surface); border-color: var(--color-border); color: var(--color-text);">Close</button></div></div></div>`),qe=r(`<div class="space-y-6 max-w-7xl mx-auto"><div class="rise-3d relative overflow-hidden rounded-3xl p-6 sm:p-8 border shadow-sm transition-all" style="background: var(--color-surface); border-color: var(--color-border); box-shadow: var(--shadow-3d);"><div class="relative z-10 flex flex-col md:flex-row md:items-center justify-between gap-6"><div class="space-y-2"><div class="inline-flex items-center gap-2 px-3 py-1 rounded-full text-xs font-bold tracking-wider uppercase border" style="background-color: var(--color-primary-glow); border-color: var(--color-primary); color: var(--color-primary);"><span>FTS5 Skill Knowledge Base</span></div> <h1 class="text-2xl sm:text-3xl font-black tracking-tight" style="color: var(--color-text);">Ninja Skill Registry</h1> <p class="text-xs sm:text-sm max-w-2xl" style="color: var(--color-text-muted);">Inspect, create, and embed structured agent SOPs, frameworks, and reference skills into your subagents. 100% synchronized with CLI commands.</p></div> <div class="flex flex-wrap items-center gap-3 shrink-0"><button type="button" class="px-5 py-2.5 rounded-xl font-bold text-xs flex items-center gap-2 transition-all hover:scale-[1.02] shadow-md cursor-pointer text-white" style="background: linear-gradient(135deg, var(--color-primary), var(--color-accent, #6366f1));"><svg class="w-4 h-4" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 4v16m8-8H4"></path></svg> <span>Create New Skill</span></button> <button type="button" style="background: var(--color-surface); border-color: var(--color-primary); color: var(--color-primary);" title="Search skills on skills.sh registry (konoha skill search &lt;query>)"><svg class="w-4 h-4" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"></path></svg> <span>Search skills.sh</span></button> <button type="button" class="px-4 py-2.5 rounded-xl border text-xs font-semibold flex items-center gap-2 transition-all hover:scale-[1.02] shadow-sm cursor-pointer" style="background: var(--color-surface); border-color: var(--color-border); color: var(--color-text);" title="Run konoha migrate to re-index all skills"><svg class="w-4 h-4" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"></path></svg> <span>Re-index Skills</span></button></div></div></div> <div class="p-4 rounded-2xl border shadow-sm flex flex-col md:flex-row items-center gap-4" style="background: var(--color-surface); border-color: var(--color-border);"><div class="relative flex-1 w-full"><svg class="w-4 h-4 absolute left-3.5 top-1/2 -translate-y-1/2" style="color: var(--color-text-muted);" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"></path></svg> <input type="text" class="w-full pl-10 pr-4 py-2.5 rounded-xl border text-xs focus:outline-none focus:ring-2 font-medium" style="background: var(--color-surface); border-color: var(--color-border); color: var(--color-text);"/> <!></div> <div class="flex flex-wrap items-center gap-2 shrink-0"><div class="flex items-center rounded-xl p-1 border text-xs" style="background: var(--color-surface-hover); border-color: var(--color-border);"><button type="button">🔤 Local FTS5</button> <button type="button"><span>⚡ Neural Vector</span></button> <button type="button" title="Search open-source community skills on skills.sh (equivalent to: konoha skill search &lt;query>)"><span>🌐 skills.sh Registry</span></button></div> <!></div></div> <!></div> <!> <!>`,1);function H(r,D){g(D,!0);let H=c(h([])),U=c(``),Je=c(!0),Ye=c(``),W=c(null),Xe=c(!1),Ze=c(h({total_chunks:0,embedded_chunks:0,vectorized_skills:0,model:`IBM Granite Multilingual (384-dim)`})),G=c(`fts`),K=c(`instructions`),q=c(!1),Qe=c(!1),$e=c(`anbu`),et=[{id:`anbu`,name:`@anbu (DevOps & Backend)`},{id:`jonin`,name:`@jonin (Frontend & UI)`},{id:`kage`,name:`@kage (Architecture & Audit)`},{id:`chunin`,name:`@chunin (Research & Web)`},{id:`genin`,name:`@genin (Code Exploration)`},{id:`sannin`,name:`@sannin (Router & Planner)`},{id:`tokubetsu-jonin`,name:`@tokubetsu-jonin (Technical Writer)`}],J=c(h({name:``,description:``,tags:``,embed_agent:``,content:`# Standard Operating Procedures
1
+ import{$ as e,A as t,B as n,E as r,G as i,H as a,I as o,J as s,K as c,M as l,Q as u,S as d,T as f,U as p,V as m,W as h,X as g,Y as _,_ as v,a as y,c as b,d as x,f as S,g as C,h as w,i as T,j as E,k as D,l as O,o as k,q as A,v as j,w as M,z as N}from"../chunks/PrdhfbrQ.js";import{t as P}from"../chunks/7LmsTWIo.js";import{t as F}from"../chunks/CBY268r4.js";import{t as I}from"../chunks/fbrtLByB.js";import"../chunks/C3-t9btS.js";import{t as L}from"../chunks/Dzm74gVd.js";var R=r(`<button type="button" class="absolute right-3 top-1/2 -translate-y-1/2 text-xs font-bold opacity-60 hover:opacity-100 cursor-pointer" style="color: var(--color-text-muted);">✕</button>`),z=r(`<span class="px-2.5 py-1 rounded-lg border text-[11px] font-bold text-blue-700 dark:text-blue-300 border-blue-500/30 bg-blue-500/10">🌐 skills.sh Public Registry</span> <span class="text-xs font-bold" style="color: var(--color-text-muted);"> </span>`,1),B=r(`<span class="px-2.5 py-1 rounded-lg border text-[11px] font-bold text-emerald-700 dark:text-emerald-300 border-emerald-500/30 bg-emerald-500/10"> </span> <span class="text-xs font-bold" style="color: var(--color-text-muted);"> </span>`,1),V=r(`<div class="p-5 rounded-2xl border animate-pulse space-y-3" style="background: var(--color-surface); border-color: var(--color-border);"><div class="w-3/4 h-4 rounded bg-slate-200 dark:bg-slate-700"></div> <div class="w-1/2 h-3 rounded bg-slate-200 dark:bg-slate-700"></div> <div class="w-full h-8 rounded-xl bg-slate-200 dark:bg-slate-700 pt-2"></div></div>`),ee=r(`<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4"></div>`),te=r(`<div class="p-6 rounded-2xl border text-xs text-red-500 bg-red-500/10 border-red-500/30"> </div>`),ne=r(`<div class="p-16 text-center rounded-3xl border" style="background: var(--color-surface); border-color: var(--color-border);"><div class="w-12 h-12 rounded-2xl mx-auto mb-3 flex items-center justify-center border text-xl" style="background-color: var(--color-primary-glow); border-color: var(--color-primary);">🔍</div> <h3 class="text-sm font-bold" style="color: var(--color-text);"> </h3> <p class="text-xs mt-1" style="color: var(--color-text-muted);">Try searching for "react", "docker", "kubernetes", "tailwind", or "nextjs".</p></div>`),re=r(`<span class="px-2 py-0.5 rounded-full text-[10px] font-bold border shrink-0 text-indigo-700 dark:text-indigo-300 border-indigo-500/30 bg-indigo-500/10"> </span>`),ie=r(`<div class="flex items-center gap-1.5 text-xs" style="color: var(--color-text-muted);"><svg class="w-3.5 h-3.5 shrink-0" fill="currentColor" viewBox="0 0 24 24"><path fill-rule="evenodd" clip-rule="evenodd" d="M12 2C6.477 2 2 6.484 2 12.017c0 4.425 2.865 8.18 6.839 9.504.5.092.682-.217.682-.483 0-.237-.008-.868-.013-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.53 1.032 1.53 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.029-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.202 2.398.1 2.651.64.7 1.028 1.595 1.028 2.688 0 3.848-2.339 4.695-4.566 4.943.359.309.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.019 10.019 0 0022 12.017C22 6.484 17.522 2 12 2z"></path></svg> <a target="_blank" rel="noopener noreferrer" class="hover:underline font-mono truncate text-[11px]" style="color: var(--color-primary);"> </a></div>`),ae=r(`<div class="w-full py-2 rounded-xl border text-xs font-bold flex items-center justify-center gap-1.5 opacity-80" style="background: var(--color-surface-hover); border-color: var(--color-border); color: var(--color-text-muted);"><svg class="w-4 h-4 text-emerald-500" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7"></path></svg> <span>Already Installed in Village</span></div>`),oe=r(`<span class="animate-spin w-3.5 h-3.5 border-2 border-white border-t-transparent rounded-full"></span> <span> </span>`,1),se=r(`<svg class="w-4 h-4" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"></path></svg> <span>Install Skill</span>`,1),ce=r(`<button type="button" class="w-full py-2 rounded-xl text-xs font-bold text-white flex items-center justify-center gap-2 transition-all hover:scale-[1.02] shadow-md cursor-pointer disabled:opacity-50" style="background: linear-gradient(135deg, var(--color-primary), var(--color-accent, #6366f1));"><!></button>`),le=r(`<div class="p-5 rounded-2xl border flex flex-col justify-between gap-4 transition-all hover:scale-[1.01] hover:border-[var(--color-primary)] shadow-sm" style="background: var(--color-surface); border-color: var(--color-border);"><div class="space-y-2"><div class="flex items-start justify-between gap-2"><div class="flex items-center gap-2"><span class="text-xs font-mono px-2 py-0.5 rounded-md border font-bold" style="background: var(--color-surface-hover); border-color: var(--color-border); color: var(--color-text-muted);"></span> <span class="text-xs font-black font-mono truncate max-w-[180px]" style="color: var(--color-text);"> </span></div> <!></div> <!></div> <div class="pt-2 border-t" style="border-color: var(--color-border);"><!></div></div>`),ue=r(`<div class="space-y-4"><div class="flex items-center justify-between flex-wrap gap-3 p-4 rounded-2xl border" style="background: var(--color-surface); border-color: var(--color-border);"><div class="flex items-center gap-3"><div class="w-9 h-9 rounded-xl flex items-center justify-center border font-bold" style="background-color: var(--color-primary-glow); border-color: var(--color-primary); color: var(--color-primary);">🌐</div> <div><h2 class="text-sm sm:text-base font-bold" style="color: var(--color-text);">skills.sh Global Registry Search</h2> <p class="text-xs" style="color: var(--color-text-muted);">Equivalent to <code class="px-1.5 py-0.5 rounded font-mono text-[11px] bg-slate-500/10"> </code> · 1-click install</p></div></div> <div class="flex items-center gap-2 text-xs font-semibold" style="color: var(--color-text-muted);"><span> </span></div></div> <!></div>`),de=r(`<div class="p-12 text-center rounded-3xl border" style="background: var(--color-surface); border-color: var(--color-border);"><div class="inline-block animate-spin w-8 h-8 rounded-full border-4 border-t-transparent mb-3" style="border-color: var(--color-primary); border-top-color: transparent;"></div> <p class="text-xs font-semibold" style="color: var(--color-text-muted);">Loading skills from SQLite FTS5 registry...</p></div>`),fe=r(`<div class="p-6 rounded-3xl border border-rose-500/30 bg-rose-500/10 text-rose-800 dark:text-rose-200 text-xs font-bold"> </div>`),pe=r(`<p class="text-[11px]" style="color: var(--color-text-muted);"> </p> <button type="button" class="px-3 py-1.5 rounded-xl text-xs font-bold text-white transition-all hover:scale-105 shadow-sm cursor-pointer" style="background: linear-gradient(135deg, var(--color-primary), var(--color-accent, #6366f1));"> </button>`,1),me=r(`<div class="p-6 rounded-2xl border text-center space-y-3" style="background: var(--color-surface); border-color: var(--color-border);"><p class="text-xs font-bold" style="color: var(--color-text);">No local skills found</p> <!></div>`),he=r(`<span class="text-[10px] px-2 py-0.5 rounded-md border font-medium truncate max-w-[120px]" style="background: var(--color-surface); border-color: var(--color-border); color: var(--color-text-muted);"> </span>`),ge=r(`<div class="flex flex-wrap gap-1 mt-2"></div>`),_e=r(`<div class="p-4 rounded-2xl border text-left transition-all duration-150 cursor-pointer shadow-sm hover:scale-[1.01]"><div class="flex items-center justify-between gap-2"><span class="text-xs font-black truncate" style="color: var(--color-text);"> </span> <span class="text-[10px] px-2 py-0.5 rounded-full border uppercase tracking-wider font-bold shrink-0 text-emerald-700 dark:text-emerald-300 border-emerald-500/30 bg-emerald-500/10"> </span></div> <!> <div class="flex items-center justify-between text-[10px] font-mono mt-3 pt-2 border-t" style="border-color: var(--color-border); color: var(--color-text-muted);"><span> </span> <span> </span></div></div>`),ve=r(`<div class="p-12 text-center rounded-3xl border" style="background: var(--color-surface); border-color: var(--color-border);"><div class="inline-block animate-spin w-8 h-8 rounded-full border-4 border-t-transparent mb-3" style="border-color: var(--color-primary); border-top-color: transparent;"></div> <p class="text-xs font-semibold" style="color: var(--color-text-muted);">Fetching skill content...</p></div>`),ye=r(`<option> </option>`),be=r(`<span class="px-2.5 py-1 rounded-lg border text-xs font-medium" style="background: var(--color-surface); border-color: var(--color-border); color: var(--color-text);"> </span>`),xe=r(`<div><span class="text-[11px] font-bold uppercase tracking-wider block mb-2" style="color: var(--color-text-muted);">Indexed Keywords & Tags:</span> <div class="flex flex-wrap gap-1.5"></div></div>`),Se=r(`<div><div class="flex items-center justify-between mb-2"><span class="text-[11px] font-bold uppercase tracking-wider" style="color: var(--color-text-muted);">Skill Instructions / Manual:</span> <span class="text-[11px] font-mono" style="color: var(--color-text-muted);"> </span></div> <pre class="p-5 rounded-2xl border text-xs font-mono overflow-x-auto whitespace-pre-wrap max-h-[50vh] overflow-y-auto leading-relaxed" style="background: var(--color-surface-hover); border-color: var(--color-border); color: var(--color-text);"> </pre></div>`),Ce=r(`<div class="p-2.5 rounded-xl border text-[11px] font-mono overflow-x-auto" style="background: var(--color-surface-hover); border-color: var(--color-border);"><span class="font-bold text-slate-500 mr-2">Vector Sample:</span> <span class="text-emerald-600 dark:text-emerald-400"> </span></div>`),we=r(`<div class="p-4 rounded-2xl border space-y-2.5 transition-all hover:border-emerald-500/40" style="background: var(--color-surface); border-color: var(--color-border);"><div class="flex items-center justify-between gap-2"><span class="text-xs font-bold px-2 py-0.5 rounded-lg border text-indigo-700 dark:text-indigo-300 border-indigo-500/30 bg-indigo-500/10 font-mono"> </span> <span class="text-[10px] font-mono px-2 py-0.5 rounded-lg border text-emerald-700 dark:text-emerald-300 border-emerald-500/30 bg-emerald-500/10">384-dim Float32 Vector</span></div> <!> <div class="text-xs font-mono p-3 rounded-xl border leading-relaxed whitespace-pre-wrap max-h-32 overflow-y-auto" style="background: var(--color-surface-hover); border-color: var(--color-border); color: var(--color-text);"> </div></div>`),Te=r(`<div class="space-y-3 max-h-[50vh] overflow-y-auto pr-1"></div>`),Ee=r(`<div class="p-8 text-center rounded-2xl border" style="background: var(--color-surface-hover); border-color: var(--color-border);"><p class="text-xs font-semibold" style="color: var(--color-text-muted);">No vector chunks generated for this skill yet.</p> <p class="text-[11px] mt-1" style="color: var(--color-text-muted);">Run <code class="px-1.5 py-0.5 rounded bg-slate-500/20 font-mono">konoha migrate</code> in terminal to automatically vectorize all skills.</p></div>`),De=r(`<div class="space-y-4"><div class="p-3.5 rounded-xl border flex flex-wrap items-center justify-between gap-3 text-xs" style="background: var(--color-surface-hover); border-color: var(--color-border);"><div class="flex items-center gap-2"><span class="w-2 h-2 rounded-full bg-emerald-500 animate-pulse"></span> <span class="font-bold" style="color: var(--color-text);">Models:</span> <span class="font-mono text-emerald-600 dark:text-emerald-400 font-bold">IBM Granite 97M (ONNX) + MS MARCO MiniLM</span></div> <div class="flex items-center gap-3 text-[11px] font-mono" style="color: var(--color-text-muted);"><span>Embedding: <b class="text-indigo-600 dark:text-indigo-400">384-dim (Cosine)</b></span> <span>RAG Reranker: <b class="text-indigo-600 dark:text-indigo-400">Cross-Encoder + RRF (k=60)</b></span> <span>Execution: <b class="text-emerald-600 dark:text-emerald-400">100% Offline INT8</b></span></div></div> <!></div>`),Oe=r(`<div class="p-6 rounded-3xl border shadow-sm space-y-6" style="background: var(--color-surface); border-color: var(--color-border);"><div class="flex flex-col sm:flex-row sm:items-center justify-between gap-4 border-b pb-4" style="border-color: var(--color-border);"><div><div class="flex items-center gap-2"><h2 class="text-xl font-bold" style="color: var(--color-text);"> </h2> <span class="text-xs px-2.5 py-0.5 rounded-full border font-bold uppercase" style="background: var(--color-primary-glow); border-color: var(--color-primary); color: var(--color-primary);"> </span></div> <p class="text-[11px] font-mono mt-1" style="color: var(--color-text-muted);"> </p></div> <div class="flex items-center gap-2"><button type="button" class="px-3 py-1.5 rounded-xl border text-xs font-semibold flex items-center gap-1.5 transition-all text-rose-700 dark:text-rose-300 border-rose-500/30 bg-rose-500/10 hover:bg-rose-500/20 cursor-pointer"><svg class="w-3.5 h-3.5" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"></path></svg> <span>Delete Skill</span></button></div></div> <div class="p-4 rounded-2xl border flex flex-col sm:flex-row items-center justify-between gap-4" style="background: var(--color-surface-hover); border-color: var(--color-border);"><div class="flex items-center gap-2"><span class="w-2 h-2 rounded-full bg-emerald-500 animate-pulse"></span> <span class="text-xs font-bold" style="color: var(--color-text);">Embed / Unembed for Ninja Subagent:</span></div> <div class="flex items-center gap-2 w-full sm:w-auto"><select class="px-3 py-1.5 rounded-xl border text-xs font-semibold focus:outline-none" style="background: var(--color-surface); border-color: var(--color-border); color: var(--color-text);"></select> <button type="button" class="px-3 py-1.5 rounded-xl border text-xs font-bold transition-all hover:scale-105 cursor-pointer text-emerald-800 dark:text-emerald-200 border-emerald-500/30 bg-emerald-500/15">Embed</button> <button type="button" class="px-3 py-1.5 rounded-xl border text-xs font-bold transition-all hover:scale-105 cursor-pointer text-slate-700 dark:text-slate-300 border-slate-500/30 bg-slate-500/10">Unembed</button></div></div> <!> <div class="space-y-4"><div class="flex items-center gap-2 border-b pb-2" style="border-color: var(--color-border);"><button type="button">📄 Instructions & Manual</button> <button type="button"><span>⚡ Vector Chunks & Embeddings</span> <span> </span></button></div> <!></div></div>`),ke=r(`<div class="p-12 text-center rounded-3xl border space-y-4" style="background: var(--color-surface); border-color: var(--color-border);"><div class="w-12 h-12 rounded-2xl mx-auto flex items-center justify-center border text-xl" style="background-color: var(--color-primary-glow); border-color: var(--color-primary);">🌐</div> <div><h3 class="text-base font-bold" style="color: var(--color-text);"> </h3> <p class="text-xs max-w-md mx-auto mt-1" style="color: var(--color-text-muted);">Search the public registry on <code class="font-mono text-xs">skills.sh</code> (exact CLI equivalent: <code class="font-mono text-xs"> </code>).</p></div> <button type="button" class="px-5 py-2.5 rounded-xl text-xs font-bold text-white inline-flex items-center gap-2 shadow-md cursor-pointer hover:scale-105 transition-all" style="background: linear-gradient(135deg, var(--color-primary), var(--color-accent, #6366f1));"><svg class="w-4 h-4" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"></path></svg> <span> </span></button></div>`),Ae=r(`<div class="p-16 text-center rounded-3xl border" style="background: var(--color-surface); border-color: var(--color-border);"><div class="w-12 h-12 rounded-2xl mx-auto mb-3 flex items-center justify-center border" style="background-color: var(--color-primary-glow); border-color: var(--color-primary); color: var(--color-primary);"><svg class="w-6 h-6" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 6.253v13m0-13C10.832 5.477 9.246 5 7.5 5S4.168 5.477 3 6.253v13C4.168 18.477 5.754 18 7.5 18s3.332.477 4.5 1.253m0-13C13.168 5.477 14.754 5 16.5 5c1.747 0 3.332.477 4.5 1.253v13C19.832 18.477 18.247 18 16.5 18c-1.746 0-3.332.477-4.5 1.253"></path></svg></div> <h3 class="text-sm font-bold" style="color: var(--color-text);">Select a skill to inspect</h3> <p class="text-xs mt-1" style="color: var(--color-text-muted);">Select any skill from the left list to view SOP instructions or embed it into agents.</p></div>`),je=r(`<div class="grid grid-cols-1 lg:grid-cols-3 gap-6"><div class="lg:col-span-1 space-y-2 max-h-[75vh] overflow-y-auto pr-1"><!> <!></div> <div class="lg:col-span-2"><!></div></div>`),Me=r(`<span class="animate-spin w-3.5 h-3.5 border-2 border-white border-t-transparent rounded-full"></span> <span>Creating...</span>`,1),Ne=r(`<span>Save & Index Skill</span>`),Pe=r(`<div class="fixed inset-0 z-50 flex items-center justify-center p-4 bg-slate-900/40 backdrop-blur-sm animate-in fade-in duration-150"><div class="w-full max-w-2xl p-6 rounded-3xl border shadow-2xl space-y-4 animate-in zoom-in-95 duration-150 max-h-[90vh] overflow-y-auto" style="background-color: var(--color-surface); border-color: var(--color-border); color: var(--color-text); box-shadow: var(--shadow-3d);"><div class="flex items-center justify-between pb-3 border-b" style="border-color: var(--color-border);"><div class="flex items-center gap-2.5"><div class="w-8 h-8 rounded-xl flex items-center justify-center border" style="background-color: var(--color-primary-glow); border-color: var(--color-primary); color: var(--color-primary);"><svg class="w-4 h-4" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 4v16m8-8H4"></path></svg></div> <div><h3 class="text-base font-bold" style="color: var(--color-text);">Create New Ninja Skill</h3> <p class="text-xs" style="color: var(--color-text-muted);">Define rules, instructions, and SOPs for subagents</p></div></div> <button type="button" class="w-8 h-8 rounded-full flex items-center justify-center text-xs font-bold border transition-colors hover:scale-105 cursor-pointer" style="background: var(--color-surface); border-color: var(--color-border); color: var(--color-text-muted);">✕</button></div> <div class="space-y-3.5"><div><label for="skill-name" class="block text-xs font-bold mb-1" style="color: var(--color-text);">Skill Name (slug)</label> <input id="skill-name" type="text" placeholder="e.g. docker-compose-scaffolding, redis-caching-skill" class="w-full px-3.5 py-2.5 rounded-xl border text-xs focus:outline-none focus:ring-2 font-mono" style="background: var(--color-surface); border-color: var(--color-border); color: var(--color-text);"/></div> <div><label for="skill-desc" class="block text-xs font-bold mb-1" style="color: var(--color-text);">Description (short summary)</label> <input id="skill-desc" type="text" placeholder="Standard Operating Procedures for scaffolding docker-compose clusters..." class="w-full px-3.5 py-2.5 rounded-xl border text-xs focus:outline-none focus:ring-2 font-medium" style="background: var(--color-surface); border-color: var(--color-border); color: var(--color-text);"/></div> <div class="grid grid-cols-1 sm:grid-cols-2 gap-3"><div><label for="skill-tags" class="block text-xs font-bold mb-1" style="color: var(--color-text);">Tags (comma-separated)</label> <input id="skill-tags" type="text" placeholder="docker, devops, compose, backend" class="w-full px-3.5 py-2.5 rounded-xl border text-xs focus:outline-none focus:ring-2" style="background: var(--color-surface); border-color: var(--color-border); color: var(--color-text);"/></div> <div><label for="skill-embed" class="block text-xs font-bold mb-1" style="color: var(--color-text);">Embed in Agent (optional)</label> <select id="skill-embed" class="w-full px-3.5 py-2.5 rounded-xl border text-xs font-semibold focus:outline-none" style="background: var(--color-surface); border-color: var(--color-border); color: var(--color-text);"><option>None (Global standalone skill)</option><!></select></div></div> <div><label for="skill-content" class="block text-xs font-bold mb-1" style="color: var(--color-text);">Instruction Manual / SOP Content (Markdown)</label> <textarea id="skill-content" rows="8" class="w-full p-3.5 rounded-xl border text-xs font-mono focus:outline-none focus:ring-2 leading-relaxed" style="background: var(--color-surface-hover); border-color: var(--color-border); color: var(--color-text);"></textarea></div></div> <div class="flex items-center justify-end gap-3 pt-3 border-t" style="border-color: var(--color-border);"><button type="button" class="px-4 py-2.5 rounded-xl border text-xs font-semibold cursor-pointer" style="background: var(--color-surface); border-color: var(--color-border); color: var(--color-text-muted);">Cancel</button> <button type="button" class="px-5 py-2.5 rounded-xl font-bold text-xs flex items-center gap-2 cursor-pointer text-white shadow-md disabled:opacity-50" style="background: linear-gradient(135deg, var(--color-primary), var(--color-accent, #6366f1));"><!></button></div></div></div>`),Fe=r(`<div class="p-4 rounded-2xl border animate-pulse flex items-center justify-between" style="background: var(--color-surface); border-color: var(--color-border);"><div class="space-y-2"><div class="w-32 h-4 rounded bg-slate-200 dark:bg-slate-700"></div> <div class="w-48 h-3 rounded bg-slate-200 dark:bg-slate-700"></div></div> <div class="w-20 h-8 rounded-xl bg-slate-200 dark:bg-slate-700"></div></div>`),Ie=r(`<div class="space-y-2"></div>`),Le=r(`<div class="p-4 rounded-2xl border text-xs text-red-500 bg-red-500/10" style="border-color: rgba(239, 68, 68, 0.3);"> </div>`),Re=r(`<div class="flex flex-col items-center justify-center py-12 text-center"><svg class="w-10 h-10 mb-2 opacity-40" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M20 13V6a2 2 0 00-2-2H6a2 2 0 00-2 2v7m16 0v5a2 2 0 01-2 2H6a2 2 0 01-2-2v-5m16 0h-2.586a1 1 0 00-.707.293l-2.414 2.414a1 1 0 01-.707.293h-3.172a1 1 0 01-.707-.293l-2.414-2.414A1 1 0 006.586 13H4"></path></svg> <p class="text-xs font-semibold" style="color: var(--color-text);">No skills found</p> <p class="text-xs mt-1" style="color: var(--color-text-muted);">Try searching for popular topics like "docker", "k8s", "helm", or "nextjs"</p></div>`),ze=r(`<span class="px-2 py-0.5 rounded-full text-[10px] font-semibold border" style="background: var(--color-surface-hover); border-color: var(--color-border); color: var(--color-text-muted);"> </span>`),Be=r(`<div class="flex items-center gap-1 text-[11px]" style="color: var(--color-text-muted);"><span>Source:</span> <a target="_blank" rel="noopener noreferrer" class="hover:underline font-mono inline-flex items-center gap-1" style="color: var(--color-primary);"> <svg class="w-2.5 h-2.5" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg></a></div>`),Ve=r(`<span class="px-3 py-1.5 rounded-xl border text-xs font-semibold inline-flex items-center gap-1.5 opacity-80" style="background: var(--color-surface-hover); border-color: var(--color-border); color: var(--color-text-muted);"><svg class="w-3.5 h-3.5 text-emerald-500" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7"></path></svg> <span>Installed</span></span>`),He=r(`<span class="animate-spin w-3 h-3 border-2 border-white border-t-transparent rounded-full"></span> <span>Installing...</span>`,1),Ue=r(`<svg class="w-3.5 h-3.5" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"></path></svg> <span>Install</span>`,1),We=r(`<button type="button" class="px-3.5 py-1.5 rounded-xl text-xs font-bold text-white flex items-center gap-1.5 transition-all hover:scale-105 shadow-sm cursor-pointer disabled:opacity-50" style="background: linear-gradient(135deg, var(--color-primary), var(--color-accent, #6366f1));"><!></button>`),Ge=r(`<div class="p-3.5 rounded-2xl border flex items-center justify-between gap-3 transition-all hover:border-[var(--color-primary)]" style="background: var(--color-surface); border-color: var(--color-border);"><div class="space-y-1 min-w-0"><div class="flex items-center gap-2 flex-wrap"><span class="text-xs font-bold font-mono truncate" style="color: var(--color-text);"> </span> <!></div> <!></div> <div class="shrink-0"><!></div></div>`),Ke=r(`<div class="fixed inset-0 z-50 flex items-center justify-center p-4 bg-slate-900/40 backdrop-blur-sm animate-in fade-in duration-150"><div class="w-full max-w-2xl p-6 rounded-3xl border shadow-2xl space-y-4 animate-in zoom-in-95 duration-150 max-h-[90vh] flex flex-col" style="background-color: var(--color-surface); border-color: var(--color-border); color: var(--color-text); box-shadow: var(--shadow-3d);"><div class="flex items-center justify-between pb-3 border-b" style="border-color: var(--color-border);"><div class="flex items-center gap-2.5"><div class="w-8 h-8 rounded-xl flex items-center justify-center border" style="background-color: var(--color-primary-glow); border-color: var(--color-primary); color: var(--color-primary);"><svg class="w-4 h-4" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9"></path></svg></div> <div><h3 class="text-base font-bold" style="color: var(--color-text);">skills.sh Public Registry</h3> <p class="text-xs" style="color: var(--color-text-muted);">Search and install open-source agent skills into your village with 1-click</p></div></div> <button type="button" class="w-8 h-8 rounded-full flex items-center justify-center text-xs font-bold border transition-colors hover:scale-105 cursor-pointer" style="background: var(--color-surface); border-color: var(--color-border); color: var(--color-text-muted);">✕</button></div> <div class="relative w-full"><svg class="w-4 h-4 absolute left-3.5 top-1/2 -translate-y-1/2" style="color: var(--color-text-muted);" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"></path></svg> <input type="text" placeholder="Search skills.sh (e.g. docker, kubernetes, security, react)..." class="w-full pl-10 pr-10 py-2.5 rounded-xl border text-xs focus:outline-none focus:ring-2 font-medium" style="background: var(--color-surface-hover); border-color: var(--color-border); color: var(--color-text);"/> <!></div> <div class="flex-1 overflow-y-auto space-y-2.5 min-h-[260px] max-h-[460px] pr-1"><!></div> <div class="flex items-center justify-between pt-3 border-t text-xs" style="border-color: var(--color-border); color: var(--color-text-muted);"><span>Powered by <a href="https://skills.sh" target="_blank" rel="noopener noreferrer" class="hover:underline font-semibold" style="color: var(--color-primary);">skills.sh</a></span> <button type="button" class="px-4 py-2 rounded-xl border font-semibold cursor-pointer" style="background: var(--color-surface); border-color: var(--color-border); color: var(--color-text);">Close</button></div></div></div>`),qe=r(`<div class="space-y-6 max-w-7xl mx-auto"><div class="rise-3d relative overflow-hidden rounded-3xl p-6 sm:p-8 border shadow-sm transition-all" style="background: var(--color-surface); border-color: var(--color-border); box-shadow: var(--shadow-3d);"><div class="relative z-10 flex flex-col md:flex-row md:items-center justify-between gap-6"><div class="space-y-2"><div class="inline-flex items-center gap-2 px-3 py-1 rounded-full text-xs font-bold tracking-wider uppercase border" style="background-color: var(--color-primary-glow); border-color: var(--color-primary); color: var(--color-primary);"><span>FTS5 Skill Knowledge Base</span></div> <h1 class="text-2xl sm:text-3xl font-black tracking-tight" style="color: var(--color-text);">Ninja Skill Registry</h1> <p class="text-xs sm:text-sm max-w-2xl" style="color: var(--color-text-muted);">Inspect, create, and embed structured agent SOPs, frameworks, and reference skills into your subagents. 100% synchronized with CLI commands.</p></div> <div class="flex flex-wrap items-center gap-3 shrink-0"><button type="button" class="px-5 py-2.5 rounded-xl font-bold text-xs flex items-center gap-2 transition-all hover:scale-[1.02] shadow-md cursor-pointer text-white" style="background: linear-gradient(135deg, var(--color-primary), var(--color-accent, #6366f1));"><svg class="w-4 h-4" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 4v16m8-8H4"></path></svg> <span>Create New Skill</span></button> <button type="button" style="background: var(--color-surface); border-color: var(--color-primary); color: var(--color-primary);" title="Search skills on skills.sh registry (konoha skill search &lt;query>)"><svg class="w-4 h-4" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"></path></svg> <span>Search skills.sh</span></button> <button type="button" class="px-4 py-2.5 rounded-xl border text-xs font-semibold flex items-center gap-2 transition-all hover:scale-[1.02] shadow-sm cursor-pointer" style="background: var(--color-surface); border-color: var(--color-border); color: var(--color-text);" title="Run konoha migrate to re-index all skills"><svg class="w-4 h-4" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"></path></svg> <span>Re-index Skills</span></button></div></div></div> <div class="p-4 rounded-2xl border shadow-sm flex flex-col md:flex-row items-center gap-4" style="background: var(--color-surface); border-color: var(--color-border);"><div class="relative flex-1 w-full"><svg class="w-4 h-4 absolute left-3.5 top-1/2 -translate-y-1/2" style="color: var(--color-text-muted);" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"></path></svg> <input type="text" class="w-full pl-10 pr-4 py-2.5 rounded-xl border text-xs focus:outline-none focus:ring-2 font-medium" style="background: var(--color-surface); border-color: var(--color-border); color: var(--color-text);"/> <!></div> <div class="flex flex-wrap items-center gap-2 shrink-0"><div class="flex items-center rounded-xl p-1 border text-xs" style="background: var(--color-surface-hover); border-color: var(--color-border);"><button type="button">🔤 Local FTS5</button> <button type="button"><span>⚡ Neural Vector</span></button> <button type="button" title="Search open-source community skills on skills.sh (equivalent to: konoha skill search &lt;query>)"><span>🌐 skills.sh Registry</span></button></div> <!></div></div> <!></div> <!> <!>`,1);function H(r,D){g(D,!0);let H=c(h([])),U=c(``),Je=c(!0),Ye=c(``),W=c(null),Xe=c(!1),Ze=c(h({total_chunks:0,embedded_chunks:0,vectorized_skills:0,model:`IBM Granite Multilingual (384-dim)`})),G=c(`fts`),K=c(`instructions`),q=c(!1),Qe=c(!1),$e=c(`anbu`),et=[{id:`anbu`,name:`@anbu (DevOps & Backend)`},{id:`jonin`,name:`@jonin (Frontend & UI)`},{id:`kage`,name:`@kage (Architecture & Audit)`},{id:`chunin`,name:`@chunin (Research & Web)`},{id:`genin`,name:`@genin (Code Exploration)`},{id:`sannin`,name:`@sannin (Router & Planner)`},{id:`tokubetsu-jonin`,name:`@tokubetsu-jonin (Technical Writer)`}],J=c(h({name:``,description:``,tags:``,embed_agent:``,content:`# Standard Operating Procedures
2
2
 
3
3
  ## Overview
4
4
  Describe the purpose of this skill.
@@ -1 +1 @@
1
- import{$ as e,A as t,B as n,D as r,E as i,G as a,H as o,I as s,J as c,K as l,M as u,Q as d,S as f,U as p,W as m,X as h,Y as g,_,a as v,c as y,f as b,h as x,i as S,j as C,k as w,l as T,o as ee,q as E,v as te,w as D}from"../chunks/Ae0obco1.js";import{t as O}from"../chunks/7LmsTWIo.js";import"../chunks/BUgOhUo6.js";import{t as k}from"../chunks/CP4ze5kR.js";var A=r(`<svg class="animate-spin w-4 h-4" viewBox="0 0 24 24" fill="none"><circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle><path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8v4a4 4 0 00-4 4H4z"></path></svg>`),ne=i(`<li> </li>`),re=i(`<ul class="list-disc list-inside space-y-1 text-sm font-semibold text-slate-700"></ul>`),ie=i(`<p class="text-sm font-semibold text-emerald-700">Task passes all Definition of Ready criteria.</p>`),ae=i(`<div class="mt-5 rounded-[5px] border p-4 space-y-3" style="border-color: var(--color-border, #e2e8f0); background-color: var(--color-primary-glow, #faf5ff);"><div class="flex flex-wrap items-center gap-2"><span> </span> <span> </span></div> <!></div>`),oe=r(`<svg class="animate-spin w-3.5 h-3.5" viewBox="0 0 24 24" fill="none"><circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle><path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8v4a4 4 0 00-4 4H4z"></path></svg>`),se=i(`<button class="inline-flex items-center gap-1.5 px-3 py-2 rounded-[5px] font-bold text-xs text-rose-700 bg-rose-50 border border-rose-200 cursor-pointer hover:bg-rose-100 transition-all disabled:opacity-50" title="Clear tasks to prevent stale task hallucination"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"></path></svg> Clear Tasks</button>`),j=i(`<div class="rise-3d bg-white border rounded-[5px] p-10 flex items-center justify-center" style="border-color: var(--color-border, #e2e8f0);"><svg class="animate-spin w-8 h-8" style="color: var(--color-primary, #7c3aed);" viewBox="0 0 24 24" fill="none"><circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle><path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8v4a4 4 0 00-4 4H4z"></path></svg></div>`),ce=i(`<div class="rise-3d bg-white border rounded-[5px] p-10 text-center" style="border-color: var(--color-border, #e2e8f0);"><p class="text-sm font-bold text-slate-500">No SDLC tasks found. Tasks are created via the <code class="px-1.5 py-0.5 rounded-[5px] bg-slate-100 text-xs">konoha task create</code> CLI command.</p></div>`),le=i(`<span> </span>`),ue=i(`<span class="px-2 py-0.5 rounded-[5px] text-xs font-bold border bg-amber-100 text-amber-700 border-amber-300"> </span>`),de=i(`<p class="text-xs font-bold text-slate-500">Project: <code class="text-slate-600"> </code></p>`),fe=i(`<div><h3 class="text-xs font-black text-slate-600 uppercase tracking-wide mb-1.5">DoR Missing Criteria</h3> <ul class="list-disc list-inside space-y-0.5 text-sm font-semibold text-slate-600"></ul></div>`),pe=i(`<div><h3 class="text-xs font-black text-slate-600 uppercase tracking-wide mb-1.5">Zero-AI-Slop Gate</h3> <pre class="text-xs font-semibold text-slate-600 bg-white border rounded-[5px] p-3 overflow-x-auto" style="border-color: var(--color-border, #e2e8f0);"> </pre></div>`),me=i(`<div><h3 class="text-xs font-black text-slate-600 uppercase tracking-wide mb-1.5">Evidence</h3> <pre class="text-xs font-semibold text-slate-600 bg-white border rounded-[5px] p-3 overflow-x-auto" style="border-color: var(--color-border, #e2e8f0);"> </pre></div>`),he=i(`<p class="text-xs font-semibold text-slate-400">No gate results or evidence recorded for this task yet.</p>`),ge=i(`<div class="border-t px-4 sm:px-5 py-4 space-y-4 bg-slate-50" style="border-color: var(--color-border, #e2e8f0);"><!> <!> <!> <!> <!> <div class="flex justify-end pt-2 border-t" style="border-color: var(--color-border, #e2e8f0);"><button type="button" class="inline-flex items-center gap-1.5 px-3 py-1.5 rounded-[5px] text-xs font-bold text-rose-700 bg-rose-50 border border-rose-200 hover:bg-rose-100 cursor-pointer transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"></path></svg> Delete Task</button></div></div>`),_e=i(`<div class="rise-3d bg-white border rounded-[5px] shadow-sm overflow-hidden transition-all" style="border-color: var(--color-border, #e2e8f0);"><div class="w-full p-4 sm:p-5 flex flex-wrap items-start justify-between gap-3 hover:bg-slate-50/60 transition-colors"><button type="button" class="min-w-0 flex-1 space-y-1.5 text-left cursor-pointer focus:outline-none"><div class="flex flex-wrap items-center gap-2"><code class="text-xs font-bold text-slate-500"> </code> <span> </span> <span class="px-2 py-0.5 rounded-[5px] text-xs font-bold border bg-slate-100 text-slate-600 border-slate-300"> </span> <!> <!> <!></div> <p class="text-sm font-semibold text-slate-800 break-words line-clamp-2"> </p></button> <div class="flex items-center gap-2 shrink-0"><span class="text-xs font-semibold text-slate-400"> </span> <button type="button" class="p-1.5 rounded-[5px] text-slate-400 hover:text-rose-600 hover:bg-rose-50 transition-colors cursor-pointer" title="Delete this task" aria-label="Delete task"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"></path></svg></button> <button type="button" class="p-1.5 rounded-[5px] text-slate-400 hover:text-slate-700 hover:bg-slate-100 transition-colors cursor-pointer" aria-label="Toggle details"><svg fill="none" stroke="currentColor" viewBox="0 0 24 24" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M19 9l-7 7-7-7"></path></svg></button></div></div> <!></div>`),ve=i(`<div class="space-y-3"></div>`),ye=i(`<div class="space-y-8 max-w-7xl mx-auto"><div class="space-y-3"><div class="inline-flex items-center gap-2 px-3 py-1 rounded-full text-xs font-bold border" style="background-color: var(--color-primary-glow, #ede9fe); color: var(--color-primary, #7c3aed); border-color: var(--color-border, #ddd6fe);"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path></svg> SDLC Governance</div> <h1 class="text-2xl lg:text-3xl font-black text-slate-900 tracking-tight">SDLC Tasks</h1> <p class="text-sm font-semibold text-slate-700 max-w-2xl leading-relaxed">Definition of Ready checks, cross-provider review enforcement, zero-AI-slop gate results, and per-project SDLC configuration.</p></div> <section class="rise-3d bg-white border rounded-[5px] p-6 shadow-md" style="border-color: var(--color-border, #e2e8f0);"><h2 class="text-lg font-bold text-slate-900 mb-4">Project Configuration</h2> <div class="grid md:grid-cols-3 gap-4"><label class="block"><span class="block text-xs font-bold text-slate-600 mb-1.5">Project Path</span> <input type="text" placeholder="/absolute/path/to/project" class="w-full px-3 py-2 rounded-[5px] border text-sm font-semibold text-slate-800 bg-slate-50 focus:outline-none focus:ring-2" style="border-color: var(--color-border, #e2e8f0);"/></label> <label class="block"><span class="block text-xs font-bold text-slate-600 mb-1.5">DoR Mode</span> <select class="w-full px-3 py-2 rounded-[5px] border text-sm font-semibold text-slate-800 bg-slate-50 focus:outline-none focus:ring-2" style="border-color: var(--color-border, #e2e8f0);"><option>Advisory</option><option>Enforced</option></select></label> <label class="block"><span class="block text-xs font-bold text-slate-600 mb-1.5">Review Mode</span> <select class="w-full px-3 py-2 rounded-[5px] border text-sm font-semibold text-slate-800 bg-slate-50 focus:outline-none focus:ring-2" style="border-color: var(--color-border, #e2e8f0);"><option>Self</option><option>Cross-Provider</option></select></label></div> <div class="mt-4 flex items-center gap-3"><button class="btn-3d inline-flex items-center gap-2 px-5 py-2.5 rounded-[5px] font-bold text-xs text-white transition-all shadow-md cursor-pointer disabled:opacity-50" style="background-color: var(--color-primary, #7c3aed);"><!> Save Configuration</button> <button class="inline-flex items-center gap-2 px-5 py-2.5 rounded-[5px] font-bold text-xs text-slate-700 bg-slate-100 border transition-all cursor-pointer hover:bg-slate-200 disabled:opacity-50" style="border-color: var(--color-border, #e2e8f0);">Reload</button></div></section> <section class="rise-3d bg-white border rounded-[5px] p-6 shadow-md" style="border-color: var(--color-border, #e2e8f0);"><h2 class="text-lg font-bold text-slate-900 mb-2">Definition of Ready Check</h2> <p class="text-xs font-semibold text-slate-500 mb-4">Validate a task description before delegation — substance, placeholders, file references, and domain alignment.</p> <textarea rows="3" placeholder="Describe the task: what to build, which files, and the target domain (UI, Backend, Docs, Security…)" class="w-full px-3 py-2 rounded-[5px] border text-sm font-semibold text-slate-800 bg-slate-50 focus:outline-none focus:ring-2 resize-y" style="border-color: var(--color-border, #e2e8f0);"></textarea> <div class="mt-3"><button class="btn-3d inline-flex items-center gap-2 px-5 py-2.5 rounded-[5px] font-bold text-xs text-white transition-all shadow-md cursor-pointer disabled:opacity-50" style="background-color: var(--color-primary, #7c3aed);"><!> Check Readiness</button></div> <!></section> <section class="space-y-4"><div class="flex flex-wrap items-center justify-between gap-3"><h2 class="text-lg font-bold text-slate-900"> </h2> <div class="flex items-center gap-2"><input type="text" placeholder="Filter by project path…" title="Leave empty to show tasks from every project" class="w-48 px-3 py-2 rounded-[5px] border text-xs font-bold text-slate-700 bg-slate-50 focus:outline-none" style="border-color: var(--color-border, #e2e8f0);"/> <select class="px-3 py-2 rounded-[5px] border text-xs font-bold text-slate-700 bg-slate-50 focus:outline-none" style="border-color: var(--color-border, #e2e8f0);"><option>All Statuses</option><option>Draft</option><option>Pending</option><option>In Progress</option><option>Completed</option><option>Verified</option><option>Blocked</option></select> <button class="inline-flex items-center gap-2 px-4 py-2 rounded-[5px] font-bold text-xs text-slate-700 bg-slate-100 border transition-all cursor-pointer hover:bg-slate-200 disabled:opacity-50" style="border-color: var(--color-border, #e2e8f0);"><!> Refresh</button> <!></div></div> <!></section></div>`);function M(r,i){h(i,!0);let w=l(``),M=l(`advisory`),N=l(`self`),P=l(!1),F=l(!1),I=l(``),L=l(null),R=l(!1),z=l(m([])),B=l(!1),V=l(``),H=l(``),U=l(null),be={draft:`bg-slate-100 text-slate-700 border-slate-300`,pending:`bg-amber-100 text-amber-700 border-amber-300`,in_progress:`bg-blue-100 text-blue-700 border-blue-300`,completed:`bg-emerald-100 text-emerald-700 border-emerald-300`,verified:`bg-purple-100 text-purple-700 border-purple-300`,blocked:`bg-rose-100 text-rose-700 border-rose-300`};function xe(e){return be[e]||`bg-slate-100 text-slate-700 border-slate-300`}async function Se(){a(P,!0);try{let e=u(w)?`?project=${encodeURIComponent(u(w))}`:``,t=await O.get(`/api/v1/sdlc/config${e}`);a(w,t.project_path||u(w),!0),a(M,t.dor_mode||`advisory`,!0),a(N,t.review_mode||`self`,!0)}catch(e){k.fire({icon:`error`,title:`Failed to load SDLC config`,text:e.message})}finally{a(P,!1)}}async function Ce(){if(!u(w).trim()){k.fire({icon:`warning`,title:`Project path is required to set SDLC configuration.`});return}a(F,!0);try{let e=await O.patch(`/api/v1/sdlc/config`,{project_path:u(w).trim(),dor_mode:u(M),review_mode:u(N)});a(M,e.dor_mode||u(M),!0),a(N,e.review_mode||u(N),!0),k.fire({icon:`success`,title:`SDLC configuration saved`})}catch(e){k.fire({icon:`error`,title:`Failed to save SDLC config`,text:e.message})}finally{a(F,!1)}}async function we(){if(!u(I).trim()){k.fire({icon:`warning`,title:`Enter a task description to check readiness.`});return}a(R,!0),a(L,null);try{a(L,await O.post(`/api/v1/sdlc/check-readiness`,{task:u(I).trim(),project_path:u(w)||void 0}),!0)}catch(e){k.fire({icon:`error`,title:`Readiness check failed`,text:e.message})}finally{a(R,!1)}}async function W(){a(B,!0);try{let e=new URLSearchParams;u(V)&&e.set(`status`,u(V)),u(H)&&e.set(`project`,u(H).trim()),e.set(`limit`,`50`);let t=await O.get(`/api/v1/sdlc/tasks?${e.toString()}`);a(z,t.tasks||[],!0)}catch(e){k.fire({icon:`error`,title:`Failed to load tasks`,text:e.message})}finally{a(B,!1)}}function Te(e){a(U,u(U)===e?null:e,!0)}function Ee(e){return e===`high`?`bg-emerald-100 text-emerald-700 border-emerald-300`:e===`medium`?`bg-amber-100 text-amber-700 border-amber-300`:`bg-rose-100 text-rose-700 border-rose-300`}async function De(e,t){if(t&&t.stopPropagation(),await k.confirm({title:`Delete SDLC Task?`,text:`Are you sure you want to delete task "${e}"? This action cannot be undone and helps prevent stale task hallucinations.`,icon:`warning`,confirmButtonText:`Delete Task`,cancelButtonText:`Cancel`}))try{await O.delete(`/api/v1/sdlc/tasks/${encodeURIComponent(e)}`),k.fire({icon:`success`,title:`Task deleted successfully`}),await W()}catch(e){k.fire({icon:`error`,title:`Failed to delete task`,text:e.message})}}async function Oe(){let e=!!(u(V)||u(H)),t=e?`Are you sure you want to clear all tasks matching the current filter (Status: "${u(V)||`All`}", Project: "${u(H)||`All`}")?`:`Are you sure you want to clear ALL SDLC tasks across all sessions? This clears obsolete task history and prevents stale agent context.`;if(await k.confirm({title:e?`Clear Filtered Tasks?`:`Clear All SDLC Tasks?`,text:t,icon:`warning`,confirmButtonText:`Clear Tasks`,cancelButtonText:`Cancel`}))try{let t=new URLSearchParams;e?(u(V)&&t.set(`status`,u(V)),u(H)&&t.set(`project`,u(H).trim())):t.set(`all`,`true`);let n=await O.delete(`/api/v1/sdlc/tasks?${t.toString()}`);k.fire({icon:`success`,title:`Cleared ${n.deleted||0} task(s)`}),await W()}catch(e){k.fire({icon:`error`,title:`Failed to clear tasks`,text:e.message})}}te(()=>{Se(),W()});var ke=ye(),Ae=p(n(ke),2),je=p(n(Ae),2),Me=n(je),Ne=p(n(Me),2);v(Ne),e(Me);var Pe=p(Me,2),G=p(n(Pe),2),Fe=n(G);Fe.value=Fe.__value=`advisory`;var Ie=p(Fe);Ie.value=Ie.__value=`enforced`,e(G),T(G),e(Pe);var Le=p(Pe,2),K=p(n(Le),2),Re=n(K);Re.value=Re.__value=`self`;var ze=p(Re);ze.value=ze.__value=`cross-provider`,e(K),T(K),e(Le),e(je);var Be=p(je,2),q=n(Be),Ve=n(q),He=e=>{var t=A();D(e,t)};_(Ve,e=>{u(F)&&e(He)}),d(),e(q);var Ue=p(q,2);e(Be),e(Ae);var We=p(Ae,2),Ge=p(n(We),4);c(Ge);var Ke=p(Ge,2),J=n(Ke),qe=n(J),Je=e=>{var t=A();D(e,t)};_(qe,e=>{u(R)&&e(Je)}),d(),e(J),e(Ke);var Ye=p(Ke,2),Xe=t=>{var r=ae(),i=n(r),a=n(i),c=o(a,!0),l=p(a,2),d=o(l);e(i);var m=p(i,2),h=t=>{var n=re();x(n,20,()=>u(L).missing,e=>e,(e,t)=>{var n=ne(),r=o(n,!0);s(()=>f(r,t)),D(e,n)}),e(n),D(t,n)},g=e=>{var t=ie();D(e,t)};_(m,e=>{u(L).missing&&u(L).missing.length>0?e(h):u(L).ready&&e(g,1)}),e(r),s(e=>{b(a,1,`px-2.5 py-1 rounded-[5px] text-xs font-bold border ${u(L).ready?`bg-emerald-100 text-emerald-700 border-emerald-300`:`bg-rose-100 text-rose-700 border-rose-300`}`),f(c,u(L).ready?`✓ Ready`:`✗ Not Ready`),b(l,1,`px-2.5 py-1 rounded-[5px] text-xs font-bold border ${e??``}`),f(d,`Confidence: ${(u(L).confidence||`n/a`)??``}`)},[()=>Ee(u(L).confidence)]),D(t,r)};_(Ye,e=>{u(L)&&e(Xe)}),e(We);var Ze=p(We,2),Qe=n(Ze),$e=n(Qe),et=o($e),tt=p($e,2),Y=n(tt);v(Y);var X=p(Y,2),nt=n(X);nt.value=nt.__value=``;var rt=p(nt);rt.value=rt.__value=`draft`;var it=p(rt);it.value=it.__value=`pending`;var at=p(it);at.value=at.__value=`in_progress`;var Z=p(at);Z.value=Z.__value=`completed`;var Q=p(Z);Q.value=Q.__value=`verified`;var ot=p(Q);ot.value=ot.__value=`blocked`,e(X),T(X);var $=p(X,2),st=n($),ct=e=>{var t=oe();D(e,t)};_(st,e=>{u(B)&&e(ct)}),d(),e($);var lt=p($,2),ut=e=>{var n=se();s(()=>n.disabled=u(B)),t(`click`,n,Oe),D(e,n)};_(lt,e=>{u(z).length>0&&e(ut)}),e(tt),e(Qe);var dt=p(Qe,2),ft=e=>{var t=j();D(e,t)},pt=e=>{var t=ce();D(e,t)},mt=r=>{var i=ve();x(i,21,()=>u(z),e=>e.id,(r,i)=>{var a=_e(),c=n(a),l=n(c),d=n(l),m=n(d),h=o(m,!0),g=p(m,2),v=o(g,!0),y=p(g,2),S=o(y),C=p(y,2),w=e=>{var t=le(),n=o(t);s(()=>{b(t,1,`px-2 py-0.5 rounded-[5px] text-xs font-bold border ${u(i).dor_result.ready?`bg-emerald-100 text-emerald-700 border-emerald-300`:`bg-rose-100 text-rose-700 border-rose-300`}`),f(n,`DoR: ${u(i).dor_result.ready?`ready`:`not ready`}`)}),D(e,t)};_(C,e=>{u(i).dor_result&&u(i).dor_result.ready!==void 0&&e(w)});var T=p(C,2),te=e=>{var t=le(),n=o(t);s(()=>{b(t,1,`px-2 py-0.5 rounded-[5px] text-xs font-bold border ${u(i).slop_result.pass?`bg-emerald-100 text-emerald-700 border-emerald-300`:`bg-rose-100 text-rose-700 border-rose-300`}`),f(n,`Slop: ${u(i).slop_result.pass?`clean`:`findings`}`)}),D(e,t)};_(T,e=>{u(i).slop_result&&u(i).slop_result.pass!==void 0&&e(te)});var O=p(T,2),k=e=>{var t=ue(),n=o(t);s(()=>f(n,`${u(i).slop_cycles??``} cycle${u(i).slop_cycles===1?``:`s`}`)),D(e,t)};_(O,e=>{u(i).slop_cycles>0&&e(k)}),e(d);var A=p(d,2),re=o(A,!0);e(l);var ie=p(l,2),ae=n(ie),oe=o(ae,!0),se=p(ae,2),j=p(se,2),ce=o(j);e(ie),e(c);var ve=p(c,2),ye=r=>{var a=ge(),c=n(a),l=t=>{var r=de(),a=p(n(r)),c=o(a,!0);e(r),s(()=>f(c,u(i).project_path)),D(t,r)};_(c,e=>{u(i).project_path&&e(l)});var d=p(c,2),m=t=>{var r=fe(),a=p(n(r),2);x(a,20,()=>u(i).dor_result.missing,e=>e,(e,t)=>{var n=ne(),r=o(n,!0);s(()=>f(r,t)),D(e,n)}),e(a),e(r),D(t,r)};_(d,e=>{u(i).dor_result&&u(i).dor_result.missing&&u(i).dor_result.missing.length>0&&e(m)});var h=p(d,2),g=t=>{var r=pe(),a=p(n(r),2),c=o(a,!0);e(r),s(e=>f(c,e),[()=>JSON.stringify(u(i).slop_result,null,2)]),D(t,r)},v=E(()=>u(i).slop_result&&Object.keys(u(i).slop_result).length>0);_(h,e=>{u(v)&&e(g)});var y=p(h,2),b=t=>{var r=me(),a=p(n(r),2),c=o(a,!0);e(r),s(e=>f(c,e),[()=>JSON.stringify(u(i).evidence,null,2)]),D(t,r)},S=E(()=>u(i).evidence&&Object.keys(u(i).evidence).length>0);_(y,e=>{u(S)&&e(b)});var C=p(y,2),w=e=>{var t=he();D(e,t)},T=E(()=>(!u(i).dor_result||Object.keys(u(i).dor_result).length===0)&&(!u(i).slop_result||Object.keys(u(i).slop_result).length===0)&&(!u(i).evidence||Object.keys(u(i).evidence).length===0));_(C,e=>{u(T)&&e(w)});var ee=p(C,2),te=o(ee);e(a),t(`click`,te,e=>De(u(i).id,e)),D(r,a)};_(ve,e=>{u(U)===u(i).id&&e(ye)}),e(a),s(e=>{f(h,u(i).id),b(g,1,`px-2 py-0.5 rounded-[5px] text-xs font-bold border ${e??``}`),f(v,u(i).status),f(S,`review: ${(u(i).review_mode||`self`)??``}`),f(re,u(i).description),f(oe,u(i).updated_at||``),ee(j,`title`,u(U)===u(i).id?`Collapse details`:`Expand details`),b(ce,0,`w-4 h-4 transition-transform ${u(U)===u(i).id?`rotate-180`:``}`)},[()=>xe(u(i).status)]),t(`click`,l,()=>Te(u(i).id)),t(`click`,se,e=>De(u(i).id,e)),t(`click`,j,()=>Te(u(i).id)),D(r,a)}),e(i),D(r,i)};_(dt,e=>{u(B)&&u(z).length===0?e(ft):u(z).length===0?e(pt,1):e(mt,-1)}),e(Ze),e(ke),s(()=>{q.disabled=u(F),Ue.disabled=u(P),J.disabled=u(R),f(et,`Tasks (${u(z).length??``})`),$.disabled=u(B)}),S(Ne,()=>u(w),e=>a(w,e)),y(G,()=>u(M),e=>a(M,e)),y(K,()=>u(N),e=>a(N,e)),t(`click`,q,Ce),t(`click`,Ue,Se),S(Ge,()=>u(I),e=>a(I,e)),t(`click`,J,we),t(`keydown`,Y,e=>{e.key===`Enter`&&W()}),C(`blur`,Y,()=>W()),S(Y,()=>u(H),e=>a(H,e)),t(`change`,X,W),y(X,()=>u(V),e=>a(V,e)),t(`click`,$,W),D(r,ke),g()}w([`click`,`keydown`,`change`]);function N(e){M(e,{})}export{N as component};
1
+ import{$ as e,A as t,B as n,D as r,E as i,G as a,H as o,I as s,J as c,K as l,M as u,Q as d,S as f,U as p,W as m,X as h,Y as g,_,a as v,c as y,f as b,h as x,i as S,j as C,k as w,l as T,o as ee,q as E,v as te,w as D}from"../chunks/PrdhfbrQ.js";import{t as O}from"../chunks/7LmsTWIo.js";import"../chunks/C3-t9btS.js";import{t as k}from"../chunks/Dzm74gVd.js";var A=r(`<svg class="animate-spin w-4 h-4" viewBox="0 0 24 24" fill="none"><circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle><path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8v4a4 4 0 00-4 4H4z"></path></svg>`),ne=i(`<li> </li>`),re=i(`<ul class="list-disc list-inside space-y-1 text-sm font-semibold text-slate-700"></ul>`),ie=i(`<p class="text-sm font-semibold text-emerald-700">Task passes all Definition of Ready criteria.</p>`),ae=i(`<div class="mt-5 rounded-[5px] border p-4 space-y-3" style="border-color: var(--color-border, #e2e8f0); background-color: var(--color-primary-glow, #faf5ff);"><div class="flex flex-wrap items-center gap-2"><span> </span> <span> </span></div> <!></div>`),oe=r(`<svg class="animate-spin w-3.5 h-3.5" viewBox="0 0 24 24" fill="none"><circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle><path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8v4a4 4 0 00-4 4H4z"></path></svg>`),se=i(`<button class="inline-flex items-center gap-1.5 px-3 py-2 rounded-[5px] font-bold text-xs text-rose-700 bg-rose-50 border border-rose-200 cursor-pointer hover:bg-rose-100 transition-all disabled:opacity-50" title="Clear tasks to prevent stale task hallucination"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"></path></svg> Clear Tasks</button>`),j=i(`<div class="rise-3d bg-white border rounded-[5px] p-10 flex items-center justify-center" style="border-color: var(--color-border, #e2e8f0);"><svg class="animate-spin w-8 h-8" style="color: var(--color-primary, #7c3aed);" viewBox="0 0 24 24" fill="none"><circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle><path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8v4a4 4 0 00-4 4H4z"></path></svg></div>`),ce=i(`<div class="rise-3d bg-white border rounded-[5px] p-10 text-center" style="border-color: var(--color-border, #e2e8f0);"><p class="text-sm font-bold text-slate-500">No SDLC tasks found. Tasks are created via the <code class="px-1.5 py-0.5 rounded-[5px] bg-slate-100 text-xs">konoha task create</code> CLI command.</p></div>`),le=i(`<span> </span>`),ue=i(`<span class="px-2 py-0.5 rounded-[5px] text-xs font-bold border bg-amber-100 text-amber-700 border-amber-300"> </span>`),de=i(`<p class="text-xs font-bold text-slate-500">Project: <code class="text-slate-600"> </code></p>`),fe=i(`<div><h3 class="text-xs font-black text-slate-600 uppercase tracking-wide mb-1.5">DoR Missing Criteria</h3> <ul class="list-disc list-inside space-y-0.5 text-sm font-semibold text-slate-600"></ul></div>`),pe=i(`<div><h3 class="text-xs font-black text-slate-600 uppercase tracking-wide mb-1.5">Zero-AI-Slop Gate</h3> <pre class="text-xs font-semibold text-slate-600 bg-white border rounded-[5px] p-3 overflow-x-auto" style="border-color: var(--color-border, #e2e8f0);"> </pre></div>`),me=i(`<div><h3 class="text-xs font-black text-slate-600 uppercase tracking-wide mb-1.5">Evidence</h3> <pre class="text-xs font-semibold text-slate-600 bg-white border rounded-[5px] p-3 overflow-x-auto" style="border-color: var(--color-border, #e2e8f0);"> </pre></div>`),he=i(`<p class="text-xs font-semibold text-slate-400">No gate results or evidence recorded for this task yet.</p>`),ge=i(`<div class="border-t px-4 sm:px-5 py-4 space-y-4 bg-slate-50" style="border-color: var(--color-border, #e2e8f0);"><!> <!> <!> <!> <!> <div class="flex justify-end pt-2 border-t" style="border-color: var(--color-border, #e2e8f0);"><button type="button" class="inline-flex items-center gap-1.5 px-3 py-1.5 rounded-[5px] text-xs font-bold text-rose-700 bg-rose-50 border border-rose-200 hover:bg-rose-100 cursor-pointer transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"></path></svg> Delete Task</button></div></div>`),_e=i(`<div class="rise-3d bg-white border rounded-[5px] shadow-sm overflow-hidden transition-all" style="border-color: var(--color-border, #e2e8f0);"><div class="w-full p-4 sm:p-5 flex flex-wrap items-start justify-between gap-3 hover:bg-slate-50/60 transition-colors"><button type="button" class="min-w-0 flex-1 space-y-1.5 text-left cursor-pointer focus:outline-none"><div class="flex flex-wrap items-center gap-2"><code class="text-xs font-bold text-slate-500"> </code> <span> </span> <span class="px-2 py-0.5 rounded-[5px] text-xs font-bold border bg-slate-100 text-slate-600 border-slate-300"> </span> <!> <!> <!></div> <p class="text-sm font-semibold text-slate-800 break-words line-clamp-2"> </p></button> <div class="flex items-center gap-2 shrink-0"><span class="text-xs font-semibold text-slate-400"> </span> <button type="button" class="p-1.5 rounded-[5px] text-slate-400 hover:text-rose-600 hover:bg-rose-50 transition-colors cursor-pointer" title="Delete this task" aria-label="Delete task"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"></path></svg></button> <button type="button" class="p-1.5 rounded-[5px] text-slate-400 hover:text-slate-700 hover:bg-slate-100 transition-colors cursor-pointer" aria-label="Toggle details"><svg fill="none" stroke="currentColor" viewBox="0 0 24 24" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M19 9l-7 7-7-7"></path></svg></button></div></div> <!></div>`),ve=i(`<div class="space-y-3"></div>`),ye=i(`<div class="space-y-8 max-w-7xl mx-auto"><div class="space-y-3"><div class="inline-flex items-center gap-2 px-3 py-1 rounded-full text-xs font-bold border" style="background-color: var(--color-primary-glow, #ede9fe); color: var(--color-primary, #7c3aed); border-color: var(--color-border, #ddd6fe);"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path></svg> SDLC Governance</div> <h1 class="text-2xl lg:text-3xl font-black text-slate-900 tracking-tight">SDLC Tasks</h1> <p class="text-sm font-semibold text-slate-700 max-w-2xl leading-relaxed">Definition of Ready checks, cross-provider review enforcement, zero-AI-slop gate results, and per-project SDLC configuration.</p></div> <section class="rise-3d bg-white border rounded-[5px] p-6 shadow-md" style="border-color: var(--color-border, #e2e8f0);"><h2 class="text-lg font-bold text-slate-900 mb-4">Project Configuration</h2> <div class="grid md:grid-cols-3 gap-4"><label class="block"><span class="block text-xs font-bold text-slate-600 mb-1.5">Project Path</span> <input type="text" placeholder="/absolute/path/to/project" class="w-full px-3 py-2 rounded-[5px] border text-sm font-semibold text-slate-800 bg-slate-50 focus:outline-none focus:ring-2" style="border-color: var(--color-border, #e2e8f0);"/></label> <label class="block"><span class="block text-xs font-bold text-slate-600 mb-1.5">DoR Mode</span> <select class="w-full px-3 py-2 rounded-[5px] border text-sm font-semibold text-slate-800 bg-slate-50 focus:outline-none focus:ring-2" style="border-color: var(--color-border, #e2e8f0);"><option>Advisory</option><option>Enforced</option></select></label> <label class="block"><span class="block text-xs font-bold text-slate-600 mb-1.5">Review Mode</span> <select class="w-full px-3 py-2 rounded-[5px] border text-sm font-semibold text-slate-800 bg-slate-50 focus:outline-none focus:ring-2" style="border-color: var(--color-border, #e2e8f0);"><option>Self</option><option>Cross-Provider</option></select></label></div> <div class="mt-4 flex items-center gap-3"><button class="btn-3d inline-flex items-center gap-2 px-5 py-2.5 rounded-[5px] font-bold text-xs text-white transition-all shadow-md cursor-pointer disabled:opacity-50" style="background-color: var(--color-primary, #7c3aed);"><!> Save Configuration</button> <button class="inline-flex items-center gap-2 px-5 py-2.5 rounded-[5px] font-bold text-xs text-slate-700 bg-slate-100 border transition-all cursor-pointer hover:bg-slate-200 disabled:opacity-50" style="border-color: var(--color-border, #e2e8f0);">Reload</button></div></section> <section class="rise-3d bg-white border rounded-[5px] p-6 shadow-md" style="border-color: var(--color-border, #e2e8f0);"><h2 class="text-lg font-bold text-slate-900 mb-2">Definition of Ready Check</h2> <p class="text-xs font-semibold text-slate-500 mb-4">Validate a task description before delegation — substance, placeholders, file references, and domain alignment.</p> <textarea rows="3" placeholder="Describe the task: what to build, which files, and the target domain (UI, Backend, Docs, Security…)" class="w-full px-3 py-2 rounded-[5px] border text-sm font-semibold text-slate-800 bg-slate-50 focus:outline-none focus:ring-2 resize-y" style="border-color: var(--color-border, #e2e8f0);"></textarea> <div class="mt-3"><button class="btn-3d inline-flex items-center gap-2 px-5 py-2.5 rounded-[5px] font-bold text-xs text-white transition-all shadow-md cursor-pointer disabled:opacity-50" style="background-color: var(--color-primary, #7c3aed);"><!> Check Readiness</button></div> <!></section> <section class="space-y-4"><div class="flex flex-wrap items-center justify-between gap-3"><h2 class="text-lg font-bold text-slate-900"> </h2> <div class="flex items-center gap-2"><input type="text" placeholder="Filter by project path…" title="Leave empty to show tasks from every project" class="w-48 px-3 py-2 rounded-[5px] border text-xs font-bold text-slate-700 bg-slate-50 focus:outline-none" style="border-color: var(--color-border, #e2e8f0);"/> <select class="px-3 py-2 rounded-[5px] border text-xs font-bold text-slate-700 bg-slate-50 focus:outline-none" style="border-color: var(--color-border, #e2e8f0);"><option>All Statuses</option><option>Draft</option><option>Pending</option><option>In Progress</option><option>Completed</option><option>Verified</option><option>Blocked</option></select> <button class="inline-flex items-center gap-2 px-4 py-2 rounded-[5px] font-bold text-xs text-slate-700 bg-slate-100 border transition-all cursor-pointer hover:bg-slate-200 disabled:opacity-50" style="border-color: var(--color-border, #e2e8f0);"><!> Refresh</button> <!></div></div> <!></section></div>`);function M(r,i){h(i,!0);let w=l(``),M=l(`advisory`),N=l(`self`),P=l(!1),F=l(!1),I=l(``),L=l(null),R=l(!1),z=l(m([])),B=l(!1),V=l(``),H=l(``),U=l(null),be={draft:`bg-slate-100 text-slate-700 border-slate-300`,pending:`bg-amber-100 text-amber-700 border-amber-300`,in_progress:`bg-blue-100 text-blue-700 border-blue-300`,completed:`bg-emerald-100 text-emerald-700 border-emerald-300`,verified:`bg-purple-100 text-purple-700 border-purple-300`,blocked:`bg-rose-100 text-rose-700 border-rose-300`};function xe(e){return be[e]||`bg-slate-100 text-slate-700 border-slate-300`}async function Se(){a(P,!0);try{let e=u(w)?`?project=${encodeURIComponent(u(w))}`:``,t=await O.get(`/api/v1/sdlc/config${e}`);a(w,t.project_path||u(w),!0),a(M,t.dor_mode||`advisory`,!0),a(N,t.review_mode||`self`,!0)}catch(e){k.fire({icon:`error`,title:`Failed to load SDLC config`,text:e.message})}finally{a(P,!1)}}async function Ce(){if(!u(w).trim()){k.fire({icon:`warning`,title:`Project path is required to set SDLC configuration.`});return}a(F,!0);try{let e=await O.patch(`/api/v1/sdlc/config`,{project_path:u(w).trim(),dor_mode:u(M),review_mode:u(N)});a(M,e.dor_mode||u(M),!0),a(N,e.review_mode||u(N),!0),k.fire({icon:`success`,title:`SDLC configuration saved`})}catch(e){k.fire({icon:`error`,title:`Failed to save SDLC config`,text:e.message})}finally{a(F,!1)}}async function we(){if(!u(I).trim()){k.fire({icon:`warning`,title:`Enter a task description to check readiness.`});return}a(R,!0),a(L,null);try{a(L,await O.post(`/api/v1/sdlc/check-readiness`,{task:u(I).trim(),project_path:u(w)||void 0}),!0)}catch(e){k.fire({icon:`error`,title:`Readiness check failed`,text:e.message})}finally{a(R,!1)}}async function W(){a(B,!0);try{let e=new URLSearchParams;u(V)&&e.set(`status`,u(V)),u(H)&&e.set(`project`,u(H).trim()),e.set(`limit`,`50`);let t=await O.get(`/api/v1/sdlc/tasks?${e.toString()}`);a(z,t.tasks||[],!0)}catch(e){k.fire({icon:`error`,title:`Failed to load tasks`,text:e.message})}finally{a(B,!1)}}function Te(e){a(U,u(U)===e?null:e,!0)}function Ee(e){return e===`high`?`bg-emerald-100 text-emerald-700 border-emerald-300`:e===`medium`?`bg-amber-100 text-amber-700 border-amber-300`:`bg-rose-100 text-rose-700 border-rose-300`}async function De(e,t){if(t&&t.stopPropagation(),await k.confirm({title:`Delete SDLC Task?`,text:`Are you sure you want to delete task "${e}"? This action cannot be undone and helps prevent stale task hallucinations.`,icon:`warning`,confirmButtonText:`Delete Task`,cancelButtonText:`Cancel`}))try{await O.delete(`/api/v1/sdlc/tasks/${encodeURIComponent(e)}`),k.fire({icon:`success`,title:`Task deleted successfully`}),await W()}catch(e){k.fire({icon:`error`,title:`Failed to delete task`,text:e.message})}}async function Oe(){let e=!!(u(V)||u(H)),t=e?`Are you sure you want to clear all tasks matching the current filter (Status: "${u(V)||`All`}", Project: "${u(H)||`All`}")?`:`Are you sure you want to clear ALL SDLC tasks across all sessions? This clears obsolete task history and prevents stale agent context.`;if(await k.confirm({title:e?`Clear Filtered Tasks?`:`Clear All SDLC Tasks?`,text:t,icon:`warning`,confirmButtonText:`Clear Tasks`,cancelButtonText:`Cancel`}))try{let t=new URLSearchParams;e?(u(V)&&t.set(`status`,u(V)),u(H)&&t.set(`project`,u(H).trim())):t.set(`all`,`true`);let n=await O.delete(`/api/v1/sdlc/tasks?${t.toString()}`);k.fire({icon:`success`,title:`Cleared ${n.deleted||0} task(s)`}),await W()}catch(e){k.fire({icon:`error`,title:`Failed to clear tasks`,text:e.message})}}te(()=>{Se(),W()});var ke=ye(),Ae=p(n(ke),2),je=p(n(Ae),2),Me=n(je),Ne=p(n(Me),2);v(Ne),e(Me);var Pe=p(Me,2),G=p(n(Pe),2),Fe=n(G);Fe.value=Fe.__value=`advisory`;var Ie=p(Fe);Ie.value=Ie.__value=`enforced`,e(G),T(G),e(Pe);var Le=p(Pe,2),K=p(n(Le),2),Re=n(K);Re.value=Re.__value=`self`;var ze=p(Re);ze.value=ze.__value=`cross-provider`,e(K),T(K),e(Le),e(je);var Be=p(je,2),q=n(Be),Ve=n(q),He=e=>{var t=A();D(e,t)};_(Ve,e=>{u(F)&&e(He)}),d(),e(q);var Ue=p(q,2);e(Be),e(Ae);var We=p(Ae,2),Ge=p(n(We),4);c(Ge);var Ke=p(Ge,2),J=n(Ke),qe=n(J),Je=e=>{var t=A();D(e,t)};_(qe,e=>{u(R)&&e(Je)}),d(),e(J),e(Ke);var Ye=p(Ke,2),Xe=t=>{var r=ae(),i=n(r),a=n(i),c=o(a,!0),l=p(a,2),d=o(l);e(i);var m=p(i,2),h=t=>{var n=re();x(n,20,()=>u(L).missing,e=>e,(e,t)=>{var n=ne(),r=o(n,!0);s(()=>f(r,t)),D(e,n)}),e(n),D(t,n)},g=e=>{var t=ie();D(e,t)};_(m,e=>{u(L).missing&&u(L).missing.length>0?e(h):u(L).ready&&e(g,1)}),e(r),s(e=>{b(a,1,`px-2.5 py-1 rounded-[5px] text-xs font-bold border ${u(L).ready?`bg-emerald-100 text-emerald-700 border-emerald-300`:`bg-rose-100 text-rose-700 border-rose-300`}`),f(c,u(L).ready?`✓ Ready`:`✗ Not Ready`),b(l,1,`px-2.5 py-1 rounded-[5px] text-xs font-bold border ${e??``}`),f(d,`Confidence: ${(u(L).confidence||`n/a`)??``}`)},[()=>Ee(u(L).confidence)]),D(t,r)};_(Ye,e=>{u(L)&&e(Xe)}),e(We);var Ze=p(We,2),Qe=n(Ze),$e=n(Qe),et=o($e),tt=p($e,2),Y=n(tt);v(Y);var X=p(Y,2),nt=n(X);nt.value=nt.__value=``;var rt=p(nt);rt.value=rt.__value=`draft`;var it=p(rt);it.value=it.__value=`pending`;var at=p(it);at.value=at.__value=`in_progress`;var Z=p(at);Z.value=Z.__value=`completed`;var Q=p(Z);Q.value=Q.__value=`verified`;var ot=p(Q);ot.value=ot.__value=`blocked`,e(X),T(X);var $=p(X,2),st=n($),ct=e=>{var t=oe();D(e,t)};_(st,e=>{u(B)&&e(ct)}),d(),e($);var lt=p($,2),ut=e=>{var n=se();s(()=>n.disabled=u(B)),t(`click`,n,Oe),D(e,n)};_(lt,e=>{u(z).length>0&&e(ut)}),e(tt),e(Qe);var dt=p(Qe,2),ft=e=>{var t=j();D(e,t)},pt=e=>{var t=ce();D(e,t)},mt=r=>{var i=ve();x(i,21,()=>u(z),e=>e.id,(r,i)=>{var a=_e(),c=n(a),l=n(c),d=n(l),m=n(d),h=o(m,!0),g=p(m,2),v=o(g,!0),y=p(g,2),S=o(y),C=p(y,2),w=e=>{var t=le(),n=o(t);s(()=>{b(t,1,`px-2 py-0.5 rounded-[5px] text-xs font-bold border ${u(i).dor_result.ready?`bg-emerald-100 text-emerald-700 border-emerald-300`:`bg-rose-100 text-rose-700 border-rose-300`}`),f(n,`DoR: ${u(i).dor_result.ready?`ready`:`not ready`}`)}),D(e,t)};_(C,e=>{u(i).dor_result&&u(i).dor_result.ready!==void 0&&e(w)});var T=p(C,2),te=e=>{var t=le(),n=o(t);s(()=>{b(t,1,`px-2 py-0.5 rounded-[5px] text-xs font-bold border ${u(i).slop_result.pass?`bg-emerald-100 text-emerald-700 border-emerald-300`:`bg-rose-100 text-rose-700 border-rose-300`}`),f(n,`Slop: ${u(i).slop_result.pass?`clean`:`findings`}`)}),D(e,t)};_(T,e=>{u(i).slop_result&&u(i).slop_result.pass!==void 0&&e(te)});var O=p(T,2),k=e=>{var t=ue(),n=o(t);s(()=>f(n,`${u(i).slop_cycles??``} cycle${u(i).slop_cycles===1?``:`s`}`)),D(e,t)};_(O,e=>{u(i).slop_cycles>0&&e(k)}),e(d);var A=p(d,2),re=o(A,!0);e(l);var ie=p(l,2),ae=n(ie),oe=o(ae,!0),se=p(ae,2),j=p(se,2),ce=o(j);e(ie),e(c);var ve=p(c,2),ye=r=>{var a=ge(),c=n(a),l=t=>{var r=de(),a=p(n(r)),c=o(a,!0);e(r),s(()=>f(c,u(i).project_path)),D(t,r)};_(c,e=>{u(i).project_path&&e(l)});var d=p(c,2),m=t=>{var r=fe(),a=p(n(r),2);x(a,20,()=>u(i).dor_result.missing,e=>e,(e,t)=>{var n=ne(),r=o(n,!0);s(()=>f(r,t)),D(e,n)}),e(a),e(r),D(t,r)};_(d,e=>{u(i).dor_result&&u(i).dor_result.missing&&u(i).dor_result.missing.length>0&&e(m)});var h=p(d,2),g=t=>{var r=pe(),a=p(n(r),2),c=o(a,!0);e(r),s(e=>f(c,e),[()=>JSON.stringify(u(i).slop_result,null,2)]),D(t,r)},v=E(()=>u(i).slop_result&&Object.keys(u(i).slop_result).length>0);_(h,e=>{u(v)&&e(g)});var y=p(h,2),b=t=>{var r=me(),a=p(n(r),2),c=o(a,!0);e(r),s(e=>f(c,e),[()=>JSON.stringify(u(i).evidence,null,2)]),D(t,r)},S=E(()=>u(i).evidence&&Object.keys(u(i).evidence).length>0);_(y,e=>{u(S)&&e(b)});var C=p(y,2),w=e=>{var t=he();D(e,t)},T=E(()=>(!u(i).dor_result||Object.keys(u(i).dor_result).length===0)&&(!u(i).slop_result||Object.keys(u(i).slop_result).length===0)&&(!u(i).evidence||Object.keys(u(i).evidence).length===0));_(C,e=>{u(T)&&e(w)});var ee=p(C,2),te=o(ee);e(a),t(`click`,te,e=>De(u(i).id,e)),D(r,a)};_(ve,e=>{u(U)===u(i).id&&e(ye)}),e(a),s(e=>{f(h,u(i).id),b(g,1,`px-2 py-0.5 rounded-[5px] text-xs font-bold border ${e??``}`),f(v,u(i).status),f(S,`review: ${(u(i).review_mode||`self`)??``}`),f(re,u(i).description),f(oe,u(i).updated_at||``),ee(j,`title`,u(U)===u(i).id?`Collapse details`:`Expand details`),b(ce,0,`w-4 h-4 transition-transform ${u(U)===u(i).id?`rotate-180`:``}`)},[()=>xe(u(i).status)]),t(`click`,l,()=>Te(u(i).id)),t(`click`,se,e=>De(u(i).id,e)),t(`click`,j,()=>Te(u(i).id)),D(r,a)}),e(i),D(r,i)};_(dt,e=>{u(B)&&u(z).length===0?e(ft):u(z).length===0?e(pt,1):e(mt,-1)}),e(Ze),e(ke),s(()=>{q.disabled=u(F),Ue.disabled=u(P),J.disabled=u(R),f(et,`Tasks (${u(z).length??``})`),$.disabled=u(B)}),S(Ne,()=>u(w),e=>a(w,e)),y(G,()=>u(M),e=>a(M,e)),y(K,()=>u(N),e=>a(N,e)),t(`click`,q,Ce),t(`click`,Ue,Se),S(Ge,()=>u(I),e=>a(I,e)),t(`click`,J,we),t(`keydown`,Y,e=>{e.key===`Enter`&&W()}),C(`blur`,Y,()=>W()),S(Y,()=>u(H),e=>a(H,e)),t(`change`,X,W),y(X,()=>u(V),e=>a(V,e)),t(`click`,$,W),D(r,ke),g()}w([`click`,`keydown`,`change`]);function N(e){M(e,{})}export{N as component};
@@ -0,0 +1 @@
1
+ import{t as e}from"../chunks/DK3Fl9T5.js";import"../chunks/PrdhfbrQ.js";import{c as t,d as n,l as r,u as i}from"../chunks/Dek69VGa.js";import"../chunks/C3-t9btS.js";import{c as a,r as o}from"../chunks/Cg3pm-K7.js";function s(){return window.location.origin}var c=`https://sveltekit-redirect.invalid`;function l(e){let t=s();try{return!o(e,t??c)}catch{return!0}}var u=new Set([`javascript:`,`data:`]);function d(e){try{return u.has(new URL(e,c).protocol)}catch{return!1}}function f(e,a){if(!l(e))return;let s=a?.external;if(s||r({location:JSON.stringify(e)}),s===!0){d(e)&&t({location:JSON.stringify(e)});return}if(Array.isArray(s)){s.some(t=>o(e,t))||i({location:JSON.stringify(e)});return}n()}new TextEncoder;function p(e,t,n){let r=t.toString();throw f(r,n),new a(e,r)}var m=e({load:()=>h});function h(){p(307,`/dashboard`)}function g(e){}export{g as component,m as universal};
@@ -1 +1 @@
1
- import{$ as e,A as t,B as n,E as r,G as i,H as a,I as o,K as s,M as c,S as l,U as u,W as d,X as f,Y as p,_ as m,a as h,f as g,g as _,h as v,k as y,l as b,o as x,q as S,s as C,u as w,v as T,w as E}from"../chunks/Ae0obco1.js";import{t as D}from"../chunks/7LmsTWIo.js";import"../chunks/BUgOhUo6.js";import{t as O}from"../chunks/CP4ze5kR.js";var k=r(`<div class="p-4 rounded-2xl border border-rose-200 bg-rose-50 text-rose-800 text-xs font-semibold"> </div>`),A=r(`<div class="flex items-center justify-center py-16 text-slate-600 text-sm font-semibold"><div class="flex items-center gap-3"><svg class="animate-spin w-5 h-5 text-purple-600" fill="none" viewBox="0 0 24 24"><circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle><path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8v8H4z"></path></svg> <span>Loading Ninja roster...</span></div></div>`),ee=r(`<span class="px-2 py-0.5 rounded-full text-[10px] font-mono font-bold bg-emerald-50 text-emerald-700 border border-emerald-200">assigned</span>`),te=r(`<span class="px-2 py-0.5 rounded-full text-[10px] font-mono font-bold bg-slate-100 text-slate-500 border border-slate-200">inherit</span>`),ne=r(`<option> </option>`),re=r(`<select class="w-full p-2 rounded-xl border border-slate-200 bg-white/70 text-xs font-mono font-bold text-slate-700 cursor-pointer focus:ring-purple-500 focus:border-purple-400"><option>⤺ Inherit (host client default)</option><!></select>`),ie=r(`<p class="p-2 rounded-xl border border-dashed border-slate-200 bg-white/50 text-[11px] font-semibold text-slate-500"> </p>`),ae=r(`<span class="px-1.5 py-0.5 rounded text-[9px] font-mono font-bold bg-purple-50 text-purple-700 border border-purple-200 shrink-0">active</span>`),oe=r(`<label class="flex items-center justify-between p-2 rounded-xl border border-slate-200 bg-white/70 hover:bg-purple-50/50 transition-colors cursor-pointer text-xs"><div class="flex items-center gap-2 min-w-0 pr-2"><span> </span> <!></div> <input type="checkbox" class="rounded border-slate-300 text-purple-600 focus:ring-purple-500 w-4 h-4 cursor-pointer shrink-0 ml-2"/></label>`),se=r(`<div class="glass-card-3d tilt-3d flex flex-col justify-between p-6 rounded-3xl border"><div><div class="flex items-start justify-between gap-4 mb-4"><div class="flex items-center gap-3"><div class="w-12 h-12 rounded-2xl bg-purple-50 border border-purple-200 flex items-center justify-center text-purple-700 shadow-sm shrink-0"><svg class="w-6 h-6" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"></path></svg></div> <div><h3 class="text-base font-black text-slate-900 tracking-tight"> </h3> <span class="inline-block text-[11px] font-bold text-purple-700 uppercase tracking-wider"> </span></div></div> <span class="px-2.5 py-0.5 rounded-full text-[10px] font-mono font-bold bg-slate-100 text-slate-700 border border-slate-200 shrink-0"> </span></div> <p class="text-xs font-semibold text-slate-700 mb-4 leading-relaxed"> </p> <div class="space-y-2 mb-6"><div class="flex items-center justify-between text-xs font-bold text-slate-800"><span>Model Assignment</span> <!></div> <!></div> <div class="space-y-3 pt-4 border-t border-slate-200"><div class="flex items-center justify-between text-xs font-bold text-slate-800"><span>Embedded Skill References</span> <span class="text-slate-500 font-mono text-[11px]"> </span></div> <div class="space-y-1.5 max-h-56 overflow-y-auto pr-1"></div></div></div></div>`),j=r(`<div class="scene-3d grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6"></div>`),M=r(`<div class="space-y-8 max-w-7xl mx-auto"><div class="rise-3d relative overflow-hidden rounded-3xl p-8 border shadow-xl transition-all duration-300" style="background: linear-gradient(135deg, rgba(255, 255, 255, 0.96) 0%, rgba(255, 255, 255, 0.82) 100%), var(--color-primary-glow); border-color: var(--color-border); box-shadow: var(--shadow-3d);"><div class="relative z-10 flex flex-col md:flex-row md:items-center justify-between gap-6"><div class="space-y-2"><div class="inline-flex items-center gap-2 px-3 py-1 rounded-full text-xs font-bold border" style="background-color: var(--color-primary-glow); color: var(--color-primary); border-color: var(--color-primary);"><svg class="w-3.5 h-3.5" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2 2 0 11-4 0 2 2 0 014 0zM7 10a2 2 0 11-4 0 2 2 0 014 0z"></path></svg> Official Subagent Roster</div> <h2 class="text-2xl lg:text-3xl font-black text-slate-900 tracking-tight">Ninja Subagents (7 Ranks)</h2> <p class="text-sm font-semibold text-slate-700 max-w-2xl leading-relaxed">Autonomous specialized agents orchestrating tasks, audits, research, and frontend builds. Each rank embeds specialized SQLite skill references.</p></div> <div class="flex flex-wrap items-center gap-3 shrink-0"><div class="glass-card-3d px-4 py-3 rounded-2xl border text-center"><div class="text-xs font-bold text-slate-600">Total Ranks</div> <div class="text-xl font-black text-emerald-600">7 Active</div></div> <div class="glass-card-3d px-4 py-3 rounded-2xl border text-center"><div class="text-xs font-bold text-slate-600">Skills Bound</div> <div class="text-xl font-black text-purple-600"> </div></div></div></div></div> <!> <!></div>`);function N(r,y){f(y,!0);let N=s(d([])),P=s(d([])),F=s(d([])),I=s(!0),L=s(``),R={sannin:`M11.049 2.927c.3-.921 1.603-.921 1.902 0l1.519 4.674a1 1 0 00.95.69h4.915c.969 0 1.371 1.24.588 1.81l-3.976 2.888a1 1 0 00-.363 1.118l1.518 4.674c.3.922-.755 1.688-1.538 1.118l-3.976-2.888a1 1 0 00-1.176 0l-3.976 2.888c-.783.57-1.838-.197-1.538-1.118l1.518-4.674a1 1 0 00-.363-1.118l-3.976-2.888c-.784-.57-.38-1.81.588-1.81h4.914a1 1 0 00.951-.69l1.519-4.674z`,kage:`M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z`,jonin:`M7 21a4 4 0 01-4-4V5a2 2 0 012-2h4a2 2 0 012 2v12a4 4 0 01-4 4zm0 0h12a2 2 0 002-2v-4a2 2 0 00-2-2h-2.343M11 7.343l1.657-1.657a2 2 0 012.828 0l2.829 2.829a2 2 0 010 2.828l-8.486 8.485M7 17h.01`,anbu:`M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z`,chunin:`M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9`,genin:`M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z`,"tokubetsu-jonin":`M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z`},z=[`sannin-skill`,`genin-skill`,`kage-skill`,`chunin-skill`,`jonin-skill`,`anbu-skill`,`tokubetsu-jonin-skill`,`konoha`,`antislop`,`i-have-adhd`];function B(e){let t=e.skills||[],n=new Set(t),r=[...t];return z.forEach(e=>{n.has(e)||r.push(e)}),r}async function V(){i(I,!0),i(L,``);try{i(N,await D.get(`/api/v1/agents`),!0);let e=await D.get(`/api/v1/skills?limit=1000`),t=new Set(z);(e||[]).forEach(e=>{e.name&&t.add(e.name),e.skill_name&&t.add(e.skill_name)}),(c(N)||[]).forEach(e=>{(e.skills||[]).forEach(e=>t.add(e))}),i(P,Array.from(t).sort(),!0);try{let e=await D.get(`/api/v1/bridges/models`);i(F,e.models||[],!0)}catch{i(F,[],!0)}}catch(e){i(L,e.message,!0)}finally{i(I,!1)}}async function H(e,t,n){let r=!n;try{await D.patch(`/api/v1/agents/`+encodeURIComponent(e.name)+`/skills/`+encodeURIComponent(t),{embedded:r}),r?(e.skills||=[],e.skills.includes(t)||e.skills.push(t)):e.skills&&=e.skills.filter(e=>e!==t),i(N,[...c(N)],!0)}catch(e){await O.fire({title:`Toggle Failed`,text:e.message,icon:`error`})}}async function ce(e,t){let n=t===``?null:t;try{await D.patch(`/api/v1/agents/`+encodeURIComponent(e.name)+`/model`,{model:n}),n?e.model=n:delete e.model,i(N,[...c(N)],!0)}catch(e){await O.fire({title:`Model Assignment Failed`,text:e.message,icon:`error`})}}T(V);var U=M(),W=n(U),G=n(W),K=u(n(G),2),q=u(n(K),2),J=u(n(q),2),Y=a(J);e(q),e(K),e(G),e(W);var X=u(W,2),Z=e=>{var t=k(),n=a(t,!0);o(()=>l(n,c(L))),E(e,t)};m(X,e=>{c(L)&&e(Z)});var Q=u(X,2),$=e=>{var t=A();E(e,t)},le=r=>{var i=j();v(i,21,()=>c(N),_,(r,i)=>{var s=se(),d=n(s),f=n(d),p=n(f),y=n(p),T=n(y),D=a(T);e(y);var O=u(y,2),k=n(O),A=a(k),j=u(k,2),M=a(j,!0);e(O),e(p);var N=u(p,2),P=a(N);e(f);var I=u(f,2),L=a(I,!0),z=u(I,2),V=n(z),U=u(n(V),2),W=e=>{var t=ee();E(e,t)},G=e=>{var t=te();E(e,t)};m(U,e=>{c(i).model?e(W):e(G,-1)}),e(V);var K=u(V,2),q=r=>{var s=re(),d=n(s);d.value=d.__value=``;var f=u(d);v(f,17,()=>c(F),_,(e,t)=>{var n=ne(),r=a(n,!0),i={};o(()=>{l(r,c(t).id),i!==(i=c(t).id)&&(n.value=(n.__value=i)??``)}),E(e,n)}),e(s);var p;b(s),o(()=>{p!==(p=c(i).model||``)&&(s.value=(s.__value=p)??``,w(s,p))}),t(`change`,s,e=>ce(c(i),e.currentTarget.value)),E(r,s)},J=e=>{var t=ie(),n=a(t);o(()=>l(n,`${(c(i).model||`inherit`)??``} — no bridge-served models available. Start a bridge in the Bridges page to pick models.`)),E(e,t)};m(K,e=>{c(F).length>0?e(q):e(J,-1)}),e(z);var Y=u(z,2),X=n(Y),Z=u(n(X),2),Q=a(Z);e(X);var $=u(X,2);v($,21,()=>B(c(i)),_,(r,s)=>{let d=S(()=>c(i).skills&&c(i).skills.includes(c(s)));var f=oe(),p=n(f),_=n(p),v=a(_,!0),y=u(_,2),b=e=>{var t=ae();E(e,t)};m(y,e=>{c(d)&&e(b)}),e(p);var w=u(p,2);h(w),e(f),o(()=>{g(_,1,`font-mono text-xs font-bold ${c(d)?`text-slate-900`:`text-slate-400`} truncate`),x(_,`title`,c(s)),l(v,c(s)),C(w,c(d))}),t(`change`,w,()=>H(c(i),c(s),c(d))),E(r,f)}),e($),e(Y),e(d),e(s),o(()=>{x(D,`d`,R[c(i).name]||`M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z`),l(A,`@${c(i).name??``}`),l(M,c(i).title||`Ninja Subagent`),l(P,`${(c(i).skills?c(i).skills.length:0)??``} skills`),l(L,c(i).description),l(Q,`${(c(i).skills?c(i).skills.length:0)??``} active`)}),E(r,s)}),e(i),E(r,i)};m(Q,e=>{c(I)?e($):e(le,-1)}),e(U),o(()=>l(Y,`${c(P).length??``} Indexed`)),E(r,U),p()}y([`change`]);function P(e){N(e,{})}export{P as component};
1
+ import{$ as e,A as t,B as n,E as r,G as i,H as a,I as o,K as s,M as c,S as l,U as u,W as d,X as f,Y as p,_ as m,a as h,f as g,g as _,h as v,k as y,l as b,o as x,q as S,s as C,u as w,v as T,w as E}from"../chunks/PrdhfbrQ.js";import{t as D}from"../chunks/7LmsTWIo.js";import"../chunks/C3-t9btS.js";import{t as O}from"../chunks/Dzm74gVd.js";var k=r(`<div class="p-4 rounded-2xl border border-rose-200 bg-rose-50 text-rose-800 text-xs font-semibold"> </div>`),A=r(`<div class="flex items-center justify-center py-16 text-slate-600 text-sm font-semibold"><div class="flex items-center gap-3"><svg class="animate-spin w-5 h-5 text-purple-600" fill="none" viewBox="0 0 24 24"><circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle><path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8v8H4z"></path></svg> <span>Loading Ninja roster...</span></div></div>`),ee=r(`<span class="px-2 py-0.5 rounded-full text-[10px] font-mono font-bold bg-emerald-50 text-emerald-700 border border-emerald-200">assigned</span>`),te=r(`<span class="px-2 py-0.5 rounded-full text-[10px] font-mono font-bold bg-slate-100 text-slate-500 border border-slate-200">inherit</span>`),ne=r(`<option> </option>`),re=r(`<select class="w-full p-2 rounded-xl border border-slate-200 bg-white/70 text-xs font-mono font-bold text-slate-700 cursor-pointer focus:ring-purple-500 focus:border-purple-400"><option>⤺ Inherit (host client default)</option><!></select>`),ie=r(`<p class="p-2 rounded-xl border border-dashed border-slate-200 bg-white/50 text-[11px] font-semibold text-slate-500"> </p>`),ae=r(`<span class="px-1.5 py-0.5 rounded text-[9px] font-mono font-bold bg-purple-50 text-purple-700 border border-purple-200 shrink-0">active</span>`),oe=r(`<label class="flex items-center justify-between p-2 rounded-xl border border-slate-200 bg-white/70 hover:bg-purple-50/50 transition-colors cursor-pointer text-xs"><div class="flex items-center gap-2 min-w-0 pr-2"><span> </span> <!></div> <input type="checkbox" class="rounded border-slate-300 text-purple-600 focus:ring-purple-500 w-4 h-4 cursor-pointer shrink-0 ml-2"/></label>`),se=r(`<div class="glass-card-3d tilt-3d flex flex-col justify-between p-6 rounded-3xl border"><div><div class="flex items-start justify-between gap-4 mb-4"><div class="flex items-center gap-3"><div class="w-12 h-12 rounded-2xl bg-purple-50 border border-purple-200 flex items-center justify-center text-purple-700 shadow-sm shrink-0"><svg class="w-6 h-6" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"></path></svg></div> <div><h3 class="text-base font-black text-slate-900 tracking-tight"> </h3> <span class="inline-block text-[11px] font-bold text-purple-700 uppercase tracking-wider"> </span></div></div> <span class="px-2.5 py-0.5 rounded-full text-[10px] font-mono font-bold bg-slate-100 text-slate-700 border border-slate-200 shrink-0"> </span></div> <p class="text-xs font-semibold text-slate-700 mb-4 leading-relaxed"> </p> <div class="space-y-2 mb-6"><div class="flex items-center justify-between text-xs font-bold text-slate-800"><span>Model Assignment</span> <!></div> <!></div> <div class="space-y-3 pt-4 border-t border-slate-200"><div class="flex items-center justify-between text-xs font-bold text-slate-800"><span>Embedded Skill References</span> <span class="text-slate-500 font-mono text-[11px]"> </span></div> <div class="space-y-1.5 max-h-56 overflow-y-auto pr-1"></div></div></div></div>`),j=r(`<div class="scene-3d grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6"></div>`),M=r(`<div class="space-y-8 max-w-7xl mx-auto"><div class="rise-3d relative overflow-hidden rounded-3xl p-8 border shadow-xl transition-all duration-300" style="background: linear-gradient(135deg, rgba(255, 255, 255, 0.96) 0%, rgba(255, 255, 255, 0.82) 100%), var(--color-primary-glow); border-color: var(--color-border); box-shadow: var(--shadow-3d);"><div class="relative z-10 flex flex-col md:flex-row md:items-center justify-between gap-6"><div class="space-y-2"><div class="inline-flex items-center gap-2 px-3 py-1 rounded-full text-xs font-bold border" style="background-color: var(--color-primary-glow); color: var(--color-primary); border-color: var(--color-primary);"><svg class="w-3.5 h-3.5" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2 2 0 11-4 0 2 2 0 014 0zM7 10a2 2 0 11-4 0 2 2 0 014 0z"></path></svg> Official Subagent Roster</div> <h2 class="text-2xl lg:text-3xl font-black text-slate-900 tracking-tight">Ninja Subagents (7 Ranks)</h2> <p class="text-sm font-semibold text-slate-700 max-w-2xl leading-relaxed">Autonomous specialized agents orchestrating tasks, audits, research, and frontend builds. Each rank embeds specialized SQLite skill references.</p></div> <div class="flex flex-wrap items-center gap-3 shrink-0"><div class="glass-card-3d px-4 py-3 rounded-2xl border text-center"><div class="text-xs font-bold text-slate-600">Total Ranks</div> <div class="text-xl font-black text-emerald-600">7 Active</div></div> <div class="glass-card-3d px-4 py-3 rounded-2xl border text-center"><div class="text-xs font-bold text-slate-600">Skills Bound</div> <div class="text-xl font-black text-purple-600"> </div></div></div></div></div> <!> <!></div>`);function N(r,y){f(y,!0);let N=s(d([])),P=s(d([])),F=s(d([])),I=s(!0),L=s(``),R={sannin:`M11.049 2.927c.3-.921 1.603-.921 1.902 0l1.519 4.674a1 1 0 00.95.69h4.915c.969 0 1.371 1.24.588 1.81l-3.976 2.888a1 1 0 00-.363 1.118l1.518 4.674c.3.922-.755 1.688-1.538 1.118l-3.976-2.888a1 1 0 00-1.176 0l-3.976 2.888c-.783.57-1.838-.197-1.538-1.118l1.518-4.674a1 1 0 00-.363-1.118l-3.976-2.888c-.784-.57-.38-1.81.588-1.81h4.914a1 1 0 00.951-.69l1.519-4.674z`,kage:`M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z`,jonin:`M7 21a4 4 0 01-4-4V5a2 2 0 012-2h4a2 2 0 012 2v12a4 4 0 01-4 4zm0 0h12a2 2 0 002-2v-4a2 2 0 00-2-2h-2.343M11 7.343l1.657-1.657a2 2 0 012.828 0l2.829 2.829a2 2 0 010 2.828l-8.486 8.485M7 17h.01`,anbu:`M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z`,chunin:`M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9`,genin:`M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z`,"tokubetsu-jonin":`M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z`},z=[`sannin-skill`,`genin-skill`,`kage-skill`,`chunin-skill`,`jonin-skill`,`anbu-skill`,`tokubetsu-jonin-skill`,`konoha`,`antislop`,`i-have-adhd`];function B(e){let t=e.skills||[],n=new Set(t),r=[...t];return z.forEach(e=>{n.has(e)||r.push(e)}),r}async function V(){i(I,!0),i(L,``);try{i(N,await D.get(`/api/v1/agents`),!0);let e=await D.get(`/api/v1/skills?limit=1000`),t=new Set(z);(e||[]).forEach(e=>{e.name&&t.add(e.name),e.skill_name&&t.add(e.skill_name)}),(c(N)||[]).forEach(e=>{(e.skills||[]).forEach(e=>t.add(e))}),i(P,Array.from(t).sort(),!0);try{let e=await D.get(`/api/v1/bridges/models`);i(F,e.models||[],!0)}catch{i(F,[],!0)}}catch(e){i(L,e.message,!0)}finally{i(I,!1)}}async function H(e,t,n){let r=!n;try{await D.patch(`/api/v1/agents/`+encodeURIComponent(e.name)+`/skills/`+encodeURIComponent(t),{embedded:r}),r?(e.skills||=[],e.skills.includes(t)||e.skills.push(t)):e.skills&&=e.skills.filter(e=>e!==t),i(N,[...c(N)],!0)}catch(e){await O.fire({title:`Toggle Failed`,text:e.message,icon:`error`})}}async function ce(e,t){let n=t===``?null:t;try{await D.patch(`/api/v1/agents/`+encodeURIComponent(e.name)+`/model`,{model:n}),n?e.model=n:delete e.model,i(N,[...c(N)],!0)}catch(e){await O.fire({title:`Model Assignment Failed`,text:e.message,icon:`error`})}}T(V);var U=M(),W=n(U),G=n(W),K=u(n(G),2),q=u(n(K),2),J=u(n(q),2),Y=a(J);e(q),e(K),e(G),e(W);var X=u(W,2),Z=e=>{var t=k(),n=a(t,!0);o(()=>l(n,c(L))),E(e,t)};m(X,e=>{c(L)&&e(Z)});var Q=u(X,2),$=e=>{var t=A();E(e,t)},le=r=>{var i=j();v(i,21,()=>c(N),_,(r,i)=>{var s=se(),d=n(s),f=n(d),p=n(f),y=n(p),T=n(y),D=a(T);e(y);var O=u(y,2),k=n(O),A=a(k),j=u(k,2),M=a(j,!0);e(O),e(p);var N=u(p,2),P=a(N);e(f);var I=u(f,2),L=a(I,!0),z=u(I,2),V=n(z),U=u(n(V),2),W=e=>{var t=ee();E(e,t)},G=e=>{var t=te();E(e,t)};m(U,e=>{c(i).model?e(W):e(G,-1)}),e(V);var K=u(V,2),q=r=>{var s=re(),d=n(s);d.value=d.__value=``;var f=u(d);v(f,17,()=>c(F),_,(e,t)=>{var n=ne(),r=a(n,!0),i={};o(()=>{l(r,c(t).id),i!==(i=c(t).id)&&(n.value=(n.__value=i)??``)}),E(e,n)}),e(s);var p;b(s),o(()=>{p!==(p=c(i).model||``)&&(s.value=(s.__value=p)??``,w(s,p))}),t(`change`,s,e=>ce(c(i),e.currentTarget.value)),E(r,s)},J=e=>{var t=ie(),n=a(t);o(()=>l(n,`${(c(i).model||`inherit`)??``} — no bridge-served models available. Start a bridge in the Bridges page to pick models.`)),E(e,t)};m(K,e=>{c(F).length>0?e(q):e(J,-1)}),e(z);var Y=u(z,2),X=n(Y),Z=u(n(X),2),Q=a(Z);e(X);var $=u(X,2);v($,21,()=>B(c(i)),_,(r,s)=>{let d=S(()=>c(i).skills&&c(i).skills.includes(c(s)));var f=oe(),p=n(f),_=n(p),v=a(_,!0),y=u(_,2),b=e=>{var t=ae();E(e,t)};m(y,e=>{c(d)&&e(b)}),e(p);var w=u(p,2);h(w),e(f),o(()=>{g(_,1,`font-mono text-xs font-bold ${c(d)?`text-slate-900`:`text-slate-400`} truncate`),x(_,`title`,c(s)),l(v,c(s)),C(w,c(d))}),t(`change`,w,()=>H(c(i),c(s),c(d))),E(r,f)}),e($),e(Y),e(d),e(s),o(()=>{x(D,`d`,R[c(i).name]||`M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z`),l(A,`@${c(i).name??``}`),l(M,c(i).title||`Ninja Subagent`),l(P,`${(c(i).skills?c(i).skills.length:0)??``} skills`),l(L,c(i).description),l(Q,`${(c(i).skills?c(i).skills.length:0)??``} active`)}),E(r,s)}),e(i),E(r,i)};m(Q,e=>{c(I)?e($):e(le,-1)}),e(U),o(()=>l(Y,`${c(P).length??``} Indexed`)),E(r,U),p()}y([`change`]);function P(e){N(e,{})}export{P as component};
@@ -1 +1 @@
1
- import{$ as e,A as t,B as n,E as r,G as i,H as a,I as o,K as s,M as c,Q as l,S as u,U as d,V as f,W as p,X as m,Y as h,_ as g,a as _,c as v,f as y,g as b,h as x,i as S,j as C,k as w,l as T,q as E,v as D,w as O,z as k}from"../chunks/Ae0obco1.js";import{t as A}from"../chunks/7LmsTWIo.js";import{t as j}from"../chunks/tFx9Vkzn.js";import"../chunks/BUgOhUo6.js";import{t as M}from"../chunks/CP4ze5kR.js";var N=r(`<span class="relative flex h-3.5 w-3.5"><span class="animate-ping absolute inline-flex h-full w-full rounded-full bg-emerald-400 opacity-75"></span> <span class="relative inline-flex rounded-full h-3.5 w-3.5 bg-emerald-500"></span></span> <div><div class="flex items-center gap-2"><span class="text-xs font-black text-emerald-800 uppercase tracking-wide">Proxy Gateway Online</span> <span class="px-2 py-0.5 rounded text-[10px] font-mono font-bold bg-emerald-100 text-emerald-700 border border-emerald-300"> </span></div> <p class="text-xs font-semibold text-slate-600 mt-0.5"> </p></div>`,1),P=r(`<span class="relative inline-flex rounded-full h-3.5 w-3.5 bg-amber-500"></span> <div><div class="flex items-center gap-2"><span class="text-xs font-black text-amber-800 uppercase tracking-wide">Proxy Gateway Stopped</span> <span class="px-2 py-0.5 rounded text-[10px] font-mono font-bold bg-amber-100 text-amber-800 border border-amber-300"> </span></div> <p class="text-xs font-semibold text-slate-600 mt-0.5"> </p></div>`,1),F=r(`<button type="button" class="px-3.5 py-1.5 rounded-xl text-xs font-bold bg-amber-50 hover:bg-amber-100 text-amber-700 border border-amber-300 transition-all cursor-pointer disabled:opacity-50" title="Restart the Gateway service">Restart</button> <button type="button" class="px-3.5 py-1.5 rounded-xl text-xs font-bold bg-rose-50 hover:bg-rose-100 text-rose-700 border border-rose-300 transition-all cursor-pointer disabled:opacity-50" title="Stop the Gateway service">Stop</button>`,1),I=r(`<button type="button" class="px-4 py-1.5 rounded-xl text-xs font-bold bg-emerald-600 hover:bg-emerald-700 text-white shadow-sm transition-all cursor-pointer disabled:opacity-50" title="Start the Gateway service">Start Gateway</button>`),ee=r(`<div class="glass-card-3d p-5 rounded-2xl border flex flex-col sm:flex-row sm:items-center justify-between gap-4"><div class="flex items-center gap-3.5"><!></div> <div class="flex items-center gap-2 shrink-0"><!> <div class="ml-2 px-3 py-1.5 rounded-xl text-xs font-mono font-bold bg-purple-50 text-purple-700 border border-purple-200"> </div></div></div>`),te=r(`<div class="p-4 rounded-2xl bg-rose-50 border border-rose-200 text-rose-700 text-xs font-bold flex items-center justify-between"><span> </span> <button type="button" class="underline hover:text-rose-900 cursor-pointer">Retry</button></div>`),ne=r(`<div class="p-12 text-center text-slate-500 font-bold text-xs"><div class="animate-spin w-6 h-6 border-2 border-purple-600 border-t-transparent rounded-full mx-auto mb-2"></div> Loading configured bridges...</div>`),re=r(`<div class="glass-card-3d p-12 text-center rounded-3xl border"><div class="w-12 h-12 rounded-2xl bg-purple-50 border border-purple-200 text-purple-600 flex items-center justify-center mx-auto mb-3"><svg class="w-6 h-6" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 9l4-4 4 4m0 6l-4 4-4-4"></path></svg></div> <p class="text-sm font-bold text-slate-800 mb-4">No LLM proxy bridges configured yet.</p> <button type="button" class="btn-3d inline-flex items-center gap-2 px-4 py-2 rounded-xl text-xs font-bold bg-white text-slate-800 border border-slate-300 hover:bg-slate-50 cursor-pointer"><svg class="w-3.5 h-3.5" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2.5" d="M12 4v16m8-8H4"></path></svg> <span>Add your first bridge</span></button></div>`),ie=r(`<span class="inline-flex items-center gap-1.5 px-2.5 py-1 rounded-md text-[10px] font-bold bg-emerald-50 text-emerald-700 border border-emerald-200"><span class="h-1.5 w-1.5 rounded-full bg-emerald-500"></span> </span>`),ae=r(`<span class="inline-flex items-center gap-1.5 px-2.5 py-1 rounded-md text-[10px] font-bold bg-slate-100 text-slate-600 border border-slate-200"><span class="h-1.5 w-1.5 rounded-full bg-slate-400"></span> Inactive</span>`),oe=r(`<tr class="hover:bg-purple-50/40 transition-colors"><td class="py-4 px-6 font-black text-slate-900 font-mono"> </td><td class="py-4 px-6"><span class="inline-flex items-center px-2 py-0.5 rounded text-[10px] font-mono font-bold bg-slate-100 text-slate-800 border border-slate-300"> </span></td><td class="py-4 px-6"><span class="inline-flex items-center px-2 py-0.5 rounded text-[10px] font-mono font-bold bg-blue-50 text-blue-700 border border-blue-200 uppercase"> </span></td><td class="py-4 px-6 text-slate-700 font-mono text-[11px]"> </td><td class="py-4 px-6"><!></td><td class="py-4 px-6"><div class="flex items-center gap-2"><button type="button" title="Toggle active status"><span></span></button> <span> </span></div></td><td class="py-4 px-6 text-right"><button type="button" class="p-1.5 rounded-lg text-slate-400 hover:text-rose-600 hover:bg-rose-50 transition-colors cursor-pointer" title="Delete bridge"><svg class="w-4 h-4" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"></path></svg></button></td></tr>`),se=r(`<div class="glass-card-3d rounded-3xl border overflow-hidden"><div class="overflow-x-auto"><table class="w-full text-left text-xs"><thead class="border-b border-slate-200 bg-slate-50/80 text-[11px] font-extrabold text-slate-700 uppercase tracking-wider"><tr><th class="py-3.5 px-6">Bridge Name</th><th class="py-3.5 px-6">Port</th><th class="py-3.5 px-6">Provider</th><th class="py-3.5 px-6">Target URL</th><th class="py-3.5 px-6">Runtime Port</th><th class="py-3.5 px-6">Configured</th><th class="py-3.5 px-6 text-right">Actions</th></tr></thead><tbody class="divide-y divide-slate-100"></tbody></table></div></div>`),ce=r(`<div role="presentation" class="fixed inset-0 z-50 flex items-center justify-center p-4 bg-slate-900/40 backdrop-blur-md"><div class="glass-frost-strong relative w-full max-w-lg max-h-[90vh] overflow-y-auto rounded-3xl p-6 sm:p-8 border shadow-2xl space-y-6" style="background: var(--glass-card); border-color: var(--color-border); box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.18);"><div class="flex items-center justify-between"><h3 class="text-lg font-black text-slate-900">Configure New Bridge</h3> <button type="button" class="p-1 rounded-lg text-slate-400 hover:text-slate-700 cursor-pointer" aria-label="Close"><svg class="w-5 h-5" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path></svg></button></div> <form class="space-y-4"><div class="grid grid-cols-2 gap-4"><div><label for="bridge-name" class="block text-xs font-bold text-slate-800 mb-1">Bridge Name</label> <input id="bridge-name" type="text" placeholder="e.g. ollama-local" required="" class="w-full px-3 py-2 rounded-xl text-xs font-semibold text-slate-900 border border-slate-300 bg-white focus:ring-2 focus:ring-purple-500"/></div> <div><label for="bridge-port" class="block text-xs font-bold text-slate-800 mb-1">Port</label> <input id="bridge-port" type="number" placeholder="9001" required="" class="w-full px-3 py-2 rounded-xl text-xs font-semibold text-slate-900 border border-slate-300 bg-white focus:ring-2 focus:ring-purple-500"/></div></div> <div class="grid grid-cols-2 gap-4"><div><label for="bridge-provider" class="block text-xs font-bold text-slate-800 mb-1">Provider Type</label> <select id="bridge-provider" class="w-full px-3 py-2 rounded-xl text-xs font-semibold text-slate-900 border border-slate-300 bg-white focus:ring-2 focus:ring-purple-500"><option>OpenAI Compatible</option><option>Anthropic</option><option>Google Gemini</option><option>Ollama</option><option>vLLM</option></select></div> <div><label for="bridge-model" class="block text-xs font-bold text-slate-800 mb-1">Default Model (Optional)</label> <input id="bridge-model" type="text" placeholder="e.g. qwen2.5-coder:7b" class="w-full px-3 py-2 rounded-xl text-xs font-semibold text-slate-900 border border-slate-300 bg-white focus:ring-2 focus:ring-purple-500"/></div></div> <div><label for="bridge-target" class="block text-xs font-bold text-slate-800 mb-1">Upstream Target URL (Optional)</label> <input id="bridge-target" type="text" placeholder="http://127.0.0.1:11434/v1" class="w-full px-3 py-2 rounded-xl text-xs font-semibold text-slate-900 border border-slate-300 bg-white focus:ring-2 focus:ring-purple-500"/></div> <div class="flex items-center justify-end gap-3 pt-4 border-t border-slate-200"><button type="button" class="btn-3d px-4 py-2 rounded-xl text-xs font-bold text-slate-700 bg-slate-100 hover:bg-slate-200 border border-slate-300 cursor-pointer">Cancel</button> <button type="submit" class="btn-3d px-5 py-2 rounded-xl text-xs font-bold text-white shadow-md cursor-pointer" style="background-color: var(--color-primary, #7c3aed);">Create Bridge</button></div></form></div></div>`),le=r(`<button type="button"> </button>`),ue=r(`<div class="flex items-center gap-1.5 shrink-0 overflow-x-auto w-full sm:w-auto"><button type="button"> </button> <!></div>`),de=r(`<div class="p-12 text-center text-slate-500"><div class="animate-spin w-6 h-6 border-2 border-purple-600 border-t-transparent rounded-full mx-auto mb-3"></div> <p class="text-xs font-bold">Querying models from active bridge endpoints...</p></div>`),fe=r(`<div class="p-12 text-center text-slate-500"><p class="text-sm font-bold text-slate-700">No models found</p> <p class="text-xs mt-1">Make sure target bridges are running and have valid endpoint URLs configured.</p></div>`),pe=r(`<tr class="hover:bg-purple-50/30 transition-colors"><td class="py-2.5 px-4 font-bold text-purple-700"> </td><td class="py-2.5 px-4 text-slate-800"> </td><td class="py-2.5 px-4"><span class="inline-flex items-center px-2 py-0.5 rounded text-[10px] font-bold bg-blue-50 text-blue-700 border border-blue-200"> </span></td><td class="py-2.5 px-4 text-slate-600 font-sans text-xs"> </td><td class="py-2.5 px-4 text-right"><button type="button" class="px-2.5 py-1 rounded-md text-[10px] font-bold font-sans bg-slate-100 hover:bg-purple-100 text-slate-700 hover:text-purple-700 border border-slate-200 transition-colors cursor-pointer" title="Copy alias ID to clipboard">Copy ID</button></td></tr>`),me=r(`<table class="w-full text-left text-xs"><thead class="border-b border-slate-200 bg-slate-50 text-[11px] font-extrabold text-slate-700 uppercase tracking-wider sticky top-0 z-10"><tr><th class="py-3 px-4">Gateway Alias ID</th><th class="py-3 px-4">Base Model</th><th class="py-3 px-4">Bridge</th><th class="py-3 px-4">Provider / Owner</th><th class="py-3 px-4 text-right">Action</th></tr></thead><tbody class="divide-y divide-slate-100 font-mono text-[11px]"></tbody></table>`),he=r(`<div role="presentation" class="fixed inset-0 z-50 flex items-center justify-center p-4 bg-slate-950/40 backdrop-blur-sm"><div class="relative w-full max-w-4xl max-h-[85vh] flex flex-col rounded-3xl p-6 border bg-white shadow-2xl overflow-hidden" style="border-color: var(--color-border); box-shadow: var(--shadow-3d);"><div class="flex items-center justify-between pb-4 border-b border-slate-100 shrink-0"><div class="space-y-1"><div class="flex items-center gap-2"><span class="p-1.5 rounded-lg bg-purple-50 text-purple-600 border border-purple-200"><svg class="w-4 h-4" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10"></path></svg></span> <h3 class="text-lg font-black text-slate-900">Served Models via Proxy Gateway</h3></div> <p class="text-xs font-semibold text-slate-600">Aggregated model aliases routed through active bridges. Target with model prefix in requests.</p></div> <button type="button" class="p-2 rounded-xl text-slate-400 hover:text-slate-700 hover:bg-slate-100 transition-colors cursor-pointer" aria-label="Close"><svg class="w-5 h-5" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path></svg></button></div> <div class="py-4 flex flex-col sm:flex-row items-center gap-3 shrink-0"><div class="relative flex-1 w-full"><input type="text" placeholder="Search model by ID, name, or provider..." class="w-full pl-9 pr-4 py-2 rounded-xl text-xs font-semibold text-slate-900 border border-slate-300 bg-slate-50 focus:bg-white focus:ring-2 focus:ring-purple-500 focus:outline-none transition-all"/> <svg class="w-4 h-4 text-slate-400 absolute left-3 top-2.5" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"></path></svg></div> <!></div> <div class="flex-1 overflow-y-auto border border-slate-200 rounded-2xl"><!></div> <div class="pt-4 mt-2 flex items-center justify-between text-xs font-semibold text-slate-600 shrink-0"><span> </span> <button type="button" class="px-4 py-2 rounded-xl font-bold bg-slate-100 hover:bg-slate-200 text-slate-800 transition-colors cursor-pointer">Close</button></div></div></div>`),ge=r(`<div class="space-y-8 max-w-7xl mx-auto"><div class="rise-3d relative overflow-hidden rounded-3xl p-8 border shadow-xl transition-all duration-300" style="background: linear-gradient(135deg, rgba(255, 255, 255, 0.96) 0%, rgba(255, 255, 255, 0.82) 100%), var(--color-primary-glow); border-color: var(--color-border); box-shadow: var(--shadow-3d);"><div class="relative z-10 flex flex-col md:flex-row md:items-center justify-between gap-6"><div class="space-y-2"><div class="inline-flex items-center gap-2 px-3 py-1 rounded-full text-xs font-bold border" style="background-color: var(--color-primary-glow); color: var(--color-primary); border-color: var(--color-primary);"><svg class="w-3.5 h-3.5" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 9l4-4 4 4m0 6l-4 4-4-4"></path></svg> Local LLM Proxy Gateway</div> <h2 class="text-2xl lg:text-3xl font-black text-slate-900 tracking-tight">Bridge Management</h2> <p class="text-sm font-semibold text-slate-700 max-w-2xl leading-relaxed">Dynamic model routing via Bridge Router (port 19999). Expose local models (Ollama, vLLM, LMStudio) and cloud APIs with unified routing.</p></div> <div class="flex flex-wrap items-center gap-3 shrink-0"><button type="button" class="btn-3d inline-flex items-center gap-2 px-4 py-2.5 rounded-xl font-bold text-xs bg-white text-slate-800 border border-slate-300 hover:border-purple-400 transition-all shadow-sm cursor-pointer"><svg class="w-4 h-4 text-purple-600" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10"></path></svg> <span>Served Models</span></button> <button type="button" class="btn-3d inline-flex items-center gap-2 px-5 py-2.5 rounded-xl font-bold text-xs text-white transition-all shadow-md cursor-pointer" style="background-color: var(--color-primary, #7c3aed);"><svg class="w-4 h-4" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2.5" d="M12 4v16m8-8H4"></path></svg> <span>Create Bridge</span></button></div></div></div> <!> <!> <!> <!> <!></div>`);function L(r,w){m(w,!0);let L=s(p([])),R=s(null),z=s(!0),B=s(``),V=s(!1),H=s(!1),U=s(!1),W=s(p([])),G=s(!1),K=s(``),q=s(`all`),J=s(p({name:``,port:9001,provider:`openai`,model:``,target_url:``}));async function Y(){i(z,!0),i(B,``);try{i(L,await A.get(`/api/v1/bridges`),!0),i(R,await A.get(`/api/v1/bridges/status`),!0)}catch(e){i(B,e.message,!0)}finally{i(z,!1)}}async function _e(){i(H,!0);try{await A.post(`/api/v1/bridges/gateway/start`),await M.fire({title:`Gateway Started`,text:`Bridge Proxy Gateway is running on port 19999.`,icon:`success`}),await Y()}catch(e){await M.fire({title:`Start Failed`,text:e.message,icon:`error`})}finally{i(H,!1)}}async function ve(){if(await M.confirm({title:`Stop Gateway?`,text:`Stopping the Bridge Proxy Gateway will interrupt local model routing on port 19999.`,icon:`warning`,confirmText:`Stop Gateway`,cancelText:`Cancel`})){i(H,!0);try{await A.post(`/api/v1/bridges/gateway/stop`),await M.fire({title:`Gateway Stopped`,text:`Bridge Proxy Gateway daemon has been stopped.`,icon:`info`}),await Y()}catch(e){await M.fire({title:`Stop Failed`,text:e.message,icon:`error`})}finally{i(H,!1)}}}async function ye(){i(H,!0);try{await A.post(`/api/v1/bridges/gateway/restart`),await M.fire({title:`Gateway Restarted`,text:`Bridge Proxy Gateway restarted successfully on port 19999.`,icon:`success`}),await Y()}catch(e){await M.fire({title:`Restart Failed`,text:e.message,icon:`error`})}finally{i(H,!1)}}async function be(){i(U,!0),i(G,!0);try{let e=await A.get(`/api/v1/bridges/models`);i(W,e.models||[],!0)}catch(e){i(W,[],!0),await M.fire({title:`Failed to Fetch Models`,text:e.message,icon:`error`})}finally{i(G,!1)}}async function xe(e){try{await navigator.clipboard.writeText(e),await M.fire({title:`Copied!`,text:`Model ID copied to clipboard: ${e}`,icon:`success`,timer:1500})}catch{}}let X=E(()=>c(W).filter(e=>{let t=!c(K)||String(e.id||``).toLowerCase().includes(c(K).toLowerCase())||String(e.model_name||``).toLowerCase().includes(c(K).toLowerCase()),n=c(q)===`all`||e.bridge===c(q);return t&&n})),Se=E(()=>[...new Set(c(W).map(e=>e.bridge))]);async function Ce(e){try{await A.patch(`/api/v1/bridges/`+encodeURIComponent(e.name),{enabled:!e.enabled}),await Y()}catch(e){await M.fire({title:`Update Failed`,text:e.message,icon:`error`})}}async function we(e){if(await M.confirm({title:`Delete Bridge?`,text:`Are you sure you want to permanently delete bridge "${e}"?`,icon:`warning`,confirmText:`Delete`,cancelText:`Keep`}))try{await A.del(`/api/v1/bridges/`+encodeURIComponent(e)),await M.fire({title:`Deleted`,text:`Bridge "${e}" was successfully removed.`,icon:`success`}),await Y()}catch(e){await M.fire({title:`Delete Failed`,text:e.message,icon:`error`})}}async function Te(e){if(e.preventDefault(),!c(J).name||!c(J).port){await M.fire({title:`Validation Error`,text:`Bridge name and port are required.`,icon:`warning`});return}try{await A.post(`/api/v1/bridges`,c(J)),i(V,!1),i(J,{name:``,port:9001,provider:`openai`,model:``,target_url:``},!0),await M.fire({title:`Bridge Created`,text:`New LLM proxy bridge configured and registered!`,icon:`success`}),await Y()}catch(e){await M.fire({title:`Creation Failed`,text:e.message,icon:`error`})}}D(Y),j(()=>c(V)),j(()=>c(U));function Ee(e){e.key===`Escape`&&(i(V,!1),i(U,!1))}var Z=ge();C(`keydown`,k,Ee);var Q=n(Z),De=n(Q),Oe=d(n(De),2),ke=n(Oe),Ae=d(ke,2);e(Oe),e(De),e(Q);var $=d(Q,2),je=r=>{var i=ee(),s=n(i),l=n(s),p=t=>{var r=N(),i=d(f(r),2),s=n(i),l=d(n(s),2),p=a(l);e(s);var m=d(s,2),h=a(m);e(i),o(()=>{u(p,`:${(c(R).router_port||19999)??``}`),u(h,`Unified router multiplexing all active bridges on 127.0.0.1:${(c(R).router_port||19999)??``}`)}),O(t,r)},m=t=>{var r=P(),i=d(f(r),2),s=n(i),l=d(n(s),2),p=a(l);e(s);var m=d(s,2),h=a(m);e(i),o(()=>{u(p,`:${(c(R).router_port||19999)??``}`),u(h,`Service daemon is not running. Start gateway to route requests via port ${(c(R).router_port||19999)??``}.`)}),O(t,r)};g(l,e=>{c(R).gateway_running?e(p):e(m,-1)}),e(s);var h=d(s,2),_=n(h),v=e=>{var n=F(),r=f(n),i=d(r,2);o(()=>{r.disabled=c(H),i.disabled=c(H)}),t(`click`,r,ye),t(`click`,i,ve),O(e,n)},y=e=>{var n=I();o(()=>n.disabled=c(H)),t(`click`,n,_e),O(e,n)};g(_,e=>{c(R).gateway_running?e(v):e(y,-1)});var b=d(_,2),x=a(b);e(h),e(i),o(e=>u(x,`${e??``} / ${c(L).length??``} Enabled`),[()=>c(L).filter(e=>e.enabled).length]),O(r,i)};g($,e=>{c(R)&&e(je)});var Me=d($,2),Ne=r=>{var i=te(),s=n(i),l=a(s,!0),f=d(s,2);e(i),o(()=>u(l,c(B))),t(`click`,f,Y),O(r,i)};g(Me,e=>{c(B)&&e(Ne)});var Pe=d(Me,2),Fe=e=>{var t=ne();O(e,t)},Ie=r=>{var a=re(),o=d(n(a),4);e(a),t(`click`,o,()=>{i(V,!0)}),O(r,a)},Le=r=>{var i=se(),s=n(i),l=n(s),f=d(n(l));x(f,21,()=>c(L),b,(r,i)=>{var s=oe(),l=n(s),f=a(l,!0),p=d(l),m=n(p),h=a(m);e(p);var _=d(p),v=n(_),b=a(v,!0);e(_);var x=d(_),S=a(x,!0),C=d(x),w=n(C),T=t=>{var r=ie(),a=d(n(r));e(r),o(()=>u(a,` Listening :${c(i).port??``}`)),O(t,r)},E=e=>{var t=ae();O(e,t)};g(w,e=>{c(i).running?e(T):e(E,-1)}),e(C);var D=d(C),k=n(D),A=n(k),j=a(A),M=d(A,2),N=a(M,!0);e(k),e(D);var P=d(D),F=a(P);e(s),o(()=>{u(f,c(i).name),u(h,`:${c(i).port??``}`),u(b,c(i).provider),u(S,c(i).target_url||`—`),y(A,1,`relative inline-flex h-5 w-9 items-center rounded-full transition-colors cursor-pointer ${c(i).enabled?`bg-emerald-500`:`bg-slate-300`}`),y(j,1,`inline-block h-3.5 w-3.5 transform rounded-full bg-white transition-transform shadow ${c(i).enabled?`translate-x-4.5`:`translate-x-1`}`),y(M,1,`text-[11px] font-bold ${c(i).enabled?`text-emerald-700`:`text-slate-500`}`),u(N,c(i).enabled?`Enabled`:`Disabled`)}),t(`click`,A,()=>Ce(c(i))),t(`click`,F,()=>we(c(i).name)),O(r,s)}),e(f),e(l),e(s),e(i),O(r,i)};g(Pe,e=>{c(z)?e(Fe):c(L).length===0?e(Ie,1):e(Le,-1)});var Re=d(Pe,2),ze=r=>{var a=ce(),o=n(a),s=n(o),u=d(n(s),2);e(s);var f=d(s,2),p=n(f),m=n(p),h=d(n(m),2);_(h),e(m);var g=d(m,2),y=d(n(g),2);_(y),e(g),e(p);var b=d(p,2),x=n(b),w=d(n(x),2),E=n(w);E.value=E.__value=`openai`;var D=d(E);D.value=D.__value=`anthropic`;var k=d(D);k.value=k.__value=`gemini`;var A=d(k);A.value=A.__value=`ollama`;var j=d(A);j.value=j.__value=`vllm`,e(w),T(w),e(x);var M=d(x,2),N=d(n(M),2);_(N),e(M),e(b);var P=d(b,2),F=d(n(P),2);_(F),e(P);var I=d(P,2),ee=n(I);l(2),e(I),e(f),e(o),e(a),t(`click`,a,e=>{e.target===e.currentTarget&&i(V,!1)}),t(`keydown`,a,e=>{e.key===`Escape`&&i(V,!1)}),t(`click`,u,()=>{i(V,!1)}),C(`submit`,f,Te),S(h,()=>c(J).name,e=>c(J).name=e),S(y,()=>c(J).port,e=>c(J).port=e),v(w,()=>c(J).provider,e=>c(J).provider=e),S(N,()=>c(J).model,e=>c(J).model=e),S(F,()=>c(J).target_url,e=>c(J).target_url=e),t(`click`,ee,()=>{i(V,!1)}),O(r,a)};g(Re,e=>{c(V)&&e(ze)});var Be=d(Re,2),Ve=r=>{var s=he(),f=n(s),p=n(f),m=d(n(p),2);e(p);var h=d(p,2),v=n(h),C=n(v);_(C),l(2),e(v);var w=d(v,2),T=r=>{var s=ue(),l=n(s),f=a(l),p=d(l,2);x(p,17,()=>c(Se),b,(e,n)=>{var r=le(),s=a(r);o(e=>{y(r,1,`px-3 py-1.5 rounded-lg text-xs font-bold transition-all cursor-pointer ${c(q)===c(n)?`bg-purple-600 text-white`:`bg-slate-100 text-slate-700 hover:bg-slate-200`}`),u(s,`${c(n)??``} (${e??``})`)},[()=>c(W).filter(e=>e.bridge===c(n)).length]),t(`click`,r,()=>{i(q,c(n),!0)}),O(e,r)}),e(s),o(()=>{y(l,1,`px-3 py-1.5 rounded-lg text-xs font-bold transition-all cursor-pointer ${c(q)===`all`?`bg-purple-600 text-white`:`bg-slate-100 text-slate-700 hover:bg-slate-200`}`),u(f,`All (${c(W).length??``})`)}),t(`click`,l,()=>{i(q,`all`)}),O(r,s)};g(w,e=>{c(Se).length>1&&e(T)}),e(h);var E=d(h,2),D=n(E),k=e=>{var t=de();O(e,t)},A=e=>{var t=fe();O(e,t)},j=r=>{var i=me(),s=d(n(i));x(s,21,()=>c(X),b,(r,i)=>{var s=pe(),l=n(s),f=a(l,!0),p=d(l),m=a(p,!0),h=d(p),g=n(h),_=a(g,!0);e(h);var v=d(h),y=a(v,!0),b=d(v),x=a(b);e(s),o(()=>{u(f,c(i).id),u(m,c(i).model_name),u(_,c(i).bridge),u(y,c(i).owned_by||c(i).bridge)}),t(`click`,x,()=>xe(c(i).id)),O(r,s)}),e(s),e(i),O(r,i)};g(D,e=>{c(G)?e(k):c(X).length===0?e(A,1):e(j,-1)}),e(E);var M=d(E,2),N=n(M),P=a(N),F=d(N,2);e(M),e(f),e(s),o(()=>u(P,`Showing ${c(X).length??``} of ${c(W).length??``} served model(s)`)),t(`click`,s,e=>{e.target===e.currentTarget&&i(U,!1)}),t(`keydown`,s,e=>{e.key===`Escape`&&i(U,!1)}),t(`click`,m,()=>{i(U,!1)}),S(C,()=>c(K),e=>i(K,e)),t(`click`,F,()=>{i(U,!1)}),O(r,s)};g(Be,e=>{c(U)&&e(Ve)}),e(Z),t(`click`,ke,be),t(`click`,Ae,()=>{i(V,!0)}),O(r,Z),h()}w([`click`,`keydown`]);function R(e){L(e,{})}export{R as component};
1
+ import{$ as e,A as t,B as n,E as r,G as i,H as a,I as o,K as s,M as c,Q as l,S as u,U as d,V as f,W as p,X as m,Y as h,_ as g,a as _,c as v,f as y,g as b,h as x,i as S,j as C,k as w,l as T,q as E,v as D,w as O,z as k}from"../chunks/PrdhfbrQ.js";import{t as A}from"../chunks/7LmsTWIo.js";import{t as j}from"../chunks/fbrtLByB.js";import"../chunks/C3-t9btS.js";import{t as M}from"../chunks/Dzm74gVd.js";var N=r(`<span class="relative flex h-3.5 w-3.5"><span class="animate-ping absolute inline-flex h-full w-full rounded-full bg-emerald-400 opacity-75"></span> <span class="relative inline-flex rounded-full h-3.5 w-3.5 bg-emerald-500"></span></span> <div><div class="flex items-center gap-2"><span class="text-xs font-black text-emerald-800 uppercase tracking-wide">Proxy Gateway Online</span> <span class="px-2 py-0.5 rounded text-[10px] font-mono font-bold bg-emerald-100 text-emerald-700 border border-emerald-300"> </span></div> <p class="text-xs font-semibold text-slate-600 mt-0.5"> </p></div>`,1),P=r(`<span class="relative inline-flex rounded-full h-3.5 w-3.5 bg-amber-500"></span> <div><div class="flex items-center gap-2"><span class="text-xs font-black text-amber-800 uppercase tracking-wide">Proxy Gateway Stopped</span> <span class="px-2 py-0.5 rounded text-[10px] font-mono font-bold bg-amber-100 text-amber-800 border border-amber-300"> </span></div> <p class="text-xs font-semibold text-slate-600 mt-0.5"> </p></div>`,1),F=r(`<button type="button" class="px-3.5 py-1.5 rounded-xl text-xs font-bold bg-amber-50 hover:bg-amber-100 text-amber-700 border border-amber-300 transition-all cursor-pointer disabled:opacity-50" title="Restart the Gateway service">Restart</button> <button type="button" class="px-3.5 py-1.5 rounded-xl text-xs font-bold bg-rose-50 hover:bg-rose-100 text-rose-700 border border-rose-300 transition-all cursor-pointer disabled:opacity-50" title="Stop the Gateway service">Stop</button>`,1),I=r(`<button type="button" class="px-4 py-1.5 rounded-xl text-xs font-bold bg-emerald-600 hover:bg-emerald-700 text-white shadow-sm transition-all cursor-pointer disabled:opacity-50" title="Start the Gateway service">Start Gateway</button>`),ee=r(`<div class="glass-card-3d p-5 rounded-2xl border flex flex-col sm:flex-row sm:items-center justify-between gap-4"><div class="flex items-center gap-3.5"><!></div> <div class="flex items-center gap-2 shrink-0"><!> <div class="ml-2 px-3 py-1.5 rounded-xl text-xs font-mono font-bold bg-purple-50 text-purple-700 border border-purple-200"> </div></div></div>`),te=r(`<div class="p-4 rounded-2xl bg-rose-50 border border-rose-200 text-rose-700 text-xs font-bold flex items-center justify-between"><span> </span> <button type="button" class="underline hover:text-rose-900 cursor-pointer">Retry</button></div>`),ne=r(`<div class="p-12 text-center text-slate-500 font-bold text-xs"><div class="animate-spin w-6 h-6 border-2 border-purple-600 border-t-transparent rounded-full mx-auto mb-2"></div> Loading configured bridges...</div>`),re=r(`<div class="glass-card-3d p-12 text-center rounded-3xl border"><div class="w-12 h-12 rounded-2xl bg-purple-50 border border-purple-200 text-purple-600 flex items-center justify-center mx-auto mb-3"><svg class="w-6 h-6" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 9l4-4 4 4m0 6l-4 4-4-4"></path></svg></div> <p class="text-sm font-bold text-slate-800 mb-4">No LLM proxy bridges configured yet.</p> <button type="button" class="btn-3d inline-flex items-center gap-2 px-4 py-2 rounded-xl text-xs font-bold bg-white text-slate-800 border border-slate-300 hover:bg-slate-50 cursor-pointer"><svg class="w-3.5 h-3.5" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2.5" d="M12 4v16m8-8H4"></path></svg> <span>Add your first bridge</span></button></div>`),ie=r(`<span class="inline-flex items-center gap-1.5 px-2.5 py-1 rounded-md text-[10px] font-bold bg-emerald-50 text-emerald-700 border border-emerald-200"><span class="h-1.5 w-1.5 rounded-full bg-emerald-500"></span> </span>`),ae=r(`<span class="inline-flex items-center gap-1.5 px-2.5 py-1 rounded-md text-[10px] font-bold bg-slate-100 text-slate-600 border border-slate-200"><span class="h-1.5 w-1.5 rounded-full bg-slate-400"></span> Inactive</span>`),oe=r(`<tr class="hover:bg-purple-50/40 transition-colors"><td class="py-4 px-6 font-black text-slate-900 font-mono"> </td><td class="py-4 px-6"><span class="inline-flex items-center px-2 py-0.5 rounded text-[10px] font-mono font-bold bg-slate-100 text-slate-800 border border-slate-300"> </span></td><td class="py-4 px-6"><span class="inline-flex items-center px-2 py-0.5 rounded text-[10px] font-mono font-bold bg-blue-50 text-blue-700 border border-blue-200 uppercase"> </span></td><td class="py-4 px-6 text-slate-700 font-mono text-[11px]"> </td><td class="py-4 px-6"><!></td><td class="py-4 px-6"><div class="flex items-center gap-2"><button type="button" title="Toggle active status"><span></span></button> <span> </span></div></td><td class="py-4 px-6 text-right"><button type="button" class="p-1.5 rounded-lg text-slate-400 hover:text-rose-600 hover:bg-rose-50 transition-colors cursor-pointer" title="Delete bridge"><svg class="w-4 h-4" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"></path></svg></button></td></tr>`),se=r(`<div class="glass-card-3d rounded-3xl border overflow-hidden"><div class="overflow-x-auto"><table class="w-full text-left text-xs"><thead class="border-b border-slate-200 bg-slate-50/80 text-[11px] font-extrabold text-slate-700 uppercase tracking-wider"><tr><th class="py-3.5 px-6">Bridge Name</th><th class="py-3.5 px-6">Port</th><th class="py-3.5 px-6">Provider</th><th class="py-3.5 px-6">Target URL</th><th class="py-3.5 px-6">Runtime Port</th><th class="py-3.5 px-6">Configured</th><th class="py-3.5 px-6 text-right">Actions</th></tr></thead><tbody class="divide-y divide-slate-100"></tbody></table></div></div>`),ce=r(`<div role="presentation" class="fixed inset-0 z-50 flex items-center justify-center p-4 bg-slate-900/40 backdrop-blur-md"><div class="glass-frost-strong relative w-full max-w-lg max-h-[90vh] overflow-y-auto rounded-3xl p-6 sm:p-8 border shadow-2xl space-y-6" style="background: var(--glass-card); border-color: var(--color-border); box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.18);"><div class="flex items-center justify-between"><h3 class="text-lg font-black text-slate-900">Configure New Bridge</h3> <button type="button" class="p-1 rounded-lg text-slate-400 hover:text-slate-700 cursor-pointer" aria-label="Close"><svg class="w-5 h-5" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path></svg></button></div> <form class="space-y-4"><div class="grid grid-cols-2 gap-4"><div><label for="bridge-name" class="block text-xs font-bold text-slate-800 mb-1">Bridge Name</label> <input id="bridge-name" type="text" placeholder="e.g. ollama-local" required="" class="w-full px-3 py-2 rounded-xl text-xs font-semibold text-slate-900 border border-slate-300 bg-white focus:ring-2 focus:ring-purple-500"/></div> <div><label for="bridge-port" class="block text-xs font-bold text-slate-800 mb-1">Port</label> <input id="bridge-port" type="number" placeholder="9001" required="" class="w-full px-3 py-2 rounded-xl text-xs font-semibold text-slate-900 border border-slate-300 bg-white focus:ring-2 focus:ring-purple-500"/></div></div> <div class="grid grid-cols-2 gap-4"><div><label for="bridge-provider" class="block text-xs font-bold text-slate-800 mb-1">Provider Type</label> <select id="bridge-provider" class="w-full px-3 py-2 rounded-xl text-xs font-semibold text-slate-900 border border-slate-300 bg-white focus:ring-2 focus:ring-purple-500"><option>OpenAI Compatible</option><option>Anthropic</option><option>Google Gemini</option><option>Ollama</option><option>vLLM</option></select></div> <div><label for="bridge-model" class="block text-xs font-bold text-slate-800 mb-1">Default Model (Optional)</label> <input id="bridge-model" type="text" placeholder="e.g. qwen2.5-coder:7b" class="w-full px-3 py-2 rounded-xl text-xs font-semibold text-slate-900 border border-slate-300 bg-white focus:ring-2 focus:ring-purple-500"/></div></div> <div><label for="bridge-target" class="block text-xs font-bold text-slate-800 mb-1">Upstream Target URL (Optional)</label> <input id="bridge-target" type="text" placeholder="http://127.0.0.1:11434/v1" class="w-full px-3 py-2 rounded-xl text-xs font-semibold text-slate-900 border border-slate-300 bg-white focus:ring-2 focus:ring-purple-500"/></div> <div class="flex items-center justify-end gap-3 pt-4 border-t border-slate-200"><button type="button" class="btn-3d px-4 py-2 rounded-xl text-xs font-bold text-slate-700 bg-slate-100 hover:bg-slate-200 border border-slate-300 cursor-pointer">Cancel</button> <button type="submit" class="btn-3d px-5 py-2 rounded-xl text-xs font-bold text-white shadow-md cursor-pointer" style="background-color: var(--color-primary, #7c3aed);">Create Bridge</button></div></form></div></div>`),le=r(`<button type="button"> </button>`),ue=r(`<div class="flex items-center gap-1.5 shrink-0 overflow-x-auto w-full sm:w-auto"><button type="button"> </button> <!></div>`),de=r(`<div class="p-12 text-center text-slate-500"><div class="animate-spin w-6 h-6 border-2 border-purple-600 border-t-transparent rounded-full mx-auto mb-3"></div> <p class="text-xs font-bold">Querying models from active bridge endpoints...</p></div>`),fe=r(`<div class="p-12 text-center text-slate-500"><p class="text-sm font-bold text-slate-700">No models found</p> <p class="text-xs mt-1">Make sure target bridges are running and have valid endpoint URLs configured.</p></div>`),pe=r(`<tr class="hover:bg-purple-50/30 transition-colors"><td class="py-2.5 px-4 font-bold text-purple-700"> </td><td class="py-2.5 px-4 text-slate-800"> </td><td class="py-2.5 px-4"><span class="inline-flex items-center px-2 py-0.5 rounded text-[10px] font-bold bg-blue-50 text-blue-700 border border-blue-200"> </span></td><td class="py-2.5 px-4 text-slate-600 font-sans text-xs"> </td><td class="py-2.5 px-4 text-right"><button type="button" class="px-2.5 py-1 rounded-md text-[10px] font-bold font-sans bg-slate-100 hover:bg-purple-100 text-slate-700 hover:text-purple-700 border border-slate-200 transition-colors cursor-pointer" title="Copy alias ID to clipboard">Copy ID</button></td></tr>`),me=r(`<table class="w-full text-left text-xs"><thead class="border-b border-slate-200 bg-slate-50 text-[11px] font-extrabold text-slate-700 uppercase tracking-wider sticky top-0 z-10"><tr><th class="py-3 px-4">Gateway Alias ID</th><th class="py-3 px-4">Base Model</th><th class="py-3 px-4">Bridge</th><th class="py-3 px-4">Provider / Owner</th><th class="py-3 px-4 text-right">Action</th></tr></thead><tbody class="divide-y divide-slate-100 font-mono text-[11px]"></tbody></table>`),he=r(`<div role="presentation" class="fixed inset-0 z-50 flex items-center justify-center p-4 bg-slate-950/40 backdrop-blur-sm"><div class="relative w-full max-w-4xl max-h-[85vh] flex flex-col rounded-3xl p-6 border bg-white shadow-2xl overflow-hidden" style="border-color: var(--color-border); box-shadow: var(--shadow-3d);"><div class="flex items-center justify-between pb-4 border-b border-slate-100 shrink-0"><div class="space-y-1"><div class="flex items-center gap-2"><span class="p-1.5 rounded-lg bg-purple-50 text-purple-600 border border-purple-200"><svg class="w-4 h-4" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10"></path></svg></span> <h3 class="text-lg font-black text-slate-900">Served Models via Proxy Gateway</h3></div> <p class="text-xs font-semibold text-slate-600">Aggregated model aliases routed through active bridges. Target with model prefix in requests.</p></div> <button type="button" class="p-2 rounded-xl text-slate-400 hover:text-slate-700 hover:bg-slate-100 transition-colors cursor-pointer" aria-label="Close"><svg class="w-5 h-5" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path></svg></button></div> <div class="py-4 flex flex-col sm:flex-row items-center gap-3 shrink-0"><div class="relative flex-1 w-full"><input type="text" placeholder="Search model by ID, name, or provider..." class="w-full pl-9 pr-4 py-2 rounded-xl text-xs font-semibold text-slate-900 border border-slate-300 bg-slate-50 focus:bg-white focus:ring-2 focus:ring-purple-500 focus:outline-none transition-all"/> <svg class="w-4 h-4 text-slate-400 absolute left-3 top-2.5" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"></path></svg></div> <!></div> <div class="flex-1 overflow-y-auto border border-slate-200 rounded-2xl"><!></div> <div class="pt-4 mt-2 flex items-center justify-between text-xs font-semibold text-slate-600 shrink-0"><span> </span> <button type="button" class="px-4 py-2 rounded-xl font-bold bg-slate-100 hover:bg-slate-200 text-slate-800 transition-colors cursor-pointer">Close</button></div></div></div>`),ge=r(`<div class="space-y-8 max-w-7xl mx-auto"><div class="rise-3d relative overflow-hidden rounded-3xl p-8 border shadow-xl transition-all duration-300" style="background: linear-gradient(135deg, rgba(255, 255, 255, 0.96) 0%, rgba(255, 255, 255, 0.82) 100%), var(--color-primary-glow); border-color: var(--color-border); box-shadow: var(--shadow-3d);"><div class="relative z-10 flex flex-col md:flex-row md:items-center justify-between gap-6"><div class="space-y-2"><div class="inline-flex items-center gap-2 px-3 py-1 rounded-full text-xs font-bold border" style="background-color: var(--color-primary-glow); color: var(--color-primary); border-color: var(--color-primary);"><svg class="w-3.5 h-3.5" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 9l4-4 4 4m0 6l-4 4-4-4"></path></svg> Local LLM Proxy Gateway</div> <h2 class="text-2xl lg:text-3xl font-black text-slate-900 tracking-tight">Bridge Management</h2> <p class="text-sm font-semibold text-slate-700 max-w-2xl leading-relaxed">Dynamic model routing via Bridge Router (port 19999). Expose local models (Ollama, vLLM, LMStudio) and cloud APIs with unified routing.</p></div> <div class="flex flex-wrap items-center gap-3 shrink-0"><button type="button" class="btn-3d inline-flex items-center gap-2 px-4 py-2.5 rounded-xl font-bold text-xs bg-white text-slate-800 border border-slate-300 hover:border-purple-400 transition-all shadow-sm cursor-pointer"><svg class="w-4 h-4 text-purple-600" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10"></path></svg> <span>Served Models</span></button> <button type="button" class="btn-3d inline-flex items-center gap-2 px-5 py-2.5 rounded-xl font-bold text-xs text-white transition-all shadow-md cursor-pointer" style="background-color: var(--color-primary, #7c3aed);"><svg class="w-4 h-4" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2.5" d="M12 4v16m8-8H4"></path></svg> <span>Create Bridge</span></button></div></div></div> <!> <!> <!> <!> <!></div>`);function L(r,w){m(w,!0);let L=s(p([])),R=s(null),z=s(!0),B=s(``),V=s(!1),H=s(!1),U=s(!1),W=s(p([])),G=s(!1),K=s(``),q=s(`all`),J=s(p({name:``,port:9001,provider:`openai`,model:``,target_url:``}));async function Y(){i(z,!0),i(B,``);try{i(L,await A.get(`/api/v1/bridges`),!0),i(R,await A.get(`/api/v1/bridges/status`),!0)}catch(e){i(B,e.message,!0)}finally{i(z,!1)}}async function _e(){i(H,!0);try{await A.post(`/api/v1/bridges/gateway/start`),await M.fire({title:`Gateway Started`,text:`Bridge Proxy Gateway is running on port 19999.`,icon:`success`}),await Y()}catch(e){await M.fire({title:`Start Failed`,text:e.message,icon:`error`})}finally{i(H,!1)}}async function ve(){if(await M.confirm({title:`Stop Gateway?`,text:`Stopping the Bridge Proxy Gateway will interrupt local model routing on port 19999.`,icon:`warning`,confirmText:`Stop Gateway`,cancelText:`Cancel`})){i(H,!0);try{await A.post(`/api/v1/bridges/gateway/stop`),await M.fire({title:`Gateway Stopped`,text:`Bridge Proxy Gateway daemon has been stopped.`,icon:`info`}),await Y()}catch(e){await M.fire({title:`Stop Failed`,text:e.message,icon:`error`})}finally{i(H,!1)}}}async function ye(){i(H,!0);try{await A.post(`/api/v1/bridges/gateway/restart`),await M.fire({title:`Gateway Restarted`,text:`Bridge Proxy Gateway restarted successfully on port 19999.`,icon:`success`}),await Y()}catch(e){await M.fire({title:`Restart Failed`,text:e.message,icon:`error`})}finally{i(H,!1)}}async function be(){i(U,!0),i(G,!0);try{let e=await A.get(`/api/v1/bridges/models`);i(W,e.models||[],!0)}catch(e){i(W,[],!0),await M.fire({title:`Failed to Fetch Models`,text:e.message,icon:`error`})}finally{i(G,!1)}}async function xe(e){try{await navigator.clipboard.writeText(e),await M.fire({title:`Copied!`,text:`Model ID copied to clipboard: ${e}`,icon:`success`,timer:1500})}catch{}}let X=E(()=>c(W).filter(e=>{let t=!c(K)||String(e.id||``).toLowerCase().includes(c(K).toLowerCase())||String(e.model_name||``).toLowerCase().includes(c(K).toLowerCase()),n=c(q)===`all`||e.bridge===c(q);return t&&n})),Se=E(()=>[...new Set(c(W).map(e=>e.bridge))]);async function Ce(e){try{await A.patch(`/api/v1/bridges/`+encodeURIComponent(e.name),{enabled:!e.enabled}),await Y()}catch(e){await M.fire({title:`Update Failed`,text:e.message,icon:`error`})}}async function we(e){if(await M.confirm({title:`Delete Bridge?`,text:`Are you sure you want to permanently delete bridge "${e}"?`,icon:`warning`,confirmText:`Delete`,cancelText:`Keep`}))try{await A.del(`/api/v1/bridges/`+encodeURIComponent(e)),await M.fire({title:`Deleted`,text:`Bridge "${e}" was successfully removed.`,icon:`success`}),await Y()}catch(e){await M.fire({title:`Delete Failed`,text:e.message,icon:`error`})}}async function Te(e){if(e.preventDefault(),!c(J).name||!c(J).port){await M.fire({title:`Validation Error`,text:`Bridge name and port are required.`,icon:`warning`});return}try{await A.post(`/api/v1/bridges`,c(J)),i(V,!1),i(J,{name:``,port:9001,provider:`openai`,model:``,target_url:``},!0),await M.fire({title:`Bridge Created`,text:`New LLM proxy bridge configured and registered!`,icon:`success`}),await Y()}catch(e){await M.fire({title:`Creation Failed`,text:e.message,icon:`error`})}}D(Y),j(()=>c(V)),j(()=>c(U));function Ee(e){e.key===`Escape`&&(i(V,!1),i(U,!1))}var Z=ge();C(`keydown`,k,Ee);var Q=n(Z),De=n(Q),Oe=d(n(De),2),ke=n(Oe),Ae=d(ke,2);e(Oe),e(De),e(Q);var $=d(Q,2),je=r=>{var i=ee(),s=n(i),l=n(s),p=t=>{var r=N(),i=d(f(r),2),s=n(i),l=d(n(s),2),p=a(l);e(s);var m=d(s,2),h=a(m);e(i),o(()=>{u(p,`:${(c(R).router_port||19999)??``}`),u(h,`Unified router multiplexing all active bridges on 127.0.0.1:${(c(R).router_port||19999)??``}`)}),O(t,r)},m=t=>{var r=P(),i=d(f(r),2),s=n(i),l=d(n(s),2),p=a(l);e(s);var m=d(s,2),h=a(m);e(i),o(()=>{u(p,`:${(c(R).router_port||19999)??``}`),u(h,`Service daemon is not running. Start gateway to route requests via port ${(c(R).router_port||19999)??``}.`)}),O(t,r)};g(l,e=>{c(R).gateway_running?e(p):e(m,-1)}),e(s);var h=d(s,2),_=n(h),v=e=>{var n=F(),r=f(n),i=d(r,2);o(()=>{r.disabled=c(H),i.disabled=c(H)}),t(`click`,r,ye),t(`click`,i,ve),O(e,n)},y=e=>{var n=I();o(()=>n.disabled=c(H)),t(`click`,n,_e),O(e,n)};g(_,e=>{c(R).gateway_running?e(v):e(y,-1)});var b=d(_,2),x=a(b);e(h),e(i),o(e=>u(x,`${e??``} / ${c(L).length??``} Enabled`),[()=>c(L).filter(e=>e.enabled).length]),O(r,i)};g($,e=>{c(R)&&e(je)});var Me=d($,2),Ne=r=>{var i=te(),s=n(i),l=a(s,!0),f=d(s,2);e(i),o(()=>u(l,c(B))),t(`click`,f,Y),O(r,i)};g(Me,e=>{c(B)&&e(Ne)});var Pe=d(Me,2),Fe=e=>{var t=ne();O(e,t)},Ie=r=>{var a=re(),o=d(n(a),4);e(a),t(`click`,o,()=>{i(V,!0)}),O(r,a)},Le=r=>{var i=se(),s=n(i),l=n(s),f=d(n(l));x(f,21,()=>c(L),b,(r,i)=>{var s=oe(),l=n(s),f=a(l,!0),p=d(l),m=n(p),h=a(m);e(p);var _=d(p),v=n(_),b=a(v,!0);e(_);var x=d(_),S=a(x,!0),C=d(x),w=n(C),T=t=>{var r=ie(),a=d(n(r));e(r),o(()=>u(a,` Listening :${c(i).port??``}`)),O(t,r)},E=e=>{var t=ae();O(e,t)};g(w,e=>{c(i).running?e(T):e(E,-1)}),e(C);var D=d(C),k=n(D),A=n(k),j=a(A),M=d(A,2),N=a(M,!0);e(k),e(D);var P=d(D),F=a(P);e(s),o(()=>{u(f,c(i).name),u(h,`:${c(i).port??``}`),u(b,c(i).provider),u(S,c(i).target_url||`—`),y(A,1,`relative inline-flex h-5 w-9 items-center rounded-full transition-colors cursor-pointer ${c(i).enabled?`bg-emerald-500`:`bg-slate-300`}`),y(j,1,`inline-block h-3.5 w-3.5 transform rounded-full bg-white transition-transform shadow ${c(i).enabled?`translate-x-4.5`:`translate-x-1`}`),y(M,1,`text-[11px] font-bold ${c(i).enabled?`text-emerald-700`:`text-slate-500`}`),u(N,c(i).enabled?`Enabled`:`Disabled`)}),t(`click`,A,()=>Ce(c(i))),t(`click`,F,()=>we(c(i).name)),O(r,s)}),e(f),e(l),e(s),e(i),O(r,i)};g(Pe,e=>{c(z)?e(Fe):c(L).length===0?e(Ie,1):e(Le,-1)});var Re=d(Pe,2),ze=r=>{var a=ce(),o=n(a),s=n(o),u=d(n(s),2);e(s);var f=d(s,2),p=n(f),m=n(p),h=d(n(m),2);_(h),e(m);var g=d(m,2),y=d(n(g),2);_(y),e(g),e(p);var b=d(p,2),x=n(b),w=d(n(x),2),E=n(w);E.value=E.__value=`openai`;var D=d(E);D.value=D.__value=`anthropic`;var k=d(D);k.value=k.__value=`gemini`;var A=d(k);A.value=A.__value=`ollama`;var j=d(A);j.value=j.__value=`vllm`,e(w),T(w),e(x);var M=d(x,2),N=d(n(M),2);_(N),e(M),e(b);var P=d(b,2),F=d(n(P),2);_(F),e(P);var I=d(P,2),ee=n(I);l(2),e(I),e(f),e(o),e(a),t(`click`,a,e=>{e.target===e.currentTarget&&i(V,!1)}),t(`keydown`,a,e=>{e.key===`Escape`&&i(V,!1)}),t(`click`,u,()=>{i(V,!1)}),C(`submit`,f,Te),S(h,()=>c(J).name,e=>c(J).name=e),S(y,()=>c(J).port,e=>c(J).port=e),v(w,()=>c(J).provider,e=>c(J).provider=e),S(N,()=>c(J).model,e=>c(J).model=e),S(F,()=>c(J).target_url,e=>c(J).target_url=e),t(`click`,ee,()=>{i(V,!1)}),O(r,a)};g(Re,e=>{c(V)&&e(ze)});var Be=d(Re,2),Ve=r=>{var s=he(),f=n(s),p=n(f),m=d(n(p),2);e(p);var h=d(p,2),v=n(h),C=n(v);_(C),l(2),e(v);var w=d(v,2),T=r=>{var s=ue(),l=n(s),f=a(l),p=d(l,2);x(p,17,()=>c(Se),b,(e,n)=>{var r=le(),s=a(r);o(e=>{y(r,1,`px-3 py-1.5 rounded-lg text-xs font-bold transition-all cursor-pointer ${c(q)===c(n)?`bg-purple-600 text-white`:`bg-slate-100 text-slate-700 hover:bg-slate-200`}`),u(s,`${c(n)??``} (${e??``})`)},[()=>c(W).filter(e=>e.bridge===c(n)).length]),t(`click`,r,()=>{i(q,c(n),!0)}),O(e,r)}),e(s),o(()=>{y(l,1,`px-3 py-1.5 rounded-lg text-xs font-bold transition-all cursor-pointer ${c(q)===`all`?`bg-purple-600 text-white`:`bg-slate-100 text-slate-700 hover:bg-slate-200`}`),u(f,`All (${c(W).length??``})`)}),t(`click`,l,()=>{i(q,`all`)}),O(r,s)};g(w,e=>{c(Se).length>1&&e(T)}),e(h);var E=d(h,2),D=n(E),k=e=>{var t=de();O(e,t)},A=e=>{var t=fe();O(e,t)},j=r=>{var i=me(),s=d(n(i));x(s,21,()=>c(X),b,(r,i)=>{var s=pe(),l=n(s),f=a(l,!0),p=d(l),m=a(p,!0),h=d(p),g=n(h),_=a(g,!0);e(h);var v=d(h),y=a(v,!0),b=d(v),x=a(b);e(s),o(()=>{u(f,c(i).id),u(m,c(i).model_name),u(_,c(i).bridge),u(y,c(i).owned_by||c(i).bridge)}),t(`click`,x,()=>xe(c(i).id)),O(r,s)}),e(s),e(i),O(r,i)};g(D,e=>{c(G)?e(k):c(X).length===0?e(A,1):e(j,-1)}),e(E);var M=d(E,2),N=n(M),P=a(N),F=d(N,2);e(M),e(f),e(s),o(()=>u(P,`Showing ${c(X).length??``} of ${c(W).length??``} served model(s)`)),t(`click`,s,e=>{e.target===e.currentTarget&&i(U,!1)}),t(`keydown`,s,e=>{e.key===`Escape`&&i(U,!1)}),t(`click`,m,()=>{i(U,!1)}),S(C,()=>c(K),e=>i(K,e)),t(`click`,F,()=>{i(U,!1)}),O(r,s)};g(Be,e=>{c(U)&&e(Ve)}),e(Z),t(`click`,ke,be),t(`click`,Ae,()=>{i(V,!0)}),O(r,Z),h()}w([`click`,`keydown`]);function R(e){L(e,{})}export{R as component};