genoma-evolution 1.0.0
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/.brv/.obsidian/app.json +1 -0
- package/.brv/.obsidian/appearance.json +1 -0
- package/.brv/.obsidian/core-plugins.json +33 -0
- package/.brv/.obsidian/graph.json +22 -0
- package/.brv/.obsidian/workspace.json +195 -0
- package/.brv/Sin ti/314/201tulo 1.canvas" +1 -0
- package/.brv/Sin ti/314/201tulo 2.canvas" +1 -0
- package/.brv/Sin ti/314/201tulo.canvas" +1 -0
- package/.brv/_queue_status.json +1 -0
- package/.brv/config.json +5 -0
- package/.brv/context-tree/_index.md +60 -0
- package/.brv/context-tree/_manifest.json +165 -0
- package/.brv/context-tree/backend/_index.md +24 -0
- package/.brv/context-tree/backend/backend/_index.md +40 -0
- package/.brv/context-tree/backend/backend/init.abstract.md +0 -0
- package/.brv/context-tree/backend/backend/init.md +27 -0
- package/.brv/context-tree/backend/backend/init.overview.md +29 -0
- package/.brv/context-tree/backend/backend/job_tracker.abstract.md +1 -0
- package/.brv/context-tree/backend/backend/job_tracker.md +273 -0
- package/.brv/context-tree/backend/backend/job_tracker.overview.md +31 -0
- package/.brv/context-tree/backend/backend/main.abstract.md +0 -0
- package/.brv/context-tree/backend/backend/main.md +1292 -0
- package/.brv/context-tree/backend/backend/main.overview.md +30 -0
- package/.brv/context-tree/backend/backend/requirements.abstract.md +1 -0
- package/.brv/context-tree/backend/backend/requirements.md +37 -0
- package/.brv/context-tree/backend/backend/requirements.overview.md +28 -0
- package/.brv/context-tree/docs/_index.md +37 -0
- package/.brv/context-tree/docs/api/_index.md +54 -0
- package/.brv/context-tree/docs/api/context.md +11 -0
- package/.brv/context-tree/docs/api/hermes_api_openapi_specification.abstract.md +0 -0
- package/.brv/context-tree/docs/api/hermes_api_openapi_specification.md +468 -0
- package/.brv/context-tree/docs/api/hermes_api_openapi_specification.overview.md +44 -0
- package/.brv/context-tree/frontend/_index.md +48 -0
- package/.brv/context-tree/frontend/hermes_dashboard/_index.md +31 -0
- package/.brv/context-tree/frontend/hermes_dashboard/architecture_overview.abstract.md +0 -0
- package/.brv/context-tree/frontend/hermes_dashboard/architecture_overview.md +41 -0
- package/.brv/context-tree/frontend/hermes_dashboard/architecture_overview.overview.md +34 -0
- package/.brv/context-tree/frontend/src/_index.md +53 -0
- package/.brv/context-tree/frontend/src/components/_index.md +52 -0
- package/.brv/context-tree/frontend/src/components/sidebar_navigation_component.abstract.md +0 -0
- package/.brv/context-tree/frontend/src/components/sidebar_navigation_component.md +161 -0
- package/.brv/context-tree/frontend/src/components/sidebar_navigation_component.overview.md +32 -0
- package/.brv/context-tree/frontend/src/context.md +10 -0
- package/.brv/context-tree/frontend/src/functioncallingpage.abstract.md +0 -0
- package/.brv/context-tree/frontend/src/functioncallingpage.md +34 -0
- package/.brv/context-tree/frontend/src/functioncallingpage.overview.md +26 -0
- package/.brv/context-tree/frontend/src/lib/_index.md +48 -0
- package/.brv/context-tree/frontend/src/lib/api_client_library.abstract.md +1 -0
- package/.brv/context-tree/frontend/src/lib/api_client_library.md +403 -0
- package/.brv/context-tree/frontend/src/lib/api_client_library.overview.md +69 -0
- package/.brv/context-tree/frontend/src/page.abstract.md +0 -0
- package/.brv/context-tree/frontend/src/page.md +103 -0
- package/.brv/context-tree/frontend/src/page.overview.md +7 -0
- package/.brv/context-tree/frontend/src/settingspage.abstract.md +0 -0
- package/.brv/context-tree/frontend/src/settingspage.md +124 -0
- package/.brv/context-tree/frontend/src/settingspage.overview.md +34 -0
- package/.brv/context-tree/frontend/src/sidebar.abstract.md +0 -0
- package/.brv/context-tree/frontend/src/sidebar.md +170 -0
- package/.brv/context-tree/frontend/src/sidebar.overview.md +25 -0
- package/.brv/context-tree/meta/_index.md +24 -0
- package/.brv/context-tree/meta/curation_context/_index.md +24 -0
- package/.brv/context-tree/meta/curation_context/empty_context.abstract.md +4 -0
- package/.brv/context-tree/meta/curation_context/empty_context.md +35 -0
- package/.brv/context-tree/meta/curation_context/empty_context.overview.md +20 -0
- package/.brv/dream-log/drm-1777341062653.json +33 -0
- package/.brv/dream-state.json +8 -0
- package/.brv/dream.lock +0 -0
- package/.brv/review-backups/docs/api/hermes_api_openapi_specification.md +468 -0
- package/.claude/settings.local.json +7 -0
- package/.claude/worktrees/phase-2-mcp/.brv/.obsidian/app.json +1 -0
- package/.claude/worktrees/phase-2-mcp/.brv/.obsidian/appearance.json +1 -0
- package/.claude/worktrees/phase-2-mcp/.brv/.obsidian/core-plugins.json +33 -0
- package/.claude/worktrees/phase-2-mcp/.brv/.obsidian/graph.json +22 -0
- package/.claude/worktrees/phase-2-mcp/.brv/.obsidian/workspace.json +195 -0
- package/.claude/worktrees/phase-2-mcp/.brv/Sin t/303/255tulo 1.canvas" +1 -0
- package/.claude/worktrees/phase-2-mcp/.brv/Sin t/303/255tulo 2.canvas" +1 -0
- package/.claude/worktrees/phase-2-mcp/.brv/Sin t/303/255tulo.canvas" +1 -0
- package/.claude/worktrees/phase-2-mcp/.brv/_queue_status.json +1 -0
- package/.claude/worktrees/phase-2-mcp/.brv/config.json +5 -0
- package/.claude/worktrees/phase-2-mcp/.brv/context-tree/_index.md +60 -0
- package/.claude/worktrees/phase-2-mcp/.brv/context-tree/_manifest.json +165 -0
- package/.claude/worktrees/phase-2-mcp/.brv/context-tree/backend/_index.md +24 -0
- package/.claude/worktrees/phase-2-mcp/.brv/context-tree/backend/backend/_index.md +40 -0
- package/.claude/worktrees/phase-2-mcp/.brv/context-tree/backend/backend/init.abstract.md +0 -0
- package/.claude/worktrees/phase-2-mcp/.brv/context-tree/backend/backend/init.md +27 -0
- package/.claude/worktrees/phase-2-mcp/.brv/context-tree/backend/backend/init.overview.md +29 -0
- package/.claude/worktrees/phase-2-mcp/.brv/context-tree/backend/backend/job_tracker.abstract.md +1 -0
- package/.claude/worktrees/phase-2-mcp/.brv/context-tree/backend/backend/job_tracker.md +273 -0
- package/.claude/worktrees/phase-2-mcp/.brv/context-tree/backend/backend/job_tracker.overview.md +31 -0
- package/.claude/worktrees/phase-2-mcp/.brv/context-tree/backend/backend/main.abstract.md +0 -0
- package/.claude/worktrees/phase-2-mcp/.brv/context-tree/backend/backend/main.md +1292 -0
- package/.claude/worktrees/phase-2-mcp/.brv/context-tree/backend/backend/main.overview.md +30 -0
- package/.claude/worktrees/phase-2-mcp/.brv/context-tree/backend/backend/requirements.abstract.md +1 -0
- package/.claude/worktrees/phase-2-mcp/.brv/context-tree/backend/backend/requirements.md +37 -0
- package/.claude/worktrees/phase-2-mcp/.brv/context-tree/backend/backend/requirements.overview.md +28 -0
- package/.claude/worktrees/phase-2-mcp/.brv/context-tree/docs/_index.md +37 -0
- package/.claude/worktrees/phase-2-mcp/.brv/context-tree/docs/api/_index.md +54 -0
- package/.claude/worktrees/phase-2-mcp/.brv/context-tree/docs/api/context.md +11 -0
- package/.claude/worktrees/phase-2-mcp/.brv/context-tree/docs/api/hermes_api_openapi_specification.abstract.md +0 -0
- package/.claude/worktrees/phase-2-mcp/.brv/context-tree/docs/api/hermes_api_openapi_specification.md +468 -0
- package/.claude/worktrees/phase-2-mcp/.brv/context-tree/docs/api/hermes_api_openapi_specification.overview.md +44 -0
- package/.claude/worktrees/phase-2-mcp/.brv/context-tree/frontend/_index.md +48 -0
- package/.claude/worktrees/phase-2-mcp/.brv/context-tree/frontend/hermes_dashboard/_index.md +31 -0
- package/.claude/worktrees/phase-2-mcp/.brv/context-tree/frontend/hermes_dashboard/architecture_overview.abstract.md +0 -0
- package/.claude/worktrees/phase-2-mcp/.brv/context-tree/frontend/hermes_dashboard/architecture_overview.md +41 -0
- package/.claude/worktrees/phase-2-mcp/.brv/context-tree/frontend/hermes_dashboard/architecture_overview.overview.md +34 -0
- package/.claude/worktrees/phase-2-mcp/.brv/context-tree/frontend/src/_index.md +53 -0
- package/.claude/worktrees/phase-2-mcp/.brv/context-tree/frontend/src/components/_index.md +52 -0
- package/.claude/worktrees/phase-2-mcp/.brv/context-tree/frontend/src/components/sidebar_navigation_component.abstract.md +0 -0
- package/.claude/worktrees/phase-2-mcp/.brv/context-tree/frontend/src/components/sidebar_navigation_component.md +161 -0
- package/.claude/worktrees/phase-2-mcp/.brv/context-tree/frontend/src/components/sidebar_navigation_component.overview.md +32 -0
- package/.claude/worktrees/phase-2-mcp/.brv/context-tree/frontend/src/context.md +10 -0
- package/.claude/worktrees/phase-2-mcp/.brv/context-tree/frontend/src/functioncallingpage.abstract.md +0 -0
- package/.claude/worktrees/phase-2-mcp/.brv/context-tree/frontend/src/functioncallingpage.md +34 -0
- package/.claude/worktrees/phase-2-mcp/.brv/context-tree/frontend/src/functioncallingpage.overview.md +26 -0
- package/.claude/worktrees/phase-2-mcp/.brv/context-tree/frontend/src/lib/_index.md +48 -0
- package/.claude/worktrees/phase-2-mcp/.brv/context-tree/frontend/src/lib/api_client_library.abstract.md +1 -0
- package/.claude/worktrees/phase-2-mcp/.brv/context-tree/frontend/src/lib/api_client_library.md +403 -0
- package/.claude/worktrees/phase-2-mcp/.brv/context-tree/frontend/src/lib/api_client_library.overview.md +69 -0
- package/.claude/worktrees/phase-2-mcp/.brv/context-tree/frontend/src/page.abstract.md +0 -0
- package/.claude/worktrees/phase-2-mcp/.brv/context-tree/frontend/src/page.md +103 -0
- package/.claude/worktrees/phase-2-mcp/.brv/context-tree/frontend/src/page.overview.md +7 -0
- package/.claude/worktrees/phase-2-mcp/.brv/context-tree/frontend/src/settingspage.abstract.md +0 -0
- package/.claude/worktrees/phase-2-mcp/.brv/context-tree/frontend/src/settingspage.md +124 -0
- package/.claude/worktrees/phase-2-mcp/.brv/context-tree/frontend/src/settingspage.overview.md +34 -0
- package/.claude/worktrees/phase-2-mcp/.brv/context-tree/frontend/src/sidebar.abstract.md +0 -0
- package/.claude/worktrees/phase-2-mcp/.brv/context-tree/frontend/src/sidebar.md +170 -0
- package/.claude/worktrees/phase-2-mcp/.brv/context-tree/frontend/src/sidebar.overview.md +25 -0
- package/.claude/worktrees/phase-2-mcp/.brv/context-tree/meta/_index.md +24 -0
- package/.claude/worktrees/phase-2-mcp/.brv/context-tree/meta/curation_context/_index.md +24 -0
- package/.claude/worktrees/phase-2-mcp/.brv/context-tree/meta/curation_context/empty_context.abstract.md +4 -0
- package/.claude/worktrees/phase-2-mcp/.brv/context-tree/meta/curation_context/empty_context.md +35 -0
- package/.claude/worktrees/phase-2-mcp/.brv/context-tree/meta/curation_context/empty_context.overview.md +20 -0
- package/.claude/worktrees/phase-2-mcp/.brv/dream-log/drm-1777341062653.json +33 -0
- package/.claude/worktrees/phase-2-mcp/.brv/dream-state.json +8 -0
- package/.claude/worktrees/phase-2-mcp/.brv/dream.lock +0 -0
- package/.claude/worktrees/phase-2-mcp/.brv/review-backups/docs/api/hermes_api_openapi_specification.md +468 -0
- package/.claude/worktrees/phase-2-mcp/.claude/settings.local.json +13 -0
- package/.claude/worktrees/phase-2-mcp/.kilocode/package-lock.json +378 -0
- package/.claude/worktrees/phase-2-mcp/.kilocode/package.json +5 -0
- package/.claude/worktrees/phase-2-mcp/AGENTS.md +5 -0
- package/.claude/worktrees/phase-2-mcp/CLAUDE.md +29 -0
- package/.claude/worktrees/phase-2-mcp/QA_AUDIT_PLAN.md +156 -0
- package/.claude/worktrees/phase-2-mcp/README.md +316 -0
- package/.claude/worktrees/phase-2-mcp/agent-agnostic-evolution-dashboard.md +405 -0
- package/.claude/worktrees/phase-2-mcp/backend/__init__.py +0 -0
- package/.claude/worktrees/phase-2-mcp/backend/collectors/__init__.py +0 -0
- package/.claude/worktrees/phase-2-mcp/backend/collectors/claude_code_collector.py +277 -0
- package/.claude/worktrees/phase-2-mcp/backend/collectors/hermes_collector.py +68 -0
- package/.claude/worktrees/phase-2-mcp/backend/curator.py +512 -0
- package/.claude/worktrees/phase-2-mcp/backend/eval/__init__.py +19 -0
- package/.claude/worktrees/phase-2-mcp/backend/eval/engine.py +116 -0
- package/.claude/worktrees/phase-2-mcp/backend/eval/scorers.py +201 -0
- package/.claude/worktrees/phase-2-mcp/backend/generate_dataset.py +86 -0
- package/.claude/worktrees/phase-2-mcp/backend/job_tracker.py +232 -0
- package/.claude/worktrees/phase-2-mcp/backend/main.py +1746 -0
- package/.claude/worktrees/phase-2-mcp/backend/mcp_server.py +250 -0
- package/.claude/worktrees/phase-2-mcp/backend/promethean/__init__.py +24 -0
- package/.claude/worktrees/phase-2-mcp/backend/promethean/cycle_orchestrator.py +270 -0
- package/.claude/worktrees/phase-2-mcp/backend/promethean/delta_validator.py +191 -0
- package/.claude/worktrees/phase-2-mcp/backend/promethean/dspy_compiler.py +315 -0
- package/.claude/worktrees/phase-2-mcp/backend/promethean/gepa_strategist.py +213 -0
- package/.claude/worktrees/phase-2-mcp/backend/promethean/models.py +260 -0
- package/.claude/worktrees/phase-2-mcp/backend/promethean/skill_deployer.py +195 -0
- package/.claude/worktrees/phase-2-mcp/backend/promethean/trace_ingestion.py +142 -0
- package/.claude/worktrees/phase-2-mcp/backend/requirements.txt +6 -0
- package/.claude/worktrees/phase-2-mcp/backend/sdd_evolve.py +459 -0
- package/.claude/worktrees/phase-2-mcp/backend/skill_detector.py +227 -0
- package/.claude/worktrees/phase-2-mcp/backend/skill_registry.py +289 -0
- package/.claude/worktrees/phase-2-mcp/backend/storage/__init__.py +5 -0
- package/.claude/worktrees/phase-2-mcp/backend/storage/run_store.py +393 -0
- package/.claude/worktrees/phase-2-mcp/backend/storage/schema.sql +99 -0
- package/.claude/worktrees/phase-2-mcp/backend/validate_evolution.py +267 -0
- package/.claude/worktrees/phase-2-mcp/components.json +28 -0
- package/.claude/worktrees/phase-2-mcp/docs/api/hermes-api.openapi.yaml +438 -0
- package/.claude/worktrees/phase-2-mcp/docs/hero.svg +148 -0
- package/.claude/worktrees/phase-2-mcp/eslint.config.mjs +18 -0
- package/.claude/worktrees/phase-2-mcp/install.sh +245 -0
- package/.claude/worktrees/phase-2-mcp/next-env.d.ts +6 -0
- package/.claude/worktrees/phase-2-mcp/next.config.ts +32 -0
- package/.claude/worktrees/phase-2-mcp/package-lock.json +11936 -0
- package/.claude/worktrees/phase-2-mcp/package.json +41 -0
- package/.claude/worktrees/phase-2-mcp/pnpm-workspace.yaml +4 -0
- package/.claude/worktrees/phase-2-mcp/postcss.config.mjs +7 -0
- package/.claude/worktrees/phase-2-mcp/public/file.svg +1 -0
- package/.claude/worktrees/phase-2-mcp/public/fonts/SF-Pro-Display-Bold.otf +0 -0
- package/.claude/worktrees/phase-2-mcp/public/fonts/SF-Pro-Display-Heavy.otf +0 -0
- package/.claude/worktrees/phase-2-mcp/public/fonts/SF-Pro-Display-Medium.otf +0 -0
- package/.claude/worktrees/phase-2-mcp/public/fonts/SF-Pro-Display-Regular.otf +0 -0
- package/.claude/worktrees/phase-2-mcp/public/fonts/SF-Pro-Display-Semibold.otf +0 -0
- package/.claude/worktrees/phase-2-mcp/public/fonts/SF-Pro-Text-Bold.otf +0 -0
- package/.claude/worktrees/phase-2-mcp/public/fonts/SF-Pro-Text-Heavy.otf +0 -0
- package/.claude/worktrees/phase-2-mcp/public/fonts/SF-Pro-Text-Medium.otf +0 -0
- package/.claude/worktrees/phase-2-mcp/public/fonts/SF-Pro-Text-Regular.otf +0 -0
- package/.claude/worktrees/phase-2-mcp/public/fonts/SF-Pro-Text-Semibold.otf +0 -0
- package/.claude/worktrees/phase-2-mcp/public/globe.svg +1 -0
- package/.claude/worktrees/phase-2-mcp/public/next.svg +1 -0
- package/.claude/worktrees/phase-2-mcp/public/theme-preview.html +257 -0
- package/.claude/worktrees/phase-2-mcp/public/vercel.svg +1 -0
- package/.claude/worktrees/phase-2-mcp/public/window.svg +1 -0
- package/.claude/worktrees/phase-2-mcp/run.sh +26 -0
- package/.claude/worktrees/phase-2-mcp/skills-lock.json +10 -0
- package/.claude/worktrees/phase-2-mcp/specs/event-schema.md +223 -0
- package/.claude/worktrees/phase-2-mcp/specs/examples/run.jsonl +3 -0
- package/.claude/worktrees/phase-2-mcp/src/app/api/[...path]/route.ts +55 -0
- package/.claude/worktrees/phase-2-mcp/src/app/api/auth/token/route.ts +22 -0
- package/.claude/worktrees/phase-2-mcp/src/app/evolution/page.tsx +589 -0
- package/.claude/worktrees/phase-2-mcp/src/app/favicon.ico +0 -0
- package/.claude/worktrees/phase-2-mcp/src/app/globals.css +321 -0
- package/.claude/worktrees/phase-2-mcp/src/app/layout.tsx +63 -0
- package/.claude/worktrees/phase-2-mcp/src/app/page.tsx +70 -0
- package/.claude/worktrees/phase-2-mcp/src/app/skills/page.tsx +369 -0
- package/.claude/worktrees/phase-2-mcp/src/components/ApiConfigCard.tsx +199 -0
- package/.claude/worktrees/phase-2-mcp/src/components/ColorBends.css +1 -0
- package/.claude/worktrees/phase-2-mcp/src/components/ColorBends.d.ts +1 -0
- package/.claude/worktrees/phase-2-mcp/src/components/ColorBends.jsx +1 -0
- package/.claude/worktrees/phase-2-mcp/src/components/CoreLoopToggle.tsx +111 -0
- package/.claude/worktrees/phase-2-mcp/src/components/EnvironmentStatus.tsx +176 -0
- package/.claude/worktrees/phase-2-mcp/src/components/EvolutionBackground.tsx +1 -0
- package/.claude/worktrees/phase-2-mcp/src/components/ReactQueryProvider.tsx +24 -0
- package/.claude/worktrees/phase-2-mcp/src/components/Sidebar.tsx +247 -0
- package/.claude/worktrees/phase-2-mcp/src/components/SkillDiffViewer.tsx +154 -0
- package/.claude/worktrees/phase-2-mcp/src/components/ThemeAwareBackground.tsx +67 -0
- package/.claude/worktrees/phase-2-mcp/src/components/ThemeToggle.tsx +54 -0
- package/.claude/worktrees/phase-2-mcp/src/components/WelcomeHero.tsx +77 -0
- package/.claude/worktrees/phase-2-mcp/src/components/bits/ClickSpark.tsx +116 -0
- package/.claude/worktrees/phase-2-mcp/src/components/bits/CountUp.tsx +98 -0
- package/.claude/worktrees/phase-2-mcp/src/components/bits/DarkSelect.tsx +95 -0
- package/.claude/worktrees/phase-2-mcp/src/components/bits/DecryptedText.tsx +161 -0
- package/.claude/worktrees/phase-2-mcp/src/components/bits/ElectricBorder.tsx +184 -0
- package/.claude/worktrees/phase-2-mcp/src/components/bits/GlitchText.tsx +34 -0
- package/.claude/worktrees/phase-2-mcp/src/components/bits/ShinyText.tsx +55 -0
- package/.claude/worktrees/phase-2-mcp/src/components/bits/SpotlightCard.tsx +42 -0
- package/.claude/worktrees/phase-2-mcp/src/components/bits/TextType.tsx +95 -0
- package/.claude/worktrees/phase-2-mcp/src/components/bits/index.ts +9 -0
- package/.claude/worktrees/phase-2-mcp/src/components/pages/CuratorPage.tsx +632 -0
- package/.claude/worktrees/phase-2-mcp/src/components/pages/DatasetPage.tsx +271 -0
- package/.claude/worktrees/phase-2-mcp/src/components/pages/EvolutionPage.tsx +676 -0
- package/.claude/worktrees/phase-2-mcp/src/components/pages/FunctionCallingPage.tsx +1 -0
- package/.claude/worktrees/phase-2-mcp/src/components/pages/LogsPage.tsx +272 -0
- package/.claude/worktrees/phase-2-mcp/src/components/pages/MetricsPage.tsx +246 -0
- package/.claude/worktrees/phase-2-mcp/src/components/pages/OverviewPage.tsx +420 -0
- package/.claude/worktrees/phase-2-mcp/src/components/pages/SettingsPage.tsx +88 -0
- package/.claude/worktrees/phase-2-mcp/src/components/pages/SkillStudioPage.tsx +376 -0
- package/.claude/worktrees/phase-2-mcp/src/components/ui/animated-theme-toggler.tsx +97 -0
- package/.claude/worktrees/phase-2-mcp/src/components/ui/button.tsx +67 -0
- package/.claude/worktrees/phase-2-mcp/src/components/ui/card.tsx +103 -0
- package/.claude/worktrees/phase-2-mcp/src/components/ui/input.tsx +19 -0
- package/.claude/worktrees/phase-2-mcp/src/components/ui/separator.tsx +28 -0
- package/.claude/worktrees/phase-2-mcp/src/components/ui/sheet.tsx +147 -0
- package/.claude/worktrees/phase-2-mcp/src/components/ui/sidebar.tsx +702 -0
- package/.claude/worktrees/phase-2-mcp/src/components/ui/skeleton.tsx +13 -0
- package/.claude/worktrees/phase-2-mcp/src/components/ui/theme-toggle.tsx +272 -0
- package/.claude/worktrees/phase-2-mcp/src/components/ui/tooltip.tsx +57 -0
- package/.claude/worktrees/phase-2-mcp/src/hooks/use-mobile.ts +19 -0
- package/.claude/worktrees/phase-2-mcp/src/lib/api.ts +455 -0
- package/.claude/worktrees/phase-2-mcp/src/lib/queryClient.ts +12 -0
- package/.claude/worktrees/phase-2-mcp/src/lib/utils.ts +6 -0
- package/.claude/worktrees/phase-2-mcp/stitch/agent_dashboard/DESIGN_SPEC.md +521 -0
- package/.claude/worktrees/phase-2-mcp/stitch/agent_dashboard/prototype.html +676 -0
- package/.claude/worktrees/phase-2-mcp/stitch/curator_workspace/code.html +448 -0
- package/.claude/worktrees/phase-2-mcp/stitch/curator_workspace/screen.png +0 -0
- package/.claude/worktrees/phase-2-mcp/stitch/datasets/code.html +479 -0
- package/.claude/worktrees/phase-2-mcp/stitch/datasets/screen.png +0 -0
- package/.claude/worktrees/phase-2-mcp/stitch/evolution_history/code.html +461 -0
- package/.claude/worktrees/phase-2-mcp/stitch/evolution_history/screen.png +0 -0
- package/.claude/worktrees/phase-2-mcp/stitch/hermes_dashboard/DESIGN.md +192 -0
- package/.claude/worktrees/phase-2-mcp/stitch/hermes_dashboard/DESIGN_SPEC.md +455 -0
- package/.claude/worktrees/phase-2-mcp/stitch/hermes_overview/code.html +399 -0
- package/.claude/worktrees/phase-2-mcp/stitch/hermes_overview/screen.png +0 -0
- package/.claude/worktrees/phase-2-mcp/stitch/live_logs/code.html +324 -0
- package/.claude/worktrees/phase-2-mcp/stitch/live_logs/screen.png +0 -0
- package/.claude/worktrees/phase-2-mcp/stitch/skill_hub/code.html +596 -0
- package/.claude/worktrees/phase-2-mcp/stitch/skill_hub/screen.png +0 -0
- package/.claude/worktrees/phase-2-mcp/stitch/system_metrics/code.html +527 -0
- package/.claude/worktrees/phase-2-mcp/stitch/system_metrics/screen.png +0 -0
- package/.claude/worktrees/phase-2-mcp/stitch/system_settings/code.html +257 -0
- package/.claude/worktrees/phase-2-mcp/stitch/system_settings/screen.png +0 -0
- package/.claude/worktrees/phase-2-mcp/test_dashboard.py +201 -0
- package/.claude/worktrees/phase-2-mcp/tests/collectors/__init__.py +0 -0
- package/.claude/worktrees/phase-2-mcp/tests/collectors/fixtures/sample_session.jsonl +7 -0
- package/.claude/worktrees/phase-2-mcp/tests/collectors/test_claude_code_collector.py +171 -0
- package/.claude/worktrees/phase-2-mcp/tests/collectors/test_hermes_collector.py +167 -0
- package/.claude/worktrees/phase-2-mcp/tests/eval/test_engine.py +234 -0
- package/.claude/worktrees/phase-2-mcp/tests/eval/test_scorers.py +249 -0
- package/.claude/worktrees/phase-2-mcp/tests/storage/__init__.py +0 -0
- package/.claude/worktrees/phase-2-mcp/tests/storage/test_run_store.py +359 -0
- package/.claude/worktrees/phase-2-mcp/tests/test_curator.py +559 -0
- package/.claude/worktrees/phase-2-mcp/tests/test_mcp_server.py +114 -0
- package/.claude/worktrees/phase-2-mcp/tsconfig.json +34 -0
- package/.env.example +72 -0
- package/.kilocode/package-lock.json +378 -0
- package/.kilocode/package.json +5 -0
- package/AGENTS.md +5 -0
- package/CLAUDE.md +29 -0
- package/QA_AUDIT_PLAN.md +156 -0
- package/README.md +355 -0
- package/agent-agnostic-evolution-dashboard.md +405 -0
- package/backend/__init__.py +0 -0
- package/backend/collectors/__init__.py +0 -0
- package/backend/collectors/claude_code_collector.py +277 -0
- package/backend/collectors/hermes_collector.py +68 -0
- package/backend/curator.py +512 -0
- package/backend/eval/__init__.py +19 -0
- package/backend/eval/engine.py +116 -0
- package/backend/eval/scorers.py +201 -0
- package/backend/generate_dataset.py +86 -0
- package/backend/job_tracker.py +232 -0
- package/backend/main.py +1746 -0
- package/backend/mcp_server.py +250 -0
- package/backend/promethean/__init__.py +24 -0
- package/backend/promethean/cycle_orchestrator.py +270 -0
- package/backend/promethean/delta_validator.py +191 -0
- package/backend/promethean/dspy_compiler.py +315 -0
- package/backend/promethean/gepa_strategist.py +213 -0
- package/backend/promethean/models.py +260 -0
- package/backend/promethean/skill_deployer.py +195 -0
- package/backend/promethean/trace_ingestion.py +142 -0
- package/backend/requirements.txt +6 -0
- package/backend/sdd_evolve.py +459 -0
- package/backend/skill_detector.py +227 -0
- package/backend/skill_registry.py +289 -0
- package/backend/storage/__init__.py +5 -0
- package/backend/storage/run_store.py +393 -0
- package/backend/storage/schema.sql +99 -0
- package/backend/validate_evolution.py +267 -0
- package/bin/genoma.js +250 -0
- package/components.json +28 -0
- package/docs/api/hermes-api.openapi.yaml +438 -0
- package/docs/hero.svg +148 -0
- package/eslint.config.mjs +18 -0
- package/install.sh +245 -0
- package/next-env.d.ts +6 -0
- package/next.config.ts +32 -0
- package/package.json +46 -0
- package/pnpm-workspace.yaml +4 -0
- package/postcss.config.mjs +7 -0
- package/public/file.svg +1 -0
- package/public/fonts/SF-Pro-Display-Bold.otf +0 -0
- package/public/fonts/SF-Pro-Display-Heavy.otf +0 -0
- package/public/fonts/SF-Pro-Display-Medium.otf +0 -0
- package/public/fonts/SF-Pro-Display-Regular.otf +0 -0
- package/public/fonts/SF-Pro-Display-Semibold.otf +0 -0
- package/public/fonts/SF-Pro-Text-Bold.otf +0 -0
- package/public/fonts/SF-Pro-Text-Heavy.otf +0 -0
- package/public/fonts/SF-Pro-Text-Medium.otf +0 -0
- package/public/fonts/SF-Pro-Text-Regular.otf +0 -0
- package/public/fonts/SF-Pro-Text-Semibold.otf +0 -0
- package/public/globe.svg +1 -0
- package/public/next.svg +1 -0
- package/public/theme-preview.html +257 -0
- package/public/vercel.svg +1 -0
- package/public/window.svg +1 -0
- package/run.sh +26 -0
- package/scripts/postinstall.js +50 -0
- package/skills-lock.json +10 -0
- package/specs/event-schema.md +223 -0
- package/specs/examples/run.jsonl +3 -0
- package/src/app/api/[...path]/route.ts +55 -0
- package/src/app/api/auth/token/route.ts +22 -0
- package/src/app/evolution/page.tsx +589 -0
- package/src/app/favicon.ico +0 -0
- package/src/app/globals.css +321 -0
- package/src/app/layout.tsx +63 -0
- package/src/app/page.tsx +70 -0
- package/src/app/skills/page.tsx +369 -0
- package/src/components/ApiConfigCard.tsx +199 -0
- package/src/components/ColorBends.css +1 -0
- package/src/components/ColorBends.d.ts +1 -0
- package/src/components/ColorBends.jsx +1 -0
- package/src/components/CoreLoopToggle.tsx +111 -0
- package/src/components/EnvironmentStatus.tsx +176 -0
- package/src/components/EvolutionBackground.tsx +1 -0
- package/src/components/ReactQueryProvider.tsx +24 -0
- package/src/components/Sidebar.tsx +247 -0
- package/src/components/SkillDiffViewer.tsx +154 -0
- package/src/components/ThemeAwareBackground.tsx +67 -0
- package/src/components/ThemeToggle.tsx +54 -0
- package/src/components/WelcomeHero.tsx +77 -0
- package/src/components/bits/ClickSpark.tsx +116 -0
- package/src/components/bits/CountUp.tsx +98 -0
- package/src/components/bits/DarkSelect.tsx +95 -0
- package/src/components/bits/DecryptedText.tsx +161 -0
- package/src/components/bits/ElectricBorder.tsx +184 -0
- package/src/components/bits/GlitchText.tsx +34 -0
- package/src/components/bits/ShinyText.tsx +55 -0
- package/src/components/bits/SpotlightCard.tsx +42 -0
- package/src/components/bits/TextType.tsx +95 -0
- package/src/components/bits/index.ts +9 -0
- package/src/components/pages/CuratorPage.tsx +632 -0
- package/src/components/pages/DatasetPage.tsx +271 -0
- package/src/components/pages/EvolutionPage.tsx +676 -0
- package/src/components/pages/FunctionCallingPage.tsx +1 -0
- package/src/components/pages/LogsPage.tsx +272 -0
- package/src/components/pages/MetricsPage.tsx +246 -0
- package/src/components/pages/OverviewPage.tsx +420 -0
- package/src/components/pages/SettingsPage.tsx +88 -0
- package/src/components/pages/SkillStudioPage.tsx +376 -0
- package/src/components/ui/animated-theme-toggler.tsx +97 -0
- package/src/components/ui/button.tsx +67 -0
- package/src/components/ui/card.tsx +103 -0
- package/src/components/ui/input.tsx +19 -0
- package/src/components/ui/separator.tsx +28 -0
- package/src/components/ui/sheet.tsx +147 -0
- package/src/components/ui/sidebar.tsx +702 -0
- package/src/components/ui/skeleton.tsx +13 -0
- package/src/components/ui/theme-toggle.tsx +272 -0
- package/src/components/ui/tooltip.tsx +57 -0
- package/src/hooks/use-mobile.ts +19 -0
- package/src/lib/api.ts +455 -0
- package/src/lib/queryClient.ts +12 -0
- package/src/lib/utils.ts +6 -0
- package/stitch/agent_dashboard/DESIGN_SPEC.md +521 -0
- package/stitch/agent_dashboard/prototype.html +676 -0
- package/stitch/curator_workspace/code.html +448 -0
- package/stitch/curator_workspace/screen.png +0 -0
- package/stitch/datasets/code.html +479 -0
- package/stitch/datasets/screen.png +0 -0
- package/stitch/evolution_history/code.html +461 -0
- package/stitch/evolution_history/screen.png +0 -0
- package/stitch/hermes_dashboard/DESIGN.md +192 -0
- package/stitch/hermes_dashboard/DESIGN_SPEC.md +455 -0
- package/stitch/hermes_overview/code.html +399 -0
- package/stitch/hermes_overview/screen.png +0 -0
- package/stitch/live_logs/code.html +324 -0
- package/stitch/live_logs/screen.png +0 -0
- package/stitch/skill_hub/code.html +596 -0
- package/stitch/skill_hub/screen.png +0 -0
- package/stitch/system_metrics/code.html +527 -0
- package/stitch/system_metrics/screen.png +0 -0
- package/stitch/system_settings/code.html +257 -0
- package/stitch/system_settings/screen.png +0 -0
- package/test_dashboard.py +201 -0
- package/tests/collectors/__init__.py +0 -0
- package/tests/collectors/fixtures/sample_session.jsonl +7 -0
- package/tests/collectors/test_claude_code_collector.py +171 -0
- package/tests/collectors/test_hermes_collector.py +167 -0
- package/tests/eval/test_engine.py +234 -0
- package/tests/eval/test_scorers.py +249 -0
- package/tests/storage/__init__.py +0 -0
- package/tests/storage/test_run_store.py +359 -0
- package/tests/test_curator.py +559 -0
- package/tests/test_e2e_npm.py +621 -0
- package/tests/test_mcp_server.py +114 -0
- package/tsconfig.json +34 -0
|
@@ -0,0 +1,403 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: API Client Library
|
|
3
|
+
summary: TypeScript API client with typed functions for jobs, skills, evolution, and WebSocket connection management
|
|
4
|
+
tags: []
|
|
5
|
+
related: []
|
|
6
|
+
keywords: []
|
|
7
|
+
createdAt: '2026-04-28T03:46:41.151Z'
|
|
8
|
+
updatedAt: '2026-04-28T03:46:41.151Z'
|
|
9
|
+
---
|
|
10
|
+
## Reason
|
|
11
|
+
Preserving complete frontend API client with typed endpoints
|
|
12
|
+
|
|
13
|
+
## Raw Concept
|
|
14
|
+
**Task:**
|
|
15
|
+
Document frontend API client library
|
|
16
|
+
|
|
17
|
+
**Files:**
|
|
18
|
+
- src/lib/api.ts
|
|
19
|
+
|
|
20
|
+
**Timestamp:** 2026-04-28
|
|
21
|
+
|
|
22
|
+
## Narrative
|
|
23
|
+
### Structure
|
|
24
|
+
React Query-based API client with typed endpoints, WebSocket hooks, and API configuration
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
// ── Infrastructure: Resilient API client ──────────────────────────────
|
|
30
|
+
//
|
|
31
|
+
// Contract → docs/api/hermes-api.openapi.yaml
|
|
32
|
+
// Design → AbortController timeouts, typed errors, network detection
|
|
33
|
+
// Auth → Hermes session-token (X-Hermes-Session-Token), auto-refresh on 401
|
|
34
|
+
// Fallback → 127.0.0.1 (evita resolución DNS rota en tiling WMs/Linux)
|
|
35
|
+
// Env → NEXT_PUBLIC_API_BASE (sin trailing slash)
|
|
36
|
+
|
|
37
|
+
// ── Env resolution ───────────────────────────────────────────────────
|
|
38
|
+
function resolveBase(): string {
|
|
39
|
+
if (typeof window !== "undefined") {
|
|
40
|
+
// Client-side: NEXT_PUBLIC_ variables están expuestas
|
|
41
|
+
const env = process.env as Record<string, string | undefined>;
|
|
42
|
+
// Soporta ambas variables: NEXT_PUBLIC_API_BASE (nuevo estándar) y NEXT_PUBLIC_API_URL (legacy)
|
|
43
|
+
const fromEnv = env.NEXT_PUBLIC_API_BASE ?? env.NEXT_PUBLIC_API_URL;
|
|
44
|
+
if (fromEnv) return fromEnv.replace(/\/+$/, "");
|
|
45
|
+
}
|
|
46
|
+
// Fallback: 127.0.0.1 en vez de localhost para evitar problemas DNS. Puerto 9119 = default de Hermes web.
|
|
47
|
+
return "http://127.0.0.1:9119";
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
const API_BASE = resolveBase();
|
|
51
|
+
|
|
52
|
+
// ── Session token (Hermes auth) ──────────────────────────────────────
|
|
53
|
+
let _sessionToken: string | null = null;
|
|
54
|
+
let _tokenPromise: Promise<string | null> | null = null;
|
|
55
|
+
|
|
56
|
+
async function fetchSessionToken(): Promise<string | null> {
|
|
57
|
+
try {
|
|
58
|
+
const html = await fetch(`${API_BASE}/`, {
|
|
59
|
+
signal: AbortSignal.timeout(5_000),
|
|
60
|
+
}).then((r) => r.text());
|
|
61
|
+
const match = html.match(/__HERMES_SESSION_TOKEN__\s*=\s*"([^"]+)"/);
|
|
62
|
+
return match?.[1] ?? null;
|
|
63
|
+
} catch {
|
|
64
|
+
return null;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
async function getSessionToken(): Promise<string | null> {
|
|
69
|
+
if (_sessionToken) return _sessionToken;
|
|
70
|
+
if (!_tokenPromise) {
|
|
71
|
+
_tokenPromise = fetchSessionToken().then((token) => {
|
|
72
|
+
_sessionToken = token;
|
|
73
|
+
_tokenPromise = null;
|
|
74
|
+
return token;
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
return _tokenPromise;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
function invalidateToken(): void {
|
|
81
|
+
_sessionToken = null;
|
|
82
|
+
_tokenPromise = null;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
// ── Defaults ─────────────────────────────────────────────────────────
|
|
86
|
+
const DEFAULT_TIMEOUT_MS = 15_000;
|
|
87
|
+
|
|
88
|
+
// ── Typed errors (contract: ApiError schema) ─────────────────────────
|
|
89
|
+
export type ErrorKind = "network" | "timeout" | "server" | "client";
|
|
90
|
+
|
|
91
|
+
export class ApiError extends Error {
|
|
92
|
+
readonly kind: ErrorKind;
|
|
93
|
+
readonly status?: number;
|
|
94
|
+
readonly endpoint: string;
|
|
95
|
+
|
|
96
|
+
constructor(kind: ErrorKind, message: string, endpoint: string, status?: number) {
|
|
97
|
+
super(message);
|
|
98
|
+
this.name = "ApiError";
|
|
99
|
+
this.kind = kind;
|
|
100
|
+
this.status = status;
|
|
101
|
+
this.endpoint = endpoint;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/** Type guard para distinguir errores de API de excepciones genéricas */
|
|
106
|
+
export function isApiError(err: unknown): err is ApiError {
|
|
107
|
+
return err instanceof ApiError;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
// ── Core fetch wrapper ───────────────────────────────────────────────
|
|
111
|
+
interface ApiOptions extends Omit<RequestInit, "signal"> {
|
|
112
|
+
/** Timeout en ms. Default 15s. 0 = sin timeout. */
|
|
113
|
+
timeout?: number;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
async function executeRequest<T>(
|
|
117
|
+
path: string,
|
|
118
|
+
init: RequestInit & { timeout?: number },
|
|
119
|
+
): Promise<T> {
|
|
120
|
+
const url = `${API_BASE}${path}`;
|
|
121
|
+
const controller = new AbortController();
|
|
122
|
+
const timer =
|
|
123
|
+
init.timeout && init.timeout > 0
|
|
124
|
+
? setTimeout(() => controller.abort(), init.timeout)
|
|
125
|
+
: null;
|
|
126
|
+
const signal = controller.signal;
|
|
127
|
+
|
|
128
|
+
try {
|
|
129
|
+
const res = await fetch(url, { ...init, signal });
|
|
130
|
+
|
|
131
|
+
if (timer) clearTimeout(timer);
|
|
132
|
+
|
|
133
|
+
if (!res.ok) {
|
|
134
|
+
const body = await res.text().catch(() => res.statusText);
|
|
135
|
+
const kind: ErrorKind = res.status >= 500 ? "server" : "client";
|
|
136
|
+
throw new ApiError(kind, `HTTP ${res.status}: ${body.slice(0, 200)}`, path, res.status);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
return res.json() as T;
|
|
140
|
+
} finally {
|
|
141
|
+
if (timer) clearTimeout(timer);
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
export async function api<T>(path: string, options?: ApiOptions): Promise<T> {
|
|
146
|
+
const { timeout = DEFAULT_TIMEOUT_MS, ...init } = options ?? {};
|
|
147
|
+
const token = await getSessionToken();
|
|
148
|
+
|
|
149
|
+
const headers: Record<string, string> = {
|
|
150
|
+
"Content-Type": "application/json",
|
|
151
|
+
...(token ? { "X-Hermes-Session-Token": token } : {}),
|
|
152
|
+
...((init.headers as Record<string, string>) ?? {}),
|
|
153
|
+
};
|
|
154
|
+
|
|
155
|
+
try {
|
|
156
|
+
return await executeRequest<T>(path, { ...init, headers, timeout });
|
|
157
|
+
} catch (err: unknown) {
|
|
158
|
+
// Auto-refresh token on 401 and retry once
|
|
159
|
+
if (err instanceof ApiError && err.status === 401) {
|
|
160
|
+
invalidateToken();
|
|
161
|
+
const freshToken = await getSessionToken();
|
|
162
|
+
if (freshToken) {
|
|
163
|
+
headers["X-Hermes-Session-Token"] = freshToken;
|
|
164
|
+
return executeRequest<T>(path, { ...init, headers, timeout });
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
// Re-lanzar errores ya tipados
|
|
169
|
+
if (err instanceof ApiError) throw err;
|
|
170
|
+
|
|
171
|
+
// AbortController / timeout
|
|
172
|
+
if (err instanceof DOMException && err.name === "AbortError") {
|
|
173
|
+
throw new ApiError("timeout", `Request to ${path} timed out after ${timeout}ms`, path);
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
// TypeError (network unreachable, CORS, DNS)
|
|
177
|
+
if (err instanceof TypeError) {
|
|
178
|
+
throw new ApiError("network", `Cannot reach ${API_BASE} — ${err.message}`, path);
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
// Fallback
|
|
182
|
+
throw new ApiError("network", err instanceof Error ? err.message : "Unknown fetch error", path);
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
// ── WebSocket helper ─────────────────────────────────────────────────
|
|
187
|
+
let _wsToken: string | null = null;
|
|
188
|
+
|
|
189
|
+
export async function wsConnect(onMessage: (data: unknown) => void): Promise<WebSocket> {
|
|
190
|
+
// Lazy-load token
|
|
191
|
+
if (!_wsToken) {
|
|
192
|
+
_wsToken = await getSessionToken();
|
|
193
|
+
}
|
|
194
|
+
const tokenQs = _wsToken ? `?token=${encodeURIComponent(_wsToken)}` : "";
|
|
195
|
+
const wsUrl = API_BASE.replace(/^http/, "ws") + "/ws/stream" + tokenQs;
|
|
196
|
+
const ws = new WebSocket(wsUrl);
|
|
197
|
+
|
|
198
|
+
ws.onmessage = (event) => {
|
|
199
|
+
try {
|
|
200
|
+
onMessage(JSON.parse(event.data));
|
|
201
|
+
} catch {
|
|
202
|
+
// ignore parse errors
|
|
203
|
+
}
|
|
204
|
+
};
|
|
205
|
+
|
|
206
|
+
ws.onclose = () => {
|
|
207
|
+
// Auto-reconnect after 3s
|
|
208
|
+
setTimeout(() => wsConnect(onMessage), 3000);
|
|
209
|
+
};
|
|
210
|
+
|
|
211
|
+
return ws;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
// ── Health check (for Circuit Breaker) ───────────────────────────────
|
|
215
|
+
//
|
|
216
|
+
// Uses /api/status which is public (no session token required), making it
|
|
217
|
+
// the ideal endpoint for connectivity checks.
|
|
218
|
+
export async function checkHealth(): Promise<{
|
|
219
|
+
ok: boolean;
|
|
220
|
+
kind?: ErrorKind;
|
|
221
|
+
message?: string;
|
|
222
|
+
}> {
|
|
223
|
+
try {
|
|
224
|
+
await api<unknown>("/api/status", { timeout: 5_000 });
|
|
225
|
+
return { ok: true };
|
|
226
|
+
} catch (err) {
|
|
227
|
+
if (err instanceof ApiError) {
|
|
228
|
+
return { ok: false, kind: err.kind, message: err.message };
|
|
229
|
+
}
|
|
230
|
+
return { ok: false, kind: "network", message: "Unknown error" };
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
// ── Typed API calls ──────────────────────────────────────────────────
|
|
235
|
+
|
|
236
|
+
export interface SkillInfo {
|
|
237
|
+
name: string;
|
|
238
|
+
path: string;
|
|
239
|
+
description: string;
|
|
240
|
+
size: number;
|
|
241
|
+
last_modified: string;
|
|
242
|
+
providers: string[];
|
|
243
|
+
provider_count: number;
|
|
244
|
+
category: string;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
export interface SkillDetail {
|
|
248
|
+
name: string;
|
|
249
|
+
path: string;
|
|
250
|
+
frontmatter: Record<string, unknown>;
|
|
251
|
+
body: string;
|
|
252
|
+
raw: string;
|
|
253
|
+
size: number;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
export interface EvolutionRun {
|
|
257
|
+
skill_name: string;
|
|
258
|
+
timestamp: string;
|
|
259
|
+
baseline_score: number;
|
|
260
|
+
evolved_score: number;
|
|
261
|
+
improvement: number;
|
|
262
|
+
elapsed_seconds: number;
|
|
263
|
+
constraints_passed: boolean;
|
|
264
|
+
iterations: number;
|
|
265
|
+
optimizer_model: string;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
export interface MetricsData {
|
|
269
|
+
total_runs: number;
|
|
270
|
+
skills_evolved: number;
|
|
271
|
+
avg_improvement: number;
|
|
272
|
+
best_improvement: number;
|
|
273
|
+
total_time_seconds: number;
|
|
274
|
+
avg_time_seconds: number;
|
|
275
|
+
success_rate: number;
|
|
276
|
+
runs: EvolutionRun[];
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
export interface DatasetInfo {
|
|
280
|
+
skill: string;
|
|
281
|
+
path: string;
|
|
282
|
+
splits: Record<string, number>;
|
|
283
|
+
total: number;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
export interface ConstraintResult {
|
|
287
|
+
passed: boolean;
|
|
288
|
+
constraint: string;
|
|
289
|
+
message: string;
|
|
290
|
+
details: string | null;
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
export const fetchSkills = () => api<SkillInfo[]>("/api/skills");
|
|
294
|
+
export const fetchSkill = (name: string) => api<SkillDetail>(`/api/skills/${name}`);
|
|
295
|
+
export const fetchSkillHistory = (name: string) =>
|
|
296
|
+
api<EvolutionRun[]>(`/api/skills/${name}/evolution-history`);
|
|
297
|
+
|
|
298
|
+
// Skill management helpers
|
|
299
|
+
export interface ProviderSummary {
|
|
300
|
+
name: string;
|
|
301
|
+
total: number;
|
|
302
|
+
enabled: number;
|
|
303
|
+
skills: {
|
|
304
|
+
name: string;
|
|
305
|
+
description: string;
|
|
306
|
+
enabled: boolean;
|
|
307
|
+
tags: string[];
|
|
308
|
+
is_fork?: boolean;
|
|
309
|
+
category: string;
|
|
310
|
+
}[];
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
export const fetchSkillProviders = () =>
|
|
314
|
+
api<{ status: string; providers: ProviderSummary[] }>("/api/skills/providers");
|
|
315
|
+
|
|
316
|
+
export const toggleSkillEnabled = (provider: string, skillName: string, enabled: boolean) =>
|
|
317
|
+
api<{ status: string; enabled: boolean }>("/api/skills/toggle", {
|
|
318
|
+
method: "POST",
|
|
319
|
+
body: JSON.stringify({ provider, skill_name: skillName, enabled }),
|
|
320
|
+
});
|
|
321
|
+
|
|
322
|
+
export const deleteProviderSkill = (provider: string, skillName: string) =>
|
|
323
|
+
api<{ status: string; message: string }>(`/api/skills/${provider}/${encodeURIComponent(skillName)}`, {
|
|
324
|
+
method: "DELETE",
|
|
325
|
+
});
|
|
326
|
+
|
|
327
|
+
export const deleteGlobalSkill = (skillName: string) =>
|
|
328
|
+
api<{ status: string; message: string }>(`/api/skills/global/${encodeURIComponent(skillName)}`, {
|
|
329
|
+
method: "DELETE",
|
|
330
|
+
});
|
|
331
|
+
|
|
332
|
+
export const refreshSkills = () =>
|
|
333
|
+
api<{ status: string; providers: ProviderSummary[] }>("/api/skills/refresh");
|
|
334
|
+
export const fetchEvolutionRuns = () => api<EvolutionRun[]>("/api/evolution/runs");
|
|
335
|
+
|
|
336
|
+
export interface SkillDiff {
|
|
337
|
+
skill_name: string;
|
|
338
|
+
run_dir: string;
|
|
339
|
+
baseline: string | null;
|
|
340
|
+
evolved: string | null;
|
|
341
|
+
metrics: Record<string, unknown> | null;
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
export const fetchSkillDiff = (skillName: string, runDir: string) =>
|
|
345
|
+
api<SkillDiff>(`/api/skills/${encodeURIComponent(skillName)}/evolution/${encodeURIComponent(runDir)}/diff`);
|
|
346
|
+
|
|
347
|
+
// ── Job tracking ─────────────────────────────────────────────────────
|
|
348
|
+
|
|
349
|
+
export interface EvolutionJob {
|
|
350
|
+
id: string;
|
|
351
|
+
skill_name: string;
|
|
352
|
+
status: string;
|
|
353
|
+
iterations: number;
|
|
354
|
+
current_iteration: number;
|
|
355
|
+
pid: number | null;
|
|
356
|
+
started_at: string;
|
|
357
|
+
completed_at: string;
|
|
358
|
+
baseline_score: number | null;
|
|
359
|
+
current_best_score: number | null;
|
|
360
|
+
evolved_score: number | null;
|
|
361
|
+
improvement: number | null;
|
|
362
|
+
error: string;
|
|
363
|
+
progress: number;
|
|
364
|
+
logs: string[];
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
export const fetchJobs = (activeOnly = false) =>
|
|
368
|
+
api<EvolutionJob[]>(`/api/jobs?active_only=${activeOnly}`);
|
|
369
|
+
|
|
370
|
+
export const fetchJob = (jobId: string) =>
|
|
371
|
+
api<EvolutionJob>(`/api/jobs/${jobId}`);
|
|
372
|
+
|
|
373
|
+
export const fetchJobLogs = (jobId: string, since = 0) =>
|
|
374
|
+
api<{ job_id: string; total_lines: number; logs: string[]; status: string; progress: number }>(
|
|
375
|
+
`/api/jobs/${jobId}/logs?since=${since}`
|
|
376
|
+
);
|
|
377
|
+
|
|
378
|
+
export const cancelJob = (jobId: string) =>
|
|
379
|
+
api<{ status: string; job_id: string }>(`/api/jobs/${jobId}`, { method: "DELETE" });
|
|
380
|
+
|
|
381
|
+
export const startEvolution = (skillName: string, iterations: number) =>
|
|
382
|
+
api<{ job_id: string; skill: string; status: string; error?: string }>("/api/evolution/start", {
|
|
383
|
+
method: "POST",
|
|
384
|
+
body: JSON.stringify({ skill_name: skillName, iterations, eval_source: "synthetic" }),
|
|
385
|
+
});
|
|
386
|
+
export const fetchMetrics = () => api<MetricsData>("/api/metrics");
|
|
387
|
+
export const fetchDatasets = () => api<DatasetInfo[]>("/api/datasets");
|
|
388
|
+
export const fetchDataset = (skill: string) =>
|
|
389
|
+
api<Record<string, unknown[]>>(`/api/datasets/${skill}`);
|
|
390
|
+
export const validateSkill = (name: string) =>
|
|
391
|
+
api<ConstraintResult[]>(`/api/constraints/validate/${name}`);
|
|
392
|
+
export const fetchHealth = () =>
|
|
393
|
+
api<{
|
|
394
|
+
status: string;
|
|
395
|
+
hermes_repo: string;
|
|
396
|
+
hermes_repo_exists: boolean;
|
|
397
|
+
evolution_dir: string;
|
|
398
|
+
evolution_dir_exists: boolean;
|
|
399
|
+
skills_count: number;
|
|
400
|
+
categories: Record<string, number>;
|
|
401
|
+
}>("/api/health");
|
|
402
|
+
|
|
403
|
+
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
## API Client Library Overview
|
|
2
|
+
|
|
3
|
+
**File:** `src/lib/api.ts`
|
|
4
|
+
**Type:** TypeScript API client with typed endpoints and WebSocket support
|
|
5
|
+
**Purpose:** Frontend API client for Hermes backend (skills, evolution, jobs, WebSocket)
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
### Key Points
|
|
10
|
+
|
|
11
|
+
- **Typed API client** using a central `api<T>()` wrapper with AbortController timeouts (default 15s)
|
|
12
|
+
- **Hermes session authentication** via `X-Hermes-Session-Token` header with automatic token refresh on 401
|
|
13
|
+
- **Environment resolution:** Supports `NEXT_PUBLIC_API_BASE` and legacy `NEXT_PUBLIC_API_URL`; falls back to `http://127.0.0.1:9119`
|
|
14
|
+
- **Typed errors** via `ApiError` class with `ErrorKind`: `network`, `timeout`, `server`, `client`
|
|
15
|
+
- **WebSocket helper** (`wsConnect`) with auto-reconnect after 3s and JSON message parsing
|
|
16
|
+
- **Health check endpoint** uses `/api/status` (no auth required) for circuit breaker connectivity checks
|
|
17
|
+
- **Comprehensive typed interfaces** for skills, evolution runs, jobs, datasets, and constraints
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
### Structure / Sections Summary
|
|
22
|
+
|
|
23
|
+
1. **Infrastructure Setup**
|
|
24
|
+
- Base URL resolution with fallback to `127.0.0.1:9119`
|
|
25
|
+
- Session token fetching from HTML `__HERMES_SESSION_TOKEN__`
|
|
26
|
+
|
|
27
|
+
2. **Error Handling**
|
|
28
|
+
- `ApiError` class with status, kind, endpoint tracking
|
|
29
|
+
- `isApiError` type guard
|
|
30
|
+
|
|
31
|
+
3. **Core Fetch Wrapper**
|
|
32
|
+
- `executeRequest<T>()` — low-level fetch with AbortController
|
|
33
|
+
- `api<T>()` — high-level wrapper with token injection and 401 retry logic
|
|
34
|
+
|
|
35
|
+
4. **WebSocket Helper**
|
|
36
|
+
- `wsConnect(onMessage)` — lazy token, query param auth, auto-reconnect
|
|
37
|
+
|
|
38
|
+
5. **Health Check**
|
|
39
|
+
- `checkHealth()` — returns `{ok, kind?, message?}`
|
|
40
|
+
|
|
41
|
+
6. **Typed API Endpoints**
|
|
42
|
+
- Skills: `fetchSkills`, `fetchSkill`, `fetchSkillHistory`, `fetchSkillProviders`, `toggleSkillEnabled`, `deleteProviderSkill`, `deleteGlobalSkill`, `refreshSkills`
|
|
43
|
+
- Evolution: `fetchEvolutionRuns`, `fetchSkillDiff`, `startEvolution`
|
|
44
|
+
- Jobs: `fetchJobs`, `fetchJob`, `fetchJobLogs`, `cancelJob`
|
|
45
|
+
- Metrics/Datasets: `fetchMetrics`, `fetchDatasets`, `fetchDataset`
|
|
46
|
+
- Constraints: `validateSkill`
|
|
47
|
+
- Health: `fetchHealth`
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
### Notable Interfaces
|
|
52
|
+
|
|
53
|
+
| Interface | Fields |
|
|
54
|
+
|-----------|--------|
|
|
55
|
+
| `SkillInfo` | name, path, description, size, providers, category |
|
|
56
|
+
| `EvolutionRun` | skill_name, baseline_score, evolved_score, improvement, iterations |
|
|
57
|
+
| `EvolutionJob` | id, status, current_iteration, pid, progress, logs |
|
|
58
|
+
| `MetricsData` | total_runs, avg_improvement, success_rate, runs |
|
|
59
|
+
| `ConstraintResult` | passed, constraint, message, details |
|
|
60
|
+
| `ApiError` | kind (ErrorKind), status, endpoint |
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
### Notable Patterns
|
|
65
|
+
|
|
66
|
+
- **Token caching** via `_sessionToken` / `_tokenPromise` with lazy initialization
|
|
67
|
+
- **AbortController** for request timeout with `setTimeout` + `controller.abort()`
|
|
68
|
+
- **WebSocket auto-reconnect** on `onclose` event (3s delay)
|
|
69
|
+
- **URL encoding** via `encodeURIComponent` for skill names in paths
|
|
File without changes
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: page
|
|
3
|
+
summary: ''
|
|
4
|
+
tags: []
|
|
5
|
+
related: []
|
|
6
|
+
keywords: []
|
|
7
|
+
createdAt: '2026-04-28T01:33:30.559Z'
|
|
8
|
+
updatedAt: '2026-04-28T01:33:30.559Z'
|
|
9
|
+
---
|
|
10
|
+
## Reason
|
|
11
|
+
Preserving complete src/app/page.tsx from hermes-dashboard project
|
|
12
|
+
|
|
13
|
+
## Raw Concept
|
|
14
|
+
**Task:**
|
|
15
|
+
Preserve src/app/page.tsx
|
|
16
|
+
|
|
17
|
+
**Files:**
|
|
18
|
+
- src/app/page.tsx
|
|
19
|
+
|
|
20
|
+
**Timestamp:** 2026-04-28
|
|
21
|
+
|
|
22
|
+
**Patterns:**
|
|
23
|
+
- `OverviewPage` - Component or function
|
|
24
|
+
- `SkillStudioPage` - Component or function
|
|
25
|
+
- `EvolutionPage` - Component or function
|
|
26
|
+
- `DatasetPage` - Component or function
|
|
27
|
+
- `MemoryPage` - Component or function
|
|
28
|
+
- `MetricsPage` - Component or function
|
|
29
|
+
- `LogsPage` - Component or function
|
|
30
|
+
- `SettingsPage` - Component or function
|
|
31
|
+
- `Home` - Component or function
|
|
32
|
+
- `PageComponent` - Component or function
|
|
33
|
+
|
|
34
|
+
## Narrative
|
|
35
|
+
### Structure
|
|
36
|
+
TSX file with 10 components/functions
|
|
37
|
+
|
|
38
|
+
### Highlights
|
|
39
|
+
Source: hermes-dashboard/src/app/page.tsx
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
"use client";
|
|
45
|
+
|
|
46
|
+
import { useState } from "react";
|
|
47
|
+
import Sidebar from "@/components/Sidebar";
|
|
48
|
+
import dynamic from "next/dynamic";
|
|
49
|
+
import type { Page } from "@/components/Sidebar";
|
|
50
|
+
|
|
51
|
+
// Lazy load page components with loading states
|
|
52
|
+
const OverviewPage = dynamic(() => import("@/components/pages/OverviewPage"), {
|
|
53
|
+
loading: () => <div className="min-h-[20rem] flex items-center justify-center">Cargando Overview...</div>,
|
|
54
|
+
});
|
|
55
|
+
const SkillStudioPage = dynamic(() => import("@/components/pages/SkillStudioPage"), {
|
|
56
|
+
loading: () => <div className="min-h-[20rem] flex items-center justify-center">Cargando Skill Studio...</div>,
|
|
57
|
+
});
|
|
58
|
+
const EvolutionPage = dynamic(() => import("@/components/pages/EvolutionPage"), {
|
|
59
|
+
loading: () => <div className="min-h-[20rem] flex items-center justify-center">Cargando Evolution...</div>,
|
|
60
|
+
});
|
|
61
|
+
const DatasetPage = dynamic(() => import("@/components/pages/DatasetPage"), {
|
|
62
|
+
loading: () => <div className="min-h-[20rem] flex items-center justify-center">Cargando Datasets...</div>,
|
|
63
|
+
});
|
|
64
|
+
const MemoryPage = dynamic(() => import("@/components/pages/MemoryPage"), {
|
|
65
|
+
loading: () => <div className="min-h-[20rem] flex items-center justify-center">Cargando Memory...</div>,
|
|
66
|
+
});
|
|
67
|
+
const MetricsPage = dynamic(() => import("@/components/pages/MetricsPage"), {
|
|
68
|
+
loading: () => <div className="min-h-[20rem] flex items-center justify-center">Cargando Metrics...</div>,
|
|
69
|
+
});
|
|
70
|
+
const LogsPage = dynamic(() => import("@/components/pages/LogsPage"), {
|
|
71
|
+
loading: () => <div className="min-h-[20rem] flex items-center justify-center">Cargando Logs...</div>,
|
|
72
|
+
});
|
|
73
|
+
const SettingsPage = dynamic(() => import("@/components/pages/SettingsPage"), {
|
|
74
|
+
loading: () => <div className="min-h-[20rem] flex items-center justify-center">Cargando Settings...</div>,
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
const pages: Record<Page, React.ComponentType> = {
|
|
79
|
+
overview: OverviewPage,
|
|
80
|
+
skills: SkillStudioPage,
|
|
81
|
+
evolution: EvolutionPage,
|
|
82
|
+
datasets: DatasetPage,
|
|
83
|
+
memory: MemoryPage,
|
|
84
|
+
metrics: MetricsPage,
|
|
85
|
+
logs: LogsPage,
|
|
86
|
+
settings: SettingsPage,
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
export default function Home() {
|
|
90
|
+
const [activePage, setActivePage] = useState<Page>("overview");
|
|
91
|
+
const PageComponent = pages[activePage];
|
|
92
|
+
|
|
93
|
+
return (
|
|
94
|
+
<div className="flex min-h-screen">
|
|
95
|
+
<Sidebar activePage={activePage} onNavigate={setActivePage} />
|
|
96
|
+
<main className="flex-1 p-6 lg:p-8 overflow-y-auto">
|
|
97
|
+
<PageComponent />
|
|
98
|
+
</main>
|
|
99
|
+
</div>
|
|
100
|
+
);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# Structured Overview: hermes-dashboard page.tsx
|
|
2
|
+
|
|
3
|
+
## Key Points
|
|
4
|
+
|
|
5
|
+
- **Client-side React component** using `"use client"` directive for Next.js App Router
|
|
6
|
+
- **Dynamic lazy loading** implemented for all 8 page components using `next/dynamic` with custom Spanish loading states
|
|
7
|
+
- **State-driven navigation**: Uses `use
|
|
File without changes
|