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,250 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Genoma MCP Server — 4 telemetry ingestion tools for AI agents.
|
|
3
|
+
|
|
4
|
+
Supports stdio transport.
|
|
5
|
+
Run:
|
|
6
|
+
python3 -m backend.mcp_server
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
from __future__ import annotations
|
|
10
|
+
|
|
11
|
+
import asyncio
|
|
12
|
+
from typing import Any
|
|
13
|
+
|
|
14
|
+
from mcp.server import Server
|
|
15
|
+
from mcp.server.stdio import stdio_server
|
|
16
|
+
from mcp.types import (
|
|
17
|
+
TextContent,
|
|
18
|
+
Tool,
|
|
19
|
+
CallToolResult,
|
|
20
|
+
ListToolsResult,
|
|
21
|
+
)
|
|
22
|
+
|
|
23
|
+
from backend.promethean.models import CanonicalRun, TraceRecord
|
|
24
|
+
from backend.promethean.trace_ingestion import get_ingestor
|
|
25
|
+
from backend.storage.run_store import RunStore
|
|
26
|
+
|
|
27
|
+
server = Server(
|
|
28
|
+
name="genoma",
|
|
29
|
+
instructions=(
|
|
30
|
+
"Push telemetry from your running session to Genoma. "
|
|
31
|
+
"Use ingest_run for full canonical run events, ingest_trace for lightweight "
|
|
32
|
+
"trace records, query_runs to retrieve past runs, and get_agent_stats for "
|
|
33
|
+
"per-agent performance statistics."
|
|
34
|
+
),
|
|
35
|
+
)
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
@server.list_tools()
|
|
39
|
+
async def list_tools() -> ListToolsResult:
|
|
40
|
+
"""Advertise all 4 MCP tools."""
|
|
41
|
+
return ListToolsResult(
|
|
42
|
+
tools=[
|
|
43
|
+
Tool(
|
|
44
|
+
name="ingest_run",
|
|
45
|
+
description="Push a canonical run event to Genoma's telemetry store.",
|
|
46
|
+
inputSchema={
|
|
47
|
+
"type": "object",
|
|
48
|
+
"properties": {
|
|
49
|
+
"run_id": {"type": "string"},
|
|
50
|
+
"agent_name": {"type": "string"},
|
|
51
|
+
"started_at": {"type": "string"},
|
|
52
|
+
"task_name": {"type": "string"},
|
|
53
|
+
"outcome": {"type": "string"},
|
|
54
|
+
"collector": {"type": "string", "default": "mcp-native"},
|
|
55
|
+
"agent_version": {"type": "string"},
|
|
56
|
+
"provider": {"type": "string"},
|
|
57
|
+
"model": {"type": "string"},
|
|
58
|
+
"repo": {"type": "string"},
|
|
59
|
+
"session_id": {"type": "string"},
|
|
60
|
+
"ended_at": {"type": "string"},
|
|
61
|
+
"tool_calls": {"type": "array"},
|
|
62
|
+
"files_touched": {"type": "array"},
|
|
63
|
+
"metrics": {"type": "object"},
|
|
64
|
+
"errors": {"type": "array"},
|
|
65
|
+
"context": {"type": "object"},
|
|
66
|
+
"resolution": {"type": "string"},
|
|
67
|
+
},
|
|
68
|
+
"required": ["run_id", "agent_name", "started_at", "task_name", "outcome"],
|
|
69
|
+
},
|
|
70
|
+
),
|
|
71
|
+
Tool(
|
|
72
|
+
name="ingest_trace",
|
|
73
|
+
description="Push a lightweight TraceRecord to Genoma.",
|
|
74
|
+
inputSchema={
|
|
75
|
+
"type": "object",
|
|
76
|
+
"properties": {
|
|
77
|
+
"agent": {"type": "string"},
|
|
78
|
+
"agent_version": {"type": "string"},
|
|
79
|
+
"timestamp": {"type": "string"},
|
|
80
|
+
"task": {"type": "string"},
|
|
81
|
+
"outcome": {"type": "string"},
|
|
82
|
+
"error_signature": {"type": "string"},
|
|
83
|
+
"context": {"type": "object"},
|
|
84
|
+
"resolution": {"type": "string"},
|
|
85
|
+
},
|
|
86
|
+
"required": ["agent", "agent_version", "timestamp", "task", "outcome"],
|
|
87
|
+
},
|
|
88
|
+
),
|
|
89
|
+
Tool(
|
|
90
|
+
name="query_runs",
|
|
91
|
+
description="Query past runs from Genoma's telemetry store.",
|
|
92
|
+
inputSchema={
|
|
93
|
+
"type": "object",
|
|
94
|
+
"properties": {
|
|
95
|
+
"agent_name": {"type": "string"},
|
|
96
|
+
"outcome": {"type": "string"},
|
|
97
|
+
"repo": {"type": "string"},
|
|
98
|
+
"since": {"type": "string"},
|
|
99
|
+
"until": {"type": "string"},
|
|
100
|
+
"limit": {"type": "integer", "default": 20},
|
|
101
|
+
},
|
|
102
|
+
},
|
|
103
|
+
),
|
|
104
|
+
Tool(
|
|
105
|
+
name="get_agent_stats",
|
|
106
|
+
description="Get performance statistics for one or all agents.",
|
|
107
|
+
inputSchema={
|
|
108
|
+
"type": "object",
|
|
109
|
+
"properties": {
|
|
110
|
+
"agent_name": {"type": "string"},
|
|
111
|
+
},
|
|
112
|
+
},
|
|
113
|
+
),
|
|
114
|
+
]
|
|
115
|
+
)
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
@server.call_tool()
|
|
119
|
+
async def handle_tool_call(tool_name: str, arguments: dict[str, Any]) -> CallToolResult:
|
|
120
|
+
"""Route tool calls to handlers."""
|
|
121
|
+
if tool_name == "ingest_run":
|
|
122
|
+
return await ingest_run(arguments)
|
|
123
|
+
elif tool_name == "ingest_trace":
|
|
124
|
+
return await ingest_trace(arguments)
|
|
125
|
+
elif tool_name == "query_runs":
|
|
126
|
+
return await query_runs(arguments)
|
|
127
|
+
elif tool_name == "get_agent_stats":
|
|
128
|
+
return await get_agent_stats(arguments)
|
|
129
|
+
else:
|
|
130
|
+
raise ValueError(f"Unknown tool: {tool_name}")
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
async def ingest_run(args: dict[str, Any]) -> CallToolResult:
|
|
134
|
+
"""Push a canonical run event to Genoma's telemetry store."""
|
|
135
|
+
data = {
|
|
136
|
+
"run_id": args["run_id"],
|
|
137
|
+
"agent_name": args["agent_name"],
|
|
138
|
+
"collector": args.get("collector", "mcp-native"),
|
|
139
|
+
"started_at": args["started_at"],
|
|
140
|
+
"task_name": args["task_name"],
|
|
141
|
+
"outcome": args["outcome"],
|
|
142
|
+
"agent_version": args.get("agent_version"),
|
|
143
|
+
"provider": args.get("provider"),
|
|
144
|
+
"model": args.get("model"),
|
|
145
|
+
"repo": args.get("repo"),
|
|
146
|
+
"session_id": args.get("session_id"),
|
|
147
|
+
"ended_at": args.get("ended_at"),
|
|
148
|
+
"tool_calls": args.get("tool_calls", []),
|
|
149
|
+
"files_touched": args.get("files_touched", []),
|
|
150
|
+
"metrics": args.get("metrics"),
|
|
151
|
+
"errors": args.get("errors", []),
|
|
152
|
+
"context": args.get("context", {}),
|
|
153
|
+
"resolution": args.get("resolution"),
|
|
154
|
+
}
|
|
155
|
+
run = CanonicalRun.from_dict(data)
|
|
156
|
+
is_new = RunStore().upsert_run(run)
|
|
157
|
+
result = {
|
|
158
|
+
"status": "inserted" if is_new else "updated",
|
|
159
|
+
"run_id": run.run_id,
|
|
160
|
+
}
|
|
161
|
+
return CallToolResult(
|
|
162
|
+
content=[TextContent(type="text", text=str(result))],
|
|
163
|
+
isError=False,
|
|
164
|
+
)
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
async def ingest_trace(args: dict[str, Any]) -> CallToolResult:
|
|
168
|
+
"""Push a lightweight TraceRecord to Genoma."""
|
|
169
|
+
trace = TraceRecord(
|
|
170
|
+
agent=args["agent"],
|
|
171
|
+
agent_version=args["agent_version"],
|
|
172
|
+
timestamp=args["timestamp"],
|
|
173
|
+
task=args["task"],
|
|
174
|
+
outcome=args["outcome"],
|
|
175
|
+
error_signature=args.get("error_signature"),
|
|
176
|
+
context=args.get("context", {}),
|
|
177
|
+
resolution=args.get("resolution"),
|
|
178
|
+
)
|
|
179
|
+
get_ingestor().ingest(trace)
|
|
180
|
+
canonical = trace.to_canonical()
|
|
181
|
+
RunStore().upsert_run(canonical)
|
|
182
|
+
result = {
|
|
183
|
+
"status": "ingested",
|
|
184
|
+
"trace_id": trace.trace_id,
|
|
185
|
+
"run_id": canonical.run_id,
|
|
186
|
+
}
|
|
187
|
+
return CallToolResult(
|
|
188
|
+
content=[TextContent(type="text", text=str(result))],
|
|
189
|
+
isError=False,
|
|
190
|
+
)
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
async def query_runs(args: dict[str, Any]) -> CallToolResult:
|
|
194
|
+
"""Query past runs from Genoma's telemetry store."""
|
|
195
|
+
limit = min(args.get("limit", 20), 100)
|
|
196
|
+
runs = RunStore().list_runs(
|
|
197
|
+
agent_name=args.get("agent_name"),
|
|
198
|
+
outcome=args.get("outcome"),
|
|
199
|
+
repo=args.get("repo"),
|
|
200
|
+
since=args.get("since"),
|
|
201
|
+
until=args.get("until"),
|
|
202
|
+
limit=limit,
|
|
203
|
+
offset=0,
|
|
204
|
+
)
|
|
205
|
+
lightweight = [
|
|
206
|
+
{
|
|
207
|
+
"run_id": r.run_id,
|
|
208
|
+
"agent_name": r.agent_name,
|
|
209
|
+
"agent_version": r.agent_version,
|
|
210
|
+
"collector": r.collector,
|
|
211
|
+
"started_at": r.started_at,
|
|
212
|
+
"ended_at": r.ended_at,
|
|
213
|
+
"task_name": r.task_name,
|
|
214
|
+
"outcome": r.outcome,
|
|
215
|
+
"provider": r.provider,
|
|
216
|
+
"model": r.model,
|
|
217
|
+
"repo": r.repo,
|
|
218
|
+
"session_id": r.session_id,
|
|
219
|
+
"resolution": r.resolution,
|
|
220
|
+
}
|
|
221
|
+
for r in runs
|
|
222
|
+
]
|
|
223
|
+
result = {"runs": lightweight, "count": len(lightweight)}
|
|
224
|
+
return CallToolResult(
|
|
225
|
+
content=[TextContent(type="text", text=str(result))],
|
|
226
|
+
isError=False,
|
|
227
|
+
)
|
|
228
|
+
|
|
229
|
+
|
|
230
|
+
async def get_agent_stats(args: dict[str, Any]) -> CallToolResult:
|
|
231
|
+
"""Get performance statistics for one or all agents."""
|
|
232
|
+
summary = RunStore().get_agent_summary()
|
|
233
|
+
agent_name = args.get("agent_name")
|
|
234
|
+
if agent_name:
|
|
235
|
+
summary = [s for s in summary if s.get("agent_name") == agent_name]
|
|
236
|
+
result = {"agents": summary}
|
|
237
|
+
return CallToolResult(
|
|
238
|
+
content=[TextContent(type="text", text=str(result))],
|
|
239
|
+
isError=False,
|
|
240
|
+
)
|
|
241
|
+
|
|
242
|
+
|
|
243
|
+
async def main() -> None:
|
|
244
|
+
"""Start MCP server with stdio transport."""
|
|
245
|
+
async with stdio_server(server) as (read_stream, write_stream):
|
|
246
|
+
await read_stream.read()
|
|
247
|
+
|
|
248
|
+
|
|
249
|
+
if __name__ == "__main__":
|
|
250
|
+
asyncio.run(main())
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Promethean Cycle — Ciclo de Hiper-Evolución Autónoma del Dashboard
|
|
3
|
+
|
|
4
|
+
Módulos:
|
|
5
|
+
① trace_ingestion — PERCIBE: ingesta de trazas multi-agente
|
|
6
|
+
② gepa_strategist — DIAGNOSTICA + FORMULA: GEPA strategic layer
|
|
7
|
+
③ dspy_compiler — COMPILA: DSPy BetterTogether compilation
|
|
8
|
+
④ delta_validator — VALIDA: holdout validation + delta
|
|
9
|
+
⑤ skill_deployer — DESPLIEGA: auto-registro en skill registry
|
|
10
|
+
⑥ cycle_orchestrator — OBSERVA: full 7-phase orchestrator
|
|
11
|
+
|
|
12
|
+
El dashboard deja de ser espejo y se convierte en oráculo.
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
__version__ = "1.0.0"
|
|
16
|
+
__all__ = [
|
|
17
|
+
"models",
|
|
18
|
+
"trace_ingestion",
|
|
19
|
+
"gepa_strategist",
|
|
20
|
+
"dspy_compiler",
|
|
21
|
+
"delta_validator",
|
|
22
|
+
"skill_deployer",
|
|
23
|
+
"cycle_orchestrator",
|
|
24
|
+
]
|
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
"""
|
|
2
|
+
⑦ OBSERVA — Promethean Cycle Orchestrator
|
|
3
|
+
|
|
4
|
+
Orchestrates the full 7-phase autonomous evolution cycle:
|
|
5
|
+
① PERCIBE → ② DIAGNOSTICA → ③ FORMULA → ④ COMPILA → ⑤ VALIDA → ⑥ DESPLIEGA → ⑦ OBSERVA
|
|
6
|
+
|
|
7
|
+
The orchestrator is the "heartbeat" of the living dashboard.
|
|
8
|
+
It can run on-demand or as a continuous background loop.
|
|
9
|
+
"""
|
|
10
|
+
|
|
11
|
+
from __future__ import annotations
|
|
12
|
+
import asyncio
|
|
13
|
+
import json
|
|
14
|
+
import sys
|
|
15
|
+
from datetime import datetime
|
|
16
|
+
from pathlib import Path
|
|
17
|
+
from typing import Optional
|
|
18
|
+
|
|
19
|
+
from .models import (
|
|
20
|
+
CycleState, CyclePhase, SkillGenesisPacket, CompilationResult, MetricSnapshot,
|
|
21
|
+
TraceRecord,
|
|
22
|
+
)
|
|
23
|
+
from .trace_ingestion import get_ingestor
|
|
24
|
+
from .gepa_strategist import get_strategist
|
|
25
|
+
from .dspy_compiler import get_compiler
|
|
26
|
+
from .delta_validator import get_validator
|
|
27
|
+
from .skill_deployer import get_deployer
|
|
28
|
+
|
|
29
|
+
CYCLES_DIR = Path.home() / ".hermes" / "traces" / "cycles"
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
class PrometheanOrchestrator:
|
|
33
|
+
"""Full 7-phase autonomous evolution orchestrator."""
|
|
34
|
+
|
|
35
|
+
def __init__(self, python_bin: str = sys.executable):
|
|
36
|
+
self.python_bin = python_bin
|
|
37
|
+
self.ingestor = get_ingestor()
|
|
38
|
+
self.strategist = get_strategist()
|
|
39
|
+
self.compiler = get_compiler(python_bin)
|
|
40
|
+
self.validator = get_validator(python_bin)
|
|
41
|
+
self.deployer = get_deployer()
|
|
42
|
+
CYCLES_DIR.mkdir(parents=True, exist_ok=True)
|
|
43
|
+
|
|
44
|
+
# ── Full Cycle Execution ────────────────────────────────────────
|
|
45
|
+
async def run_full_cycle(
|
|
46
|
+
self,
|
|
47
|
+
min_anomaly_occurrences: int = 3,
|
|
48
|
+
anomaly_days: int = 7,
|
|
49
|
+
auto_deploy: bool = True,
|
|
50
|
+
) -> dict:
|
|
51
|
+
"""Execute the complete Promethean Cycle.
|
|
52
|
+
|
|
53
|
+
Compilation runs in background to avoid blocking the API.
|
|
54
|
+
Returns a summary dictionary suitable for API response.
|
|
55
|
+
"""
|
|
56
|
+
import concurrent.futures
|
|
57
|
+
state = CycleState()
|
|
58
|
+
events: list[dict] = [] # Progress events for streaming
|
|
59
|
+
|
|
60
|
+
try:
|
|
61
|
+
# ── ① PERCIBE ──────────────────────────────────────────
|
|
62
|
+
state.advance(CyclePhase.PERCIBE)
|
|
63
|
+
state.traces_ingested = self.ingestor.get_trace_count()
|
|
64
|
+
anomalies = self.ingestor.get_recent_failures(
|
|
65
|
+
days=anomaly_days,
|
|
66
|
+
min_occurrences=min_anomaly_occurrences,
|
|
67
|
+
)
|
|
68
|
+
state.anomalies_detected = len(anomalies)
|
|
69
|
+
events.append({
|
|
70
|
+
"phase": "perceive",
|
|
71
|
+
"traces_ingested": state.traces_ingested,
|
|
72
|
+
"anomalies_detected": len(anomalies),
|
|
73
|
+
})
|
|
74
|
+
|
|
75
|
+
if not anomalies:
|
|
76
|
+
state.advance(CyclePhase.OBSERVA)
|
|
77
|
+
return state.summary()
|
|
78
|
+
|
|
79
|
+
# ── ②③ DIAGNOSTICA + FORMULA ───────────────────────────
|
|
80
|
+
state.advance(CyclePhase.DIAGNOSTICA)
|
|
81
|
+
gaps = self.strategist.diagnose(anomalies)
|
|
82
|
+
actionable = [g for g in gaps if g["recommended_action"] == "compile_skill"]
|
|
83
|
+
events.append({
|
|
84
|
+
"phase": "diagnose",
|
|
85
|
+
"gaps_found": len(gaps),
|
|
86
|
+
"actionable_gaps": len(actionable),
|
|
87
|
+
})
|
|
88
|
+
|
|
89
|
+
if not actionable:
|
|
90
|
+
state.advance(CyclePhase.OBSERVA)
|
|
91
|
+
return state.summary()
|
|
92
|
+
|
|
93
|
+
state.advance(CyclePhase.FORMULA)
|
|
94
|
+
packets = self.strategist.formulate_all(actionable, state)
|
|
95
|
+
events.append({
|
|
96
|
+
"phase": "formulate",
|
|
97
|
+
"genesis_packets": len(packets),
|
|
98
|
+
"packet_ids": [p.packet_id for p in packets],
|
|
99
|
+
})
|
|
100
|
+
|
|
101
|
+
# ── ④ COMPILA: Run in thread pool to avoid blocking ─────
|
|
102
|
+
state.advance(CyclePhase.COMPILA)
|
|
103
|
+
all_compilations: list[CompilationResult] = []
|
|
104
|
+
|
|
105
|
+
def compile_packet(packet):
|
|
106
|
+
return self.compiler.compile_with_retry(packet)
|
|
107
|
+
|
|
108
|
+
with concurrent.futures.ThreadPoolExecutor(max_workers=2) as executor:
|
|
109
|
+
futures = [executor.submit(compile_packet, p) for p in packets]
|
|
110
|
+
for future in concurrent.futures.as_completed(futures, timeout=120):
|
|
111
|
+
try:
|
|
112
|
+
comp = future.result(timeout=60)
|
|
113
|
+
all_compilations.append(comp)
|
|
114
|
+
state.compilation_results.append(comp)
|
|
115
|
+
except concurrent.futures.TimeoutError:
|
|
116
|
+
all_compilations.append(CompilationResult(
|
|
117
|
+
packet_id=packets[0].packet_id if packets else "unknown",
|
|
118
|
+
success=False, skill_name="", skill_path="",
|
|
119
|
+
iterations=0, best_score=0.0, delta=0.0,
|
|
120
|
+
threshold_met=False, attempt=1,
|
|
121
|
+
error="Compilation timed out (60s limit)",
|
|
122
|
+
))
|
|
123
|
+
|
|
124
|
+
events.append({
|
|
125
|
+
"phase": "compile",
|
|
126
|
+
"compiled": len(all_compilations),
|
|
127
|
+
"successful": sum(1 for c in all_compilations if c.success),
|
|
128
|
+
})
|
|
129
|
+
|
|
130
|
+
# ── ⑤ VALIDA: Delta validation ────────────────────────────
|
|
131
|
+
state.advance(CyclePhase.VALIDA)
|
|
132
|
+
all_snapshots: list[MetricSnapshot] = []
|
|
133
|
+
for packet, comp in zip(packets, all_compilations):
|
|
134
|
+
snapshot = self.validator.validate(packet, comp)
|
|
135
|
+
all_snapshots.append(snapshot)
|
|
136
|
+
passed = [s for s in all_snapshots if s.passed]
|
|
137
|
+
events.append({
|
|
138
|
+
"phase": "validate",
|
|
139
|
+
"validated": len(all_snapshots),
|
|
140
|
+
"passed": len(passed),
|
|
141
|
+
"deltas": [s.deltas for s in passed],
|
|
142
|
+
})
|
|
143
|
+
|
|
144
|
+
# ── ⑥ DESPLIEGA: Auto-register skills ─────────────────────
|
|
145
|
+
state.advance(CyclePhase.DESPLIEGA)
|
|
146
|
+
if auto_deploy:
|
|
147
|
+
deployments = []
|
|
148
|
+
for packet, comp, snap in zip(packets, all_compilations, all_snapshots):
|
|
149
|
+
if snap.passed:
|
|
150
|
+
result = self.deployer.deploy(packet, comp, snap)
|
|
151
|
+
if result.get("deployed"):
|
|
152
|
+
state.skills_deployed += 1
|
|
153
|
+
deployments.append(result)
|
|
154
|
+
events.append({
|
|
155
|
+
"phase": "deploy",
|
|
156
|
+
"deployed": state.skills_deployed,
|
|
157
|
+
"skill_names": [d.get("skill_name") for d in deployments if d.get("deployed")],
|
|
158
|
+
})
|
|
159
|
+
|
|
160
|
+
# ── ⑦ OBSERVA: Close cycle, establish new baseline ─────────
|
|
161
|
+
state.advance(CyclePhase.OBSERVA)
|
|
162
|
+
events.append({
|
|
163
|
+
"phase": "observe",
|
|
164
|
+
"new_baseline": f"{state.skills_deployed} new skills deployed",
|
|
165
|
+
})
|
|
166
|
+
|
|
167
|
+
except Exception as e:
|
|
168
|
+
state.errors.append(str(e))
|
|
169
|
+
events.append({"phase": "error", "error": str(e)})
|
|
170
|
+
|
|
171
|
+
# Save cycle state to disk
|
|
172
|
+
self._save_cycle_state(state, events)
|
|
173
|
+
|
|
174
|
+
return {
|
|
175
|
+
**state.summary(),
|
|
176
|
+
"events": events,
|
|
177
|
+
"dspy_available": self.compiler.is_available,
|
|
178
|
+
"dspy_version": self.compiler.dspy_version,
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
def run_full_cycle_sync(self, **kwargs) -> dict:
|
|
182
|
+
"""Synchronous wrapper for run_full_cycle."""
|
|
183
|
+
return asyncio.run(self.run_full_cycle(**kwargs))
|
|
184
|
+
|
|
185
|
+
# ── Single Phase Execution (for testing/stepping) ───────────────
|
|
186
|
+
def run_perceive(self, days: int = 7, min_occ: int = 3) -> dict:
|
|
187
|
+
"""Run only the PERCIBE phase."""
|
|
188
|
+
traces = self.ingestor.get_trace_count()
|
|
189
|
+
anomalies = self.ingestor.get_recent_failures(days=days, min_occurrences=min_occ)
|
|
190
|
+
agent_health = self.ingestor.get_agent_health()
|
|
191
|
+
return {
|
|
192
|
+
"phase": "perceive",
|
|
193
|
+
"traces_ingested": traces,
|
|
194
|
+
"anomalies": anomalies,
|
|
195
|
+
"agent_health": agent_health,
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
def run_diagnose(self, days: int = 7, min_occ: int = 3) -> dict:
|
|
199
|
+
"""Run PERCIBE + DIAGNOSTICA phases."""
|
|
200
|
+
anomalies = self.ingestor.get_recent_failures(days=days, min_occurrences=min_occ)
|
|
201
|
+
gaps = self.strategist.diagnose(anomalies)
|
|
202
|
+
return {
|
|
203
|
+
"phase": "diagnose",
|
|
204
|
+
"anomalies_found": len(anomalies),
|
|
205
|
+
"gaps": gaps,
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
# ── Helpers ─────────────────────────────────────────────────────
|
|
209
|
+
def _save_cycle_state(self, state: CycleState, events: list[dict]):
|
|
210
|
+
"""Persist cycle state to disk."""
|
|
211
|
+
cycle_data = {
|
|
212
|
+
**state.summary(),
|
|
213
|
+
"events": events,
|
|
214
|
+
"packets": [p.to_dict() for p in state.genesis_packets],
|
|
215
|
+
"compilations": [
|
|
216
|
+
{
|
|
217
|
+
"packet_id": c.packet_id,
|
|
218
|
+
"success": c.success,
|
|
219
|
+
"skill_name": c.skill_name,
|
|
220
|
+
"delta": c.delta,
|
|
221
|
+
"attempt": c.attempt,
|
|
222
|
+
"error": c.error,
|
|
223
|
+
}
|
|
224
|
+
for c in state.compilation_results
|
|
225
|
+
],
|
|
226
|
+
}
|
|
227
|
+
cycle_path = CYCLES_DIR / f"cycle_{state.cycle_id}.json"
|
|
228
|
+
cycle_path.write_text(json.dumps(cycle_data, indent=2, default=str))
|
|
229
|
+
|
|
230
|
+
def get_cycle_history(self, limit: int = 10) -> list[dict]:
|
|
231
|
+
"""Get recent cycle execution history."""
|
|
232
|
+
if not CYCLES_DIR.exists():
|
|
233
|
+
return []
|
|
234
|
+
|
|
235
|
+
cycles = []
|
|
236
|
+
for f in sorted(CYCLES_DIR.glob("cycle_*.json"), reverse=True)[:limit]:
|
|
237
|
+
try:
|
|
238
|
+
cycles.append(json.loads(f.read_text()))
|
|
239
|
+
except Exception:
|
|
240
|
+
continue
|
|
241
|
+
return cycles
|
|
242
|
+
|
|
243
|
+
# ── Continuous Mode ─────────────────────────────────────────────
|
|
244
|
+
async def continuous_loop(self, interval_minutes: int = 30):
|
|
245
|
+
"""Run the Promethean Cycle continuously every N minutes."""
|
|
246
|
+
print(f"🔥 Promethean Cycle started. Running every {interval_minutes} min.")
|
|
247
|
+
while True:
|
|
248
|
+
try:
|
|
249
|
+
print(f"\n{'='*60}")
|
|
250
|
+
print(f"🔄 CYCLE START — {datetime.now().isoformat()}")
|
|
251
|
+
result = await self.run_full_cycle()
|
|
252
|
+
print(f"✅ CYCLE COMPLETE — {result['skills_deployed']} skills deployed")
|
|
253
|
+
print(f" Traces: {result['traces_ingested']} | Anomalies: {result['anomalies_detected']}")
|
|
254
|
+
print(f" DSPy: {'✅ v' + (self.compiler.dspy_version or '?') if self.compiler.is_available else '❌'}")
|
|
255
|
+
print(f"{'='*60}\n")
|
|
256
|
+
except Exception as e:
|
|
257
|
+
print(f"❌ CYCLE ERROR: {e}")
|
|
258
|
+
|
|
259
|
+
await asyncio.sleep(interval_minutes * 60)
|
|
260
|
+
|
|
261
|
+
|
|
262
|
+
# ── Singleton ───────────────────────────────────────────────────────
|
|
263
|
+
_orchestrator: Optional[PrometheanOrchestrator] = None
|
|
264
|
+
|
|
265
|
+
|
|
266
|
+
def get_orchestrator(python_bin: str = sys.executable) -> PrometheanOrchestrator:
|
|
267
|
+
global _orchestrator
|
|
268
|
+
if _orchestrator is None:
|
|
269
|
+
_orchestrator = PrometheanOrchestrator(python_bin)
|
|
270
|
+
return _orchestrator
|