Skip to content

Classmap the complete public Agents API type surface #526

Description

@chubes4

Problem

#525 made public package contracts Composer-discoverable, but consumers still cannot statically resolve the guarded global conversation, runtime-tool, transcript, workflow, and tool interfaces/classes under src/.

A Data Machine conversation-result convergence now surfaces dozens of consumer PHPStan class.notFound findings for real public Agents API contracts such as:

  • WP_Agent_Conversation_Loop
  • WP_Agent_Run_Outcome
  • WP_Agent_Runtime_Tool_Request
  • WP_Agent_Conversation_Completion_Policy
  • WP_Agent_Transcript_Persister
  • WP_Agent_Tool_Executor

Expected

Extend the package-owned lazy Composer classmap to the complete public class/interface/trait surface under src/, while retaining agents-api.php as the idempotent runtime and registration bootstrap.

Constraints

  • Composer autoload outside WordPress remains inert.
  • Public classes remain lazy; loading vendor/autoload.php must not define them eagerly.
  • Procedural registration files remain owned by agents-api.php and must not execute through classmap generation.
  • Normal and version-skew bootstrap behavior remains unchanged.
  • Add a consumer-only PHPStan fixture covering conversation/runtime contracts with no custom config or stubs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions