autobyteus 1.1.7__py3-none-any.whl → 1.1.9__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.
- autobyteus/agent/bootstrap_steps/system_prompt_processing_step.py +6 -2
- autobyteus/agent/handlers/inter_agent_message_event_handler.py +17 -19
- autobyteus/agent/handlers/llm_complete_response_received_event_handler.py +6 -3
- autobyteus/agent/handlers/tool_result_event_handler.py +86 -23
- autobyteus/agent/handlers/user_input_message_event_handler.py +19 -10
- autobyteus/agent/hooks/base_phase_hook.py +17 -0
- autobyteus/agent/hooks/hook_registry.py +15 -27
- autobyteus/agent/input_processor/base_user_input_processor.py +17 -1
- autobyteus/agent/input_processor/processor_registry.py +15 -27
- autobyteus/agent/llm_response_processor/base_processor.py +17 -1
- autobyteus/agent/llm_response_processor/processor_registry.py +15 -24
- autobyteus/agent/llm_response_processor/provider_aware_tool_usage_processor.py +14 -0
- autobyteus/agent/message/agent_input_user_message.py +15 -2
- autobyteus/agent/message/send_message_to.py +1 -1
- autobyteus/agent/processor_option.py +17 -0
- autobyteus/agent/sender_type.py +1 -0
- autobyteus/agent/system_prompt_processor/base_processor.py +17 -1
- autobyteus/agent/system_prompt_processor/processor_registry.py +15 -27
- autobyteus/agent/system_prompt_processor/tool_manifest_injector_processor.py +10 -0
- autobyteus/agent/tool_execution_result_processor/base_processor.py +17 -1
- autobyteus/agent/tool_execution_result_processor/processor_registry.py +15 -1
- autobyteus/agent/workspace/base_workspace.py +1 -1
- autobyteus/agent/workspace/workspace_definition.py +1 -1
- autobyteus/agent_team/bootstrap_steps/team_context_initialization_step.py +1 -1
- autobyteus/agent_team/streaming/agent_team_stream_event_payloads.py +2 -2
- autobyteus/agent_team/task_notification/__init__.py +4 -0
- autobyteus/agent_team/task_notification/activation_policy.py +70 -0
- autobyteus/agent_team/task_notification/system_event_driven_agent_task_notifier.py +56 -122
- autobyteus/agent_team/task_notification/task_activator.py +66 -0
- autobyteus/cli/agent_team_tui/state.py +17 -20
- autobyteus/cli/agent_team_tui/widgets/focus_pane.py +1 -1
- autobyteus/cli/agent_team_tui/widgets/task_board_panel.py +1 -1
- autobyteus/events/event_types.py +2 -2
- autobyteus/llm/api/gemini_llm.py +45 -54
- autobyteus/llm/api/qwen_llm.py +25 -0
- autobyteus/llm/autobyteus_provider.py +8 -2
- autobyteus/llm/llm_factory.py +16 -0
- autobyteus/multimedia/audio/api/autobyteus_audio_client.py +4 -1
- autobyteus/multimedia/audio/api/gemini_audio_client.py +84 -153
- autobyteus/multimedia/audio/audio_client_factory.py +47 -22
- autobyteus/multimedia/audio/audio_model.py +13 -6
- autobyteus/multimedia/audio/autobyteus_audio_provider.py +8 -2
- autobyteus/multimedia/audio/base_audio_client.py +3 -1
- autobyteus/multimedia/image/api/autobyteus_image_client.py +12 -5
- autobyteus/multimedia/image/api/gemini_image_client.py +72 -130
- autobyteus/multimedia/image/api/openai_image_client.py +4 -2
- autobyteus/multimedia/image/autobyteus_image_provider.py +8 -2
- autobyteus/multimedia/image/base_image_client.py +6 -2
- autobyteus/multimedia/image/image_client_factory.py +20 -19
- autobyteus/multimedia/image/image_model.py +13 -6
- autobyteus/multimedia/providers.py +1 -0
- autobyteus/task_management/__init__.py +9 -10
- autobyteus/task_management/base_task_board.py +14 -6
- autobyteus/task_management/converters/__init__.py +0 -2
- autobyteus/task_management/converters/task_board_converter.py +7 -16
- autobyteus/task_management/events.py +6 -6
- autobyteus/task_management/in_memory_task_board.py +48 -38
- autobyteus/task_management/schemas/__init__.py +2 -2
- autobyteus/task_management/schemas/{plan_definition.py → task_definition.py} +5 -6
- autobyteus/task_management/schemas/task_status_report.py +0 -1
- autobyteus/task_management/task.py +60 -0
- autobyteus/task_management/tools/__init__.py +4 -2
- autobyteus/task_management/tools/get_my_tasks.py +80 -0
- autobyteus/task_management/tools/get_task_board_status.py +3 -3
- autobyteus/task_management/tools/publish_task.py +77 -0
- autobyteus/task_management/tools/publish_tasks.py +74 -0
- autobyteus/task_management/tools/update_task_status.py +5 -5
- autobyteus/tools/__init__.py +3 -1
- autobyteus/tools/base_tool.py +4 -4
- autobyteus/tools/browser/session_aware/browser_session_aware_navigate_to.py +1 -1
- autobyteus/tools/browser/session_aware/browser_session_aware_web_element_trigger.py +1 -1
- autobyteus/tools/browser/session_aware/browser_session_aware_webpage_reader.py +1 -1
- autobyteus/tools/browser/session_aware/browser_session_aware_webpage_screenshot_taker.py +1 -1
- autobyteus/tools/browser/standalone/navigate_to.py +1 -1
- autobyteus/tools/browser/standalone/web_page_pdf_generator.py +1 -1
- autobyteus/tools/browser/standalone/webpage_image_downloader.py +1 -1
- autobyteus/tools/browser/standalone/webpage_reader.py +1 -1
- autobyteus/tools/browser/standalone/webpage_screenshot_taker.py +1 -1
- autobyteus/tools/functional_tool.py +1 -1
- autobyteus/tools/google_search.py +1 -1
- autobyteus/tools/image_downloader.py +1 -1
- autobyteus/tools/mcp/factory.py +1 -1
- autobyteus/tools/mcp/schema_mapper.py +1 -1
- autobyteus/tools/mcp/tool.py +1 -1
- autobyteus/tools/multimedia/__init__.py +2 -0
- autobyteus/tools/multimedia/audio_tools.py +10 -20
- autobyteus/tools/multimedia/image_tools.py +21 -22
- autobyteus/tools/multimedia/media_reader_tool.py +117 -0
- autobyteus/tools/pydantic_schema_converter.py +1 -1
- autobyteus/tools/registry/tool_definition.py +1 -1
- autobyteus/tools/timer.py +1 -1
- autobyteus/tools/tool_meta.py +1 -1
- autobyteus/tools/usage/formatters/default_json_example_formatter.py +1 -1
- autobyteus/tools/usage/formatters/default_xml_example_formatter.py +1 -1
- autobyteus/tools/usage/formatters/default_xml_schema_formatter.py +59 -3
- autobyteus/tools/usage/formatters/gemini_json_example_formatter.py +1 -1
- autobyteus/tools/usage/formatters/google_json_example_formatter.py +1 -1
- autobyteus/tools/usage/formatters/openai_json_example_formatter.py +1 -1
- autobyteus/{tools → utils}/parameter_schema.py +1 -1
- {autobyteus-1.1.7.dist-info → autobyteus-1.1.9.dist-info}/METADATA +2 -2
- {autobyteus-1.1.7.dist-info → autobyteus-1.1.9.dist-info}/RECORD +105 -99
- examples/run_poem_writer.py +1 -1
- autobyteus/task_management/converters/task_plan_converter.py +0 -48
- autobyteus/task_management/task_plan.py +0 -110
- autobyteus/task_management/tools/publish_task_plan.py +0 -101
- {autobyteus-1.1.7.dist-info → autobyteus-1.1.9.dist-info}/WHEEL +0 -0
- {autobyteus-1.1.7.dist-info → autobyteus-1.1.9.dist-info}/licenses/LICENSE +0 -0
- {autobyteus-1.1.7.dist-info → autobyteus-1.1.9.dist-info}/top_level.txt +0 -0
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
# file: autobyteus/autobyteus/task_management/tools/publish_task_plan.py
|
|
2
|
-
import json
|
|
3
|
-
import logging
|
|
4
|
-
from typing import TYPE_CHECKING, Optional, Dict, Any
|
|
5
|
-
|
|
6
|
-
from pydantic import ValidationError
|
|
7
|
-
|
|
8
|
-
from autobyteus.tools.base_tool import BaseTool
|
|
9
|
-
from autobyteus.tools.tool_category import ToolCategory
|
|
10
|
-
from autobyteus.tools.parameter_schema import ParameterSchema, ParameterDefinition, ParameterType
|
|
11
|
-
from autobyteus.tools.pydantic_schema_converter import pydantic_to_parameter_schema
|
|
12
|
-
from autobyteus.task_management.schemas import TaskPlanDefinitionSchema
|
|
13
|
-
from autobyteus.task_management.converters import TaskPlanConverter, TaskBoardConverter
|
|
14
|
-
|
|
15
|
-
if TYPE_CHECKING:
|
|
16
|
-
from autobyteus.agent.context import AgentContext
|
|
17
|
-
from autobyteus.agent_team.context import AgentTeamContext
|
|
18
|
-
|
|
19
|
-
logger = logging.getLogger(__name__)
|
|
20
|
-
|
|
21
|
-
class PublishTaskPlan(BaseTool):
|
|
22
|
-
"""A tool for the coordinator to parse and load a generated plan into the TaskBoard."""
|
|
23
|
-
|
|
24
|
-
CATEGORY = ToolCategory.TASK_MANAGEMENT
|
|
25
|
-
|
|
26
|
-
@classmethod
|
|
27
|
-
def get_name(cls) -> str:
|
|
28
|
-
return "PublishTaskPlan"
|
|
29
|
-
|
|
30
|
-
@classmethod
|
|
31
|
-
def get_description(cls) -> str:
|
|
32
|
-
return (
|
|
33
|
-
"Parses a structured object representing a complete task plan, converts it into a "
|
|
34
|
-
"system-ready format, and loads it onto the team's shared task board. "
|
|
35
|
-
"This action resets the task board with the new plan. Upon success, it returns "
|
|
36
|
-
"the initial status of the newly loaded task board. "
|
|
37
|
-
"This tool should typically only be used by the team coordinator."
|
|
38
|
-
)
|
|
39
|
-
|
|
40
|
-
@classmethod
|
|
41
|
-
def get_argument_schema(cls) -> Optional[ParameterSchema]:
|
|
42
|
-
schema = ParameterSchema()
|
|
43
|
-
|
|
44
|
-
# Convert the Pydantic model to our native ParameterSchema for the nested object
|
|
45
|
-
plan_object_schema = pydantic_to_parameter_schema(TaskPlanDefinitionSchema)
|
|
46
|
-
|
|
47
|
-
schema.add_parameter(ParameterDefinition(
|
|
48
|
-
name="plan",
|
|
49
|
-
param_type=ParameterType.OBJECT,
|
|
50
|
-
description=(
|
|
51
|
-
"A structured object representing a complete task plan. This object defines the overall goal "
|
|
52
|
-
"and a list of tasks with their assignees, descriptions, and dependencies. "
|
|
53
|
-
"Each task must have a unique name within the plan."
|
|
54
|
-
),
|
|
55
|
-
required=True,
|
|
56
|
-
object_schema=plan_object_schema
|
|
57
|
-
))
|
|
58
|
-
return schema
|
|
59
|
-
|
|
60
|
-
async def _execute(self, context: 'AgentContext', plan: Dict[str, Any]) -> str:
|
|
61
|
-
"""
|
|
62
|
-
Executes the tool by validating the plan object, using a converter to create a TaskPlan,
|
|
63
|
-
and loading it onto the task board.
|
|
64
|
-
"""
|
|
65
|
-
logger.info(f"Agent '{context.agent_id}' is executing PublishTaskPlan.")
|
|
66
|
-
|
|
67
|
-
team_context: Optional['AgentTeamContext'] = context.custom_data.get("team_context")
|
|
68
|
-
if not team_context:
|
|
69
|
-
error_msg = "Error: Team context is not available. Cannot access the task board."
|
|
70
|
-
logger.error(f"Agent '{context.agent_id}': {error_msg}")
|
|
71
|
-
return error_msg
|
|
72
|
-
|
|
73
|
-
task_board = getattr(team_context.state, 'task_board', None)
|
|
74
|
-
if not task_board:
|
|
75
|
-
error_msg = "Error: Task board has not been initialized for this team."
|
|
76
|
-
logger.error(f"Agent '{context.agent_id}': {error_msg}")
|
|
77
|
-
return error_msg
|
|
78
|
-
|
|
79
|
-
try:
|
|
80
|
-
plan_definition_schema = TaskPlanDefinitionSchema(**plan)
|
|
81
|
-
final_plan = TaskPlanConverter.from_schema(plan_definition_schema)
|
|
82
|
-
except (ValidationError, ValueError) as e:
|
|
83
|
-
error_msg = f"Invalid or inconsistent task plan provided: {e}"
|
|
84
|
-
logger.warning(f"Agent '{context.agent_id}' provided an invalid plan for PublishTaskPlan: {error_msg}")
|
|
85
|
-
return f"Error: {error_msg}"
|
|
86
|
-
except Exception as e:
|
|
87
|
-
error_msg = f"An unexpected error occurred during plan parsing or conversion: {e}"
|
|
88
|
-
logger.error(f"Agent '{context.agent_id}': {error_msg}", exc_info=True)
|
|
89
|
-
return f"Error: {error_msg}"
|
|
90
|
-
|
|
91
|
-
if task_board.load_task_plan(final_plan):
|
|
92
|
-
logger.info(f"Agent '{context.agent_id}': Task plan published successfully. Returning new board status.")
|
|
93
|
-
status_report_schema = TaskBoardConverter.to_schema(task_board)
|
|
94
|
-
if status_report_schema:
|
|
95
|
-
return status_report_schema.model_dump_json(indent=2)
|
|
96
|
-
else:
|
|
97
|
-
return "Task plan published successfully, but could not generate status report."
|
|
98
|
-
else:
|
|
99
|
-
error_msg = "Failed to load task plan onto the board. This can happen if the board implementation rejects the plan."
|
|
100
|
-
logger.error(f"Agent '{context.agent_id}': {error_msg}")
|
|
101
|
-
return f"Error: {error_msg}"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|