AbstractRuntime 0.4.0__py3-none-any.whl → 0.4.1__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.
- abstractruntime/__init__.py +76 -1
- abstractruntime/core/config.py +68 -1
- abstractruntime/core/models.py +5 -0
- abstractruntime/core/policy.py +74 -3
- abstractruntime/core/runtime.py +1002 -126
- abstractruntime/core/vars.py +8 -2
- abstractruntime/evidence/recorder.py +1 -1
- abstractruntime/history_bundle.py +772 -0
- abstractruntime/integrations/abstractcore/__init__.py +3 -0
- abstractruntime/integrations/abstractcore/default_tools.py +127 -3
- abstractruntime/integrations/abstractcore/effect_handlers.py +2440 -99
- abstractruntime/integrations/abstractcore/embeddings_client.py +69 -0
- abstractruntime/integrations/abstractcore/factory.py +68 -20
- abstractruntime/integrations/abstractcore/llm_client.py +447 -15
- abstractruntime/integrations/abstractcore/mcp_worker.py +1 -0
- abstractruntime/integrations/abstractcore/session_attachments.py +946 -0
- abstractruntime/integrations/abstractcore/tool_executor.py +31 -10
- abstractruntime/integrations/abstractcore/workspace_scoped_tools.py +561 -0
- abstractruntime/integrations/abstractmemory/__init__.py +3 -0
- abstractruntime/integrations/abstractmemory/effect_handlers.py +946 -0
- abstractruntime/memory/active_context.py +6 -1
- abstractruntime/memory/kg_packets.py +164 -0
- abstractruntime/memory/memact_composer.py +175 -0
- abstractruntime/memory/recall_levels.py +163 -0
- abstractruntime/memory/token_budget.py +86 -0
- abstractruntime/storage/__init__.py +4 -1
- abstractruntime/storage/artifacts.py +158 -30
- abstractruntime/storage/base.py +17 -1
- abstractruntime/storage/commands.py +339 -0
- abstractruntime/storage/in_memory.py +41 -1
- abstractruntime/storage/json_files.py +195 -12
- abstractruntime/storage/observable.py +38 -1
- abstractruntime/storage/offloading.py +433 -0
- abstractruntime/storage/sqlite.py +836 -0
- abstractruntime/visualflow_compiler/__init__.py +29 -0
- abstractruntime/visualflow_compiler/adapters/__init__.py +11 -0
- abstractruntime/visualflow_compiler/adapters/agent_adapter.py +126 -0
- abstractruntime/visualflow_compiler/adapters/context_adapter.py +109 -0
- abstractruntime/visualflow_compiler/adapters/control_adapter.py +615 -0
- abstractruntime/visualflow_compiler/adapters/effect_adapter.py +1051 -0
- abstractruntime/visualflow_compiler/adapters/event_adapter.py +307 -0
- abstractruntime/visualflow_compiler/adapters/function_adapter.py +97 -0
- abstractruntime/visualflow_compiler/adapters/memact_adapter.py +114 -0
- abstractruntime/visualflow_compiler/adapters/subflow_adapter.py +74 -0
- abstractruntime/visualflow_compiler/adapters/variable_adapter.py +316 -0
- abstractruntime/visualflow_compiler/compiler.py +3832 -0
- abstractruntime/visualflow_compiler/flow.py +247 -0
- abstractruntime/visualflow_compiler/visual/__init__.py +13 -0
- abstractruntime/visualflow_compiler/visual/agent_ids.py +29 -0
- abstractruntime/visualflow_compiler/visual/builtins.py +1376 -0
- abstractruntime/visualflow_compiler/visual/code_executor.py +214 -0
- abstractruntime/visualflow_compiler/visual/executor.py +2804 -0
- abstractruntime/visualflow_compiler/visual/models.py +211 -0
- abstractruntime/workflow_bundle/__init__.py +52 -0
- abstractruntime/workflow_bundle/models.py +236 -0
- abstractruntime/workflow_bundle/packer.py +317 -0
- abstractruntime/workflow_bundle/reader.py +87 -0
- abstractruntime/workflow_bundle/registry.py +587 -0
- abstractruntime-0.4.1.dist-info/METADATA +177 -0
- abstractruntime-0.4.1.dist-info/RECORD +86 -0
- abstractruntime-0.4.0.dist-info/METADATA +0 -167
- abstractruntime-0.4.0.dist-info/RECORD +0 -49
- {abstractruntime-0.4.0.dist-info → abstractruntime-0.4.1.dist-info}/WHEEL +0 -0
- {abstractruntime-0.4.0.dist-info → abstractruntime-0.4.1.dist-info}/entry_points.txt +0 -0
- {abstractruntime-0.4.0.dist-info → abstractruntime-0.4.1.dist-info}/licenses/LICENSE +0 -0
abstractruntime/core/vars.py
CHANGED
|
@@ -23,6 +23,11 @@ TEMP = "_temp"
|
|
|
23
23
|
LIMITS = "_limits" # Canonical storage for runtime resource limits
|
|
24
24
|
NODE_TRACES = "node_traces" # _runtime namespace key for per-node execution traces
|
|
25
25
|
|
|
26
|
+
# Fallback context window size used only when model capabilities are unavailable.
|
|
27
|
+
# In normal operation (AbstractCore-integrated runtimes), this is derived from
|
|
28
|
+
# `abstractcore.architectures.detection.get_model_capabilities(...)`.
|
|
29
|
+
DEFAULT_MAX_TOKENS = 32768
|
|
30
|
+
|
|
26
31
|
|
|
27
32
|
def ensure_namespaces(vars: Dict[str, Any]) -> Dict[str, Any]:
|
|
28
33
|
"""Ensure the four canonical namespaces exist and are dicts."""
|
|
@@ -70,7 +75,7 @@ def ensure_limits(vars: Dict[str, Any]) -> Dict[str, Any]:
|
|
|
70
75
|
|
|
71
76
|
This is the canonical location for runtime resource limits:
|
|
72
77
|
- max_iterations / current_iteration: Iteration control
|
|
73
|
-
- max_tokens / estimated_tokens_used: Token/context window management
|
|
78
|
+
- max_tokens / max_input_tokens / max_output_tokens / estimated_tokens_used: Token/context window management
|
|
74
79
|
- max_history_messages: Conversation history limit (-1 = unlimited)
|
|
75
80
|
- warn_*_pct: Warning thresholds for proactive notifications
|
|
76
81
|
|
|
@@ -108,8 +113,9 @@ def _default_limits() -> Dict[str, Any]:
|
|
|
108
113
|
return {
|
|
109
114
|
"max_iterations": 25,
|
|
110
115
|
"current_iteration": 0,
|
|
111
|
-
"max_tokens":
|
|
116
|
+
"max_tokens": DEFAULT_MAX_TOKENS,
|
|
112
117
|
"max_output_tokens": None,
|
|
118
|
+
"max_input_tokens": None,
|
|
113
119
|
"max_history_messages": -1,
|
|
114
120
|
"estimated_tokens_used": 0,
|
|
115
121
|
"warn_iterations_pct": 80,
|
|
@@ -169,6 +169,7 @@ class EvidenceRecorder:
|
|
|
169
169
|
if tool_name == "fetch_url":
|
|
170
170
|
url = str(args_dict.get("url") or "")
|
|
171
171
|
if url:
|
|
172
|
+
#[WARNING:TRUNCATION] bounded tag value (indexing)
|
|
172
173
|
tags["url"] = url[:200]
|
|
173
174
|
|
|
174
175
|
if isinstance(output_dict, dict):
|
|
@@ -322,4 +323,3 @@ class EvidenceRecorder:
|
|
|
322
323
|
|
|
323
324
|
return EvidenceCaptureStats(recorded=recorded)
|
|
324
325
|
|
|
325
|
-
|