agent-framework-declarative 1.0.0__py3-none-any.whl

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.
@@ -0,0 +1,38 @@
1
+ # Copyright (c) Microsoft. All rights reserved.
2
+
3
+ """Error types for declarative workflow executor modules.
4
+
5
+ This module exists so that executor modules and the builder (e.g.
6
+ ``_executors_http``, ``_declarative_builder``) can raise declarative-specific
7
+ exceptions without importing from ``_factory``. ``_factory`` imports
8
+ ``_declarative_builder`` which imports the executor modules; pulling
9
+ :class:`DeclarativeWorkflowError` from ``_factory`` into an executor or
10
+ builder module would therefore introduce a circular import.
11
+ """
12
+
13
+ from __future__ import annotations
14
+
15
+ from agent_framework.exceptions import WorkflowException
16
+
17
+
18
+ class DeclarativeWorkflowError(WorkflowException):
19
+ """Raised for build-time / factory-level declarative workflow errors.
20
+
21
+ Used for YAML parsing/validation issues, missing configuration (e.g. an
22
+ HTTP request handler not supplied for a workflow that contains an
23
+ ``HttpRequestAction``), and other errors detected before workflow
24
+ execution begins.
25
+ """
26
+
27
+ pass
28
+
29
+
30
+ class DeclarativeActionError(WorkflowException):
31
+ """Raised when a declarative action fails at run time.
32
+
33
+ Used by executor modules for runtime failures (e.g. transport errors,
34
+ non-2xx responses from :class:`HttpRequestActionExecutor`). Build-time and
35
+ factory-level errors continue to use :class:`DeclarativeWorkflowError`.
36
+ """
37
+
38
+ pass