aury-agent 0.0.4__py3-none-any.whl → 0.0.6__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.
- aury/agents/context_providers/message.py +8 -5
- aury/agents/core/base.py +11 -0
- aury/agents/core/factory.py +8 -0
- aury/agents/core/parallel.py +26 -4
- aury/agents/core/state.py +25 -0
- aury/agents/core/types/tool.py +1 -0
- aury/agents/hitl/ask_user.py +44 -0
- aury/agents/llm/adapter.py +55 -26
- aury/agents/llm/openai.py +5 -1
- aury/agents/memory/manager.py +33 -2
- aury/agents/messages/store.py +27 -1
- aury/agents/middleware/base.py +57 -0
- aury/agents/middleware/chain.py +81 -18
- aury/agents/react/agent.py +161 -1484
- aury/agents/react/context.py +309 -0
- aury/agents/react/factory.py +301 -0
- aury/agents/react/pause.py +241 -0
- aury/agents/react/persistence.py +182 -0
- aury/agents/react/step.py +680 -0
- aury/agents/react/tools.py +323 -0
- aury/agents/tool/builtin/bash.py +11 -0
- aury/agents/tool/builtin/delegate.py +38 -3
- aury/agents/tool/builtin/edit.py +16 -0
- aury/agents/tool/builtin/plan.py +19 -0
- aury/agents/tool/builtin/read.py +13 -0
- aury/agents/tool/builtin/thinking.py +10 -4
- aury/agents/tool/builtin/yield_result.py +9 -6
- aury/agents/tool/set.py +23 -0
- aury/agents/workflow/adapter.py +22 -3
- aury/agents/workflow/executor.py +51 -7
- {aury_agent-0.0.4.dist-info → aury_agent-0.0.6.dist-info}/METADATA +1 -1
- {aury_agent-0.0.4.dist-info → aury_agent-0.0.6.dist-info}/RECORD +34 -28
- {aury_agent-0.0.4.dist-info → aury_agent-0.0.6.dist-info}/WHEEL +0 -0
- {aury_agent-0.0.4.dist-info → aury_agent-0.0.6.dist-info}/entry_points.txt +0 -0
|
@@ -79,17 +79,14 @@ This will end your current session and resume the parent."""
|
|
|
79
79
|
result_text = params.get("result", "")
|
|
80
80
|
data = params.get("data", {})
|
|
81
81
|
status = params.get("status", "completed")
|
|
82
|
+
invocation_id = ctx.invocation_id if ctx else None
|
|
82
83
|
|
|
83
84
|
logger.info(
|
|
84
|
-
"
|
|
85
|
-
extra={
|
|
86
|
-
"parent_invocation_id": self.parent_invocation_id,
|
|
87
|
-
"status": status,
|
|
88
|
-
},
|
|
85
|
+
f"YieldResultTool: yielding to parent, parent_invocation_id={self.parent_invocation_id}, status={status}, data_keys={list(data.keys())}, result_len={len(result_text)}, invocation_id={invocation_id}"
|
|
89
86
|
)
|
|
90
87
|
|
|
91
88
|
# Emit YIELD block
|
|
92
|
-
await self._emit_yield_block(ctx, result_text, data, status)
|
|
89
|
+
await self._emit_yield_block(ctx, result_text, data, status, invocation_id)
|
|
93
90
|
|
|
94
91
|
# Note: Real implementation would:
|
|
95
92
|
# 1. Pop current frame from session.control_stack
|
|
@@ -97,6 +94,7 @@ This will end your current session and resume the parent."""
|
|
|
97
94
|
# 3. Update state to trigger parent resumption
|
|
98
95
|
# 4. End current invocation
|
|
99
96
|
|
|
97
|
+
logger.debug(f"YieldResultTool: returning to parent, invocation_id={invocation_id}")
|
|
100
98
|
return ToolResult(output=f"Returning to parent agent with status: {status}\nResult: {result_text}")
|
|
101
99
|
|
|
102
100
|
async def _emit_yield_block(
|
|
@@ -105,12 +103,16 @@ This will end your current session and resume the parent."""
|
|
|
105
103
|
result: str,
|
|
106
104
|
data: dict[str, Any],
|
|
107
105
|
status: str,
|
|
106
|
+
invocation_id: int | None = None,
|
|
108
107
|
) -> None:
|
|
109
108
|
"""Emit YIELD block."""
|
|
110
109
|
emit = getattr(ctx, 'emit', None)
|
|
111
110
|
if emit is None:
|
|
111
|
+
logger.debug(f"YieldResultTool: emit not available, invocation_id={invocation_id}")
|
|
112
112
|
return
|
|
113
113
|
|
|
114
|
+
logger.debug(f"YieldResultTool: emitting yield block, status={status}, invocation_id={invocation_id}")
|
|
115
|
+
|
|
114
116
|
block = BlockEvent(
|
|
115
117
|
kind=BlockKind.YIELD,
|
|
116
118
|
op=BlockOp.APPLY,
|
|
@@ -125,6 +127,7 @@ This will end your current session and resume the parent."""
|
|
|
125
127
|
)
|
|
126
128
|
|
|
127
129
|
await emit(block)
|
|
130
|
+
logger.debug(f"YieldResultTool: yield block emitted successfully, invocation_id={invocation_id}")
|
|
128
131
|
|
|
129
132
|
|
|
130
133
|
__all__ = ["YieldResultTool"]
|
aury/agents/tool/set.py
CHANGED
|
@@ -4,6 +4,7 @@ from __future__ import annotations
|
|
|
4
4
|
from typing import Any, Callable
|
|
5
5
|
|
|
6
6
|
from ..core.types.tool import BaseTool, ToolInfo
|
|
7
|
+
from ..core.logging import tool_logger as logger
|
|
7
8
|
|
|
8
9
|
|
|
9
10
|
class ToolSet:
|
|
@@ -44,9 +45,11 @@ class ToolSet:
|
|
|
44
45
|
Returns:
|
|
45
46
|
New ToolSet containing all tools
|
|
46
47
|
"""
|
|
48
|
+
logger.debug(f"ToolSet.from_list creating with {len(tools)} tools")
|
|
47
49
|
ts = cls()
|
|
48
50
|
for tool in tools:
|
|
49
51
|
ts.add(tool)
|
|
52
|
+
logger.debug(f"ToolSet.from_list completed, total tools={len(ts)}")
|
|
50
53
|
return ts
|
|
51
54
|
|
|
52
55
|
def add(
|
|
@@ -71,12 +74,15 @@ class ToolSet:
|
|
|
71
74
|
factory = tool
|
|
72
75
|
|
|
73
76
|
if tool_name in self._tools and not replace:
|
|
77
|
+
logger.warning(f"ToolSet.add: tool already registered, tool={tool_name}")
|
|
74
78
|
raise ValueError(f"Tool already registered: {tool_name}")
|
|
75
79
|
|
|
80
|
+
logger.debug(f"ToolSet.add: adding tool, tool={tool_name}, replace={replace}, total_before={len(self._tools)}")
|
|
76
81
|
self._tools[tool_name] = factory
|
|
77
82
|
# Clear cached instance
|
|
78
83
|
if tool_name in self._instances:
|
|
79
84
|
del self._instances[tool_name]
|
|
85
|
+
logger.debug(f"ToolSet.add: tool added, tool={tool_name}, total_after={len(self._tools)}")
|
|
80
86
|
|
|
81
87
|
def remove(self, tool_id: str) -> bool:
|
|
82
88
|
"""Remove a tool from the set.
|
|
@@ -88,10 +94,13 @@ class ToolSet:
|
|
|
88
94
|
True if tool was removed, False if not found
|
|
89
95
|
"""
|
|
90
96
|
if tool_id in self._tools:
|
|
97
|
+
logger.debug(f"ToolSet.remove: removing tool, tool={tool_id}")
|
|
91
98
|
del self._tools[tool_id]
|
|
92
99
|
if tool_id in self._instances:
|
|
93
100
|
del self._instances[tool_id]
|
|
101
|
+
logger.debug(f"ToolSet.remove: tool removed, tool={tool_id}, total={len(self._tools)}")
|
|
94
102
|
return True
|
|
103
|
+
logger.debug(f"ToolSet.remove: tool not found, tool={tool_id}")
|
|
95
104
|
return False
|
|
96
105
|
|
|
97
106
|
def get(self, tool_id: str, cached: bool = True) -> BaseTool:
|
|
@@ -108,11 +117,14 @@ class ToolSet:
|
|
|
108
117
|
KeyError: If tool not found
|
|
109
118
|
"""
|
|
110
119
|
if tool_id not in self._tools:
|
|
120
|
+
logger.warning(f"ToolSet.get: tool not found, tool={tool_id}")
|
|
111
121
|
raise KeyError(f"Tool not found: {tool_id}")
|
|
112
122
|
|
|
113
123
|
if cached and tool_id in self._instances:
|
|
124
|
+
logger.debug(f"ToolSet.get: returning cached instance, tool={tool_id}")
|
|
114
125
|
return self._instances[tool_id]
|
|
115
126
|
|
|
127
|
+
logger.debug(f"ToolSet.get: instantiating tool, tool={tool_id}, cached={cached}")
|
|
116
128
|
instance = self._tools[tool_id]()
|
|
117
129
|
if cached:
|
|
118
130
|
self._instances[tool_id] = instance
|
|
@@ -153,19 +165,24 @@ class ToolSet:
|
|
|
153
165
|
Returns:
|
|
154
166
|
New ToolSet with filtered tools
|
|
155
167
|
"""
|
|
168
|
+
logger.debug(f"ToolSet.filtered: creating filtered set, include={include}, exclude={exclude}, total_before={len(self._tools)}")
|
|
156
169
|
filtered = ToolSet()
|
|
170
|
+
excluded_count = 0
|
|
157
171
|
|
|
158
172
|
for tool_id, factory in self._tools.items():
|
|
159
173
|
# Check include filter
|
|
160
174
|
if include is not None and tool_id not in include:
|
|
175
|
+
excluded_count += 1
|
|
161
176
|
continue
|
|
162
177
|
|
|
163
178
|
# Check exclude filter
|
|
164
179
|
if exclude is not None and tool_id in exclude:
|
|
180
|
+
excluded_count += 1
|
|
165
181
|
continue
|
|
166
182
|
|
|
167
183
|
filtered._tools[tool_id] = factory
|
|
168
184
|
|
|
185
|
+
logger.debug(f"ToolSet.filtered: filtered set created, total_after={len(filtered._tools)}, excluded={excluded_count}")
|
|
169
186
|
return filtered
|
|
170
187
|
|
|
171
188
|
def merge(self, other: "ToolSet", replace: bool = False) -> "ToolSet":
|
|
@@ -178,19 +195,25 @@ class ToolSet:
|
|
|
178
195
|
Returns:
|
|
179
196
|
Self for chaining
|
|
180
197
|
"""
|
|
198
|
+
logger.debug(f"ToolSet.merge: merging, other_size={len(other)}, total_before={len(self._tools)}, replace={replace}")
|
|
199
|
+
merged_count = 0
|
|
181
200
|
for tool_id, factory in other._tools.items():
|
|
182
201
|
if tool_id not in self._tools or replace:
|
|
202
|
+
merged_count += 1
|
|
183
203
|
self._tools[tool_id] = factory
|
|
204
|
+
logger.debug(f"ToolSet.merge: merge completed, merged={merged_count}, total_after={len(self._tools)}")
|
|
184
205
|
return self
|
|
185
206
|
|
|
186
207
|
def copy(self) -> "ToolSet":
|
|
187
208
|
"""Create a copy of this set."""
|
|
209
|
+
logger.debug(f"ToolSet.copy: copying set, size={len(self._tools)}")
|
|
188
210
|
new = ToolSet()
|
|
189
211
|
new._tools = dict(self._tools)
|
|
190
212
|
return new
|
|
191
213
|
|
|
192
214
|
def clear(self) -> None:
|
|
193
215
|
"""Clear all tools."""
|
|
216
|
+
logger.debug(f"ToolSet.clear: clearing set, total={len(self._tools)}")
|
|
194
217
|
self._tools.clear()
|
|
195
218
|
self._instances.clear()
|
|
196
219
|
|
aury/agents/workflow/adapter.py
CHANGED
|
@@ -139,6 +139,7 @@ class WorkflowAgent(BaseAgent):
|
|
|
139
139
|
Returns:
|
|
140
140
|
Self for chaining
|
|
141
141
|
"""
|
|
142
|
+
logger.debug(f"WorkflowAgent set_workflow, workflow_name={workflow.spec.name}, invocation_id={self.ctx.invocation_id}")
|
|
142
143
|
self.workflow = workflow
|
|
143
144
|
self.agent_factory = agent_factory
|
|
144
145
|
return self
|
|
@@ -159,6 +160,7 @@ class WorkflowAgent(BaseAgent):
|
|
|
159
160
|
raise ValueError("AgentFactory not set. Call set_workflow() first.")
|
|
160
161
|
|
|
161
162
|
inputs = input if isinstance(input, dict) else {"input": input}
|
|
163
|
+
logger.info(f"WorkflowAgent executing, workflow={self.workflow.spec.name}, invocation_id={self.ctx.invocation_id}")
|
|
162
164
|
|
|
163
165
|
# Build middleware context
|
|
164
166
|
mw_context = {
|
|
@@ -171,11 +173,12 @@ class WorkflowAgent(BaseAgent):
|
|
|
171
173
|
|
|
172
174
|
# === Middleware: on_agent_start ===
|
|
173
175
|
if self.middleware:
|
|
176
|
+
logger.debug(f"WorkflowAgent: processing on_agent_start hooks, invocation_id={self.ctx.invocation_id}")
|
|
174
177
|
hook_result = await self.middleware.process_agent_start(
|
|
175
178
|
self.name, inputs, mw_context
|
|
176
179
|
)
|
|
177
180
|
if hook_result.action == HookAction.STOP:
|
|
178
|
-
logger.
|
|
181
|
+
logger.warning(f"Workflow stopped by middleware on_agent_start, invocation_id={self.ctx.invocation_id}")
|
|
179
182
|
await self.ctx.emit(BlockEvent(
|
|
180
183
|
kind=BlockKind.ERROR,
|
|
181
184
|
op=BlockOp.APPLY,
|
|
@@ -183,10 +186,11 @@ class WorkflowAgent(BaseAgent):
|
|
|
183
186
|
))
|
|
184
187
|
return
|
|
185
188
|
elif hook_result.action == HookAction.SKIP:
|
|
186
|
-
logger.
|
|
189
|
+
logger.warning(f"Workflow skipped by middleware on_agent_start, invocation_id={self.ctx.invocation_id}")
|
|
187
190
|
return
|
|
188
191
|
|
|
189
192
|
try:
|
|
193
|
+
logger.debug(f"WorkflowAgent: creating executor, workflow={self.workflow.spec.name}, invocation_id={self.ctx.invocation_id}")
|
|
190
194
|
# Create executor with context (pass middleware)
|
|
191
195
|
self._executor = WorkflowExecutor(
|
|
192
196
|
workflow=self.workflow,
|
|
@@ -196,30 +200,36 @@ class WorkflowAgent(BaseAgent):
|
|
|
196
200
|
)
|
|
197
201
|
|
|
198
202
|
result = await self._executor.execute(inputs)
|
|
203
|
+
logger.info(f"WorkflowAgent: execution completed, workflow={self.workflow.spec.name}, invocation_id={self.ctx.invocation_id}")
|
|
199
204
|
|
|
200
205
|
# === Middleware: on_agent_end ===
|
|
201
206
|
if self.middleware:
|
|
207
|
+
logger.debug(f"WorkflowAgent: processing on_agent_end hooks, invocation_id={self.ctx.invocation_id}")
|
|
202
208
|
await self.middleware.process_agent_end(
|
|
203
209
|
self.name, result, mw_context
|
|
204
210
|
)
|
|
205
211
|
|
|
206
212
|
except Exception as e:
|
|
213
|
+
logger.error(f"WorkflowAgent: execution error, error={type(e).__name__}, workflow={self.workflow.spec.name}, invocation_id={self.ctx.invocation_id}", exc_info=True)
|
|
207
214
|
# === Middleware: on_error ===
|
|
208
215
|
if self.middleware:
|
|
216
|
+
logger.debug(f"WorkflowAgent: processing on_error hooks, invocation_id={self.ctx.invocation_id}")
|
|
209
217
|
processed_error = await self.middleware.process_error(e, mw_context)
|
|
210
218
|
if processed_error is None:
|
|
211
|
-
logger.
|
|
219
|
+
logger.warning(f"WorkflowAgent: error suppressed by middleware, invocation_id={self.ctx.invocation_id}")
|
|
212
220
|
return
|
|
213
221
|
raise
|
|
214
222
|
|
|
215
223
|
async def pause(self) -> str:
|
|
216
224
|
"""Pause workflow and return invocation ID."""
|
|
225
|
+
logger.info(f"WorkflowAgent pause requested, invocation_id={self.ctx.invocation_id}")
|
|
217
226
|
if self._executor:
|
|
218
227
|
self._executor.pause()
|
|
219
228
|
return self.ctx.invocation_id
|
|
220
229
|
|
|
221
230
|
async def _resume_internal(self, invocation_id: str) -> None:
|
|
222
231
|
"""Internal resume logic."""
|
|
232
|
+
logger.info(f"WorkflowAgent resuming, invocation_id={invocation_id}")
|
|
223
233
|
if self.workflow is None or self.agent_factory is None:
|
|
224
234
|
raise ValueError("Workflow not set. Call set_workflow() first.")
|
|
225
235
|
|
|
@@ -227,12 +237,15 @@ class WorkflowAgent(BaseAgent):
|
|
|
227
237
|
state_key = f"workflow_state:{invocation_id}"
|
|
228
238
|
if not self.ctx.backends or not self.ctx.backends.state:
|
|
229
239
|
raise ValueError("No state backend available")
|
|
240
|
+
logger.debug(f"WorkflowAgent: loading saved state, state_key={state_key}, invocation_id={invocation_id}")
|
|
230
241
|
saved_state = await self.ctx.backends.state.get("workflow", state_key)
|
|
231
242
|
|
|
232
243
|
if not saved_state:
|
|
244
|
+
logger.error(f"WorkflowAgent: no saved state found, state_key={state_key}, invocation_id={invocation_id}")
|
|
233
245
|
raise ValueError(f"No saved state for invocation: {invocation_id}")
|
|
234
246
|
|
|
235
247
|
inputs = saved_state.get("inputs", {})
|
|
248
|
+
logger.debug(f"WorkflowAgent: resume state loaded, inputs_keys={list(inputs.keys())}, invocation_id={invocation_id}")
|
|
236
249
|
|
|
237
250
|
# Create executor and resume
|
|
238
251
|
self._executor = WorkflowExecutor(
|
|
@@ -241,10 +254,12 @@ class WorkflowAgent(BaseAgent):
|
|
|
241
254
|
ctx=self.ctx,
|
|
242
255
|
)
|
|
243
256
|
|
|
257
|
+
logger.info(f"WorkflowAgent: resuming execution, workflow={self.workflow.spec.name}, invocation_id={invocation_id}")
|
|
244
258
|
await self._executor.execute(inputs, resume_state=saved_state)
|
|
245
259
|
|
|
246
260
|
async def resume(self, invocation_id: str) -> AsyncIterator[BlockEvent]:
|
|
247
261
|
"""Resume paused workflow."""
|
|
262
|
+
logger.debug(f"WorkflowAgent resume iterator started, invocation_id={invocation_id}")
|
|
248
263
|
import asyncio
|
|
249
264
|
from ..core.context import _emit_queue_var
|
|
250
265
|
|
|
@@ -253,15 +268,19 @@ class WorkflowAgent(BaseAgent):
|
|
|
253
268
|
|
|
254
269
|
try:
|
|
255
270
|
exec_task = asyncio.create_task(self._resume_internal(invocation_id))
|
|
271
|
+
block_count = 0
|
|
256
272
|
|
|
257
273
|
while not exec_task.done() or not queue.empty():
|
|
258
274
|
try:
|
|
259
275
|
block = await asyncio.wait_for(queue.get(), timeout=0.05)
|
|
276
|
+
block_count += 1
|
|
277
|
+
logger.debug(f"WorkflowAgent resume: yielding block, kind={block.kind}, block_num={block_count}, invocation_id={invocation_id}")
|
|
260
278
|
yield block
|
|
261
279
|
except asyncio.TimeoutError:
|
|
262
280
|
continue
|
|
263
281
|
|
|
264
282
|
await exec_task
|
|
283
|
+
logger.debug(f"WorkflowAgent resume: completed, total_blocks={block_count}, invocation_id={invocation_id}")
|
|
265
284
|
|
|
266
285
|
finally:
|
|
267
286
|
_emit_queue_var.reset(token)
|
aury/agents/workflow/executor.py
CHANGED
|
@@ -125,13 +125,21 @@ class WorkflowExecutor:
|
|
|
125
125
|
|
|
126
126
|
while not dag.is_finished() and not self.ctx.is_aborted and not self._paused and not self._waiting_for_input and not self._suspended:
|
|
127
127
|
ready_nodes = dag.get_ready_tasks()
|
|
128
|
+
logger.debug(
|
|
129
|
+
f"Workflow iteration - ready nodes: {len(ready_nodes)}, completed: {len(dag.completed)}",
|
|
130
|
+
extra={"workflow": self.workflow.spec.name, "invocation_id": self.ctx.invocation_id},
|
|
131
|
+
)
|
|
128
132
|
|
|
129
133
|
if not ready_nodes:
|
|
130
134
|
# Check if we're blocked due to failed dependencies
|
|
131
135
|
if dag.is_blocked():
|
|
132
|
-
logger.
|
|
136
|
+
logger.error(
|
|
133
137
|
"Workflow blocked due to failed dependencies",
|
|
134
|
-
extra={
|
|
138
|
+
extra={
|
|
139
|
+
"workflow": self.workflow.spec.name,
|
|
140
|
+
"invocation_id": self.ctx.invocation_id,
|
|
141
|
+
"failed_nodes": list(dag.failed),
|
|
142
|
+
},
|
|
135
143
|
)
|
|
136
144
|
# Mark remaining blocked nodes as skipped
|
|
137
145
|
processed = dag.completed | dag.failed | dag.running | dag.skipped
|
|
@@ -150,9 +158,17 @@ class WorkflowExecutor:
|
|
|
150
158
|
# Check condition
|
|
151
159
|
if node.when:
|
|
152
160
|
if not self.evaluator.evaluate_condition(node.when, eval_context):
|
|
161
|
+
logger.debug(
|
|
162
|
+
f"Node skipped by condition: {node.id}",
|
|
163
|
+
extra={"workflow": self.workflow.spec.name, "invocation_id": self.ctx.invocation_id},
|
|
164
|
+
)
|
|
153
165
|
dag.mark_skipped(node.id)
|
|
154
166
|
continue
|
|
155
167
|
|
|
168
|
+
logger.info(
|
|
169
|
+
f"Executing workflow node: {node.id} ({node.type.value})",
|
|
170
|
+
extra={"workflow": self.workflow.spec.name, "invocation_id": self.ctx.invocation_id},
|
|
171
|
+
)
|
|
156
172
|
dag.mark_running(node.id)
|
|
157
173
|
# Create task with explicit context to preserve ContextVars (emit_queue, parent_id)
|
|
158
174
|
task = asyncio.create_task(
|
|
@@ -305,6 +321,10 @@ class WorkflowExecutor:
|
|
|
305
321
|
match node.type:
|
|
306
322
|
case NodeType.TRIGGER:
|
|
307
323
|
# Start node - emit NODE block with inputs
|
|
324
|
+
logger.info(
|
|
325
|
+
"Workflow START node",
|
|
326
|
+
extra={"node_id": node.id, "invocation_id": self.ctx.invocation_id},
|
|
327
|
+
)
|
|
308
328
|
await self.ctx.emit(BlockEvent(
|
|
309
329
|
block_id=node_block_id,
|
|
310
330
|
kind=BlockKind.NODE,
|
|
@@ -330,6 +350,10 @@ class WorkflowExecutor:
|
|
|
330
350
|
|
|
331
351
|
case NodeType.TERMINAL:
|
|
332
352
|
# End node - emit NODE block with final output
|
|
353
|
+
logger.info(
|
|
354
|
+
"Workflow END node",
|
|
355
|
+
extra={"node_id": node.id, "invocation_id": self.ctx.invocation_id},
|
|
356
|
+
)
|
|
333
357
|
# Resolve output from node config or collect from state
|
|
334
358
|
output = self._state.to_dict()
|
|
335
359
|
if node.inputs:
|
|
@@ -363,6 +387,15 @@ class WorkflowExecutor:
|
|
|
363
387
|
# Resolve inputs
|
|
364
388
|
inputs = self.evaluator.resolve_inputs(node.inputs, eval_context)
|
|
365
389
|
|
|
390
|
+
logger.info(
|
|
391
|
+
f"Workflow AGENT node: {node.agent}",
|
|
392
|
+
extra={
|
|
393
|
+
"node_id": node.id,
|
|
394
|
+
"agent": node.agent,
|
|
395
|
+
"invocation_id": self.ctx.invocation_id,
|
|
396
|
+
},
|
|
397
|
+
)
|
|
398
|
+
|
|
366
399
|
# Emit NODE block with status "running"
|
|
367
400
|
await self.ctx.emit(BlockEvent(
|
|
368
401
|
block_id=node_block_id,
|
|
@@ -401,6 +434,10 @@ class WorkflowExecutor:
|
|
|
401
434
|
dag.mark_completed(node.id)
|
|
402
435
|
|
|
403
436
|
case NodeType.CONDITION:
|
|
437
|
+
logger.info(
|
|
438
|
+
f"Workflow CONDITION node: {node.id}",
|
|
439
|
+
extra={"node_id": node.id, "invocation_id": self.ctx.invocation_id},
|
|
440
|
+
)
|
|
404
441
|
await self._execute_condition_node(node, eval_context, dag)
|
|
405
442
|
|
|
406
443
|
case _:
|
|
@@ -408,12 +445,14 @@ class WorkflowExecutor:
|
|
|
408
445
|
|
|
409
446
|
except SuspendSignal as e:
|
|
410
447
|
# HITL/Pause signal from child agent or tool
|
|
411
|
-
logger.
|
|
412
|
-
"
|
|
448
|
+
logger.warning(
|
|
449
|
+
"Workflow node suspended (HITL)",
|
|
413
450
|
extra={
|
|
414
451
|
"node_id": node.id,
|
|
415
452
|
"signal_type": type(e).__name__,
|
|
416
|
-
|
|
453
|
+
"request_id": getattr(e, "request_id", None),
|
|
454
|
+
"invocation_id": self.ctx.invocation_id,
|
|
455
|
+
},
|
|
417
456
|
)
|
|
418
457
|
|
|
419
458
|
# Patch NODE block with suspended status
|
|
@@ -439,8 +478,13 @@ class WorkflowExecutor:
|
|
|
439
478
|
|
|
440
479
|
except Exception as e:
|
|
441
480
|
logger.error(
|
|
442
|
-
"
|
|
443
|
-
extra={
|
|
481
|
+
"Workflow node execution failed",
|
|
482
|
+
extra={
|
|
483
|
+
"node_id": node.id,
|
|
484
|
+
"error": str(e),
|
|
485
|
+
"invocation_id": self.ctx.invocation_id,
|
|
486
|
+
},
|
|
487
|
+
exc_info=True,
|
|
444
488
|
)
|
|
445
489
|
|
|
446
490
|
# Patch NODE block with failed status (if it was created)
|
|
@@ -50,21 +50,21 @@ aury/agents/context_providers/__init__.py,sha256=QlbTh2vAHbxfZcXjcY5mOsLqOiYkIYG
|
|
|
50
50
|
aury/agents/context_providers/artifact.py,sha256=tjjaseE2iosKLx6BAJ7kR5xmo9VsNY2ukkbj5NLHlC0,9144
|
|
51
51
|
aury/agents/context_providers/base.py,sha256=FhFRWJS_afDFTHl7Yjr6vGIje58IpEOlEolgqpFR-QQ,6246
|
|
52
52
|
aury/agents/context_providers/memory.py,sha256=HKIR5fRNzsZSV1-IjV325cTYIFqmNVPFPujufSI1CrY,1942
|
|
53
|
-
aury/agents/context_providers/message.py,sha256=
|
|
53
|
+
aury/agents/context_providers/message.py,sha256=3YkscDxhTzKkkCtCTOdRJHabXym0crJlu3eP2_A0lYY,4558
|
|
54
54
|
aury/agents/context_providers/skill.py,sha256=w_R1txvu45ruMjuOtckuD9oG_hqeFGqAa_NZ_0T8WNs,1355
|
|
55
55
|
aury/agents/context_providers/subagent.py,sha256=Y-6bYjaq6nbLS9d3siyy5eAt6SzFfk6N3Y1WU209lhI,1364
|
|
56
56
|
aury/agents/context_providers/tool.py,sha256=wQGmcZi_XuB9ukweg5PUVO93GLzley0xftje-iVSfq8,2266
|
|
57
57
|
aury/agents/core/__init__.py,sha256=-euIGAwoe2gU_2xEqJ8YmOMnDOaOlgWXwXxzIQnDG8E,1716
|
|
58
|
-
aury/agents/core/base.py,sha256=
|
|
58
|
+
aury/agents/core/base.py,sha256=5XKN_ta2Dnuo8OZILOImuR_scgHpXuznURfUpa_v_zQ,20877
|
|
59
59
|
aury/agents/core/context.py,sha256=EkMfWO8nRDGaacu7V5BNWco7Zb4TP7nuUAzb489jsuU,27892
|
|
60
60
|
aury/agents/core/context_builder.py,sha256=HF0hfnKBVCmlcFDmdyj53org90318ixmZl1LYQBl0fM,9075
|
|
61
|
-
aury/agents/core/factory.py,sha256=
|
|
61
|
+
aury/agents/core/factory.py,sha256=fwfU9ybQZ3ki0TfxRzvJmG8hPbAZlQ6sA4VuRd0r4iM,6593
|
|
62
62
|
aury/agents/core/isolator.py,sha256=zi_ZXk-a6b7D2EAeWH3FKkO5_7PwK975zRd9enbBf_E,2916
|
|
63
63
|
aury/agents/core/logging.py,sha256=zxJ8porWTAh1ugBdiA4D4s5bqFnR9KSwjsOv2me9rZY,2301
|
|
64
|
-
aury/agents/core/parallel.py,sha256=
|
|
64
|
+
aury/agents/core/parallel.py,sha256=xyRfhIg_hghogZ9g_dZuCFgh99GCpMQjYBhPWKtClJo,8204
|
|
65
65
|
aury/agents/core/runner.py,sha256=_PQyI_NXud2ttL6IR6Ih_hYFozgjS1OoHTOb1MOyfBs,4225
|
|
66
66
|
aury/agents/core/signals.py,sha256=13hPHbLfcbpEVsdFBNQ-URX4cHCbzp6weMa-EVMoWuI,3385
|
|
67
|
-
aury/agents/core/state.py,sha256=
|
|
67
|
+
aury/agents/core/state.py,sha256=wylbZ_1G-qEpQyjmj18v9_xBvoDgQfktCuvf-xNAa8U,11891
|
|
68
68
|
aury/agents/core/event_bus/__init__.py,sha256=VCxT694WadDYFdJQfijYE7REQBA9zHp3qEWFfPZfjqU,212
|
|
69
69
|
aury/agents/core/event_bus/bus.py,sha256=v4MDIStwRnU5ywsoi3VyUYIa5OIEuvjbzOseW8V7kkA,6259
|
|
70
70
|
aury/agents/core/services/__init__.py,sha256=FHTRvlGaSEUxfUzq8gcVDxXQpCskJZYDTryOXBEpe30,165
|
|
@@ -79,40 +79,46 @@ aury/agents/core/types/message.py,sha256=W0d8elddcbvW98bejDkHIzKiTigr6O5KxVuVUne
|
|
|
79
79
|
aury/agents/core/types/recall.py,sha256=BZSDgv8Q0eK7Sshc-jA6ycpFpMHzndZ-lS86MPto9-c,4898
|
|
80
80
|
aury/agents/core/types/session.py,sha256=oRn9jKFe8Tg-12ZFQcGJ0VLaJIWBfk8YQDzXUuXSNEk,9406
|
|
81
81
|
aury/agents/core/types/subagent.py,sha256=vIxDkfekAaHj_V2UdSIaygDKb5RjiLqi8twTnhIUF_o,4651
|
|
82
|
-
aury/agents/core/types/tool.py,sha256=
|
|
82
|
+
aury/agents/core/types/tool.py,sha256=DqlK306lmeabb61BscqHbhdN7mx3whzndh3GYGqSb8Q,6366
|
|
83
83
|
aury/agents/eval/__init__.py,sha256=uRGZN-RBpNlwOmrn66EwZBNKufDVKgMc3tODuMM6WB4,8850
|
|
84
84
|
aury/agents/hitl/__init__.py,sha256=6H8cBU-dSR0eSOGWte_Iy7OvTKGDl4ZMb0E56KrfFkw,1020
|
|
85
|
-
aury/agents/hitl/ask_user.py,sha256=
|
|
85
|
+
aury/agents/hitl/ask_user.py,sha256=3MAJOo0rI0Wl7ZpZdDSQVBkO0GJFYH6bT7hnrcED4qI,9071
|
|
86
86
|
aury/agents/hitl/compaction.py,sha256=1CTwcCtV5WjP4IJE__kOTM99QnRW7dVkU87POEVSpPg,7751
|
|
87
87
|
aury/agents/hitl/exceptions.py,sha256=O1r9OCLwQqo7Ebr5o3kX0p0bvWYKbHapftf1vfnMh0M,2467
|
|
88
88
|
aury/agents/hitl/permission.py,sha256=bbwp0heb8YZ_palRCU55QtXm1rfMi9hJ8g3DWKtTc3Q,19117
|
|
89
89
|
aury/agents/hitl/revert.py,sha256=i3F8Zcibuo3fjhJTK-rQEYSPMKxmRQeua5cjoDzAR14,6684
|
|
90
90
|
aury/agents/llm/__init__.py,sha256=teantqedfyQ6IxLD6LayLr2cbgFYbMT2I4TUSfkOrQ4,625
|
|
91
|
-
aury/agents/llm/adapter.py,sha256=
|
|
92
|
-
aury/agents/llm/openai.py,sha256=
|
|
91
|
+
aury/agents/llm/adapter.py,sha256=mUZ0VgYlGwBRCKg7dlditA0ZWjnxxE4f42wgVT5zm3g,14580
|
|
92
|
+
aury/agents/llm/openai.py,sha256=v4Qlc5EIJDNcqkGHA2aIEaTTKaPVGMPf1227aKcef58,11192
|
|
93
93
|
aury/agents/llm/provider.py,sha256=zZ5xfbOEfcYSORrg05rylKVtfOzdzvolQ4GTPWEir2A,15376
|
|
94
94
|
aury/agents/mcp/__init__.py,sha256=7zsY-5LhQBLpiQI-XWe2uUHdTwJrDHrr0pDd_SXfO3o,4355
|
|
95
95
|
aury/agents/memory/__init__.py,sha256=PMGMQ1VE-j3M0n4dIeb9DYO3qrCyv5AMSfMWTyhPARE,816
|
|
96
96
|
aury/agents/memory/compaction.py,sha256=3inOVsbwSgTghcsSLgvUdX8IG2J6_0Qbr36vAqanV0M,12757
|
|
97
|
-
aury/agents/memory/manager.py,sha256=
|
|
97
|
+
aury/agents/memory/manager.py,sha256=9UsuZUYmp5Pju9lRa0bsque6gHpLIE5UwdqtQKZ3fO0,16312
|
|
98
98
|
aury/agents/memory/processor.py,sha256=Y4PZIMFdNtn_TQ3fRdhynFLUgcURi8Xu-ZeRq5kDS_s,4816
|
|
99
99
|
aury/agents/memory/store.py,sha256=SX5AYMbifCEFfLqPahhDRZLswZK0g6vFy523F1CTUWg,5822
|
|
100
100
|
aury/agents/memory/types.py,sha256=N8Rhc79OEjdJ3Xe7iG1AwnWK1Ej6b-zI51FIqmyGmLg,4560
|
|
101
101
|
aury/agents/messages/__init__.py,sha256=NiDuJPpzlWkQ-kQT7uxxZrWUVWJ0JS_x3q7QlTmaF3Y,930
|
|
102
102
|
aury/agents/messages/config.py,sha256=1ed8Akbna75Z5-eR6qnDPBFo91qwbdkSgQHc3wF5uBQ,1685
|
|
103
103
|
aury/agents/messages/raw_store.py,sha256=QT6tJlJO-cBXKuVqYUsGXavWrA0cAsoJp6zcgMx6anY,6788
|
|
104
|
-
aury/agents/messages/store.py,sha256=
|
|
104
|
+
aury/agents/messages/store.py,sha256=1zE24GHnXpPOhDQbehmAGQpNxW9Gv1-sas9dm0FYt4s,3969
|
|
105
105
|
aury/agents/messages/types.py,sha256=riNl-C6f_zakpS673U0KRlAVSvQg5L4Pd6FNs2Isssg,2582
|
|
106
106
|
aury/agents/middleware/__init__.py,sha256=T-A9u_T_x8QwgamDjUJc5GhF0VfMwOGLYezspypo4eg,896
|
|
107
|
-
aury/agents/middleware/base.py,sha256=
|
|
108
|
-
aury/agents/middleware/chain.py,sha256=
|
|
107
|
+
aury/agents/middleware/base.py,sha256=25k8PgYcusKUenRi2bLTELsrEH2cfGxBKf_kFca4QOA,10371
|
|
108
|
+
aury/agents/middleware/chain.py,sha256=l9p9i84yDzyQ-hqT15K4WW2ZVzWlr1H-AiPQnjsCq3o,16034
|
|
109
109
|
aury/agents/middleware/message.py,sha256=TfzFostiyOFR46fkbzQaIRT-1wCDczGky7plI02mydM,3839
|
|
110
110
|
aury/agents/middleware/message_container.py,sha256=qlvkk1ytCteC-uXPReVlnhCvULHDUMQ6D2cDIRC50ak,4342
|
|
111
111
|
aury/agents/middleware/raw_message.py,sha256=u60ACaTnf5v2UBLIrpo0mmpN9LaDgecwZOL-DEOqYg4,4998
|
|
112
112
|
aury/agents/middleware/truncation.py,sha256=tHpIfIYk2UzGa4pzWtwoTpga9_ssJ5dXUY1pc4OE0Qc,4858
|
|
113
113
|
aury/agents/middleware/types.py,sha256=T63AgePVSs4b1NT0MZ5PyaQJBLoVqNoAQt9NSGjBwBs,2512
|
|
114
114
|
aury/agents/react/__init__.py,sha256=yixRP3RSXQtVaamtwjaOpmW55sZb-xp4XRjxYcy0HfU,90
|
|
115
|
-
aury/agents/react/agent.py,sha256=
|
|
115
|
+
aury/agents/react/agent.py,sha256=SEO0mSXZYcHr4C4qH5sDeync824g_Vq7XJd3pPB_yaM,22798
|
|
116
|
+
aury/agents/react/context.py,sha256=Q7pY5j6b-OvKAmI1UsuawC3BmVxFkKN1oXxeBTVFejQ,11067
|
|
117
|
+
aury/agents/react/factory.py,sha256=vqQ90m39PMUDOONlPPXm2HPc0J7nua_fM7CBQ2jsCZM,9990
|
|
118
|
+
aury/agents/react/pause.py,sha256=bcrhbuoJQUz7WxZSsKr5qjxQlDdpwai54ns_qio0du4,7306
|
|
119
|
+
aury/agents/react/persistence.py,sha256=tIU7SVSm1dE1abMGqNXsBvYTtaluwJEsSeiIwYX_wuk,6050
|
|
120
|
+
aury/agents/react/step.py,sha256=HVZdSumBiMRLafHAEG_VHAzqSYrltyOhQ1CeBwTtQOM,26784
|
|
121
|
+
aury/agents/react/tools.py,sha256=dxAaEVhfeHHVVNgDKY2SNQ510nawGF190h-FDPOdu9s,11736
|
|
116
122
|
aury/agents/sandbox/__init__.py,sha256=adH29NhzpZUIFVCxhRUZxyANKpFauUjsPVd8iktUOaI,635
|
|
117
123
|
aury/agents/sandbox/local.py,sha256=Dl-zJZ5FUz7WONtuze7MdpCDBjm9YZbjLIkGa9lYbwY,8328
|
|
118
124
|
aury/agents/sandbox/remote.py,sha256=6NcYIs_thjyxa5LgIqwoPNsHYpT70DG6xGbjDYV6-X4,6444
|
|
@@ -122,28 +128,28 @@ aury/agents/skill/loader.py,sha256=g2mhC0CLzP0s8BlNk21e_IEonHNyekK7EbqUOFkfOHc,5
|
|
|
122
128
|
aury/agents/skill/types.py,sha256=yDzMxF9S5D4NNA3k1KnQvhhVBd4plCu2oJXCWTO1jSI,2696
|
|
123
129
|
aury/agents/tool/__init__.py,sha256=_IC06waxr9cC-HXdalwDByOBAZgfQiMwjsXypj-9mVE,731
|
|
124
130
|
aury/agents/tool/decorator.py,sha256=qfgb1dioXup_qqTCETAWJN-5gTgBtrkGPSn_yuF1Y8o,8384
|
|
125
|
-
aury/agents/tool/set.py,sha256=
|
|
131
|
+
aury/agents/tool/set.py,sha256=6UgI12E2b-C0Kfwg3KUr4e5kraBK887wbveAs8GudyY,7728
|
|
126
132
|
aury/agents/tool/builtin/__init__.py,sha256=Pp5NlE0i1jiNlfZ6kVH-iSeE553RMysa4icmOgPzezI,513
|
|
127
133
|
aury/agents/tool/builtin/ask_user.py,sha256=RnAJ969YE77AYG_foI7KlVsISvHj5Ykrdz0l2ZYZh-g,4871
|
|
128
|
-
aury/agents/tool/builtin/bash.py,sha256=
|
|
129
|
-
aury/agents/tool/builtin/delegate.py,sha256=
|
|
130
|
-
aury/agents/tool/builtin/edit.py,sha256=
|
|
131
|
-
aury/agents/tool/builtin/plan.py,sha256=
|
|
132
|
-
aury/agents/tool/builtin/read.py,sha256=
|
|
133
|
-
aury/agents/tool/builtin/thinking.py,sha256=
|
|
134
|
-
aury/agents/tool/builtin/yield_result.py,sha256=
|
|
134
|
+
aury/agents/tool/builtin/bash.py,sha256=nDshh3q3vkdFqMhhkV0EKx2AJTDJPAJwJT7a-ovtuMc,4523
|
|
135
|
+
aury/agents/tool/builtin/delegate.py,sha256=FSBUUNOXW-rwovcHZY1AgY_G1FIjVA4blKRkb1_Y1I4,27807
|
|
136
|
+
aury/agents/tool/builtin/edit.py,sha256=bdDWrErNvRzp3nQELOnZf79iiWt6p8TOfFxOgLG2SEs,6063
|
|
137
|
+
aury/agents/tool/builtin/plan.py,sha256=r_vyasX2XPrJ4FUYxD8gtlzhZr3A9oeK5dEI7vQD1MI,9366
|
|
138
|
+
aury/agents/tool/builtin/read.py,sha256=86Bt3v9HGpiY02Azr7LV89BDkbujACV1qkLGt0zMenw,4325
|
|
139
|
+
aury/agents/tool/builtin/thinking.py,sha256=73hG7RXIlG6fC7-kZfquZCxBc6OZ8_qmpmKQhIjcQTI,3667
|
|
140
|
+
aury/agents/tool/builtin/yield_result.py,sha256=I-D3m_Nww3LG7XKnjcv_12_iO5g0YIgwpbdYxLlnGvs,4524
|
|
135
141
|
aury/agents/usage/__init__.py,sha256=XjRKk28M6WemUIncWspU8Mmb_USlSCSIU_aVmRXuSfc,186
|
|
136
142
|
aury/agents/usage/tracker.py,sha256=OY0yhQsuk9FrUsd6sed4MdmwMxmvuFLnuAdoccCWLnw,7060
|
|
137
143
|
aury/agents/workflow/__init__.py,sha256=7GzWiSNeEUQwP2d19Ur8JHGq3VS3Kj-mRdQiaxxv4QQ,1539
|
|
138
|
-
aury/agents/workflow/adapter.py,sha256=
|
|
144
|
+
aury/agents/workflow/adapter.py,sha256=NH3nMZdAyXHCvY-A-fQCJgoqQyebbuQZcmIsZXgB-gw,11713
|
|
139
145
|
aury/agents/workflow/dag.py,sha256=R2fzCi46T63kRm_o09yF-f4G5OO7RKJp1Ar-7cKio5o,3534
|
|
140
146
|
aury/agents/workflow/dsl.py,sha256=5gbMH2IT0jHUDvKYdvXbJ8WAKW1emKkMRflJP2ABrFs,17579
|
|
141
|
-
aury/agents/workflow/executor.py,sha256=
|
|
147
|
+
aury/agents/workflow/executor.py,sha256=EkNSq3Zet9F3nLilViM-PccnaexHS0Ja2aCR-vp1S7w,26923
|
|
142
148
|
aury/agents/workflow/expression.py,sha256=Hsx2jBigtt5zbJb9uK9pveipqMbBBUUAvlgYjBRP_Vc,4591
|
|
143
149
|
aury/agents/workflow/parser.py,sha256=mfiFZ_TtFq3IxAqPlTGcNkluiZ8ww16y3NYwbmbsrwE,6149
|
|
144
150
|
aury/agents/workflow/state.py,sha256=AxTSo7P9b1DbWjGdQdzFY4_7m6CJGNFo7xkGK28SPZw,4234
|
|
145
151
|
aury/agents/workflow/types.py,sha256=PVvjTQRgTObx5Mq_lXFogyLjGChOi5pUgcJwF5ZzVtg,2354
|
|
146
|
-
aury_agent-0.0.
|
|
147
|
-
aury_agent-0.0.
|
|
148
|
-
aury_agent-0.0.
|
|
149
|
-
aury_agent-0.0.
|
|
152
|
+
aury_agent-0.0.6.dist-info/METADATA,sha256=G-wgdW1wS_TJ55xwk6HHENQGb_2JiPGKNa8_pJ3VHtI,2114
|
|
153
|
+
aury_agent-0.0.6.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
154
|
+
aury_agent-0.0.6.dist-info/entry_points.txt,sha256=7EC5SMAKdC9HZLG8RfPhGno4OKOeSjaGsOWi1gOL-K8,56
|
|
155
|
+
aury_agent-0.0.6.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|