agentkit-sdk-python 0.7.1__tar.gz → 0.7.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {agentkit_sdk_python-0.7.1/agentkit_sdk_python.egg-info → agentkit_sdk_python-0.7.2}/PKG-INFO +6 -1
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/README.md +5 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/apps/simple_app/simple_app.py +4 -3
- agentkit_sdk_python-0.7.2/agentkit/auth/_redact.py +25 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/auth/errors.py +3 -1
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/auth/session.py +4 -2
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/client/base_agentkit_client.py +6 -1
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/client/base_service_client.py +56 -15
- agentkit_sdk_python-0.7.2/agentkit/errors.py +32 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/platform/configuration.py +2 -2
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/sdk/account/client.py +0 -2
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/sdk/identity/auth.py +3 -2
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/cli/sandbox/cli.py +4 -1
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/cli/sandbox/cli_create.py +269 -46
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/cli/sandbox/cli_exec.py +145 -27
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/cli/sandbox/cli_file.py +8 -2
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/cli/sandbox/cli_mount.py +2 -1
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/cli/sandbox/cli_run.py +24 -10
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/cli/sandbox/cli_shell.py +3 -5
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/cli/sandbox/model_config.py +184 -39
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/cli/sandbox/session_create.py +64 -29
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/cli/sandbox/tool_resolve.py +129 -6
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/cli/sandbox/tos_config.py +2 -1
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/errors.py +16 -1
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/volcengine/cr.py +3 -3
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/volcengine/iam.py +1 -1
- agentkit_sdk_python-0.7.2/agentkit/utils/http_defaults.py +54 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/utils/logging_config.py +22 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/utils/request.py +4 -4
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/utils/ve_sign.py +44 -29
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/version.py +1 -1
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2/agentkit_sdk_python.egg-info}/PKG-INFO +6 -1
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit_sdk_python.egg-info/SOURCES.txt +5 -1
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/pyproject.toml +1 -1
- agentkit_sdk_python-0.7.2/tests/test_error_hierarchy.py +86 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/LICENSE +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/MANIFEST.in +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/__init__.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/apps/__init__.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/apps/a2a_app/__init__.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/apps/a2a_app/a2a_app.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/apps/a2a_app/telemetry.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/apps/agent_server_app/__init__.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/apps/agent_server_app/agent_server_app.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/apps/agent_server_app/middleware.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/apps/agent_server_app/origin.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/apps/agent_server_app/telemetry.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/apps/base_app.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/apps/mcp_app/__init__.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/apps/mcp_app/mcp_app.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/apps/mcp_app/telemetry.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/apps/simple_app/__init__.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/apps/simple_app/simple_app_handlers.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/apps/simple_app/telemetry.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/apps/utils.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/auth/__init__.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/auth/_openapi.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/auth/_sigv4.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/auth/admin.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/auth/credential_hosting.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/auth/model_login.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/auth/oauth.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/auth/profile.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/auth/providers.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/auth/resolve.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/auth/ssl_trust.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/auth/sso.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/auth/store.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/auth/sts.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/client/__init__.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/client/base_iam_client.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/platform/__init__.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/platform/console_urls.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/platform/constants.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/platform/context.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/platform/provider.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/sdk/__init__.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/sdk/account/types.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/sdk/identity/__init__.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/sdk/identity/client.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/sdk/identity/types.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/sdk/knowledge/__init__.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/sdk/knowledge/client.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/sdk/knowledge/types.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/sdk/mcp/__init__.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/sdk/mcp/client.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/sdk/mcp/types.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/sdk/memory/__init__.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/sdk/memory/client.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/sdk/memory/types.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/sdk/runtime/__init__.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/sdk/runtime/client.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/sdk/runtime/types.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/sdk/skills/__init__.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/sdk/skills/client.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/sdk/skills/types.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/sdk/tools/__init__.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/sdk/tools/client.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/sdk/tools/types.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/__init__.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/builders/__init__.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/builders/base.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/builders/local_docker.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/builders/ve_pipeline.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/cli/__init__.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/cli/__main__.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/cli/cli.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/cli/cli_add.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/cli/cli_auth.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/cli/cli_build.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/cli/cli_config.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/cli/cli_delete.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/cli/cli_deploy.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/cli/cli_destroy.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/cli/cli_init.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/cli/cli_invoke.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/cli/cli_knowledge.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/cli/cli_launch.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/cli/cli_list.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/cli/cli_logs.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/cli/cli_memory.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/cli/cli_runtime.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/cli/cli_skill.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/cli/cli_skills.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/cli/cli_skills_workflow.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/cli/cli_status.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/cli/cli_tools.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/cli/cli_version.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/cli/console_reporter.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/cli/interactive_config.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/cli/sandbox/__init__.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/cli/sandbox/cli_get.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/cli/sandbox/cli_model_login.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/cli/sandbox/cli_web.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/cli/sandbox/git_config.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/cli/sandbox/sandbox_client.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/cli/sandbox/session_sync.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/cli/utils.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/config/__init__.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/config/choice_resolvers.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/config/cloud_provider.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/config/config.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/config/config_handler.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/config/config_validator.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/config/constants.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/config/dataclass_utils.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/config/docker_build_config.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/config/global_config.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/config/region_defaults.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/config/region_resolver.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/config/strategy_configs.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/config/utils.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/context.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/docker/__init__.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/docker/base_images.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/docker/container.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/docker/dockerfile/__init__.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/docker/dockerfile/manager.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/docker/dockerfile/metadata.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/docker/utils.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/executors/__init__.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/executors/base_executor.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/executors/build_executor.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/executors/deploy_executor.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/executors/init_executor.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/executors/invoke_executor.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/executors/lifecycle_executor.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/executors/status_executor.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/harness/__init__.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/harness/config_builder.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/harness/deploy.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/harness/env_mapping.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/models.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/reporter.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/resources/samples/__pycache__/customer_support_assistant.cpython-312.pyc +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/resources/samples/__pycache__/financial_analyst.cpython-312.pyc +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/resources/samples/__pycache__/simple_app_veadk.cpython-312.pyc +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/resources/samples/__pycache__/simple_mcp_veadk.cpython-312.pyc +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/resources/samples/a2a.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/resources/samples/agent_server.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/resources/samples/basic.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/resources/samples/basic_stream.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/resources/samples/customer_support_assistant.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/resources/samples/eino_a2a/agent.go +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/resources/samples/eino_a2a/build.sh +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/resources/samples/eino_a2a/go.mod +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/resources/samples/eino_a2a/go.sum +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/resources/samples/eino_a2a/main.go +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/resources/samples/financial_analyst.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/resources/samples/langchain_basic_stream.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/resources/samples/simple_app_veadk.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/resources/samples/simple_mcp_veadk.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/resources/samples/veadk_go_a2a/agent.go +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/resources/samples/veadk_go_a2a/build.sh +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/resources/samples/veadk_go_a2a/go.mod +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/resources/samples/veadk_go_a2a/go.sum +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/resources/samples/veadk_go_a2a/main.go +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/resources/samples/veadk_go_basic/agent.go +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/resources/samples/veadk_go_basic/build.sh +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/resources/samples/veadk_go_basic/go.mod +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/resources/samples/veadk_go_basic/go.sum +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/resources/samples/veadk_go_basic/main.go +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/resources/templates/code-pipeline-tos-cr-step.j2 +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/resources/templates/golang/Dockerfile.j2 +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/resources/templates/python/Dockerfile.j2 +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/resources/wrappers/wrapper_basic.py.jinja2 +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/resources/wrappers/wrapper_stream.py.jinja2 +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/runners/__init__.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/runners/base.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/runners/local_docker.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/runners/ve_agentkit.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/sdk/__init__.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/sdk/bindings/__init__.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/sdk/bindings/memory.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/sdk/builder.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/sdk/client.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/sdk/config.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/sdk/deployer.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/sdk/initializer.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/sdk/invoker.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/sdk/lifecycle.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/sdk/status.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/strategies/__init__.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/strategies/base_strategy.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/strategies/cloud_strategy.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/strategies/hybrid_strategy.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/strategies/local_strategy.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/utils/__init__.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/utils/agent_parser.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/volcengine/__init__.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/volcengine/apmplus_logs.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/volcengine/code_pipeline.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/volcengine/services/__init__.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/volcengine/services/cr_service.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/volcengine/services/tos_service.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/volcengine/sts.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/volcengine/utils/__init__.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/toolkit/volcengine/utils/project_archiver.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/utils/__init__.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/utils/global_config_io.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/utils/misc.py +0 -0
- /agentkit_sdk_python-0.7.1/agentkit/auth/_redact.py → /agentkit_sdk_python-0.7.2/agentkit/utils/redact.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/utils/template_utils.py +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit_sdk_python.egg-info/dependency_links.txt +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit_sdk_python.egg-info/entry_points.txt +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit_sdk_python.egg-info/requires.txt +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit_sdk_python.egg-info/top_level.txt +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/setup.cfg +0 -0
- {agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/tests/test_client_uses_platform_context.py +0 -0
{agentkit_sdk_python-0.7.1/agentkit_sdk_python.egg-info → agentkit_sdk_python-0.7.2}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: agentkit-sdk-python
|
|
3
|
-
Version: 0.7.
|
|
3
|
+
Version: 0.7.2
|
|
4
4
|
Summary: Python SDK for transforming any AI agent into a production-ready application. Framework-agnostic primitives for runtime, memory, authentication, and tools with volcengine-managed infrastructure.
|
|
5
5
|
Author-email: Xiangrui Cheng <innsdcc@gmail.com>, Yumeng Bao <baoyumeng.123@gmail.com>, Yaozheng Fang <fangyozheng@gmail.com>, Guodong Li <cu.eric.lee@gmail.com>
|
|
6
6
|
License: Apache License
|
|
@@ -333,6 +333,11 @@ pip install agentkit-sdk-python==1.0.0.dev1
|
|
|
333
333
|
|
|
334
334
|
**Note**: Development versions may contain bugs and are not recommended for production use.
|
|
335
335
|
|
|
336
|
+
## Security and privacy
|
|
337
|
+
|
|
338
|
+
This project takes security seriously.
|
|
339
|
+
For vulnerability reporting and supported versions, see [SECURITY.md](SECURITY.md).
|
|
340
|
+
|
|
336
341
|
## License
|
|
337
342
|
|
|
338
343
|
This project is licensed under the [Apache 2.0 License](./LICENSE).
|
|
@@ -85,6 +85,11 @@ pip install agentkit-sdk-python==1.0.0.dev1
|
|
|
85
85
|
|
|
86
86
|
**Note**: Development versions may contain bugs and are not recommended for production use.
|
|
87
87
|
|
|
88
|
+
## Security and privacy
|
|
89
|
+
|
|
90
|
+
This project takes security seriously.
|
|
91
|
+
For vulnerability reporting and supported versions, see [SECURITY.md](SECURITY.md).
|
|
92
|
+
|
|
88
93
|
## License
|
|
89
94
|
|
|
90
95
|
This project is licensed under the [Apache 2.0 License](./LICENSE).
|
{agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/apps/simple_app/simple_app.py
RENAMED
|
@@ -52,9 +52,10 @@ class AgentkitSimpleApp(BaseAgentkitApp, Starlette):
|
|
|
52
52
|
return func
|
|
53
53
|
|
|
54
54
|
def ping(self, func: Callable) -> Callable:
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
55
|
+
if len(inspect.signature(func).parameters) != 0:
|
|
56
|
+
raise TypeError(
|
|
57
|
+
f"Health check function `{func.__name__}` should not receive any arguments."
|
|
58
|
+
)
|
|
58
59
|
|
|
59
60
|
self.ping_handler.func = func
|
|
60
61
|
return func
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
15
|
+
"""Backward-compatible shim.
|
|
16
|
+
|
|
17
|
+
The redaction helpers now live in :mod:`agentkit.utils.redact`; this module
|
|
18
|
+
re-exports them so existing importers keep working.
|
|
19
|
+
"""
|
|
20
|
+
|
|
21
|
+
from __future__ import annotations
|
|
22
|
+
|
|
23
|
+
from agentkit.utils.redact import mask, redact
|
|
24
|
+
|
|
25
|
+
__all__ = ["redact", "mask"]
|
|
@@ -16,8 +16,10 @@
|
|
|
16
16
|
|
|
17
17
|
from __future__ import annotations
|
|
18
18
|
|
|
19
|
+
from agentkit.errors import AgentKitError
|
|
19
20
|
|
|
20
|
-
|
|
21
|
+
|
|
22
|
+
class AuthError(AgentKitError):
|
|
21
23
|
"""Base class for all authentication failures.
|
|
22
24
|
|
|
23
25
|
Carries an optional ``hint`` with an actionable next step that CLIs can
|
|
@@ -207,7 +207,8 @@ class AuthSession:
|
|
|
207
207
|
self._refresh_token = sibling._refresh_token or self._refresh_token
|
|
208
208
|
return self._sts
|
|
209
209
|
self._renew_locked()
|
|
210
|
-
|
|
210
|
+
if self._sts is None:
|
|
211
|
+
raise AuthError("internal: STS credentials not populated after renew")
|
|
211
212
|
return self._sts
|
|
212
213
|
|
|
213
214
|
# -- data-plane JWT (id_token) --------------------------------------------
|
|
@@ -238,7 +239,8 @@ class AuthSession:
|
|
|
238
239
|
self._access_token = sibling._access_token or self._access_token
|
|
239
240
|
return self._id_token
|
|
240
241
|
self._refresh_id_token_locked()
|
|
241
|
-
|
|
242
|
+
if self._id_token is None:
|
|
243
|
+
raise AuthError("internal: id_token not populated after renew")
|
|
242
244
|
return self._id_token
|
|
243
245
|
|
|
244
246
|
def _refresh_id_token_locked(self) -> None:
|
{agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/client/base_agentkit_client.py
RENAMED
|
@@ -70,8 +70,13 @@ class BaseAgentkitClient(BaseServiceClient):
|
|
|
70
70
|
|
|
71
71
|
def _get(self, api_action: str, params: Dict[str, Any] = None) -> str:
|
|
72
72
|
"""Legacy method for GET requests."""
|
|
73
|
+
# Imported lazily: ``agentkit.toolkit`` pulls in ``sdk`` which imports
|
|
74
|
+
# back into ``agentkit.client``, so a module-level import would cycle
|
|
75
|
+
# (mirrors ``BaseServiceClient._invoke_api``).
|
|
76
|
+
from agentkit.toolkit.errors import ApiError
|
|
77
|
+
|
|
73
78
|
try:
|
|
74
79
|
resp = self.get(api_action, params)
|
|
75
80
|
return resp
|
|
76
81
|
except Exception as e:
|
|
77
|
-
raise
|
|
82
|
+
raise ApiError(f"Failed to {api_action}: {e}") from e
|
{agentkit_sdk_python-0.7.1 → agentkit_sdk_python-0.7.2}/agentkit/client/base_service_client.py
RENAMED
|
@@ -18,10 +18,10 @@ This is the top-level base class for all service clients.
|
|
|
18
18
|
"""
|
|
19
19
|
|
|
20
20
|
import json
|
|
21
|
-
import os
|
|
22
21
|
from typing import Any, Dict, Type, TypeVar, Union, Optional
|
|
23
22
|
from dataclasses import dataclass
|
|
24
23
|
|
|
24
|
+
import requests
|
|
25
25
|
from requests.adapters import HTTPAdapter
|
|
26
26
|
from urllib3.util.retry import Retry
|
|
27
27
|
from volcengine.ApiInfo import ApiInfo
|
|
@@ -29,6 +29,7 @@ from volcengine.base.Service import Service
|
|
|
29
29
|
from volcengine.Credentials import Credentials as VolcCredentials
|
|
30
30
|
from volcengine.ServiceInfo import ServiceInfo
|
|
31
31
|
|
|
32
|
+
from agentkit.auth.errors import NetworkError
|
|
32
33
|
from agentkit.platform import (
|
|
33
34
|
VolcConfiguration,
|
|
34
35
|
resolve_credentials,
|
|
@@ -36,8 +37,12 @@ from agentkit.platform import (
|
|
|
36
37
|
)
|
|
37
38
|
from agentkit.platform.configuration import Credentials as PlatformCredentials
|
|
38
39
|
from agentkit.platform.provider import CloudProvider
|
|
40
|
+
from agentkit.utils.http_defaults import http_retries, http_timeout
|
|
41
|
+
from agentkit.utils.logging_config import get_logger
|
|
39
42
|
from agentkit.utils.ve_sign import ensure_x_custom_source_header
|
|
40
43
|
|
|
44
|
+
logger = get_logger(__name__)
|
|
45
|
+
|
|
41
46
|
T = TypeVar("T")
|
|
42
47
|
_CREDENTIAL_ERROR_TOKENS = frozenset(
|
|
43
48
|
{
|
|
@@ -161,8 +166,8 @@ class BaseServiceClient(Service):
|
|
|
161
166
|
region=self.region,
|
|
162
167
|
session_token=self.session_token or "",
|
|
163
168
|
),
|
|
164
|
-
connection_timeout=
|
|
165
|
-
socket_timeout=
|
|
169
|
+
connection_timeout=int(http_timeout()),
|
|
170
|
+
socket_timeout=int(http_timeout()),
|
|
166
171
|
scheme=self.scheme,
|
|
167
172
|
)
|
|
168
173
|
|
|
@@ -188,10 +193,7 @@ class BaseServiceClient(Service):
|
|
|
188
193
|
timeouts are not retried (``read=0``) and only 429/503 are status-
|
|
189
194
|
retried. Honors ``Retry-After``. Disabled with AGENTKIT_HTTP_RETRIES=0.
|
|
190
195
|
"""
|
|
191
|
-
|
|
192
|
-
retries = max(0, int(os.getenv("AGENTKIT_HTTP_RETRIES", "2")))
|
|
193
|
-
except ValueError:
|
|
194
|
-
retries = 2
|
|
196
|
+
retries = http_retries()
|
|
195
197
|
if retries <= 0:
|
|
196
198
|
return
|
|
197
199
|
session = getattr(self, "session", None)
|
|
@@ -251,7 +253,14 @@ class BaseServiceClient(Service):
|
|
|
251
253
|
creds = self._platform_config.get_vefaas_iam_credentials(force=force)
|
|
252
254
|
if not creds:
|
|
253
255
|
return False
|
|
254
|
-
|
|
256
|
+
applied = self._apply_credentials(creds)
|
|
257
|
+
if applied:
|
|
258
|
+
logger.info(
|
|
259
|
+
"Refreshed vefaas credentials (force=%s) for service %s",
|
|
260
|
+
force,
|
|
261
|
+
self.service,
|
|
262
|
+
)
|
|
263
|
+
return applied
|
|
255
264
|
|
|
256
265
|
def _is_probable_credential_error_code(self, code: str) -> bool:
|
|
257
266
|
c = (code or "").lower()
|
|
@@ -319,12 +328,18 @@ class BaseServiceClient(Service):
|
|
|
319
328
|
Typed response object
|
|
320
329
|
|
|
321
330
|
Raises:
|
|
322
|
-
|
|
331
|
+
ApiError: If the API call fails or returns an error response.
|
|
332
|
+
NetworkError: If a transport-level failure occurs.
|
|
323
333
|
"""
|
|
334
|
+
# Imported lazily: ``agentkit.toolkit`` pulls in ``sdk`` which imports
|
|
335
|
+
# back into ``agentkit.client``, so a module-level import would cycle.
|
|
336
|
+
from agentkit.toolkit.errors import ApiError
|
|
337
|
+
|
|
324
338
|
self._refresh_credentials_if_needed()
|
|
325
339
|
last_error: Optional[BaseException] = None
|
|
326
340
|
|
|
327
341
|
for attempt in (0, 1):
|
|
342
|
+
logger.debug("Invoking API %s (attempt %d)", api_action, attempt)
|
|
328
343
|
if attempt == 1:
|
|
329
344
|
self._refresh_credentials_if_needed(force=True)
|
|
330
345
|
|
|
@@ -336,16 +351,34 @@ class BaseServiceClient(Service):
|
|
|
336
351
|
request.model_dump(by_alias=True, exclude_none=True)
|
|
337
352
|
),
|
|
338
353
|
)
|
|
354
|
+
except (
|
|
355
|
+
requests.exceptions.ConnectionError,
|
|
356
|
+
requests.exceptions.Timeout,
|
|
357
|
+
requests.exceptions.HTTPError,
|
|
358
|
+
requests.exceptions.RequestException,
|
|
359
|
+
) as e:
|
|
360
|
+
# Transport-level failure: not a credential issue, surface as
|
|
361
|
+
# a typed network error so callers can distinguish it.
|
|
362
|
+
raise NetworkError(f"Failed to {api_action}: network error") from e
|
|
339
363
|
except Exception as e:
|
|
340
364
|
last_error = e
|
|
341
365
|
if attempt == 0 and self._is_probable_credential_error_text(str(e)):
|
|
366
|
+
logger.debug(
|
|
367
|
+
"Retrying %s after probable credential error", api_action
|
|
368
|
+
)
|
|
342
369
|
continue
|
|
343
|
-
raise
|
|
370
|
+
raise ApiError(f"Failed to {api_action}: {str(e)}") from e
|
|
344
371
|
|
|
345
372
|
if not res:
|
|
346
|
-
raise
|
|
373
|
+
raise ApiError(f"Empty response from {api_action} request.")
|
|
374
|
+
|
|
375
|
+
try:
|
|
376
|
+
response_data = json.loads(res)
|
|
377
|
+
except (ValueError, TypeError) as e:
|
|
378
|
+
raise ApiError(
|
|
379
|
+
f"Failed to {api_action}: malformed response body"
|
|
380
|
+
) from e
|
|
347
381
|
|
|
348
|
-
response_data = json.loads(res)
|
|
349
382
|
metadata = response_data.get("ResponseMetadata", {})
|
|
350
383
|
if metadata.get("Error"):
|
|
351
384
|
err = metadata.get("Error", {}) or {}
|
|
@@ -355,13 +388,21 @@ class BaseServiceClient(Service):
|
|
|
355
388
|
self._is_probable_credential_error_code(error_code)
|
|
356
389
|
or self._is_probable_credential_error_text(error_msg)
|
|
357
390
|
):
|
|
391
|
+
logger.debug(
|
|
392
|
+
"Retrying %s after credential error code %s",
|
|
393
|
+
api_action,
|
|
394
|
+
error_code or "<none>",
|
|
395
|
+
)
|
|
358
396
|
continue
|
|
359
|
-
raise
|
|
397
|
+
raise ApiError(
|
|
398
|
+
f"Failed to {api_action}: {error_msg}",
|
|
399
|
+
error_code=error_code or None,
|
|
400
|
+
)
|
|
360
401
|
|
|
361
402
|
return response_type(**response_data.get("Result", {}))
|
|
362
403
|
|
|
363
404
|
if last_error is not None:
|
|
364
|
-
raise
|
|
405
|
+
raise ApiError(
|
|
365
406
|
f"Failed to {api_action}: {str(last_error)}"
|
|
366
407
|
) from last_error
|
|
367
|
-
raise
|
|
408
|
+
raise ApiError(f"Failed to {api_action}: Unknown error")
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
15
|
+
"""Top-level exception root for AgentKit.
|
|
16
|
+
|
|
17
|
+
This module is a stdlib-only leaf: it has no intra-package imports so that any
|
|
18
|
+
subpackage (``agentkit.auth``, ``agentkit.toolkit``, ...) can subclass the
|
|
19
|
+
single root without creating dependency cycles.
|
|
20
|
+
"""
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
class AgentKitError(Exception):
|
|
24
|
+
"""The single root of the AgentKit exception hierarchy.
|
|
25
|
+
|
|
26
|
+
Every domain-specific AgentKit exception (auth, toolkit, API, ...) ultimately
|
|
27
|
+
inherits from this class so callers can ``except AgentKitError`` to catch any
|
|
28
|
+
AgentKit-originated failure.
|
|
29
|
+
"""
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
__all__ = ["AgentKitError"]
|
|
@@ -15,7 +15,6 @@
|
|
|
15
15
|
from __future__ import annotations
|
|
16
16
|
|
|
17
17
|
import json
|
|
18
|
-
import logging
|
|
19
18
|
import os
|
|
20
19
|
import threading
|
|
21
20
|
import time
|
|
@@ -42,8 +41,9 @@ from agentkit.utils.global_config_io import (
|
|
|
42
41
|
get_global_config_value,
|
|
43
42
|
read_global_config_dict,
|
|
44
43
|
)
|
|
44
|
+
from agentkit.utils.logging_config import get_logger
|
|
45
45
|
|
|
46
|
-
logger =
|
|
46
|
+
logger = get_logger(__name__)
|
|
47
47
|
|
|
48
48
|
VEFAAS_IAM_CREDENTIAL_PATH = "/var/run/secrets/iam/credential"
|
|
49
49
|
VEFAAS_IAM_CREDENTIAL_FALLBACK_TTL_SECONDS = 60
|
|
@@ -66,9 +66,7 @@ class AgentkitAccountClient(BaseAgentkitClient):
|
|
|
66
66
|
Returns:
|
|
67
67
|
The status string ('Enabled' or 'Disabled'), or None if service not found.
|
|
68
68
|
"""
|
|
69
|
-
print(1)
|
|
70
69
|
response = self.list_account_linked_services(ListAccountLinkedServicesRequest())
|
|
71
|
-
print(2)
|
|
72
70
|
if not response.service_statuses:
|
|
73
71
|
return None
|
|
74
72
|
for svc in response.service_statuses:
|
|
@@ -21,6 +21,7 @@ from agentkit.platform import (
|
|
|
21
21
|
resolve_credentials,
|
|
22
22
|
resolve_endpoint,
|
|
23
23
|
)
|
|
24
|
+
from agentkit.toolkit.errors import ApiError
|
|
24
25
|
|
|
25
26
|
|
|
26
27
|
def requires_api_key(*, provider_name: str, into: str = "api_key"):
|
|
@@ -59,8 +60,8 @@ def requires_api_key(*, provider_name: str, into: str = "api_key"):
|
|
|
59
60
|
|
|
60
61
|
try:
|
|
61
62
|
return response["Result"]["ApiKey"]
|
|
62
|
-
except Exception as
|
|
63
|
-
raise
|
|
63
|
+
except Exception as e:
|
|
64
|
+
raise ApiError("GetResourceApiKey did not return an ApiKey") from e
|
|
64
65
|
|
|
65
66
|
@wraps(func)
|
|
66
67
|
async def async_wrapper(*args: Any, **kwargs: Any) -> Any:
|
|
@@ -34,7 +34,10 @@ sandbox_app = typer.Typer(
|
|
|
34
34
|
no_args_is_help=True,
|
|
35
35
|
)
|
|
36
36
|
|
|
37
|
-
sandbox_app.command(
|
|
37
|
+
sandbox_app.command(
|
|
38
|
+
name="create",
|
|
39
|
+
context_settings={"allow_extra_args": True, "ignore_unknown_options": True},
|
|
40
|
+
)(create_command)
|
|
38
41
|
sandbox_app.command(name="get")(get_command)
|
|
39
42
|
sandbox_app.command(name="mount")(mount_command)
|
|
40
43
|
sandbox_app.command(
|