animus-forge 1.3.0__tar.gz
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.
- animus_forge-1.3.0/PKG-INFO +124 -0
- animus_forge-1.3.0/README.md +57 -0
- animus_forge-1.3.0/pyproject.toml +110 -0
- animus_forge-1.3.0/setup.cfg +4 -0
- animus_forge-1.3.0/src/animus_forge/__init__.py +54 -0
- animus_forge-1.3.0/src/animus_forge/agents/__init__.py +19 -0
- animus_forge-1.3.0/src/animus_forge/agents/convergence.py +303 -0
- animus_forge-1.3.0/src/animus_forge/agents/provider_wrapper.py +169 -0
- animus_forge-1.3.0/src/animus_forge/agents/supervisor.py +654 -0
- animus_forge-1.3.0/src/animus_forge/analytics/__init__.py +54 -0
- animus_forge-1.3.0/src/animus_forge/analytics/analyzers.py +336 -0
- animus_forge-1.3.0/src/animus_forge/analytics/collectors.py +424 -0
- animus_forge-1.3.0/src/animus_forge/analytics/pipeline.py +462 -0
- animus_forge-1.3.0/src/animus_forge/analytics/reporters.py +371 -0
- animus_forge-1.3.0/src/animus_forge/analytics/visualizers.py +289 -0
- animus_forge-1.3.0/src/animus_forge/api.py +453 -0
- animus_forge-1.3.0/src/animus_forge/api_clients/__init__.py +18 -0
- animus_forge-1.3.0/src/animus_forge/api_clients/calendar_client.py +643 -0
- animus_forge-1.3.0/src/animus_forge/api_clients/claude_code_client.py +702 -0
- animus_forge-1.3.0/src/animus_forge/api_clients/github_client.py +196 -0
- animus_forge-1.3.0/src/animus_forge/api_clients/gmail_client.py +114 -0
- animus_forge-1.3.0/src/animus_forge/api_clients/notion_client.py +625 -0
- animus_forge-1.3.0/src/animus_forge/api_clients/openai_client.py +136 -0
- animus_forge-1.3.0/src/animus_forge/api_clients/resilience.py +267 -0
- animus_forge-1.3.0/src/animus_forge/api_clients/slack_client.py +450 -0
- animus_forge-1.3.0/src/animus_forge/api_errors.py +426 -0
- animus_forge-1.3.0/src/animus_forge/api_models.py +194 -0
- animus_forge-1.3.0/src/animus_forge/api_routes/__init__.py +1 -0
- animus_forge-1.3.0/src/animus_forge/api_routes/auth.py +67 -0
- animus_forge-1.3.0/src/animus_forge/api_routes/budgets.py +171 -0
- animus_forge-1.3.0/src/animus_forge/api_routes/coordination.py +137 -0
- animus_forge-1.3.0/src/animus_forge/api_routes/dashboard.py +422 -0
- animus_forge-1.3.0/src/animus_forge/api_routes/executions.py +384 -0
- animus_forge-1.3.0/src/animus_forge/api_routes/graph.py +432 -0
- animus_forge-1.3.0/src/animus_forge/api_routes/health.py +192 -0
- animus_forge-1.3.0/src/animus_forge/api_routes/history.py +73 -0
- animus_forge-1.3.0/src/animus_forge/api_routes/jobs.py +119 -0
- animus_forge-1.3.0/src/animus_forge/api_routes/mcp.py +167 -0
- animus_forge-1.3.0/src/animus_forge/api_routes/prompts.py +53 -0
- animus_forge-1.3.0/src/animus_forge/api_routes/schedules.py +131 -0
- animus_forge-1.3.0/src/animus_forge/api_routes/settings.py +114 -0
- animus_forge-1.3.0/src/animus_forge/api_routes/webhooks.py +247 -0
- animus_forge-1.3.0/src/animus_forge/api_routes/websocket.py +39 -0
- animus_forge-1.3.0/src/animus_forge/api_routes/workflows.py +410 -0
- animus_forge-1.3.0/src/animus_forge/api_state.py +103 -0
- animus_forge-1.3.0/src/animus_forge/auth/__init__.py +25 -0
- animus_forge-1.3.0/src/animus_forge/auth/tenants.py +740 -0
- animus_forge-1.3.0/src/animus_forge/auth/token_auth.py +61 -0
- animus_forge-1.3.0/src/animus_forge/browser/__init__.py +30 -0
- animus_forge-1.3.0/src/animus_forge/browser/automation.py +933 -0
- animus_forge-1.3.0/src/animus_forge/budget/__init__.py +84 -0
- animus_forge-1.3.0/src/animus_forge/budget/manager.py +383 -0
- animus_forge-1.3.0/src/animus_forge/budget/models.py +93 -0
- animus_forge-1.3.0/src/animus_forge/budget/persistence.py +314 -0
- animus_forge-1.3.0/src/animus_forge/budget/preflight.py +383 -0
- animus_forge-1.3.0/src/animus_forge/budget/strategies.py +347 -0
- animus_forge-1.3.0/src/animus_forge/cache/__init__.py +33 -0
- animus_forge-1.3.0/src/animus_forge/cache/backends.py +406 -0
- animus_forge-1.3.0/src/animus_forge/cache/decorators.py +284 -0
- animus_forge-1.3.0/src/animus_forge/cli/__init__.py +5 -0
- animus_forge-1.3.0/src/animus_forge/cli/commands/__init__.py +1 -0
- animus_forge-1.3.0/src/animus_forge/cli/commands/admin.py +244 -0
- animus_forge-1.3.0/src/animus_forge/cli/commands/browser.py +188 -0
- animus_forge-1.3.0/src/animus_forge/cli/commands/budget.py +155 -0
- animus_forge-1.3.0/src/animus_forge/cli/commands/calendar_cmd.py +335 -0
- animus_forge-1.3.0/src/animus_forge/cli/commands/config.py +132 -0
- animus_forge-1.3.0/src/animus_forge/cli/commands/coordination.py +189 -0
- animus_forge-1.3.0/src/animus_forge/cli/commands/dev.py +583 -0
- animus_forge-1.3.0/src/animus_forge/cli/commands/eval_cmd.py +221 -0
- animus_forge-1.3.0/src/animus_forge/cli/commands/graph.py +301 -0
- animus_forge-1.3.0/src/animus_forge/cli/commands/history.py +134 -0
- animus_forge-1.3.0/src/animus_forge/cli/commands/mcp.py +220 -0
- animus_forge-1.3.0/src/animus_forge/cli/commands/memory.py +128 -0
- animus_forge-1.3.0/src/animus_forge/cli/commands/metrics.py +132 -0
- animus_forge-1.3.0/src/animus_forge/cli/commands/schedule.py +152 -0
- animus_forge-1.3.0/src/animus_forge/cli/commands/self_improve.py +180 -0
- animus_forge-1.3.0/src/animus_forge/cli/commands/setup.py +197 -0
- animus_forge-1.3.0/src/animus_forge/cli/commands/workflow.py +380 -0
- animus_forge-1.3.0/src/animus_forge/cli/detection.py +119 -0
- animus_forge-1.3.0/src/animus_forge/cli/helpers.py +114 -0
- animus_forge-1.3.0/src/animus_forge/cli/interactive_runner.py +502 -0
- animus_forge-1.3.0/src/animus_forge/cli/main.py +205 -0
- animus_forge-1.3.0/src/animus_forge/cli/rich_output.py +448 -0
- animus_forge-1.3.0/src/animus_forge/config/__init__.py +13 -0
- animus_forge-1.3.0/src/animus_forge/config/logging.py +122 -0
- animus_forge-1.3.0/src/animus_forge/config/settings.py +450 -0
- animus_forge-1.3.0/src/animus_forge/contracts/__init__.py +31 -0
- animus_forge-1.3.0/src/animus_forge/contracts/base.py +141 -0
- animus_forge-1.3.0/src/animus_forge/contracts/definitions.py +891 -0
- animus_forge-1.3.0/src/animus_forge/contracts/enforcer.py +297 -0
- animus_forge-1.3.0/src/animus_forge/contracts/validator.py +290 -0
- animus_forge-1.3.0/src/animus_forge/dashboard/__init__.py +5 -0
- animus_forge-1.3.0/src/animus_forge/dashboard/app.py +518 -0
- animus_forge-1.3.0/src/animus_forge/dashboard/cost_dashboard.py +361 -0
- animus_forge-1.3.0/src/animus_forge/dashboard/eval_page.py +113 -0
- animus_forge-1.3.0/src/animus_forge/dashboard/mcp_page.py +417 -0
- animus_forge-1.3.0/src/animus_forge/dashboard/monitoring_pages.py +1104 -0
- animus_forge-1.3.0/src/animus_forge/dashboard/plugin_marketplace.py +765 -0
- animus_forge-1.3.0/src/animus_forge/dashboard/workflow_builder/__init__.py +64 -0
- animus_forge-1.3.0/src/animus_forge/dashboard/workflow_builder/builder.py +118 -0
- animus_forge-1.3.0/src/animus_forge/dashboard/workflow_builder/constants.py +467 -0
- animus_forge-1.3.0/src/animus_forge/dashboard/workflow_builder/persistence.py +193 -0
- animus_forge-1.3.0/src/animus_forge/dashboard/workflow_builder/renderers/__init__.py +37 -0
- animus_forge-1.3.0/src/animus_forge/dashboard/workflow_builder/renderers/_helpers.py +20 -0
- animus_forge-1.3.0/src/animus_forge/dashboard/workflow_builder/renderers/canvas.py +303 -0
- animus_forge-1.3.0/src/animus_forge/dashboard/workflow_builder/renderers/execution.py +130 -0
- animus_forge-1.3.0/src/animus_forge/dashboard/workflow_builder/renderers/node_config.py +246 -0
- animus_forge-1.3.0/src/animus_forge/dashboard/workflow_builder/renderers/visualization.py +234 -0
- animus_forge-1.3.0/src/animus_forge/dashboard/workflow_builder/renderers/workflow_io.py +191 -0
- animus_forge-1.3.0/src/animus_forge/dashboard/workflow_builder/state.py +143 -0
- animus_forge-1.3.0/src/animus_forge/dashboard/workflow_builder/yaml_ops.py +145 -0
- animus_forge-1.3.0/src/animus_forge/dashboard/workflow_visualizer.py +423 -0
- animus_forge-1.3.0/src/animus_forge/db.py +353 -0
- animus_forge-1.3.0/src/animus_forge/errors.py +146 -0
- animus_forge-1.3.0/src/animus_forge/evaluation/__init__.py +57 -0
- animus_forge-1.3.0/src/animus_forge/evaluation/base.py +438 -0
- animus_forge-1.3.0/src/animus_forge/evaluation/loader.py +157 -0
- animus_forge-1.3.0/src/animus_forge/evaluation/metrics.py +567 -0
- animus_forge-1.3.0/src/animus_forge/evaluation/reporters.py +388 -0
- animus_forge-1.3.0/src/animus_forge/evaluation/runner.py +405 -0
- animus_forge-1.3.0/src/animus_forge/evaluation/store.py +333 -0
- animus_forge-1.3.0/src/animus_forge/executions/__init__.py +21 -0
- animus_forge-1.3.0/src/animus_forge/executions/manager.py +768 -0
- animus_forge-1.3.0/src/animus_forge/executions/models.py +97 -0
- animus_forge-1.3.0/src/animus_forge/http/__init__.py +33 -0
- animus_forge-1.3.0/src/animus_forge/http/client.py +267 -0
- animus_forge-1.3.0/src/animus_forge/intelligence/__init__.py +87 -0
- animus_forge-1.3.0/src/animus_forge/intelligence/cost_intelligence.py +824 -0
- animus_forge-1.3.0/src/animus_forge/intelligence/cross_workflow_memory.py +620 -0
- animus_forge-1.3.0/src/animus_forge/intelligence/feedback_engine.py +775 -0
- animus_forge-1.3.0/src/animus_forge/intelligence/integration_graph.py +450 -0
- animus_forge-1.3.0/src/animus_forge/intelligence/outcome_tracker.py +384 -0
- animus_forge-1.3.0/src/animus_forge/intelligence/prompt_evolution.py +605 -0
- animus_forge-1.3.0/src/animus_forge/intelligence/provider_router.py +584 -0
- animus_forge-1.3.0/src/animus_forge/jobs/__init__.py +13 -0
- animus_forge-1.3.0/src/animus_forge/jobs/job_manager.py +433 -0
- animus_forge-1.3.0/src/animus_forge/mcp/__init__.py +32 -0
- animus_forge-1.3.0/src/animus_forge/mcp/client.py +253 -0
- animus_forge-1.3.0/src/animus_forge/mcp/manager.py +682 -0
- animus_forge-1.3.0/src/animus_forge/mcp/models.py +140 -0
- animus_forge-1.3.0/src/animus_forge/messaging/__init__.py +27 -0
- animus_forge-1.3.0/src/animus_forge/messaging/base.py +222 -0
- animus_forge-1.3.0/src/animus_forge/messaging/discord_bot.py +529 -0
- animus_forge-1.3.0/src/animus_forge/messaging/telegram_bot.py +591 -0
- animus_forge-1.3.0/src/animus_forge/metrics/__init__.py +79 -0
- animus_forge-1.3.0/src/animus_forge/metrics/audit_checks.py +409 -0
- animus_forge-1.3.0/src/animus_forge/metrics/collector.py +450 -0
- animus_forge-1.3.0/src/animus_forge/metrics/cost_tracker.py +497 -0
- animus_forge-1.3.0/src/animus_forge/metrics/debt_monitor.py +737 -0
- animus_forge-1.3.0/src/animus_forge/metrics/exporters.py +267 -0
- animus_forge-1.3.0/src/animus_forge/metrics/prometheus_server.py +423 -0
- animus_forge-1.3.0/src/animus_forge/monitoring/__init__.py +49 -0
- animus_forge-1.3.0/src/animus_forge/monitoring/metrics.py +383 -0
- animus_forge-1.3.0/src/animus_forge/monitoring/parallel_tracker.py +724 -0
- animus_forge-1.3.0/src/animus_forge/monitoring/tracker.py +214 -0
- animus_forge-1.3.0/src/animus_forge/monitoring/watchers.py +793 -0
- animus_forge-1.3.0/src/animus_forge/notifications/__init__.py +31 -0
- animus_forge-1.3.0/src/animus_forge/notifications/base.py +28 -0
- animus_forge-1.3.0/src/animus_forge/notifications/channels/__init__.py +17 -0
- animus_forge-1.3.0/src/animus_forge/notifications/channels/discord.py +117 -0
- animus_forge-1.3.0/src/animus_forge/notifications/channels/email_channel.py +141 -0
- animus_forge-1.3.0/src/animus_forge/notifications/channels/pagerduty.py +113 -0
- animus_forge-1.3.0/src/animus_forge/notifications/channels/slack.py +121 -0
- animus_forge-1.3.0/src/animus_forge/notifications/channels/teams.py +97 -0
- animus_forge-1.3.0/src/animus_forge/notifications/channels/webhook.py +50 -0
- animus_forge-1.3.0/src/animus_forge/notifications/manager.py +189 -0
- animus_forge-1.3.0/src/animus_forge/notifications/models.py +42 -0
- animus_forge-1.3.0/src/animus_forge/notifications/notifier.py +46 -0
- animus_forge-1.3.0/src/animus_forge/orchestrator/__init__.py +23 -0
- animus_forge-1.3.0/src/animus_forge/orchestrator/workflow_engine.py +54 -0
- animus_forge-1.3.0/src/animus_forge/orchestrator/workflow_engine_adapter.py +262 -0
- animus_forge-1.3.0/src/animus_forge/plugins/__init__.py +66 -0
- animus_forge-1.3.0/src/animus_forge/plugins/base.py +257 -0
- animus_forge-1.3.0/src/animus_forge/plugins/installer.py +684 -0
- animus_forge-1.3.0/src/animus_forge/plugins/loader.py +309 -0
- animus_forge-1.3.0/src/animus_forge/plugins/marketplace.py +567 -0
- animus_forge-1.3.0/src/animus_forge/plugins/models.py +146 -0
- animus_forge-1.3.0/src/animus_forge/plugins/registry.py +264 -0
- animus_forge-1.3.0/src/animus_forge/prompts/__init__.py +5 -0
- animus_forge-1.3.0/src/animus_forge/prompts/template_manager.py +177 -0
- animus_forge-1.3.0/src/animus_forge/providers/__init__.py +69 -0
- animus_forge-1.3.0/src/animus_forge/providers/anthropic_provider.py +287 -0
- animus_forge-1.3.0/src/animus_forge/providers/azure_openai_provider.py +371 -0
- animus_forge-1.3.0/src/animus_forge/providers/base.py +385 -0
- animus_forge-1.3.0/src/animus_forge/providers/bedrock_provider.py +408 -0
- animus_forge-1.3.0/src/animus_forge/providers/hardware.py +206 -0
- animus_forge-1.3.0/src/animus_forge/providers/manager.py +444 -0
- animus_forge-1.3.0/src/animus_forge/providers/mock_provider.py +123 -0
- animus_forge-1.3.0/src/animus_forge/providers/ollama_provider.py +518 -0
- animus_forge-1.3.0/src/animus_forge/providers/openai_provider.py +279 -0
- animus_forge-1.3.0/src/animus_forge/providers/router.py +374 -0
- animus_forge-1.3.0/src/animus_forge/providers/vertex_provider.py +425 -0
- animus_forge-1.3.0/src/animus_forge/ratelimit/__init__.py +42 -0
- animus_forge-1.3.0/src/animus_forge/ratelimit/limiter.py +358 -0
- animus_forge-1.3.0/src/animus_forge/ratelimit/provider.py +353 -0
- animus_forge-1.3.0/src/animus_forge/ratelimit/quota.py +324 -0
- animus_forge-1.3.0/src/animus_forge/resilience/__init__.py +51 -0
- animus_forge-1.3.0/src/animus_forge/resilience/bulkhead.py +343 -0
- animus_forge-1.3.0/src/animus_forge/resilience/concurrency.py +345 -0
- animus_forge-1.3.0/src/animus_forge/resilience/fallback.py +376 -0
- animus_forge-1.3.0/src/animus_forge/scheduler/__init__.py +21 -0
- animus_forge-1.3.0/src/animus_forge/scheduler/schedule_manager.py +579 -0
- animus_forge-1.3.0/src/animus_forge/security/__init__.py +43 -0
- animus_forge-1.3.0/src/animus_forge/security/audit_log.py +190 -0
- animus_forge-1.3.0/src/animus_forge/security/brute_force.py +366 -0
- animus_forge-1.3.0/src/animus_forge/security/field_encryption.py +126 -0
- animus_forge-1.3.0/src/animus_forge/security/request_limits.py +155 -0
- animus_forge-1.3.0/src/animus_forge/self_improve/__init__.py +43 -0
- animus_forge-1.3.0/src/animus_forge/self_improve/analyzer.py +475 -0
- animus_forge-1.3.0/src/animus_forge/self_improve/approval.py +395 -0
- animus_forge-1.3.0/src/animus_forge/self_improve/orchestrator.py +564 -0
- animus_forge-1.3.0/src/animus_forge/self_improve/pr_manager.py +448 -0
- animus_forge-1.3.0/src/animus_forge/self_improve/rollback.py +277 -0
- animus_forge-1.3.0/src/animus_forge/self_improve/safety.py +291 -0
- animus_forge-1.3.0/src/animus_forge/self_improve/sandbox.py +333 -0
- animus_forge-1.3.0/src/animus_forge/settings/__init__.py +14 -0
- animus_forge-1.3.0/src/animus_forge/settings/manager.py +327 -0
- animus_forge-1.3.0/src/animus_forge/settings/models.py +62 -0
- animus_forge-1.3.0/src/animus_forge/skills/__init__.py +91 -0
- animus_forge-1.3.0/src/animus_forge/skills/consensus.py +292 -0
- animus_forge-1.3.0/src/animus_forge/skills/enforcer.py +169 -0
- animus_forge-1.3.0/src/animus_forge/skills/evolver/__init__.py +37 -0
- animus_forge-1.3.0/src/animus_forge/skills/evolver/ab_test.py +278 -0
- animus_forge-1.3.0/src/animus_forge/skills/evolver/analyzer.py +209 -0
- animus_forge-1.3.0/src/animus_forge/skills/evolver/deprecator.py +211 -0
- animus_forge-1.3.0/src/animus_forge/skills/evolver/evolver.py +298 -0
- animus_forge-1.3.0/src/animus_forge/skills/evolver/generator.py +124 -0
- animus_forge-1.3.0/src/animus_forge/skills/evolver/metrics.py +337 -0
- animus_forge-1.3.0/src/animus_forge/skills/evolver/models.py +106 -0
- animus_forge-1.3.0/src/animus_forge/skills/evolver/tuner.py +206 -0
- animus_forge-1.3.0/src/animus_forge/skills/evolver/versioner.py +146 -0
- animus_forge-1.3.0/src/animus_forge/skills/evolver/writer.py +177 -0
- animus_forge-1.3.0/src/animus_forge/skills/library.py +250 -0
- animus_forge-1.3.0/src/animus_forge/skills/loader.py +217 -0
- animus_forge-1.3.0/src/animus_forge/skills/models.py +159 -0
- animus_forge-1.3.0/src/animus_forge/state/__init__.py +54 -0
- animus_forge-1.3.0/src/animus_forge/state/agent_context.py +455 -0
- animus_forge-1.3.0/src/animus_forge/state/agent_memory.py +437 -0
- animus_forge-1.3.0/src/animus_forge/state/backends.py +312 -0
- animus_forge-1.3.0/src/animus_forge/state/checkpoint.py +285 -0
- animus_forge-1.3.0/src/animus_forge/state/context_window.py +411 -0
- animus_forge-1.3.0/src/animus_forge/state/database.py +30 -0
- animus_forge-1.3.0/src/animus_forge/state/memory.py +22 -0
- animus_forge-1.3.0/src/animus_forge/state/memory_models.py +120 -0
- animus_forge-1.3.0/src/animus_forge/state/migrations.py +170 -0
- animus_forge-1.3.0/src/animus_forge/state/persistence.py +428 -0
- animus_forge-1.3.0/src/animus_forge/tools/__init__.py +26 -0
- animus_forge-1.3.0/src/animus_forge/tools/filesystem.py +376 -0
- animus_forge-1.3.0/src/animus_forge/tools/models.py +133 -0
- animus_forge-1.3.0/src/animus_forge/tools/proposals.py +315 -0
- animus_forge-1.3.0/src/animus_forge/tools/safety.py +264 -0
- animus_forge-1.3.0/src/animus_forge/tracing/__init__.py +65 -0
- animus_forge-1.3.0/src/animus_forge/tracing/context.py +337 -0
- animus_forge-1.3.0/src/animus_forge/tracing/export.py +412 -0
- animus_forge-1.3.0/src/animus_forge/tracing/middleware.py +233 -0
- animus_forge-1.3.0/src/animus_forge/tracing/propagation.py +237 -0
- animus_forge-1.3.0/src/animus_forge/tui/__init__.py +5 -0
- animus_forge-1.3.0/src/animus_forge/tui/app.py +317 -0
- animus_forge-1.3.0/src/animus_forge/tui/chat_screen.py +46 -0
- animus_forge-1.3.0/src/animus_forge/tui/commands.py +413 -0
- animus_forge-1.3.0/src/animus_forge/tui/providers.py +73 -0
- animus_forge-1.3.0/src/animus_forge/tui/session.py +144 -0
- animus_forge-1.3.0/src/animus_forge/tui/streaming.py +196 -0
- animus_forge-1.3.0/src/animus_forge/tui/widgets/__init__.py +8 -0
- animus_forge-1.3.0/src/animus_forge/tui/widgets/chat_display.py +102 -0
- animus_forge-1.3.0/src/animus_forge/tui/widgets/input_bar.py +65 -0
- animus_forge-1.3.0/src/animus_forge/tui/widgets/sidebar.py +122 -0
- animus_forge-1.3.0/src/animus_forge/tui/widgets/status_bar.py +34 -0
- animus_forge-1.3.0/src/animus_forge/utils/__init__.py +45 -0
- animus_forge-1.3.0/src/animus_forge/utils/circuit_breaker.py +333 -0
- animus_forge-1.3.0/src/animus_forge/utils/retry.py +479 -0
- animus_forge-1.3.0/src/animus_forge/utils/validation.py +433 -0
- animus_forge-1.3.0/src/animus_forge/webhooks/__init__.py +33 -0
- animus_forge-1.3.0/src/animus_forge/webhooks/webhook_delivery.py +821 -0
- animus_forge-1.3.0/src/animus_forge/webhooks/webhook_manager.py +501 -0
- animus_forge-1.3.0/src/animus_forge/websocket/__init__.py +35 -0
- animus_forge-1.3.0/src/animus_forge/websocket/broadcaster.py +266 -0
- animus_forge-1.3.0/src/animus_forge/websocket/manager.py +286 -0
- animus_forge-1.3.0/src/animus_forge/websocket/messages.py +121 -0
- animus_forge-1.3.0/src/animus_forge/workflow/__init__.py +115 -0
- animus_forge-1.3.0/src/animus_forge/workflow/approval_store.py +204 -0
- animus_forge-1.3.0/src/animus_forge/workflow/arete_hooks.py +202 -0
- animus_forge-1.3.0/src/animus_forge/workflow/auto_parallel.py +277 -0
- animus_forge-1.3.0/src/animus_forge/workflow/composer.py +340 -0
- animus_forge-1.3.0/src/animus_forge/workflow/distributed_rate_limiter.py +425 -0
- animus_forge-1.3.0/src/animus_forge/workflow/executor.py +58 -0
- animus_forge-1.3.0/src/animus_forge/workflow/executor_ai.py +294 -0
- animus_forge-1.3.0/src/animus_forge/workflow/executor_approval.py +70 -0
- animus_forge-1.3.0/src/animus_forge/workflow/executor_arete.py +236 -0
- animus_forge-1.3.0/src/animus_forge/workflow/executor_clients.py +116 -0
- animus_forge-1.3.0/src/animus_forge/workflow/executor_core.py +700 -0
- animus_forge-1.3.0/src/animus_forge/workflow/executor_error.py +134 -0
- animus_forge-1.3.0/src/animus_forge/workflow/executor_integrations.py +856 -0
- animus_forge-1.3.0/src/animus_forge/workflow/executor_mcp.py +169 -0
- animus_forge-1.3.0/src/animus_forge/workflow/executor_parallel_exec.py +353 -0
- animus_forge-1.3.0/src/animus_forge/workflow/executor_patterns.py +720 -0
- animus_forge-1.3.0/src/animus_forge/workflow/executor_results.py +77 -0
- animus_forge-1.3.0/src/animus_forge/workflow/executor_step.py +289 -0
- animus_forge-1.3.0/src/animus_forge/workflow/graph_executor.py +617 -0
- animus_forge-1.3.0/src/animus_forge/workflow/graph_models.py +176 -0
- animus_forge-1.3.0/src/animus_forge/workflow/graph_walker.py +395 -0
- animus_forge-1.3.0/src/animus_forge/workflow/loader.py +580 -0
- animus_forge-1.3.0/src/animus_forge/workflow/parallel.py +639 -0
- animus_forge-1.3.0/src/animus_forge/workflow/rate_limited_executor.py +696 -0
- animus_forge-1.3.0/src/animus_forge/workflow/scheduler.py +477 -0
- animus_forge-1.3.0/src/animus_forge/workflow/version_manager.py +618 -0
- animus_forge-1.3.0/src/animus_forge/workflow/versioning.py +286 -0
- animus_forge-1.3.0/src/animus_forge.egg-info/PKG-INFO +124 -0
- animus_forge-1.3.0/src/animus_forge.egg-info/SOURCES.txt +496 -0
- animus_forge-1.3.0/src/animus_forge.egg-info/dependency_links.txt +1 -0
- animus_forge-1.3.0/src/animus_forge.egg-info/entry_points.txt +2 -0
- animus_forge-1.3.0/src/animus_forge.egg-info/requires.txt +55 -0
- animus_forge-1.3.0/src/animus_forge.egg-info/top_level.txt +1 -0
- animus_forge-1.3.0/tests/test_agent_context.py +421 -0
- animus_forge-1.3.0/tests/test_agents.py +120 -0
- animus_forge-1.3.0/tests/test_agents_clients_coverage.py +1110 -0
- animus_forge-1.3.0/tests/test_analytics.py +729 -0
- animus_forge-1.3.0/tests/test_analytics_pipeline.py +900 -0
- animus_forge-1.3.0/tests/test_api.py +1037 -0
- animus_forge-1.3.0/tests/test_api_clients.py +556 -0
- animus_forge-1.3.0/tests/test_api_coverage.py +542 -0
- animus_forge-1.3.0/tests/test_api_errors.py +480 -0
- animus_forge-1.3.0/tests/test_api_history.py +273 -0
- animus_forge-1.3.0/tests/test_api_mcp.py +347 -0
- animus_forge-1.3.0/tests/test_api_routes_coverage.py +1487 -0
- animus_forge-1.3.0/tests/test_approval_persistence.py +399 -0
- animus_forge-1.3.0/tests/test_approval_store.py +346 -0
- animus_forge-1.3.0/tests/test_arete_hooks.py +245 -0
- animus_forge-1.3.0/tests/test_async_execution.py +669 -0
- animus_forge-1.3.0/tests/test_async_retry.py +251 -0
- animus_forge-1.3.0/tests/test_auth.py +246 -0
- animus_forge-1.3.0/tests/test_backends.py +362 -0
- animus_forge-1.3.0/tests/test_benchmarks.py +294 -0
- animus_forge-1.3.0/tests/test_browser_automation.py +1449 -0
- animus_forge-1.3.0/tests/test_budget.py +307 -0
- animus_forge-1.3.0/tests/test_budget_integration.py +282 -0
- animus_forge-1.3.0/tests/test_budget_passthrough.py +561 -0
- animus_forge-1.3.0/tests/test_cache.py +676 -0
- animus_forge-1.3.0/tests/test_cache_coverage.py +209 -0
- animus_forge-1.3.0/tests/test_checkpoint_resume_e2e.py +275 -0
- animus_forge-1.3.0/tests/test_circuit_breaker.py +515 -0
- animus_forge-1.3.0/tests/test_claude_code_client.py +241 -0
- animus_forge-1.3.0/tests/test_cli.py +1074 -0
- animus_forge-1.3.0/tests/test_cli_commands_coverage.py +367 -0
- animus_forge-1.3.0/tests/test_cli_coverage.py +243 -0
- animus_forge-1.3.0/tests/test_cli_history.py +194 -0
- animus_forge-1.3.0/tests/test_cli_mcp.py +350 -0
- animus_forge-1.3.0/tests/test_collectors.py +359 -0
- animus_forge-1.3.0/tests/test_concurrency_chaos.py +516 -0
- animus_forge-1.3.0/tests/test_config_settings.py +606 -0
- animus_forge-1.3.0/tests/test_config_yaml.py +366 -0
- animus_forge-1.3.0/tests/test_consensus.py +905 -0
- animus_forge-1.3.0/tests/test_contracts.py +319 -0
- animus_forge-1.3.0/tests/test_convergence_integration.py +527 -0
- animus_forge-1.3.0/tests/test_coordination_phase4.py +672 -0
- animus_forge-1.3.0/tests/test_cost_dashboard.py +312 -0
- animus_forge-1.3.0/tests/test_cost_intelligence.py +945 -0
- animus_forge-1.3.0/tests/test_cost_tracker.py +360 -0
- animus_forge-1.3.0/tests/test_coverage_push_90.py +5056 -0
- animus_forge-1.3.0/tests/test_coverage_push_93.py +1991 -0
- animus_forge-1.3.0/tests/test_coverage_push_95.py +8545 -0
- animus_forge-1.3.0/tests/test_coverage_push_97.py +7090 -0
- animus_forge-1.3.0/tests/test_dashboard.py +605 -0
- animus_forge-1.3.0/tests/test_dashboard_cli_coverage.py +1336 -0
- animus_forge-1.3.0/tests/test_dashboard_mcp.py +543 -0
- animus_forge-1.3.0/tests/test_dashboard_parallel.py +154 -0
- animus_forge-1.3.0/tests/test_database.py +276 -0
- animus_forge-1.3.0/tests/test_db.py +534 -0
- animus_forge-1.3.0/tests/test_debt_monitor.py +424 -0
- animus_forge-1.3.0/tests/test_dev_live.py +122 -0
- animus_forge-1.3.0/tests/test_distributed_rate_limiter.py +407 -0
- animus_forge-1.3.0/tests/test_dominance_features.py +602 -0
- animus_forge-1.3.0/tests/test_error_recovery.py +476 -0
- animus_forge-1.3.0/tests/test_eval_benchmark.py +754 -0
- animus_forge-1.3.0/tests/test_evaluation.py +2027 -0
- animus_forge-1.3.0/tests/test_execution_stream.py +246 -0
- animus_forge-1.3.0/tests/test_executions.py +578 -0
- animus_forge-1.3.0/tests/test_executor_approval.py +443 -0
- animus_forge-1.3.0/tests/test_executor_arete.py +471 -0
- animus_forge-1.3.0/tests/test_executor_clients.py +86 -0
- animus_forge-1.3.0/tests/test_executor_coverage.py +683 -0
- animus_forge-1.3.0/tests/test_executor_coverage_ext.py +2433 -0
- animus_forge-1.3.0/tests/test_executor_history.py +116 -0
- animus_forge-1.3.0/tests/test_executor_ollama.py +260 -0
- animus_forge-1.3.0/tests/test_executor_parallel.py +1577 -0
- animus_forge-1.3.0/tests/test_executor_streaming.py +238 -0
- animus_forge-1.3.0/tests/test_feedback_engine.py +1089 -0
- animus_forge-1.3.0/tests/test_filesystem_tools.py +465 -0
- animus_forge-1.3.0/tests/test_gmail_client.py +94 -0
- animus_forge-1.3.0/tests/test_graph_api.py +566 -0
- animus_forge-1.3.0/tests/test_graph_executor.py +627 -0
- animus_forge-1.3.0/tests/test_graph_models.py +572 -0
- animus_forge-1.3.0/tests/test_graph_walker.py +609 -0
- animus_forge-1.3.0/tests/test_hardware.py +291 -0
- animus_forge-1.3.0/tests/test_http_client.py +225 -0
- animus_forge-1.3.0/tests/test_integration_v120.py +550 -0
- animus_forge-1.3.0/tests/test_intelligence.py +542 -0
- animus_forge-1.3.0/tests/test_interactive_runner.py +284 -0
- animus_forge-1.3.0/tests/test_job_manager.py +307 -0
- animus_forge-1.3.0/tests/test_limiter_coverage.py +135 -0
- animus_forge-1.3.0/tests/test_llm_router.py +667 -0
- animus_forge-1.3.0/tests/test_loader_coverage.py +201 -0
- animus_forge-1.3.0/tests/test_logging_config.py +525 -0
- animus_forge-1.3.0/tests/test_mcp.py +859 -0
- animus_forge-1.3.0/tests/test_mcp_client.py +347 -0
- animus_forge-1.3.0/tests/test_mcp_executor.py +457 -0
- animus_forge-1.3.0/tests/test_memory.py +550 -0
- animus_forge-1.3.0/tests/test_messaging.py +2173 -0
- animus_forge-1.3.0/tests/test_metrics.py +906 -0
- animus_forge-1.3.0/tests/test_metrics_collector.py +644 -0
- animus_forge-1.3.0/tests/test_migrations.py +267 -0
- animus_forge-1.3.0/tests/test_monitoring.py +777 -0
- animus_forge-1.3.0/tests/test_monitoring_coverage.py +1926 -0
- animus_forge-1.3.0/tests/test_monitoring_pages.py +1619 -0
- animus_forge-1.3.0/tests/test_notifications.py +469 -0
- animus_forge-1.3.0/tests/test_notifier_channels.py +368 -0
- animus_forge-1.3.0/tests/test_notion_client.py +515 -0
- animus_forge-1.3.0/tests/test_openai_client.py +155 -0
- animus_forge-1.3.0/tests/test_parallel.py +264 -0
- animus_forge-1.3.0/tests/test_parallel_agents.py +979 -0
- animus_forge-1.3.0/tests/test_parallel_coverage.py +0 -0
- animus_forge-1.3.0/tests/test_parallel_e2e.py +651 -0
- animus_forge-1.3.0/tests/test_parallel_enhancements.py +1528 -0
- animus_forge-1.3.0/tests/test_parallel_executor.py +590 -0
- animus_forge-1.3.0/tests/test_parallel_tracker.py +773 -0
- animus_forge-1.3.0/tests/test_phase5_integration.py +314 -0
- animus_forge-1.3.0/tests/test_pipeline_integration.py +383 -0
- animus_forge-1.3.0/tests/test_plugin_installer.py +1039 -0
- animus_forge-1.3.0/tests/test_plugin_marketplace.py +459 -0
- animus_forge-1.3.0/tests/test_plugins.py +702 -0
- animus_forge-1.3.0/tests/test_preflight.py +284 -0
- animus_forge-1.3.0/tests/test_prometheus_server.py +254 -0
- animus_forge-1.3.0/tests/test_proposals.py +343 -0
- animus_forge-1.3.0/tests/test_provider_coverage.py +377 -0
- animus_forge-1.3.0/tests/test_provider_coverage_ext.py +2331 -0
- animus_forge-1.3.0/tests/test_providers.py +846 -0
- animus_forge-1.3.0/tests/test_quota_coverage.py +266 -0
- animus_forge-1.3.0/tests/test_rate_limited_executor_coverage.py +318 -0
- animus_forge-1.3.0/tests/test_rate_limiter.py +399 -0
- animus_forge-1.3.0/tests/test_ratelimit.py +406 -0
- animus_forge-1.3.0/tests/test_resilience.py +535 -0
- animus_forge-1.3.0/tests/test_resilience_coverage.py +122 -0
- animus_forge-1.3.0/tests/test_retry.py +333 -0
- animus_forge-1.3.0/tests/test_rich_output.py +258 -0
- animus_forge-1.3.0/tests/test_schedule_manager.py +386 -0
- animus_forge-1.3.0/tests/test_schedule_manager_coverage.py +359 -0
- animus_forge-1.3.0/tests/test_scheduler_coverage.py +384 -0
- animus_forge-1.3.0/tests/test_security.py +362 -0
- animus_forge-1.3.0/tests/test_self_improve.py +310 -0
- animus_forge-1.3.0/tests/test_self_improve_cli.py +178 -0
- animus_forge-1.3.0/tests/test_self_improve_coverage.py +2985 -0
- animus_forge-1.3.0/tests/test_self_improve_engine.py +673 -0
- animus_forge-1.3.0/tests/test_self_improve_ollama_integration.py +585 -0
- animus_forge-1.3.0/tests/test_settings_manager.py +673 -0
- animus_forge-1.3.0/tests/test_skill_enforcer.py +163 -0
- animus_forge-1.3.0/tests/test_skill_evolver_ab_test.py +288 -0
- animus_forge-1.3.0/tests/test_skill_evolver_analyzer.py +224 -0
- animus_forge-1.3.0/tests/test_skill_evolver_deprecator.py +141 -0
- animus_forge-1.3.0/tests/test_skill_evolver_generator.py +112 -0
- animus_forge-1.3.0/tests/test_skill_evolver_integration.py +351 -0
- animus_forge-1.3.0/tests/test_skill_evolver_metrics.py +254 -0
- animus_forge-1.3.0/tests/test_skill_evolver_models.py +175 -0
- animus_forge-1.3.0/tests/test_skill_evolver_tuner.py +178 -0
- animus_forge-1.3.0/tests/test_skill_evolver_versioner.py +120 -0
- animus_forge-1.3.0/tests/test_skill_evolver_writer.py +146 -0
- animus_forge-1.3.0/tests/test_skills.py +949 -0
- animus_forge-1.3.0/tests/test_skills_library_routing.py +371 -0
- animus_forge-1.3.0/tests/test_skills_loader_v2.py +391 -0
- animus_forge-1.3.0/tests/test_skills_models_v2.py +258 -0
- animus_forge-1.3.0/tests/test_slack_client.py +295 -0
- animus_forge-1.3.0/tests/test_state.py +566 -0
- animus_forge-1.3.0/tests/test_supervisor_budget.py +185 -0
- animus_forge-1.3.0/tests/test_supervisor_skills.py +152 -0
- animus_forge-1.3.0/tests/test_template_manager.py +780 -0
- animus_forge-1.3.0/tests/test_tenants.py +344 -0
- animus_forge-1.3.0/tests/test_tracing.py +846 -0
- animus_forge-1.3.0/tests/test_tracing_export.py +333 -0
- animus_forge-1.3.0/tests/test_tracker.py +609 -0
- animus_forge-1.3.0/tests/test_tui_commands.py +887 -0
- animus_forge-1.3.0/tests/test_tui_widgets.py +1427 -0
- animus_forge-1.3.0/tests/test_utils_coverage.py +650 -0
- animus_forge-1.3.0/tests/test_validation.py +493 -0
- animus_forge-1.3.0/tests/test_validator_coverage.py +207 -0
- animus_forge-1.3.0/tests/test_visualizers.py +452 -0
- animus_forge-1.3.0/tests/test_webhook_coverage.py +564 -0
- animus_forge-1.3.0/tests/test_webhook_delivery.py +368 -0
- animus_forge-1.3.0/tests/test_webhook_delivery_enhanced.py +548 -0
- animus_forge-1.3.0/tests/test_webhook_manager.py +383 -0
- animus_forge-1.3.0/tests/test_webhook_manager_coverage.py +299 -0
- animus_forge-1.3.0/tests/test_websocket.py +635 -0
- animus_forge-1.3.0/tests/test_workflow.py +472 -0
- animus_forge-1.3.0/tests/test_workflow_composer.py +542 -0
- animus_forge-1.3.0/tests/test_workflow_e2e.py +701 -0
- animus_forge-1.3.0/tests/test_workflow_engine.py +1088 -0
- animus_forge-1.3.0/tests/test_workflow_scheduler.py +905 -0
- animus_forge-1.3.0/tests/test_workflow_serializer.py +581 -0
- animus_forge-1.3.0/tests/test_workflow_versioning.py +727 -0
- animus_forge-1.3.0/tests/test_workflow_visualizer.py +663 -0
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: animus-forge
|
|
3
|
+
Version: 1.3.0
|
|
4
|
+
Summary: Multi-agent orchestration framework for production AI workflows
|
|
5
|
+
Author-email: AreteDriver <aretedriver@gmail.com>
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/AreteDriver/animus
|
|
8
|
+
Project-URL: Repository, https://github.com/AreteDriver/animus
|
|
9
|
+
Keywords: multi-agent,ai,orchestration,workflow
|
|
10
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
11
|
+
Classifier: Intended Audience :: Developers
|
|
12
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
13
|
+
Classifier: Programming Language :: Python :: 3
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
16
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
17
|
+
Requires-Python: >=3.12
|
|
18
|
+
Description-Content-Type: text/markdown
|
|
19
|
+
Requires-Dist: openai<3,>=2.15.0
|
|
20
|
+
Requires-Dist: anthropic<1,>=0.79.0
|
|
21
|
+
Requires-Dist: fastapi<1,>=0.128.0
|
|
22
|
+
Requires-Dist: uvicorn<1,>=0.40.0
|
|
23
|
+
Requires-Dist: streamlit<2,>=1.53.0
|
|
24
|
+
Requires-Dist: google-auth<3,>=2.35.0
|
|
25
|
+
Requires-Dist: google-auth-oauthlib<2,>=1.2.0
|
|
26
|
+
Requires-Dist: google-auth-httplib2<1,>=0.3.0
|
|
27
|
+
Requires-Dist: google-api-python-client<3,>=2.150.0
|
|
28
|
+
Requires-Dist: notion-client<4,>=3.0.0
|
|
29
|
+
Requires-Dist: PyGithub<3,>=2.4.0
|
|
30
|
+
Requires-Dist: pydantic<3,>=2.12.0
|
|
31
|
+
Requires-Dist: pydantic-settings<3,>=2.13.0
|
|
32
|
+
Requires-Dist: python-dotenv<2,>=1.0.0
|
|
33
|
+
Requires-Dist: aiofiles<26,>=25.1.0
|
|
34
|
+
Requires-Dist: apscheduler<4,>=3.11.0
|
|
35
|
+
Requires-Dist: urllib3<3,>=2.6.0
|
|
36
|
+
Requires-Dist: pynacl<2,>=1.6.0
|
|
37
|
+
Requires-Dist: pyasn1<1,>=0.6.1
|
|
38
|
+
Requires-Dist: typer<1,>=0.23.0
|
|
39
|
+
Requires-Dist: rich<15,>=14.0.0
|
|
40
|
+
Requires-Dist: pyyaml<7,>=6.0.0
|
|
41
|
+
Requires-Dist: jsonschema<5,>=4.23.0
|
|
42
|
+
Requires-Dist: slowapi<1,>=0.1.9
|
|
43
|
+
Requires-Dist: bcrypt<6,>=5.0.0
|
|
44
|
+
Requires-Dist: cryptography<47,>=46.0.5
|
|
45
|
+
Requires-Dist: textual<9,>=8.0.0
|
|
46
|
+
Requires-Dist: convergentai<2,>=1.1.0
|
|
47
|
+
Provides-Extra: postgres
|
|
48
|
+
Requires-Dist: psycopg2-binary>=2.9.0; extra == "postgres"
|
|
49
|
+
Provides-Extra: mcp
|
|
50
|
+
Requires-Dist: mcp>=1.0.0; extra == "mcp"
|
|
51
|
+
Provides-Extra: messaging
|
|
52
|
+
Requires-Dist: python-telegram-bot>=22.0; extra == "messaging"
|
|
53
|
+
Requires-Dist: discord-py>=2.3.0; extra == "messaging"
|
|
54
|
+
Provides-Extra: browser
|
|
55
|
+
Requires-Dist: playwright>=1.40.0; extra == "browser"
|
|
56
|
+
Provides-Extra: local
|
|
57
|
+
Requires-Dist: httpx>=0.28.0; extra == "local"
|
|
58
|
+
Requires-Dist: psutil>=7.0.0; extra == "local"
|
|
59
|
+
Provides-Extra: all
|
|
60
|
+
Requires-Dist: animus-forge[browser,local,mcp,messaging,postgres]; extra == "all"
|
|
61
|
+
Provides-Extra: dev
|
|
62
|
+
Requires-Dist: pytest>=9.0.2; extra == "dev"
|
|
63
|
+
Requires-Dist: pytest-cov>=7.0.0; extra == "dev"
|
|
64
|
+
Requires-Dist: pytest-asyncio>=1.3.0; extra == "dev"
|
|
65
|
+
Requires-Dist: pytest-benchmark>=4.0.0; extra == "dev"
|
|
66
|
+
Requires-Dist: ruff>=0.15.1; extra == "dev"
|
|
67
|
+
|
|
68
|
+
# Animus Forge
|
|
69
|
+
|
|
70
|
+
Multi-agent orchestration framework for production AI workflows.
|
|
71
|
+
|
|
72
|
+
## Features
|
|
73
|
+
|
|
74
|
+
- **Workflow executor** — YAML-defined multi-agent pipelines with mixins (AI, MCP, queue, graph)
|
|
75
|
+
- **Provider abstraction** — Anthropic, OpenAI, Ollama, and more
|
|
76
|
+
- **Self-improvement** — Analyze codebase, generate improvements, test in sandbox, create PRs
|
|
77
|
+
- **Budget management** — Persistent token/cost tracking per workflow
|
|
78
|
+
- **Eval framework** — Benchmark and score agent outputs
|
|
79
|
+
- **MCP tool execution** — Bridge to Model Context Protocol servers
|
|
80
|
+
- **CLI + API + TUI** — Multiple interfaces for workflow management
|
|
81
|
+
|
|
82
|
+
## Install
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
pip install animus-forge
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
## Quick Start
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
# Run a workflow
|
|
92
|
+
gorgon run workflows/examples/build_task.yaml
|
|
93
|
+
|
|
94
|
+
# Self-improve a codebase
|
|
95
|
+
gorgon self-improve run --provider ollama --path /my/project
|
|
96
|
+
|
|
97
|
+
# Analyze without making changes
|
|
98
|
+
gorgon self-improve analyze --focus security
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
## Self-Improvement Pipeline
|
|
102
|
+
|
|
103
|
+
The self-improve orchestrator runs a 10-stage workflow:
|
|
104
|
+
|
|
105
|
+
1. **Analyze** — Static analysis identifies improvement opportunities
|
|
106
|
+
2. **Plan** — AI generates an improvement plan from suggestions
|
|
107
|
+
3. **Safety check** — Validates against protected files and change limits
|
|
108
|
+
4. **Snapshot** — Creates rollback point before any changes
|
|
109
|
+
5. **Implement** — AI generates code changes
|
|
110
|
+
6. **Sandbox test** — Applies changes to temp copy, runs tests and lint
|
|
111
|
+
7. **Apply** — Writes changes to the actual codebase
|
|
112
|
+
8. **Create PR** — Creates a branch and pull request
|
|
113
|
+
9. **Human approval** — Waits for merge approval (skippable with `--auto-approve`)
|
|
114
|
+
10. **Rollback** — Automatic rollback if tests fail at any stage
|
|
115
|
+
|
|
116
|
+
## Part of the Animus Monorepo
|
|
117
|
+
|
|
118
|
+
- [Animus Core](https://pypi.org/project/animus-core/) — exocortex engine
|
|
119
|
+
- [Animus Quorum](https://pypi.org/project/convergentAI/) — coordination protocol
|
|
120
|
+
- [Animus Bootstrap](https://github.com/AreteDriver/animus/tree/main/packages/bootstrap) — system daemon
|
|
121
|
+
|
|
122
|
+
## License
|
|
123
|
+
|
|
124
|
+
MIT
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# Animus Forge
|
|
2
|
+
|
|
3
|
+
Multi-agent orchestration framework for production AI workflows.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- **Workflow executor** — YAML-defined multi-agent pipelines with mixins (AI, MCP, queue, graph)
|
|
8
|
+
- **Provider abstraction** — Anthropic, OpenAI, Ollama, and more
|
|
9
|
+
- **Self-improvement** — Analyze codebase, generate improvements, test in sandbox, create PRs
|
|
10
|
+
- **Budget management** — Persistent token/cost tracking per workflow
|
|
11
|
+
- **Eval framework** — Benchmark and score agent outputs
|
|
12
|
+
- **MCP tool execution** — Bridge to Model Context Protocol servers
|
|
13
|
+
- **CLI + API + TUI** — Multiple interfaces for workflow management
|
|
14
|
+
|
|
15
|
+
## Install
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
pip install animus-forge
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Quick Start
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
# Run a workflow
|
|
25
|
+
gorgon run workflows/examples/build_task.yaml
|
|
26
|
+
|
|
27
|
+
# Self-improve a codebase
|
|
28
|
+
gorgon self-improve run --provider ollama --path /my/project
|
|
29
|
+
|
|
30
|
+
# Analyze without making changes
|
|
31
|
+
gorgon self-improve analyze --focus security
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Self-Improvement Pipeline
|
|
35
|
+
|
|
36
|
+
The self-improve orchestrator runs a 10-stage workflow:
|
|
37
|
+
|
|
38
|
+
1. **Analyze** — Static analysis identifies improvement opportunities
|
|
39
|
+
2. **Plan** — AI generates an improvement plan from suggestions
|
|
40
|
+
3. **Safety check** — Validates against protected files and change limits
|
|
41
|
+
4. **Snapshot** — Creates rollback point before any changes
|
|
42
|
+
5. **Implement** — AI generates code changes
|
|
43
|
+
6. **Sandbox test** — Applies changes to temp copy, runs tests and lint
|
|
44
|
+
7. **Apply** — Writes changes to the actual codebase
|
|
45
|
+
8. **Create PR** — Creates a branch and pull request
|
|
46
|
+
9. **Human approval** — Waits for merge approval (skippable with `--auto-approve`)
|
|
47
|
+
10. **Rollback** — Automatic rollback if tests fail at any stage
|
|
48
|
+
|
|
49
|
+
## Part of the Animus Monorepo
|
|
50
|
+
|
|
51
|
+
- [Animus Core](https://pypi.org/project/animus-core/) — exocortex engine
|
|
52
|
+
- [Animus Quorum](https://pypi.org/project/convergentAI/) — coordination protocol
|
|
53
|
+
- [Animus Bootstrap](https://github.com/AreteDriver/animus/tree/main/packages/bootstrap) — system daemon
|
|
54
|
+
|
|
55
|
+
## License
|
|
56
|
+
|
|
57
|
+
MIT
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=68.0"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "animus-forge"
|
|
7
|
+
version = "1.3.0"
|
|
8
|
+
description = "Multi-agent orchestration framework for production AI workflows"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
license = {text = "MIT"}
|
|
11
|
+
requires-python = ">=3.12"
|
|
12
|
+
authors = [
|
|
13
|
+
{name = "AreteDriver", email = "aretedriver@gmail.com"}
|
|
14
|
+
]
|
|
15
|
+
keywords = ["multi-agent", "ai", "orchestration", "workflow"]
|
|
16
|
+
classifiers = [
|
|
17
|
+
"Development Status :: 5 - Production/Stable",
|
|
18
|
+
"Intended Audience :: Developers",
|
|
19
|
+
"License :: OSI Approved :: MIT License",
|
|
20
|
+
"Programming Language :: Python :: 3",
|
|
21
|
+
"Programming Language :: Python :: 3.12",
|
|
22
|
+
"Programming Language :: Python :: 3.13",
|
|
23
|
+
"Topic :: Scientific/Engineering :: Artificial Intelligence",
|
|
24
|
+
]
|
|
25
|
+
|
|
26
|
+
dependencies = [
|
|
27
|
+
"openai>=2.15.0,<3",
|
|
28
|
+
"anthropic>=0.79.0,<1",
|
|
29
|
+
"fastapi>=0.128.0,<1",
|
|
30
|
+
"uvicorn>=0.40.0,<1",
|
|
31
|
+
"streamlit>=1.53.0,<2",
|
|
32
|
+
"google-auth>=2.35.0,<3",
|
|
33
|
+
"google-auth-oauthlib>=1.2.0,<2",
|
|
34
|
+
"google-auth-httplib2>=0.3.0,<1",
|
|
35
|
+
"google-api-python-client>=2.150.0,<3",
|
|
36
|
+
"notion-client>=3.0.0,<4",
|
|
37
|
+
"PyGithub>=2.4.0,<3",
|
|
38
|
+
"pydantic>=2.12.0,<3",
|
|
39
|
+
"pydantic-settings>=2.13.0,<3",
|
|
40
|
+
"python-dotenv>=1.0.0,<2",
|
|
41
|
+
"aiofiles>=25.1.0,<26",
|
|
42
|
+
"apscheduler>=3.11.0,<4",
|
|
43
|
+
"urllib3>=2.6.0,<3",
|
|
44
|
+
"pynacl>=1.6.0,<2",
|
|
45
|
+
"pyasn1>=0.6.1,<1",
|
|
46
|
+
"typer>=0.23.0,<1",
|
|
47
|
+
"rich>=14.0.0,<15",
|
|
48
|
+
"pyyaml>=6.0.0,<7",
|
|
49
|
+
"jsonschema>=4.23.0,<5",
|
|
50
|
+
"slowapi>=0.1.9,<1",
|
|
51
|
+
"bcrypt>=5.0.0,<6",
|
|
52
|
+
"cryptography>=46.0.5,<47",
|
|
53
|
+
"textual>=8.0.0,<9",
|
|
54
|
+
"convergentai>=1.1.0,<2",
|
|
55
|
+
]
|
|
56
|
+
|
|
57
|
+
[project.optional-dependencies]
|
|
58
|
+
postgres = ["psycopg2-binary>=2.9.0"]
|
|
59
|
+
mcp = ["mcp>=1.0.0"]
|
|
60
|
+
messaging = ["python-telegram-bot>=22.0", "discord-py>=2.3.0"]
|
|
61
|
+
browser = ["playwright>=1.40.0"]
|
|
62
|
+
local = ["httpx>=0.28.0", "psutil>=7.0.0"]
|
|
63
|
+
all = [
|
|
64
|
+
"animus-forge[postgres,mcp,messaging,browser,local]",
|
|
65
|
+
]
|
|
66
|
+
dev = [
|
|
67
|
+
"pytest>=9.0.2",
|
|
68
|
+
"pytest-cov>=7.0.0",
|
|
69
|
+
"pytest-asyncio>=1.3.0",
|
|
70
|
+
"pytest-benchmark>=4.0.0",
|
|
71
|
+
"ruff>=0.15.1",
|
|
72
|
+
]
|
|
73
|
+
|
|
74
|
+
[project.scripts]
|
|
75
|
+
animus-forge = "animus_forge.cli:app"
|
|
76
|
+
|
|
77
|
+
[project.urls]
|
|
78
|
+
Homepage = "https://github.com/AreteDriver/animus"
|
|
79
|
+
Repository = "https://github.com/AreteDriver/animus"
|
|
80
|
+
|
|
81
|
+
[tool.setuptools.packages.find]
|
|
82
|
+
where = ["src"]
|
|
83
|
+
|
|
84
|
+
[tool.ruff]
|
|
85
|
+
target-version = "py312"
|
|
86
|
+
line-length = 100
|
|
87
|
+
|
|
88
|
+
[tool.ruff.lint]
|
|
89
|
+
select = ["E", "F", "I", "W", "UP"]
|
|
90
|
+
ignore = ["E501", "UP042", "UP046", "UP047"] # UP042: StrEnum, UP046/UP047: PEP 695 generics
|
|
91
|
+
|
|
92
|
+
[tool.pytest.ini_options]
|
|
93
|
+
asyncio_mode = "auto"
|
|
94
|
+
asyncio_default_fixture_loop_scope = "function"
|
|
95
|
+
testpaths = ["tests"]
|
|
96
|
+
|
|
97
|
+
[tool.coverage.run]
|
|
98
|
+
source = ["src/animus_forge"]
|
|
99
|
+
omit = ["*/tests/*", "*/__main__.py", "*/tui/*", "*/dashboard/workflow_builder/*", "*/dashboard/eval_page.py", "*/dashboard/app.py", "*/dashboard/mcp_page.py", "*/dashboard/cost_dashboard.py"]
|
|
100
|
+
|
|
101
|
+
[tool.coverage.report]
|
|
102
|
+
fail_under = 97
|
|
103
|
+
show_missing = true
|
|
104
|
+
exclude_lines = [
|
|
105
|
+
"pragma: no cover",
|
|
106
|
+
"if TYPE_CHECKING:",
|
|
107
|
+
"if __name__",
|
|
108
|
+
"@abstractmethod",
|
|
109
|
+
"raise NotImplementedError",
|
|
110
|
+
]
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"""AI Workflow Orchestrator - A unified automation layer for AI-powered workflows."""
|
|
2
|
+
|
|
3
|
+
__version__ = "1.2.0"
|
|
4
|
+
|
|
5
|
+
from .auth import TokenAuth, create_access_token, verify_token
|
|
6
|
+
from .config import Settings, get_settings
|
|
7
|
+
from .jobs import (
|
|
8
|
+
Job,
|
|
9
|
+
JobManager,
|
|
10
|
+
JobStatus,
|
|
11
|
+
)
|
|
12
|
+
from .orchestrator import Workflow, WorkflowEngineAdapter, WorkflowResult, WorkflowStep
|
|
13
|
+
from .prompts import PromptTemplate, PromptTemplateManager
|
|
14
|
+
from .scheduler import (
|
|
15
|
+
CronConfig,
|
|
16
|
+
IntervalConfig,
|
|
17
|
+
ScheduleManager,
|
|
18
|
+
ScheduleStatus,
|
|
19
|
+
ScheduleType,
|
|
20
|
+
WorkflowSchedule,
|
|
21
|
+
)
|
|
22
|
+
from .webhooks import (
|
|
23
|
+
PayloadMapping,
|
|
24
|
+
Webhook,
|
|
25
|
+
WebhookManager,
|
|
26
|
+
WebhookStatus,
|
|
27
|
+
)
|
|
28
|
+
|
|
29
|
+
__all__ = [
|
|
30
|
+
"Settings",
|
|
31
|
+
"get_settings",
|
|
32
|
+
"WorkflowEngineAdapter",
|
|
33
|
+
"Workflow",
|
|
34
|
+
"WorkflowStep",
|
|
35
|
+
"WorkflowResult",
|
|
36
|
+
"PromptTemplateManager",
|
|
37
|
+
"PromptTemplate",
|
|
38
|
+
"TokenAuth",
|
|
39
|
+
"create_access_token",
|
|
40
|
+
"verify_token",
|
|
41
|
+
"ScheduleManager",
|
|
42
|
+
"WorkflowSchedule",
|
|
43
|
+
"ScheduleType",
|
|
44
|
+
"ScheduleStatus",
|
|
45
|
+
"CronConfig",
|
|
46
|
+
"IntervalConfig",
|
|
47
|
+
"WebhookManager",
|
|
48
|
+
"Webhook",
|
|
49
|
+
"WebhookStatus",
|
|
50
|
+
"PayloadMapping",
|
|
51
|
+
"JobManager",
|
|
52
|
+
"Job",
|
|
53
|
+
"JobStatus",
|
|
54
|
+
]
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"""AI Agents for autonomous task orchestration.
|
|
2
|
+
|
|
3
|
+
This module provides intelligent agents that can analyze user requests,
|
|
4
|
+
delegate to specialized sub-agents, and synthesize results.
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from .convergence import HAS_CONVERGENT, ConvergenceResult, DelegationConvergenceChecker
|
|
8
|
+
from .provider_wrapper import AgentProvider, create_agent_provider
|
|
9
|
+
from .supervisor import AgentDelegation, SupervisorAgent
|
|
10
|
+
|
|
11
|
+
__all__ = [
|
|
12
|
+
"SupervisorAgent",
|
|
13
|
+
"AgentDelegation",
|
|
14
|
+
"AgentProvider",
|
|
15
|
+
"create_agent_provider",
|
|
16
|
+
"ConvergenceResult",
|
|
17
|
+
"DelegationConvergenceChecker",
|
|
18
|
+
"HAS_CONVERGENT",
|
|
19
|
+
]
|
|
@@ -0,0 +1,303 @@
|
|
|
1
|
+
"""Adapter between Convergent's IntentResolver and Gorgon's delegation pipeline.
|
|
2
|
+
|
|
3
|
+
Optional integration — Gorgon works without Convergent installed.
|
|
4
|
+
When available, checks delegations for coherence before parallel execution:
|
|
5
|
+
overlapping tasks, conflicting agents, redundant work.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
from __future__ import annotations
|
|
9
|
+
|
|
10
|
+
import logging
|
|
11
|
+
from dataclasses import dataclass, field
|
|
12
|
+
from typing import Any
|
|
13
|
+
|
|
14
|
+
logger = logging.getLogger(__name__)
|
|
15
|
+
|
|
16
|
+
try:
|
|
17
|
+
from convergent import (
|
|
18
|
+
Intent,
|
|
19
|
+
InterfaceKind,
|
|
20
|
+
InterfaceSpec,
|
|
21
|
+
create_delegation_checker,
|
|
22
|
+
)
|
|
23
|
+
|
|
24
|
+
HAS_CONVERGENT = True
|
|
25
|
+
except ImportError:
|
|
26
|
+
HAS_CONVERGENT = False
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
@dataclass
|
|
30
|
+
class ConvergenceResult:
|
|
31
|
+
"""Result of checking delegations for coherence."""
|
|
32
|
+
|
|
33
|
+
adjustments: list[dict[str, Any]] = field(default_factory=list)
|
|
34
|
+
conflicts: list[dict[str, Any]] = field(default_factory=list)
|
|
35
|
+
dropped_agents: set[str] = field(default_factory=set)
|
|
36
|
+
|
|
37
|
+
@property
|
|
38
|
+
def has_conflicts(self) -> bool:
|
|
39
|
+
return len(self.conflicts) > 0
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
class DelegationConvergenceChecker:
|
|
43
|
+
"""Checks delegations for coherence using Convergent's IntentResolver.
|
|
44
|
+
|
|
45
|
+
No-ops gracefully when Convergent is not installed.
|
|
46
|
+
"""
|
|
47
|
+
|
|
48
|
+
def __init__(self, resolver: Any | None = None) -> None:
|
|
49
|
+
self._resolver = resolver
|
|
50
|
+
self._enabled = HAS_CONVERGENT and resolver is not None
|
|
51
|
+
|
|
52
|
+
@property
|
|
53
|
+
def enabled(self) -> bool:
|
|
54
|
+
return self._enabled
|
|
55
|
+
|
|
56
|
+
def check_delegations(self, delegations: list[dict[str, str]]) -> ConvergenceResult:
|
|
57
|
+
"""Check a list of delegations for overlap and conflicts.
|
|
58
|
+
|
|
59
|
+
Each delegation is {"agent": str, "task": str}. Publishes each as
|
|
60
|
+
an Intent, then resolves each against the graph.
|
|
61
|
+
|
|
62
|
+
Returns:
|
|
63
|
+
ConvergenceResult with any adjustments, conflicts, or agents to drop.
|
|
64
|
+
"""
|
|
65
|
+
if not self._enabled:
|
|
66
|
+
return ConvergenceResult()
|
|
67
|
+
|
|
68
|
+
result = ConvergenceResult()
|
|
69
|
+
|
|
70
|
+
# Publish all delegations as intents
|
|
71
|
+
intents: list[tuple[str, Any]] = []
|
|
72
|
+
for delegation in delegations:
|
|
73
|
+
intent = self._delegation_to_intent(delegation)
|
|
74
|
+
self._resolver.publish(intent)
|
|
75
|
+
intents.append((delegation.get("agent", "unknown"), intent))
|
|
76
|
+
|
|
77
|
+
# Resolve each against the graph
|
|
78
|
+
for agent_name, intent in intents:
|
|
79
|
+
resolution = self._resolver.resolve(intent)
|
|
80
|
+
|
|
81
|
+
for adj in resolution.adjustments:
|
|
82
|
+
result.adjustments.append(
|
|
83
|
+
{
|
|
84
|
+
"agent": agent_name,
|
|
85
|
+
"kind": adj.kind,
|
|
86
|
+
"description": adj.description,
|
|
87
|
+
"confidence": adj.confidence,
|
|
88
|
+
}
|
|
89
|
+
)
|
|
90
|
+
# If told to consume instead, the agent is redundant
|
|
91
|
+
if adj.kind == "ConsumeInstead" and adj.confidence >= 0.7:
|
|
92
|
+
result.dropped_agents.add(agent_name)
|
|
93
|
+
|
|
94
|
+
for conflict in resolution.conflicts:
|
|
95
|
+
result.conflicts.append(
|
|
96
|
+
{
|
|
97
|
+
"agent": agent_name,
|
|
98
|
+
"description": conflict.description,
|
|
99
|
+
"their_stability": conflict.their_stability,
|
|
100
|
+
"confidence": conflict.confidence,
|
|
101
|
+
}
|
|
102
|
+
)
|
|
103
|
+
|
|
104
|
+
return result
|
|
105
|
+
|
|
106
|
+
@staticmethod
|
|
107
|
+
def _delegation_to_intent(delegation: dict[str, str]) -> Any:
|
|
108
|
+
"""Convert a Gorgon delegation dict to a Convergent Intent."""
|
|
109
|
+
agent = delegation.get("agent", "unknown")
|
|
110
|
+
task = delegation.get("task", "")
|
|
111
|
+
|
|
112
|
+
# Infer tags from the agent role
|
|
113
|
+
role_tags = {
|
|
114
|
+
"planner": ["planning", "architecture", "design"],
|
|
115
|
+
"builder": ["implementation", "code", "feature"],
|
|
116
|
+
"tester": ["testing", "qa", "coverage"],
|
|
117
|
+
"reviewer": ["review", "security", "quality"],
|
|
118
|
+
"architect": ["architecture", "design", "system"],
|
|
119
|
+
"documenter": ["documentation", "docs", "guide"],
|
|
120
|
+
"analyst": ["analysis", "data", "metrics"],
|
|
121
|
+
}
|
|
122
|
+
tags = role_tags.get(agent, [agent])
|
|
123
|
+
|
|
124
|
+
return Intent(
|
|
125
|
+
agent_id=agent,
|
|
126
|
+
intent=task,
|
|
127
|
+
provides=[
|
|
128
|
+
InterfaceSpec(
|
|
129
|
+
name=f"{agent}_output",
|
|
130
|
+
kind=InterfaceKind.FUNCTION,
|
|
131
|
+
signature="(task: str) -> str",
|
|
132
|
+
tags=tags,
|
|
133
|
+
),
|
|
134
|
+
],
|
|
135
|
+
)
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
def create_checker() -> DelegationConvergenceChecker:
|
|
139
|
+
"""Create a DelegationConvergenceChecker with a fresh resolver.
|
|
140
|
+
|
|
141
|
+
Returns a disabled checker if Convergent is not installed.
|
|
142
|
+
"""
|
|
143
|
+
if not HAS_CONVERGENT:
|
|
144
|
+
logger.info("Convergent not installed — delegation coherence checking disabled")
|
|
145
|
+
return DelegationConvergenceChecker(resolver=None)
|
|
146
|
+
|
|
147
|
+
resolver = create_delegation_checker(min_stability=0.0)
|
|
148
|
+
logger.info("Convergent delegation coherence checker enabled")
|
|
149
|
+
return DelegationConvergenceChecker(resolver=resolver)
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
def format_convergence_alert(result: ConvergenceResult) -> str:
|
|
153
|
+
"""Format a ConvergenceResult into a human-readable alert string.
|
|
154
|
+
|
|
155
|
+
Returns empty string if no conflicts or dropped agents.
|
|
156
|
+
"""
|
|
157
|
+
parts: list[str] = []
|
|
158
|
+
|
|
159
|
+
if result.conflicts:
|
|
160
|
+
parts.append(f"Conflicts ({len(result.conflicts)}):")
|
|
161
|
+
for c in result.conflicts:
|
|
162
|
+
parts.append(f" - {c.get('agent', '?')}: {c.get('description', '?')}")
|
|
163
|
+
|
|
164
|
+
if result.dropped_agents:
|
|
165
|
+
agents = ", ".join(sorted(result.dropped_agents))
|
|
166
|
+
parts.append(f"Dropped agents ({len(result.dropped_agents)}): {agents}")
|
|
167
|
+
|
|
168
|
+
if result.adjustments:
|
|
169
|
+
parts.append(f"Adjustments ({len(result.adjustments)}):")
|
|
170
|
+
for a in result.adjustments:
|
|
171
|
+
parts.append(f" - {a.get('agent', '?')}: {a.get('description', '?')}")
|
|
172
|
+
|
|
173
|
+
return "\n".join(parts)
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
def create_bridge(db_path: str | None = None) -> Any:
|
|
177
|
+
"""Create a GorgonBridge for coordination protocol features.
|
|
178
|
+
|
|
179
|
+
Returns None if Convergent is not installed.
|
|
180
|
+
"""
|
|
181
|
+
if not HAS_CONVERGENT:
|
|
182
|
+
logger.info("Convergent not installed — coordination bridge disabled")
|
|
183
|
+
return None
|
|
184
|
+
try:
|
|
185
|
+
from pathlib import Path
|
|
186
|
+
|
|
187
|
+
from convergent import CoordinationConfig, GorgonBridge
|
|
188
|
+
|
|
189
|
+
if db_path is None:
|
|
190
|
+
db_dir = Path.home() / ".gorgon"
|
|
191
|
+
db_dir.mkdir(parents=True, exist_ok=True)
|
|
192
|
+
db_path = str(db_dir / "coordination.db")
|
|
193
|
+
|
|
194
|
+
bridge = GorgonBridge(CoordinationConfig(db_path=db_path))
|
|
195
|
+
logger.info("Convergent coordination bridge enabled (db=%s)", db_path)
|
|
196
|
+
return bridge
|
|
197
|
+
except Exception as e:
|
|
198
|
+
logger.warning("Failed to create coordination bridge: %s", e)
|
|
199
|
+
return None
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
def create_event_log(db_path: str | None = None) -> Any:
|
|
203
|
+
"""Create a Convergent EventLog for coordination event tracking.
|
|
204
|
+
|
|
205
|
+
Returns None if Convergent is not installed.
|
|
206
|
+
|
|
207
|
+
Args:
|
|
208
|
+
db_path: Path to SQLite database. Defaults to ~/.gorgon/coordination.events.db.
|
|
209
|
+
|
|
210
|
+
Returns:
|
|
211
|
+
EventLog instance or None.
|
|
212
|
+
"""
|
|
213
|
+
if not HAS_CONVERGENT:
|
|
214
|
+
logger.info("Convergent not installed — coordination event log disabled")
|
|
215
|
+
return None
|
|
216
|
+
try:
|
|
217
|
+
from pathlib import Path
|
|
218
|
+
|
|
219
|
+
from convergent import EventLog
|
|
220
|
+
|
|
221
|
+
if db_path is None:
|
|
222
|
+
db_dir = Path.home() / ".gorgon"
|
|
223
|
+
db_dir.mkdir(parents=True, exist_ok=True)
|
|
224
|
+
db_path = str(db_dir / "coordination.events.db")
|
|
225
|
+
|
|
226
|
+
event_log = EventLog(db_path)
|
|
227
|
+
logger.info("Convergent event log enabled (db=%s)", db_path)
|
|
228
|
+
return event_log
|
|
229
|
+
except Exception as e:
|
|
230
|
+
logger.warning("Failed to create coordination event log: %s", e)
|
|
231
|
+
return None
|
|
232
|
+
|
|
233
|
+
|
|
234
|
+
def get_coordination_health(bridge: Any) -> dict[str, Any]:
|
|
235
|
+
"""Run a coordination health check via Convergent's HealthChecker.
|
|
236
|
+
|
|
237
|
+
Args:
|
|
238
|
+
bridge: A GorgonBridge instance.
|
|
239
|
+
|
|
240
|
+
Returns:
|
|
241
|
+
Dict with grade, issues, and subsystem metrics. Empty dict on failure.
|
|
242
|
+
"""
|
|
243
|
+
if not HAS_CONVERGENT or bridge is None:
|
|
244
|
+
return {}
|
|
245
|
+
try:
|
|
246
|
+
from dataclasses import asdict
|
|
247
|
+
|
|
248
|
+
from convergent import HealthChecker
|
|
249
|
+
|
|
250
|
+
checker = HealthChecker.from_bridge(bridge)
|
|
251
|
+
health = checker.check()
|
|
252
|
+
return asdict(health)
|
|
253
|
+
except Exception as e:
|
|
254
|
+
logger.warning("Coordination health check failed: %s", e)
|
|
255
|
+
return {}
|
|
256
|
+
|
|
257
|
+
|
|
258
|
+
def check_dependency_cycles(resolver: Any) -> list[dict[str, Any]]:
|
|
259
|
+
"""Check the intent graph for dependency cycles.
|
|
260
|
+
|
|
261
|
+
Args:
|
|
262
|
+
resolver: An IntentResolver instance.
|
|
263
|
+
|
|
264
|
+
Returns:
|
|
265
|
+
List of cycle dicts with intent_ids and agent_ids. Empty on failure.
|
|
266
|
+
"""
|
|
267
|
+
if not HAS_CONVERGENT or resolver is None:
|
|
268
|
+
return []
|
|
269
|
+
try:
|
|
270
|
+
from convergent import find_cycles
|
|
271
|
+
|
|
272
|
+
cycles = find_cycles(resolver)
|
|
273
|
+
return [
|
|
274
|
+
{
|
|
275
|
+
"intent_ids": list(c.intent_ids),
|
|
276
|
+
"agent_ids": list(c.agent_ids),
|
|
277
|
+
"display": str(c),
|
|
278
|
+
}
|
|
279
|
+
for c in cycles
|
|
280
|
+
]
|
|
281
|
+
except Exception as e:
|
|
282
|
+
logger.warning("Dependency cycle check failed: %s", e)
|
|
283
|
+
return []
|
|
284
|
+
|
|
285
|
+
|
|
286
|
+
def get_execution_order(resolver: Any) -> list[str]:
|
|
287
|
+
"""Get topological execution order for intents.
|
|
288
|
+
|
|
289
|
+
Args:
|
|
290
|
+
resolver: An IntentResolver instance.
|
|
291
|
+
|
|
292
|
+
Returns:
|
|
293
|
+
List of intent IDs in dependency-first order. Empty on failure.
|
|
294
|
+
"""
|
|
295
|
+
if not HAS_CONVERGENT or resolver is None:
|
|
296
|
+
return []
|
|
297
|
+
try:
|
|
298
|
+
from convergent import topological_order
|
|
299
|
+
|
|
300
|
+
return topological_order(resolver)
|
|
301
|
+
except Exception as e:
|
|
302
|
+
logger.warning("Execution order computation failed: %s", e)
|
|
303
|
+
return []
|