AbstractAgent 0.3.10__tar.gz → 0.3.12__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.
Files changed (69) hide show
  1. {abstractagent-0.3.10/src/abstractagent.egg-info → abstractagent-0.3.12}/PKG-INFO +9 -7
  2. {abstractagent-0.3.10 → abstractagent-0.3.12}/README.md +2 -0
  3. {abstractagent-0.3.10 → abstractagent-0.3.12}/pyproject.toml +7 -7
  4. {abstractagent-0.3.10 → abstractagent-0.3.12}/src/abstractagent/adapters/generation_params.py +27 -1
  5. {abstractagent-0.3.10 → abstractagent-0.3.12/src/abstractagent.egg-info}/PKG-INFO +9 -7
  6. abstractagent-0.3.12/src/abstractagent.egg-info/requires.txt +16 -0
  7. {abstractagent-0.3.10 → abstractagent-0.3.12}/tests/test_generation_params_media_policies.py +27 -0
  8. {abstractagent-0.3.10 → abstractagent-0.3.12}/tests/test_packaging_profiles.py +6 -6
  9. abstractagent-0.3.10/src/abstractagent.egg-info/requires.txt +0 -16
  10. {abstractagent-0.3.10 → abstractagent-0.3.12}/LICENSE +0 -0
  11. {abstractagent-0.3.10 → abstractagent-0.3.12}/setup.cfg +0 -0
  12. {abstractagent-0.3.10 → abstractagent-0.3.12}/src/abstractagent/__init__.py +0 -0
  13. {abstractagent-0.3.10 → abstractagent-0.3.12}/src/abstractagent/adapters/__init__.py +0 -0
  14. {abstractagent-0.3.10 → abstractagent-0.3.12}/src/abstractagent/adapters/codeact_runtime.py +0 -0
  15. {abstractagent-0.3.10 → abstractagent-0.3.12}/src/abstractagent/adapters/media.py +0 -0
  16. {abstractagent-0.3.10 → abstractagent-0.3.12}/src/abstractagent/adapters/memact_runtime.py +0 -0
  17. {abstractagent-0.3.10 → abstractagent-0.3.12}/src/abstractagent/adapters/react_runtime.py +0 -0
  18. {abstractagent-0.3.10 → abstractagent-0.3.12}/src/abstractagent/agents/__init__.py +0 -0
  19. {abstractagent-0.3.10 → abstractagent-0.3.12}/src/abstractagent/agents/base.py +0 -0
  20. {abstractagent-0.3.10 → abstractagent-0.3.12}/src/abstractagent/agents/codeact.py +0 -0
  21. {abstractagent-0.3.10 → abstractagent-0.3.12}/src/abstractagent/agents/memact.py +0 -0
  22. {abstractagent-0.3.10 → abstractagent-0.3.12}/src/abstractagent/agents/react.py +0 -0
  23. {abstractagent-0.3.10 → abstractagent-0.3.12}/src/abstractagent/logic/__init__.py +0 -0
  24. {abstractagent-0.3.10 → abstractagent-0.3.12}/src/abstractagent/logic/builtins.py +0 -0
  25. {abstractagent-0.3.10 → abstractagent-0.3.12}/src/abstractagent/logic/codeact.py +0 -0
  26. {abstractagent-0.3.10 → abstractagent-0.3.12}/src/abstractagent/logic/memact.py +0 -0
  27. {abstractagent-0.3.10 → abstractagent-0.3.12}/src/abstractagent/logic/react.py +0 -0
  28. {abstractagent-0.3.10 → abstractagent-0.3.12}/src/abstractagent/logic/types.py +0 -0
  29. {abstractagent-0.3.10 → abstractagent-0.3.12}/src/abstractagent/repl.py +0 -0
  30. {abstractagent-0.3.10 → abstractagent-0.3.12}/src/abstractagent/sandbox/__init__.py +0 -0
  31. {abstractagent-0.3.10 → abstractagent-0.3.12}/src/abstractagent/sandbox/interface.py +0 -0
  32. {abstractagent-0.3.10 → abstractagent-0.3.12}/src/abstractagent/sandbox/local.py +0 -0
  33. {abstractagent-0.3.10 → abstractagent-0.3.12}/src/abstractagent/scripts/__init__.py +0 -0
  34. {abstractagent-0.3.10 → abstractagent-0.3.12}/src/abstractagent/scripts/lmstudio_tool_eval.py +0 -0
  35. {abstractagent-0.3.10 → abstractagent-0.3.12}/src/abstractagent/tools/__init__.py +0 -0
  36. {abstractagent-0.3.10 → abstractagent-0.3.12}/src/abstractagent/tools/code_execution.py +0 -0
  37. {abstractagent-0.3.10 → abstractagent-0.3.12}/src/abstractagent/tools/self_improve.py +0 -0
  38. {abstractagent-0.3.10 → abstractagent-0.3.12}/src/abstractagent.egg-info/SOURCES.txt +0 -0
  39. {abstractagent-0.3.10 → abstractagent-0.3.12}/src/abstractagent.egg-info/dependency_links.txt +0 -0
  40. {abstractagent-0.3.10 → abstractagent-0.3.12}/src/abstractagent.egg-info/entry_points.txt +0 -0
  41. {abstractagent-0.3.10 → abstractagent-0.3.12}/src/abstractagent.egg-info/top_level.txt +0 -0
  42. {abstractagent-0.3.10 → abstractagent-0.3.12}/tests/test_active_context_policy_adoption.py +0 -0
  43. {abstractagent-0.3.10 → abstractagent-0.3.12}/tests/test_agent_plan_review_modes.py +0 -0
  44. {abstractagent-0.3.10 → abstractagent-0.3.12}/tests/test_agents_integration_llm.py +0 -0
  45. {abstractagent-0.3.10 → abstractagent-0.3.12}/tests/test_base_agent_trace_accessors.py +0 -0
  46. {abstractagent-0.3.10 → abstractagent-0.3.12}/tests/test_builtin_tool_specs_optional_defaults.py +0 -0
  47. {abstractagent-0.3.10 → abstractagent-0.3.12}/tests/test_codeact_logic.py +0 -0
  48. {abstractagent-0.3.10 → abstractagent-0.3.12}/tests/test_codeact_runtime_verifier_policy.py +0 -0
  49. {abstractagent-0.3.10 → abstractagent-0.3.12}/tests/test_llm_call_payload_requires_prompt_or_messages.py +0 -0
  50. {abstractagent-0.3.10 → abstractagent-0.3.12}/tests/test_memact_session_memory.py +0 -0
  51. {abstractagent-0.3.10 → abstractagent-0.3.12}/tests/test_memact_workflow.py +0 -0
  52. {abstractagent-0.3.10 → abstractagent-0.3.12}/tests/test_memory_recall_tool.py +0 -0
  53. {abstractagent-0.3.10 → abstractagent-0.3.12}/tests/test_open_attachment_tool_available.py +0 -0
  54. {abstractagent-0.3.10 → abstractagent-0.3.12}/tests/test_react_active_attachments_disable_tools_first_iteration.py +0 -0
  55. {abstractagent-0.3.10 → abstractagent-0.3.12}/tests/test_react_adapter_forwards_context_attachments_media.py +0 -0
  56. {abstractagent-0.3.10 → abstractagent-0.3.12}/tests/test_react_delegate_agent_tool.py +0 -0
  57. {abstractagent-0.3.10 → abstractagent-0.3.12}/tests/test_react_logic.py +0 -0
  58. {abstractagent-0.3.10 → abstractagent-0.3.12}/tests/test_react_loop_context_transcript_levels.py +0 -0
  59. {abstractagent-0.3.10 → abstractagent-0.3.12}/tests/test_react_loop_followthrough_retry.py +0 -0
  60. {abstractagent-0.3.10 → abstractagent-0.3.12}/tests/test_react_loop_side_effect_dedupe_comms.py +0 -0
  61. {abstractagent-0.3.10 → abstractagent-0.3.12}/tests/test_react_loop_truncated_output_retry.py +0 -0
  62. {abstractagent-0.3.10 → abstractagent-0.3.12}/tests/test_react_max_iterations_concludes.py +0 -0
  63. {abstractagent-0.3.10 → abstractagent-0.3.12}/tests/test_react_planish_heuristic.py +0 -0
  64. {abstractagent-0.3.10 → abstractagent-0.3.12}/tests/test_react_workflow_system_prompt_and_tools_override.py +0 -0
  65. {abstractagent-0.3.10 → abstractagent-0.3.12}/tests/test_react_workflow_toolset_refresh.py +0 -0
  66. {abstractagent-0.3.10 → abstractagent-0.3.12}/tests/test_run_start_seeds_runtime_provider_model.py +0 -0
  67. {abstractagent-0.3.10 → abstractagent-0.3.12}/tests/test_session_memory.py +0 -0
  68. {abstractagent-0.3.10 → abstractagent-0.3.12}/tests/test_tool_observe_emits_result_for_tui.py +0 -0
  69. {abstractagent-0.3.10 → abstractagent-0.3.12}/tests/test_tools_editing.py +0 -0
@@ -1,18 +1,18 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: abstractagent
3
- Version: 0.3.10
3
+ Version: 0.3.12
4
4
  Summary: Agent implementations using AbstractRuntime and AbstractCore
5
5
  Requires-Python: >=3.10
6
6
  Description-Content-Type: text/markdown
7
7
  License-File: LICENSE
8
- Requires-Dist: abstractcore[tools]>=2.13.31
9
- Requires-Dist: abstractruntime>=0.4.26
8
+ Requires-Dist: abstractcore[tools]>=2.13.38
9
+ Requires-Dist: abstractruntime>=0.4.29
10
10
  Provides-Extra: apple
11
- Requires-Dist: abstractcore[all-apple]>=2.13.31; extra == "apple"
12
- Requires-Dist: abstractruntime[apple]>=0.4.26; extra == "apple"
11
+ Requires-Dist: abstractcore[all-apple]>=2.13.38; extra == "apple"
12
+ Requires-Dist: abstractruntime[apple]>=0.4.29; extra == "apple"
13
13
  Provides-Extra: gpu
14
- Requires-Dist: abstractcore[all-gpu]>=2.13.31; extra == "gpu"
15
- Requires-Dist: abstractruntime[gpu]>=0.4.26; extra == "gpu"
14
+ Requires-Dist: abstractcore[all-gpu]>=2.13.38; extra == "gpu"
15
+ Requires-Dist: abstractruntime[gpu]>=0.4.29; extra == "gpu"
16
16
  Provides-Extra: dev
17
17
  Requires-Dist: pytest>=7.0; extra == "dev"
18
18
  Provides-Extra: test
@@ -59,6 +59,8 @@ flowchart LR
59
59
  - **MemAct**: memory-enhanced agent using runtime-owned Active Memory
60
60
  - **Durable runs**: pause/resume via `run_id` + runtime stores
61
61
  - **Tool control**: explicit tool bundles + per-run allowlists
62
+ - **Generation controls**: temperature, seed, media policy, prompt-cache binding,
63
+ and Core `thinking` are normalized before LLM calls
62
64
  - **Observability**: durable ledger of LLM calls, tool calls, and waits
63
65
 
64
66
  Where this lives in code (source of truth):
@@ -38,6 +38,8 @@ flowchart LR
38
38
  - **MemAct**: memory-enhanced agent using runtime-owned Active Memory
39
39
  - **Durable runs**: pause/resume via `run_id` + runtime stores
40
40
  - **Tool control**: explicit tool bundles + per-run allowlists
41
+ - **Generation controls**: temperature, seed, media policy, prompt-cache binding,
42
+ and Core `thinking` are normalized before LLM calls
41
43
  - **Observability**: durable ledger of LLM calls, tool calls, and waits
42
44
 
43
45
  Where this lives in code (source of truth):
@@ -4,23 +4,23 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "abstractagent"
7
- version = "0.3.10"
7
+ version = "0.3.12"
8
8
  description = "Agent implementations using AbstractRuntime and AbstractCore"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
11
11
  dependencies = [
12
- "abstractcore[tools]>=2.13.31",
13
- "abstractruntime>=0.4.26",
12
+ "abstractcore[tools]>=2.13.38",
13
+ "abstractruntime>=0.4.29",
14
14
  ]
15
15
 
16
16
  [project.optional-dependencies]
17
17
  apple = [
18
- "abstractcore[all-apple]>=2.13.31",
19
- "abstractruntime[apple]>=0.4.26",
18
+ "abstractcore[all-apple]>=2.13.38",
19
+ "abstractruntime[apple]>=0.4.29",
20
20
  ]
21
21
  gpu = [
22
- "abstractcore[all-gpu]>=2.13.31",
23
- "abstractruntime[gpu]>=0.4.26",
22
+ "abstractcore[all-gpu]>=2.13.38",
23
+ "abstractruntime[gpu]>=0.4.29",
24
24
  ]
25
25
  dev = [
26
26
  "pytest>=7.0",
@@ -1,7 +1,7 @@
1
1
  """Helpers for consistent generation params in AbstractAgent adapters.
2
2
 
3
3
  These adapters build `EffectType.LLM_CALL` payloads for AbstractRuntime. We want
4
- to expose a uniform `(temperature, seed)` interface across agents while keeping
4
+ to expose a uniform `(temperature, seed, thinking)` interface across agents while keeping
5
5
  backward compatibility with older runs that may not have these keys in
6
6
  `vars["_runtime"]`.
7
7
  """
@@ -28,6 +28,20 @@ def normalize_seed(seed: Any) -> Optional[int]:
28
28
  return None
29
29
 
30
30
 
31
+ def normalize_thinking(value: Any) -> Any:
32
+ """Return a provider-ready thinking value or None when unset.
33
+
34
+ Core owns provider-specific validation. Agent adapters only preserve explicit
35
+ booleans or non-empty strings and avoid sending empty UI values.
36
+ """
37
+ if isinstance(value, bool):
38
+ return value
39
+ if isinstance(value, str):
40
+ clean = value.strip()
41
+ return clean or None
42
+ return None
43
+
44
+
31
45
  def runtime_llm_params(
32
46
  runtime_ns: Dict[str, Any],
33
47
  *,
@@ -40,6 +54,9 @@ def runtime_llm_params(
40
54
  1) `runtime_ns.temperature` / `runtime_ns.seed` when present
41
55
  2) `extra.temperature` / `extra.seed` (step-specific defaults)
42
56
  3) `default_temperature` (only for temperature)
57
+
58
+ `thinking` is copied from `extra.thinking` when explicitly set, otherwise
59
+ from `runtime_ns.thinking`. Empty strings are treated as unset.
43
60
  """
44
61
  out: Dict[str, Any] = dict(extra or {})
45
62
 
@@ -64,6 +81,15 @@ def runtime_llm_params(
64
81
  else:
65
82
  out.pop("seed", None)
66
83
 
84
+ thinking_val = out.get("thinking")
85
+ thinking_norm = normalize_thinking(thinking_val)
86
+ if thinking_norm is None and isinstance(runtime_ns, dict):
87
+ thinking_norm = normalize_thinking(runtime_ns.get("thinking"))
88
+ if thinking_norm is not None:
89
+ out["thinking"] = thinking_norm
90
+ else:
91
+ out.pop("thinking", None)
92
+
67
93
  # Pass-through media policies (runtime-owned defaults).
68
94
  #
69
95
  # This keeps thin clients simple: they can set `_runtime.audio_policy` (and
@@ -1,18 +1,18 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: abstractagent
3
- Version: 0.3.10
3
+ Version: 0.3.12
4
4
  Summary: Agent implementations using AbstractRuntime and AbstractCore
5
5
  Requires-Python: >=3.10
6
6
  Description-Content-Type: text/markdown
7
7
  License-File: LICENSE
8
- Requires-Dist: abstractcore[tools]>=2.13.31
9
- Requires-Dist: abstractruntime>=0.4.26
8
+ Requires-Dist: abstractcore[tools]>=2.13.38
9
+ Requires-Dist: abstractruntime>=0.4.29
10
10
  Provides-Extra: apple
11
- Requires-Dist: abstractcore[all-apple]>=2.13.31; extra == "apple"
12
- Requires-Dist: abstractruntime[apple]>=0.4.26; extra == "apple"
11
+ Requires-Dist: abstractcore[all-apple]>=2.13.38; extra == "apple"
12
+ Requires-Dist: abstractruntime[apple]>=0.4.29; extra == "apple"
13
13
  Provides-Extra: gpu
14
- Requires-Dist: abstractcore[all-gpu]>=2.13.31; extra == "gpu"
15
- Requires-Dist: abstractruntime[gpu]>=0.4.26; extra == "gpu"
14
+ Requires-Dist: abstractcore[all-gpu]>=2.13.38; extra == "gpu"
15
+ Requires-Dist: abstractruntime[gpu]>=0.4.29; extra == "gpu"
16
16
  Provides-Extra: dev
17
17
  Requires-Dist: pytest>=7.0; extra == "dev"
18
18
  Provides-Extra: test
@@ -59,6 +59,8 @@ flowchart LR
59
59
  - **MemAct**: memory-enhanced agent using runtime-owned Active Memory
60
60
  - **Durable runs**: pause/resume via `run_id` + runtime stores
61
61
  - **Tool control**: explicit tool bundles + per-run allowlists
62
+ - **Generation controls**: temperature, seed, media policy, prompt-cache binding,
63
+ and Core `thinking` are normalized before LLM calls
62
64
  - **Observability**: durable ledger of LLM calls, tool calls, and waits
63
65
 
64
66
  Where this lives in code (source of truth):
@@ -0,0 +1,16 @@
1
+ abstractcore[tools]>=2.13.38
2
+ abstractruntime>=0.4.29
3
+
4
+ [apple]
5
+ abstractcore[all-apple]>=2.13.38
6
+ abstractruntime[apple]>=0.4.29
7
+
8
+ [dev]
9
+ pytest>=7.0
10
+
11
+ [gpu]
12
+ abstractcore[all-gpu]>=2.13.38
13
+ abstractruntime[gpu]>=0.4.29
14
+
15
+ [test]
16
+ pytest>=7.0
@@ -49,3 +49,30 @@ def test_runtime_llm_params_keeps_explicit_prompt_cache_binding_override() -> No
49
49
  )
50
50
 
51
51
  assert out["prompt_cache_binding"] == "explicit-binding-id"
52
+
53
+
54
+ @pytest.mark.basic
55
+ def test_runtime_llm_params_forwards_thinking_from_runtime_ns() -> None:
56
+ from abstractagent.adapters.generation_params import runtime_llm_params
57
+
58
+ out = runtime_llm_params({"thinking": " high "}, extra={"temperature": 0.2})
59
+
60
+ assert out["thinking"] == "high"
61
+
62
+
63
+ @pytest.mark.basic
64
+ def test_runtime_llm_params_keeps_explicit_thinking_override() -> None:
65
+ from abstractagent.adapters.generation_params import runtime_llm_params
66
+
67
+ out = runtime_llm_params({"thinking": "high"}, extra={"thinking": "low", "temperature": 0.2})
68
+
69
+ assert out["thinking"] == "low"
70
+
71
+
72
+ @pytest.mark.basic
73
+ def test_runtime_llm_params_forwards_boolean_thinking() -> None:
74
+ from abstractagent.adapters.generation_params import runtime_llm_params
75
+
76
+ out = runtime_llm_params({"thinking": False}, extra={"temperature": 0.2})
77
+
78
+ assert out["thinking"] is False
@@ -18,20 +18,20 @@ def _project() -> dict:
18
18
  def test_base_dependency_floors_match_gateway_alignment() -> None:
19
19
  deps = set(_project()["dependencies"])
20
20
 
21
- assert "abstractcore[tools]>=2.13.31" in deps
22
- assert "abstractruntime>=0.4.26" in deps
21
+ assert "abstractcore[tools]>=2.13.38" in deps
22
+ assert "abstractruntime>=0.4.29" in deps
23
23
 
24
24
 
25
25
  def test_hardware_profile_extras_are_core_runtime_cascades() -> None:
26
26
  extras = _project()["optional-dependencies"]
27
27
 
28
28
  assert set(extras["apple"]) == {
29
- "abstractcore[all-apple]>=2.13.31",
30
- "abstractruntime[apple]>=0.4.26",
29
+ "abstractcore[all-apple]>=2.13.38",
30
+ "abstractruntime[apple]>=0.4.29",
31
31
  }
32
32
  assert set(extras["gpu"]) == {
33
- "abstractcore[all-gpu]>=2.13.31",
34
- "abstractruntime[gpu]>=0.4.26",
33
+ "abstractcore[all-gpu]>=2.13.38",
34
+ "abstractruntime[gpu]>=0.4.29",
35
35
  }
36
36
  assert "all-apple" not in extras
37
37
  assert "all-gpu" not in extras
@@ -1,16 +0,0 @@
1
- abstractcore[tools]>=2.13.31
2
- abstractruntime>=0.4.26
3
-
4
- [apple]
5
- abstractcore[all-apple]>=2.13.31
6
- abstractruntime[apple]>=0.4.26
7
-
8
- [dev]
9
- pytest>=7.0
10
-
11
- [gpu]
12
- abstractcore[all-gpu]>=2.13.31
13
- abstractruntime[gpu]>=0.4.26
14
-
15
- [test]
16
- pytest>=7.0
File without changes
File without changes