Skip to content

API Reference parrot.e2e.targets

github-actions[bot] edited this page Dec 2, 2026 · 4 revisions

parrot.e2e.targets

View source

Lazy, fixed target adapter registry (FEAT-581, M4).

Spec §3 "M4: Target registry and fixture entry points" fixes six public target kinds (:data:TARGET_KINDS, taken directly from :class:parrot.e2e.models.TargetConfig's own kind literal, never duplicated by hand). :func:get_target_adapter is the single entry point the M3 supervisor uses to resolve one kind to its concrete :class:parrot.e2e.targets.base.TargetAdapter.

The registry is intentionally lazy: importing this package (or calling :func:get_target_adapter for one kind) never imports the concrete module for any other kind. Concrete adapter modules (parrot.e2e.targets.{mcp,botmanager,ui,browser}) are later M4 deliverables and do not exist yet in this checkout — resolving any kind today raises :class:parrot.e2e.errors.E2EPrerequisiteError (never a raw ImportError/ModuleNotFoundError), exactly the "missing optional implementation" case this registry is required to surface explicitly. The same typed error is raised once a module exists but is missing its required extra/binary, or does not (yet) define the expected factory attribute.

This module has no parrot.e2e.supervisor import and does not import any concrete target module at package-import time — only the M2 schema/error surface, resolving the M3/M4 cycle spec §3 calls out.

Alias LaunchSpec

Re-exported from parrot.e2e.targets.base.LaunchSpec.

Attribute TARGET_KINDS

Type: frozenset[str]

Alias TargetAdapter

Re-exported from parrot.e2e.targets.base.TargetAdapter.

Function get_target_adapter

Lazily resolve one target kind to its concrete :class:TargetAdapter.

Only the module registered for kind is imported — never all six.

get_target_adapter(kind: str) -> TargetAdapter

Parameter Type Default Description
kind str One of :data:TARGET_KINDS (TargetConfig.kind's value).

Returns: TargetAdapter — The result of calling that kind's zero-argument factory — a class:TargetAdapter.

Raises:

  • E2EConfigError — If kind is not one of :data:TARGET_KINDS.
  • E2EPrerequisiteError — If the registered module cannot be imported (missing optional implementation or dependency — e.g. an uninstalled extra, or the module simply does not exist yet in this checkout), or the module exists but does not define the expected factory attribute.

Architecture

Clients

Bots & Agents

Memory

Knowledge

Tools & Toolkits

Flows

Experts

Skills

Stores & Loaders

MCP & A2A

Server & APIs

Integrations

Outputs & A2UI

Prompts

Security

Operations

Migration

SDD Tooling

LLM Wiki

Deployment

Decisions

API Reference

Clone this wiki locally