agent-framework-declarative 1.4.0__tar.gz → 1.4.1__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.
- {agent_framework_declarative-1.4.0 → agent_framework_declarative-1.4.1}/PKG-INFO +3 -3
- {agent_framework_declarative-1.4.0 → agent_framework_declarative-1.4.1}/README.md +2 -1
- {agent_framework_declarative-1.4.0 → agent_framework_declarative-1.4.1}/agent_framework_declarative/_workflows/_executors_tools.py +26 -3
- {agent_framework_declarative-1.4.0 → agent_framework_declarative-1.4.1}/pyproject.toml +4 -2
- {agent_framework_declarative-1.4.0 → agent_framework_declarative-1.4.1}/LICENSE +0 -0
- {agent_framework_declarative-1.4.0 → agent_framework_declarative-1.4.1}/agent_framework_declarative/__init__.py +0 -0
- {agent_framework_declarative-1.4.0 → agent_framework_declarative-1.4.1}/agent_framework_declarative/_feature_usage.py +0 -0
- {agent_framework_declarative-1.4.0 → agent_framework_declarative-1.4.1}/agent_framework_declarative/_loader.py +0 -0
- {agent_framework_declarative-1.4.0 → agent_framework_declarative-1.4.1}/agent_framework_declarative/_models.py +0 -0
- {agent_framework_declarative-1.4.0 → agent_framework_declarative-1.4.1}/agent_framework_declarative/_workflows/__init__.py +0 -0
- {agent_framework_declarative-1.4.0 → agent_framework_declarative-1.4.1}/agent_framework_declarative/_workflows/_declarative_base.py +0 -0
- {agent_framework_declarative-1.4.0 → agent_framework_declarative-1.4.1}/agent_framework_declarative/_workflows/_declarative_builder.py +0 -0
- {agent_framework_declarative-1.4.0 → agent_framework_declarative-1.4.1}/agent_framework_declarative/_workflows/_errors.py +0 -0
- {agent_framework_declarative-1.4.0 → agent_framework_declarative-1.4.1}/agent_framework_declarative/_workflows/_executors_agents.py +0 -0
- {agent_framework_declarative-1.4.0 → agent_framework_declarative-1.4.1}/agent_framework_declarative/_workflows/_executors_basic.py +0 -0
- {agent_framework_declarative-1.4.0 → agent_framework_declarative-1.4.1}/agent_framework_declarative/_workflows/_executors_control_flow.py +0 -0
- {agent_framework_declarative-1.4.0 → agent_framework_declarative-1.4.1}/agent_framework_declarative/_workflows/_executors_external_input.py +0 -0
- {agent_framework_declarative-1.4.0 → agent_framework_declarative-1.4.1}/agent_framework_declarative/_workflows/_executors_http.py +0 -0
- {agent_framework_declarative-1.4.0 → agent_framework_declarative-1.4.1}/agent_framework_declarative/_workflows/_executors_mcp.py +0 -0
- {agent_framework_declarative-1.4.0 → agent_framework_declarative-1.4.1}/agent_framework_declarative/_workflows/_factory.py +0 -0
- {agent_framework_declarative-1.4.0 → agent_framework_declarative-1.4.1}/agent_framework_declarative/_workflows/_http_handler.py +0 -0
- {agent_framework_declarative-1.4.0 → agent_framework_declarative-1.4.1}/agent_framework_declarative/_workflows/_mcp_handler.py +0 -0
- {agent_framework_declarative-1.4.0 → agent_framework_declarative-1.4.1}/agent_framework_declarative/_workflows/_powerfx_functions.py +0 -0
- {agent_framework_declarative-1.4.0 → agent_framework_declarative-1.4.1}/agent_framework_declarative/_workflows/_powerfx_limits.py +0 -0
- {agent_framework_declarative-1.4.0 → agent_framework_declarative-1.4.1}/agent_framework_declarative/_workflows/_state.py +0 -0
- {agent_framework_declarative-1.4.0 → agent_framework_declarative-1.4.1}/agent_framework_declarative/_workflows/_state_path.py +0 -0
- {agent_framework_declarative-1.4.0 → agent_framework_declarative-1.4.1}/agent_framework_declarative/py.typed +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: agent-framework-declarative
|
|
3
|
-
Version: 1.4.
|
|
3
|
+
Version: 1.4.1
|
|
4
4
|
Summary: Declarative specification support for Microsoft Agent Framework.
|
|
5
5
|
Author-email: Microsoft <af-support@microsoft.com>
|
|
6
6
|
Requires-Python: >=3.10
|
|
@@ -9,7 +9,6 @@ Classifier: License :: OSI Approved :: MIT License
|
|
|
9
9
|
Classifier: Development Status :: 5 - Production/Stable
|
|
10
10
|
Classifier: Intended Audience :: Developers
|
|
11
11
|
Classifier: Programming Language :: Python :: 3
|
|
12
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
13
12
|
Classifier: Programming Language :: Python :: 3.11
|
|
14
13
|
Classifier: Programming Language :: Python :: 3.12
|
|
15
14
|
Classifier: Programming Language :: Python :: 3.13
|
|
@@ -34,7 +33,8 @@ Please install this package via pip:
|
|
|
34
33
|
pip install agent-framework-declarative
|
|
35
34
|
```
|
|
36
35
|
|
|
37
|
-
The package currently advertises Python 3.
|
|
36
|
+
The package currently advertises Python 3.11–3.13 support. Python 3.10
|
|
37
|
+
installation remains permitted, but compatibility is not guaranteed. Python 3.14 and
|
|
38
38
|
3.15 can install the package, but Power Fx expressions are unavailable because
|
|
39
39
|
the `powerfx` dependency requires a `pythonnet` build that does not support
|
|
40
40
|
those Python versions.
|
|
@@ -6,7 +6,8 @@ Please install this package via pip:
|
|
|
6
6
|
pip install agent-framework-declarative
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
The package currently advertises Python 3.
|
|
9
|
+
The package currently advertises Python 3.11–3.13 support. Python 3.10
|
|
10
|
+
installation remains permitted, but compatibility is not guaranteed. Python 3.14 and
|
|
10
11
|
3.15 can install the package, but Power Fx expressions are unavailable because
|
|
11
12
|
the `powerfx` dependency requires a `pythonnet` build that does not support
|
|
12
13
|
those Python versions.
|
|
@@ -243,6 +243,27 @@ class BaseToolExecutor(DeclarativeActionExecutor):
|
|
|
243
243
|
|
|
244
244
|
return None
|
|
245
245
|
|
|
246
|
+
def _registered_tool_requires_approval(
|
|
247
|
+
self,
|
|
248
|
+
function_name: str,
|
|
249
|
+
ctx: WorkflowContext[Any, Any],
|
|
250
|
+
) -> bool:
|
|
251
|
+
"""Check whether the registered tool requires approval on every invocation.
|
|
252
|
+
|
|
253
|
+
A tool registered with ``approval_mode="always_require"`` must not run
|
|
254
|
+
without approval, even when the action omits ``requireApproval`` or sets
|
|
255
|
+
it to false.
|
|
256
|
+
|
|
257
|
+
Args:
|
|
258
|
+
function_name: Name of the function
|
|
259
|
+
ctx: Workflow context
|
|
260
|
+
|
|
261
|
+
Returns:
|
|
262
|
+
True if the registered tool requires approval, False otherwise
|
|
263
|
+
"""
|
|
264
|
+
tool = self._get_tool(function_name, ctx)
|
|
265
|
+
return getattr(tool, "approval_mode", None) == "always_require"
|
|
266
|
+
|
|
246
267
|
def _get_output_config(self) -> tuple[str | None, str | None, Any]:
|
|
247
268
|
"""Parse output bindings and the unevaluated autoSend setting.
|
|
248
269
|
|
|
@@ -433,7 +454,8 @@ class BaseToolExecutor(DeclarativeActionExecutor):
|
|
|
433
454
|
) -> None:
|
|
434
455
|
"""Handle the tool invocation with optional approval flow.
|
|
435
456
|
|
|
436
|
-
When requireApproval=true
|
|
457
|
+
When requireApproval=true, or the registered tool has
|
|
458
|
+
approval_mode="always_require":
|
|
437
459
|
1. Saves invocation state to State (keyed by executor ID)
|
|
438
460
|
2. Emits ToolApprovalRequest via ctx.request_info()
|
|
439
461
|
3. Workflow yields (returns without ActionComplete)
|
|
@@ -477,10 +499,11 @@ class BaseToolExecutor(DeclarativeActionExecutor):
|
|
|
477
499
|
for key, value in arguments_def.items(): # type: ignore[reportUnknownVariableType]
|
|
478
500
|
arguments[key] = state.eval_if_expression(value)
|
|
479
501
|
|
|
480
|
-
# Check if approval is required
|
|
502
|
+
# Check if approval is required. The action's requireApproval cannot
|
|
503
|
+
# override a registered tool's approval_mode="always_require".
|
|
481
504
|
require_approval = self._action_def.get("requireApproval", False)
|
|
482
505
|
|
|
483
|
-
if require_approval:
|
|
506
|
+
if require_approval or self._registered_tool_requires_approval(function_name, ctx):
|
|
484
507
|
# Emit approval request - the request payload is the source of
|
|
485
508
|
# truth for resumed invocation; no side-channel state is written.
|
|
486
509
|
request_id = str(uuid.uuid4())
|
|
@@ -4,7 +4,7 @@ description = "Declarative specification support for Microsoft Agent Framework."
|
|
|
4
4
|
authors = [{ name = "Microsoft", email = "af-support@microsoft.com"}]
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
requires-python = ">=3.10"
|
|
7
|
-
version = "1.4.
|
|
7
|
+
version = "1.4.1"
|
|
8
8
|
license-files = ["LICENSE"]
|
|
9
9
|
urls.homepage = "https://aka.ms/agent-framework"
|
|
10
10
|
urls.source = "https://github.com/microsoft/agent-framework/tree/main/python"
|
|
@@ -15,7 +15,6 @@ classifiers = [
|
|
|
15
15
|
"Development Status :: 5 - Production/Stable",
|
|
16
16
|
"Intended Audience :: Developers",
|
|
17
17
|
"Programming Language :: Python :: 3",
|
|
18
|
-
"Programming Language :: Python :: 3.10",
|
|
19
18
|
"Programming Language :: Python :: 3.11",
|
|
20
19
|
"Programming Language :: Python :: 3.12",
|
|
21
20
|
"Programming Language :: Python :: 3.13",
|
|
@@ -32,6 +31,9 @@ dependencies = [
|
|
|
32
31
|
dev = [
|
|
33
32
|
"types-PyYaml==6.0.12.20260906"
|
|
34
33
|
]
|
|
34
|
+
test = [
|
|
35
|
+
"tenacity>=9.1.4,<9.2.0",
|
|
36
|
+
]
|
|
35
37
|
|
|
36
38
|
[tool.uv]
|
|
37
39
|
prerelease = "if-necessary"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|