konoha-mcp 2.1.16 → 2.1.17

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 (246) hide show
  1. package/.agents/SOUL.md +1 -1
  2. package/.agents/skills/konoha/SKILL.md +30 -1
  3. package/.agents/skills.fingerprint +1 -1
  4. package/README.md +186 -219
  5. package/apps/web/build/adapter-node.js +1 -1
  6. package/apps/web/build/client/_app/immutable/assets/0.BGEsEaMd.css +2 -0
  7. package/apps/web/build/client/_app/immutable/assets/0.BGEsEaMd.css.br +0 -0
  8. package/apps/web/build/client/_app/immutable/assets/0.BGEsEaMd.css.gz +0 -0
  9. package/apps/web/build/client/_app/immutable/chunks/{D-Kujhko.js → 2WlqNq2Q.js} +1 -1
  10. package/apps/web/build/client/_app/immutable/chunks/2WlqNq2Q.js.br +0 -0
  11. package/apps/web/build/client/_app/immutable/chunks/2WlqNq2Q.js.gz +0 -0
  12. package/apps/web/build/client/_app/immutable/chunks/B9vY64pH.js +1 -0
  13. package/apps/web/build/client/_app/immutable/chunks/B9vY64pH.js.br +0 -0
  14. package/apps/web/build/client/_app/immutable/chunks/B9vY64pH.js.gz +0 -0
  15. package/apps/web/build/client/_app/immutable/chunks/{Dzm74gVd.js → BPX4jQ9l.js} +1 -1
  16. package/apps/web/build/client/_app/immutable/chunks/BPX4jQ9l.js.br +2 -0
  17. package/apps/web/build/client/_app/immutable/chunks/BPX4jQ9l.js.gz +0 -0
  18. package/apps/web/build/client/_app/immutable/chunks/{fbrtLByB.js → BXssplIZ.js} +1 -1
  19. package/apps/web/build/client/_app/immutable/chunks/BXssplIZ.js.br +0 -0
  20. package/apps/web/build/client/_app/immutable/chunks/BXssplIZ.js.gz +0 -0
  21. package/apps/web/build/client/_app/immutable/chunks/C-3vSv0T.js +1 -0
  22. package/apps/web/build/client/_app/immutable/chunks/C-3vSv0T.js.br +2 -0
  23. package/apps/web/build/client/_app/immutable/chunks/C-3vSv0T.js.gz +0 -0
  24. package/apps/web/build/client/_app/immutable/chunks/{PrdhfbrQ.js → C7jhkUmC.js} +1 -1
  25. package/apps/web/build/client/_app/immutable/chunks/C7jhkUmC.js.br +0 -0
  26. package/apps/web/build/client/_app/immutable/chunks/{PrdhfbrQ.js.gz → C7jhkUmC.js.gz} +0 -0
  27. package/apps/web/build/client/_app/immutable/chunks/{7LmsTWIo.js → CfrhQlXt.js} +1 -1
  28. package/apps/web/build/client/_app/immutable/chunks/CfrhQlXt.js.br +0 -0
  29. package/apps/web/build/client/_app/immutable/chunks/CfrhQlXt.js.gz +0 -0
  30. package/apps/web/build/client/_app/immutable/chunks/CgzsRqh3.js +1 -0
  31. package/apps/web/build/client/_app/immutable/chunks/CgzsRqh3.js.br +1 -0
  32. package/apps/web/build/client/_app/immutable/chunks/CgzsRqh3.js.gz +0 -0
  33. package/apps/web/build/client/_app/immutable/chunks/ChmznE4L.js +2 -0
  34. package/apps/web/build/client/_app/immutable/chunks/ChmznE4L.js.br +0 -0
  35. package/apps/web/build/client/_app/immutable/chunks/ChmznE4L.js.gz +0 -0
  36. package/apps/web/build/client/_app/immutable/entry/app.cdLMQHsN.js +2 -0
  37. package/apps/web/build/client/_app/immutable/entry/app.cdLMQHsN.js.br +0 -0
  38. package/apps/web/build/client/_app/immutable/entry/app.cdLMQHsN.js.gz +0 -0
  39. package/apps/web/build/client/_app/immutable/entry/{start.CNV5BTCO.js → start.CJ1ccVCA.js} +2 -2
  40. package/apps/web/build/client/_app/immutable/entry/start.CJ1ccVCA.js.br +0 -0
  41. package/apps/web/build/client/_app/immutable/entry/start.CJ1ccVCA.js.gz +0 -0
  42. package/apps/web/build/client/_app/immutable/nodes/0.ijG9ltjt.js +2 -0
  43. package/apps/web/build/client/_app/immutable/nodes/0.ijG9ltjt.js.br +0 -0
  44. package/apps/web/build/client/_app/immutable/nodes/0.ijG9ltjt.js.gz +0 -0
  45. package/apps/web/build/client/_app/immutable/nodes/1.i6MXc2Yb.js +1 -0
  46. package/apps/web/build/client/_app/immutable/nodes/1.i6MXc2Yb.js.br +2 -0
  47. package/apps/web/build/client/_app/immutable/nodes/1.i6MXc2Yb.js.gz +0 -0
  48. package/apps/web/build/client/_app/immutable/nodes/10.B0F7UoZ4.js +1 -0
  49. package/apps/web/build/client/_app/immutable/nodes/10.B0F7UoZ4.js.br +0 -0
  50. package/apps/web/build/client/_app/immutable/nodes/10.B0F7UoZ4.js.gz +0 -0
  51. package/apps/web/build/client/_app/immutable/nodes/{11.4dBWH00t.js → 11.BuH1S-Sa.js} +2 -2
  52. package/apps/web/build/client/_app/immutable/nodes/11.BuH1S-Sa.js.br +0 -0
  53. package/apps/web/build/client/_app/immutable/nodes/11.BuH1S-Sa.js.gz +0 -0
  54. package/apps/web/build/client/_app/immutable/nodes/12.DVFmb_G-.js +1 -0
  55. package/apps/web/build/client/_app/immutable/nodes/12.DVFmb_G-.js.br +0 -0
  56. package/apps/web/build/client/_app/immutable/nodes/12.DVFmb_G-.js.gz +0 -0
  57. package/apps/web/build/client/_app/immutable/nodes/13.0PJQyjqs.js +1 -0
  58. package/apps/web/build/client/_app/immutable/nodes/13.0PJQyjqs.js.br +0 -0
  59. package/apps/web/build/client/_app/immutable/nodes/13.0PJQyjqs.js.gz +0 -0
  60. package/apps/web/build/client/_app/immutable/nodes/14.ljEGDzwO.js +3 -0
  61. package/apps/web/build/client/_app/immutable/nodes/14.ljEGDzwO.js.br +0 -0
  62. package/apps/web/build/client/_app/immutable/nodes/14.ljEGDzwO.js.gz +0 -0
  63. package/apps/web/build/client/_app/immutable/nodes/15.DpXDNTPX.js +1 -0
  64. package/apps/web/build/client/_app/immutable/nodes/15.DpXDNTPX.js.br +0 -0
  65. package/apps/web/build/client/_app/immutable/nodes/15.DpXDNTPX.js.gz +0 -0
  66. package/apps/web/build/client/_app/immutable/nodes/16.qIEBxyps.js +17 -0
  67. package/apps/web/build/client/_app/immutable/nodes/16.qIEBxyps.js.br +0 -0
  68. package/apps/web/build/client/_app/immutable/nodes/16.qIEBxyps.js.gz +0 -0
  69. package/apps/web/build/client/_app/immutable/nodes/17.CmVvQa7x.js +1 -0
  70. package/apps/web/build/client/_app/immutable/nodes/17.CmVvQa7x.js.br +0 -0
  71. package/apps/web/build/client/_app/immutable/nodes/17.CmVvQa7x.js.gz +0 -0
  72. package/apps/web/build/client/_app/immutable/nodes/{2.Dr646Vs5.js → 2.lx602Ou_.js} +1 -1
  73. package/apps/web/build/client/_app/immutable/nodes/2.lx602Ou_.js.br +0 -0
  74. package/apps/web/build/client/_app/immutable/nodes/2.lx602Ou_.js.gz +0 -0
  75. package/apps/web/build/client/_app/immutable/nodes/3.B-axtlUy.js +1 -0
  76. package/apps/web/build/client/_app/immutable/nodes/3.B-axtlUy.js.br +0 -0
  77. package/apps/web/build/client/_app/immutable/nodes/3.B-axtlUy.js.gz +0 -0
  78. package/apps/web/build/client/_app/immutable/nodes/4.Cp9WmMgk.js +1 -0
  79. package/apps/web/build/client/_app/immutable/nodes/4.Cp9WmMgk.js.br +0 -0
  80. package/apps/web/build/client/_app/immutable/nodes/4.Cp9WmMgk.js.gz +0 -0
  81. package/apps/web/build/client/_app/immutable/nodes/5.CQxJe2vk.js +1 -0
  82. package/apps/web/build/client/_app/immutable/nodes/5.CQxJe2vk.js.br +0 -0
  83. package/apps/web/build/client/_app/immutable/nodes/5.CQxJe2vk.js.gz +0 -0
  84. package/apps/web/build/client/_app/immutable/nodes/6.5S6pozqG.js +1 -0
  85. package/apps/web/build/client/_app/immutable/nodes/6.5S6pozqG.js.br +0 -0
  86. package/apps/web/build/client/_app/immutable/nodes/6.5S6pozqG.js.gz +0 -0
  87. package/apps/web/build/client/_app/immutable/nodes/{7.CmbiPMU3.js → 7.B5ZeCLvS.js} +1 -1
  88. package/apps/web/build/client/_app/immutable/nodes/7.B5ZeCLvS.js.br +0 -0
  89. package/apps/web/build/client/_app/immutable/nodes/7.B5ZeCLvS.js.gz +0 -0
  90. package/apps/web/build/client/_app/immutable/nodes/8.M3fxLxa9.js +1 -0
  91. package/apps/web/build/client/_app/immutable/nodes/8.M3fxLxa9.js.br +0 -0
  92. package/apps/web/build/client/_app/immutable/nodes/8.M3fxLxa9.js.gz +0 -0
  93. package/apps/web/build/client/_app/immutable/nodes/9.CYkQmFMJ.js +21 -0
  94. package/apps/web/build/client/_app/immutable/nodes/9.CYkQmFMJ.js.br +0 -0
  95. package/apps/web/build/client/_app/immutable/nodes/9.CYkQmFMJ.js.gz +0 -0
  96. package/apps/web/build/client/_app/version.json +1 -1
  97. package/apps/web/build/client/_app/version.json.br +0 -0
  98. package/apps/web/build/client/_app/version.json.gz +0 -0
  99. package/apps/web/build/server/.vite/manifest.json +15 -1
  100. package/apps/web/build/server/_app/immutable/assets/_layout.BGEsEaMd.css +2 -0
  101. package/apps/web/build/server/chunks/api.js +4 -0
  102. package/apps/web/build/server/chunks/api.js.map +1 -1
  103. package/apps/web/build/server/chunks/instance.js +3 -3
  104. package/apps/web/build/server/chunks/internal.js +1 -1
  105. package/apps/web/build/server/entries/pages/_layout.svelte.js +7 -0
  106. package/apps/web/build/server/entries/pages/_layout.svelte.js.map +1 -1
  107. package/apps/web/build/server/entries/pages/agents/_page.svelte.js +6 -2
  108. package/apps/web/build/server/entries/pages/agents/_page.svelte.js.map +1 -1
  109. package/apps/web/build/server/entries/pages/docs/_page.svelte.js +86 -2
  110. package/apps/web/build/server/entries/pages/docs/_page.svelte.js.map +1 -1
  111. package/apps/web/build/server/entries/pages/remote/_page.svelte.js +73 -0
  112. package/apps/web/build/server/entries/pages/remote/_page.svelte.js.map +1 -0
  113. package/apps/web/build/server/manifest-full.js +15 -7
  114. package/apps/web/build/server/manifest.js +15 -7
  115. package/apps/web/build/server/nodes/0.js +2 -2
  116. package/apps/web/build/server/nodes/1.js +1 -1
  117. package/apps/web/build/server/nodes/10.js +1 -1
  118. package/apps/web/build/server/nodes/11.js +1 -1
  119. package/apps/web/build/server/nodes/12.js +2 -2
  120. package/apps/web/build/server/nodes/13.js +2 -2
  121. package/apps/web/build/server/nodes/14.js +2 -2
  122. package/apps/web/build/server/nodes/15.js +2 -2
  123. package/apps/web/build/server/nodes/16.js +2 -2
  124. package/apps/web/build/server/nodes/17.js +8 -0
  125. package/apps/web/build/server/nodes/2.js +1 -1
  126. package/apps/web/build/server/nodes/3.js +1 -1
  127. package/apps/web/build/server/nodes/4.js +1 -1
  128. package/apps/web/build/server/nodes/5.js +1 -1
  129. package/apps/web/build/server/nodes/6.js +1 -1
  130. package/apps/web/build/server/nodes/7.js +1 -1
  131. package/apps/web/build/server/nodes/8.js +1 -1
  132. package/apps/web/build/server/nodes/9.js +1 -1
  133. package/apps/web/build/server/server.js +15 -7
  134. package/apps/web/package.json +1 -1
  135. package/bin/cli.js +397 -33
  136. package/docs/ALL-WORKFLOW-DIAGRAMS.md +135 -0
  137. package/docs/ARCHITECTURE.md +23 -1
  138. package/docs/BENCHMARK.md +53 -33
  139. package/docs/CLOUDFLARE_TUNNEL_GUIDE.md +119 -0
  140. package/docs/SecurityCompliance/security_compliance_report_google_policy_2.1.17_2026-10-08.md +87 -0
  141. package/docs/TELEGRAM_INTEGRATION_GUIDE.md +146 -0
  142. package/docs/diagrams/README.md +6 -2
  143. package/docs/diagrams/konoha-architecture.drawio +121 -0
  144. package/docs/diagrams/konoha-enterprise-architecture.drawio +121 -0
  145. package/package.json +1 -1
  146. package/src/agent_manager.js +75 -8
  147. package/src/crypto_vault.js +157 -0
  148. package/src/db.js +186 -65
  149. package/src/db_agents.js +1 -1
  150. package/src/mcp/memory_reporting.js +19 -0
  151. package/src/mcp/skills.js +17 -15
  152. package/src/mcp/workflow.js +38 -0
  153. package/src/migrate.js +74 -6
  154. package/src/persona_memory.js +1 -1
  155. package/src/prompt_hook.js +40 -1
  156. package/src/queue/inbox.js +243 -0
  157. package/src/queue/worker.js +413 -0
  158. package/src/telegram/config.js +101 -0
  159. package/src/telegram/notifier.js +359 -0
  160. package/src/telegram/poller.js +548 -0
  161. package/src/telegram/session_manager.js +583 -0
  162. package/src/templates/SOUL.md +1 -1
  163. package/src/templates/skills/konoha/SKILL.md +30 -1
  164. package/src/tunnel/config.js +89 -0
  165. package/src/tunnel/manager.js +216 -0
  166. package/src/tunnel/security.js +225 -0
  167. package/src/vector_search.js +21 -11
  168. package/src/web_server.js +358 -10
  169. package/apps/web/build/client/_app/immutable/assets/0.Ch0v37a-.css +0 -2
  170. package/apps/web/build/client/_app/immutable/assets/0.Ch0v37a-.css.br +0 -0
  171. package/apps/web/build/client/_app/immutable/assets/0.Ch0v37a-.css.gz +0 -0
  172. package/apps/web/build/client/_app/immutable/chunks/7LmsTWIo.js.br +0 -0
  173. package/apps/web/build/client/_app/immutable/chunks/7LmsTWIo.js.gz +0 -0
  174. package/apps/web/build/client/_app/immutable/chunks/BH86Md_X.js +0 -1
  175. package/apps/web/build/client/_app/immutable/chunks/BH86Md_X.js.br +0 -2
  176. package/apps/web/build/client/_app/immutable/chunks/BH86Md_X.js.gz +0 -0
  177. package/apps/web/build/client/_app/immutable/chunks/C3-t9btS.js +0 -1
  178. package/apps/web/build/client/_app/immutable/chunks/C3-t9btS.js.br +0 -1
  179. package/apps/web/build/client/_app/immutable/chunks/C3-t9btS.js.gz +0 -0
  180. package/apps/web/build/client/_app/immutable/chunks/CBY268r4.js +0 -1
  181. package/apps/web/build/client/_app/immutable/chunks/CBY268r4.js.br +0 -3
  182. package/apps/web/build/client/_app/immutable/chunks/CBY268r4.js.gz +0 -0
  183. package/apps/web/build/client/_app/immutable/chunks/D-Kujhko.js.br +0 -0
  184. package/apps/web/build/client/_app/immutable/chunks/D-Kujhko.js.gz +0 -0
  185. package/apps/web/build/client/_app/immutable/chunks/Dzm74gVd.js.br +0 -0
  186. package/apps/web/build/client/_app/immutable/chunks/Dzm74gVd.js.gz +0 -0
  187. package/apps/web/build/client/_app/immutable/chunks/Lb3VuXoN.js +0 -2
  188. package/apps/web/build/client/_app/immutable/chunks/Lb3VuXoN.js.br +0 -0
  189. package/apps/web/build/client/_app/immutable/chunks/Lb3VuXoN.js.gz +0 -0
  190. package/apps/web/build/client/_app/immutable/chunks/PrdhfbrQ.js.br +0 -0
  191. package/apps/web/build/client/_app/immutable/chunks/fbrtLByB.js.br +0 -0
  192. package/apps/web/build/client/_app/immutable/chunks/fbrtLByB.js.gz +0 -0
  193. package/apps/web/build/client/_app/immutable/entry/app.BeU4olDP.js +0 -2
  194. package/apps/web/build/client/_app/immutable/entry/app.BeU4olDP.js.br +0 -0
  195. package/apps/web/build/client/_app/immutable/entry/app.BeU4olDP.js.gz +0 -0
  196. package/apps/web/build/client/_app/immutable/entry/start.CNV5BTCO.js.br +0 -0
  197. package/apps/web/build/client/_app/immutable/entry/start.CNV5BTCO.js.gz +0 -0
  198. package/apps/web/build/client/_app/immutable/nodes/0.CdOP7y9P.js +0 -2
  199. package/apps/web/build/client/_app/immutable/nodes/0.CdOP7y9P.js.br +0 -0
  200. package/apps/web/build/client/_app/immutable/nodes/0.CdOP7y9P.js.gz +0 -0
  201. package/apps/web/build/client/_app/immutable/nodes/1.BZu6jsAH.js +0 -1
  202. package/apps/web/build/client/_app/immutable/nodes/1.BZu6jsAH.js.br +0 -0
  203. package/apps/web/build/client/_app/immutable/nodes/1.BZu6jsAH.js.gz +0 -0
  204. package/apps/web/build/client/_app/immutable/nodes/10.CZKScTFN.js +0 -1
  205. package/apps/web/build/client/_app/immutable/nodes/10.CZKScTFN.js.br +0 -0
  206. package/apps/web/build/client/_app/immutable/nodes/10.CZKScTFN.js.gz +0 -0
  207. package/apps/web/build/client/_app/immutable/nodes/11.4dBWH00t.js.br +0 -0
  208. package/apps/web/build/client/_app/immutable/nodes/11.4dBWH00t.js.gz +0 -0
  209. package/apps/web/build/client/_app/immutable/nodes/12.CSShcv5z.js +0 -1
  210. package/apps/web/build/client/_app/immutable/nodes/12.CSShcv5z.js.br +0 -0
  211. package/apps/web/build/client/_app/immutable/nodes/12.CSShcv5z.js.gz +0 -0
  212. package/apps/web/build/client/_app/immutable/nodes/13.jWUWoBcs.js +0 -3
  213. package/apps/web/build/client/_app/immutable/nodes/13.jWUWoBcs.js.br +0 -0
  214. package/apps/web/build/client/_app/immutable/nodes/13.jWUWoBcs.js.gz +0 -0
  215. package/apps/web/build/client/_app/immutable/nodes/14.H-jSqqen.js +0 -1
  216. package/apps/web/build/client/_app/immutable/nodes/14.H-jSqqen.js.br +0 -0
  217. package/apps/web/build/client/_app/immutable/nodes/14.H-jSqqen.js.gz +0 -0
  218. package/apps/web/build/client/_app/immutable/nodes/15.CpAoyhzV.js +0 -17
  219. package/apps/web/build/client/_app/immutable/nodes/15.CpAoyhzV.js.br +0 -0
  220. package/apps/web/build/client/_app/immutable/nodes/15.CpAoyhzV.js.gz +0 -0
  221. package/apps/web/build/client/_app/immutable/nodes/16.DT_-MxCT.js +0 -1
  222. package/apps/web/build/client/_app/immutable/nodes/16.DT_-MxCT.js.br +0 -0
  223. package/apps/web/build/client/_app/immutable/nodes/16.DT_-MxCT.js.gz +0 -0
  224. package/apps/web/build/client/_app/immutable/nodes/2.Dr646Vs5.js.br +0 -0
  225. package/apps/web/build/client/_app/immutable/nodes/2.Dr646Vs5.js.gz +0 -0
  226. package/apps/web/build/client/_app/immutable/nodes/3.Cgc-xN3x.js +0 -1
  227. package/apps/web/build/client/_app/immutable/nodes/3.Cgc-xN3x.js.br +0 -0
  228. package/apps/web/build/client/_app/immutable/nodes/3.Cgc-xN3x.js.gz +0 -0
  229. package/apps/web/build/client/_app/immutable/nodes/4.CYJQ4bWz.js +0 -1
  230. package/apps/web/build/client/_app/immutable/nodes/4.CYJQ4bWz.js.br +0 -0
  231. package/apps/web/build/client/_app/immutable/nodes/4.CYJQ4bWz.js.gz +0 -0
  232. package/apps/web/build/client/_app/immutable/nodes/5.DbHL-3Es.js +0 -1
  233. package/apps/web/build/client/_app/immutable/nodes/5.DbHL-3Es.js.br +0 -0
  234. package/apps/web/build/client/_app/immutable/nodes/5.DbHL-3Es.js.gz +0 -0
  235. package/apps/web/build/client/_app/immutable/nodes/6.BvWH2qas.js +0 -1
  236. package/apps/web/build/client/_app/immutable/nodes/6.BvWH2qas.js.br +0 -0
  237. package/apps/web/build/client/_app/immutable/nodes/6.BvWH2qas.js.gz +0 -0
  238. package/apps/web/build/client/_app/immutable/nodes/7.CmbiPMU3.js.br +0 -0
  239. package/apps/web/build/client/_app/immutable/nodes/7.CmbiPMU3.js.gz +0 -0
  240. package/apps/web/build/client/_app/immutable/nodes/8.B9897Zm9.js +0 -1
  241. package/apps/web/build/client/_app/immutable/nodes/8.B9897Zm9.js.br +0 -0
  242. package/apps/web/build/client/_app/immutable/nodes/8.B9897Zm9.js.gz +0 -0
  243. package/apps/web/build/client/_app/immutable/nodes/9.CGMmeMVC.js +0 -14
  244. package/apps/web/build/client/_app/immutable/nodes/9.CGMmeMVC.js.br +0 -0
  245. package/apps/web/build/client/_app/immutable/nodes/9.CGMmeMVC.js.gz +0 -0
  246. package/apps/web/build/server/_app/immutable/assets/_layout.Ch0v37a-.css +0 -2
@@ -1,17 +0,0 @@
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
-
3
- ## Overview
4
- Describe the purpose of this skill.
5
-
6
- ## Instructions
7
- 1. Step one
8
- 2. Step two
9
- `}));async function tt(){try{let e=await P.get(`/api/v1/vectors/stats`);e&&i(Ze,e,!0)}catch{}}async function Y(){i(Je,!0),i(Ye,``);try{let e=l(G)===`vector`?`&semantic=1`:``,t=l(U).trim()?`/api/v1/skills?q=`+encodeURIComponent(l(U).trim())+e:`/api/v1/skills?limit=250`;i(H,await P.get(t),!0),tt()}catch(e){i(Ye,e.message,!0)}finally{i(Je,!1)}}async function nt(e){i(Xe,!0),i(K,`instructions`);try{i(W,await P.get(`/api/v1/skills/`+encodeURIComponent(e)),!0)}catch(e){await L.fire({title:`Load Failed`,text:e.message,icon:`error`})}finally{i(Xe,!1)}}function rt(){i(J,{name:``,description:``,tags:``,embed_agent:``,content:`# Standard Operating Procedures
10
-
11
- ## Overview
12
- Describe the purpose of this skill.
13
-
14
- ## Instructions
15
- 1. Step one
16
- 2. Step two
17
- `},!0)}async function it(){let e=l(J).name.trim().toLowerCase().replace(/\s+/g,`-`);if(!e){await L.fire({title:`Validation Error`,text:`Please provide a skill name (e.g. helm-chart-scaffolding).`,icon:`warning`});return}if(!l(J).description.trim()){await L.fire({title:`Validation Error`,text:`Please provide a short description for the skill.`,icon:`warning`});return}i(Qe,!0);try{let t={...l(J),name:e},n=await P.post(`/api/v1/skills`,t);i(q,!1),rt(),await L.fire({title:`Skill Created!`,text:`Skill "${n.name}" successfully created and indexed into SQLite FTS5${n.embedded_in?` (embedded into @${n.embedded_in})`:``}.`,icon:`success`}),F.addNotification(`Created skill "${e}"`,`success`),await Y(),await nt(e)}catch(e){await L.fire({title:`Creation Failed`,text:e.message,icon:`error`})}finally{i(Qe,!1)}}async function at(e,t){try{await P.post(`/api/v1/skills/${encodeURIComponent(e)}/embed`,{agent:t}),F.addNotification(`Embedded "${e}" into @${t}`,`success`),await L.fire({title:`Skill Embedded`,text:`Skill "${e}" is now active for subagent @${t}.`,icon:`success`})}catch(e){await L.fire({title:`Embed Failed`,text:e.message,icon:`error`})}}async function ot(e,t){try{await P.post(`/api/v1/skills/${encodeURIComponent(e)}/unembed`,{agent:t}),F.addNotification(`Removed "${e}" from @${t}`,`info`),await L.fire({title:`Skill Removed`,text:`Skill "${e}" removed from @${t}.`,icon:`info`})}catch(e){await L.fire({title:`Unembed Failed`,text:e.message,icon:`error`})}}async function st(e){if(await L.confirm({title:`Delete Skill "${e}"?`,text:`This will remove the skill file from your village and delete its SQLite FTS5 chunk index.`,icon:`warning`,confirmText:`Yes, Delete It`,cancelText:`Cancel`}))try{await P.delete(`/api/v1/skills/${encodeURIComponent(e)}`),i(W,null),F.addNotification(`Deleted skill "${e}"`,`success`),await L.fire({title:`Deleted`,text:`Skill "${e}" has been removed.`,icon:`success`}),await Y()}catch(e){await L.fire({title:`Delete Failed`,text:e.message,icon:`error`})}}async function ct(){try{F.addNotification(`Re-indexing skills database...`,`info`),await P.post(`/api/v1/skills/reindex`,{}),await L.fire({title:`Migration Complete`,text:`SQLite FTS5 database successfully re-indexed all skills.`,icon:`success`}),await Y()}catch(e){await L.fire({title:`Reindex Failed`,text:e.message,icon:`error`})}}let lt;function ut(){clearTimeout(lt),lt=setTimeout(()=>{l(G)===`registry`?ht(l(U)):Y()},250)}j(Y),I(()=>l(q)||l(X));let X=c(!1),dt=c(``),Z=c(h([])),ft=c(!1),Q=c(``),$=c(``),pt;function mt(e){return!l(H)||!e?!1:l(H).some(t=>t.name===e||t.skill_name===e)}async function ht(e){i(ft,!0),i(Q,``);try{let t=(e===void 0?l(G)===`registry`?l(U):l(dt):e).trim()||`react`,n=await P.get(`/api/v1/skills/registry?q=`+encodeURIComponent(t));i(Z,n&&n.results?n.results:Array.isArray(n)?n:[],!0)}catch(e){i(Q,e.message,!0),i(Z,[],!0)}finally{i(ft,!1)}}function gt(e){i(G,`registry`),e!==void 0&&i(U,e,!0),ht(l(U)||`react`)}function _t(){clearTimeout(pt),pt=setTimeout(()=>{ht()},300)}async function vt(e){let t=e.skillId||e.name,n=e.source?e.source.trim():``;if(n&&!n.startsWith(`http://`)&&!n.startsWith(`https://`)&&!n.startsWith(`git@`)&&(n=`https://github.com/${n}`),t){i($,t,!0);try{F.addNotification(`Installing skill "${t}" from skills.sh...`,`info`);let e=await P.post(`/api/v1/skills/install`,{repo_url:n,skill_name:t}),r=e&&e.installed_path?e.installed_path:null;await L.fire({title:`Skill Installed!`,text:r?`Skill "${t}" verified on disk at:\n${r}`:`Skill "${t}" installed and verified.`,icon:`success`}),F.addNotification(`Installed skill "${t}"`,`success`),i(X,!1),await Y(),l(G)!==`registry`&&await nt(t)}catch(e){await L.fire({title:`Installation Failed`,text:e.message,icon:`error`})}finally{i($,``)}}}function yt(e){e.key===`Escape`&&(l(q)&&i(q,!1),l(X)&&i(X,!1))}var bt=qe();E(`keydown`,N,yt);var xt=m(bt),St=n(xt),Ct=n(St),wt=p(n(Ct),2),Tt=n(wt),Et=p(Tt,2),Dt=p(Et,2);e(wt),e(Ct),e(St);var Ot=p(St,2),kt=n(Ot),At=p(n(kt),2);y(At);var jt=p(At,2),Mt=e=>{var n=R();t(`click`,n,()=>{i(U,``),l(G)===`registry`?ht(``):Y()}),M(e,n)};v(jt,e=>{l(U)&&e(Mt)}),e(kt);var Nt=p(kt,2),Pt=n(Nt),Ft=n(Pt),It=p(Ft,2),Lt=p(It,2);e(Pt);var Rt=p(Pt,2),zt=e=>{var t=z(),n=p(m(t),2),r=a(n);o(()=>d(r,`${l(Z).length??``} found`)),M(e,t)},Bt=e=>{var t=B(),n=m(t),r=a(n),i=p(n,2),s=a(i);o(()=>{k(n,`title`,`Offline Neural RAG: ${(l(Ze).model||`IBM Granite Multilingual`)??``} + ${(l(Ze).reranker||`MS MARCO MiniLM Reranker`)??``}`),d(r,`⚡ ${(l(Ze).embedded_chunks||l(Ze).total_chunks||989)??``} Vector Chunks (Dual Models Active)`),d(s,`${l(H).length??``} skills`)}),M(e,t)};v(Rt,e=>{l(G)===`registry`?e(zt):e(Bt,-1)}),e(Nt),e(Ot);var Vt=p(Ot,2),Ht=r=>{var i=ue(),s=n(i),c=n(s),f=p(n(c),2),h=p(n(f),2),g=p(n(h)),_=a(g);u(),e(h),e(f),e(c);var y=p(c,2),b=n(y),x=a(b);e(y),e(s);var S=p(s,2),T=t=>{var n=ee();w(n,20,()=>[,,,,,,],C,(e,t)=>{var n=V();M(e,n)}),e(n),M(t,n)},E=e=>{var t=te(),n=a(t);o(()=>d(n,`Failed to query skills.sh registry: ${l(Q)??``}`)),M(e,t)},D=t=>{var r=ne(),i=p(n(r),2),s=a(i);u(2),e(r),o(()=>d(s,`No skills found matching "${l(U)??``}"`)),M(t,r)},O=r=>{var i=ee();w(i,21,()=>l(Z),C,(r,i,s)=>{let c=A(()=>l(i).skillId||l(i).name),f=A(()=>mt(l(c)));var h=le(),g=n(h),_=n(g),y=n(_),b=n(y);b.textContent=`#${s+1}`;var x=p(b,2),S=a(x,!0);e(y);var C=p(y,2),w=e=>{var t=re(),n=a(t);o(e=>d(n,`${e??``} installs`),[()=>l(i).installs.toLocaleString()]),M(e,t)};v(C,e=>{l(i).installs!==void 0&&e(w)}),e(_);var T=p(_,2),E=t=>{var r=ie(),s=p(n(r),2),c=a(s,!0);e(r),o(()=>{k(s,`href`,`https://github.com/${l(i).source??``}`),d(c,l(i).source)}),M(t,r)};v(T,e=>{l(i).source&&e(E)}),e(g);var D=p(g,2),O=n(D),j=e=>{var t=ae();M(e,t)},N=r=>{var s=ce(),f=n(s),h=e=>{var t=oe(),n=p(m(t),2),r=a(n);o(()=>d(r,`Installing "${l(c)??``}"...`)),M(e,t)},g=e=>{var t=se();u(2),M(e,t)};v(f,e=>{l($)===l(c)?e(h):e(g,-1)}),e(s),o(()=>s.disabled=l($)===l(c)),t(`click`,s,()=>vt(l(i))),M(r,s)};v(O,e=>{l(f)?e(j):e(N,-1)}),e(D),e(h),o(()=>{k(x,`title`,l(c)),d(S,l(c))}),M(r,h)}),e(i),M(r,i)};v(S,e=>{l(ft)?e(T):l(Q)?e(E,1):l(Z).length===0?e(D,2):e(O,-1)}),e(i),o(()=>{d(_,`konoha skill search ${(l(U)||`react`)??``}`),d(x,`Found ${l(Z).length??``} open-source skills`)}),M(r,i)},Ut=e=>{var t=de();M(e,t)},Wt=e=>{var t=fe(),n=a(t);o(()=>d(n,`Failed to load skills: ${l(Ye)??``}`)),M(e,t)},Gt=r=>{var s=je(),c=n(s),h=n(c),g=r=>{var i=me(),s=p(n(i),2),c=e=>{var n=pe(),r=m(n),i=a(r),s=p(r,2),c=a(s);o(()=>{d(i,`"${l(U)??``}" is not installed locally.`),d(c,`🌐 Search skills.sh for "${l(U)??``}"`)}),t(`click`,s,()=>gt(l(U))),M(e,n)};v(s,e=>{l(U)&&e(c)}),e(i),M(r,i)};v(h,e=>{l(H).length===0&&e(g)});var _=p(h,2);w(_,17,()=>l(H),e=>e.name,(r,i)=>{let s=A(()=>l(W)&&l(W).name===l(i).name);var c=_e(),u=n(c),f=n(u),m=a(f,!0),h=p(f,2),g=a(h,!0);e(u);var _=p(u,2),y=t=>{var n=ge();w(n,21,()=>String(l(i).tags).split(`,`).slice(0,3),C,(e,t)=>{var n=he(),r=a(n,!0);o(e=>d(r,e),[()=>l(t).trim()]),M(e,n)}),e(n),M(t,n)};v(_,e=>{l(i).tags&&e(y)});var b=p(_,2),S=n(b),T=a(S),E=p(S,2),D=a(E);e(b),e(c),o(e=>{x(c,l(s)?`border-color: var(--color-primary); background-color: var(--color-primary-glow); box-shadow: 0 0 0 1px var(--color-primary);`:`border-color: var(--color-border); background-color: var(--color-surface);`),d(m,l(i).name),d(g,l(i).type||`skill`),d(T,`${e??``} KB`),d(D,`${(l(i).line_count||0)??``} lines`)},[()=>l(i).byte_size?Math.round(l(i).byte_size/1024):0]),t(`click`,c,()=>nt(l(i).name)),M(r,c)}),e(c);var y=p(c,2),T=n(y),E=e=>{var t=ve();M(e,t)},D=r=>{var s=Oe(),c=n(s),f=n(c),m=n(f),h=n(m),g=a(h,!0),_=p(h,2),y=a(_,!0);e(m);var T=p(m,2),E=a(T);e(f);var D=p(f,2),k=a(D);e(c);var A=p(c,2),j=p(n(A),2),N=n(j);w(N,21,()=>et,C,(e,t)=>{var n=ye(),r=a(n,!0),i={};o(()=>{d(r,l(t).name),i!==(i=l(t).id)&&(n.value=(n.__value=i)??``)}),M(e,n)}),e(N),O(N);var P=p(N,2),F=p(P,2);e(j),e(A);var I=p(A,2),L=t=>{var r=xe(),i=p(n(r),2);w(i,21,()=>String(l(W).tags).split(`,`),C,(e,t)=>{var n=be(),r=a(n,!0);o(e=>d(r,e),[()=>l(t).trim()]),M(e,n)}),e(i),e(r),M(t,r)};v(I,e=>{l(W).tags&&e(L)});var R=p(I,2),z=n(R),B=n(z),V=p(B,2),ee=p(n(V),2),te=a(ee,!0);e(V),e(z);var ne=p(z,2),re=t=>{var r=Se(),i=n(r),s=p(n(i),2),c=a(s);e(i);var u=p(i,2),f=a(u,!0);e(r),o(()=>{d(c,`${(l(W).line_count||0)??``} lines (${(l(W).byte_size||0)??``} bytes)`),d(f,l(W).content)}),M(t,r)},ie=t=>{var r=De(),i=p(n(r),2),s=t=>{var r=Te();w(r,21,()=>l(W).chunks,C,(t,r)=>{var i=we(),s=n(i),c=n(s),f=a(c);u(2),e(s);var m=p(s,2),h=t=>{var i=Ce(),s=p(n(i),2),c=a(s);e(i),o(e=>d(c,`[${e??``} ... 384 dimensions]`),[()=>l(r).vector_sample.join(`, `)]),M(t,i)};v(m,e=>{l(r).vector_sample&&l(r).vector_sample.length>0&&e(h)});var g=p(m,2),_=a(g,!0);e(i),o(()=>{d(f,`Chunk #${l(r).chunk_index+1}`),d(_,l(r).chunk_text)}),M(t,i)}),e(r),M(t,r)},c=e=>{var t=Ee();M(e,t)};v(i,e=>{l(W).chunks&&l(W).chunks.length>0?e(s):e(c,-1)}),e(r),M(t,r)};v(ne,e=>{l(K)===`instructions`?e(re):l(K)===`vectors`&&e(ie,1)}),e(R),e(s),o(()=>{d(g,l(W).name),d(y,l(W).type||`skill`),d(E,`Path: ${(l(W).file_path||`Embedded in SQLite database`)??``}`),S(B,1,`px-3.5 py-1.5 rounded-xl text-xs font-bold transition-all cursor-pointer ${l(K)===`instructions`?`bg-indigo-600 text-white shadow-sm`:`hover:bg-slate-500/10`}`),x(B,l(K)===`instructions`?``:`color: var(--color-text-muted);`),S(V,1,`px-3.5 py-1.5 rounded-xl text-xs font-bold transition-all cursor-pointer flex items-center gap-1.5 ${l(K)===`vectors`?`bg-emerald-600 text-white shadow-sm`:`hover:bg-slate-500/10`}`),x(V,l(K)===`vectors`?``:`color: var(--color-text-muted);`),S(ee,1,`px-1.5 py-0.2 rounded-full text-[10px] font-mono ${l(K)===`vectors`?`bg-white/20 text-white`:`bg-emerald-500/20 text-emerald-600 dark:text-emerald-400`}`),d(te,l(W).chunks_count||l(W).chunks?.length||0)}),t(`click`,k,()=>st(l(W).name)),b(N,()=>l($e),e=>i($e,e)),t(`click`,P,()=>at(l(W).name,l($e))),t(`click`,F,()=>ot(l(W).name,l($e))),t(`click`,B,()=>i(K,`instructions`)),t(`click`,V,()=>i(K,`vectors`)),M(r,s)},k=r=>{var i=f(),s=m(i),c=r=>{var i=ke(),s=p(n(i),2),c=n(s),f=a(c),m=p(c,2),h=p(n(m),3),g=a(h);u(),e(m),e(s);var _=p(s,2),v=p(n(_),2),y=a(v);e(_),e(i),o(()=>{d(f,`No local skills matching "${l(U)??``}"`),d(g,`konoha skill search ${l(U)??``}`),d(y,`Search skills.sh for "${l(U)??``}"`)}),t(`click`,_,()=>gt(l(U))),M(r,i)},h=e=>{var t=Ae();M(e,t)};v(s,e=>{l(H).length===0&&l(U)?e(c):e(h,-1)}),M(r,i)};v(T,e=>{l(Xe)?e(E):l(W)?e(D,1):e(k,-1)}),e(y),e(s),M(r,s)};v(Vt,e=>{l(G)===`registry`?e(Ht):l(Je)?e(Ut,1):l(Ye)?e(Wt,2):e(Gt,-1)}),e(xt);var Kt=p(xt,2),qt=r=>{var c=Pe(),f=n(c),m=n(f),h=p(n(m),2);e(m);var g=p(m,2),_=n(g),x=p(n(_),2);y(x),e(_);var S=p(_,2),E=p(n(S),2);y(E),e(S);var D=p(S,2),k=n(D),A=p(n(k),2);y(A),e(k);var j=p(k,2),N=p(n(j),2),P=n(N);P.value=P.__value=``;var F=p(P);w(F,17,()=>et,C,(e,t)=>{var n=ye(),r=a(n,!0),i={};o(()=>{d(r,l(t).name),i!==(i=l(t).id)&&(n.value=(n.__value=i)??``)}),M(e,n)}),e(N),O(N),e(j),e(D);var I=p(D,2),L=p(n(I),2);s(L),e(I),e(g);var R=p(g,2),z=n(R),B=p(z,2),V=n(B),ee=e=>{var t=Me();u(2),M(e,t)},te=e=>{var t=Ne();M(e,t)};v(V,e=>{l(Qe)?e(ee):e(te,-1)}),e(B),e(R),e(f),e(c),o(e=>B.disabled=e,[()=>l(Qe)||!l(J).name.trim()]),t(`click`,c,()=>i(q,!1)),t(`click`,f,e=>e.stopPropagation()),t(`click`,h,()=>i(q,!1)),T(x,()=>l(J).name,e=>l(J).name=e),T(E,()=>l(J).description,e=>l(J).description=e),T(A,()=>l(J).tags,e=>l(J).tags=e),b(N,()=>l(J).embed_agent,e=>l(J).embed_agent=e),T(L,()=>l(J).content,e=>l(J).content=e),t(`click`,z,()=>i(q,!1)),t(`click`,B,it),M(r,c)};v(Kt,e=>{l(q)&&e(qt)});var Jt=p(Kt,2),Yt=r=>{var s=Ke(),c=n(s),h=n(c),g=p(n(h),2);e(h);var _=p(h,2),b=p(n(_),2);y(b);var x=p(b,2),S=e=>{var n=R();t(`click`,n,()=>{i(dt,``),ht()}),M(e,n)};v(x,e=>{l(dt)&&e(S)}),e(_);var E=p(_,2),D=n(E),O=t=>{var n=Ie();w(n,20,()=>[,,,,],C,(e,t)=>{var n=Fe();M(e,n)}),e(n),M(t,n)},j=e=>{var t=Le(),n=a(t);o(()=>d(n,`Failed to fetch from skills.sh registry: ${l(Q)??``}`)),M(e,t)},N=e=>{var t=Re();M(e,t)},P=r=>{var i=f(),s=m(i);w(s,17,()=>l(Z),C,(r,i)=>{let s=A(()=>l(i).skillId||l(i).name),c=A(()=>mt(l(s)));var f=Ge(),m=n(f),h=n(m),g=n(h),_=a(g,!0),y=p(g,2),b=e=>{var t=ze(),n=a(t);o(e=>d(n,`${e??``} installs`),[()=>l(i).installs.toLocaleString()]),M(e,t)};v(y,e=>{l(i).installs!==void 0&&e(b)}),e(h);var x=p(h,2),S=t=>{var r=Be(),a=p(n(r),2),s=n(a);u(),e(a),e(r),o(()=>{k(a,`href`,`https://github.com/${l(i).source??``}`),d(s,`github.com/${l(i).source??``} `)}),M(t,r)};v(x,e=>{l(i).source&&e(S)}),e(m);var C=p(m,2),w=n(C),T=e=>{var t=Ve();M(e,t)},E=r=>{var a=We(),c=n(a),d=e=>{var t=He();u(2),M(e,t)},f=e=>{var t=Ue();u(2),M(e,t)};v(c,e=>{l($)===l(s)?e(d):e(f,-1)}),e(a),o(()=>a.disabled=l($)===l(s)),t(`click`,a,()=>vt(l(i))),M(r,a)};v(w,e=>{l(c)?e(T):e(E,-1)}),e(C),e(f),o(()=>d(_,l(s))),M(r,f)}),M(r,i)};v(D,e=>{l(ft)?e(O):l(Q)?e(j,1):l(Z).length===0?e(N,2):e(P,-1)}),e(E);var F=p(E,2),I=p(n(F),2);e(F),e(c),e(s),t(`click`,s,()=>i(X,!1)),t(`click`,c,e=>e.stopPropagation()),t(`click`,g,()=>i(X,!1)),t(`input`,b,_t),T(b,()=>l(dt),e=>i(dt,e)),t(`click`,I,()=>i(X,!1)),M(r,s)};v(Jt,e=>{l(X)&&e(Yt)}),o(()=>{S(Et,1,`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 ${l(G)===`registry`?`ring-2 ring-blue-500 font-bold`:``}`),k(At,`placeholder`,l(G)===`registry`?`Search skills.sh global registry (e.g. react, docker, k8s, nextjs)...`:l(G)===`vector`?`Semantic Vector Search (e.g. cloud deployment, cyber defense, mobile layout)...`:`Search local skills by name, tag, or topic (e.g. helm, cybersecurity, sveltekit)...`),S(Ft,1,`px-2.5 py-1 rounded-lg font-bold transition-all cursor-pointer ${l(G)===`fts`?`bg-indigo-600 text-white shadow-sm`:`text-slate-600 dark:text-slate-400`}`),S(It,1,`px-2.5 py-1 rounded-lg font-bold transition-all cursor-pointer flex items-center gap-1 ${l(G)===`vector`?`bg-emerald-600 text-white shadow-sm`:`text-slate-600 dark:text-slate-400`}`),S(Lt,1,`px-2.5 py-1 rounded-lg font-bold transition-all cursor-pointer flex items-center gap-1.5 ${l(G)===`registry`?`bg-blue-600 text-white shadow-sm`:`text-slate-600 dark:text-slate-400`}`)}),t(`click`,Tt,()=>i(q,!0)),t(`click`,Et,()=>gt(l(U)||`react`)),t(`click`,Dt,ct),t(`input`,At,ut),T(At,()=>l(U),e=>i(U,e)),t(`click`,Ft,()=>{i(G,`fts`),Y()}),t(`click`,It,()=>{i(G,`vector`),Y()}),t(`click`,Lt,()=>gt(l(U)||`react`)),M(r,bt),_()}D([`click`,`input`]);function U(e){H(e,{})}export{U as component};
@@ -1 +0,0 @@
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};
@@ -1 +0,0 @@
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 +0,0 @@
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};
@@ -1 +0,0 @@
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,W as f,X as p,Y as m,_ as h,f as g,g as _,h as v,k as y,o as b,v as x,w as S}from"../chunks/PrdhfbrQ.js";import{t as C}from"../chunks/7LmsTWIo.js";import{t as w}from"../chunks/CBY268r4.js";import"../chunks/C3-t9btS.js";var T=r(`<div class="p-4 rounded-2xl border border-rose-200 bg-rose-50 text-rose-800 text-xs font-semibold"> </div>`),E=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>Checking client configurations...</span></div></div>`),D=r(`<svg class="animate-spin w-3.5 h-3.5 text-rose-600 shrink-0" 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>Disconnecting...</span>`,1),O=r(`<span>Disconnect</span>`),k=r(`<button type="button" class="btn-3d relative z-30 pointer-events-auto px-4 py-1.5 rounded-xl text-xs font-bold text-rose-700 hover:text-rose-800 hover:bg-rose-50 border border-rose-200 transition-all cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed select-none inline-flex items-center gap-1.5" style="transform: translateZ(25px);"><!></button>`),A=r(`<svg class="animate-spin w-3.5 h-3.5 text-white shrink-0" 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>Connecting...</span>`,1),j=r(`<span>Setup Integration</span>`),M=r(`<button type="button" class="btn-3d relative z-30 pointer-events-auto px-4 py-1.5 rounded-xl text-xs font-bold text-white transition-all shadow-sm cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed select-none inline-flex items-center gap-1.5" style="background-color: var(--color-primary, #7c3aed); transform: translateZ(25px);"><!></button>`),N=r(`<div class="glass-card-3d tilt-3d flex flex-col justify-between p-6 rounded-3xl border"><div><div class="flex items-center justify-between gap-3 mb-4"><div class="flex items-center gap-3"><div class="w-10 h-10 rounded-2xl bg-indigo-50 border border-indigo-200 flex items-center justify-center text-indigo-700 shadow-sm shrink-0"><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="M8 9l3 3-3 3m5 0h3M5 20h14a2 2 0 002-2V6a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"></path></svg></div> <h3 class="text-base font-black text-slate-900 tracking-tight"> </h3></div> <span><span></span> </span></div> <div class="p-3 rounded-xl bg-slate-50 border border-slate-200 mb-6"><div class="text-[10px] font-bold text-slate-500 uppercase tracking-wider mb-1">Config Location</div> <div class="font-mono text-xs font-semibold text-slate-800 truncate"> </div></div></div> <div class="relative z-30 pt-4 border-t border-slate-200 flex items-center justify-between gap-3 pointer-events-auto"><span class="text-[11px] font-semibold text-slate-600"> </span> <!></div></div>`),P=r(`<div class="scene-3d grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6"></div>`),F=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="M9.75 17L9 20l-1 1h8l-1-1-.75-3M3 13h18M5 17h14a2 2 0 002-2V5a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"></path></svg> Multi-Client Integration</div> <h2 class="text-2xl lg:text-3xl font-black text-slate-900 tracking-tight">Coding Clients (7 IDEs & CLIs)</h2> <p class="text-sm font-semibold text-slate-700 max-w-2xl leading-relaxed">Auto-inject Konoha MCP tools and RTK output filtering into Antigravity, Cursor, Claude Code, OpenCode, Command Code, Codex, and Pi (pi.dev).</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">Supported Clients</div> <div class="text-xl font-black text-indigo-600">7 Platforms</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">Connected</div> <div class="text-xl font-black text-emerald-600"> </div></div></div></div></div> <!> <!></div>`);function I(r,y){p(y,!0);let I=s(f([])),L=s(!0),R=s(``),z=s(null);async function B(){i(L,!0),i(R,``);try{i(I,await C.get(`/api/v1/clients`),!0)}catch(e){i(R,e.message,!0)}finally{i(L,!1)}}async function V(e,t){if(!c(z)){i(z,e,!0);try{await C.post(`/api/v1/clients/`+e+`/setup`,{});let n=c(I).find(t=>t.id===e);n&&(n.configured=!0),w.addNotification(`Connected Konoha MCP tools for ${t}!`,`success`),await B()}catch(e){w.addNotification(`Setup failed for ${t}: ${e.message}`,`error`)}finally{i(z,null)}}}async function H(e,t){if(!c(z)){i(z,e,!0);try{await C.post(`/api/v1/clients/`+e+`/remove`,{});let n=c(I).find(t=>t.id===e);n&&(n.configured=!1),w.addNotification(`Disconnected Konoha MCP tools from ${t}.`,`info`),await B()}catch(e){w.addNotification(`Disconnect failed for ${t}: ${e.message}`,`error`)}finally{i(z,null)}}}x(B);var U=F(),W=n(U),G=n(W),K=d(n(G),2),q=d(n(K),2),J=d(n(q),2),Y=a(J);e(q),e(K),e(G),e(W);var X=d(W,2),Z=e=>{var t=T(),n=a(t,!0);o(()=>u(n,c(R))),S(e,t)};h(X,e=>{c(R)&&e(Z)});var Q=d(X,2),$=e=>{var t=E();S(e,t)},ee=r=>{var i=P();v(i,21,()=>c(I),_,(r,i)=>{var s=N(),f=n(s),p=n(f),m=n(p),_=d(n(m),2),v=a(_,!0);e(m);var y=d(m,2),x=n(y),C=d(x);e(y),e(p);var w=d(p,2),T=d(n(w),2),E=a(T,!0);e(w),e(f);var P=d(f,2),F=n(P),I=a(F,!0),L=d(F,2),R=r=>{var a=k(),s=n(a),u=e=>{var t=D();l(2),S(e,t)},d=e=>{var t=O();S(e,t)};h(s,e=>{c(z)===c(i).id?e(u):e(d,-1)}),e(a),o(()=>{b(a,`data-testid`,`disconnect-${c(i).id??``}`),b(a,`data-client-id`,c(i).id),a.disabled=c(z)===c(i).id,b(a,`aria-label`,`Disconnect ${c(i).name??``}`)}),t(`click`,a,e=>{e.stopPropagation(),H(c(i).id,c(i).name)}),S(r,a)},B=r=>{var a=M(),s=n(a),u=e=>{var t=A();l(2),S(e,t)},d=e=>{var t=j();S(e,t)};h(s,e=>{c(z)===c(i).id?e(u):e(d,-1)}),e(a),o(()=>{b(a,`data-testid`,`setup-${c(i).id??``}`),b(a,`data-client-id`,c(i).id),a.disabled=c(z)===c(i).id,b(a,`aria-label`,`Setup ${c(i).name??``}`)}),t(`click`,a,e=>{e.stopPropagation(),V(c(i).id,c(i).name)}),S(r,a)};h(L,e=>{c(i).configured?e(R):e(B,-1)}),e(P),e(s),o(()=>{u(v,c(i).name),g(y,1,`inline-flex items-center gap-1.5 px-2.5 py-0.5 rounded-full text-[10px] font-extrabold uppercase border ${c(i).configured?`bg-emerald-100 text-emerald-800 border-emerald-300`:`bg-slate-100 text-slate-700 border-slate-300`}`),g(x,1,`w-1.5 h-1.5 rounded-full ${c(i).configured?`bg-emerald-500`:`bg-slate-400`}`),u(C,` ${c(i).configured?`Active`:`Unconfigured`}`),b(T,`title`,c(i).configPath),u(E,c(i).configPath),u(I,c(i).configured?`MCP tools enabled`:`Ready to link`)}),S(r,s)}),e(i),S(r,i)};h(Q,e=>{c(L)?e($):e(ee,-1)}),e(U),o(e=>u(Y,`${e??``} Active`),[()=>c(I).filter(e=>e.configured).length]),S(r,U),m()}y([`click`]);function L(e){I(e,{})}export{L as component};
@@ -1 +0,0 @@
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,U as f,V as p,W as m,X as h,Y as g,_,c as v,g as y,h as b,i as x,j as S,k as C,l as w,q as T,v as E,w as D,z as O}from"../chunks/PrdhfbrQ.js";import{t as k}from"../chunks/7LmsTWIo.js";import{t as A}from"../chunks/fbrtLByB.js";import"../chunks/C3-t9btS.js";import{t as j}from"../chunks/Dzm74gVd.js";var M=r(`<div class="p-4 rounded-2xl border border-rose-200 bg-rose-50 text-rose-800 text-xs font-semibold"> </div>`),N=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 workspace profile...</span></div></div>`),P=r(`<button type="button" class="btn-3d px-3.5 py-2 rounded-xl text-xs font-bold text-rose-700 bg-rose-50 border border-rose-200 hover:bg-rose-100 transition-all cursor-pointer shadow-sm disabled:opacity-50" title="Clear architectural invariants for this workspace">Clear Invariants</button>`),ee=r(`<div class="p-3.5 rounded-xl border border-slate-200 bg-white/80 space-y-2 flex flex-col justify-between"><div class="space-y-1"><div class="flex items-center justify-between"><span class="text-[10px] font-extrabold text-purple-700 bg-purple-50 px-2 py-0.5 rounded border border-purple-200"> </span> <span class="text-[10px] font-bold text-slate-500 font-mono"> </span></div> <p class="text-xs font-semibold text-slate-800 leading-normal"> </p></div> <div class="flex items-center justify-between pt-2 border-t border-slate-100 text-[11px]"><span class="text-[10px] text-slate-400 font-mono uppercase"> </span> <button type="button" class="text-rose-600 hover:text-rose-800 font-bold cursor-pointer inline-flex items-center gap-1 transition-colors" title="Delete this memory item"><svg class="w-3 h-3" 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</span></button></div></div>`),te=r(`<div class="grid grid-cols-1 md:grid-cols-2 gap-3"></div>`),ne=r(`<div class="p-4 rounded-xl border border-dashed border-slate-300 bg-white/40 text-center"><p class="text-xs font-bold text-slate-500">No episodic learnings saved for this project yet.</p> <p class="text-[11px] text-slate-400 mt-0.5">Verified learnings auto-persist here during subagent delegations and auto-compact across turns.</p></div>`),re=r(`<p class="text-xs font-semibold text-slate-700 line-clamp-2"> </p>`),ie=r(`<div class="glass-card-3d tilt-3d rounded-2xl p-5 border flex flex-col justify-between"><div class="space-y-2"><div class="flex items-center justify-between"><span class="text-xs font-bold text-slate-900 truncate"> </span> <span class="text-[10px] font-bold px-2 py-0.5 rounded bg-slate-100 text-slate-700 border border-slate-200"> </span></div> <p class="text-[11px] font-mono text-slate-600 truncate"> </p> <!></div> <div class="mt-4 pt-3 border-t border-slate-200 flex items-center justify-between text-[11px]"><span class="font-mono text-slate-500"> </span> <button type="button" class="text-rose-600 hover:text-rose-800 font-bold cursor-pointer">Delete</button></div></div>`),ae=r(`<div class="space-y-4 pt-4"><div class="flex flex-col sm:flex-row sm:items-center justify-between gap-2"><div><h3 class="text-lg font-black text-slate-900"> </h3> <p class="text-xs font-semibold text-slate-600">Registered workspace profiles and their cached contexts.</p></div> <button type="button" class="btn-3d self-start sm:self-auto inline-flex items-center gap-1.5 px-3 py-1.5 rounded-xl text-xs font-bold text-rose-700 bg-rose-50 border border-rose-200 hover:bg-rose-100 transition-all cursor-pointer shadow-sm" title="Prune all registered workspace profiles"><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>Prune All Workspaces</span></button></div> <div class="scene-3d grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4"></div></div>`),oe=r(`<div class="glass-card-3d rounded-3xl p-6 lg:p-8 border space-y-6"><div class="flex flex-col md:flex-row md:items-center justify-between gap-4 pb-6 border-b border-slate-200"><div><span class="text-[10px] font-extrabold uppercase tracking-widest text-purple-700 bg-purple-100 px-2.5 py-0.5 rounded-full border border-purple-200">Active Workspace</span> <h3 class="text-xl font-black text-slate-900 mt-2"> </h3> <p class="text-xs font-mono text-slate-600 mt-0.5"> </p></div> <div class="flex flex-wrap items-center gap-2"><div class="px-3 py-1.5 rounded-xl border border-blue-200 bg-blue-50 text-blue-800 text-xs font-bold">Framework: <span class="capitalize"> </span></div> <div class="px-3 py-1.5 rounded-xl border border-emerald-200 bg-emerald-50 text-emerald-800 text-xs font-bold">Styling: <span> </span></div> <div class="px-3 py-1.5 rounded-xl border border-amber-200 bg-amber-50 text-amber-800 text-xs font-bold">PM: <span> </span></div></div></div> <div class="space-y-3"><div class="flex items-center justify-between"><div><h4 class="text-sm font-extrabold text-slate-900">Architectural Invariants & Constraints</h4> <p class="text-xs font-semibold text-slate-600">Rules permanently remembered and injected to subagents for this workspace.</p></div> <div class="flex items-center gap-2"><!> <button type="button" class="btn-3d px-5 py-2 rounded-xl text-xs font-bold text-white transition-all shadow-md cursor-pointer disabled:opacity-50" style="background-color: var(--color-primary, #7c3aed);"> </button></div></div> <textarea rows="5" placeholder="e.g. Always use port 1404; Pure light mode is first-class default; zero dark mode enforcement; use Tailwind v4; no hamburger in header on mobile dock..." class="w-full p-4 rounded-2xl text-xs font-semibold text-slate-900 border border-slate-300 bg-white/90 focus:ring-2 focus:ring-purple-500 focus:outline-none leading-relaxed"></textarea></div> <div class="pt-6 border-t border-slate-200 space-y-4"><div class="flex flex-col sm:flex-row sm:items-center justify-between gap-2"><div><h4 class="text-sm font-extrabold text-slate-900"> </h4> <p class="text-xs font-semibold text-slate-600">Episodic memories & rules preserved specifically for this workspace context.</p></div> <div class="flex items-center gap-2 self-start sm:self-auto"><button type="button" class="btn-3d inline-flex items-center gap-1.5 px-3 py-1.5 rounded-xl text-xs font-bold text-white transition-all cursor-pointer shadow-sm" style="background-color: var(--color-primary, #7c3aed);" title="Add episodic learning for this project"><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 Learning</span></button> <button type="button" class="btn-3d inline-flex items-center gap-1.5 px-3 py-1.5 rounded-xl text-xs font-bold text-rose-700 bg-rose-50 border border-rose-200 hover:bg-rose-100 transition-all cursor-pointer shadow-sm" title="Prune all episodic learnings for this project"><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>Prune Learnings</span></button></div></div> <!></div></div> <!>`,1),F=r(`<option> </option>`),se=r(`<div class="fixed inset-0 z-[100] flex items-center justify-center p-4 bg-slate-900/40 backdrop-blur-md animate-in fade-in duration-200"><div class="rise-3d relative w-full max-w-lg overflow-hidden rounded-3xl border border-slate-200 bg-white/95 p-6 shadow-2xl backdrop-blur-xl" style="box-shadow: var(--shadow-3d);"><div class="flex items-center justify-between pb-4 border-b border-slate-200"><div><h3 class="text-lg font-black text-slate-900">Add Project-Scoped Learning</h3> <p class="text-xs font-semibold text-slate-500">Record an episodic rule or constraint specifically for this workspace.</p></div> <button type="button" aria-label="Close modal" title="Close modal" class="p-1 rounded-xl text-slate-400 hover:text-slate-600 hover:bg-slate-100 transition-all cursor-pointer"><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="space-y-4 pt-4"><div class="grid grid-cols-2 gap-4"><div><label for="learning-agent-select" class="block text-xs font-bold text-slate-800 mb-1">Target Agent</label> <select id="learning-agent-select" 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"></select></div> <div><label for="learning-type-select" class="block text-xs font-bold text-slate-800 mb-1">Memory Type</label> <select id="learning-type-select" 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>Rule (Strict Mandate)</option><option>Episodic (Learning / Incident)</option><option>Fact (Knowledge)</option><option>Preference (Style)</option></select></div></div> <div><label for="learning-content-input" class="block text-xs font-bold text-slate-800 mb-1">Learning Content</label> <textarea id="learning-content-input" rows="4" placeholder="e.g. Always use port 1404; Pure light mode is first-class default; use Tailwind v4 grid tokens..." 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"></textarea></div></div> <div class="flex items-center justify-end gap-3 pt-4 border-t border-slate-200 mt-4"><button type="button" class="px-4 py-2 rounded-xl text-xs font-bold text-slate-600 hover:bg-slate-100 transition-colors cursor-pointer">Cancel</button> <button type="button" class="btn-3d px-5 py-2 rounded-xl text-xs font-bold text-white transition-all shadow-md cursor-pointer" style="background-color: var(--color-primary, #7c3aed);">Save Learning</button></div></div></div>`),ce=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="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> Workspace Architecture & Tech Stack</div> <h2 class="text-2xl lg:text-3xl font-black text-slate-900 tracking-tight">Project Context Memory</h2> <p class="text-sm font-semibold text-slate-700 max-w-2xl leading-relaxed">Detected frameworks, styling engines, package managers, and permanent architectural invariants preserved across turns.</p></div> <div class="flex 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 text-rose-700 bg-rose-50 border border-rose-200 hover:bg-rose-100 transition-all cursor-pointer shadow-sm" title="Prune all episodic learnings for this project"><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> <span>Prune Context</span></button> <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:bg-slate-50 transition-all shadow-sm cursor-pointer"><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>Refresh</span></button></div></div></div> <!> <!></div> <!>`,1);function I(r,C){h(C,!0);let I=c(null),L=c(m([])),R=c(m([])),z=c(!0),B=c(!1),V=c(``),H=c(``),U=c(!1),W=c(m({agentName:`jonin`,content:``,memoryType:`rule`}));A(()=>l(U));function G(e){e.key===`Escape`&&l(U)&&i(U,!1)}let le=[{id:`jonin`,name:`@jonin (UI & Frontend)`},{id:`anbu`,name:`@anbu (Backend & DevOps)`},{id:`kage`,name:`@kage (Architecture & Audit)`},{id:`chunin`,name:`@chunin (Research & Intel)`},{id:`genin`,name:`@genin (Code Review & Tracing)`},{id:`sannin`,name:`@sannin (Workflow Router)`},{id:`tokubetsu-jonin`,name:`@tokubetsu-jonin (Docs & Scribe)`},{id:`global`,name:`@global (All Agents)`}];async function K(){i(z,!0),i(V,``);try{let[e,t]=await Promise.all([k.get(`/api/v1/projects/current`),k.get(`/api/v1/projects`)]);i(I,e.profile||{},!0),i(L,e.memories||[],!0),i(H,l(I).context_summary||``,!0),i(R,t.projects||[],!0)}catch(e){i(V,e.message,!0)}finally{i(z,!1)}}async function ue(){if(!l(I)?.project_path){await j.fire({title:`No Workspace Detected`,text:`Cannot save invariants: the active workspace path was not detected by the Konoha core.`,icon:`warning`});return}i(B,!0);try{await k.post(`/api/v1/projects`,{projectPath:l(I).project_path,contextSummary:l(H)}),await j.fire({title:`Invariants Saved`,text:`Project architectural invariants updated and synced to Konoha memory!`,icon:`success`}),await K()}catch(e){await j.fire({title:`Save Failed`,text:e.message,icon:`error`})}finally{i(B,!1)}}async function de(){if(await j.confirm({title:`Clear Invariants?`,text:`Are you sure you want to clear the architectural invariants saved for this workspace?`,icon:`warning`,confirmText:`Clear Invariants`,cancelText:`Cancel`})){i(B,!0);try{let e=l(I)?.project_hash||`current`;await k.post(`/api/v1/projects/${e}/prune`,{clearInvariants:!0}),i(H,``),await j.fire({title:`Invariants Cleared`,text:`Architectural invariants have been cleared for this workspace.`,icon:`success`}),await K()}catch(e){await j.fire({title:`Clear Failed`,text:e.message,icon:`error`})}finally{i(B,!1)}}}async function fe(e){if(await j.confirm({title:`Remove Project?`,text:`Are you sure you want to remove this project workspace profile?`,icon:`warning`,confirmText:`Remove`,cancelText:`Keep`}))try{await k.delete(`/api/v1/projects/`+e),await j.fire({title:`Removed`,text:`Project profile removed successfully.`,icon:`success`}),await K()}catch(e){await j.fire({title:`Remove Failed`,text:e.message,icon:`error`})}}async function pe(e){if(await j.confirm({title:`Delete Learning?`,text:`Are you sure you want to delete this memory item (ID: ${e})?`,icon:`warning`,confirmText:`Delete`,cancelText:`Keep`}))try{let t=l(I)?.project_hash||`current`;await k.delete(`/api/v1/projects/${t}/memories/${e}`),await j.fire({title:`Memory Deleted`,text:`Project memory item removed successfully.`,icon:`success`}),await K()}catch(e){await j.fire({title:`Delete Failed`,text:e.message,icon:`error`})}}async function q(){if(!l(W).content.trim()){await j.fire({title:`Validation Error`,text:`Please enter the learning or rule content to record.`,icon:`warning`});return}try{let e=l(I)?.project_path||process?.cwd?.()||`.`;await k.post(`/api/v1/persona`,{agentName:l(W).agentName||`global`,content:l(W).content.trim(),title:`Project Learning`,memoryType:l(W).memoryType||`rule`,projectPath:e,importance:1}),i(U,!1),i(W,{agentName:`jonin`,content:``,memoryType:`rule`},!0),await j.fire({title:`Learning Added`,text:`Project-scoped learning recorded successfully.`,icon:`success`}),await K()}catch(e){await j.fire({title:`Failed to Add`,text:e.message,icon:`error`})}}async function me(){if(!l(L)||l(L).length===0){await j.fire({title:`No Learnings Found`,text:`There are currently 0 episodic learnings recorded for this workspace. Subagents automatically save verified learnings here during complex tasks, or you can add one directly using '+ Add Learning'.`,icon:`info`});return}if(await j.confirm({title:`Prune All Learnings?`,text:`Remove all ${l(L).length} episodic learning(s) recorded for this workspace?`,icon:`warning`,confirmText:`Prune Learnings`,cancelText:`Cancel`}))try{let e=l(I)?.project_hash||`current`,t=await k.post(`/api/v1/projects/${e}/prune`,{});await j.fire({title:`Learnings Pruned`,text:`Successfully pruned ${t.deleted||0} episodic learning(s).`,icon:`success`}),await K()}catch(e){await j.fire({title:`Prune Failed`,text:e.message,icon:`error`})}}async function he(){if(!l(R)||l(R).length===0){await j.fire({title:`No Workspaces`,text:`There are no registered workspaces to prune.`,icon:`info`});return}let e=l(R).length;if(await j.confirm({title:`Prune All Workspaces?`,text:`Are you sure you want to prune all ${e} registered workspace profile(s)? This will wipe all workspace records from the registry.`,icon:`warning`,confirmText:`Prune All Workspaces`,cancelText:`Cancel`}))try{let t=await k.delete(`/api/v1/projects`);i(R,[],!0),await j.fire({title:`Workspaces Pruned`,text:`Successfully pruned ${t.deleted||e} registered workspace(s).`,icon:`success`}),await K()}catch(e){await j.fire({title:`Prune Failed`,text:e.message,icon:`error`})}}async function ge(){let e=l(R)?l(R).length:0,t=e>0?`all ${e} registered workspace(s)`:`all context memory`;if(await j.confirm({title:`Prune Context & Workspaces?`,text:`Are you sure you want to prune ${t}, clear architectural invariants, and remove episodic learnings?`,icon:`warning`,confirmText:`Prune Context`,cancelText:`Cancel`}))try{let t=await k.delete(`/api/v1/projects`),n=l(I)?.project_hash||`current`;await k.post(`/api/v1/projects/${n}/prune`,{clearInvariants:!0}),i(H,``),i(R,[],!0),i(L,[],!0),await j.fire({title:`Context Pruned`,text:`Successfully pruned ${t.deleted||e} workspace profile(s) and cleared context memory.`,icon:`success`}),await K()}catch(e){await j.fire({title:`Prune Failed`,text:e.message,icon:`error`})}}E(K);var J=ce();S(`keydown`,O,G);var Y=p(J),X=n(Y),Z=n(X),_e=f(n(Z),2),Q=n(_e),ve=f(Q,2);e(_e),e(Z),e(X);var $=f(X,2),ye=e=>{var t=M(),n=a(t);o(()=>d(n,`Failed to load project context: ${l(V)??``}`)),D(e,t)};_($,e=>{l(V)&&e(ye)});var be=f($,2),xe=e=>{var t=N();D(e,t)},Se=r=>{var c=oe(),m=p(c),h=n(m),g=n(h),v=f(n(g),2),S=a(v,!0),C=f(v,2),w=a(C,!0);e(g);var E=f(g,2),O=n(E),k=f(n(O)),A=a(k,!0);e(O);var j=f(O,2),M=f(n(j)),N=a(M,!0);e(j);var F=f(j,2),se=f(n(F)),ce=a(se,!0);e(F),e(E),e(h);var z=f(h,2),V=n(z),W=f(n(V),2),G=n(W),le=e=>{var n=P();o(()=>n.disabled=l(B)),t(`click`,n,de),D(e,n)},K=T(()=>l(H)&&l(H).trim().length>0);_(G,e=>{l(K)&&e(le)});var q=f(G,2),ge=a(q,!0);e(W),e(V);var J=f(V,2);s(J),e(z);var Y=f(z,2),X=n(Y),Z=n(X),_e=n(Z),Q=a(_e);u(2),e(Z);var ve=f(Z,2),$=n(ve),ye=f($,2);e(ve),e(X);var be=f(X,2),xe=r=>{var i=te();b(i,21,()=>l(L),y,(r,i)=>{var s=ee(),c=n(s),u=n(c),p=n(u),m=a(p),h=f(p,2),g=a(h);e(u);var _=f(u,2),v=a(_,!0);e(c);var y=f(c,2),b=n(y),x=a(b,!0),S=f(b,2);e(y),e(s),o(()=>{d(m,`@${l(i).agent_name??``}`),d(g,`ID: ${l(i).id??``}`),d(v,l(i).content),d(x,l(i).memory_type||`rule`)}),t(`click`,S,()=>pe(l(i).id)),D(r,s)}),e(i),D(r,i)},Se=e=>{var t=ne();D(e,t)};_(be,e=>{l(L)&&l(L).length>0?e(xe):e(Se,-1)}),e(Y),e(m);var Ce=f(m,2),we=r=>{var i=ae(),s=n(i),c=n(s),p=n(c),m=a(p);u(2),e(c);var h=f(c,2);e(s);var g=f(s,2);b(g,21,()=>l(R),y,(r,i)=>{var s=ie(),c=n(s),u=n(c),p=n(u),m=a(p,!0),h=f(p,2),g=a(h,!0);e(u);var v=f(u,2),y=a(v,!0),b=f(v,2),x=e=>{var t=re(),n=a(t,!0);o(()=>d(n,l(i).context_summary)),D(e,t)};_(b,e=>{l(i).context_summary&&e(x)}),e(c);var S=f(c,2),C=n(S),w=a(C),T=f(C,2);e(S),e(s),o(()=>{d(m,l(i).project_name),d(g,l(i).framework||`App`),d(y,l(i).project_path),d(w,`Hash: ${l(i).project_hash??``}`)}),t(`click`,T,()=>fe(l(i).project_hash)),D(r,s)}),e(g),e(i),o(()=>d(m,`All Registered Workspaces (${l(R).length??``})`)),t(`click`,h,he),D(r,i)};_(Ce,e=>{l(R)&&l(R).length>0&&e(we)}),o(()=>{d(S,l(I)?.project_name||`Current Workspace`),d(w,l(I)?.project_path||`Path undetected`),d(A,l(I)?.framework||`General`),d(N,l(I)?.styling||`CSS`),d(ce,l(I)?.package_manager||`pnpm`),q.disabled=l(B),d(ge,l(B)?`Saving...`:`Save Invariants`),d(Q,`Project-Scoped Learnings (${(l(L)?l(L).length:0)??``})`)}),t(`click`,q,ue),x(J,()=>l(H),e=>i(H,e)),t(`click`,$,()=>{i(U,!0)}),t(`click`,ye,me),D(r,c)};_(be,e=>{l(z)?e(xe):e(Se,-1)}),e(Y);var Ce=f(Y,2),we=r=>{var c=se(),u=n(c),p=n(u),m=f(n(p),2);e(p);var h=f(p,2),g=n(h),_=n(g),S=f(n(_),2);b(S,21,()=>le,y,(e,t)=>{var n=F(),r=a(n,!0),i={};o(()=>{d(r,l(t).name),i!==(i=l(t).id)&&(n.value=(n.__value=i)??``)}),D(e,n)}),e(S),w(S),e(_);var C=f(_,2),T=f(n(C),2),E=n(T);E.value=E.__value=`rule`;var O=f(E);O.value=O.__value=`episodic`;var k=f(O);k.value=k.__value=`fact`;var A=f(k);A.value=A.__value=`preference`,e(T),w(T),e(C),e(g);var j=f(g,2),M=f(n(j),2);s(M),e(j),e(h);var N=f(h,2),P=n(N),ee=f(P,2);e(N),e(u),e(c),t(`click`,m,()=>{i(U,!1)}),v(S,()=>l(W).agentName,e=>l(W).agentName=e),v(T,()=>l(W).memoryType,e=>l(W).memoryType=e),x(M,()=>l(W).content,e=>l(W).content=e),t(`click`,P,()=>{i(U,!1)}),t(`click`,ee,q),D(r,c)};_(Ce,e=>{l(U)&&e(we)}),t(`click`,Q,ge),t(`click`,ve,K),D(r,J),g()}C([`click`]);function L(e){I(e,{})}export{L as component};
@@ -1 +0,0 @@
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,O as u,Q as d,S as f,U as p,V as m,X as h,Y as g,_,a as v,d as y,f as b,h as ee,i as x,k as S,o as C,w}from"../chunks/PrdhfbrQ.js";import{t as T}from"../chunks/7LmsTWIo.js";import"../chunks/C3-t9btS.js";var E=r(`Scan any website (directory or URL) for AI-generation fingerprints and score it 0–100. <span class="font-semibold text-emerald-600">0–20 = Human-Built</span> per PLAN_HUMAN_BUILT.`,1),D=r(`Scan documents (.docx, .pdf, .pptx, .xlsx, .md, .txt) for AI fingerprints, sliding-window burstiness, and metadata. <span class="font-semibold text-emerald-600">Target: 0%–3% ZeroGPT Risk</span> for zero-AI human authenticity.`,1),O=r(`<div class="flex items-center gap-2 mb-3"><button>File Path</button> <button>Paste Text</button></div>`),k=r(`<label class="block text-sm font-semibold text-slate-700 mb-2" for="detect-text">Paste Document Text</label> <textarea id="detect-text" placeholder="Paste your document text here for AI detection analysis..." rows="8" class="w-full px-4 py-3 rounded-xl border border-slate-200 bg-white/80 focus:outline-none focus:ring-2 focus:ring-[var(--color-primary)] text-sm resize-y mb-3"></textarea> <button class="px-6 py-3 rounded-xl bg-[var(--color-primary)] text-white font-bold text-sm disabled:opacity-40 hover:opacity-90 transition"> </button>`,1),A=r(`<label class="block text-sm font-semibold text-slate-700 mb-2" for="detect-target"> </label> <div class="flex flex-col sm:flex-row gap-3"><input id="detect-target" type="text" class="flex-1 px-4 py-3 rounded-xl border border-slate-200 bg-white/80 focus:outline-none focus:ring-2 focus:ring-[var(--color-primary)] text-sm"/> <button class="px-6 py-3 rounded-xl bg-[var(--color-primary)] text-white font-bold text-sm disabled:opacity-40 hover:opacity-90 transition"> </button></div>`,1),j=r(`<div class="glass-card-3d p-6 rounded-3xl border border-red-200"><p class="text-red-600 font-semibold text-sm">Scan failed</p> <p class="text-slate-600 text-sm mt-1"> </p></div>`),te=r(`<span> </span>`),M=r(`<p class="text-xs text-slate-400 mt-2 break-all"> </p> <p class="text-xs text-slate-400"> </p>`,1),ne=r(`<div class="p-4 rounded-xl bg-emerald-50 border border-emerald-200"><p class="text-emerald-700 font-semibold text-sm">No AI fingerprints detected</p> <p class="text-emerald-600/80 text-xs mt-1"><!></p></div>`),re=r(`<div class="p-4 rounded-xl border bg-white/60"><div class="flex flex-wrap items-center gap-2"><span> </span> <span class="text-sm font-semibold text-slate-800"> </span> <span class="text-xs text-slate-400 font-mono ml-auto"> </span></div> <p class="text-xs text-slate-500 mt-2 font-mono break-all"> </p></div>`),ie=r(`<div class="space-y-3"></div>`),ae=r(`<div class="glass-card-3d p-6 lg:p-8 rounded-3xl border"><div class="flex flex-col lg:flex-row lg:items-center gap-8"><div class="flex items-center gap-5"><div class="relative w-28 h-28 shrink-0"><svg viewBox="0 0 120 120" class="w-28 h-28 -rotate-90"><circle cx="60" cy="60" r="52" fill="none" stroke="#e2e8f0" stroke-width="12"></circle><circle cx="60" cy="60" r="52" fill="none" stroke-width="12" stroke-linecap="round"></circle></svg> <div class="absolute inset-0 flex flex-col items-center justify-center"><span class="text-3xl font-black"> </span> <span class="text-[10px] text-slate-400 font-semibold">/ 100</span></div></div> <div><div class="flex flex-wrap items-center gap-2"><p class="text-xl font-black text-slate-900"> </p> <!></div> <p class="text-sm font-semibold mt-1"> </p> <!></div></div></div></div> <div class="glass-card-3d p-6 rounded-3xl border"><h2 class="text-lg font-bold text-slate-900 mb-4">Findings <!></h2> <!></div>`,1),N=r(`<div class="space-y-6"><div class="flex flex-col lg:flex-row lg:items-end justify-between gap-4"><div><h1 class="text-2xl lg:text-3xl font-black text-slate-900 tracking-tight"> </h1> <p class="text-slate-500 mt-1 text-sm lg:text-base"><!></p></div> <div class="flex items-center gap-1.5 p-1.5 bg-slate-100/80 rounded-2xl border border-slate-200 shrink-0"><button>🌐 Website AI</button> <button>📄 Document AI</button></div></div> <div class="glass-card-3d p-6 rounded-3xl border"><!> <!> <p class="text-xs text-slate-400 mt-2"><!></p></div> <!> <!> <!></div>`);function P(r,S){h(S,!0);let P=c(`website`),F=c(`path`),I=c(``),L=c(``),R=c(!1),z=c(null),B=c(null),V={high:`bg-red-100 text-red-700 border-red-200`,medium:`bg-amber-100 text-amber-700 border-amber-200`,low:`bg-slate-100 text-slate-600 border-slate-200`};function H(e){return e<=20?`#059669`:e<=40?`#d97706`:`#dc2626`}async function U(){i(R,!0),i(B,null),i(z,null);try{if(l(P)===`document`&&l(F)===`text`){let e=l(L).trim();if(!e){i(R,!1);return}let t=await T.post(`/api/v1/detect-docs/text`,{text:e});i(z,t,!0)}else{let e=l(I).trim();if(!e){i(R,!1);return}let t=l(P)===`document`?`/api/v1/detect-docs?target=${encodeURIComponent(e)}`:`/api/v1/detect-ai?target=${encodeURIComponent(e)}`,n=await T.get(t);i(z,n,!0)}}catch(e){i(B,e?.message||String(e),!0)}finally{i(R,!1)}}var W=N(),G=n(W),K=n(G),q=n(K),J=a(q,!0),Y=p(q,2),oe=n(Y),se=e=>{var t=E();d(2),w(e,t)},ce=e=>{var t=D();d(2),w(e,t)};_(oe,e=>{l(P)===`website`?e(se):e(ce,-1)}),e(Y),e(K);var X=p(K,2),Z=n(X),Q=p(Z,2);e(X),e(G);var $=p(G,2),le=n($),ue=r=>{var a=O(),s=n(a),c=p(s,2);e(a),o(()=>{b(s,1,`px-3 py-1.5 rounded-lg text-xs font-semibold transition ${l(F)===`path`?`bg-slate-800 text-white`:`bg-slate-100 text-slate-600 hover:bg-slate-200`}`),b(c,1,`px-3 py-1.5 rounded-lg text-xs font-semibold transition ${l(F)===`text`?`bg-slate-800 text-white`:`bg-slate-100 text-slate-600 hover:bg-slate-200`}`)}),t(`click`,s,()=>{i(F,`path`)}),t(`click`,c,()=>{i(F,`text`)}),w(r,a)};_(le,e=>{l(P)===`document`&&e(ue)});var de=p(le,2),fe=e=>{var n=k(),r=p(m(n),2);s(r);var c=p(r,2),u=a(c,!0);o(e=>{c.disabled=e,f(u,l(R)?`Scanning…`:`Analyze Text`)},[()=>l(R)||!l(L).trim()]),x(r,()=>l(L),e=>i(L,e)),t(`click`,c,U),w(e,n)},pe=r=>{var s=A(),c=m(s),u=a(c,!0),d=p(c,2),h=n(d);v(h);var g=p(h,2),_=a(g,!0);e(d),o(e=>{f(u,l(P)===`website`?`Website Target`:`Document File Path`),C(h,`placeholder`,l(P)===`website`?`/path/to/site or https://example.com`:`/path/to/document.docx or report.pdf`),g.disabled=e,f(_,l(R)?`Scanning…`:`Run Scan`)},[()=>l(R)||!l(I).trim()]),t(`keydown`,h,e=>{e.key===`Enter`&&U()}),x(h,()=>l(I),e=>i(I,e)),t(`click`,g,U),w(r,s)};_(de,e=>{l(P)===`document`&&l(F)===`text`?e(fe):e(pe,-1)});var me=p(de,2),he=n(me),ge=e=>{var t=u(`Checks generator meta tags, Lucide icons, shadcn/ui shapes, Vercel/Netlify signals, attribution comments, boilerplate text, and template asset names.`);w(e,t)},_e=e=>{var t=u(`Checks sliding-window paragraph burstiness, ZeroGPT AI triggers, generator tags (python-docx, docx-js), watermarks, and dark theme violations.`);w(e,t)};_(he,e=>{l(P)===`website`?e(ge):e(_e,-1)}),e(me),e($);var ve=p($,2),ye=t=>{var r=j(),i=p(n(r),2),s=a(i,!0);e(r),o(()=>f(s,l(B))),w(t,r)};_(ve,e=>{l(B)&&e(ye)});var be=p(ve,2),xe=t=>{var r=j(),i=p(n(r),2),s=a(i,!0);e(r),o(()=>f(s,l(z).error)),w(t,r)};_(be,e=>{l(z)?.error&&e(xe)});var Se=p(be,2),Ce=t=>{var r=ae(),i=m(r),s=n(i),c=n(s),h=n(c),g=n(h),v=p(n(g));C(v,`stroke-dasharray`,2*Math.PI*52),e(g);var x=p(g,2),S=n(x),T=a(S,!0);d(2),e(x),e(h);var E=p(h,2),D=n(E),O=n(D),k=a(O,!0),A=p(O,2),j=e=>{var t=te(),n=a(t);o(()=>{b(t,1,`px-2 py-0.5 rounded-md text-[11px] font-bold ${l(z).zerogpt_risk_score<=3?`bg-emerald-100 text-emerald-800 border border-emerald-200`:`bg-red-100 text-red-800 border border-red-200`}`),f(n,`ZeroGPT Risk: ${l(z).zerogpt_risk_score??``}%`)}),w(e,t)};_(A,e=>{l(z).zerogpt_risk_score!==void 0&&e(j)}),e(D);var N=p(D,2),F=a(N,!0),I=p(N,2),L=e=>{var t=M(),n=m(t),r=a(n),i=p(n,2),s=a(i);o(e=>{f(r,`${l(z).target??``} (${(l(z).mode||`directory`)??``})`),f(s,`${(l(z).stats?.files_scanned||0)??``} files · ${e??``} KB · ${(l(z).stats?.elapsed_ms||0)??``} ms`)},[()=>((l(z).stats?.bytes_scanned||0)/1024).toFixed(1)]),w(e,t)},R=e=>{var t=M(),n=m(t),r=a(n),i=p(n,2),s=a(i);o(()=>{f(r,`${l(z).target??``} (${(l(z).format||`document`)??``})`),f(s,`${(l(z).stats?.words||0)??``} words · ${(l(z).stats?.sentences||0)??``} sentences · ${(l(z).stats?.paragraphs||0)??``} paragraphs · Burstiness ${l(z).stats?.burstiness??`N/A`??``} · ${(l(z).stats?.elapsed_ms||0)??``} ms`)}),w(e,t)};_(I,e=>{l(z).mode||l(z).stats?.files_scanned!==void 0?e(L):e(R,-1)}),e(E),e(c),e(s),e(i);var B=p(i,2),U=n(B),W=p(n(U)),G=e=>{var t=u();o(()=>f(t,`(${l(z).findings.length??``})`)),w(e,t)};_(W,e=>{l(z).findings.length&&e(G)}),e(U);var K=p(U,2),q=t=>{var r=ne(),i=p(n(r),2),a=n(i),o=e=>{var t=u(`This site sits in the Human-Built band (score 0–20).`);w(e,t)},s=e=>{var t=u(`This document satisfies the 100% human-authentic standard (ZeroGPT risk: 0.0%–3.0%).`);w(e,t)};_(a,e=>{l(P)===`website`?e(o):e(s,-1)}),e(i),e(r),w(t,r)},J=t=>{var r=ie();ee(r,21,()=>l(z).findings,e=>e.rule,(t,r)=>{var i=re(),s=n(i),c=n(s),u=a(c),d=p(c,2),m=a(d,!0),h=p(d,2),g=a(h);e(s);var _=p(s,2),v=a(_,!0);e(i),o(()=>{b(c,1,`px-2 py-0.5 rounded-md border text-[11px] font-bold ${(V[l(r).severity]||V.low)??``}`),f(u,`${l(r).rule??``} · ${l(r).severity??``}`),f(m,l(r).title),f(g,`+${l(r).weight??``}`),f(v,l(r).evidence)}),w(t,i)}),e(r),w(t,r)};_(K,e=>{l(z).findings.length===0?e(q):e(J,-1)}),e(B),o((e,t,n)=>{C(v,`stroke`,e),C(v,`stroke-dashoffset`,2*Math.PI*52*(1-l(z).score/100)),y(S,`color: ${t??``}`),f(T,l(z).score),f(k,l(z).label),y(N,`color: ${n??``}`),f(F,l(z).verdict)},[()=>H(l(z).score),()=>H(l(z).score),()=>H(l(z).score)]),w(t,r)};_(Se,e=>{l(z)&&!l(z).error&&e(Ce)}),e(W),o(()=>{f(J,l(P)===`website`?`Website AI Detector`:`Document AI Detector`),b(Z,1,`px-4 py-2 rounded-xl text-xs font-bold transition ${l(P)===`website`?`bg-white text-slate-900 shadow-sm border border-slate-200`:`text-slate-500 hover:text-slate-900`}`),b(Q,1,`px-4 py-2 rounded-xl text-xs font-bold transition ${l(P)===`document`?`bg-white text-slate-900 shadow-sm border border-slate-200`:`text-slate-500 hover:text-slate-900`}`)}),t(`click`,Z,()=>{i(P,`website`),i(z,null),i(B,null)}),t(`click`,Q,()=>{i(P,`document`),i(z,null),i(B,null)}),w(r,W),g()}S([`click`,`keydown`]);function F(e){P(e,{})}export{F as component};
@@ -1,14 +0,0 @@
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,X as f,Y as p,_ as m,d as h,g,h as _,k as v,o as y,v as b,w as x}from"../chunks/PrdhfbrQ.js";import{t as S}from"../chunks/7LmsTWIo.js";import"../chunks/C3-t9btS.js";var C=r(`<div class="flex items-center gap-2"><span class="text-xs font-mono px-3 py-1.5 rounded-full border" style="color: var(--color-text-muted); border-color: var(--color-border);"> </span> <span class="text-xs font-mono px-3 py-1.5 rounded-full border" style="color: var(--color-text-muted); border-color: var(--color-border);"> </span></div>`),ee=r(`<a class="block px-3 py-2 rounded-xl text-sm font-semibold transition-all"> </a>`),te=r(`<span class="text-xs font-mono font-bold px-3 py-1.5 rounded-full border" style="color: var(--color-primary); border-color: var(--color-primary); background: var(--color-primary-glow);"> </span>`),ne=r(`<div class="rounded-2xl border p-4 transition-all" style="border-color: var(--color-border);"><div class="flex flex-wrap items-center gap-2 mb-1"><span class="text-sm font-black" style="color: var(--color-text);"> </span> <span class="text-[10px] font-bold uppercase tracking-wider px-2 py-0.5 rounded-full border" style="color: var(--color-primary); border-color: var(--color-primary); background: var(--color-primary-glow);"> </span></div> <p class="text-xs leading-relaxed" style="color: var(--color-text-muted);"> </p></div>`),re=r(`<div class="rounded-2xl border p-4" style="border-color: var(--color-border);"><div class="flex items-center gap-2 mb-1.5"><span class="w-2 h-2 rounded-full" style="background: var(--color-primary);"></span> <span class="text-sm font-black font-mono" style="color: var(--color-text);"> </span></div> <p class="text-xs leading-relaxed mb-2" style="color: var(--color-text-muted);"> </p> <p class="text-[11px] font-mono leading-relaxed px-3 py-2 rounded-xl" style="color: var(--color-primary); background: var(--color-primary-glow);"> </p></div>`),ie=r(`<tr class="border-t" style="border-color: var(--color-border);"><td class="px-4 py-2"><span class="font-mono font-bold px-1.5 py-0.5 rounded text-[10px]"> </span></td><td class="px-4 py-2 font-mono font-semibold" style="color: var(--color-text);"> </td><td class="px-4 py-2 hidden sm:table-cell" style="color: var(--color-text-muted);"> </td></tr>`),w=r(`<div class="rounded-2xl border p-4" style="border-color: var(--color-border);"><p class="text-sm font-bold mb-1" style="color: var(--color-text);"> </p> <p class="text-[11px] font-mono break-all" style="color: var(--color-text-muted);"> </p></div>`),T=r(`<div class="space-y-6"><div class="flex flex-col lg:flex-row lg:items-end lg:justify-between gap-4"><div class="flex items-center gap-3"><div class="w-11 h-11 rounded-2xl flex items-center justify-center border shadow-lg" style="background: var(--color-primary-glow); border-color: var(--color-primary);"><svg class="w-6 h-6" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24" style="color: var(--color-primary);"><path stroke-linecap="round" stroke-linejoin="round" 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> <div><h2 class="text-2xl lg:text-3xl font-black tracking-tight" style="color: var(--color-text);">Documentation</h2> <p class="text-sm font-medium" style="color: var(--color-text-muted);">Konoha runtime manual — architecture, gates, APIs &amp; operations</p></div></div> <!></div> <div class="grid grid-cols-1 lg:grid-cols-4 gap-6"><aside class="hidden lg:block"><nav class="glass-card-3d p-4 rounded-2xl border sticky top-6 space-y-1" style="border-color: var(--color-border);"><p class="text-[10px] font-bold uppercase tracking-widest px-3 pb-2" style="color: var(--color-text-muted);">Contents</p> <!></nav></aside> <div class="lg:col-span-3 space-y-6"><section id="overview" class="glass-card-3d p-6 lg:p-8 rounded-3xl border scroll-mt-6" style="border-color: var(--color-border);"><h3 class="text-xl font-black tracking-tight mb-3" style="color: var(--color-text);">Overview</h3> <p class="text-sm leading-relaxed mb-4" style="color: var(--color-text-muted);">Konoha is a multi-client AI agent orchestrator ("Ninja Agent Village") that turns a single prompt into a governed
2
- engineering workflow: exploration, planning, execution, review, and documentation — each phase owned by a
3
- specialized agent, each delivery gated by mechanical quality checks.</p> <div class="grid grid-cols-1 sm:grid-cols-3 gap-3"><div class="rounded-2xl border p-4" style="border-color: var(--color-border);"><p class="text-2xl font-black" style="color: var(--color-primary);">8 Phases</p> <p class="text-xs mt-1" style="color: var(--color-text-muted);">Route → Research → Explore → Plan → Execute → Review → Document → Synthesize</p></div> <div class="rounded-2xl border p-4" style="border-color: var(--color-border);"><p class="text-2xl font-black" style="color: var(--color-primary);">7 Agents</p> <p class="text-xs mt-1" style="color: var(--color-text-muted);">Specialized subagents with strict tool boundaries and skill SOPs</p></div> <div class="rounded-2xl border p-4" style="border-color: var(--color-border);"><p class="text-2xl font-black" style="color: var(--color-primary);">7 Clients</p> <p class="text-xs mt-1" style="color: var(--color-text-muted);">Antigravity, Cursor, Claude Code, OpenCode, CommandCode, Codex, Pi</p></div></div> <div class="mt-5 flex flex-wrap gap-2"></div></section> <section id="architecture" class="glass-card-3d p-6 lg:p-8 rounded-3xl border scroll-mt-6" style="border-color: var(--color-border);"><h3 class="text-xl font-black tracking-tight mb-3" style="color: var(--color-text);">Architecture &amp; Agents</h3> <p class="text-sm leading-relaxed mb-5" style="color: var(--color-text-muted);">The main agent is an orchestrator only — it never implements directly. Work is delegated through MCP subagent
4
- tools, with workflow artifacts (<code class="text-xs font-mono px-1.5 py-0.5 rounded" style="background: var(--color-primary-glow); color: var(--color-primary);">prompt.md</code>, <code class="text-xs font-mono px-1.5 py-0.5 rounded" style="background: var(--color-primary-glow); color: var(--color-primary);">plan.md</code>, <code class="text-xs font-mono px-1.5 py-0.5 rounded" style="background: var(--color-primary-glow); color: var(--color-primary);">result.md</code>)
5
- kept in an isolated task directory under <code class="text-xs font-mono">~/.konoha/tmp/</code> — never inside the project workspace.</p> <div class="space-y-3"></div></section> <section id="mcp" class="glass-card-3d p-6 lg:p-8 rounded-3xl border scroll-mt-6" style="border-color: var(--color-border);"><h3 class="text-xl font-black tracking-tight mb-3" style="color: var(--color-text);">MCP Servers &amp; Tools</h3> <p class="text-sm leading-relaxed mb-5" style="color: var(--color-text-muted);">Every client is wired with three MCP servers. All file reads, code search, and skill lookups go through them —
6
- native shell tools are bypassed for bounded, token-efficient operations.</p> <div class="space-y-3"></div></section> <section id="sdlc" class="glass-card-3d p-6 lg:p-8 rounded-3xl border scroll-mt-6" style="border-color: var(--color-border);"><h3 class="text-xl font-black tracking-tight mb-3" style="color: var(--color-text);">SDLC Lifecycle</h3> <p class="text-sm leading-relaxed mb-4" style="color: var(--color-text-muted);">Tasks are persisted in SQLite (<code class="text-xs font-mono px-1.5 py-0.5 rounded" style="background: var(--color-primary-glow); color: var(--color-primary);">sdlc_tasks</code>)
7
- with evidence recording and a Definition-of-Readiness (DoR) check. In <strong>enforced</strong> mode, a task that
8
- lacks acceptance criteria or testability is blocked before dispatch. Review independence is detected per task
9
- (implementer ≠ reviewer), and slop results are persisted with cycle counts.</p> <div class="grid grid-cols-1 sm:grid-cols-2 gap-3"><div class="rounded-2xl border p-4" style="border-color: var(--color-border);"><p class="text-xs font-bold uppercase tracking-wider mb-2" style="color: var(--color-text-muted);">DoR Modes</p> <p class="text-xs leading-relaxed" style="color: var(--color-text-muted);"><span class="font-mono font-bold" style="color: var(--color-primary);">advisory</span> — readiness is reported but does not block · <span class="font-mono font-bold" style="color: var(--color-primary);">enforced</span> — unready tasks are blocked with a remediation hint</p></div> <div class="rounded-2xl border p-4" style="border-color: var(--color-border);"><p class="text-xs font-bold uppercase tracking-wider mb-2" style="color: var(--color-text-muted);">Evidence</p> <p class="text-xs leading-relaxed" style="color: var(--color-text-muted);">Every subagent report records validation evidence (commands, exit codes, line counts). Claims without
10
- verifiable output are rejected by the review gate.</p></div></div></section> <section id="slop-gate" class="glass-card-3d p-6 lg:p-8 rounded-3xl border scroll-mt-6" style="border-color: var(--color-border);"><h3 class="text-xl font-black tracking-tight mb-3" style="color: var(--color-text);">Anti-Slop Delivery Gate</h3> <p class="text-sm leading-relaxed mb-4" style="color: var(--color-text-muted);">Before any delivery, Kage runs a two-step hard gate. Both steps must report zero findings; the mechanical
11
- synthesis gate then requires a perfect 100/100 scan before results may be delivered.</p> <div class="grid grid-cols-1 sm:grid-cols-2 gap-3 mb-4"><div class="rounded-2xl border p-4" style="border-color: var(--color-border);"><p class="text-xs font-black mb-1" style="color: var(--color-primary);">Step 1 — aislop_scan</p> <p class="text-xs leading-relaxed" style="color: var(--color-text-muted);">Scoped scan on changed files only (never unscoped full-repo). Any diagnostic above zero severity blocks the review.</p></div> <div class="rounded-2xl border p-4" style="border-color: var(--color-border);"><p class="text-xs font-black mb-1" style="color: var(--color-primary);">Step 2 — anti-slop rules</p> <p class="text-xs leading-relaxed" style="color: var(--color-text-muted);">The vendored anti-slop skill review (code, UI, copywriting, human, layout filters) loaded via konoha.get_skill.</p></div></div> <div class="rounded-2xl border p-4" style="border-color: var(--color-border);"><p class="text-xs font-black mb-2" style="color: var(--color-text);">On FAIL — Kage → Anbu/Jonin remediation loop</p> <p class="text-xs leading-relaxed" style="color: var(--color-text-muted);">Findings are converted into a concrete fix task (each finding maps to one actionable item with rule IDs),
12
- delegated to <strong>anbu</strong> (or <strong>jonin</strong> for UI findings). The loop re-scans from scratch after every fix
13
- and is bounded by a circuit breaker at 7 cycles. Only a clean pass advances to the Kage Confidence Gate (≥97%).</p></div></section> <section id="api" class="glass-card-3d p-6 lg:p-8 rounded-3xl border scroll-mt-6" style="border-color: var(--color-border);"><h3 class="text-xl font-black tracking-tight mb-3" style="color: var(--color-text);">Web API Reference</h3> <p class="text-sm leading-relaxed mb-4" style="color: var(--color-text-muted);">Same-origin REST API served by the Konoha web server. Mutating requests require the <code class="text-xs font-mono px-1.5 py-0.5 rounded" style="background: var(--color-primary-glow); color: var(--color-primary);">X-Konoha-Web-Token</code> header, obtained from the CSRF cookie via <code class="text-xs font-mono">GET /api/v1/csrf</code>.</p> <div class="rounded-2xl border overflow-hidden" style="border-color: var(--color-border);"><table class="w-full text-xs"><thead><tr style="background: var(--color-primary-glow);"><th class="text-left font-black uppercase tracking-wider px-4 py-2.5" style="color: var(--color-primary);">Method</th><th class="text-left font-black uppercase tracking-wider px-4 py-2.5" style="color: var(--color-primary);">Endpoint</th><th class="text-left font-black uppercase tracking-wider px-4 py-2.5 hidden sm:table-cell" style="color: var(--color-primary);">Description</th></tr></thead><tbody></tbody></table></div></section> <section id="clients" class="glass-card-3d p-6 lg:p-8 rounded-3xl border scroll-mt-6" style="border-color: var(--color-border);"><h3 class="text-xl font-black tracking-tight mb-3" style="color: var(--color-text);">Client Setup</h3> <p class="text-sm leading-relaxed mb-4" style="color: var(--color-text-muted);">Use the Clients screen to configure or remove MCP wiring per client. The runtime contract (Konoha + Semble + aislop,
14
- RTK shell filtering, guardrails) is injected into every client's agent instructions.</p> <div class="grid grid-cols-1 sm:grid-cols-2 gap-3"></div></section> <section id="cli" class="glass-card-3d p-6 lg:p-8 rounded-3xl border scroll-mt-6" style="border-color: var(--color-border);"><h3 class="text-xl font-black tracking-tight mb-3" style="color: var(--color-text);">CLI Commands</h3> <div class="space-y-2 font-mono text-xs"><div class="rounded-xl border px-4 py-3" style="border-color: var(--color-border);"><span class="font-bold" style="color: var(--color-primary);">konoha init</span> <span style="color: var(--color-text-muted);">— full setup: MCP servers, migrate local skills, configure supported clients</span></div> <div class="rounded-xl border px-4 py-3" style="border-color: var(--color-border);"><span class="font-bold" style="color: var(--color-primary);">konoha embed</span> <span style="color: var(--color-text-muted);">— rebuild neural vector embeddings for all skills (IBM Granite + MS MARCO Reranker)</span></div> <div class="rounded-xl border px-4 py-3" style="border-color: var(--color-border);"><span class="font-bold" style="color: var(--color-primary);">konoha migrate [--clean|--rebuild-embeddings|--skills-dir]</span> <span style="color: var(--color-text-muted);">— re-index custom skills into SQLite FTS5 database</span></div> <div class="rounded-xl border px-4 py-3" style="border-color: var(--color-border);"><span class="font-bold" style="color: var(--color-primary);">konoha test</span> <span style="color: var(--color-text-muted);">— perform verification tests on the MCP server & tools</span></div> <div class="rounded-xl border px-4 py-3" style="border-color: var(--color-border);"><span class="font-bold" style="color: var(--color-primary);">konoha status</span> <span style="color: var(--color-text-muted);">— check installation health, database size, and loaded skills</span></div> <div class="rounded-xl border px-4 py-3" style="border-color: var(--color-border);"><span class="font-bold" style="color: var(--color-primary);">konoha web / konoha ui &lt;start|stop|restart|status&gt;</span> <span style="color: var(--color-text-muted);">— start/manage the local Web Configuration UI (port 1404)</span></div> <div class="rounded-xl border px-4 py-3" style="border-color: var(--color-border);"><span class="font-bold" style="color: var(--color-primary);">konoha task &lt;list|show|slop&gt;</span> <span style="color: var(--color-text-muted);">— inspect SDLC tasks and persisted slop results</span></div> <div class="rounded-xl border px-4 py-3" style="border-color: var(--color-border);"><span class="font-bold" style="color: var(--color-primary);">konoha skill &lt;list|search|add|remove&gt;</span> <span style="color: var(--color-text-muted);">— manage skills from the public registry (skills.sh)</span></div> <div class="rounded-xl border px-4 py-3" style="border-color: var(--color-border);"><span class="font-bold" style="color: var(--color-primary);">konoha doctor [--repair]</span> <span style="color: var(--color-text-muted);">— environment diagnostics and auto-repair</span></div></div></section></div></div></div>`);function E(r,v){f(v,!0);let E=s(null),D=s(`overview`),O=[{id:`overview`,label:`Overview`},{id:`architecture`,label:`Architecture & Agents`},{id:`mcp`,label:`MCP Servers & Tools`},{id:`sdlc`,label:`SDLC Lifecycle`},{id:`slop-gate`,label:`Anti-Slop Delivery Gate`},{id:`api`,label:`Web API Reference`},{id:`clients`,label:`Client Setup`},{id:`cli`,label:`CLI Commands`}],k=[{name:`Sannin`,role:`Task triage & orchestration router`,detail:`Entry point for non-trivial work. Resolves the task directory, routes the request through the village pipeline, and delivers the final report.`},{name:`Genin`,role:`Read-only exploration`,detail:`Codebase exploration, symbol search, dependency mapping, and evidence-based findings. Never mutates files.`},{name:`Kage`,role:`Architecture, security & review`,detail:`Deep code analysis, risk assessment, and the blocking Kage Reviewer Confidence Gate (≥98%) with the two-step Zero-AI-Slop scan.`},{name:`Jonin`,role:`Premium UI development`,detail:`Frontend builds with the Taste-Skill Design Engine — typography dials, motion intensity, and strict design invariants.`},{name:`Anbu`,role:`Backend & remediation`,detail:`Backend development, bug fixes, DevOps, and the slop-fix remediation specialist when the Delivery Gate reports findings.`},{name:`Chunin`,role:`Research & evidence`,detail:`Web research, documentation lookup, and evidence synthesis with citations.`},{name:`Tokubetsu-Jonin`,role:`Technical writing`,detail:`README creation, API specifications, runbooks, and final delivery documentation.`}],A=[{name:`konoha`,tools:`find_skill, get_skill, list_skills, read_file_head, read_file_range, token_efficient_grep, get_file_structure, find_files_clean, sannin, kage, jonin, anbu, chunin, genin, tokubetsu_jonin, website_ai_detector`,detail:`Skill discovery, bounded file I/O, subagent dispatch, and the website AI-fingerprint detector for every client.`},{name:`semble`,tools:`search, find_related`,detail:`Semantic codebase search. Always called with the absolute repository path — replaces grep/glob for code discovery.`},{name:`aislop`,tools:`aislop_scan, aislop_fix, aislop_why, aislop_baseline`,detail:`Zero-AI-Slop scanning and remediation. Read-only agents get scan + why; write agents additionally get fix.`}],j=[{method:`GET`,path:`/api/v1/health`,desc:`Server health, version, skills/agents counts`},{method:`GET`,path:`/api/v1/system/metrics`,desc:`System CPU/memory telemetry + Konoha feature metrics`},{method:`GET`,path:`/api/v1/detect-ai?target=`,desc:`Website AI-fingerprint detector (directory path or URL) — 0–100 score, 0–20 = Human-Built`},{method:`GET`,path:`/api/v1/detect-docs?file_path=`,desc:`Document AI-fingerprint detector (.docx, .pdf, .pptx, .xlsx, .md, .txt) — 0–3% ZeroGPT target`},{method:`POST`,path:`/api/v1/detect-docs/text`,desc:`Analyze pasted text for AI fingerprints (body: { text: string })`},{method:`GET`,path:`/api/v1/csrf`,desc:`Session CSRF token (mutating requests require X-Konoha-Web-Token)`},{method:`GET`,path:`/api/v1/bridges`,desc:`List configured bridges`},{method:`GET`,path:`/api/v1/bridges/status`,desc:`Runtime status of bridges & gateway`},{method:`GET`,path:`/api/v1/agents`,desc:`Agent roster & model assignments`},{method:`GET`,path:`/api/v1/skills`,desc:`Skill search (FTS5 / semantic vector mode)`},{method:`POST`,path:`/api/v1/skills/install`,desc:`Install a skill from the registry`},{method:`GET`,path:`/api/v1/sdlc/tasks`,desc:`List SDLC tasks (filter by status/project)`},{method:`POST`,path:`/api/v1/sdlc/check-readiness`,desc:`Definition-of-Readiness check for task text`},{method:`GET`,path:`/api/v1/sdlc/config`,desc:`Project SDLC config (dor_mode, review_mode)`},{method:`GET`,path:`/api/v1/savings`,desc:`Token savings report (Konoha + Semble combined)`},{method:`GET`,path:`/api/v1/semble`,desc:`Semble MCP status`},{method:`POST`,path:`/api/v1/semble/search`,desc:`Semantic code search proxy`},{method:`GET`,path:`/api/v1/search/status`,desc:`SearXNG search engine status`},{method:`POST`,path:`/api/v1/search`,desc:`Zero-API-key web search`},{method:`GET`,path:`/api/v1/doctor`,desc:`Environment health diagnostics`},{method:`POST`,path:`/api/v1/doctor/repair`,desc:`Auto-repair detected issues`},{method:`GET`,path:`/api/v1/persona`,desc:`Persona memories (project-scoped)`},{method:`GET`,path:`/api/v1/projects`,desc:`Known projects & current workspace`},{method:`GET`,path:`/api/v1/clients`,desc:`Cross-client MCP configuration status`},{method:`GET`,path:`/api/v1/events`,desc:`Server-sent events stream (live updates)`}],M=[{name:`Antigravity IDE / CLI`,config:`~/.gemini/config/mcp_config.json`},{name:`Cursor IDE`,config:`~/.cursor/mcp.json`},{name:`Claude Code`,config:`~/.claude.json`},{name:`OpenCode`,config:`~/.config/opencode/opencode.json`},{name:`Command Code`,config:`~/.commandcode/mcp.json`},{name:`Codex IDE / CLI`,config:`~/.codex/config.toml`},{name:`Pi (pi.dev)`,config:`~/.pi/agent/mcp.json`}],N=[`Route`,`Research`,`Explore`,`Plan`,`Execute`,`Review`,`Document`,`Synthesize`];b(async()=>{try{i(E,await S.get(`/api/v1/health`),!0)}catch{}});var P=T(),F=n(P),I=d(n(F),2),L=t=>{var r=C(),i=n(r),s=a(i),l=d(i,2),f=a(l,!0);e(r),o(()=>{u(s,`v${c(E).version??``}`),u(f,c(E).node)}),x(t,r)};m(I,e=>{c(E)&&e(L)}),e(F);var R=d(F,2),z=n(R),B=n(z),ae=d(n(B),2);_(ae,17,()=>O,g,(e,n)=>{var r=ee(),s=a(r,!0);o(()=>{y(r,`href`,`#${c(n).id??``}`),h(r,`color: ${c(D)===c(n).id?`var(--color-primary)`:`var(--color-text-muted)`}; background: ${c(D)===c(n).id?`var(--color-primary-glow)`:`transparent`};`),u(s,c(n).label)}),t(`click`,r,()=>i(D,c(n).id,!0)),x(e,r)}),e(B),e(z);var V=d(z,2),H=n(V),U=d(n(H),6);_(U,21,()=>N,g,(e,t,n)=>{var r=te(),i=a(r);o(()=>u(i,`${n+1}. ${c(t)??``}`)),x(e,r)}),e(U),e(H);var W=d(H,2),G=d(n(W),4);_(G,21,()=>k,g,(t,r)=>{var i=ne(),s=n(i),l=n(s),f=a(l,!0),p=d(l,2),m=a(p,!0);e(s);var h=d(s,2),g=a(h,!0);e(i),o(()=>{u(f,c(r).name),u(m,c(r).role),u(g,c(r).detail)}),x(t,i)}),e(G),e(W);var K=d(W,2),q=d(n(K),4);_(q,21,()=>A,g,(t,r)=>{var i=re(),s=n(i),l=d(n(s),2),f=a(l,!0);e(s);var p=d(s,2),m=a(p,!0),h=d(p,2),g=a(h,!0);e(i),o(()=>{u(f,c(r).name),u(m,c(r).detail),u(g,c(r).tools)}),x(t,i)}),e(q),e(K);var J=d(K,6),Y=d(n(J),4),X=n(Y),Z=d(n(X));_(Z,21,()=>j,g,(t,r)=>{var i=ie(),s=n(i),l=n(s),f=a(l,!0);e(s);var p=d(s),m=a(p,!0),g=d(p),_=a(g,!0);e(i),o(()=>{h(l,`color: ${c(r).method===`GET`?`#059669`:`#2563eb`}; background: ${c(r).method===`GET`?`rgba(5,150,105,0.1)`:`rgba(37,99,235,0.1)`};`),u(f,c(r).method),u(m,c(r).path),u(_,c(r).desc)}),x(t,i)}),e(Z),e(X),e(Y),e(J);var Q=d(J,2),$=d(n(Q),4);_($,21,()=>M,g,(t,r)=>{var i=w(),s=n(i),l=a(s,!0),f=d(s,2),p=a(f,!0);e(i),o(()=>{u(l,c(r).name),u(p,c(r).config)}),x(t,i)}),e($),e(Q),l(2),e(V),e(R),e(P),x(r,P),p()}v([`click`]);function D(e){E(e,{})}export{D as component};