operations
¤
Operations models for CrewMaster v2.0.0.
| MODULE | DESCRIPTION |
|---|---|
assemble_disclosure_test |
Tests for assemble_disclosure integration. |
operation |
Operation model for CrewMaster v2.0.0. |
operation_test |
Tests for Operation model. |
plans |
Execution plan models for CrewMaster v2.0.0. |
plans_resolve_test |
Tests for resolve_plan — the ExecutionPlan resolver. |
plans_test |
Tests for ExecutionPlan, PlanNode, and DisclosurePayload models. |
| CLASS | DESCRIPTION |
|---|---|
Operation |
A typed, recursive unit of work in the execution plan. |
DisclosurePayload |
The fully assembled disclosure for a single plan node. |
ExecutionPlan |
The resolved, immutable execution plan. |
PlanBuildError |
Raised when an ExecutionPlan cannot be built from an Operation tree. |
PlanNode |
A single node in the ExecutionPlan DAG. |
| FUNCTION | DESCRIPTION |
|---|---|
resolve_plan |
Resolve an Operation tree into an immutable ExecutionPlan. |
__all__
module-attribute
¤
__all__ = ['DisclosurePayload', 'ExecutionPlan', 'Operation', 'PlanBuildError', 'PlanNode', 'resolve_plan']
Operation
¤
A typed, recursive unit of work in the execution plan.
Operations form the nodes of the ExecutionPlan DAG. Each operation declares what type it produces, what context types it consumes, which agent executes it, and what sub-operations it contains.
| ATTRIBUTE | DESCRIPTION |
|---|---|
name |
Unique operation name within the plan.
TYPE:
|
produces |
The type produced by this operation. |
kind |
Semantic category of the operation.
TYPE:
|
agent |
The AgentConfig for the executing agent (optional for sub-ops).
TYPE:
|
consumes |
List of context types this operation requires from upstream. |
task_blocks |
List of |
sub_operations |
Recursive list of child operations. |
collaboration |
Optional CollaborationProtocol for multi-agent execution.
TYPE:
|
max_retrieval_rounds |
Max rounds of request_capability (0 = disabled).
TYPE:
|
required_slots |
Names of context variables that must be present. |
| METHOD | DESCRIPTION |
|---|---|
validate_sub_operations_names_unique |
Ensure sub-operation names are unique within this operation. |
consumes
class-attribute
instance-attribute
¤
task_blocks
class-attribute
instance-attribute
¤
sub_operations
class-attribute
instance-attribute
¤
max_retrieval_rounds
class-attribute
instance-attribute
¤
max_retrieval_rounds: int = Field(default=0, ge=0)
required_slots
class-attribute
instance-attribute
¤
validate_sub_operations_names_unique
¤
validate_sub_operations_names_unique() -> 'Operation'
Ensure sub-operation names are unique within this operation.
DisclosurePayload
¤
The fully assembled disclosure for a single plan node.
Contains everything an agent needs to execute its assigned node: identity blocks, task blocks, resolved context, resolved tools, and the rendered prompt text.
| ATTRIBUTE | DESCRIPTION |
|---|---|
identity_blocks |
List of resolved identity PromptBlock ids. |
task_blocks |
List of resolved task PromptBlock ids. |
resolved_context |
The flattened context dictionary for template rendering. |
resolved_tools |
The list of ToolSchema instances visible to this node. |
rendered_prompt |
The final rendered prompt text.
.. deprecated:: 2.0.0
Rendering is now done in :func:
TYPE:
|
ExecutionPlan
¤
The resolved, immutable execution plan.
Built from an Operation tree. The plan contains all nodes in topological order, their dependency edges, the artifact type registry, and per-node disclosure payloads.
| ATTRIBUTE | DESCRIPTION |
|---|---|
nodes |
All PlanNodes in topological order. |
edges |
Dependency edges as (from_node, to_node) tuples. |
artifacts |
Mapping of operation name to output type. |
disclosure |
Mapping of operation name to DisclosurePayload.
TYPE:
|
PlanBuildError
¤
Raised when an ExecutionPlan cannot be built from an Operation tree.
PlanNode
¤
A single node in the ExecutionPlan DAG.
Each PlanNode corresponds to one Operation and carries its agent, runtime driver, disclosure payload, and dependency information.
| ATTRIBUTE | DESCRIPTION |
|---|---|
operation_name |
The name of the Operation this node executes.
TYPE:
|
agent |
The AgentConfig for this node (resolved from Operation or defaults).
TYPE:
|
runtime |
The RuntimeDriver instance for this node.
TYPE:
|
disclosure |
The assembled DisclosurePayload.
TYPE:
|
produces |
The type this node produces as output. |
depends_on |
List of operation names this node depends on. |
disclosure
class-attribute
instance-attribute
¤
disclosure: DisclosurePayload = Field(default_factory=DisclosurePayload)
resolve_plan
¤
resolve_plan(operation: Operation, context_store: ContextStore, block_store: BlockStore, default_runtime: Any | None = None, tool_registry: ToolRegistry | None = None) -> ExecutionPlan
Resolve an Operation tree into an immutable ExecutionPlan.
Walks the Operation tree to collect leaf operations (those with an
agent assigned), resolves consumes dependencies by type — checking
both upstream node artifacts and the ContextStore for domain projectors —
topologically sorts the resulting nodes, assembles per-node disclosure
payloads, and returns a complete ExecutionPlan.
Dependency resolution rules:
- If a consumed type is a :class:
ContextProjector, resolve it via thecontext_store. The projected context becomes part of thectxnamespace. - If a consumed type matches the
producesof another leaf operation in the same tree, it is an artifact dependency — the downstream node depends on the upstream node. - If neither matches, the plan fails with a
PlanBuildError.
| PARAMETER | DESCRIPTION |
|---|---|
|
The root Operation to resolve.
TYPE:
|
|
The ContextStore holding domain instances for ContextProjector resolution.
TYPE:
|
|
The BlockStore for resolving
TYPE:
|
|
Fallback RuntimeDriver when an AgentConfig does not specify its own.
TYPE:
|
|
Optional ToolRegistry for populating
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
ExecutionPlan
|
A fully resolved ExecutionPlan with nodes in topological order. |
| RAISES | DESCRIPTION |
|---|---|
PlanBuildError
|
If any |
assemble_disclosure_test
¤
Tests for assemble_disclosure integration.
| CLASS | DESCRIPTION |
|---|---|
FakeOutput |
|
TestAssembleDisclosure |
Tests for assemble_disclosure: Operation + AgentConfig -> DisclosurePayload. |
FakeOutput
¤
TestAssembleDisclosure
¤
Tests for assemble_disclosure: Operation + AgentConfig -> DisclosurePayload.
| METHOD | DESCRIPTION |
|---|---|
test_combined_prompt_with_identity_and_task_blocks |
Disclosure should contain both identity and task blocks rendered. |
test_rendered_prompt_includes_both_block_types |
The rendered prompt should combine identity + task blocks. |
test_ctx_variables_rendered_correctly |
ctx.* variables should be rendered in the prompt. |
test_deps_variables_rendered_correctly |
deps.* variables should be rendered in the prompt. |
test_cfg_variables_rendered_correctly |
cfg.* variables should be rendered in the prompt. |
test_missing_ctx_requires_raises_descriptive_error |
Fails with descriptive error when a ctx.* require is missing. |
test_missing_deps_requires_raises_descriptive_error |
Fails with descriptive error when a deps.* require is missing. |
test_missing_requires_on_identity_block |
Validation should also check requires on identity blocks. |
test_requires_satisfied_on_both_block_types |
Validation should pass when requires are satisfied in all blocks. |
test_missing_required_slot_raises_error |
Fails when Operation required_slots are not covered by block provides. |
test_required_slots_satisfied_by_task_block |
Should pass when a task block provides the required slot. |
test_required_slots_satisfied_by_identity_block |
Should pass when an identity block provides the required slot. |
test_no_blocks_returns_empty_payload |
When there are no blocks, returns empty disclosure. |
test_no_required_slots_passes |
Empty required_slots should pass validation. |
test_resolved_context_preserved_in_payload |
The context dict should be preserved in the DisclosurePayload. |
test_combined_prompt_with_identity_and_task_blocks
¤
test_combined_prompt_with_identity_and_task_blocks()
Disclosure should contain both identity and task blocks rendered.
test_rendered_prompt_includes_both_block_types
¤
test_rendered_prompt_includes_both_block_types()
The rendered prompt should combine identity + task blocks.
test_ctx_variables_rendered_correctly
¤
test_ctx_variables_rendered_correctly()
ctx.* variables should be rendered in the prompt.
test_deps_variables_rendered_correctly
¤
test_deps_variables_rendered_correctly()
deps.* variables should be rendered in the prompt.
test_cfg_variables_rendered_correctly
¤
test_cfg_variables_rendered_correctly()
cfg.* variables should be rendered in the prompt.
test_missing_ctx_requires_raises_descriptive_error
¤
test_missing_ctx_requires_raises_descriptive_error()
Fails with descriptive error when a ctx.* require is missing.
test_missing_deps_requires_raises_descriptive_error
¤
test_missing_deps_requires_raises_descriptive_error()
Fails with descriptive error when a deps.* require is missing.
test_missing_requires_on_identity_block
¤
test_missing_requires_on_identity_block()
Validation should also check requires on identity blocks.
test_requires_satisfied_on_both_block_types
¤
test_requires_satisfied_on_both_block_types()
Validation should pass when requires are satisfied in all blocks.
test_missing_required_slot_raises_error
¤
test_missing_required_slot_raises_error()
Fails when Operation required_slots are not covered by block provides.
test_required_slots_satisfied_by_task_block
¤
test_required_slots_satisfied_by_task_block()
Should pass when a task block provides the required slot.
test_required_slots_satisfied_by_identity_block
¤
test_required_slots_satisfied_by_identity_block()
Should pass when an identity block provides the required slot.
test_no_blocks_returns_empty_payload
¤
test_no_blocks_returns_empty_payload()
When there are no blocks, returns empty disclosure.
test_no_required_slots_passes
¤
test_no_required_slots_passes()
Empty required_slots should pass validation.
test_resolved_context_preserved_in_payload
¤
test_resolved_context_preserved_in_payload()
The context dict should be preserved in the DisclosurePayload.
operation
¤
Operation model for CrewMaster v2.0.0.
Operation is the fundamental unit of work — a typed, recursive task that declares what it produces, what it consumes, and how to execute it.
| CLASS | DESCRIPTION |
|---|---|
Operation |
A typed, recursive unit of work in the execution plan. |
Operation
¤
A typed, recursive unit of work in the execution plan.
Operations form the nodes of the ExecutionPlan DAG. Each operation declares what type it produces, what context types it consumes, which agent executes it, and what sub-operations it contains.
| ATTRIBUTE | DESCRIPTION |
|---|---|
name |
Unique operation name within the plan.
TYPE:
|
produces |
The type produced by this operation. |
kind |
Semantic category of the operation.
TYPE:
|
agent |
The AgentConfig for the executing agent (optional for sub-ops).
TYPE:
|
consumes |
List of context types this operation requires from upstream. |
task_blocks |
List of |
sub_operations |
Recursive list of child operations. |
collaboration |
Optional CollaborationProtocol for multi-agent execution.
TYPE:
|
max_retrieval_rounds |
Max rounds of request_capability (0 = disabled).
TYPE:
|
required_slots |
Names of context variables that must be present. |
| METHOD | DESCRIPTION |
|---|---|
validate_sub_operations_names_unique |
Ensure sub-operation names are unique within this operation. |
consumes
class-attribute
instance-attribute
¤
task_blocks
class-attribute
instance-attribute
¤
sub_operations
class-attribute
instance-attribute
¤
max_retrieval_rounds
class-attribute
instance-attribute
¤
max_retrieval_rounds: int = Field(default=0, ge=0)
required_slots
class-attribute
instance-attribute
¤
validate_sub_operations_names_unique
¤
validate_sub_operations_names_unique() -> 'Operation'
Ensure sub-operation names are unique within this operation.
operation_test
¤
Tests for Operation model.
| CLASS | DESCRIPTION |
|---|---|
FakeOutput |
|
FakeContext |
|
TestOperation |
|
FakeOutput
¤
FakeContext
¤
TestOperation
¤
| METHOD | DESCRIPTION |
|---|---|
test_minimal_construction |
Operation should construct with minimum required fields. |
test_full_construction |
Operation should accept all fields. |
test_name_is_required |
Operation should require a name. |
test_produces_is_required |
Operation should require a produces type. |
test_kind_is_required |
Operation should require a kind. |
test_kind_rejects_invalid_values |
Operation should reject invalid kind values. |
test_kind_accepts_all_valid_values |
Operation should accept all three kind values. |
test_sub_operations_recursion |
Operation should accept recursive sub_operations. |
test_max_retrieval_rounds_non_negative |
Operation should reject negative max_retrieval_rounds. |
test_default_max_retrieval_rounds_is_zero |
Operation should default max_retrieval_rounds to 0. |
test_duplicate_sub_operation_names_rejected |
Operation should reject duplicate names in sub_operations. |
test_serialization_roundtrip |
Operation should serialize and deserialize. |
test_minimal_construction
¤
test_minimal_construction()
Operation should construct with minimum required fields.
test_kind_rejects_invalid_values
¤
test_kind_rejects_invalid_values()
Operation should reject invalid kind values.
test_kind_accepts_all_valid_values
¤
test_kind_accepts_all_valid_values()
Operation should accept all three kind values.
test_sub_operations_recursion
¤
test_sub_operations_recursion()
Operation should accept recursive sub_operations.
test_max_retrieval_rounds_non_negative
¤
test_max_retrieval_rounds_non_negative()
Operation should reject negative max_retrieval_rounds.
test_default_max_retrieval_rounds_is_zero
¤
test_default_max_retrieval_rounds_is_zero()
Operation should default max_retrieval_rounds to 0.
test_duplicate_sub_operation_names_rejected
¤
test_duplicate_sub_operation_names_rejected()
Operation should reject duplicate names in sub_operations.
test_serialization_roundtrip
¤
test_serialization_roundtrip()
Operation should serialize and deserialize.
plans
¤
Execution plan models for CrewMaster v2.0.0.
The ExecutionPlan is the resolved, immutable DAG that drives execution. It is built from an Operation tree by resolving dependencies, ordering nodes topologically, and assembling per-node disclosure payloads.
| CLASS | DESCRIPTION |
|---|---|
DisclosurePayload |
The fully assembled disclosure for a single plan node. |
PlanNode |
A single node in the ExecutionPlan DAG. |
ExecutionPlan |
The resolved, immutable execution plan. |
PlanBuildError |
Raised when an ExecutionPlan cannot be built from an Operation tree. |
| FUNCTION | DESCRIPTION |
|---|---|
assemble_disclosure |
Assemble a DisclosurePayload from an Operation and AgentConfig. |
resolve_plan |
Resolve an Operation tree into an immutable ExecutionPlan. |
DisclosurePayload
¤
The fully assembled disclosure for a single plan node.
Contains everything an agent needs to execute its assigned node: identity blocks, task blocks, resolved context, resolved tools, and the rendered prompt text.
| ATTRIBUTE | DESCRIPTION |
|---|---|
identity_blocks |
List of resolved identity PromptBlock ids. |
task_blocks |
List of resolved task PromptBlock ids. |
resolved_context |
The flattened context dictionary for template rendering. |
resolved_tools |
The list of ToolSchema instances visible to this node. |
rendered_prompt |
The final rendered prompt text.
.. deprecated:: 2.0.0
Rendering is now done in :func:
TYPE:
|
PlanNode
¤
A single node in the ExecutionPlan DAG.
Each PlanNode corresponds to one Operation and carries its agent, runtime driver, disclosure payload, and dependency information.
| ATTRIBUTE | DESCRIPTION |
|---|---|
operation_name |
The name of the Operation this node executes.
TYPE:
|
agent |
The AgentConfig for this node (resolved from Operation or defaults).
TYPE:
|
runtime |
The RuntimeDriver instance for this node.
TYPE:
|
disclosure |
The assembled DisclosurePayload.
TYPE:
|
produces |
The type this node produces as output. |
depends_on |
List of operation names this node depends on. |
disclosure
class-attribute
instance-attribute
¤
disclosure: DisclosurePayload = Field(default_factory=DisclosurePayload)
ExecutionPlan
¤
The resolved, immutable execution plan.
Built from an Operation tree. The plan contains all nodes in topological order, their dependency edges, the artifact type registry, and per-node disclosure payloads.
| ATTRIBUTE | DESCRIPTION |
|---|---|
nodes |
All PlanNodes in topological order. |
edges |
Dependency edges as (from_node, to_node) tuples. |
artifacts |
Mapping of operation name to output type. |
disclosure |
Mapping of operation name to DisclosurePayload.
TYPE:
|
PlanBuildError
¤
Raised when an ExecutionPlan cannot be built from an Operation tree.
assemble_disclosure
¤
assemble_disclosure(operation: Operation, agent: AgentConfig, context: dict[str, Any], block_store: BlockStore) -> DisclosurePayload
Assemble a DisclosurePayload from an Operation and AgentConfig.
Resolves the agent's identity blocks and the operation's task blocks
through the block_store, validates that all frontmatter requires
are satisfied by the available context variables, validates that all
required_slots on the Operation are covered by block provides,
renders all blocks via Jinja2, and returns a DisclosurePayload.
This is called at plan-build time. If any validation fails, the plan fails before any LLM call is made.
| PARAMETER | DESCRIPTION |
|---|---|
|
The Operation being assembled into a disclosure.
TYPE:
|
|
The AgentConfig that will execute this operation.
TYPE:
|
|
Variables structured as |
|
The BlockStore implementation for resolving
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
DisclosurePayload
|
A DisclosurePayload with identity blocks, task blocks, resolved |
DisclosurePayload
|
context, and the fully rendered prompt. |
| RAISES | DESCRIPTION |
|---|---|
ValueError
|
If any block require is unsatisfied by the context, or if any required_slot is not provided by any block. |
FileNotFoundError
|
If a block URI cannot be resolved. |
resolve_plan
¤
resolve_plan(operation: Operation, context_store: ContextStore, block_store: BlockStore, default_runtime: Any | None = None, tool_registry: ToolRegistry | None = None) -> ExecutionPlan
Resolve an Operation tree into an immutable ExecutionPlan.
Walks the Operation tree to collect leaf operations (those with an
agent assigned), resolves consumes dependencies by type — checking
both upstream node artifacts and the ContextStore for domain projectors —
topologically sorts the resulting nodes, assembles per-node disclosure
payloads, and returns a complete ExecutionPlan.
Dependency resolution rules:
- If a consumed type is a :class:
ContextProjector, resolve it via thecontext_store. The projected context becomes part of thectxnamespace. - If a consumed type matches the
producesof another leaf operation in the same tree, it is an artifact dependency — the downstream node depends on the upstream node. - If neither matches, the plan fails with a
PlanBuildError.
| PARAMETER | DESCRIPTION |
|---|---|
|
The root Operation to resolve.
TYPE:
|
|
The ContextStore holding domain instances for ContextProjector resolution.
TYPE:
|
|
The BlockStore for resolving
TYPE:
|
|
Fallback RuntimeDriver when an AgentConfig does not specify its own.
TYPE:
|
|
Optional ToolRegistry for populating
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
ExecutionPlan
|
A fully resolved ExecutionPlan with nodes in topological order. |
| RAISES | DESCRIPTION |
|---|---|
PlanBuildError
|
If any |
plans_resolve_test
¤
Tests for resolve_plan — the ExecutionPlan resolver.
Covers: - Walking the Operation tree and collecting leaf nodes - Resolving consumes by type (ContextProjectors and upstream artifacts) - Topological sort - Error on unresolved consumes - Error on cycles - Error on missing agents - Disclosure assembly per node - Runtime assignment (AgentConfig.runtime vs default_runtime) - Tool retrieval from ToolRegistry
| CLASS | DESCRIPTION |
|---|---|
Greeting |
|
UserInfo |
|
Colors |
|
Typography |
|
FinalDesign |
|
InvalidOutput |
|
User |
|
UserNameProjector |
Projects a User to context. |
NotAProjector |
Does NOT implement ContextProjector. |
FakeOutput |
|
FakeDriver |
A fake RuntimeDriver that records calls and returns canned responses. |
TestLeafCollection |
Tests for leaf operation collection from the Operation tree. |
TestConsumesResolution |
Tests for resolving consumes via ContextStore and upstream artifacts. |
TestTopologicalSort |
Tests for topological ordering of plan nodes. |
TestRuntimeAssignment |
Tests for runtime driver assignment to each node. |
TestToolRegistryIntegration |
Tests for tool retrieval during plan building. |
TestPlanStructure |
Tests for ExecutionPlan structure correctness. |
TestErrorMessages |
Tests for descriptive error messages. |
Greeting
¤
UserInfo
¤
Colors
¤
Typography
¤
FinalDesign
¤
InvalidOutput
¤
UserNameProjector
¤
UserNameProjector(user_name: str)
Projects a User to context.
| METHOD | DESCRIPTION |
|---|---|
from_domain |
|
to_context |
|
NotAProjector
¤
Does NOT implement ContextProjector.
FakeOutput
¤
FakeDriver
¤
FakeDriver(output: object = None)
A fake RuntimeDriver that records calls and returns canned responses.
| METHOD | DESCRIPTION |
|---|---|
execute |
|
astream |
|
| ATTRIBUTE | DESCRIPTION |
|---|---|
calls |
TYPE:
|
TestLeafCollection
¤
Tests for leaf operation collection from the Operation tree.
| METHOD | DESCRIPTION |
|---|---|
test_single_leaf_root_with_agent |
Root with agent → single leaf. |
test_sub_operations_as_leaves |
Container root with sub_operations → each sub-op is a leaf. |
test_deeply_nested_sub_operations |
Three-level nested operations → collect only those with agents. |
test_no_agent_in_tree_raises |
A tree with no agents at all should fail. |
test_single_leaf_root_with_agent
¤
test_single_leaf_root_with_agent()
Root with agent → single leaf.
test_sub_operations_as_leaves
¤
test_sub_operations_as_leaves()
Container root with sub_operations → each sub-op is a leaf.
test_deeply_nested_sub_operations
¤
test_deeply_nested_sub_operations()
Three-level nested operations → collect only those with agents.
test_no_agent_in_tree_raises
¤
test_no_agent_in_tree_raises()
A tree with no agents at all should fail.
TestConsumesResolution
¤
Tests for resolving consumes via ContextStore and upstream artifacts.
| METHOD | DESCRIPTION |
|---|---|
test_context_projector_resolved |
consumes=[UserNameProjector] → resolved via ContextStore. |
test_upstream_artifact_dependency |
consumes=[Colors] where upstream node produces Colors → dependency. |
test_mixed_consumes_projectors_and_artifacts |
consumes=[UserNameProjector, Colors] → both resolved. |
test_consumes_not_resolvable_raises |
A consumed type that is neither a projector nor produced → error. |
test_self_consuming_raises |
Operation consuming its own output type → error. |
test_context_projector_resolved
¤
test_context_projector_resolved()
consumes=[UserNameProjector] → resolved via ContextStore.
test_upstream_artifact_dependency
¤
test_upstream_artifact_dependency()
consumes=[Colors] where upstream node produces Colors → dependency.
test_mixed_consumes_projectors_and_artifacts
¤
test_mixed_consumes_projectors_and_artifacts()
consumes=[UserNameProjector, Colors] → both resolved.
test_consumes_not_resolvable_raises
¤
test_consumes_not_resolvable_raises()
A consumed type that is neither a projector nor produced → error.
test_self_consuming_raises
¤
test_self_consuming_raises()
Operation consuming its own output type → error.
TestTopologicalSort
¤
Tests for topological ordering of plan nodes.
| METHOD | DESCRIPTION |
|---|---|
test_linear_chain |
A → B → C linear chain should order correctly. |
test_diamond_dependency |
step1 → step2, step1 → step3 → step4 (diamond) should work. |
test_cycle_detection |
Cyclic dependencies should be detected and fail. |
test_independent_nodes_any_order |
Two independent nodes → both should appear, no dependency edges. |
TestRuntimeAssignment
¤
Tests for runtime driver assignment to each node.
| METHOD | DESCRIPTION |
|---|---|
test_agent_runtime_overrides_default |
AgentConfig.runtime should be used when set, not default_runtime. |
test_fallback_to_default_runtime |
When AgentConfig has no runtime, use default_runtime. |
test_missing_runtime_raises |
No runtime anywhere → error. |
TestToolRegistryIntegration
¤
Tests for tool retrieval during plan building.
| METHOD | DESCRIPTION |
|---|---|
test_tools_retrieved_for_agent_scope |
Agent with default_tool_scope → tools should appear in disclosure. |
test_no_tools_without_registry |
No ToolRegistry → resolved_tools should be empty. |
test_global_scope_tools_visible |
Tools registered under '*' should be visible to any scope. |
test_tools_retrieved_for_agent_scope
¤
test_tools_retrieved_for_agent_scope()
Agent with default_tool_scope → tools should appear in disclosure.
test_no_tools_without_registry
¤
test_no_tools_without_registry()
No ToolRegistry → resolved_tools should be empty.
test_global_scope_tools_visible
¤
test_global_scope_tools_visible()
Tools registered under '*' should be visible to any scope.
TestPlanStructure
¤
Tests for ExecutionPlan structure correctness.
| METHOD | DESCRIPTION |
|---|---|
test_plan_has_nodes_edges_artifacts_disclosure |
Plan should have all top-level fields populated. |
test_disclosure_rendered_prompt_empty_after_resolve |
After resolve_plan, rendered_prompt is empty — rendering moved to api.execute(). |
test_plan_has_nodes_edges_artifacts_disclosure
¤
test_plan_has_nodes_edges_artifacts_disclosure()
Plan should have all top-level fields populated.
test_disclosure_rendered_prompt_empty_after_resolve
¤
test_disclosure_rendered_prompt_empty_after_resolve()
After resolve_plan, rendered_prompt is empty — rendering moved to api.execute().
TestErrorMessages
¤
Tests for descriptive error messages.
| METHOD | DESCRIPTION |
|---|---|
test_duplicate_operation_names |
Duplicate leaf operation names → descriptive error. |
test_duplicate_produces_types |
Duplicate produces types → descriptive error. |
plans_test
¤
Tests for ExecutionPlan, PlanNode, and DisclosurePayload models.
| CLASS | DESCRIPTION |
|---|---|
FakeOutput |
|
TestDisclosurePayload |
|
TestPlanNode |
|
TestExecutionPlan |
|
FakeOutput
¤
TestDisclosurePayload
¤
| METHOD | DESCRIPTION |
|---|---|
test_defaults |
DisclosurePayload should have sensible defaults. |
test_full_construction |
DisclosurePayload should accept all fields. |
test_serialization_roundtrip |
DisclosurePayload should serialize and deserialize. |
TestPlanNode
¤
| METHOD | DESCRIPTION |
|---|---|
test_defaults |
PlanNode should have sensible defaults. |
test_operation_name_required |
PlanNode should require operation_name. |
test_full_construction |
PlanNode should accept all fields. |
test_serialization_roundtrip |
PlanNode should serialize and deserialize. |
TestExecutionPlan
¤
| METHOD | DESCRIPTION |
|---|---|
test_defaults |
ExecutionPlan should have sensible defaults. |
test_full_construction |
ExecutionPlan should accept all fields. |
test_serialization_roundtrip |
ExecutionPlan should serialize and deserialize. |