konoha-mcp 2.1.15 → 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.
- package/.agents/SOUL.md +165 -0
- package/.agents/skills/konoha/SKILL.md +32 -3
- package/.agents/skills.fingerprint +1 -1
- package/README.md +188 -221
- package/apps/web/build/adapter-node.js +1 -1
- package/apps/web/build/client/_app/immutable/assets/0.BGEsEaMd.css +2 -0
- package/apps/web/build/client/_app/immutable/assets/0.BGEsEaMd.css.br +0 -0
- package/apps/web/build/client/_app/immutable/assets/0.BGEsEaMd.css.gz +0 -0
- package/apps/web/build/client/_app/immutable/chunks/{D-Kujhko.js → 2WlqNq2Q.js} +1 -1
- package/apps/web/build/client/_app/immutable/chunks/2WlqNq2Q.js.br +0 -0
- package/apps/web/build/client/_app/immutable/chunks/2WlqNq2Q.js.gz +0 -0
- package/apps/web/build/client/_app/immutable/chunks/B9vY64pH.js +1 -0
- package/apps/web/build/client/_app/immutable/chunks/B9vY64pH.js.br +0 -0
- package/apps/web/build/client/_app/immutable/chunks/B9vY64pH.js.gz +0 -0
- package/apps/web/build/client/_app/immutable/chunks/{Dzm74gVd.js → BPX4jQ9l.js} +1 -1
- package/apps/web/build/client/_app/immutable/chunks/BPX4jQ9l.js.br +2 -0
- package/apps/web/build/client/_app/immutable/chunks/BPX4jQ9l.js.gz +0 -0
- package/apps/web/build/client/_app/immutable/chunks/{fbrtLByB.js → BXssplIZ.js} +1 -1
- package/apps/web/build/client/_app/immutable/chunks/BXssplIZ.js.br +0 -0
- package/apps/web/build/client/_app/immutable/chunks/BXssplIZ.js.gz +0 -0
- package/apps/web/build/client/_app/immutable/chunks/C-3vSv0T.js +1 -0
- package/apps/web/build/client/_app/immutable/chunks/C-3vSv0T.js.br +2 -0
- package/apps/web/build/client/_app/immutable/chunks/C-3vSv0T.js.gz +0 -0
- package/apps/web/build/client/_app/immutable/chunks/{PrdhfbrQ.js → C7jhkUmC.js} +1 -1
- package/apps/web/build/client/_app/immutable/chunks/C7jhkUmC.js.br +0 -0
- package/apps/web/build/client/_app/immutable/chunks/{PrdhfbrQ.js.gz → C7jhkUmC.js.gz} +0 -0
- package/apps/web/build/client/_app/immutable/chunks/{7LmsTWIo.js → CfrhQlXt.js} +1 -1
- package/apps/web/build/client/_app/immutable/chunks/CfrhQlXt.js.br +0 -0
- package/apps/web/build/client/_app/immutable/chunks/CfrhQlXt.js.gz +0 -0
- package/apps/web/build/client/_app/immutable/chunks/CgzsRqh3.js +1 -0
- package/apps/web/build/client/_app/immutable/chunks/CgzsRqh3.js.br +1 -0
- package/apps/web/build/client/_app/immutable/chunks/CgzsRqh3.js.gz +0 -0
- package/apps/web/build/client/_app/immutable/chunks/ChmznE4L.js +2 -0
- package/apps/web/build/client/_app/immutable/chunks/ChmznE4L.js.br +0 -0
- package/apps/web/build/client/_app/immutable/chunks/ChmznE4L.js.gz +0 -0
- package/apps/web/build/client/_app/immutable/entry/app.cdLMQHsN.js +2 -0
- package/apps/web/build/client/_app/immutable/entry/app.cdLMQHsN.js.br +0 -0
- package/apps/web/build/client/_app/immutable/entry/app.cdLMQHsN.js.gz +0 -0
- package/apps/web/build/client/_app/immutable/entry/{start.CNV5BTCO.js → start.CJ1ccVCA.js} +2 -2
- package/apps/web/build/client/_app/immutable/entry/start.CJ1ccVCA.js.br +0 -0
- package/apps/web/build/client/_app/immutable/entry/start.CJ1ccVCA.js.gz +0 -0
- package/apps/web/build/client/_app/immutable/nodes/0.ijG9ltjt.js +2 -0
- package/apps/web/build/client/_app/immutable/nodes/0.ijG9ltjt.js.br +0 -0
- package/apps/web/build/client/_app/immutable/nodes/0.ijG9ltjt.js.gz +0 -0
- package/apps/web/build/client/_app/immutable/nodes/1.i6MXc2Yb.js +1 -0
- package/apps/web/build/client/_app/immutable/nodes/1.i6MXc2Yb.js.br +2 -0
- package/apps/web/build/client/_app/immutable/nodes/1.i6MXc2Yb.js.gz +0 -0
- package/apps/web/build/client/_app/immutable/nodes/10.B0F7UoZ4.js +1 -0
- package/apps/web/build/client/_app/immutable/nodes/10.B0F7UoZ4.js.br +0 -0
- package/apps/web/build/client/_app/immutable/nodes/10.B0F7UoZ4.js.gz +0 -0
- package/apps/web/build/client/_app/immutable/nodes/11.BuH1S-Sa.js +2 -0
- package/apps/web/build/client/_app/immutable/nodes/11.BuH1S-Sa.js.br +0 -0
- package/apps/web/build/client/_app/immutable/nodes/11.BuH1S-Sa.js.gz +0 -0
- package/apps/web/build/client/_app/immutable/nodes/12.DVFmb_G-.js +1 -0
- package/apps/web/build/client/_app/immutable/nodes/12.DVFmb_G-.js.br +0 -0
- package/apps/web/build/client/_app/immutable/nodes/12.DVFmb_G-.js.gz +0 -0
- package/apps/web/build/client/_app/immutable/nodes/13.0PJQyjqs.js +1 -0
- package/apps/web/build/client/_app/immutable/nodes/13.0PJQyjqs.js.br +0 -0
- package/apps/web/build/client/_app/immutable/nodes/13.0PJQyjqs.js.gz +0 -0
- package/apps/web/build/client/_app/immutable/nodes/14.ljEGDzwO.js +3 -0
- package/apps/web/build/client/_app/immutable/nodes/14.ljEGDzwO.js.br +0 -0
- package/apps/web/build/client/_app/immutable/nodes/14.ljEGDzwO.js.gz +0 -0
- package/apps/web/build/client/_app/immutable/nodes/15.DpXDNTPX.js +1 -0
- package/apps/web/build/client/_app/immutable/nodes/15.DpXDNTPX.js.br +0 -0
- package/apps/web/build/client/_app/immutable/nodes/15.DpXDNTPX.js.gz +0 -0
- package/apps/web/build/client/_app/immutable/nodes/16.qIEBxyps.js +17 -0
- package/apps/web/build/client/_app/immutable/nodes/16.qIEBxyps.js.br +0 -0
- package/apps/web/build/client/_app/immutable/nodes/16.qIEBxyps.js.gz +0 -0
- package/apps/web/build/client/_app/immutable/nodes/17.CmVvQa7x.js +1 -0
- package/apps/web/build/client/_app/immutable/nodes/17.CmVvQa7x.js.br +0 -0
- package/apps/web/build/client/_app/immutable/nodes/17.CmVvQa7x.js.gz +0 -0
- package/apps/web/build/client/_app/immutable/nodes/{2.Dr646Vs5.js → 2.lx602Ou_.js} +1 -1
- package/apps/web/build/client/_app/immutable/nodes/2.lx602Ou_.js.br +0 -0
- package/apps/web/build/client/_app/immutable/nodes/2.lx602Ou_.js.gz +0 -0
- package/apps/web/build/client/_app/immutable/nodes/3.B-axtlUy.js +1 -0
- package/apps/web/build/client/_app/immutable/nodes/3.B-axtlUy.js.br +0 -0
- package/apps/web/build/client/_app/immutable/nodes/3.B-axtlUy.js.gz +0 -0
- package/apps/web/build/client/_app/immutable/nodes/4.Cp9WmMgk.js +1 -0
- package/apps/web/build/client/_app/immutable/nodes/4.Cp9WmMgk.js.br +0 -0
- package/apps/web/build/client/_app/immutable/nodes/4.Cp9WmMgk.js.gz +0 -0
- package/apps/web/build/client/_app/immutable/nodes/5.CQxJe2vk.js +1 -0
- package/apps/web/build/client/_app/immutable/nodes/5.CQxJe2vk.js.br +0 -0
- package/apps/web/build/client/_app/immutable/nodes/5.CQxJe2vk.js.gz +0 -0
- package/apps/web/build/client/_app/immutable/nodes/6.5S6pozqG.js +1 -0
- package/apps/web/build/client/_app/immutable/nodes/6.5S6pozqG.js.br +0 -0
- package/apps/web/build/client/_app/immutable/nodes/6.5S6pozqG.js.gz +0 -0
- package/apps/web/build/client/_app/immutable/nodes/{7.CmbiPMU3.js → 7.B5ZeCLvS.js} +1 -1
- package/apps/web/build/client/_app/immutable/nodes/7.B5ZeCLvS.js.br +0 -0
- package/apps/web/build/client/_app/immutable/nodes/7.B5ZeCLvS.js.gz +0 -0
- package/apps/web/build/client/_app/immutable/nodes/8.M3fxLxa9.js +1 -0
- package/apps/web/build/client/_app/immutable/nodes/8.M3fxLxa9.js.br +0 -0
- package/apps/web/build/client/_app/immutable/nodes/8.M3fxLxa9.js.gz +0 -0
- package/apps/web/build/client/_app/immutable/nodes/9.CYkQmFMJ.js +21 -0
- package/apps/web/build/client/_app/immutable/nodes/9.CYkQmFMJ.js.br +0 -0
- package/apps/web/build/client/_app/immutable/nodes/9.CYkQmFMJ.js.gz +0 -0
- package/apps/web/build/client/_app/version.json +1 -1
- package/apps/web/build/client/_app/version.json.br +0 -0
- package/apps/web/build/client/_app/version.json.gz +0 -0
- package/apps/web/build/server/.vite/manifest.json +15 -1
- package/apps/web/build/server/_app/immutable/assets/_layout.BGEsEaMd.css +2 -0
- package/apps/web/build/server/chunks/api.js +4 -0
- package/apps/web/build/server/chunks/api.js.map +1 -1
- package/apps/web/build/server/chunks/instance.js +3 -3
- package/apps/web/build/server/chunks/internal.js +1 -1
- package/apps/web/build/server/entries/pages/_layout.svelte.js +7 -0
- package/apps/web/build/server/entries/pages/_layout.svelte.js.map +1 -1
- package/apps/web/build/server/entries/pages/agents/_page.svelte.js +6 -2
- package/apps/web/build/server/entries/pages/agents/_page.svelte.js.map +1 -1
- package/apps/web/build/server/entries/pages/docs/_page.svelte.js +86 -2
- package/apps/web/build/server/entries/pages/docs/_page.svelte.js.map +1 -1
- package/apps/web/build/server/entries/pages/persona/_page.svelte.js +16 -9
- package/apps/web/build/server/entries/pages/persona/_page.svelte.js.map +1 -1
- package/apps/web/build/server/entries/pages/remote/_page.svelte.js +73 -0
- package/apps/web/build/server/entries/pages/remote/_page.svelte.js.map +1 -0
- package/apps/web/build/server/manifest-full.js +15 -7
- package/apps/web/build/server/manifest.js +15 -7
- package/apps/web/build/server/nodes/0.js +2 -2
- package/apps/web/build/server/nodes/1.js +1 -1
- package/apps/web/build/server/nodes/10.js +1 -1
- package/apps/web/build/server/nodes/11.js +1 -1
- package/apps/web/build/server/nodes/12.js +2 -2
- package/apps/web/build/server/nodes/13.js +2 -2
- package/apps/web/build/server/nodes/14.js +2 -2
- package/apps/web/build/server/nodes/15.js +2 -2
- package/apps/web/build/server/nodes/16.js +2 -2
- package/apps/web/build/server/nodes/17.js +8 -0
- package/apps/web/build/server/nodes/2.js +1 -1
- package/apps/web/build/server/nodes/3.js +1 -1
- package/apps/web/build/server/nodes/4.js +1 -1
- package/apps/web/build/server/nodes/5.js +1 -1
- package/apps/web/build/server/nodes/6.js +1 -1
- package/apps/web/build/server/nodes/7.js +1 -1
- package/apps/web/build/server/nodes/8.js +1 -1
- package/apps/web/build/server/nodes/9.js +1 -1
- package/apps/web/build/server/server.js +15 -7
- package/apps/web/package.json +1 -1
- package/bin/cli.js +465 -32
- package/docs/ALL-WORKFLOW-DIAGRAMS.md +135 -0
- package/docs/ARCHITECTURE.md +28 -6
- package/docs/BENCHMARK.md +55 -26
- package/docs/CLOUDFLARE_TUNNEL_GUIDE.md +119 -0
- package/docs/SecurityCompliance/security_compliance_report_google_policy_2.1.16_2026-10-08.md +69 -0
- package/docs/SecurityCompliance/security_compliance_report_google_policy_2.1.17_2026-10-08.md +87 -0
- package/docs/TELEGRAM_INTEGRATION_GUIDE.md +146 -0
- package/docs/TROUBLESHOOTING.md +2 -2
- package/docs/architecture/CANONICAL-API.md +4 -1
- package/docs/architecture/TOKEN-BASELINE.md +6 -6
- package/docs/diagrams/README.md +6 -2
- package/docs/diagrams/konoha-architecture.drawio +121 -0
- package/docs/diagrams/konoha-enterprise-architecture.drawio +121 -0
- package/package.json +1 -1
- package/src/agent_manager.js +75 -8
- package/src/canonical_skills.js +2 -0
- package/src/crypto_vault.js +157 -0
- package/src/db.js +186 -65
- package/src/db_agents.js +1 -1
- package/src/deploy_utils.js +4 -3
- package/src/file_tools_router.js +2 -1
- package/src/mcp/memory_reporting.js +19 -0
- package/src/mcp/skills.js +17 -15
- package/src/mcp/tool_dispatch.js +11 -0
- package/src/mcp/workflow.js +38 -0
- package/src/mcp_tool_manifest.json +22 -0
- package/src/migrate.js +74 -6
- package/src/persona_memory.js +133 -1
- package/src/pi_manager.js +1 -1
- package/src/prompt_hook.js +40 -1
- package/src/queue/inbox.js +243 -0
- package/src/queue/worker.js +413 -0
- package/src/telegram/config.js +101 -0
- package/src/telegram/notifier.js +359 -0
- package/src/telegram/poller.js +548 -0
- package/src/telegram/session_manager.js +583 -0
- package/src/templates/SOUL.md +165 -0
- package/src/templates/skills/konoha/SKILL.md +32 -3
- package/src/tunnel/config.js +89 -0
- package/src/tunnel/manager.js +216 -0
- package/src/tunnel/security.js +225 -0
- package/src/vector_search.js +21 -11
- package/src/web_server.js +377 -10
- package/apps/web/build/client/_app/immutable/assets/0.CASgEURp.css +0 -2
- package/apps/web/build/client/_app/immutable/assets/0.CASgEURp.css.br +0 -0
- package/apps/web/build/client/_app/immutable/assets/0.CASgEURp.css.gz +0 -0
- package/apps/web/build/client/_app/immutable/chunks/7LmsTWIo.js.br +0 -0
- package/apps/web/build/client/_app/immutable/chunks/7LmsTWIo.js.gz +0 -0
- package/apps/web/build/client/_app/immutable/chunks/BH86Md_X.js +0 -1
- package/apps/web/build/client/_app/immutable/chunks/BH86Md_X.js.br +0 -2
- package/apps/web/build/client/_app/immutable/chunks/BH86Md_X.js.gz +0 -0
- package/apps/web/build/client/_app/immutable/chunks/C3-t9btS.js +0 -1
- package/apps/web/build/client/_app/immutable/chunks/C3-t9btS.js.br +0 -1
- package/apps/web/build/client/_app/immutable/chunks/C3-t9btS.js.gz +0 -0
- package/apps/web/build/client/_app/immutable/chunks/CBY268r4.js +0 -1
- package/apps/web/build/client/_app/immutable/chunks/CBY268r4.js.br +0 -3
- package/apps/web/build/client/_app/immutable/chunks/CBY268r4.js.gz +0 -0
- package/apps/web/build/client/_app/immutable/chunks/D-Kujhko.js.br +0 -0
- package/apps/web/build/client/_app/immutable/chunks/D-Kujhko.js.gz +0 -0
- package/apps/web/build/client/_app/immutable/chunks/Dzm74gVd.js.br +0 -0
- package/apps/web/build/client/_app/immutable/chunks/Dzm74gVd.js.gz +0 -0
- package/apps/web/build/client/_app/immutable/chunks/Lb3VuXoN.js +0 -2
- package/apps/web/build/client/_app/immutable/chunks/Lb3VuXoN.js.br +0 -0
- package/apps/web/build/client/_app/immutable/chunks/Lb3VuXoN.js.gz +0 -0
- package/apps/web/build/client/_app/immutable/chunks/PrdhfbrQ.js.br +0 -0
- package/apps/web/build/client/_app/immutable/chunks/fbrtLByB.js.br +0 -0
- package/apps/web/build/client/_app/immutable/chunks/fbrtLByB.js.gz +0 -0
- package/apps/web/build/client/_app/immutable/entry/app.BDzkoHRK.js +0 -2
- package/apps/web/build/client/_app/immutable/entry/app.BDzkoHRK.js.br +0 -0
- package/apps/web/build/client/_app/immutable/entry/app.BDzkoHRK.js.gz +0 -0
- package/apps/web/build/client/_app/immutable/entry/start.CNV5BTCO.js.br +0 -0
- package/apps/web/build/client/_app/immutable/entry/start.CNV5BTCO.js.gz +0 -0
- package/apps/web/build/client/_app/immutable/nodes/0.u4hg-Zwy.js +0 -2
- package/apps/web/build/client/_app/immutable/nodes/0.u4hg-Zwy.js.br +0 -0
- package/apps/web/build/client/_app/immutable/nodes/0.u4hg-Zwy.js.gz +0 -0
- package/apps/web/build/client/_app/immutable/nodes/1.BZu6jsAH.js +0 -1
- package/apps/web/build/client/_app/immutable/nodes/1.BZu6jsAH.js.br +0 -0
- package/apps/web/build/client/_app/immutable/nodes/1.BZu6jsAH.js.gz +0 -0
- package/apps/web/build/client/_app/immutable/nodes/10.CZKScTFN.js +0 -1
- package/apps/web/build/client/_app/immutable/nodes/10.CZKScTFN.js.br +0 -0
- package/apps/web/build/client/_app/immutable/nodes/10.CZKScTFN.js.gz +0 -0
- package/apps/web/build/client/_app/immutable/nodes/11.DFglFW_i.js +0 -1
- package/apps/web/build/client/_app/immutable/nodes/11.DFglFW_i.js.br +0 -0
- package/apps/web/build/client/_app/immutable/nodes/11.DFglFW_i.js.gz +0 -0
- package/apps/web/build/client/_app/immutable/nodes/12.CSShcv5z.js +0 -1
- package/apps/web/build/client/_app/immutable/nodes/12.CSShcv5z.js.br +0 -0
- package/apps/web/build/client/_app/immutable/nodes/12.CSShcv5z.js.gz +0 -0
- package/apps/web/build/client/_app/immutable/nodes/13.jWUWoBcs.js +0 -3
- package/apps/web/build/client/_app/immutable/nodes/13.jWUWoBcs.js.br +0 -0
- package/apps/web/build/client/_app/immutable/nodes/13.jWUWoBcs.js.gz +0 -0
- package/apps/web/build/client/_app/immutable/nodes/14.H-jSqqen.js +0 -1
- package/apps/web/build/client/_app/immutable/nodes/14.H-jSqqen.js.br +0 -0
- package/apps/web/build/client/_app/immutable/nodes/14.H-jSqqen.js.gz +0 -0
- package/apps/web/build/client/_app/immutable/nodes/15.CpAoyhzV.js +0 -17
- package/apps/web/build/client/_app/immutable/nodes/15.CpAoyhzV.js.br +0 -0
- package/apps/web/build/client/_app/immutable/nodes/15.CpAoyhzV.js.gz +0 -0
- package/apps/web/build/client/_app/immutable/nodes/16.DT_-MxCT.js +0 -1
- package/apps/web/build/client/_app/immutable/nodes/16.DT_-MxCT.js.br +0 -0
- package/apps/web/build/client/_app/immutable/nodes/16.DT_-MxCT.js.gz +0 -0
- package/apps/web/build/client/_app/immutable/nodes/2.Dr646Vs5.js.br +0 -0
- package/apps/web/build/client/_app/immutable/nodes/2.Dr646Vs5.js.gz +0 -0
- package/apps/web/build/client/_app/immutable/nodes/3.Cgc-xN3x.js +0 -1
- package/apps/web/build/client/_app/immutable/nodes/3.Cgc-xN3x.js.br +0 -0
- package/apps/web/build/client/_app/immutable/nodes/3.Cgc-xN3x.js.gz +0 -0
- package/apps/web/build/client/_app/immutable/nodes/4.CYJQ4bWz.js +0 -1
- package/apps/web/build/client/_app/immutable/nodes/4.CYJQ4bWz.js.br +0 -0
- package/apps/web/build/client/_app/immutable/nodes/4.CYJQ4bWz.js.gz +0 -0
- package/apps/web/build/client/_app/immutable/nodes/5.DbHL-3Es.js +0 -1
- package/apps/web/build/client/_app/immutable/nodes/5.DbHL-3Es.js.br +0 -0
- package/apps/web/build/client/_app/immutable/nodes/5.DbHL-3Es.js.gz +0 -0
- package/apps/web/build/client/_app/immutable/nodes/6.BvWH2qas.js +0 -1
- package/apps/web/build/client/_app/immutable/nodes/6.BvWH2qas.js.br +0 -0
- package/apps/web/build/client/_app/immutable/nodes/6.BvWH2qas.js.gz +0 -0
- package/apps/web/build/client/_app/immutable/nodes/7.CmbiPMU3.js.br +0 -0
- package/apps/web/build/client/_app/immutable/nodes/7.CmbiPMU3.js.gz +0 -0
- package/apps/web/build/client/_app/immutable/nodes/8.B9897Zm9.js +0 -1
- package/apps/web/build/client/_app/immutable/nodes/8.B9897Zm9.js.br +0 -0
- package/apps/web/build/client/_app/immutable/nodes/8.B9897Zm9.js.gz +0 -0
- package/apps/web/build/client/_app/immutable/nodes/9.CGMmeMVC.js +0 -14
- package/apps/web/build/client/_app/immutable/nodes/9.CGMmeMVC.js.br +0 -0
- package/apps/web/build/client/_app/immutable/nodes/9.CGMmeMVC.js.gz +0 -0
- package/apps/web/build/server/_app/immutable/assets/_layout.CASgEURp.css +0 -2
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{$ as e,C as t,D as n,K as r,L as i,M as a,N as o,T as s,U as c,V as l,W as u,X as d,Z as f,_ as p,a as m,et as h,f as g,g as _,i as v,l as y,p as b,q as x,u as S,v as C,y as w}from"../chunks/C7jhkUmC.js";import{t as T}from"../chunks/CfrhQlXt.js";import"../chunks/CgzsRqh3.js";import{t as E}from"../chunks/BPX4jQ9l.js";var ee=n(`<div class="p-4 rounded-2xl border border-rose-200 bg-rose-50 text-rose-800 text-xs font-semibold"> </div>`),te=n(`<div class="grid grid-cols-1 md:grid-cols-3 gap-5"><div class="glass-card-3d p-6 rounded-2xl border"><div class="flex items-center justify-between mb-3 text-xs font-bold text-slate-700 uppercase tracking-wider"><span>Today Savings</span> <span class="px-2 py-0.5 rounded-full bg-emerald-100 text-emerald-800 border border-emerald-300 font-mono font-bold">99%</span></div> <div class="text-3xl font-black text-slate-900 tracking-tight mb-1"> </div> <div class="text-xs font-semibold text-slate-700 flex items-center justify-between"><span> </span> <span class="text-emerald-700 font-bold">Optimal context</span></div> <div class="w-full h-1.5 bg-slate-200 rounded-full mt-3 overflow-hidden"><div class="h-full bg-emerald-500 rounded-full" style="width: 99%"></div></div></div> <div class="glass-card-3d p-6 rounded-2xl border"><div class="flex items-center justify-between mb-3 text-xs font-bold text-slate-700 uppercase tracking-wider"><span>Last 7 Days</span> <span class="px-2 py-0.5 rounded-full bg-sky-100 text-sky-800 border border-sky-300 font-mono font-bold">99%</span></div> <div class="text-3xl font-black text-slate-900 tracking-tight mb-1"> </div> <div class="text-xs font-semibold text-slate-700 flex items-center justify-between"><span> </span> <span class="text-sky-700 font-bold">Consistently ~99%</span></div> <div class="w-full h-1.5 bg-slate-200 rounded-full mt-3 overflow-hidden"><div class="h-full bg-sky-500 rounded-full" style="width: 99%"></div></div></div> <div class="glass-card-3d p-6 rounded-2xl border"><div class="flex items-center justify-between mb-3 text-xs font-bold text-slate-700 uppercase tracking-wider"><span>Total Reduction</span> <span class="px-2 py-0.5 rounded-full bg-purple-100 text-purple-800 border border-purple-300 font-mono font-bold"> </span></div> <div class="text-3xl font-black text-slate-900 tracking-tight mb-1"> </div> <div class="text-xs font-semibold text-slate-700 flex items-center justify-between"><span> </span> <span class="text-purple-700 font-bold">Net Saved</span></div> <div class="w-full h-1.5 bg-slate-200 rounded-full mt-3 overflow-hidden"><div class="h-full bg-purple-600 rounded-full"></div></div></div></div>`),D=n(`<span><span></span> </span>`),O=n(`<div class="p-4 rounded-2xl border border-slate-200 bg-white/90 space-y-2 hover:border-purple-300 transition-colors"><div class="flex items-center justify-between"><span class="font-mono text-xs font-bold text-purple-700 break-all"> </span> <span class="px-2 py-0.5 rounded text-[10px] font-mono font-bold bg-slate-100 text-slate-800 border border-slate-200"> </span></div> <pre class="text-[11px] font-mono p-3 rounded-xl bg-slate-50 border border-slate-200 text-slate-900 overflow-x-auto whitespace-pre-wrap"> </pre></div>`),k=n(`<div class="space-y-4 pt-4 border-t border-slate-200"><div class="flex items-center justify-between text-xs"><span class="font-bold text-slate-700"> </span></div> <div class="space-y-3"></div></div>`),A=n(`<div class="space-y-8 max-w-7xl mx-auto"><div class="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="M13 10V3L4 14h7v7l9-11h-7z"></path></svg> Default Codebase Discovery Server</div> <h2 class="text-2xl lg:text-3xl font-black text-slate-900 tracking-tight">Semble MCP Engine</h2> <p class="text-sm font-semibold text-slate-700 max-w-2xl leading-relaxed">AI-powered semantic code search powered by MinishLab. Understands code intent, symbols, and architecture while burning ~98% fewer context tokens than legacy grep and file dumps.</p></div> <div class="flex items-center gap-4 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">Saved All-Time</div> <div class="text-xl font-black text-emerald-600"> </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">Engine Type</div> <div class="text-xl font-black text-sky-600">Neural + FTS</div></div></div></div></div> <!> <!> <div class="glass-card-3d rounded-3xl p-6 lg:p-8 border space-y-6"><div class="flex items-center justify-between"><div><h3 class="text-lg font-black text-slate-900">Semble Search Playground</h3> <p class="text-xs font-semibold text-slate-700 mt-0.5">Execute real-time semantic neural queries against the active project repository.</p></div> <!></div> <form class="flex flex-col sm:flex-row gap-3"><div class="relative flex-1"><input type="text" placeholder="Describe symbol, bug, or feature (e.g. CSRF token validation logic)..." class="w-full pl-10 pr-4 py-3 rounded-2xl text-xs font-semibold text-slate-900 border border-slate-300 bg-white/95 focus:ring-2 focus:ring-purple-500 focus:outline-none"/> <svg class="w-4 h-4 absolute left-3.5 top-3.5 text-slate-500" 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 class="flex items-center gap-3"><select class="px-3 py-3 rounded-2xl text-xs font-semibold text-slate-900 border border-slate-300 bg-white focus:ring-2 focus:ring-purple-500"><option>Top 3</option><option>Top 5</option><option>Top 10</option></select> <button type="submit" class="btn-3d px-6 py-3 rounded-2xl font-bold text-xs text-white transition-all shadow-md cursor-pointer disabled:opacity-50 shrink-0" style="background-color: var(--color-primary, #7c3aed);"> </button></div></form> <!></div></div>`);function j(n,j){f(j,!0);let M=x(null),N=x(null),P=x(!0),F=x(``),I=x(``),L=x(5),R=x(!1),z=x(null),ne=x(``);async function re(){r(P,!0),r(F,``);try{let[e,t]=await Promise.all([T.get(`/api/v1/semble`),T.get(`/api/v1/semble/savings`)]);r(M,e,!0),r(N,t,!0)}catch(e){r(F,e.message,!0)}finally{r(P,!1)}}async function ie(e){if(e&&e.preventDefault(),o(I).trim()){r(R,!0),r(ne,``),r(z,null);try{let e=await T.post(`/api/v1/semble/search`,{query:o(I).trim(),limit:o(L)});r(z,e,!0)}catch(e){r(ne,e.message,!0),await E.fire({title:`Search Failed`,text:e.message,icon:`error`})}finally{r(R,!1)}}}w(re);var B=A(),V=l(B),H=l(V),U=u(l(H),2),W=l(U),ae=u(l(W),2),oe=c(ae,!0);h(W),e(2),h(U),h(H),h(V);var G=u(V,2),se=e=>{var n=ee(),r=c(n,!0);i(()=>t(r,o(F))),s(e,n)};C(G,e=>{o(F)&&e(se)});var K=u(G,2),ce=n=>{var r=te(),a=l(r),d=u(l(a),2),f=c(d,!0),p=u(d,2),m=l(p),_=c(m);e(2),h(p),e(2),h(a);var v=u(a,2),y=u(l(v),2),b=c(y,!0),x=u(y,2),S=l(x),C=c(S);e(2),h(x),e(2),h(v);var w=u(v,2),T=l(w),E=u(l(T),2),ee=c(E);h(T);var D=u(T,2),O=c(D,!0),k=u(D,2),A=l(k),j=c(A);e(2),h(k);var M=u(k,2),P=c(M);h(w),h(r),i(()=>{t(f,o(N).today?.tokens_saved??`—`),t(_,`${o(N).today?.calls??0??``} search queries`),t(b,o(N).last_7_days?.tokens_saved??`—`),t(C,`${o(N).last_7_days?.calls??0??``} searches`),t(ee,`${o(N).total_saved_pct??0??``}%`),t(O,o(N).total_saved??`—`),t(j,`${o(N).total_calls??0??``} total queries`),g(P,`width: ${o(N).total_saved_pct??0??``}%`)}),s(n,r)};C(K,e=>{o(N)&&e(ce)});var q=u(K,2),J=l(q),le=u(l(J),2),ue=e=>{var n=D(),r=l(n),a=u(r);h(n),i(()=>{b(n,1,`inline-flex items-center gap-1.5 px-3 py-1 rounded-full text-xs font-bold border ${o(M).available??o(M).configured?`bg-emerald-100 text-emerald-800 border-emerald-300`:`bg-rose-100 text-rose-800 border-rose-300`}`),b(r,1,`w-1.5 h-1.5 rounded-full ${o(M).available??o(M).configured?`bg-emerald-500`:`bg-rose-500`}`),t(a,` ${o(M).available??o(M).configured?`Engine Online`:`Engine Offline`}`)}),s(e,n)};C(le,e=>{o(M)&&e(ue)}),h(J);var Y=u(J,2),X=l(Y),de=l(X);m(de),e(2),h(X);var fe=u(X,2),Z=l(fe),Q=l(Z);Q.value=Q.__value=3;var $=u(Q);$.value=$.__value=5;var pe=u($);pe.value=pe.__value=10,h(Z),S(Z);var me=u(Z,2),he=c(me,!0);h(fe),h(Y);var ge=u(Y,2),_e=e=>{var n=k(),r=l(n),a=l(r),d=c(a);h(r);var f=u(r,2);_(f,21,()=>o(z).results||[],p,(e,n)=>{var r=O(),a=l(r),d=l(a),f=c(d,!0),p=u(d,2),m=c(p);h(a);var g=u(a,2),_=c(g,!0);h(r),i(e=>{t(f,o(n).file_path),t(m,`L${o(n).start_line??``}-${o(n).end_line??``} • Score: ${e??``}`),t(_,o(n).content)},[()=>o(n).score?o(n).score.toFixed(3):`—`]),s(e,r)}),h(f),h(n),i(()=>t(d,`Found ${(o(z).results?o(z).results.length:0)??``} semantic matches for "${o(I)??``}"`)),s(e,n)};C(ge,e=>{o(z)&&e(_e)}),h(q),h(B),i(e=>{t(oe,o(N)?o(N).total_saved:`—`),me.disabled=e,t(he,o(R)?`Searching...`:`Search`)},[()=>o(R)||!o(I).trim()]),a(`submit`,Y,ie),v(de,()=>o(I),e=>r(I,e)),y(Z,()=>o(L),e=>r(L,e)),s(n,B),d()}function M(e){j(e,{})}export{M as component};
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import{$ as e,A as t,B as n,C as r,D as i,E as a,G as o,H as s,J as c,K as l,L as u,M as d,N as f,T as p,U as m,V as h,W as g,X as _,Y as v,Z as y,_ as b,a as x,et as S,f as C,g as w,i as T,j as E,l as D,o as O,p as k,q as A,u as ee,v as j,y as M}from"../chunks/C7jhkUmC.js";import{t as N}from"../chunks/CfrhQlXt.js";import{t as P}from"../chunks/B9vY64pH.js";import{t as F}from"../chunks/BXssplIZ.js";import"../chunks/CgzsRqh3.js";import{t as I}from"../chunks/BPX4jQ9l.js";var L=i(`<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>`),R=i(`<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),z=i(`<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),B=i(`<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>`),te=i(`<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4"></div>`),ne=i(`<div class="p-6 rounded-2xl border text-xs text-red-500 bg-red-500/10 border-red-500/30"> </div>`),re=i(`<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>`),ie=i(`<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>`),ae=i(`<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>`),oe=i(`<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>`),se=i(`<span class="animate-spin w-3.5 h-3.5 border-2 border-white border-t-transparent rounded-full"></span> <span> </span>`,1),ce=i(`<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),le=i(`<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>`),ue=i(`<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>`),de=i(`<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>`),fe=i(`<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>`),pe=i(`<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>`),me=i(`<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),he=i(`<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>`),ge=i(`<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>`),_e=i(`<div class="flex flex-wrap gap-1 mt-2"></div>`),ve=i(`<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>`),ye=i(`<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>`),be=i(`<option> </option>`),xe=i(`<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>`),Se=i(`<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>`),Ce=i(`<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>`),we=i(`<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>`),Te=i(`<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>`),Ee=i(`<div class="space-y-3 max-h-[50vh] overflow-y-auto pr-1"></div>`),De=i(`<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>`),Oe=i(`<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>`),ke=i(`<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>`),Ae=i(`<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>`),je=i(`<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>`),Me=i(`<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>`),Ne=i(`<span class="animate-spin w-3.5 h-3.5 border-2 border-white border-t-transparent rounded-full"></span> <span>Creating...</span>`,1),Pe=i(`<span>Save & Index Skill</span>`),Fe=i(`<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>`),Ie=i(`<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>`),Le=i(`<div class="space-y-2"></div>`),Re=i(`<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>`),ze=i(`<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>`),Be=i(`<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>`),Ve=i(`<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>`),He=i(`<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>`),Ue=i(`<span class="animate-spin w-3 h-3 border-2 border-white border-t-transparent rounded-full"></span> <span>Installing...</span>`,1),We=i(`<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),Ge=i(`<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>`),Ke=i(`<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>`),qe=i(`<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>`),Je=i(`<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 <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 <query>)"><span>🌐 skills.sh Registry</span></button></div> <!></div></div> <!></div> <!> <!>`,1);function V(t,i){y(i,!0);let V=A(o([])),H=A(``),Ye=A(!0),Xe=A(``),U=A(null),Ze=A(!1),W=A(o({total_chunks:0,embedded_chunks:0,vectorized_skills:0,model:`IBM Granite Multilingual (384-dim)`})),G=A(`fts`),K=A(`instructions`),q=A(!1),Qe=A(!1),$e=A(`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=A(o({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 N.get(`/api/v1/vectors/stats`);e&&l(W,e,!0)}catch{}}async function Y(){l(Ye,!0),l(Xe,``);try{let e=f(G)===`vector`?`&semantic=1`:``,t=f(H).trim()?`/api/v1/skills?q=`+encodeURIComponent(f(H).trim())+e:`/api/v1/skills?limit=250`;l(V,await N.get(t),!0),tt()}catch(e){l(Xe,e.message,!0)}finally{l(Ye,!1)}}async function nt(e){l(Ze,!0),l(K,`instructions`);try{l(U,await N.get(`/api/v1/skills/`+encodeURIComponent(e)),!0)}catch(e){await I.fire({title:`Load Failed`,text:e.message,icon:`error`})}finally{l(Ze,!1)}}function rt(){l(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=f(J).name.trim().toLowerCase().replace(/\s+/g,`-`);if(!e){await I.fire({title:`Validation Error`,text:`Please provide a skill name (e.g. helm-chart-scaffolding).`,icon:`warning`});return}if(!f(J).description.trim()){await I.fire({title:`Validation Error`,text:`Please provide a short description for the skill.`,icon:`warning`});return}l(Qe,!0);try{let t={...f(J),name:e},n=await N.post(`/api/v1/skills`,t);l(q,!1),rt(),await I.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`}),P.addNotification(`Created skill "${e}"`,`success`),await Y(),await nt(e)}catch(e){await I.fire({title:`Creation Failed`,text:e.message,icon:`error`})}finally{l(Qe,!1)}}async function at(e,t){try{await N.post(`/api/v1/skills/${encodeURIComponent(e)}/embed`,{agent:t}),P.addNotification(`Embedded "${e}" into @${t}`,`success`),await I.fire({title:`Skill Embedded`,text:`Skill "${e}" is now active for subagent @${t}.`,icon:`success`})}catch(e){await I.fire({title:`Embed Failed`,text:e.message,icon:`error`})}}async function ot(e,t){try{await N.post(`/api/v1/skills/${encodeURIComponent(e)}/unembed`,{agent:t}),P.addNotification(`Removed "${e}" from @${t}`,`info`),await I.fire({title:`Skill Removed`,text:`Skill "${e}" removed from @${t}.`,icon:`info`})}catch(e){await I.fire({title:`Unembed Failed`,text:e.message,icon:`error`})}}async function st(e){if(await I.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 N.delete(`/api/v1/skills/${encodeURIComponent(e)}`),l(U,null),P.addNotification(`Deleted skill "${e}"`,`success`),await I.fire({title:`Deleted`,text:`Skill "${e}" has been removed.`,icon:`success`}),await Y()}catch(e){await I.fire({title:`Delete Failed`,text:e.message,icon:`error`})}}async function ct(){try{P.addNotification(`Re-indexing skills database...`,`info`),await N.post(`/api/v1/skills/reindex`,{}),await I.fire({title:`Migration Complete`,text:`SQLite FTS5 database successfully re-indexed all skills.`,icon:`success`}),await Y()}catch(e){await I.fire({title:`Reindex Failed`,text:e.message,icon:`error`})}}let lt;function ut(){clearTimeout(lt),lt=setTimeout(()=>{f(G)===`registry`?ht(f(H)):Y()},250)}M(Y),F(()=>f(q)||f(X));let X=A(!1),dt=A(``),Z=A(o([])),ft=A(!1),Q=A(``),$=A(``),pt;function mt(e){return!f(V)||!e?!1:f(V).some(t=>t.name===e||t.skill_name===e)}async function ht(e){l(ft,!0),l(Q,``);try{let t=(e===void 0?f(G)===`registry`?f(H):f(dt):e).trim()||`react`,n=await N.get(`/api/v1/skills/registry?q=`+encodeURIComponent(t));l(Z,n&&n.results?n.results:Array.isArray(n)?n:[],!0)}catch(e){l(Q,e.message,!0),l(Z,[],!0)}finally{l(ft,!1)}}function gt(e){l(G,`registry`),e!==void 0&&l(H,e,!0),ht(f(H)||`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){l($,t,!0);try{P.addNotification(`Installing skill "${t}" from skills.sh...`,`info`);let e=await N.post(`/api/v1/skills/install`,{repo_url:n,skill_name:t}),r=e&&e.installed_path?e.installed_path:null;await I.fire({title:`Skill Installed!`,text:r?`Skill "${t}" verified on disk at:\n${r}`:`Skill "${t}" installed and verified.`,icon:`success`}),P.addNotification(`Installed skill "${t}"`,`success`),l(X,!1),await Y(),f(G)!==`registry`&&await nt(t)}catch(e){await I.fire({title:`Installation Failed`,text:e.message,icon:`error`})}finally{l($,``)}}}function yt(e){e.key===`Escape`&&(f(q)&&l(q,!1),f(X)&&l(X,!1))}var bt=Je();d(`keydown`,n,yt);var xt=s(bt),St=h(xt),Ct=h(St),wt=g(h(Ct),2),Tt=h(wt),Et=g(Tt,2),Dt=g(Et,2);S(wt),S(Ct),S(St);var Ot=g(St,2),kt=h(Ot),At=g(h(kt),2);x(At);var jt=g(At,2),Mt=e=>{var t=L();E(`click`,t,()=>{l(H,``),f(G)===`registry`?ht(``):Y()}),p(e,t)};j(jt,e=>{f(H)&&e(Mt)}),S(kt);var Nt=g(kt,2),Pt=h(Nt),Ft=h(Pt),It=g(Ft,2),Lt=g(It,2);S(Pt);var Rt=g(Pt,2),zt=e=>{var t=R(),n=g(s(t),2),i=m(n);u(()=>r(i,`${f(Z).length??``} found`)),p(e,t)},Bt=e=>{var t=z(),n=s(t),i=m(n),a=g(n,2),o=m(a);u(()=>{O(n,`title`,`Offline Neural RAG: ${(f(W).model||`IBM Granite Multilingual`)??``} + ${(f(W).reranker||`MS MARCO MiniLM Reranker`)??``}`),r(i,`⚡ ${(f(W).embedded_chunks||f(W).total_chunks||989)??``} Vector Chunks (Dual Models Active)`),r(o,`${f(V).length??``} skills`)}),p(e,t)};j(Rt,e=>{f(G)===`registry`?e(zt):e(Bt,-1)}),S(Nt),S(Ot);var Vt=g(Ot,2),Ht=t=>{var n=de(),i=h(n),a=h(i),o=g(h(a),2),l=g(h(o),2),d=g(h(l)),_=m(d);e(),S(l),S(o),S(a);var v=g(a,2),y=h(v),x=m(y);S(v),S(i);var C=g(i,2),T=e=>{var t=te();w(t,20,()=>[,,,,,,],b,(e,t)=>{var n=B();p(e,n)}),S(t),p(e,t)},D=e=>{var t=ne(),n=m(t);u(()=>r(n,`Failed to query skills.sh registry: ${f(Q)??``}`)),p(e,t)},k=t=>{var n=re(),i=g(h(n),2),a=m(i);e(2),S(n),u(()=>r(a,`No skills found matching "${f(H)??``}"`)),p(t,n)},A=t=>{var n=te();w(n,21,()=>f(Z),b,(t,n,i)=>{let a=c(()=>f(n).skillId||f(n).name),o=c(()=>mt(f(a)));var l=ue(),d=h(l),_=h(d),v=h(_),y=h(v);y.textContent=`#${i+1}`;var b=g(y,2),x=m(b,!0);S(v);var C=g(v,2),w=e=>{var t=ie(),i=m(t);u(e=>r(i,`${e??``} installs`),[()=>f(n).installs.toLocaleString()]),p(e,t)};j(C,e=>{f(n).installs!==void 0&&e(w)}),S(_);var T=g(_,2),D=e=>{var t=ae(),i=g(h(t),2),a=m(i,!0);S(t),u(()=>{O(i,`href`,`https://github.com/${f(n).source??``}`),r(a,f(n).source)}),p(e,t)};j(T,e=>{f(n).source&&e(D)}),S(d);var k=g(d,2),A=h(k),ee=e=>{var t=oe();p(e,t)},M=t=>{var i=le(),o=h(i),c=e=>{var t=se(),n=g(s(t),2),i=m(n);u(()=>r(i,`Installing "${f(a)??``}"...`)),p(e,t)},l=t=>{var n=ce();e(2),p(t,n)};j(o,e=>{f($)===f(a)?e(c):e(l,-1)}),S(i),u(()=>i.disabled=f($)===f(a)),E(`click`,i,()=>vt(f(n))),p(t,i)};j(A,e=>{f(o)?e(ee):e(M,-1)}),S(k),S(l),u(()=>{O(b,`title`,f(a)),r(x,f(a))}),p(t,l)}),S(n),p(t,n)};j(C,e=>{f(ft)?e(T):f(Q)?e(D,1):f(Z).length===0?e(k,2):e(A,-1)}),S(n),u(()=>{r(_,`konoha skill search ${(f(H)||`react`)??``}`),r(x,`Found ${f(Z).length??``} open-source skills`)}),p(t,n)},Ut=e=>{var t=fe();p(e,t)},Wt=e=>{var t=pe(),n=m(t);u(()=>r(n,`Failed to load skills: ${f(Xe)??``}`)),p(e,t)},Gt=t=>{var n=Me(),i=h(n),o=h(i),d=e=>{var t=he(),n=g(h(t),2),i=e=>{var t=me(),n=s(t),i=m(n),a=g(n,2),o=m(a);u(()=>{r(i,`"${f(H)??``}" is not installed locally.`),r(o,`🌐 Search skills.sh for "${f(H)??``}"`)}),E(`click`,a,()=>gt(f(H))),p(e,t)};j(n,e=>{f(H)&&e(i)}),S(t),p(e,t)};j(o,e=>{f(V).length===0&&e(d)});var _=g(o,2);w(_,17,()=>f(V),e=>e.name,(e,t)=>{let n=c(()=>f(U)&&f(U).name===f(t).name);var i=ve(),a=h(i),o=h(a),s=m(o,!0),l=g(o,2),d=m(l,!0);S(a);var _=g(a,2),v=e=>{var n=_e();w(n,21,()=>String(f(t).tags).split(`,`).slice(0,3),b,(e,t)=>{var n=ge(),i=m(n,!0);u(e=>r(i,e),[()=>f(t).trim()]),p(e,n)}),S(n),p(e,n)};j(_,e=>{f(t).tags&&e(v)});var y=g(_,2),x=h(y),T=m(x),D=g(x,2),O=m(D);S(y),S(i),u(e=>{C(i,f(n)?`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);`),r(s,f(t).name),r(d,f(t).type||`skill`),r(T,`${e??``} KB`),r(O,`${(f(t).line_count||0)??``} lines`)},[()=>f(t).byte_size?Math.round(f(t).byte_size/1024):0]),E(`click`,i,()=>nt(f(t).name)),p(e,i)}),S(i);var v=g(i,2),y=h(v),x=e=>{var t=ye();p(e,t)},T=t=>{var n=ke(),i=h(n),a=h(i),o=h(a),s=h(o),c=m(s,!0),d=g(s,2),_=m(d,!0);S(o);var v=g(o,2),y=m(v);S(a);var x=g(a,2),T=m(x);S(i);var O=g(i,2),A=g(h(O),2),M=h(A);w(M,21,()=>et,b,(e,t)=>{var n=be(),i=m(n,!0),a={};u(()=>{r(i,f(t).name),a!==(a=f(t).id)&&(n.value=(n.__value=a)??``)}),p(e,n)}),S(M),ee(M);var N=g(M,2),P=g(N,2);S(A),S(O);var F=g(O,2),I=e=>{var t=Se(),n=g(h(t),2);w(n,21,()=>String(f(U).tags).split(`,`),b,(e,t)=>{var n=xe(),i=m(n,!0);u(e=>r(i,e),[()=>f(t).trim()]),p(e,n)}),S(n),S(t),p(e,t)};j(F,e=>{f(U).tags&&e(I)});var L=g(F,2),R=h(L),z=h(R),B=g(z,2),te=g(h(B),2),ne=m(te,!0);S(B),S(R);var re=g(R,2),ie=e=>{var t=Ce(),n=h(t),i=g(h(n),2),a=m(i);S(n);var o=g(n,2),s=m(o,!0);S(t),u(()=>{r(a,`${(f(U).line_count||0)??``} lines (${(f(U).byte_size||0)??``} bytes)`),r(s,f(U).content)}),p(e,t)},ae=t=>{var n=Oe(),i=g(h(n),2),a=t=>{var n=Ee();w(n,21,()=>f(U).chunks,b,(t,n)=>{var i=Te(),a=h(i),o=h(a),s=m(o);e(2),S(a);var c=g(a,2),l=e=>{var t=we(),i=g(h(t),2),a=m(i);S(t),u(e=>r(a,`[${e??``} ... 384 dimensions]`),[()=>f(n).vector_sample.join(`, `)]),p(e,t)};j(c,e=>{f(n).vector_sample&&f(n).vector_sample.length>0&&e(l)});var d=g(c,2),_=m(d,!0);S(i),u(()=>{r(s,`Chunk #${f(n).chunk_index+1}`),r(_,f(n).chunk_text)}),p(t,i)}),S(n),p(t,n)},o=e=>{var t=De();p(e,t)};j(i,e=>{f(U).chunks&&f(U).chunks.length>0?e(a):e(o,-1)}),S(n),p(t,n)};j(re,e=>{f(K)===`instructions`?e(ie):f(K)===`vectors`&&e(ae,1)}),S(L),S(n),u(()=>{r(c,f(U).name),r(_,f(U).type||`skill`),r(y,`Path: ${(f(U).file_path||`Embedded in SQLite database`)??``}`),k(z,1,`px-3.5 py-1.5 rounded-xl text-xs font-bold transition-all cursor-pointer ${f(K)===`instructions`?`bg-indigo-600 text-white shadow-sm`:`hover:bg-slate-500/10`}`),C(z,f(K)===`instructions`?``:`color: var(--color-text-muted);`),k(B,1,`px-3.5 py-1.5 rounded-xl text-xs font-bold transition-all cursor-pointer flex items-center gap-1.5 ${f(K)===`vectors`?`bg-emerald-600 text-white shadow-sm`:`hover:bg-slate-500/10`}`),C(B,f(K)===`vectors`?``:`color: var(--color-text-muted);`),k(te,1,`px-1.5 py-0.2 rounded-full text-[10px] font-mono ${f(K)===`vectors`?`bg-white/20 text-white`:`bg-emerald-500/20 text-emerald-600 dark:text-emerald-400`}`),r(ne,f(U).chunks_count||f(U).chunks?.length||0)}),E(`click`,T,()=>st(f(U).name)),D(M,()=>f($e),e=>l($e,e)),E(`click`,N,()=>at(f(U).name,f($e))),E(`click`,P,()=>ot(f(U).name,f($e))),E(`click`,z,()=>l(K,`instructions`)),E(`click`,B,()=>l(K,`vectors`)),p(t,n)},O=t=>{var n=a(),i=s(n),o=t=>{var n=Ae(),i=g(h(n),2),a=h(i),o=m(a),s=g(a,2),c=g(h(s),3),l=m(c);e(),S(s),S(i);var d=g(i,2),_=g(h(d),2),v=m(_);S(d),S(n),u(()=>{r(o,`No local skills matching "${f(H)??``}"`),r(l,`konoha skill search ${f(H)??``}`),r(v,`Search skills.sh for "${f(H)??``}"`)}),E(`click`,d,()=>gt(f(H))),p(t,n)},c=e=>{var t=je();p(e,t)};j(i,e=>{f(V).length===0&&f(H)?e(o):e(c,-1)}),p(t,n)};j(y,e=>{f(Ze)?e(x):f(U)?e(T,1):e(O,-1)}),S(v),S(n),p(t,n)};j(Vt,e=>{f(G)===`registry`?e(Ht):f(Ye)?e(Ut,1):f(Xe)?e(Wt,2):e(Gt,-1)}),S(xt);var Kt=g(xt,2),qt=t=>{var n=Fe(),i=h(n),a=h(i),o=g(h(a),2);S(a);var s=g(a,2),c=h(s),d=g(h(c),2);x(d),S(c);var _=g(c,2),y=g(h(_),2);x(y),S(_);var C=g(_,2),O=h(C),k=g(h(O),2);x(k),S(O);var A=g(O,2),M=g(h(A),2),N=h(M);N.value=N.__value=``;var P=g(N);w(P,17,()=>et,b,(e,t)=>{var n=be(),i=m(n,!0),a={};u(()=>{r(i,f(t).name),a!==(a=f(t).id)&&(n.value=(n.__value=a)??``)}),p(e,n)}),S(M),ee(M),S(A),S(C);var F=g(C,2),I=g(h(F),2);v(I),S(F),S(s);var L=g(s,2),R=h(L),z=g(R,2),B=h(z),te=t=>{var n=Ne();e(2),p(t,n)},ne=e=>{var t=Pe();p(e,t)};j(B,e=>{f(Qe)?e(te):e(ne,-1)}),S(z),S(L),S(i),S(n),u(e=>z.disabled=e,[()=>f(Qe)||!f(J).name.trim()]),E(`click`,n,()=>l(q,!1)),E(`click`,i,e=>e.stopPropagation()),E(`click`,o,()=>l(q,!1)),T(d,()=>f(J).name,e=>f(J).name=e),T(y,()=>f(J).description,e=>f(J).description=e),T(k,()=>f(J).tags,e=>f(J).tags=e),D(M,()=>f(J).embed_agent,e=>f(J).embed_agent=e),T(I,()=>f(J).content,e=>f(J).content=e),E(`click`,R,()=>l(q,!1)),E(`click`,z,it),p(t,n)};j(Kt,e=>{f(q)&&e(qt)});var Jt=g(Kt,2),Yt=t=>{var n=qe(),i=h(n),o=h(i),d=g(h(o),2);S(o);var _=g(o,2),v=g(h(_),2);x(v);var y=g(v,2),C=e=>{var t=L();E(`click`,t,()=>{l(dt,``),ht()}),p(e,t)};j(y,e=>{f(dt)&&e(C)}),S(_);var D=g(_,2),k=h(D),A=e=>{var t=Le();w(t,20,()=>[,,,,],b,(e,t)=>{var n=Ie();p(e,n)}),S(t),p(e,t)},ee=e=>{var t=Re(),n=m(t);u(()=>r(n,`Failed to fetch from skills.sh registry: ${f(Q)??``}`)),p(e,t)},M=e=>{var t=ze();p(e,t)},N=t=>{var n=a(),i=s(n);w(i,17,()=>f(Z),b,(t,n)=>{let i=c(()=>f(n).skillId||f(n).name),a=c(()=>mt(f(i)));var o=Ke(),s=h(o),l=h(s),d=h(l),_=m(d,!0),v=g(d,2),y=e=>{var t=Be(),i=m(t);u(e=>r(i,`${e??``} installs`),[()=>f(n).installs.toLocaleString()]),p(e,t)};j(v,e=>{f(n).installs!==void 0&&e(y)}),S(l);var b=g(l,2),x=t=>{var i=Ve(),a=g(h(i),2),o=h(a);e(),S(a),S(i),u(()=>{O(a,`href`,`https://github.com/${f(n).source??``}`),r(o,`github.com/${f(n).source??``} `)}),p(t,i)};j(b,e=>{f(n).source&&e(x)}),S(s);var C=g(s,2),w=h(C),T=e=>{var t=He();p(e,t)},D=t=>{var r=Ge(),a=h(r),o=t=>{var n=Ue();e(2),p(t,n)},s=t=>{var n=We();e(2),p(t,n)};j(a,e=>{f($)===f(i)?e(o):e(s,-1)}),S(r),u(()=>r.disabled=f($)===f(i)),E(`click`,r,()=>vt(f(n))),p(t,r)};j(w,e=>{f(a)?e(T):e(D,-1)}),S(C),S(o),u(()=>r(_,f(i))),p(t,o)}),p(t,n)};j(k,e=>{f(ft)?e(A):f(Q)?e(ee,1):f(Z).length===0?e(M,2):e(N,-1)}),S(D);var P=g(D,2),F=g(h(P),2);S(P),S(i),S(n),E(`click`,n,()=>l(X,!1)),E(`click`,i,e=>e.stopPropagation()),E(`click`,d,()=>l(X,!1)),E(`input`,v,_t),T(v,()=>f(dt),e=>l(dt,e)),E(`click`,F,()=>l(X,!1)),p(t,n)};j(Jt,e=>{f(X)&&e(Yt)}),u(()=>{k(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 ${f(G)===`registry`?`ring-2 ring-blue-500 font-bold`:``}`),O(At,`placeholder`,f(G)===`registry`?`Search skills.sh global registry (e.g. react, docker, k8s, nextjs)...`:f(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)...`),k(Ft,1,`px-2.5 py-1 rounded-lg font-bold transition-all cursor-pointer ${f(G)===`fts`?`bg-indigo-600 text-white shadow-sm`:`text-slate-600 dark:text-slate-400`}`),k(It,1,`px-2.5 py-1 rounded-lg font-bold transition-all cursor-pointer flex items-center gap-1 ${f(G)===`vector`?`bg-emerald-600 text-white shadow-sm`:`text-slate-600 dark:text-slate-400`}`),k(Lt,1,`px-2.5 py-1 rounded-lg font-bold transition-all cursor-pointer flex items-center gap-1.5 ${f(G)===`registry`?`bg-blue-600 text-white shadow-sm`:`text-slate-600 dark:text-slate-400`}`)}),E(`click`,Tt,()=>l(q,!0)),E(`click`,Et,()=>gt(f(H)||`react`)),E(`click`,Dt,ct),E(`input`,At,ut),T(At,()=>f(H),e=>l(H,e)),E(`click`,Ft,()=>{l(G,`fts`),Y()}),E(`click`,It,()=>{l(G,`vector`),Y()}),E(`click`,Lt,()=>gt(f(H)||`react`)),p(t,bt),_()}t([`click`,`input`]);function H(e){V(e,{})}export{H as component};
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{$ as e,A as t,C as n,D as r,G as i,J as a,K as o,L as s,M as c,N as l,O as u,T as d,U as f,V as p,W as m,X as h,Y as g,Z as ee,a as _,et as v,g as te,i as y,j as b,l as x,o as S,p as C,q as w,u as T,v as E,y as D}from"../chunks/C7jhkUmC.js";import{t as O}from"../chunks/CfrhQlXt.js";import"../chunks/CgzsRqh3.js";import{t as k}from"../chunks/BPX4jQ9l.js";var A=u(`<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=r(`<li> </li>`),re=r(`<ul class="list-disc list-inside space-y-1 text-sm font-semibold text-slate-700"></ul>`),ie=r(`<p class="text-sm font-semibold text-emerald-700">Task passes all Definition of Ready criteria.</p>`),ae=r(`<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=u(`<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=r(`<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=r(`<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=r(`<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=r(`<span> </span>`),ue=r(`<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=r(`<p class="text-xs font-bold text-slate-500">Project: <code class="text-slate-600"> </code></p>`),fe=r(`<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=r(`<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=r(`<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=r(`<p class="text-xs font-semibold text-slate-400">No gate results or evidence recorded for this task yet.</p>`),ge=r(`<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=r(`<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=r(`<div class="space-y-3"></div>`),ye=r(`<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(t,r){ee(r,!0);let u=w(``),M=w(`advisory`),N=w(`self`),P=w(!1),F=w(!1),I=w(``),L=w(null),R=w(!1),z=w(i([])),B=w(!1),V=w(``),H=w(``),U=w(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(){o(P,!0);try{let e=l(u)?`?project=${encodeURIComponent(l(u))}`:``,t=await O.get(`/api/v1/sdlc/config${e}`);o(u,t.project_path||l(u),!0),o(M,t.dor_mode||`advisory`,!0),o(N,t.review_mode||`self`,!0)}catch(e){k.fire({icon:`error`,title:`Failed to load SDLC config`,text:e.message})}finally{o(P,!1)}}async function Ce(){if(!l(u).trim()){k.fire({icon:`warning`,title:`Project path is required to set SDLC configuration.`});return}o(F,!0);try{let e=await O.patch(`/api/v1/sdlc/config`,{project_path:l(u).trim(),dor_mode:l(M),review_mode:l(N)});o(M,e.dor_mode||l(M),!0),o(N,e.review_mode||l(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{o(F,!1)}}async function we(){if(!l(I).trim()){k.fire({icon:`warning`,title:`Enter a task description to check readiness.`});return}o(R,!0),o(L,null);try{o(L,await O.post(`/api/v1/sdlc/check-readiness`,{task:l(I).trim(),project_path:l(u)||void 0}),!0)}catch(e){k.fire({icon:`error`,title:`Readiness check failed`,text:e.message})}finally{o(R,!1)}}async function W(){o(B,!0);try{let e=new URLSearchParams;l(V)&&e.set(`status`,l(V)),l(H)&&e.set(`project`,l(H).trim()),e.set(`limit`,`50`);let t=await O.get(`/api/v1/sdlc/tasks?${e.toString()}`);o(z,t.tasks||[],!0)}catch(e){k.fire({icon:`error`,title:`Failed to load tasks`,text:e.message})}finally{o(B,!1)}}function Te(e){o(U,l(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=!!(l(V)||l(H)),t=e?`Are you sure you want to clear all tasks matching the current filter (Status: "${l(V)||`All`}", Project: "${l(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?(l(V)&&t.set(`status`,l(V)),l(H)&&t.set(`project`,l(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})}}D(()=>{Se(),W()});var ke=ye(),Ae=m(p(ke),2),je=m(p(Ae),2),Me=p(je),Ne=m(p(Me),2);_(Ne),v(Me);var Pe=m(Me,2),G=m(p(Pe),2),Fe=p(G);Fe.value=Fe.__value=`advisory`;var Ie=m(Fe);Ie.value=Ie.__value=`enforced`,v(G),T(G),v(Pe);var Le=m(Pe,2),K=m(p(Le),2),Re=p(K);Re.value=Re.__value=`self`;var ze=m(Re);ze.value=ze.__value=`cross-provider`,v(K),T(K),v(Le),v(je);var Be=m(je,2),q=p(Be),Ve=p(q),He=e=>{var t=A();d(e,t)};E(Ve,e=>{l(F)&&e(He)}),e(),v(q);var Ue=m(q,2);v(Be),v(Ae);var We=m(Ae,2),Ge=m(p(We),4);g(Ge);var Ke=m(Ge,2),J=p(Ke),qe=p(J),Je=e=>{var t=A();d(e,t)};E(qe,e=>{l(R)&&e(Je)}),e(),v(J),v(Ke);var Ye=m(Ke,2),Xe=e=>{var t=ae(),r=p(t),i=p(r),a=f(i,!0),o=m(i,2),c=f(o);v(r);var u=m(r,2),h=e=>{var t=re();te(t,20,()=>l(L).missing,e=>e,(e,t)=>{var r=ne(),i=f(r,!0);s(()=>n(i,t)),d(e,r)}),v(t),d(e,t)},g=e=>{var t=ie();d(e,t)};E(u,e=>{l(L).missing&&l(L).missing.length>0?e(h):l(L).ready&&e(g,1)}),v(t),s(e=>{C(i,1,`px-2.5 py-1 rounded-[5px] text-xs font-bold border ${l(L).ready?`bg-emerald-100 text-emerald-700 border-emerald-300`:`bg-rose-100 text-rose-700 border-rose-300`}`),n(a,l(L).ready?`✓ Ready`:`✗ Not Ready`),C(o,1,`px-2.5 py-1 rounded-[5px] text-xs font-bold border ${e??``}`),n(c,`Confidence: ${(l(L).confidence||`n/a`)??``}`)},[()=>Ee(l(L).confidence)]),d(e,t)};E(Ye,e=>{l(L)&&e(Xe)}),v(We);var Ze=m(We,2),Qe=p(Ze),$e=p(Qe),et=f($e),tt=m($e,2),Y=p(tt);_(Y);var X=m(Y,2),nt=p(X);nt.value=nt.__value=``;var rt=m(nt);rt.value=rt.__value=`draft`;var it=m(rt);it.value=it.__value=`pending`;var at=m(it);at.value=at.__value=`in_progress`;var Z=m(at);Z.value=Z.__value=`completed`;var Q=m(Z);Q.value=Q.__value=`verified`;var ot=m(Q);ot.value=ot.__value=`blocked`,v(X),T(X);var $=m(X,2),st=p($),ct=e=>{var t=oe();d(e,t)};E(st,e=>{l(B)&&e(ct)}),e(),v($);var lt=m($,2),ut=e=>{var t=se();s(()=>t.disabled=l(B)),b(`click`,t,Oe),d(e,t)};E(lt,e=>{l(z).length>0&&e(ut)}),v(tt),v(Qe);var dt=m(Qe,2),ft=e=>{var t=j();d(e,t)},pt=e=>{var t=ce();d(e,t)},mt=e=>{var t=ve();te(t,21,()=>l(z),e=>e.id,(e,t)=>{var r=_e(),i=p(r),o=p(i),c=p(o),u=p(c),h=f(u,!0),g=m(u,2),ee=f(g,!0),_=m(g,2),y=f(_),x=m(_,2),w=e=>{var r=le(),i=f(r);s(()=>{C(r,1,`px-2 py-0.5 rounded-[5px] text-xs font-bold border ${l(t).dor_result.ready?`bg-emerald-100 text-emerald-700 border-emerald-300`:`bg-rose-100 text-rose-700 border-rose-300`}`),n(i,`DoR: ${l(t).dor_result.ready?`ready`:`not ready`}`)}),d(e,r)};E(x,e=>{l(t).dor_result&&l(t).dor_result.ready!==void 0&&e(w)});var T=m(x,2),D=e=>{var r=le(),i=f(r);s(()=>{C(r,1,`px-2 py-0.5 rounded-[5px] text-xs font-bold border ${l(t).slop_result.pass?`bg-emerald-100 text-emerald-700 border-emerald-300`:`bg-rose-100 text-rose-700 border-rose-300`}`),n(i,`Slop: ${l(t).slop_result.pass?`clean`:`findings`}`)}),d(e,r)};E(T,e=>{l(t).slop_result&&l(t).slop_result.pass!==void 0&&e(D)});var O=m(T,2),k=e=>{var r=ue(),i=f(r);s(()=>n(i,`${l(t).slop_cycles??``} cycle${l(t).slop_cycles===1?``:`s`}`)),d(e,r)};E(O,e=>{l(t).slop_cycles>0&&e(k)}),v(c);var A=m(c,2),re=f(A,!0);v(o);var ie=m(o,2),ae=p(ie),oe=f(ae,!0),se=m(ae,2),j=m(se,2),ce=f(j);v(ie),v(i);var ve=m(i,2),ye=e=>{var r=ge(),i=p(r),o=e=>{var r=de(),i=m(p(r)),a=f(i,!0);v(r),s(()=>n(a,l(t).project_path)),d(e,r)};E(i,e=>{l(t).project_path&&e(o)});var c=m(i,2),u=e=>{var r=fe(),i=m(p(r),2);te(i,20,()=>l(t).dor_result.missing,e=>e,(e,t)=>{var r=ne(),i=f(r,!0);s(()=>n(i,t)),d(e,r)}),v(i),v(r),d(e,r)};E(c,e=>{l(t).dor_result&&l(t).dor_result.missing&&l(t).dor_result.missing.length>0&&e(u)});var h=m(c,2),g=e=>{var r=pe(),i=m(p(r),2),a=f(i,!0);v(r),s(e=>n(a,e),[()=>JSON.stringify(l(t).slop_result,null,2)]),d(e,r)},ee=a(()=>l(t).slop_result&&Object.keys(l(t).slop_result).length>0);E(h,e=>{l(ee)&&e(g)});var _=m(h,2),y=e=>{var r=me(),i=m(p(r),2),a=f(i,!0);v(r),s(e=>n(a,e),[()=>JSON.stringify(l(t).evidence,null,2)]),d(e,r)},x=a(()=>l(t).evidence&&Object.keys(l(t).evidence).length>0);E(_,e=>{l(x)&&e(y)});var S=m(_,2),C=e=>{var t=he();d(e,t)},w=a(()=>(!l(t).dor_result||Object.keys(l(t).dor_result).length===0)&&(!l(t).slop_result||Object.keys(l(t).slop_result).length===0)&&(!l(t).evidence||Object.keys(l(t).evidence).length===0));E(S,e=>{l(w)&&e(C)});var T=m(S,2),D=f(T);v(r),b(`click`,D,e=>De(l(t).id,e)),d(e,r)};E(ve,e=>{l(U)===l(t).id&&e(ye)}),v(r),s(e=>{n(h,l(t).id),C(g,1,`px-2 py-0.5 rounded-[5px] text-xs font-bold border ${e??``}`),n(ee,l(t).status),n(y,`review: ${(l(t).review_mode||`self`)??``}`),n(re,l(t).description),n(oe,l(t).updated_at||``),S(j,`title`,l(U)===l(t).id?`Collapse details`:`Expand details`),C(ce,0,`w-4 h-4 transition-transform ${l(U)===l(t).id?`rotate-180`:``}`)},[()=>xe(l(t).status)]),b(`click`,o,()=>Te(l(t).id)),b(`click`,se,e=>De(l(t).id,e)),b(`click`,j,()=>Te(l(t).id)),d(e,r)}),v(t),d(e,t)};E(dt,e=>{l(B)&&l(z).length===0?e(ft):l(z).length===0?e(pt,1):e(mt,-1)}),v(Ze),v(ke),s(()=>{q.disabled=l(F),Ue.disabled=l(P),J.disabled=l(R),n(et,`Tasks (${l(z).length??``})`),$.disabled=l(B)}),y(Ne,()=>l(u),e=>o(u,e)),x(G,()=>l(M),e=>o(M,e)),x(K,()=>l(N),e=>o(N,e)),b(`click`,q,Ce),b(`click`,Ue,Se),y(Ge,()=>l(I),e=>o(I,e)),b(`click`,J,we),b(`keydown`,Y,e=>{e.key===`Enter`&&W()}),c(`blur`,Y,()=>W()),y(Y,()=>l(H),e=>o(H,e)),b(`change`,X,W),x(X,()=>l(V),e=>o(V,e)),b(`click`,$,W),d(t,ke),h()}t([`click`,`keydown`,`change`]);function N(e){M(e,{})}export{N as component};
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"../chunks/DK3Fl9T5.js";import"../chunks/
|
|
1
|
+
import{t as e}from"../chunks/DK3Fl9T5.js";import"../chunks/C7jhkUmC.js";import{c as t,d as n,l as r,u as i}from"../chunks/Dek69VGa.js";import"../chunks/CgzsRqh3.js";import{c as a,r as o}from"../chunks/Cg3pm-K7.js";function s(){return window.location.origin}var c=`https://sveltekit-redirect.invalid`;function l(e){let t=s();try{return!o(e,t??c)}catch{return!0}}var u=new Set([`javascript:`,`data:`]);function d(e){try{return u.has(new URL(e,c).protocol)}catch{return!1}}function f(e,a){if(!l(e))return;let s=a?.external;if(s||r({location:JSON.stringify(e)}),s===!0){d(e)&&t({location:JSON.stringify(e)});return}if(Array.isArray(s)){s.some(t=>o(e,t))||i({location:JSON.stringify(e)});return}n()}new TextEncoder;function p(e,t,n){let r=t.toString();throw f(r,n),new a(e,r)}var m=e({load:()=>h});function h(){p(307,`/dashboard`)}function g(e){}export{g as component,m as universal};
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{$ as e,A as t,C as n,D as r,G as i,H as a,J as o,K as s,L as c,N as l,T as u,U as d,V as f,W as p,X as m,Y as h,Z as g,_,a as v,d as y,et as b,g as x,i as S,j as C,l as w,o as T,p as E,q as D,s as O,u as k,v as A,y as j}from"../chunks/C7jhkUmC.js";import{t as M}from"../chunks/CfrhQlXt.js";import"../chunks/CgzsRqh3.js";import{t as N}from"../chunks/BPX4jQ9l.js";var P=r(`<div class="p-4 rounded-[5px] border border-rose-200 bg-rose-50 text-rose-800 text-xs font-semibold"> </div>`),F=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-[5px] text-[10px] font-bold bg-amber-50 text-amber-700 border border-amber-300" title="Protected Village Ninja - Cannot be deleted">🛡️ Protected</span>`),te=r(`<div class="flex items-center gap-1"><button type="button" class="p-1 rounded-[5px] text-slate-400 hover:text-blue-600 hover:bg-blue-50 transition-colors cursor-pointer" title="Edit custom ninja"><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="M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"></path></svg></button> <button type="button" class="p-1 rounded-[5px] text-slate-400 hover:text-rose-600 hover:bg-rose-50 transition-colors cursor-pointer" title="Delete custom agent"><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></div>`),ne=r(`<span class="px-2 py-0.5 rounded-[5px] text-[10px] font-mono font-bold bg-emerald-50 text-emerald-700 border border-emerald-300">assigned</span>`),I=r(`<span class="px-2 py-0.5 rounded-[5px] text-[10px] font-mono font-bold border" style="background: var(--color-surface); border-color: var(--color-border); color: var(--color-text-muted);">inherit</span>`),re=r(`<option> </option>`),ie=r(`<select class="w-full p-2 rounded-[5px] border text-xs font-mono font-bold cursor-pointer" style="background: var(--color-surface); border-color: var(--color-border); color: var(--color-text);"><option>⤺ Inherit (host client default)</option><!></select>`),ae=r(`<p class="p-2 rounded-[5px] border border-dashed text-[11px] font-semibold" style="border-color: var(--color-border); color: var(--color-text-muted); background: rgba(0, 0, 0, 0.02);"> </p>`),oe=r(`<span class="px-1.5 py-0.5 rounded-[5px] text-[9px] font-mono font-bold bg-purple-50 text-purple-700 border border-purple-200 shrink-0">active</span>`),se=r(`<label class="flex items-center justify-between p-2 rounded-[5px] border cursor-pointer text-xs transition-colors hover:bg-black/5" style="background: var(--color-surface); border-color: var(--color-border);"><div class="flex items-center gap-2 min-w-0 pr-2"><span style="color: var(--color-text);"> </span> <!></div> <input type="checkbox" class="rounded-[3px] w-4 h-4 cursor-pointer shrink-0 ml-2" style="accent-color: var(--color-primary);"/></label>`),ce=r(`<div class="glass-card-3d flex flex-col justify-between p-6 rounded-[5px] border" style="background: var(--glass-card); border-color: var(--color-border); box-shadow: var(--shadow-3d);"><div><div class="flex items-start justify-between gap-4 mb-4"><div class="flex items-center gap-3"><div class="w-11 h-11 rounded-[5px] border flex items-center justify-center shadow-sm shrink-0" style="background: var(--color-primary-glow); border-color: var(--color-primary); color: var(--color-primary);"><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"></path></svg></div> <div><h3 class="text-base font-black tracking-tight" style="color: var(--color-text);"> </h3> <span class="inline-block text-[11px] font-bold uppercase tracking-wider" style="color: var(--color-primary);"> </span></div></div> <div class="flex flex-col items-end gap-1"><!> <span class="px-2 py-0.5 rounded-[5px] text-[10px] font-mono font-bold border" style="background: var(--color-surface); border-color: var(--color-border); color: var(--color-text-muted);"> </span></div></div> <p class="text-xs font-semibold mb-4 leading-relaxed" style="color: var(--color-text-muted);"> </p> <div class="space-y-2 mb-6"><div class="flex items-center justify-between text-xs font-bold" style="color: var(--color-text);"><span>Model Assignment</span> <!></div> <!></div> <div class="space-y-3 pt-4 border-t" style="border-color: var(--color-border);"><div class="flex items-center justify-between text-xs font-bold" style="color: var(--color-text);"><span>Embedded Skill References</span> <span class="font-mono text-[11px]" style="color: var(--color-text-muted);"> </span></div> <div class="space-y-1.5 max-h-56 overflow-y-auto pr-1"></div></div></div></div>`),le=r(`<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6"></div>`),ue=r(`<div><label for="create-ninja-model" class="font-bold block mb-1" style="color: var(--color-text);">Default Model (Optional)</label> <select id="create-ninja-model" class="w-full px-3 py-2 text-xs rounded-[5px] border focus:outline-hidden" style="background: var(--color-surface); border-color: var(--color-border); color: var(--color-text);"><option>(Inherit parent model)</option><!></select></div>`),de=r(`<div role="presentation" class="fixed inset-0 z-50 flex items-center justify-center p-4 bg-slate-900/35 backdrop-blur-sm animate-in fade-in duration-150"><div class="modal-card w-full max-w-lg max-h-[90vh] overflow-y-auto p-6 sm:p-8 rounded-[5px] border shadow-2xl space-y-5 animate-in zoom-in-95 duration-150 glass-frost-strong" 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-[5px] flex items-center justify-center font-bold text-xs text-white" style="background: var(--color-primary);">🥷</div> <div><h3 class="text-base font-bold" style="color: var(--color-text);">Create Custom Ninja Subagent</h3> <p class="text-xs" style="color: var(--color-text-muted);">Configure name, role, and custom instructions</p></div></div> <button type="button" class="w-7 h-7 rounded-[5px] 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-4 text-xs"><div><label for="create-ninja-name" class="font-bold block mb-1" style="color: var(--color-text);">Subagent Name <span class="text-rose-500">*</span></label> <input id="create-ninja-name" type="text" placeholder="e.g. shinobi, auditor, visualizer" class="w-full px-3 py-2 text-xs rounded-[5px] border focus:outline-hidden" style="background: var(--color-surface); border-color: var(--color-border); color: var(--color-text);"/> <p class="text-[11px] mt-1" style="color: var(--color-text-muted);">Unique identifier. Alphanumeric, underscores, or hyphens.</p></div> <div><label for="create-ninja-title" class="font-bold block mb-1" style="color: var(--color-text);">Title</label> <input id="create-ninja-title" type="text" placeholder="e.g. Visual Ninja Specialist" class="w-full px-3 py-2 text-xs rounded-[5px] border focus:outline-hidden" style="background: var(--color-surface); border-color: var(--color-border); color: var(--color-text);"/></div> <div><label for="create-ninja-purpose" class="font-bold block mb-1" style="color: var(--color-text);">Purpose</label> <input id="create-ninja-purpose" type="text" placeholder="e.g. Specialized UI component generator" class="w-full px-3 py-2 text-xs rounded-[5px] border focus:outline-hidden" style="background: var(--color-surface); border-color: var(--color-border); color: var(--color-text);"/></div> <div><label for="create-ninja-desc" class="font-bold block mb-1" style="color: var(--color-text);">Description</label> <textarea id="create-ninja-desc" rows="2" placeholder="Brief explanation of when to dispatch this subagent..." class="w-full px-3 py-2 text-xs rounded-[5px] border focus:outline-hidden resize-y" style="background: var(--color-surface); border-color: var(--color-border); color: var(--color-text);"></textarea></div> <div><label for="create-ninja-inst" class="font-bold block mb-1" style="color: var(--color-text);">System Instructions</label> <textarea id="create-ninja-inst" rows="3" placeholder="Prompt and standard operating procedures for this agent..." class="w-full px-3 py-2 text-xs font-mono rounded-[5px] border focus:outline-hidden resize-y" style="background: var(--color-surface); border-color: var(--color-border); color: var(--color-text);"></textarea></div> <!></div> <div class="flex justify-end gap-2.5 pt-3 border-t" style="border-color: var(--color-border);"><button type="button" class="btn-3d px-4 py-2 text-xs font-bold rounded-[5px] border cursor-pointer" style="background: var(--color-surface); border-color: var(--color-border); color: var(--color-text);">Cancel</button> <button type="button" class="btn-3d px-4 py-2 text-xs font-bold rounded-[5px] text-white cursor-pointer" style="background: var(--color-primary);"> </button></div></div></div>`),fe=r(`<div role="presentation" class="fixed inset-0 z-50 flex items-center justify-center p-4 bg-slate-900/35 backdrop-blur-sm animate-in fade-in duration-150"><div class="modal-card w-full max-w-lg max-h-[90vh] overflow-y-auto p-6 sm:p-8 rounded-[5px] border shadow-2xl space-y-5 animate-in zoom-in-95 duration-150 glass-frost-strong" 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-[5px] flex items-center justify-center font-bold text-xs text-white" style="background: var(--color-primary);">✏️</div> <div><h3 class="text-base font-bold" style="color: var(--color-text);"> </h3> <p class="text-xs" style="color: var(--color-text-muted);">Update custom title, role, and instructions</p></div></div> <button type="button" class="w-7 h-7 rounded-[5px] 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-4 text-xs"><div><label for="edit-ninja-title" class="font-bold block mb-1" style="color: var(--color-text);">Title</label> <input id="edit-ninja-title" type="text" placeholder="e.g. Visual Ninja Specialist" class="w-full px-3 py-2 text-xs rounded-[5px] border focus:outline-hidden" style="background: var(--color-surface); border-color: var(--color-border); color: var(--color-text);"/></div> <div><label for="edit-ninja-purpose" class="font-bold block mb-1" style="color: var(--color-text);">Purpose</label> <input id="edit-ninja-purpose" type="text" placeholder="e.g. Specialized UI component generator" class="w-full px-3 py-2 text-xs rounded-[5px] border focus:outline-hidden" style="background: var(--color-surface); border-color: var(--color-border); color: var(--color-text);"/></div> <div><label for="edit-ninja-desc" class="font-bold block mb-1" style="color: var(--color-text);">Description</label> <textarea id="edit-ninja-desc" rows="2" placeholder="Brief explanation of when to dispatch this subagent..." class="w-full px-3 py-2 text-xs rounded-[5px] border focus:outline-hidden resize-y" style="background: var(--color-surface); border-color: var(--color-border); color: var(--color-text);"></textarea></div> <div><label for="edit-ninja-inst" class="font-bold block mb-1" style="color: var(--color-text);">System Instructions</label> <textarea id="edit-ninja-inst" rows="3" placeholder="Prompt and standard operating procedures for this agent..." class="w-full px-3 py-2 text-xs font-mono rounded-[5px] border focus:outline-hidden resize-y" style="background: var(--color-surface); border-color: var(--color-border); color: var(--color-text);"></textarea></div></div> <div class="flex justify-end gap-2.5 pt-3 border-t" style="border-color: var(--color-border);"><button type="button" class="btn-3d px-4 py-2 text-xs font-bold rounded-[5px] border cursor-pointer" style="background: var(--color-surface); border-color: var(--color-border); color: var(--color-text);">Cancel</button> <button type="button" class="btn-3d px-4 py-2 text-xs font-bold rounded-[5px] text-white cursor-pointer" style="background: var(--color-primary);"> </button></div></div></div>`),pe=r(`<div class="space-y-8 max-w-7xl mx-auto"><div class="glass-card-3d relative overflow-hidden rounded-[5px] p-8 border transition-all duration-300" style="background: linear-gradient(135deg, rgba(255, 255, 255, 0.96) 0%, rgba(255, 255, 255, 0.85) 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-[5px] 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 tracking-tight" style="color: var(--color-text);">Ninja Subagents (Protected Village Roster)</h2> <p class="text-sm font-semibold max-w-2xl leading-relaxed" style="color: var(--color-text-muted);">Autonomous specialized agents orchestrating tasks, audits, research, and frontend builds. Official ninjas are permanently protected against deletion.</p></div> <div class="flex flex-wrap items-center gap-3 shrink-0"><button type="button" class="btn-3d px-4 py-3 rounded-[5px] text-xs font-bold text-white flex items-center gap-2 cursor-pointer transition-colors shadow-md" style="background: 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> Add Custom Ninja</button> <div class="glass-card-3d px-4 py-3 rounded-[5px] border text-center" style="background: var(--color-surface); border-color: var(--color-border);"><div class="text-xs font-bold" style="color: var(--color-text-muted);">Official Roster</div> <div class="text-xl font-black text-emerald-600">7 Protected</div></div> <div class="glass-card-3d px-4 py-3 rounded-[5px] border text-center" style="background: var(--color-surface); border-color: var(--color-border);"><div class="text-xs font-bold" style="color: var(--color-text-muted);">Skills Bound</div> <div class="text-xl font-black text-purple-600"> </div></div></div></div></div> <!> <!></div> <!> <!>`,1);function L(t,r){g(r,!0);let L=D(i([])),R=D(i([])),z=D(i([])),B=D(!0),V=D(``),me={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`},he=new Set([`sannin`,`genin`,`kage`,`chunin`,`jonin`,`anbu`,`tokubetsu-jonin`]);function ge(e){if(!e)return!1;let t=String(e).toLowerCase().replace(/^(mcp_|_mcp_|mcp-)/,``);return he.has(t)}let _e=[`sannin-skill`,`genin-skill`,`kage-skill`,`chunin-skill`,`jonin-skill`,`anbu-skill`,`tokubetsu-jonin-skill`,`konoha`,`antislop`,`i-have-adhd`];function ve(e){let t=e.skills||[],n=new Set(t),r=[...t];return _e.forEach(e=>{n.has(e)||r.push(e)}),r}async function H(){s(B,!0),s(V,``);try{s(L,await M.get(`/api/v1/agents`),!0);let e=await M.get(`/api/v1/skills?limit=1000`),t=new Set(_e);(e||[]).forEach(e=>{e.name&&t.add(e.name),e.skill_name&&t.add(e.skill_name)}),(l(L)||[]).forEach(e=>{(e.skills||[]).forEach(e=>t.add(e))}),s(R,Array.from(t).sort(),!0);try{let e=await M.get(`/api/v1/bridges/models`);s(z,e.models||[],!0)}catch{s(z,[],!0)}}catch(e){s(V,e.message,!0)}finally{s(B,!1)}}async function ye(e,t,n){let r=!n;try{await M.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),s(L,[...l(L)],!0)}catch(e){await N.fire({title:`Toggle Failed`,text:e.message,icon:`error`})}}async function be(e,t){let n=t===``?null:t;try{await M.patch(`/api/v1/agents/`+encodeURIComponent(e.name)+`/model`,{model:n}),n?e.model=n:delete e.model,s(L,[...l(L)],!0)}catch(e){await N.fire({title:`Model Assignment Failed`,text:e.message,icon:`error`})}}let U=D(!1),W=D(``),G=D(``),K=D(``),q=D(``),J=D(``),Y=D(``),X=D(!1),Z=D(!1),Q=D(null),$=D(``),xe=D(``),Se=D(``),Ce=D(``),we=D(``),Te=D(!1);function Ee(){s(W,``),s(G,``),s(K,``),s(q,``),s(J,``),s(Y,``),s(U,!0)}function De(e){if(ge(e.name)){N.fire({title:`Protected Official Ninja`,text:`Subagent "@${e.name}" is a protected official Konoha ninja agent. Core attributes are immutable. You can toggle models and skills directly on the card.`,icon:`info`});return}s(Q,e,!0),s($,e.title||``,!0),s(xe,e.purpose||``,!0),s(Se,e.description||``,!0),s(Ce,e.instructions||``,!0),s(we,e.model||``,!0),s(Z,!0)}async function Oe(){if(!l(W).trim()){await N.fire({title:`Name Required`,text:`Please enter a name for the custom ninja.`,icon:`warning`});return}s(X,!0);try{await M.post(`/api/v1/agents`,{name:l(W).trim(),title:l(G).trim()||void 0,purpose:l(K).trim()||void 0,description:l(q).trim()||void 0,instructions:l(J).trim()||void 0,model:l(Y).trim()||null}),await N.fire({title:`Ninja Created`,text:`Custom subagent "@${l(W).trim()}" has been created.`,icon:`success`}),s(U,!1),await H()}catch(e){await N.fire({title:`Creation Failed`,text:e.message,icon:`error`})}finally{s(X,!1)}}async function ke(){if(l(Q)){s(Te,!0);try{await M.put(`/api/v1/agents/${encodeURIComponent(l(Q).name)}`,{title:l($).trim(),purpose:l(xe).trim(),description:l(Se).trim(),instructions:l(Ce).trim(),model:l(we).trim()||null}),await N.fire({title:`Ninja Updated`,text:`Custom subagent "@${l(Q).name}" updated successfully.`,icon:`success`}),s(Z,!1),await H()}catch(e){await N.fire({title:`Update Failed`,text:e.message,icon:`error`})}finally{s(Te,!1)}}}async function Ae(e){if(ge(e)){await N.fire({title:`Protected Official Ninja`,text:`Subagent "@${e}" is a protected official Konoha ninja agent and cannot be deleted.`,icon:`warning`});return}if(await N.fire({title:`Delete Custom Agent?`,text:`Are you sure you want to delete custom agent "@${e}"?`,icon:`warning`,showCancelButton:!0,confirmButtonText:`Delete`,cancelButtonText:`Cancel`}))try{await M.delete(`/api/v1/agents/${encodeURIComponent(e)}`),await N.fire({title:`Agent Deleted`,text:`Custom agent "@${e}" has been deleted.`,icon:`success`}),await H()}catch(e){await N.fire({title:`Deletion Failed`,text:e.message,icon:`error`})}}j(H);var je=pe(),Me=a(je),Ne=f(Me),Pe=f(Ne),Fe=p(f(Pe),2),Ie=f(Fe),Le=p(Ie,4),Re=p(f(Le),2),ze=d(Re);b(Le),b(Fe),b(Pe),b(Ne);var Be=p(Ne,2),Ve=e=>{var t=P(),r=d(t,!0);c(()=>n(r,l(V))),u(e,t)};A(Be,e=>{l(V)&&e(Ve)});var He=p(Be,2),Ue=e=>{var t=F();u(e,t)},We=e=>{var t=le();x(t,21,()=>l(L),_,(e,t)=>{var r=ce(),i=f(r),a=f(i),s=f(a),m=f(s),h=f(m),g=d(h);b(m);var S=p(m,2),w=f(S),D=d(w),j=p(w,2),M=d(j,!0);b(S),b(s);var N=p(s,2),P=f(N),F=e=>{var t=ee();u(e,t)},le=o(()=>ge(l(t).name)),ue=e=>{var n=te(),r=f(n),i=p(r,2);b(n),C(`click`,r,()=>De(l(t))),C(`click`,i,()=>Ae(l(t).name)),u(e,n)};A(P,e=>{l(le)?e(F):e(ue,-1)});var de=p(P,2),fe=d(de);b(N),b(a);var pe=p(a,2),L=d(pe,!0),R=p(pe,2),B=f(R),V=p(f(B),2),he=e=>{var t=ne();u(e,t)},_e=e=>{var t=I();u(e,t)};A(V,e=>{l(t).model?e(he):e(_e,-1)}),b(B);var H=p(B,2),U=e=>{var r=ie(),i=f(r);i.value=i.__value=``;var a=p(i);x(a,17,()=>l(z),_,(e,t)=>{var r=re(),i=d(r,!0),a={};c(()=>{n(i,l(t).id),a!==(a=l(t).id)&&(r.value=(r.__value=a)??``)}),u(e,r)}),b(r);var o;k(r),c(()=>{o!==(o=l(t).model||``)&&(r.value=(r.__value=o)??``,y(r,o))}),C(`change`,r,e=>be(l(t),e.currentTarget.value)),u(e,r)},W=e=>{var r=ae(),i=d(r);c(()=>n(i,`${(l(t).model||`inherit`)??``} — no bridge models active.`)),u(e,r)};A(H,e=>{l(z).length>0?e(U):e(W,-1)}),b(R);var G=p(R,2),K=f(G),q=p(f(K),2),J=d(q);b(K);var Y=p(K,2);x(Y,21,()=>ve(l(t)),_,(e,r)=>{let i=o(()=>l(t).skills&&l(t).skills.includes(l(r)));var a=se(),s=f(a),m=f(s),h=d(m,!0),g=p(m,2),_=e=>{var t=oe();u(e,t)};A(g,e=>{l(i)&&e(_)}),b(s);var y=p(s,2);v(y),b(a),c(()=>{E(m,1,`font-mono text-xs font-bold truncate ${l(i)?``:`opacity-50`}`),T(m,`title`,l(r)),n(h,l(r)),O(y,l(i))}),C(`change`,y,()=>ye(l(t),l(r),l(i))),u(e,a)}),b(Y),b(G),b(i),b(r),c(()=>{T(g,`d`,me[l(t).name]||`M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z`),n(D,`@${l(t).name??``}`),n(M,l(t).title||`Ninja Subagent`),n(fe,`${(l(t).skills?l(t).skills.length:0)??``} skills`),n(L,l(t).description),n(J,`${(l(t).skills?l(t).skills.length:0)??``} active`)}),u(e,r)}),b(t),u(e,t)};A(He,e=>{l(B)?e(Ue):e(We,-1)}),b(Me);var Ge=p(Me,2),Ke=t=>{var r=de(),i=f(r),a=f(i),o=p(f(a),2);b(a);var m=p(a,2),g=f(m),y=p(f(g),2);v(y),e(2),b(g);var T=p(g,2),E=p(f(T),2);v(E),b(T);var D=p(T,2),O=p(f(D),2);v(O),b(D);var j=p(D,2),M=p(f(j),2);h(M),b(j);var N=p(j,2),P=p(f(N),2);h(P),b(N);var F=p(N,2),ee=e=>{var t=ue(),r=p(f(t),2),i=f(r);i.value=i.__value=``;var a=p(i);x(a,17,()=>l(z),_,(e,t)=>{var r=re(),i=d(r),a={};c(()=>{n(i,`${l(t).id??``} (${l(t).provider??``})`),a!==(a=l(t).id)&&(r.value=(r.__value=a)??``)}),u(e,r)}),b(r),k(r),b(t),w(r,()=>l(Y),e=>s(Y,e)),u(e,t)};A(F,e=>{l(z).length>0&&e(ee)}),b(m);var te=p(m,2),ne=f(te),I=p(ne,2),ie=d(I,!0);b(te),b(i),b(r),c(()=>{I.disabled=l(X),n(ie,l(X)?`Creating...`:`Create Ninja`)}),C(`click`,r,e=>{e.target===e.currentTarget&&s(U,!1)}),C(`click`,i,e=>e.stopPropagation()),C(`click`,o,()=>{s(U,!1)}),S(y,()=>l(W),e=>s(W,e)),S(E,()=>l(G),e=>s(G,e)),S(O,()=>l(K),e=>s(K,e)),S(M,()=>l(q),e=>s(q,e)),S(P,()=>l(J),e=>s(J,e)),C(`click`,ne,()=>{s(U,!1)}),C(`click`,I,Oe),u(t,r)};A(Ge,e=>{l(U)&&e(Ke)});var qe=p(Ge,2),Je=t=>{var r=fe(),i=f(r),a=f(i),o=f(a),m=p(f(o),2),g=f(m),_=d(g);e(2),b(m),b(o);var y=p(o,2);b(a);var x=p(a,2),w=f(x),T=p(f(w),2);v(T),b(w);var E=p(w,2),D=p(f(E),2);v(D),b(E);var O=p(E,2),k=p(f(O),2);h(k),b(O);var A=p(O,2),j=p(f(A),2);h(j),b(A),b(x);var M=p(x,2),N=f(M),P=p(N,2),F=d(P,!0);b(M),b(i),b(r),c(()=>{n(_,`Edit Custom Ninja @${l(Q).name??``}`),P.disabled=l(Te),n(F,l(Te)?`Updating...`:`Save Changes`)}),C(`click`,r,e=>{e.target===e.currentTarget&&s(Z,!1)}),C(`click`,i,e=>e.stopPropagation()),C(`click`,y,()=>{s(Z,!1)}),S(T,()=>l($),e=>s($,e)),S(D,()=>l(xe),e=>s(xe,e)),S(k,()=>l(Se),e=>s(Se,e)),S(j,()=>l(Ce),e=>s(Ce,e)),C(`click`,N,()=>{s(Z,!1)}),C(`click`,P,ke),u(t,r)};A(qe,e=>{l(Z)&&l(Q)&&e(Je)}),c(()=>n(ze,`${l(R).length??``} Indexed`)),C(`click`,Ie,Ee),u(t,je),m()}t([`click`,`change`]);function R(e){L(e,{})}export{R as component};
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{$ as e,A as t,B as n,C as r,D as i,G as a,H as o,J as s,K as c,L as l,M as u,N as d,T as f,U as p,V as m,W as h,X as g,Z as _,_ as v,a as y,et as b,g as x,i as S,j as C,l as w,p as T,q as E,u as D,v as O,y as k}from"../chunks/C7jhkUmC.js";import{t as A}from"../chunks/CfrhQlXt.js";import{t as j}from"../chunks/BXssplIZ.js";import"../chunks/CgzsRqh3.js";import{t as M}from"../chunks/BPX4jQ9l.js";var N=i(`<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=i(`<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=i(`<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=i(`<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=i(`<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=i(`<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=i(`<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=i(`<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=i(`<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=i(`<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=i(`<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=i(`<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=i(`<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=i(`<button type="button"> </button>`),ue=i(`<div class="flex items-center gap-1.5 shrink-0 overflow-x-auto w-full sm:w-auto"><button type="button"> </button> <!></div>`),de=i(`<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=i(`<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=i(`<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=i(`<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=i(`<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=i(`<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(t,i){_(i,!0);let L=E(a([])),R=E(null),z=E(!0),B=E(``),V=E(!1),H=E(!1),U=E(!1),W=E(a([])),G=E(!1),K=E(``),q=E(`all`),J=E(a({name:``,port:9001,provider:`openai`,model:``,target_url:``}));async function Y(){c(z,!0),c(B,``);try{c(L,await A.get(`/api/v1/bridges`),!0),c(R,await A.get(`/api/v1/bridges/status`),!0)}catch(e){c(B,e.message,!0)}finally{c(z,!1)}}async function _e(){c(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{c(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`})){c(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{c(H,!1)}}}async function ye(){c(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{c(H,!1)}}async function be(){c(U,!0),c(G,!0);try{let e=await A.get(`/api/v1/bridges/models`);c(W,e.models||[],!0)}catch(e){c(W,[],!0),await M.fire({title:`Failed to Fetch Models`,text:e.message,icon:`error`})}finally{c(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=s(()=>d(W).filter(e=>{let t=!d(K)||String(e.id||``).toLowerCase().includes(d(K).toLowerCase())||String(e.model_name||``).toLowerCase().includes(d(K).toLowerCase()),n=d(q)===`all`||e.bridge===d(q);return t&&n})),Se=s(()=>[...new Set(d(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(),!d(J).name||!d(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`,d(J)),c(V,!1),c(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`})}}k(Y),j(()=>d(V)),j(()=>d(U));function Ee(e){e.key===`Escape`&&(c(V,!1),c(U,!1))}var Z=ge();u(`keydown`,n,Ee);var Q=m(Z),De=m(Q),Oe=h(m(De),2),ke=m(Oe),Ae=h(ke,2);b(Oe),b(De),b(Q);var $=h(Q,2),je=e=>{var t=ee(),n=m(t),i=m(n),a=e=>{var t=N(),n=h(o(t),2),i=m(n),a=h(m(i),2),s=p(a);b(i);var c=h(i,2),u=p(c);b(n),l(()=>{r(s,`:${(d(R).router_port||19999)??``}`),r(u,`Unified router multiplexing all active bridges on 127.0.0.1:${(d(R).router_port||19999)??``}`)}),f(e,t)},s=e=>{var t=P(),n=h(o(t),2),i=m(n),a=h(m(i),2),s=p(a);b(i);var c=h(i,2),u=p(c);b(n),l(()=>{r(s,`:${(d(R).router_port||19999)??``}`),r(u,`Service daemon is not running. Start gateway to route requests via port ${(d(R).router_port||19999)??``}.`)}),f(e,t)};O(i,e=>{d(R).gateway_running?e(a):e(s,-1)}),b(n);var c=h(n,2),u=m(c),g=e=>{var t=F(),n=o(t),r=h(n,2);l(()=>{n.disabled=d(H),r.disabled=d(H)}),C(`click`,n,ye),C(`click`,r,ve),f(e,t)},_=e=>{var t=I();l(()=>t.disabled=d(H)),C(`click`,t,_e),f(e,t)};O(u,e=>{d(R).gateway_running?e(g):e(_,-1)});var v=h(u,2),y=p(v);b(c),b(t),l(e=>r(y,`${e??``} / ${d(L).length??``} Enabled`),[()=>d(L).filter(e=>e.enabled).length]),f(e,t)};O($,e=>{d(R)&&e(je)});var Me=h($,2),Ne=e=>{var t=te(),n=m(t),i=p(n,!0),a=h(n,2);b(t),l(()=>r(i,d(B))),C(`click`,a,Y),f(e,t)};O(Me,e=>{d(B)&&e(Ne)});var Pe=h(Me,2),Fe=e=>{var t=ne();f(e,t)},Ie=e=>{var t=re(),n=h(m(t),4);b(t),C(`click`,n,()=>{c(V,!0)}),f(e,t)},Le=e=>{var t=se(),n=m(t),i=m(n),a=h(m(i));x(a,21,()=>d(L),v,(e,t)=>{var n=oe(),i=m(n),a=p(i,!0),o=h(i),s=m(o),c=p(s);b(o);var u=h(o),g=m(u),_=p(g,!0);b(u);var v=h(u),y=p(v,!0),x=h(v),S=m(x),w=e=>{var n=ie(),i=h(m(n));b(n),l(()=>r(i,` Listening :${d(t).port??``}`)),f(e,n)},E=e=>{var t=ae();f(e,t)};O(S,e=>{d(t).running?e(w):e(E,-1)}),b(x);var D=h(x),k=m(D),A=m(k),j=p(A),M=h(A,2),N=p(M,!0);b(k),b(D);var P=h(D),F=p(P);b(n),l(()=>{r(a,d(t).name),r(c,`:${d(t).port??``}`),r(_,d(t).provider),r(y,d(t).target_url||`—`),T(A,1,`relative inline-flex h-5 w-9 items-center rounded-full transition-colors cursor-pointer ${d(t).enabled?`bg-emerald-500`:`bg-slate-300`}`),T(j,1,`inline-block h-3.5 w-3.5 transform rounded-full bg-white transition-transform shadow ${d(t).enabled?`translate-x-4.5`:`translate-x-1`}`),T(M,1,`text-[11px] font-bold ${d(t).enabled?`text-emerald-700`:`text-slate-500`}`),r(N,d(t).enabled?`Enabled`:`Disabled`)}),C(`click`,A,()=>Ce(d(t))),C(`click`,F,()=>we(d(t).name)),f(e,n)}),b(a),b(i),b(n),b(t),f(e,t)};O(Pe,e=>{d(z)?e(Fe):d(L).length===0?e(Ie,1):e(Le,-1)});var Re=h(Pe,2),ze=t=>{var n=ce(),r=m(n),i=m(r),a=h(m(i),2);b(i);var o=h(i,2),s=m(o),l=m(s),p=h(m(l),2);y(p),b(l);var g=h(l,2),_=h(m(g),2);y(_),b(g),b(s);var v=h(s,2),x=m(v),T=h(m(x),2),E=m(T);E.value=E.__value=`openai`;var O=h(E);O.value=O.__value=`anthropic`;var k=h(O);k.value=k.__value=`gemini`;var A=h(k);A.value=A.__value=`ollama`;var j=h(A);j.value=j.__value=`vllm`,b(T),D(T),b(x);var M=h(x,2),N=h(m(M),2);y(N),b(M),b(v);var P=h(v,2),F=h(m(P),2);y(F),b(P);var I=h(P,2),ee=m(I);e(2),b(I),b(o),b(r),b(n),C(`click`,n,e=>{e.target===e.currentTarget&&c(V,!1)}),C(`keydown`,n,e=>{e.key===`Escape`&&c(V,!1)}),C(`click`,a,()=>{c(V,!1)}),u(`submit`,o,Te),S(p,()=>d(J).name,e=>d(J).name=e),S(_,()=>d(J).port,e=>d(J).port=e),w(T,()=>d(J).provider,e=>d(J).provider=e),S(N,()=>d(J).model,e=>d(J).model=e),S(F,()=>d(J).target_url,e=>d(J).target_url=e),C(`click`,ee,()=>{c(V,!1)}),f(t,n)};O(Re,e=>{d(V)&&e(ze)});var Be=h(Re,2),Ve=t=>{var n=he(),i=m(n),a=m(i),o=h(m(a),2);b(a);var s=h(a,2),u=m(s),g=m(u);y(g),e(2),b(u);var _=h(u,2),w=e=>{var t=ue(),n=m(t),i=p(n),a=h(n,2);x(a,17,()=>d(Se),v,(e,t)=>{var n=le(),i=p(n);l(e=>{T(n,1,`px-3 py-1.5 rounded-lg text-xs font-bold transition-all cursor-pointer ${d(q)===d(t)?`bg-purple-600 text-white`:`bg-slate-100 text-slate-700 hover:bg-slate-200`}`),r(i,`${d(t)??``} (${e??``})`)},[()=>d(W).filter(e=>e.bridge===d(t)).length]),C(`click`,n,()=>{c(q,d(t),!0)}),f(e,n)}),b(t),l(()=>{T(n,1,`px-3 py-1.5 rounded-lg text-xs font-bold transition-all cursor-pointer ${d(q)===`all`?`bg-purple-600 text-white`:`bg-slate-100 text-slate-700 hover:bg-slate-200`}`),r(i,`All (${d(W).length??``})`)}),C(`click`,n,()=>{c(q,`all`)}),f(e,t)};O(_,e=>{d(Se).length>1&&e(w)}),b(s);var E=h(s,2),D=m(E),k=e=>{var t=de();f(e,t)},A=e=>{var t=fe();f(e,t)},j=e=>{var t=me(),n=h(m(t));x(n,21,()=>d(X),v,(e,t)=>{var n=pe(),i=m(n),a=p(i,!0),o=h(i),s=p(o,!0),c=h(o),u=m(c),g=p(u,!0);b(c);var _=h(c),v=p(_,!0),y=h(_),x=p(y);b(n),l(()=>{r(a,d(t).id),r(s,d(t).model_name),r(g,d(t).bridge),r(v,d(t).owned_by||d(t).bridge)}),C(`click`,x,()=>xe(d(t).id)),f(e,n)}),b(n),b(t),f(e,t)};O(D,e=>{d(G)?e(k):d(X).length===0?e(A,1):e(j,-1)}),b(E);var M=h(E,2),N=m(M),P=p(N),F=h(N,2);b(M),b(i),b(n),l(()=>r(P,`Showing ${d(X).length??``} of ${d(W).length??``} served model(s)`)),C(`click`,n,e=>{e.target===e.currentTarget&&c(U,!1)}),C(`keydown`,n,e=>{e.key===`Escape`&&c(U,!1)}),C(`click`,o,()=>{c(U,!1)}),S(g,()=>d(K),e=>c(K,e)),C(`click`,F,()=>{c(U,!1)}),f(t,n)};O(Be,e=>{d(U)&&e(Ve)}),b(Z),C(`click`,ke,be),C(`click`,Ae,()=>{c(V,!0)}),f(t,Z),g()}t([`click`,`keydown`]);function R(e){L(e,{})}export{R as component};
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{$ as e,A as t,C as n,D as r,G as i,K as a,L as o,N as s,T as c,U as l,V as u,W as d,X as f,Z as p,_ as m,et as h,g,j as _,o as v,p as y,q as b,v as x,y as S}from"../chunks/C7jhkUmC.js";import{t as C}from"../chunks/CfrhQlXt.js";import{t as w}from"../chunks/B9vY64pH.js";import"../chunks/CgzsRqh3.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(t,r){p(r,!0);let I=b(i([])),L=b(!0),R=b(``),z=b(null);async function B(){a(L,!0),a(R,``);try{a(I,await C.get(`/api/v1/clients`),!0)}catch(e){a(R,e.message,!0)}finally{a(L,!1)}}async function V(e,t){if(!s(z)){a(z,e,!0);try{await C.post(`/api/v1/clients/`+e+`/setup`,{});let n=s(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{a(z,null)}}}async function H(e,t){if(!s(z)){a(z,e,!0);try{await C.post(`/api/v1/clients/`+e+`/remove`,{});let n=s(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{a(z,null)}}}S(B);var U=F(),W=u(U),G=u(W),K=d(u(G),2),q=d(u(K),2),J=d(u(q),2),Y=l(J);h(q),h(K),h(G),h(W);var X=d(W,2),Z=e=>{var t=T(),r=l(t,!0);o(()=>n(r,s(R))),c(e,t)};x(X,e=>{s(R)&&e(Z)});var Q=d(X,2),$=e=>{var t=E();c(e,t)},ee=t=>{var r=P();g(r,21,()=>s(I),m,(t,r)=>{var i=N(),a=u(i),f=u(a),p=u(f),m=d(u(p),2),g=l(m,!0);h(p);var b=d(p,2),S=u(b),C=d(S);h(b),h(f);var w=d(f,2),T=d(u(w),2),E=l(T,!0);h(w),h(a);var P=d(a,2),F=u(P),I=l(F,!0),L=d(F,2),R=t=>{var n=k(),i=u(n),a=t=>{var n=D();e(2),c(t,n)},l=e=>{var t=O();c(e,t)};x(i,e=>{s(z)===s(r).id?e(a):e(l,-1)}),h(n),o(()=>{v(n,`data-testid`,`disconnect-${s(r).id??``}`),v(n,`data-client-id`,s(r).id),n.disabled=s(z)===s(r).id,v(n,`aria-label`,`Disconnect ${s(r).name??``}`)}),_(`click`,n,e=>{e.stopPropagation(),H(s(r).id,s(r).name)}),c(t,n)},B=t=>{var n=M(),i=u(n),a=t=>{var n=A();e(2),c(t,n)},l=e=>{var t=j();c(e,t)};x(i,e=>{s(z)===s(r).id?e(a):e(l,-1)}),h(n),o(()=>{v(n,`data-testid`,`setup-${s(r).id??``}`),v(n,`data-client-id`,s(r).id),n.disabled=s(z)===s(r).id,v(n,`aria-label`,`Setup ${s(r).name??``}`)}),_(`click`,n,e=>{e.stopPropagation(),V(s(r).id,s(r).name)}),c(t,n)};x(L,e=>{s(r).configured?e(R):e(B,-1)}),h(P),h(i),o(()=>{n(g,s(r).name),y(b,1,`inline-flex items-center gap-1.5 px-2.5 py-0.5 rounded-full text-[10px] font-extrabold uppercase border ${s(r).configured?`bg-emerald-100 text-emerald-800 border-emerald-300`:`bg-slate-100 text-slate-700 border-slate-300`}`),y(S,1,`w-1.5 h-1.5 rounded-full ${s(r).configured?`bg-emerald-500`:`bg-slate-400`}`),n(C,` ${s(r).configured?`Active`:`Unconfigured`}`),v(T,`title`,s(r).configPath),n(E,s(r).configPath),n(I,s(r).configured?`MCP tools enabled`:`Ready to link`)}),c(t,i)}),h(r),c(t,r)};x(Q,e=>{s(L)?e($):e(ee,-1)}),h(U),o(e=>n(Y,`${e??``} Active`),[()=>s(I).filter(e=>e.configured).length]),c(t,U),f()}t([`click`]);function L(e){I(e,{})}export{L as component};
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{$ as e,A as t,B as n,C as r,D as i,G as a,H as o,J as s,K as c,L as l,M as u,N as d,T as f,U as p,V as m,W as h,X as g,Y as _,Z as v,_ as y,et as b,g as x,i as S,j as C,l as w,q as T,u as E,v as D,y as O}from"../chunks/C7jhkUmC.js";import{t as k}from"../chunks/CfrhQlXt.js";import{t as A}from"../chunks/BXssplIZ.js";import"../chunks/CgzsRqh3.js";import{t as j}from"../chunks/BPX4jQ9l.js";var M=i(`<div class="p-4 rounded-2xl border border-rose-200 bg-rose-50 text-rose-800 text-xs font-semibold"> </div>`),N=i(`<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=i(`<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=i(`<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=i(`<div class="grid grid-cols-1 md:grid-cols-2 gap-3"></div>`),ne=i(`<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=i(`<p class="text-xs font-semibold text-slate-700 line-clamp-2"> </p>`),ie=i(`<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=i(`<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=i(`<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=i(`<option> </option>`),se=i(`<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=i(`<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(t,i){v(i,!0);let I=T(null),L=T(a([])),R=T(a([])),z=T(!0),B=T(!1),V=T(``),H=T(``),U=T(!1),W=T(a({agentName:`jonin`,content:``,memoryType:`rule`}));A(()=>d(U));function G(e){e.key===`Escape`&&d(U)&&c(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(){c(z,!0),c(V,``);try{let[e,t]=await Promise.all([k.get(`/api/v1/projects/current`),k.get(`/api/v1/projects`)]);c(I,e.profile||{},!0),c(L,e.memories||[],!0),c(H,d(I).context_summary||``,!0),c(R,t.projects||[],!0)}catch(e){c(V,e.message,!0)}finally{c(z,!1)}}async function ue(){if(!d(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}c(B,!0);try{await k.post(`/api/v1/projects`,{projectPath:d(I).project_path,contextSummary:d(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{c(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`})){c(B,!0);try{let e=d(I)?.project_hash||`current`;await k.post(`/api/v1/projects/${e}/prune`,{clearInvariants:!0}),c(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{c(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=d(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(!d(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=d(I)?.project_path||process?.cwd?.()||`.`;await k.post(`/api/v1/persona`,{agentName:d(W).agentName||`global`,content:d(W).content.trim(),title:`Project Learning`,memoryType:d(W).memoryType||`rule`,projectPath:e,importance:1}),c(U,!1),c(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(!d(L)||d(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 ${d(L).length} episodic learning(s) recorded for this workspace?`,icon:`warning`,confirmText:`Prune Learnings`,cancelText:`Cancel`}))try{let e=d(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(!d(R)||d(R).length===0){await j.fire({title:`No Workspaces`,text:`There are no registered workspaces to prune.`,icon:`info`});return}let e=d(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`);c(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=d(R)?d(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=d(I)?.project_hash||`current`;await k.post(`/api/v1/projects/${n}/prune`,{clearInvariants:!0}),c(H,``),c(R,[],!0),c(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`})}}O(K);var J=ce();u(`keydown`,n,G);var Y=o(J),X=m(Y),Z=m(X),_e=h(m(Z),2),Q=m(_e),ve=h(Q,2);b(_e),b(Z),b(X);var $=h(X,2),ye=e=>{var t=M(),n=p(t);l(()=>r(n,`Failed to load project context: ${d(V)??``}`)),f(e,t)};D($,e=>{d(V)&&e(ye)});var be=h($,2),xe=e=>{var t=N();f(e,t)},Se=t=>{var n=oe(),i=o(n),a=m(i),u=m(a),g=h(m(u),2),v=p(g,!0),w=h(g,2),T=p(w,!0);b(u);var E=h(u,2),O=m(E),k=h(m(O)),A=p(k,!0);b(O);var j=h(O,2),M=h(m(j)),N=p(M,!0);b(j);var F=h(j,2),se=h(m(F)),ce=p(se,!0);b(F),b(E),b(a);var z=h(a,2),V=m(z),W=h(m(V),2),G=m(W),le=e=>{var t=P();l(()=>t.disabled=d(B)),C(`click`,t,de),f(e,t)},K=s(()=>d(H)&&d(H).trim().length>0);D(G,e=>{d(K)&&e(le)});var q=h(G,2),ge=p(q,!0);b(W),b(V);var J=h(V,2);_(J),b(z);var Y=h(z,2),X=m(Y),Z=m(X),_e=m(Z),Q=p(_e);e(2),b(Z);var ve=h(Z,2),$=m(ve),ye=h($,2);b(ve),b(X);var be=h(X,2),xe=e=>{var t=te();x(t,21,()=>d(L),y,(e,t)=>{var n=ee(),i=m(n),a=m(i),o=m(a),s=p(o),c=h(o,2),u=p(c);b(a);var g=h(a,2),_=p(g,!0);b(i);var v=h(i,2),y=m(v),x=p(y,!0),S=h(y,2);b(v),b(n),l(()=>{r(s,`@${d(t).agent_name??``}`),r(u,`ID: ${d(t).id??``}`),r(_,d(t).content),r(x,d(t).memory_type||`rule`)}),C(`click`,S,()=>pe(d(t).id)),f(e,n)}),b(t),f(e,t)},Se=e=>{var t=ne();f(e,t)};D(be,e=>{d(L)&&d(L).length>0?e(xe):e(Se,-1)}),b(Y),b(i);var Ce=h(i,2),we=t=>{var n=ae(),i=m(n),a=m(i),o=m(a),s=p(o);e(2),b(a);var c=h(a,2);b(i);var u=h(i,2);x(u,21,()=>d(R),y,(e,t)=>{var n=ie(),i=m(n),a=m(i),o=m(a),s=p(o,!0),c=h(o,2),u=p(c,!0);b(a);var g=h(a,2),_=p(g,!0),v=h(g,2),y=e=>{var n=re(),i=p(n,!0);l(()=>r(i,d(t).context_summary)),f(e,n)};D(v,e=>{d(t).context_summary&&e(y)}),b(i);var x=h(i,2),S=m(x),w=p(S),T=h(S,2);b(x),b(n),l(()=>{r(s,d(t).project_name),r(u,d(t).framework||`App`),r(_,d(t).project_path),r(w,`Hash: ${d(t).project_hash??``}`)}),C(`click`,T,()=>fe(d(t).project_hash)),f(e,n)}),b(u),b(n),l(()=>r(s,`All Registered Workspaces (${d(R).length??``})`)),C(`click`,c,he),f(t,n)};D(Ce,e=>{d(R)&&d(R).length>0&&e(we)}),l(()=>{r(v,d(I)?.project_name||`Current Workspace`),r(T,d(I)?.project_path||`Path undetected`),r(A,d(I)?.framework||`General`),r(N,d(I)?.styling||`CSS`),r(ce,d(I)?.package_manager||`pnpm`),q.disabled=d(B),r(ge,d(B)?`Saving...`:`Save Invariants`),r(Q,`Project-Scoped Learnings (${(d(L)?d(L).length:0)??``})`)}),C(`click`,q,ue),S(J,()=>d(H),e=>c(H,e)),C(`click`,$,()=>{c(U,!0)}),C(`click`,ye,me),f(t,n)};D(be,e=>{d(z)?e(xe):e(Se,-1)}),b(Y);var Ce=h(Y,2),we=e=>{var t=se(),n=m(t),i=m(n),a=h(m(i),2);b(i);var o=h(i,2),s=m(o),u=m(s),g=h(m(u),2);x(g,21,()=>le,y,(e,t)=>{var n=F(),i=p(n,!0),a={};l(()=>{r(i,d(t).name),a!==(a=d(t).id)&&(n.value=(n.__value=a)??``)}),f(e,n)}),b(g),E(g),b(u);var v=h(u,2),T=h(m(v),2),D=m(T);D.value=D.__value=`rule`;var O=h(D);O.value=O.__value=`episodic`;var k=h(O);k.value=k.__value=`fact`;var A=h(k);A.value=A.__value=`preference`,b(T),E(T),b(v),b(s);var j=h(s,2),M=h(m(j),2);_(M),b(j),b(o);var N=h(o,2),P=m(N),ee=h(P,2);b(N),b(n),b(t),C(`click`,a,()=>{c(U,!1)}),w(g,()=>d(W).agentName,e=>d(W).agentName=e),w(T,()=>d(W).memoryType,e=>d(W).memoryType=e),S(M,()=>d(W).content,e=>d(W).content=e),C(`click`,P,()=>{c(U,!1)}),C(`click`,ee,q),f(e,t)};D(Ce,e=>{d(U)&&e(we)}),C(`click`,Q,ge),C(`click`,ve,K),f(t,J),g()}t([`click`]);function L(e){I(e,{})}export{L as component};
|
|
Binary file
|
|
Binary file
|