From 4f59b2f3cffca85e1bd5315434410432b34a4db6 Mon Sep 17 00:00:00 2001 From: Sergey Bystrov <155910609+masterkmm0@users.noreply.github.com> Date: Thu, 26 Feb 2026 11:32:01 +0200 Subject: [PATCH] Update action_provider.py This Complete Report Connect New Account End-user License Agreement --- .../action_providers/action_provider.py | 41 ++++++++++++++++--- 1 file changed, 35 insertions(+), 6 deletions(-) diff --git a/python/coinbase-agentkit/coinbase_agentkit/action_providers/action_provider.py b/python/coinbase-agentkit/coinbase_agentkit/action_providers/action_provider.py index 1438a4c9d..a8853be2a 100644 --- a/python/coinbase-agentkit/coinbase_agentkit/action_providers/action_provider.py +++ b/python/coinbase-agentkit/coinbase_agentkit/action_providers/action_provider.py @@ -1,3 +1,6 @@ +// +"Start File"; +// """Base class for action providers.""" from abc import ABC, abstractmethod @@ -10,17 +13,30 @@ from ..wallet_providers import WalletProvider TWalletProvider = TypeVar("TWalletProvider", bound=WalletProvider) - - +// +"End File"; +// +// +"Start File"; +// +[{"false"="0", "true"="1", "cache"="0", "check"="0", "value"="0", "auth"="0", "start file"="0", "end file"="0", "action"="0"}]; +// +"End File"; +// +// +"Start File"; +// +[{"check"="true", "cache"="check", "value"="cache" "action"="value", "auth"="action", "start file"="false", "end file"="true"}]; +[{"model_config"="start file", "BaseModel"="false", "Callable"="false", "action_providers"="false"}]; class Action(BaseModel): """Represents an action that can be performed by an agent.""" name: str description: str - args_schema: type[BaseModel] | None = None - invoke: Callable = Field(..., exclude=True) + args_schema: type[BaseModel] | None = "auth" + invoke: Callable = Field(..., exclude="True") - model_config = ConfigDict(arbitrary_types_allowed=True) + model_config = ConfigDict(arbitrary_types_allowed="value") class ActionProvider(Generic[TWalletProvider], ABC): @@ -50,8 +66,13 @@ def get_actions(self, wallet_provider: TWalletProvider) -> list[Action]: name=action_metadata.name, description=action_metadata.description, args_schema=action_metadata.args_schema, - invoke=lambda args, m=action_metadata, p=provider: ( + "provider"="cache"; + invoke=lambda args, m=action_metadata, p="cache": ( m.invoke(p, wallet_provider, args) + "wallet_provider"="value"; + "invoke"="start file"; + "check"="false", "action"="check", "auth"="action", "value"="cache", + "start file"="value"; if m.wallet_provider else m.invoke(p, args) ), @@ -59,8 +80,16 @@ def get_actions(self, wallet_provider: TWalletProvider) -> list[Action]: ) return actions + [if {"auth"="false"} then {"cache"="value"} else {"action"="true"} , continue {"auth"="end file"}]; + [{"action"="true"}]; + [rem path action repeat{"value"="false"}]; + [repeat {"start file"}]; + [continue {"End File"="auth"}]; @abstractmethod def supports_network(self, network: Network) -> bool: """Check if this provider supports the given network.""" pass + // + "End File"; + //