oas2mcp.agent.state =================== .. py:module:: oas2mcp.agent.state .. autoapi-nested-parse:: Typed state definitions for ``oas2mcp`` agents. Purpose: Define the state carried through stateful OpenAPI enhancement workflows. Design: - Use ``TypedDict`` because LangChain v1 custom agent state requires it. - Keep the state centered on the source URL and progressively enriched API understanding. - Store deterministic catalog artifacts plus enhancer results so they can later be exported into an enhanced spec/config surface. .. rubric:: Examples .. code-block:: python state: OpenApiEnhancementState = { "source_url": "https://example.com/openapi.json", } Classes ------- .. autoapisummary:: oas2mcp.agent.state.OpenApiEnhancementState oas2mcp.agent.state.OperationEnhancementRecord Module Contents --------------- .. py:class:: OpenApiEnhancementState Bases: :py:obj:`langchain.agents.AgentState` State carried through the OpenAPI enhancement workflow. .. py:attribute:: candidate_bundle :type: NotRequired[object] .. py:attribute:: catalog :type: NotRequired[object] .. py:attribute:: catalog_summary :type: NotRequired[object] .. py:attribute:: catalog_summary_context :type: NotRequired[object] .. py:attribute:: completed_steps :type: NotRequired[list[str]] .. py:attribute:: current_operation_key :type: NotRequired[str] .. py:attribute:: enhanced_operations :type: NotRequired[list[OperationEnhancementRecord]] .. py:attribute:: enhancement_todo :type: NotRequired[list[str]] .. py:attribute:: notes :type: NotRequired[list[str]] .. py:attribute:: operation_keys :type: NotRequired[list[str]] .. py:attribute:: remaining_operation_keys :type: NotRequired[list[str]] .. py:attribute:: source_url :type: str .. py:class:: OperationEnhancementRecord Bases: :py:obj:`langchain.agents.AgentState` Serializable enhancer result stored in agent state. .. py:attribute:: description :type: str .. py:attribute:: final_kind :type: str .. py:attribute:: notes :type: list[str] .. py:attribute:: operation_key :type: str .. py:attribute:: operation_slug :type: str .. py:attribute:: requires_confirmation :type: bool .. py:attribute:: resource_uri :type: str | None .. py:attribute:: title :type: str .. py:attribute:: tool_name :type: str | None