haive.agents.research.perplexity.pro_search.tasks.models ======================================================== .. py:module:: haive.agents.research.perplexity.pro_search.tasks.models .. autoapi-nested-parse:: Pydantic models for recursive conditional planning with tree-based task decomposition. Supports dynamic planning, parallel execution, and adaptive replanning. Classes ------- .. autoapisummary:: haive.agents.research.perplexity.pro_search.tasks.models.ExecutionPlan haive.agents.research.perplexity.pro_search.tasks.models.PlanningState haive.agents.research.perplexity.pro_search.tasks.models.PlanningStrategy haive.agents.research.perplexity.pro_search.tasks.models.ReplanningAnalysis haive.agents.research.perplexity.pro_search.tasks.models.TaskDecomposition haive.agents.research.perplexity.pro_search.tasks.models.TaskDependency haive.agents.research.perplexity.pro_search.tasks.models.TaskMetadata haive.agents.research.perplexity.pro_search.tasks.models.TaskNode haive.agents.research.perplexity.pro_search.tasks.models.TaskPriority haive.agents.research.perplexity.pro_search.tasks.models.TaskResource haive.agents.research.perplexity.pro_search.tasks.models.TaskStatus Module Contents --------------- .. py:class:: ExecutionPlan(/, **data) Bases: :py:obj:`pydantic.BaseModel` Execution plan for a set of tasks. Create a new model by parsing and validating input data from keyword arguments. Raises [`ValidationError`][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model. `self` is explicitly positional-only to allow `self` as a field name. .. py:method:: calculate_resource_requirements() Calculate total resource requirements. .. py:property:: can_parallelize :type: bool Check if any parallelization is possible. .. py:class:: PlanningState(/, **data) Bases: :py:obj:`pydantic.BaseModel` State for recursive planning workflow. Create a new model by parsing and validating input data from keyword arguments. Raises [`ValidationError`][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model. `self` is explicitly positional-only to allow `self` as a field name. .. py:method:: add_task(task, parent_id = None) Add a task to the tree. .. py:method:: update_task_status(task_id, status, result = None) Update task status and handle state transitions. .. py:property:: completion_percentage :type: float Calculate completion percentage. .. py:property:: critical_path :type: list[str] Get current critical path. .. py:property:: executable_tasks :type: list[TaskNode] Get tasks ready for execution. .. py:property:: is_complete :type: bool Check if planning goal is achieved. .. py:property:: needs_replanning :type: bool Check if replanning is needed. .. py:class:: PlanningStrategy(/, **data) Bases: :py:obj:`pydantic.BaseModel` Strategy configuration for the planning process. Create a new model by parsing and validating input data from keyword arguments. Raises [`ValidationError`][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model. `self` is explicitly positional-only to allow `self` as a field name. .. py:method:: validate_strategy_coherence() Ensure strategy settings are coherent. .. py:class:: ReplanningAnalysis(/, **data) Bases: :py:obj:`pydantic.BaseModel` Analysis for replanning decision. Create a new model by parsing and validating input data from keyword arguments. Raises [`ValidationError`][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model. `self` is explicitly positional-only to allow `self` as a field name. .. py:class:: TaskDecomposition(/, **data) Bases: :py:obj:`pydantic.BaseModel` Result of decomposing a high-level task. Create a new model by parsing and validating input data from keyword arguments. Raises [`ValidationError`][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model. `self` is explicitly positional-only to allow `self` as a field name. .. py:method:: calculate_critical_path() Calculate critical path if not provided. .. py:property:: parallelizable_groups :type: list[list[str]] Identify groups of tasks that can run in parallel. .. py:class:: TaskDependency(/, **data) Bases: :py:obj:`pydantic.BaseModel` Dependency relationship between tasks. Create a new model by parsing and validating input data from keyword arguments. Raises [`ValidationError`][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model. `self` is explicitly positional-only to allow `self` as a field name. .. py:class:: TaskMetadata(/, **data) Bases: :py:obj:`pydantic.BaseModel` Metadata for task tracking and optimization. Create a new model by parsing and validating input data from keyword arguments. Raises [`ValidationError`][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model. `self` is explicitly positional-only to allow `self` as a field name. .. py:property:: can_retry :type: bool Check if task can be retried. .. py:property:: efficiency_ratio :type: float | None Calculate efficiency ratio (estimated vs actual). .. py:class:: TaskNode(/, **data) Bases: :py:obj:`pydantic.BaseModel` Individual task node in the planning tree. Create a new model by parsing and validating input data from keyword arguments. Raises [`ValidationError`][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model. `self` is explicitly positional-only to allow `self` as a field name. .. py:method:: can_start(completed_tasks) Check if all dependencies are satisfied. .. py:method:: validate_children_for_type(v, info) :classmethod: Validate children based on task type. .. py:property:: is_complete :type: bool Check if task is complete. .. py:property:: is_executable :type: bool Check if task can be executed. .. py:property:: is_leaf :type: bool Check if this is a leaf node. .. py:class:: TaskPriority Bases: :py:obj:`str`, :py:obj:`enum.Enum` Priority levels for tasks. Initialize self. See help(type(self)) for accurate signature. .. py:class:: TaskResource(/, **data) Bases: :py:obj:`pydantic.BaseModel` Resource requirements for a task. Create a new model by parsing and validating input data from keyword arguments. Raises [`ValidationError`][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model. `self` is explicitly positional-only to allow `self` as a field name. .. py:property:: resource_key :type: str Unique key for this resource requirement. .. py:class:: TaskStatus Bases: :py:obj:`str`, :py:obj:`enum.Enum` Status of a task in the planning tree. Initialize self. See help(type(self)) for accurate signature.