edda-framework 0.15.2__tar.gz → 0.16.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.
- {edda_framework-0.15.2 → edda_framework-0.16.0}/.github/workflows/ci.yml +9 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/PKG-INFO +8 -7
- {edda_framework-0.15.2 → edda_framework-0.16.0}/README.md +3 -2
- {edda_framework-0.15.2 → edda_framework-0.16.0}/docs/core-features/durable-execution/replay.md +1 -1
- {edda_framework-0.15.2 → edda_framework-0.16.0}/docs/core-features/events/cloudevents-http-binding.md +5 -5
- {edda_framework-0.15.2 → edda_framework-0.16.0}/docs/core-features/events/wait-event.md +2 -2
- {edda_framework-0.15.2 → edda_framework-0.16.0}/docs/core-features/workflows-activities.md +4 -2
- {edda_framework-0.15.2 → edda_framework-0.16.0}/docs/getting-started/installation.md +1 -1
- {edda_framework-0.15.2 → edda_framework-0.16.0}/docs/integrations/mcp.md +4 -4
- {edda_framework-0.15.2 → edda_framework-0.16.0}/edda/__init__.py +6 -1
- {edda_framework-0.15.2 → edda_framework-0.16.0}/edda/channels.py +3 -3
- {edda_framework-0.15.2 → edda_framework-0.16.0}/edda/integrations/mcp/decorators.py +2 -2
- {edda_framework-0.15.2 → edda_framework-0.16.0}/edda/integrations/mcp/server.py +16 -12
- {edda_framework-0.15.2 → edda_framework-0.16.0}/edda/outbox/relayer.py +5 -5
- {edda_framework-0.15.2 → edda_framework-0.16.0}/edda/storage/sqlalchemy_storage.py +4 -5
- {edda_framework-0.15.2 → edda_framework-0.16.0}/edda/viewer_ui/app.py +10 -6
- {edda_framework-0.15.2 → edda_framework-0.16.0}/edda/viewer_ui/components.py +8 -32
- {edda_framework-0.15.2 → edda_framework-0.16.0}/edda/viewer_ui/data_service.py +8 -8
- {edda_framework-0.15.2 → edda_framework-0.16.0}/edda/visualizer/mermaid_generator.py +29 -3
- {edda_framework-0.15.2 → edda_framework-0.16.0}/examples/mcp/README.md +1 -1
- {edda_framework-0.15.2 → edda_framework-0.16.0}/examples/mcp/prompts_example.py +1 -1
- {edda_framework-0.15.2 → edda_framework-0.16.0}/examples/mcp/remote_server_example.py +1 -1
- {edda_framework-0.15.2 → edda_framework-0.16.0}/pyproject.toml +4 -4
- {edda_framework-0.15.2 → edda_framework-0.16.0}/tests/integrations/mcp/test_cancel.py +68 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/tests/integrations/mcp/test_integration.py +43 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/tests/integrations/mcp/test_jsonrpc.py +2 -2
- {edda_framework-0.15.2 → edda_framework-0.16.0}/tests/integrations/mcp/test_prompts.py +4 -4
- {edda_framework-0.15.2 → edda_framework-0.16.0}/tests/test_app.py +5 -5
- edda_framework-0.16.0/tests/test_mermaid_escape.py +194 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/tests/test_message_cleanup.py +27 -52
- {edda_framework-0.15.2 → edda_framework-0.16.0}/tests/test_outbox.py +6 -6
- {edda_framework-0.15.2 → edda_framework-0.16.0}/tests/test_stale_workflow_recovery.py +45 -36
- edda_framework-0.16.0/tests/test_version.py +13 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/tests/test_viewer_start_saga.py +10 -10
- {edda_framework-0.15.2 → edda_framework-0.16.0}/uv.lock +72 -19
- edda_framework-0.15.2/schema/.git +0 -1
- {edda_framework-0.15.2 → edda_framework-0.16.0}/.github/workflows/docs.yml +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/.github/workflows/release.yml +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/.gitignore +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/.gitmodules +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/.python-version +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/Justfile +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/LICENSE +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/demo_app.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/docs/api/reference.md +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/docs/core-features/events/postgres-notify.md +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/docs/core-features/hooks.md +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/docs/core-features/messages.md +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/docs/core-features/retry.md +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/docs/core-features/saga-compensation.md +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/docs/core-features/transactional-outbox.md +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/docs/examples/ecommerce.md +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/docs/examples/events.md +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/docs/examples/fastapi-integration.md +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/docs/examples/saga.md +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/docs/examples/simple.md +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/docs/getting-started/concepts.md +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/docs/getting-started/first-workflow.md +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/docs/getting-started/quick-start.md +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/docs/index.md +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/docs/integrations/llamaindex.md +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/docs/integrations/mirascope.md +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/docs/integrations/opentelemetry.md +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/docs/integrations/pydantic-graph.md +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/docs/integrations/pydantic-rpc.md +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/docs/viewer-ui/images/cloudevents-cli-trigger.png +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/docs/viewer-ui/images/compensation-execution.png +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/docs/viewer-ui/images/detail-page-loan-approval.png +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/docs/viewer-ui/images/detail-page-match-case.png +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/docs/viewer-ui/images/nested-pydantic-form.png +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/docs/viewer-ui/images/start-workflow-form-pydantic.png +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/docs/viewer-ui/images/wait-event-visualization.png +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/docs/viewer-ui/images/workflow-list-view.png +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/docs/viewer-ui/images/workflow-selection-dropdown.png +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/docs/viewer-ui/setup.md +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/docs/viewer-ui/visualization.md +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/edda/activity.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/edda/app.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/edda/compensation.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/edda/context.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/edda/exceptions.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/edda/hooks.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/edda/integrations/__init__.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/edda/integrations/graph/__init__.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/edda/integrations/graph/context.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/edda/integrations/graph/exceptions.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/edda/integrations/graph/graph.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/edda/integrations/graph/nodes.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/edda/integrations/llamaindex/__init__.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/edda/integrations/llamaindex/events.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/edda/integrations/llamaindex/exceptions.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/edda/integrations/llamaindex/workflow.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/edda/integrations/mcp/__init__.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/edda/integrations/mirascope/__init__.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/edda/integrations/mirascope/agent.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/edda/integrations/mirascope/call.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/edda/integrations/mirascope/decorator.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/edda/integrations/mirascope/types.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/edda/integrations/opentelemetry/__init__.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/edda/integrations/opentelemetry/hooks.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/edda/locking.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/edda/migrations/mysql/20251217000000_initial_schema.sql +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/edda/migrations/postgresql/20251217000000_initial_schema.sql +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/edda/migrations/sqlite/20251217000000_initial_schema.sql +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/edda/outbox/__init__.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/edda/outbox/transactional.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/edda/pydantic_utils.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/edda/replay.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/edda/retry.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/edda/serialization/__init__.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/edda/serialization/base.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/edda/serialization/json.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/edda/storage/__init__.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/edda/storage/migrations.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/edda/storage/models.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/edda/storage/notify_base.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/edda/storage/pg_notify.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/edda/storage/protocol.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/edda/viewer_app.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/edda/viewer_ui/__init__.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/edda/viewer_ui/theme.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/edda/visualizer/__init__.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/edda/visualizer/ast_analyzer.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/edda/workflow.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/edda/wsgi.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/examples/__init__.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/examples/cancellable_workflow.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/examples/compensation_workflow.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/examples/event_waiting_app.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/examples/event_waiting_workflow.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/examples/event_waiting_workflow_complete.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/examples/graph/__init__.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/examples/graph/demo_graph.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/examples/graph/demo_graph_sleep.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/examples/graph/demo_graph_wait_event.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/examples/llamaindex/__init__.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/examples/llamaindex/demo_workflow.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/examples/long_running_loop.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/examples/mcp/order_processing_mcp.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/examples/mcp/simple_mcp_server.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/examples/message_passing.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/examples/mirascope/__init__.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/examples/mirascope/durable_agent.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/examples/mirascope/multi_turn.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/examples/mirascope/simple_call.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/examples/mirascope/with_tools.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/examples/observability_with_logfire.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/examples/observability_with_opentelemetry.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/examples/pydantic_rpc_integration.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/examples/pydantic_saga.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/examples/retry_example.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/examples/retry_with_compensation.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/examples/simple_workflow.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/examples/typeddict_example.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/examples/with_outbox.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/schema/.dbmate.yml +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/schema/.gitignore +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/schema/LICENSE +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/schema/README.md +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/schema/docs/column-values.md +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/tests/__init__.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/tests/conftest.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/tests/integrations/__init__.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/tests/integrations/mcp/__init__.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/tests/integrations/mcp/test_server.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/tests/integrations/mirascope/__init__.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/tests/integrations/mirascope/test_agent.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/tests/integrations/mirascope/test_call.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/tests/integrations/mirascope/test_decorator.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/tests/integrations/mirascope/test_types.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/tests/integrations/opentelemetry/__init__.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/tests/integrations/opentelemetry/test_hooks.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/tests/test_activity.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/tests/test_activity_retry.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/tests/test_activity_sync.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/tests/test_ast_analyzer.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/tests/test_atomic_wait_event.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/tests/test_auto_migration.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/tests/test_binary_data.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/tests/test_channel_competing.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/tests/test_channel_direct.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/tests/test_channel_mode_locking.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/tests/test_channel_transactional.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/tests/test_cloudevents_http_binding.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/tests/test_compensation.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/tests/test_compensation_crash_recovery.py.wip +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/tests/test_concurrent_outbox.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/tests/test_context.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/tests/test_cross_language_channel.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/tests/test_ctx_session.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/tests/test_distributed_event_delivery.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/tests/test_events.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/tests/test_graph_integration.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/tests/test_instance_id_routing.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/tests/test_lock_race_condition.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/tests/test_lock_timeout_customization.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/tests/test_locking.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/tests/test_message_delivery_lock.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/tests/test_messages.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/tests/test_migrations_integration.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/tests/test_multidb_storage.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/tests/test_pg_notify.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/tests/test_polling_optimization.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/tests/test_pydantic_activity.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/tests/test_pydantic_enum.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/tests/test_pydantic_events.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/tests/test_pydantic_saga.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/tests/test_pydantic_utils.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/tests/test_receive_timeout.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/tests/test_received_event.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/tests/test_recur.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/tests/test_recur_cleanup.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/tests/test_replay.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/tests/test_retry_policy.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/tests/test_saga_parameter_extraction.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/tests/test_serialization.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/tests/test_skip_locked.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/tests/test_storage.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/tests/test_storage_mysql.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/tests/test_storage_postgresql.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/tests/test_transactions.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/tests/test_viewer_pagination.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/tests/test_viewer_pydantic_form.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/tests/test_wait_timer.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/tests/test_workflow.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/tests/test_workflow_auto_register.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/tests/test_workflow_cancellation.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/tests/test_workflow_resumption.py +0 -0
- {edda_framework-0.15.2 → edda_framework-0.16.0}/zensical.toml +0 -0
|
@@ -10,9 +10,15 @@ jobs:
|
|
|
10
10
|
test:
|
|
11
11
|
runs-on: ubuntu-latest
|
|
12
12
|
strategy:
|
|
13
|
+
fail-fast: false
|
|
13
14
|
matrix:
|
|
14
15
|
python-version: ["3.11", "3.12", "3.13", "3.14"]
|
|
15
16
|
|
|
17
|
+
env:
|
|
18
|
+
# .python-version pins 3.12, which uv prefers over whatever `uv python install`
|
|
19
|
+
# added. UV_PYTHON makes every uv command in this job use the matrix version.
|
|
20
|
+
UV_PYTHON: ${{ matrix.python-version }}
|
|
21
|
+
|
|
16
22
|
services:
|
|
17
23
|
postgres:
|
|
18
24
|
image: postgres:17
|
|
@@ -58,6 +64,9 @@ jobs:
|
|
|
58
64
|
- name: Install dependencies (all database drivers and opentelemetry)
|
|
59
65
|
run: uv sync --extra dev --extra postgresql --extra mysql --extra opentelemetry
|
|
60
66
|
|
|
67
|
+
- name: Check Python version
|
|
68
|
+
run: uv run python -c "import sys; assert sys.version.startswith('${{ matrix.python-version }}.'), sys.version"
|
|
69
|
+
|
|
61
70
|
- name: Run tests (all databases)
|
|
62
71
|
env:
|
|
63
72
|
EDDA_TEST_POSTGRES_URL: postgresql+asyncpg://edda:edda_test_password@localhost:5432/edda_test
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
2
|
Name: edda-framework
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.16.0
|
|
4
4
|
Summary: Lightweight Durable Execution Framework
|
|
5
5
|
Project-URL: Homepage, https://github.com/i2y/edda
|
|
6
6
|
Project-URL: Documentation, https://github.com/i2y/edda#readme
|
|
@@ -24,7 +24,7 @@ Requires-Dist: a2wsgi>=1.10.0
|
|
|
24
24
|
Requires-Dist: aiosqlite>=0.21.0
|
|
25
25
|
Requires-Dist: anyio>=4.0.0
|
|
26
26
|
Requires-Dist: cloudevents>=1.12.0
|
|
27
|
-
Requires-Dist:
|
|
27
|
+
Requires-Dist: httpx2>=2.13.1
|
|
28
28
|
Requires-Dist: pydantic>=2.0.0
|
|
29
29
|
Requires-Dist: sqlalchemy[asyncio]>=2.0.0
|
|
30
30
|
Requires-Dist: uvloop>=0.22.1
|
|
@@ -32,7 +32,7 @@ Provides-Extra: cpu-monitor
|
|
|
32
32
|
Requires-Dist: psutil>=5.9.0; extra == 'cpu-monitor'
|
|
33
33
|
Provides-Extra: dev
|
|
34
34
|
Requires-Dist: black>=25.9.0; extra == 'dev'
|
|
35
|
-
Requires-Dist: mcp>=
|
|
35
|
+
Requires-Dist: mcp>=2.2.0; extra == 'dev'
|
|
36
36
|
Requires-Dist: mypy>=1.18.2; extra == 'dev'
|
|
37
37
|
Requires-Dist: pytest-asyncio>=1.2.0; extra == 'dev'
|
|
38
38
|
Requires-Dist: pytest-cov>=7.0.0; extra == 'dev'
|
|
@@ -47,7 +47,7 @@ Requires-Dist: pydantic-graph>=0.1.0; extra == 'graph'
|
|
|
47
47
|
Provides-Extra: llamaindex
|
|
48
48
|
Requires-Dist: llama-index-core>=0.12.0; extra == 'llamaindex'
|
|
49
49
|
Provides-Extra: mcp
|
|
50
|
-
Requires-Dist: mcp>=
|
|
50
|
+
Requires-Dist: mcp>=2.2.0; extra == 'mcp'
|
|
51
51
|
Provides-Extra: mirascope
|
|
52
52
|
Requires-Dist: mirascope[anthropic,google,openai]>=2.0.0a0; extra == 'mirascope'
|
|
53
53
|
Requires-Dist: pydantic-settings>=2.0.0; extra == 'mirascope'
|
|
@@ -426,7 +426,8 @@ from edda import activity, WorkflowContext
|
|
|
426
426
|
async def call_external_api(ctx: WorkflowContext, url: str):
|
|
427
427
|
# Automatically retries up to 5 times with exponential backoff
|
|
428
428
|
# Delays: 1s, 2s, 4s, 8s, 16s
|
|
429
|
-
|
|
429
|
+
async with httpx2.AsyncClient() as client:
|
|
430
|
+
response = await client.get(url, timeout=10)
|
|
430
431
|
return response.json()
|
|
431
432
|
```
|
|
432
433
|
|
|
@@ -932,7 +933,7 @@ This enables AI assistants to work with workflows that take minutes, hours, or e
|
|
|
932
933
|
Define reusable prompt templates that can access workflow state:
|
|
933
934
|
|
|
934
935
|
```python
|
|
935
|
-
from mcp.server.
|
|
936
|
+
from mcp.server.mcpserver.prompts.base import UserMessage
|
|
936
937
|
from mcp.types import TextContent
|
|
937
938
|
|
|
938
939
|
@server.prompt(description="Analyze a workflow execution")
|
|
@@ -357,7 +357,8 @@ from edda import activity, WorkflowContext
|
|
|
357
357
|
async def call_external_api(ctx: WorkflowContext, url: str):
|
|
358
358
|
# Automatically retries up to 5 times with exponential backoff
|
|
359
359
|
# Delays: 1s, 2s, 4s, 8s, 16s
|
|
360
|
-
|
|
360
|
+
async with httpx2.AsyncClient() as client:
|
|
361
|
+
response = await client.get(url, timeout=10)
|
|
361
362
|
return response.json()
|
|
362
363
|
```
|
|
363
364
|
|
|
@@ -863,7 +864,7 @@ This enables AI assistants to work with workflows that take minutes, hours, or e
|
|
|
863
864
|
Define reusable prompt templates that can access workflow state:
|
|
864
865
|
|
|
865
866
|
```python
|
|
866
|
-
from mcp.server.
|
|
867
|
+
from mcp.server.mcpserver.prompts.base import UserMessage
|
|
867
868
|
from mcp.types import TextContent
|
|
868
869
|
|
|
869
870
|
@server.prompt(description="Analyze a workflow execution")
|
{edda_framework-0.15.2 → edda_framework-0.16.0}/docs/core-features/durable-execution/replay.md
RENAMED
|
@@ -249,7 +249,7 @@ async def generate_id(ctx: WorkflowContext) -> str:
|
|
|
249
249
|
```python
|
|
250
250
|
@activity
|
|
251
251
|
async def call_external_api(ctx: WorkflowContext) -> dict:
|
|
252
|
-
async with
|
|
252
|
+
async with httpx2.AsyncClient() as client:
|
|
253
253
|
response = await client.get("https://api.example.com/data")
|
|
254
254
|
return response.json()
|
|
255
255
|
|
|
@@ -150,7 +150,7 @@ All error responses include structured information to help clients decide whethe
|
|
|
150
150
|
Example retry implementation:
|
|
151
151
|
|
|
152
152
|
```python
|
|
153
|
-
import
|
|
153
|
+
import httpx2
|
|
154
154
|
import asyncio
|
|
155
155
|
|
|
156
156
|
async def send_cloudevent_with_retry(event_data: dict, max_retries: int = 3):
|
|
@@ -158,7 +158,7 @@ async def send_cloudevent_with_retry(event_data: dict, max_retries: int = 3):
|
|
|
158
158
|
|
|
159
159
|
for attempt in range(max_retries):
|
|
160
160
|
try:
|
|
161
|
-
async with
|
|
161
|
+
async with httpx2.AsyncClient() as client:
|
|
162
162
|
response = await client.post(
|
|
163
163
|
"http://localhost:8001/",
|
|
164
164
|
json=event_data,
|
|
@@ -187,7 +187,7 @@ async def send_cloudevent_with_retry(event_data: dict, max_retries: int = 3):
|
|
|
187
187
|
else:
|
|
188
188
|
raise Exception(f"Max retries exceeded: {error['error']}")
|
|
189
189
|
|
|
190
|
-
except
|
|
190
|
+
except httpx2.ConnectError:
|
|
191
191
|
# Connection error - Retry
|
|
192
192
|
if attempt < max_retries - 1:
|
|
193
193
|
wait_time = 2 ** attempt
|
|
@@ -245,7 +245,7 @@ Using the official CloudEvents Python SDK:
|
|
|
245
245
|
|
|
246
246
|
```python
|
|
247
247
|
from cloudevents.http import CloudEvent, to_structured
|
|
248
|
-
import
|
|
248
|
+
import httpx2
|
|
249
249
|
|
|
250
250
|
async def send_event():
|
|
251
251
|
"""Send CloudEvent using official SDK."""
|
|
@@ -263,7 +263,7 @@ async def send_event():
|
|
|
263
263
|
headers, body = to_structured(event)
|
|
264
264
|
|
|
265
265
|
# Send to Edda
|
|
266
|
-
async with
|
|
266
|
+
async with httpx2.AsyncClient() as client:
|
|
267
267
|
response = await client.post(
|
|
268
268
|
"http://localhost:8001/",
|
|
269
269
|
headers=headers,
|
|
@@ -275,7 +275,7 @@ async def multi_service_orchestration(ctx: WorkflowContext, request_id: str):
|
|
|
275
275
|
Send CloudEvents to resume waiting workflows:
|
|
276
276
|
|
|
277
277
|
```python
|
|
278
|
-
import
|
|
278
|
+
import httpx2
|
|
279
279
|
from cloudevents.http import CloudEvent
|
|
280
280
|
from cloudevents.conversion import to_structured
|
|
281
281
|
|
|
@@ -292,7 +292,7 @@ event = CloudEvent({
|
|
|
292
292
|
|
|
293
293
|
# Send to Edda
|
|
294
294
|
headers, body = to_structured(event)
|
|
295
|
-
async with
|
|
295
|
+
async with httpx2.AsyncClient() as client:
|
|
296
296
|
response = await client.post(
|
|
297
297
|
"http://localhost:8001/",
|
|
298
298
|
headers=headers,
|
|
@@ -140,7 +140,8 @@ def create_user_record(ctx: WorkflowContext, user_id: str, email: str) -> dict:
|
|
|
140
140
|
@activity
|
|
141
141
|
async def async_activity(ctx: WorkflowContext, data: str) -> dict:
|
|
142
142
|
"""Async activity - recommended for I/O operations"""
|
|
143
|
-
|
|
143
|
+
async with httpx2.AsyncClient() as client:
|
|
144
|
+
result = await client.get(f"https://api.example.com/{data}")
|
|
144
145
|
return result.json()
|
|
145
146
|
|
|
146
147
|
@workflow
|
|
@@ -976,7 +977,8 @@ async def order_workflow(ctx: WorkflowContext, order_id: str, amount: float):
|
|
|
976
977
|
@activity
|
|
977
978
|
async def fetch_user_data(ctx: WorkflowContext, user_id: str) -> dict:
|
|
978
979
|
# Async I/O operations (recommended)
|
|
979
|
-
|
|
980
|
+
async with httpx2.AsyncClient() as client:
|
|
981
|
+
result = await client.get(f"https://api.example.com/users/{user_id}")
|
|
980
982
|
return result.json()
|
|
981
983
|
```
|
|
982
984
|
|
|
@@ -50,7 +50,7 @@ uv add edda-framework --extra postgresql --extra mysql --extra viewer
|
|
|
50
50
|
- **Base**: SQLite support via `aiosqlite` (always included)
|
|
51
51
|
- **postgresql**: `asyncpg` driver for PostgreSQL
|
|
52
52
|
- **mysql**: `aiomysql` driver for MySQL
|
|
53
|
-
- **viewer**: `nicegui`
|
|
53
|
+
- **viewer**: `nicegui` for workflow visualization UI
|
|
54
54
|
- **postgres-notify**: `asyncpg` driver for PostgreSQL LISTEN/NOTIFY instant notifications
|
|
55
55
|
|
|
56
56
|
### Using pip
|
|
@@ -185,7 +185,7 @@ Use the `@server.prompt()` decorator to define prompts that can access workflow
|
|
|
185
185
|
|
|
186
186
|
```python
|
|
187
187
|
from edda.integrations.mcp import EddaMCPServer
|
|
188
|
-
from mcp.server.
|
|
188
|
+
from mcp.server.mcpserver.prompts.base import UserMessage
|
|
189
189
|
from mcp.types import TextContent
|
|
190
190
|
|
|
191
191
|
server = EddaMCPServer(
|
|
@@ -318,9 +318,9 @@ Edda's MCP integration follows the [MCP Tools specification](https://modelcontex
|
|
|
318
318
|
▼
|
|
319
319
|
┌─────────────────┐
|
|
320
320
|
│ EddaMCPServer │
|
|
321
|
-
│
|
|
322
|
-
│
|
|
323
|
-
│
|
|
321
|
+
│ ┌───────────┐ │
|
|
322
|
+
│ │ MCPServer │ │ ← Official MCP SDK
|
|
323
|
+
│ └───────────┘ │
|
|
324
324
|
│ ┌─────────┐ │
|
|
325
325
|
│ │ EddaApp │ │ ← Durable Execution
|
|
326
326
|
│ └─────────┘ │
|
|
@@ -20,6 +20,8 @@ Example:
|
|
|
20
20
|
... )
|
|
21
21
|
"""
|
|
22
22
|
|
|
23
|
+
import importlib.metadata
|
|
24
|
+
|
|
23
25
|
from edda.activity import activity
|
|
24
26
|
from edda.app import EddaApp
|
|
25
27
|
from edda.channels import (
|
|
@@ -48,7 +50,10 @@ from edda.retry import RetryPolicy
|
|
|
48
50
|
from edda.workflow import workflow
|
|
49
51
|
from edda.wsgi import create_wsgi_app
|
|
50
52
|
|
|
51
|
-
|
|
53
|
+
try:
|
|
54
|
+
__version__ = importlib.metadata.version("edda-framework")
|
|
55
|
+
except importlib.metadata.PackageNotFoundError: # imported from a source tree that isn't installed
|
|
56
|
+
__version__ = "0.0.0"
|
|
52
57
|
|
|
53
58
|
__all__ = [
|
|
54
59
|
# Core
|
|
@@ -1007,7 +1007,7 @@ async def send_event(
|
|
|
1007
1007
|
datacontenttype: Content type (defaults to "application/json")
|
|
1008
1008
|
|
|
1009
1009
|
Raises:
|
|
1010
|
-
|
|
1010
|
+
httpx2.HTTPError: If the HTTP request fails
|
|
1011
1011
|
|
|
1012
1012
|
Example:
|
|
1013
1013
|
>>> # With dict
|
|
@@ -1017,7 +1017,7 @@ async def send_event(
|
|
|
1017
1017
|
>>> order = OrderCreated(order_id="123", amount=99.99)
|
|
1018
1018
|
>>> await send_event("order.created", "order-service", order)
|
|
1019
1019
|
"""
|
|
1020
|
-
import
|
|
1020
|
+
import httpx2
|
|
1021
1021
|
from cloudevents.conversion import to_structured
|
|
1022
1022
|
from cloudevents.http import CloudEvent
|
|
1023
1023
|
|
|
@@ -1049,7 +1049,7 @@ async def send_event(
|
|
|
1049
1049
|
headers, body = to_structured(event)
|
|
1050
1050
|
|
|
1051
1051
|
# Send to Knative Broker via HTTP POST
|
|
1052
|
-
async with
|
|
1052
|
+
async with httpx2.AsyncClient() as client:
|
|
1053
1053
|
response = await client.post(
|
|
1054
1054
|
broker_url,
|
|
1055
1055
|
headers=headers,
|
|
@@ -84,10 +84,10 @@ def create_durable_tool(
|
|
|
84
84
|
"isError": False,
|
|
85
85
|
}
|
|
86
86
|
|
|
87
|
-
# Override the function's signature for introspection (
|
|
87
|
+
# Override the function's signature for introspection (MCPServer uses this for schema generation)
|
|
88
88
|
start_tool.__signature__ = inspect.Signature(parameters=params) # type: ignore[attr-defined]
|
|
89
89
|
|
|
90
|
-
# Register with
|
|
90
|
+
# Register with MCPServer (call as function, not decorator syntax)
|
|
91
91
|
server._mcp.tool(name=workflow_name, description=tool_description)(start_tool)
|
|
92
92
|
|
|
93
93
|
# 3. Generate status tool
|
|
@@ -13,11 +13,11 @@ if TYPE_CHECKING:
|
|
|
13
13
|
from edda.storage.protocol import StorageProtocol
|
|
14
14
|
|
|
15
15
|
try:
|
|
16
|
-
from mcp.server.
|
|
16
|
+
from mcp.server.mcpserver import MCPServer
|
|
17
17
|
except ImportError as e:
|
|
18
18
|
raise ImportError(
|
|
19
|
-
"MCP Python SDK is required for MCP integration. "
|
|
20
|
-
"Install it with: pip install edda-framework[mcp]"
|
|
19
|
+
"MCP Python SDK 2.x is required for MCP integration. "
|
|
20
|
+
"Install it with: pip install 'edda-framework[mcp]'"
|
|
21
21
|
) from e
|
|
22
22
|
|
|
23
23
|
|
|
@@ -25,7 +25,7 @@ class EddaMCPServer:
|
|
|
25
25
|
"""
|
|
26
26
|
MCP (Model Context Protocol) server for Edda durable workflows.
|
|
27
27
|
|
|
28
|
-
Integrates EddaApp (CloudEvents + Workflows) with
|
|
28
|
+
Integrates EddaApp (CloudEvents + Workflows) with MCPServer to provide
|
|
29
29
|
long-running workflow tools via the MCP protocol.
|
|
30
30
|
|
|
31
31
|
Example:
|
|
@@ -102,7 +102,7 @@ class EddaMCPServer:
|
|
|
102
102
|
outbox_enabled=outbox_enabled,
|
|
103
103
|
broker_url=broker_url or "",
|
|
104
104
|
)
|
|
105
|
-
self._mcp =
|
|
105
|
+
self._mcp = MCPServer(name)
|
|
106
106
|
self._token_verifier = token_verifier
|
|
107
107
|
|
|
108
108
|
# Registry of durable tools (workflow_name -> Workflow instance)
|
|
@@ -202,7 +202,7 @@ class EddaMCPServer:
|
|
|
202
202
|
|
|
203
203
|
Example:
|
|
204
204
|
```python
|
|
205
|
-
from
|
|
205
|
+
from mcp.types import PromptMessage, TextContent
|
|
206
206
|
|
|
207
207
|
@server.prompt(description="Analyze workflow results")
|
|
208
208
|
async def analyze_workflow(instance_id: str) -> PromptMessage:
|
|
@@ -226,7 +226,7 @@ class EddaMCPServer:
|
|
|
226
226
|
"""
|
|
227
227
|
|
|
228
228
|
def decorator(f: Callable[..., Any]) -> Callable[..., Any]:
|
|
229
|
-
# Use
|
|
229
|
+
# Use MCPServer's native prompt decorator
|
|
230
230
|
prompt_desc = description or f.__doc__ or f"Prompt: {f.__name__}"
|
|
231
231
|
return self._mcp.prompt(description=prompt_desc)(f)
|
|
232
232
|
|
|
@@ -242,7 +242,7 @@ class EddaMCPServer:
|
|
|
242
242
|
we get the MCP's Starlette app directly and add Edda endpoints to it.
|
|
243
243
|
|
|
244
244
|
Routing:
|
|
245
|
-
- POST /
|
|
245
|
+
- POST /mcp -> MCPServer (MCP tools via streamable HTTP)
|
|
246
246
|
- POST /cancel/{instance_id} -> Workflow cancellation
|
|
247
247
|
- Other POST -> CloudEvents
|
|
248
248
|
|
|
@@ -253,10 +253,10 @@ class EddaMCPServer:
|
|
|
253
253
|
from starlette.responses import Response
|
|
254
254
|
|
|
255
255
|
# Get MCP's Starlette app (Issue #1367 workaround: use directly)
|
|
256
|
-
app = self._mcp.streamable_http_app()
|
|
256
|
+
app = self._mcp.streamable_http_app(json_response=True, stateless_http=True)
|
|
257
257
|
|
|
258
258
|
# Add Edda endpoints to Starlette router BEFORE wrapping with middleware
|
|
259
|
-
# Note: MCP's streamable HTTP is already mounted at "/" by default
|
|
259
|
+
# Note: MCP's streamable HTTP is already mounted at "/mcp" by default
|
|
260
260
|
# We add additional routes for Edda's CloudEvents and cancellation
|
|
261
261
|
|
|
262
262
|
async def edda_cancel_handler(request: Request) -> Response:
|
|
@@ -280,11 +280,15 @@ class EddaMCPServer:
|
|
|
280
280
|
# Forward to EddaApp
|
|
281
281
|
await self._edda_app(scope, request.receive, send)
|
|
282
282
|
|
|
283
|
-
# Return response
|
|
283
|
+
# Return response (ASGI headers are latin-1 bytes; Response wants str)
|
|
284
|
+
headers = {
|
|
285
|
+
key.decode("latin-1"): value.decode("latin-1")
|
|
286
|
+
for key, value in response_data["headers"]
|
|
287
|
+
}
|
|
284
288
|
return Response(
|
|
285
289
|
content=response_data["body"],
|
|
286
290
|
status_code=response_data["status"],
|
|
287
|
-
headers=
|
|
291
|
+
headers=headers,
|
|
288
292
|
)
|
|
289
293
|
|
|
290
294
|
# Add cancel route
|
|
@@ -12,7 +12,7 @@ import random
|
|
|
12
12
|
from datetime import UTC, datetime, timedelta
|
|
13
13
|
from typing import TYPE_CHECKING, Any
|
|
14
14
|
|
|
15
|
-
import
|
|
15
|
+
import httpx2
|
|
16
16
|
from cloudevents.conversion import to_structured
|
|
17
17
|
from cloudevents.http import CloudEvent
|
|
18
18
|
|
|
@@ -75,7 +75,7 @@ class OutboxRelayer:
|
|
|
75
75
|
|
|
76
76
|
self._task: asyncio.Task[Any] | None = None
|
|
77
77
|
self._running = False
|
|
78
|
-
self._http_client:
|
|
78
|
+
self._http_client: httpx2.AsyncClient | None = None
|
|
79
79
|
|
|
80
80
|
async def start(self) -> None:
|
|
81
81
|
"""
|
|
@@ -88,7 +88,7 @@ class OutboxRelayer:
|
|
|
88
88
|
return
|
|
89
89
|
|
|
90
90
|
self._running = True
|
|
91
|
-
self._http_client =
|
|
91
|
+
self._http_client = httpx2.AsyncClient(timeout=30.0)
|
|
92
92
|
|
|
93
93
|
# Start background task
|
|
94
94
|
self._task = asyncio.create_task(self._poll_loop())
|
|
@@ -281,7 +281,7 @@ class OutboxRelayer:
|
|
|
281
281
|
await self.storage.mark_outbox_published(event_id)
|
|
282
282
|
logger.info(f"Successfully published event {event_id}")
|
|
283
283
|
|
|
284
|
-
except
|
|
284
|
+
except httpx2.HTTPStatusError as e:
|
|
285
285
|
# HTTP error with status code - distinguish 4xx (client) vs 5xx (server)
|
|
286
286
|
status_code = e.response.status_code
|
|
287
287
|
error_msg = f"HTTP {status_code}: {str(e)}"
|
|
@@ -301,7 +301,7 @@ class OutboxRelayer:
|
|
|
301
301
|
)
|
|
302
302
|
await self.storage.mark_outbox_failed(event_id, error_msg)
|
|
303
303
|
|
|
304
|
-
except
|
|
304
|
+
except httpx2.RequestError as e:
|
|
305
305
|
# Network error (connection timeout, DNS failure, etc.) - retry
|
|
306
306
|
error_msg = f"Network error: {str(e)}"
|
|
307
307
|
logger.warning(
|
|
@@ -3673,11 +3673,10 @@ class SQLAlchemyStorage:
|
|
|
3673
3673
|
|
|
3674
3674
|
# Delete old messages
|
|
3675
3675
|
result = await session.execute(
|
|
3676
|
-
delete(ChannelMessage)
|
|
3677
|
-
.where(ChannelMessage.published_at < cutoff_time)
|
|
3678
|
-
.returning(ChannelMessage.id)
|
|
3676
|
+
delete(ChannelMessage).where(ChannelMessage.published_at < cutoff_time)
|
|
3679
3677
|
)
|
|
3680
|
-
deleted_ids = result.fetchall()
|
|
3681
3678
|
await self._commit_if_not_in_transaction(session)
|
|
3682
3679
|
|
|
3683
|
-
|
|
3680
|
+
# MySQL doesn't support DELETE ... RETURNING, so use rowcount.
|
|
3681
|
+
# rowcount is reliable across PostgreSQL/MySQL/SQLite for plain DELETE.
|
|
3682
|
+
return result.rowcount or 0 # type: ignore[attr-defined]
|
|
@@ -5,6 +5,7 @@ NiceGUI application for interactive workflow instance visualization.
|
|
|
5
5
|
import asyncio
|
|
6
6
|
import contextlib
|
|
7
7
|
import json
|
|
8
|
+
import os
|
|
8
9
|
from datetime import datetime
|
|
9
10
|
from typing import Any
|
|
10
11
|
|
|
@@ -18,6 +19,11 @@ from edda.viewer_ui.data_service import WorkflowDataService
|
|
|
18
19
|
from edda.viewer_ui.theme import TAILWIND_CLASSES, get_status_badge_classes
|
|
19
20
|
|
|
20
21
|
|
|
22
|
+
def _edda_app_url() -> str:
|
|
23
|
+
"""Base URL of the EddaApp that the Viewer starts and cancels workflows on."""
|
|
24
|
+
return os.getenv("EDDA_APP_URL", "http://localhost:8001")
|
|
25
|
+
|
|
26
|
+
|
|
21
27
|
def start_viewer(edda_app: EddaApp, port: int = 8080, reload: bool = False) -> None:
|
|
22
28
|
"""
|
|
23
29
|
Start the NiceGUI workflow viewer.
|
|
@@ -1245,10 +1251,7 @@ def start_viewer(edda_app: EddaApp, port: int = 8080, reload: bool = False) -> N
|
|
|
1245
1251
|
# → {model_name: {field1: value1, field2: value2, ...}}
|
|
1246
1252
|
params = {pydantic_model_name: params}
|
|
1247
1253
|
|
|
1248
|
-
|
|
1249
|
-
import os
|
|
1250
|
-
|
|
1251
|
-
edda_app_url = os.getenv("EDDA_APP_URL", "http://localhost:8001")
|
|
1254
|
+
edda_app_url = _edda_app_url()
|
|
1252
1255
|
|
|
1253
1256
|
ui.notify(
|
|
1254
1257
|
f"Starting workflow '{selected_workflow}'...", type="info"
|
|
@@ -1655,8 +1658,9 @@ def start_viewer(edda_app: EddaApp, port: int = 8080, reload: bool = False) -> N
|
|
|
1655
1658
|
|
|
1656
1659
|
if result:
|
|
1657
1660
|
# Call cancel API
|
|
1658
|
-
|
|
1659
|
-
|
|
1661
|
+
success, message = await service.cancel_workflow(
|
|
1662
|
+
instance_id, _edda_app_url()
|
|
1663
|
+
)
|
|
1660
1664
|
|
|
1661
1665
|
if success:
|
|
1662
1666
|
ui.notify(message, type="positive")
|
|
@@ -7,7 +7,7 @@ from typing import Any
|
|
|
7
7
|
|
|
8
8
|
from edda.viewer_ui.theme import get_edge_color, get_mermaid_node_style, get_mermaid_style
|
|
9
9
|
from edda.visualizer.ast_analyzer import WorkflowAnalyzer
|
|
10
|
-
from edda.visualizer.mermaid_generator import MermaidGenerator
|
|
10
|
+
from edda.visualizer.mermaid_generator import MermaidGenerator, escape_mermaid_label
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
def generate_interactive_mermaid(
|
|
@@ -350,14 +350,16 @@ class HybridMermaidGenerator(MermaidGenerator):
|
|
|
350
350
|
elif step_type == "wait_event":
|
|
351
351
|
# Event waiting
|
|
352
352
|
node_id = self._next_node_id()
|
|
353
|
-
event_type = step.get("event_type", "unknown")
|
|
353
|
+
event_type = escape_mermaid_label(step.get("event_type", "unknown"))
|
|
354
354
|
timeout = step.get("timeout")
|
|
355
355
|
|
|
356
356
|
label = f"wait_event:<br/>{event_type}"
|
|
357
357
|
if timeout:
|
|
358
|
-
label += f"<br/>timeout: {timeout}s"
|
|
358
|
+
label += f"<br/>timeout: {escape_mermaid_label(str(timeout))}s"
|
|
359
359
|
|
|
360
|
-
|
|
360
|
+
# Quoted hexagon form (id{{"label"}}): mermaid 11 rejects bare
|
|
361
|
+
# parens / colons inside unquoted hexagons.
|
|
362
|
+
self.lines.append(f' {node_id}{{{{"{label}"}}}}')
|
|
361
363
|
self.lines.append(f" {current_id} --> {node_id}")
|
|
362
364
|
wait_event_style = get_mermaid_style("waiting_event", self.is_dark)
|
|
363
365
|
self.lines.append(f" style {node_id} {wait_event_style}")
|
|
@@ -406,21 +408,7 @@ class HybridMermaidGenerator(MermaidGenerator):
|
|
|
406
408
|
"""
|
|
407
409
|
# Condition node (diamond shape)
|
|
408
410
|
cond_id = self._next_node_id()
|
|
409
|
-
test_expr = condition.get("test", "condition")
|
|
410
|
-
|
|
411
|
-
# Sanitize test expression for Mermaid - remove ALL problematic characters
|
|
412
|
-
# Replace dict/list accessors and special chars
|
|
413
|
-
test_expr = (
|
|
414
|
-
test_expr.replace('"', "'")
|
|
415
|
-
.replace("{", "(")
|
|
416
|
-
.replace("}", ")")
|
|
417
|
-
.replace("[", ".")
|
|
418
|
-
.replace("]", "")
|
|
419
|
-
.replace("'", "")
|
|
420
|
-
)
|
|
421
|
-
# Limit length to avoid overflow
|
|
422
|
-
if len(test_expr) > 40:
|
|
423
|
-
test_expr = test_expr[:37] + "..."
|
|
411
|
+
test_expr = escape_mermaid_label(condition.get("test", "condition"), max_len=40)
|
|
424
412
|
|
|
425
413
|
# Use diamond shape for condition - correct Mermaid syntax
|
|
426
414
|
self.lines.append(f" {cond_id}{{{test_expr}?}}")
|
|
@@ -777,19 +765,7 @@ class HybridMermaidGenerator(MermaidGenerator):
|
|
|
777
765
|
"""
|
|
778
766
|
# Match node (diamond shape for the subject)
|
|
779
767
|
match_id = self._next_node_id()
|
|
780
|
-
subject = match.get("subject", "value")
|
|
781
|
-
|
|
782
|
-
# Sanitize subject expression for Mermaid
|
|
783
|
-
subject = (
|
|
784
|
-
subject.replace('"', "'")
|
|
785
|
-
.replace("{", "(")
|
|
786
|
-
.replace("}", ")")
|
|
787
|
-
.replace("[", ".")
|
|
788
|
-
.replace("]", "")
|
|
789
|
-
.replace("'", "")
|
|
790
|
-
)
|
|
791
|
-
if len(subject) > 30:
|
|
792
|
-
subject = subject[:27] + "..."
|
|
768
|
+
subject = escape_mermaid_label(match.get("subject", "value"), max_len=30)
|
|
793
769
|
|
|
794
770
|
self.lines.append(f" {match_id}{{{{match {subject}}}}}")
|
|
795
771
|
self.lines.append(f" {prev_id} --> {match_id}")
|
|
@@ -333,13 +333,13 @@ class WorkflowDataService:
|
|
|
333
333
|
Returns:
|
|
334
334
|
Tuple of (success: bool, message: str)
|
|
335
335
|
"""
|
|
336
|
-
import
|
|
336
|
+
import httpx2
|
|
337
337
|
|
|
338
338
|
try:
|
|
339
339
|
logger.debug("Attempting to cancel workflow: %s", instance_id)
|
|
340
340
|
logger.debug("API URL: %s/cancel/%s", edda_app_url, instance_id)
|
|
341
341
|
|
|
342
|
-
async with
|
|
342
|
+
async with httpx2.AsyncClient() as client:
|
|
343
343
|
response = await client.post(
|
|
344
344
|
f"{edda_app_url}/cancel/{instance_id}",
|
|
345
345
|
timeout=10.0,
|
|
@@ -358,12 +358,12 @@ class WorkflowDataService:
|
|
|
358
358
|
else:
|
|
359
359
|
return False, f"Server error: HTTP {response.status_code}"
|
|
360
360
|
|
|
361
|
-
except
|
|
361
|
+
except httpx2.ConnectError as e:
|
|
362
362
|
error_msg = f"Cannot connect to EddaApp at {edda_app_url}. Is it running?"
|
|
363
363
|
logger.warning("Connection error: %s", e)
|
|
364
364
|
return False, error_msg
|
|
365
365
|
|
|
366
|
-
except
|
|
366
|
+
except httpx2.TimeoutException as e:
|
|
367
367
|
error_msg = "Request timed out. The server may be busy."
|
|
368
368
|
logger.warning("Timeout error: %s", e)
|
|
369
369
|
return False, error_msg
|
|
@@ -855,7 +855,7 @@ class WorkflowDataService:
|
|
|
855
855
|
"""
|
|
856
856
|
import uuid
|
|
857
857
|
|
|
858
|
-
import
|
|
858
|
+
import httpx2
|
|
859
859
|
from cloudevents.conversion import to_structured
|
|
860
860
|
from cloudevents.http import CloudEvent
|
|
861
861
|
|
|
@@ -884,7 +884,7 @@ class WorkflowDataService:
|
|
|
884
884
|
logger.debug("CloudEvent type: %s", workflow_name)
|
|
885
885
|
|
|
886
886
|
# Send CloudEvent to EddaApp
|
|
887
|
-
async with
|
|
887
|
+
async with httpx2.AsyncClient() as client:
|
|
888
888
|
response = await client.post(
|
|
889
889
|
edda_app_url,
|
|
890
890
|
headers=headers,
|
|
@@ -904,12 +904,12 @@ class WorkflowDataService:
|
|
|
904
904
|
else:
|
|
905
905
|
return False, f"Server error: HTTP {response.status_code}", None
|
|
906
906
|
|
|
907
|
-
except
|
|
907
|
+
except httpx2.ConnectError as e:
|
|
908
908
|
error_msg = f"Cannot connect to EddaApp at {edda_app_url}. Is it running?"
|
|
909
909
|
logger.warning("Connection error: %s", e)
|
|
910
910
|
return False, error_msg, None
|
|
911
911
|
|
|
912
|
-
except
|
|
912
|
+
except httpx2.TimeoutException as e:
|
|
913
913
|
error_msg = "Request timed out. The server may be busy."
|
|
914
914
|
logger.warning("Timeout error: %s", e)
|
|
915
915
|
return False, error_msg, None
|